.weather-page {
  --wp-ink: #172b54;
  --wp-blue: #378ed2;
  --wp-red: #ff4059;
  --wp-pale: #eff7fd;
  --wp-line: #d5e2ee;

  color: var(--wp-ink);
  font-family: Inter, Arial, sans-serif;
}

.weather-page *,
.weather-page *::before,
.weather-page *::after {
  box-sizing: border-box;
}

.weather-page__container {
  width: min(100% - 3rem, 70rem);
  margin-inline: auto;
}

/*
 * Hero
 */

.weather-page__hero {
  padding: 1.8rem 0 2.7rem;
  background: var(--wp-pale);
}

.weather-page__breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: .7rem;
  align-items: center;
  margin-bottom: 2rem;
  font-size: .76rem;
}

.weather-page__breadcrumbs a {
  color: inherit;
  text-decoration: none;
}

.weather-page__breadcrumbs a:hover {
  text-decoration: underline;
}

.weather-page__hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: end;
}

.weather-page__hero-grid > :only-child {
  grid-column: 1 / -1;
}

.weather-page__hero-grid >
.weather-page__status:only-child {
  justify-self: end;
}

.weather-page__eyebrow {
  margin: 0 0 .65rem;
  color: var(--wp-red);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.weather-page__title {
  margin: 0;
  font-family: 'Barlow Condensed', Impact, sans-serif;
  font-size: clamp(3.7rem, 7vw, 5.7rem);
  font-weight: 800;
  line-height: .96;
  text-transform: uppercase;
}

.weather-page__title span {
  display: block;
}

.weather-page__title-main {
  color: var(--wp-ink);
}

.weather-page__title-accent {
  color: var(--wp-blue);
}

.weather-page__title.has-two-lines
.weather-page__title-accent {
  margin-top: .08em;
}

/*
 * Status danych
 */

.weather-page__status {
  display: flex;
  justify-self: end;
  gap: .7rem;
  align-items: flex-start;
  min-width: 17rem;
  font-size: .8rem;
}

.weather-page__status-dot {
  flex: 0 0 auto;
  width: .65rem;
  height: .65rem;
  margin-top: .2rem;
  border-radius: 50%;
  background: #21a36b;
  box-shadow: 0 0 0 .35rem rgba(33, 163, 107, .11);
}

.weather-page__status.is-stale
.weather-page__status-dot {
  background: #dc941f;
  box-shadow: 0 0 0 .35rem rgba(220, 148, 31, .11);
}

.weather-page__status.is-error
.weather-page__status-dot {
  background: var(--wp-red);
  box-shadow: 0 0 0 .35rem rgba(255, 64, 89, .11);
}

.weather-page__status strong,
.weather-page__status span {
  display: block;
}

.weather-page__status span {
  margin-top: .2rem;
  color: #65748c;
  font-size: .72rem;
}

/*
 * Główna zawartość
 */

.weather-page__content {
  padding-top: 2.2rem;
  padding-bottom: 3.5rem;
}

/*
 * Karty aktualnej pogody
 */

.weather-page__current {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.weather-page__current-card {
  min-height: 19rem;
  padding: 1.5rem;
  border: 1px solid var(--wp-line);
}

.weather-page__current-card--dark {
  color: #fff;
  background: var(--wp-ink);
  border-color: var(--wp-ink);
}

.weather-page__current-card--light {
  background: var(--wp-pale);
}

.weather-page__card-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
}

.weather-page__card-head h2 {
  margin: 0;
  color: inherit;
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.weather-page__card-head span {
  color: #7f9ec3;
  font-size: .72rem;
  font-weight: 700;
  white-space: nowrap;
}

.weather-page__now {
  display: flex;
  gap: .9rem;
  align-items: center;
  margin-top: 2rem;
}

.weather-page__now strong {
  color: inherit;
  font-size: 3rem;
  line-height: 1;
}

/*
 * Ikony pogodowe
 */

.weather-page__icon {
  width: 2.5rem;
  height: 2.5rem;
  overflow: visible;
  color: currentColor;
  fill: currentColor;
  stroke: none;
}

.weather-page__icon-cloud {
  fill: currentColor;
  stroke: none;
}

.weather-page__icon-lines {
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.weather-page__description {
  margin: .75rem 0 1.4rem;
}

.weather-page__details {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .7rem;
  margin: 0;
  padding: 1rem 0;
  border-top: 1px solid rgba(130, 158, 193, .35);
  border-bottom: 1px solid rgba(130, 158, 193, .35);
}

.weather-page__details div {
  min-width: 0;
}

.weather-page__details dt {
  color: #89a1c1;
  font-size: .66rem;
}

.weather-page__details dd {
  margin: .3rem 0 0;
  color: inherit;
  font-size: .8rem;
  font-weight: 800;
  white-space: nowrap;
}

.weather-page__jump {
  display: inline-block;
  margin-top: 1rem;
  padding-bottom: .25rem;
  color: inherit;
  border-bottom: 2px solid var(--wp-red);
  font-size: .7rem;
  font-weight: 800;
  text-decoration: none;
  text-transform: uppercase;
  cursor: pointer;
}

.weather-page__jump:hover {
  opacity: .78;
}

.weather-page__jump:focus-visible {
  outline: 2px solid var(--wp-blue);
  outline-offset: 3px;
}

.weather-page__unavailable {
  display: grid;
  place-content: center;
  min-height: 13rem;
  text-align: center;
}

.weather-page__unavailable span {
  margin-top: .4rem;
  color: #728199;
  font-size: .8rem;
}

/*
 * Komunikat błędu
 */

.weather-page__alert {
  display: grid;
  grid-template-columns: 1fr 2fr auto;
  gap: 1rem;
  align-items: center;
  margin-top: 1.3rem;
  padding: .9rem 1rem;
  border-left: 4px solid var(--wp-red);
  background: #fff0f2;
  font-size: .78rem;
}

.weather-page__alert a {
  padding: .75rem 1rem;
  color: #fff;
  background: var(--wp-red);
  font-weight: 800;
  text-decoration: none;
  text-transform: uppercase;
}

.weather-page__alert a:hover {
  opacity: .86;
}

/*
 * Prognoza kilkudniowa
 */

.weather-page__forecast-section {
  margin-top: 3.5rem;
  scroll-margin-top: 2rem;
}

.weather-page__section-head {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  align-items: flex-end;
  margin-bottom: 1.2rem;
}

.weather-page__section-head >
.weather-page__tabs:only-child {
  margin-left: auto;
}

.weather-page__section-head h2,
.weather-page__planning h2 {
  margin: 0;
  font-family: 'Barlow Condensed', Impact, sans-serif;
  font-size: clamp(2rem, 3vw, 2.7rem);
  line-height: 1;
}

.weather-page__tabs {
  display: flex;
}

.weather-page__tabs button {
  min-height: 2.7rem;
  padding: .7rem 1rem;
  color: var(--wp-ink);
  background: #fff;
  border: 1px solid var(--wp-line);
  font: inherit;
  font-size: .75rem;
  font-weight: 750;
  cursor: pointer;
}

.weather-page__tabs button + button {
  border-left: 0;
}

.weather-page__tabs button:hover {
  background: var(--wp-pale);
}

.weather-page__tabs button.is-active {
  color: #fff;
  background: var(--wp-ink);
  border-color: var(--wp-ink);
}

.weather-page__tabs button.is-active:hover {
  background: var(--wp-ink);
}

.weather-page__tabs button:focus-visible,
.weather-page__forecast:focus-visible {
  outline: 2px solid var(--wp-blue);
  outline-offset: 2px;
}

.weather-page__forecast {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  border: 1px solid var(--wp-line);
}

.weather-page__forecast[hidden] {
  display: none;
}

.weather-page__day {
  min-width: 0;
  padding: 1rem .8rem;
}

.weather-page__day +
.weather-page__day {
  border-left: 1px solid var(--wp-line);
}

.weather-page__day.is-today {
  background: var(--wp-pale);
}

.weather-page__day h3 {
  margin: 0;
  font-size: .82rem;
}

.weather-page__day time {
  display: block;
  margin-top: .25rem;
  color: #74849b;
  font-size: .68rem;
}

.weather-page__day >
.weather-page__icon {
  width: 1.8rem;
  height: 1.8rem;
  margin: 1.3rem 0 .8rem;
}

.weather-page__temperatures {
  display: flex;
  gap: .35rem;
  align-items: baseline;
  margin: 0 0 1rem;
  font-size: 1.3rem;
}

.weather-page__temperatures strong {
  color: var(--wp-ink);
}

.weather-page__temperatures span {
  color: #8090a5;
}

.weather-page__day dl {
  margin: 0;
  padding-top: .8rem;
  border-top: 1px solid var(--wp-line);
}

.weather-page__day dl div {
  display: flex;
  justify-content: space-between;
  gap: .4rem;
  margin-top: .35rem;
  font-size: .64rem;
}

.weather-page__day dd {
  margin: 0;
  font-weight: 750;
  white-space: nowrap;
}

.weather-page__empty {
  grid-column: 1 / -1;
  margin: 0;
  padding: 2rem;
  background: var(--wp-pale);
}

/*
 * Sekcja planowania
 */

.weather-page__planning {
  display: grid;
  grid-template-columns: 1.1fr 2fr;
  gap: 2rem;
  margin-top: 4rem;
  padding-top: 3rem;
  border-top: 1px solid var(--wp-line);
}

.weather-page__planning > :only-child {
  grid-column: 1 / -1;
}

.weather-page__planning-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .8rem;
}

.weather-page__planning-cards article {
  padding: 1.4rem;
  background: var(--wp-pale);
}

.weather-page__planning-cards article > span {
  color: var(--wp-blue);
  font-size: .72rem;
  font-weight: 800;
}

.weather-page__planning-cards h3 {
  margin: 1.1rem 0 .7rem;
  font-size: 1rem;
}

.weather-page__planning-cards article >
h3:first-child {
  margin-top: 0;
}

.weather-page__planning-cards p {
  margin: 0;
  color: #66778e;
  font-size: .78rem;
  line-height: 1.65;
}

.weather-page__planning-cards a {
  display: inline-block;
  margin-top: 1rem;
  padding-bottom: .3rem;
  color: var(--wp-ink);
  border-bottom: 2px solid var(--wp-red);
  font-size: .68rem;
  font-weight: 800;
  text-decoration: none;
  text-transform: uppercase;
}

.weather-page__planning-cards a:hover {
  opacity: .75;
}

/*
 * Źródła i odnośniki
 */

.weather-page__source {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 3rem;
  margin-top: 3rem;
  padding: 1.7rem 2rem;
  color: #fff;
  background: var(--wp-ink);
}

.weather-page__source > :only-child {
  grid-column: 1 / -1;
}

.weather-page__source >
nav:only-child {
  justify-self: end;
}

.weather-page__source h2 {
  margin: 0 0 .5rem;
  color: #fff;
  font-size: 1rem;
}

.weather-page__source p {
  max-width: 38rem;
  margin: 0;
  color: #b8c6da;
  font-size: .75rem;
  line-height: 1.6;
}

.weather-page__source nav {
  display: grid;
  gap: .6rem;
  align-content: center;
}

.weather-page__source a {
  width: fit-content;
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, .45);
  font-size: .68rem;
  font-weight: 800;
  text-decoration: none;
  text-transform: uppercase;
}

.weather-page__source a:hover {
  border-bottom-color: #fff;
}

/*
 * Tablety
 */

@media (max-width: 62rem) {
  .weather-page__current {
    grid-template-columns: 1fr 1fr;
  }

  .weather-page__current-card:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }

  .weather-page__forecast {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .weather-page__day:nth-child(5) {
    border-left: 0;
    border-top: 1px solid var(--wp-line);
  }

  .weather-page__day:nth-child(n + 6) {
    border-top: 1px solid var(--wp-line);
  }
}

/*
 * Urządzenia mobilne
 */

@media (max-width: 48rem) {
  .weather-page__container {
    width: min(100% - 2rem, 70rem);
  }

  .weather-page__hero {
    padding: 1.4rem 0 2rem;
  }

  .weather-page__breadcrumbs {
    margin-bottom: 1.5rem;
  }

  .weather-page__hero-grid,
  .weather-page__planning,
  .weather-page__source {
    grid-template-columns: 1fr;
  }

  .weather-page__hero-grid {
    gap: 1.5rem;
  }

  .weather-page__hero-grid > :only-child,
  .weather-page__planning > :only-child,
  .weather-page__source > :only-child {
    grid-column: auto;
  }

  .weather-page__hero-grid >
  .weather-page__status:only-child,
  .weather-page__source >
  nav:only-child {
    justify-self: start;
  }

  .weather-page__title {
    font-size: clamp(3.2rem, 16vw, 4.6rem);
  }

  .weather-page__status {
    justify-self: start;
    min-width: 0;
    margin-top: .8rem;
  }

  .weather-page__content {
    padding-top: 1.5rem;
  }

  .weather-page__current {
    grid-template-columns: 1fr;
  }

  .weather-page__current-card {
    min-height: 0;
  }

  .weather-page__current-card:last-child,
  .weather-page__current-card:last-child:nth-child(odd) {
    grid-column: auto;
  }

  .weather-page__section-head {
    display: grid;
    gap: 1rem;
  }

  .weather-page__section-head >
  .weather-page__tabs:only-child {
    margin-left: 0;
  }

  .weather-page__tabs {
    max-width: 100%;
    overflow-x: auto;
  }

  .weather-page__tabs button {
    flex: 0 0 auto;
  }

  .weather-page__forecast {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .weather-page__day:nth-child(odd) {
    border-left: 0;
  }

  .weather-page__day:nth-child(n + 3) {
    border-top: 1px solid var(--wp-line);
  }

  .weather-page__alert {
    grid-template-columns: 1fr;
  }

  .weather-page__alert a {
    width: fit-content;
  }

  .weather-page__planning {
    gap: 1.5rem;
    margin-top: 3rem;
    padding-top: 2rem;
  }

  .weather-page__planning-cards {
    grid-template-columns: 1fr;
  }

  .weather-page__source {
    gap: 1.5rem;
  }
}

/*
 * Małe telefony
 */

@media (max-width: 34rem) {
  .weather-page__container {
    width: calc(100% - 2rem);
  }

  .weather-page__title {
    font-size: clamp(2.9rem, 15vw, 4rem);
  }

  .weather-page__current-card,
  .weather-page__source {
    padding: 1.25rem;
  }

  .weather-page__details {
    gap: .4rem;
  }

  .weather-page__details dt {
    font-size: .6rem;
  }

  .weather-page__details dd {
    font-size: .72rem;
  }
}

/*
 * Ograniczenie animacji
 */

@media (prefers-reduced-motion: reduce) {
  html:focus-within {
    scroll-behavior: auto;
  }
}