/* ==========================================================================
   Strona główna – nagłówek powitalny i kafle
   ========================================================================== */

#home .home__content {
  display: flex;
  flex-direction: column;
  gap: var(--s6);
}

/* ==========================================================================
   Nagłówek powitalny
   ========================================================================== */

.hero {
  position: relative;
  border-radius: var(--r-l);
  overflow: hidden;
  background-color: var(--color-prussianBlue);
  box-shadow: var(--cien-2);
}

.hero__zdjecie {
  position: absolute;
  inset: 0;
}

.hero__zdjecie img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Przyciemnienie zdjęcia, żeby biały tekst był czytelny niezależnie od kadru.
   Gradient jest mocniejszy po lewej, bo tam leży treść. */
.hero__zdjecie::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(100deg, rgba(9, 22, 40, 0.9) 0%, rgba(9, 22, 40, 0.68) 38%, rgba(9, 22, 40, 0.18) 100%);
}

.hero__tresc {
  position: relative;
  padding: var(--s7) var(--s6) var(--s6);
  max-width: 62ch;
}

.hero__nadtytul {
  font-size: 12px;
  font-weight: var(--weight-bold);
  letter-spacing: 1.7px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72) !important;
  margin-bottom: var(--s2);
}

.hero__tytul {
  font-size: clamp(34px, 4vw + 18px, 60px);
  font-weight: var(--weight-bold);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: #fff !important;
  margin-bottom: var(--s3);
}

.hero__opis {
  font-size: clamp(15px, 0.6vw + 13px, 18px);
  line-height: 1.62;
  color: rgba(255, 255, 255, 0.9) !important;
  margin-bottom: var(--s5);
  max-width: 56ch;
}

.hero__akcje {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s3);
}

/* --- Przyciski --- */

.przycisk {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  padding: 13px 26px;
  border-radius: var(--r-pill);
  font-size: 15px;
  font-weight: var(--weight-bold);
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background-color 0.18s ease, border-color 0.18s ease;
}

.przycisk:hover {
  transform: translateY(-2px);
}

/* Kolor wpisany na stalo, bo --color-prussianBlue w trybie ciemnym
   staje sie jasny - napis zniknalby na bialym przycisku. */
.przycisk--glowny {
  background-color: #fff;
  color: #112d4e !important;
}

.przycisk--glowny:hover {
  background-color: var(--color-lavender);
}

.przycisk--drugi {
  border-color: rgba(255, 255, 255, 0.55);
  color: #fff !important;
}

.przycisk--drugi:hover {
  background-color: rgba(255, 255, 255, 0.14);
  border-color: #fff;
}

.przycisk:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 3px;
}

/* --- Pasek liczb --- */

.hero__liczby {
  position: relative;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr));
  margin: 0;
  background-color: rgba(6, 14, 26, 0.72);
  backdrop-filter: blur(6px);
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.hero__liczba {
  padding: var(--s4) var(--s5);
  border-right: 1px solid rgba(255, 255, 255, 0.12);
}

.hero__liczba:last-child {
  border-right: none;
}

.hero__liczba dt {
  font-size: 11px;
  font-weight: var(--weight-bold);
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.62);
  margin-bottom: 3px;
}

.hero__liczba dd {
  margin: 0;
  font-size: clamp(24px, 1.6vw + 17px, 32px);
  font-weight: var(--weight-bold);
  line-height: 1.1;
  color: #fff;
}

.hero__liczba dd span {
  font-size: 0.55em;
  font-weight: var(--weight-semi-bold);
  color: rgba(255, 255, 255, 0.75);
  margin-left: 2px;
}

.hero__liczba small {
  display: block;
  margin-top: 2px;
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.55);
}

/* ==========================================================================
   Kafle
   ========================================================================== */

.kafel__glowna--mniejsza {
  font-size: clamp(15px, 0.5vw + 13px, 17px) !important;
  line-height: 1.4;
  font-weight: var(--weight-semi-bold);
}

/* ==========================================================================
   Sekcja wydarzeń – dostosowanie starych klas do nowego wyglądu
   ========================================================================== */

#home .home__events-container {
  display: flex;
  flex-direction: column;
  gap: var(--s3);
}

#home .home__heading {
  font-size: 12px;
  font-weight: var(--weight-bold);
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--tekst-przygaszony);
}

#home .home__events {
  display: flex;
  flex-direction: column;
  gap: var(--s3);
}

/* Stare arkusze narzucały kartom stałą wysokość 140–150 px, przez co dłuższy
   opis był ucinany w połowie wiersza. Wysokość ma wynikać z treści. */
#home .home__event {
  display: flex;
  height: auto !important;
  align-items: stretch !important;
  padding: 0 !important;
  gap: 0;
  background-color: var(--tlo-karta);
  border: 1px solid var(--obwodka);
  border-radius: var(--r-m);
  overflow: hidden;
  box-shadow: var(--cien-1);
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

#home .home__event:hover {
  transform: translateY(-2px);
  box-shadow: var(--cien-3);
}

#home .home__event-card {
  flex: 0 0 132px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: var(--s4) var(--s3);
  text-align: center;
}

#home .home__event-card-blue {
  background-color: var(--akcent-tlo);
}

#home .home__event-card-red {
  background-color: var(--color-indianRed);
  color: #fff;
}

#home .home__event-card-red * {
  color: #fff;
}

#home .home__event-card-day {
  font-size: 12px;
  font-weight: var(--weight-bold);
  letter-spacing: 0.8px;
  text-transform: uppercase;
  line-height: 1.25;
}

#home .home__event-card-time {
  font-size: 15px;
  font-weight: var(--weight-semi-bold);
}

#home .home__event-content {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: var(--s4) var(--s5) var(--s3);
  flex: 1;
  min-width: 0;
}

#home .home__event-content-title {
  font-size: clamp(16px, 0.6vw + 14px, 19px);
  font-weight: var(--weight-bold);
  line-height: 1.35;
}

#home .home__event-content-text {
  font-size: 14px !important;
  line-height: 1.6;
  color: var(--tekst-przygaszony);
  display: block !important;
  overflow: visible !important;
}

#home .home__event-card {
  height: auto !important;
  width: auto !important;
  border-radius: 0 !important;
}

#home .home__read-more-container {
  display: flex;
  justify-content: flex-end;
  margin-top: auto;
  padding-top: var(--s2);
}

#home .home__read-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: var(--weight-bold);
  color: var(--akcent);
}

#home .home__read-more svg {
  width: 11px;
  height: 11px;
}

/* ==========================================================================
   Wpisy blogowe na stronie głównej
   ========================================================================== */

#home .home__blog-container {
  display: flex;
  flex-direction: column;
  gap: var(--s3);
}

/* Nagłówek bloku z odnośnikiem „zobacz wszystkie” - tak samo jak
   przy sekcji „co słychać w gminie”. */
#home .home__blog-naglowek {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

#home .home__blog-wiecej {
  font-size: 13px;
  font-weight: var(--weight-bold);
  text-decoration: none;
  color: var(--akcent);
  white-space: nowrap;
}

#home .home__blog-wiecej:hover {
  text-decoration: underline;
}

#home .home__blog-entries {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
  gap: var(--s4);
}

#home .home__blog-entry {
  display: flex;
  flex-direction: column;
  background-color: var(--tlo-karta);
  border: 1px solid var(--obwodka);
  border-radius: var(--r-m);
  overflow: hidden;
  box-shadow: var(--cien-1);
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

#home .home__blog-entry:hover {
  transform: translateY(-3px);
  box-shadow: var(--cien-3);
}

#home .home__blog-entry-img {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background-color: var(--color-lavender);
}

#home .home__blog-entry-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

#home .home__blog-entry-content {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: var(--s4);
  flex: 1;
}

#home .home__blog-entry-category {
  font-size: 11px;
  font-weight: var(--weight-bold);
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--akcent);
}

#home .home__blog-entry-heading {
  font-size: 17px;
  font-weight: var(--weight-bold);
  line-height: 1.35;
}

#home .home__blog-entry-text {
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--tekst-przygaszony);
}

/* ==========================================================================
   Telefony
   ========================================================================== */

@media (max-width: 900px) {
  .hero__tresc {
    padding: var(--s6) var(--s4) var(--s5);
  }
  .hero__liczba {
    padding: var(--s3) var(--s4);
  }
  .hero__zdjecie::after {
    background: linear-gradient(180deg, rgba(9, 22, 40, 0.86) 0%, rgba(9, 22, 40, 0.92) 100%);
  }
}

@media (max-width: 620px) {
  #home .home__event {
    flex-direction: column;
  }
  #home .home__event-card {
    flex: 0 0 auto;
    flex-direction: row;
    justify-content: flex-start;
    gap: var(--s2);
    padding: var(--s2) var(--s4);
  }
  #home .home__event-content {
    padding: var(--s3) var(--s4) var(--s3);
  }
  .hero__akcje .przycisk {
    flex: 1 1 auto;
    justify-content: center;
  }
  .hero__liczby {
    grid-template-columns: 1fr 1fr;
  }
  .hero__liczba:nth-child(2n) {
    border-right: none;
  }
  .hero__liczba:nth-child(-n + 2) {
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  }
}

/* ==========================================================================
   Kafelek „Pogoda i powietrze”
   ========================================================================== */

.kafel--aura .kafel__glowna {
  font-variant-numeric: tabular-nums;
}

/* Pasek z oceną jakości powietrza. Kolory są własne, a nie z motywu —
   skala GIOŚ ma ustalone znaczenie i musi wyglądać tak samo w dzień i w nocy.
   Tekst zawsze ciemny, żeby na żółtym i pomarańczowym dało się go przeczytać. */
.aura__powietrze {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: flex-start;
  margin-top: 8px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 13px;
  line-height: 1.3;
  color: #10202f;
  background-color: #d7dde5;
}

.aura__powietrze--bardzo-dobra { background-color: #57b108; }
.aura__powietrze--dobra        { background-color: #a5cd45; }
.aura__powietrze--umiarkowana  { background-color: #ffd911; }
.aura__powietrze--dostateczna  { background-color: #ef9d1c; }
.aura__powietrze--zla          { background-color: #e8562e; color: #fff; }
.aura__powietrze--bardzo-zla   { background-color: #b1004a; color: #fff; }

.aura__stacja {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: var(--tekst-przygaszony);
}
