.weather-section {
  position: relative;
  padding: 78px 0 86px;
  background: linear-gradient(
    180deg,
    #fff 0,
    #fff 22px,
    var(--cream) 78px,
    var(--cream) calc(100% - 42px),
    #fff 100%
  );
  overflow: hidden;
}

.weather-section .container {
  position: relative;
  z-index: 1;
}

.weather-section .weather {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 16px;
  align-items: stretch;
  padding: 14px;
  border: 1px solid rgba(199, 171, 130, 0.22);
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.38);
  box-shadow: 0 18px 45px rgba(40, 34, 26, 0.06);
}

.weather-section .weather-main {
  min-height: 0;
  padding: 24px 26px;
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.weather-main-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.weather-section .weather-main h2 {
  margin: 8px 0 4px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.03em;
}

.weather-location {
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 13px;
}

.weather-icon {
  flex: 0 0 auto;
  width: 58px;
  height: 58px;
  color: currentColor;
}

.weather-icon-main {
  width: 68px;
  height: 68px;
  color: rgba(255, 255, 255, 0.9);
}

.weather-icon svg {
  display: block;
  width: 100%;
  height: 100%;
}

.weather-current {
  display: flex;
  align-items: flex-end;
  gap: 14px;
  margin: 18px 0 20px;
}

.weather-section .weather-main .temp {
  font-size: clamp(58px, 6vw, 76px);
  line-height: 0.86;
}

.weather-condition {
  padding-bottom: 3px;
  font-size: 15px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.92);
}

.weather-details {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.28);
  color: rgba(255, 255, 255, 0.8);
  font-size: 12px;
}

.weather-details span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.weather-details b {
  color: #fff;
  font-weight: 800;
}

.rain-icon {
  width: 15px;
  height: 15px;
  color: currentColor;
}

.rain-icon svg {
  display: block;
  width: 100%;
  height: 100%;
}

.weather-status {
  margin: 10px 0 0;
  color: rgba(255, 255, 255, 0.7);
  font-size: 12px;
}

.weather-section .forecast {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.weather-section .forecast-card {
  min-height: 190px;
  padding: 18px 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(233, 225, 214, 0.9);
  text-align: left;
  display: flex;
  flex-direction: column;
}

.forecast-day {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.forecast-icon {
  width: 42px;
  height: 42px;
  margin: 14px 0 10px;
  color: var(--sand);
}

.weather-section .forecast .forecast-icon,
.weather-section .forecast .forecast-temp {
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
  text-align: left;
}

.forecast-condition {
  min-height: 32px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.3;
}

.forecast-temp {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-top: auto;
  font-size: 18px;
}

.forecast-max {
  font-weight: 800;
}

.forecast-min {
  color: var(--muted);
}

.forecast-rain {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 9px;
  color: var(--muted);
  font-size: 11px;
}

.forecast-rain .rain-icon {
  color: var(--sand);
}

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

@media (max-width: 900px) {
  .weather-section .weather {
    grid-template-columns: 1fr;
  }

  .weather-section .weather-main {
    min-height: 220px;
  }
}

@media (max-width: 600px) {
  .weather-section {
    padding: 58px 0 66px;
  }

  .weather-section .weather {
    display: block;
    padding: 10px;
    border-radius: 24px;
  }

  .weather-section .weather-main {
    margin-bottom: 12px;
    padding: 22px;
  }

  .weather-section .forecast {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 4px;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
  }

  .weather-section .forecast-card {
    flex: 0 0 min(78vw, 220px);
    min-height: 170px;
    scroll-snap-align: start;
  }
}

@media (prefers-reduced-motion: reduce) {
  .weather-section *,
  .weather-section *::before,
  .weather-section *::after {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}
