/* Weather Page Specific Styles */

/* Weather Hero Section */
.weather-hero {
  position: relative;
  height: 60vh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: white;
  padding: 2rem;
}

.weather-hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background:
    linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)),
    url("https://images.unsplash.com/photo-1533881453712-0d01f3174332?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1580&q=80");
  background-size: cover;
  background-position: center;
  z-index: 0;
  animation: kenburns-right 15s ease-in-out forwards;
}

.weather-hero .hero-content {
  position: relative;
  z-index: 1;
}

.weather-hero .hero-content h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.weather-hero .hero-content p {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

/* Ken Burns Right Animation */
@keyframes kenburns-right {
  0% {
    transform: scale(1) translate(0, 0);
    transform-origin: 84% 50%;
  }
  100% {
    transform: scale(1.25) translateX(20px);
    transform-origin: right;
  }
}

/* Weather Container */
.weather-container {
  padding: 4rem 0;
}

.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* Current Weather Section */
.current-weather {
  margin-bottom: 4rem;
}

.current-weather h2 {
  font-size: 2rem;
  color: var(--dark);
  margin-bottom: 2rem;
  text-align: center;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--accent);
}

.current-card {
  background: white;
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 2rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: center;
}

.current-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.temperature {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 1.5rem;
}

.temp-value {
  font-size: 4rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1;
}

.temp-label {
  font-size: 1rem;
  color: var(--text-light);
  margin-top: 0.5rem;
}

.weather-condition {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.condition-text {
  font-size: 1.5rem;
  color: var(--dark);
  font-weight: 600;
}

.condition-icon {
  font-size: 3rem;
  color: var(--accent);
}

.weather-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.detail-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background-color: var(--light);
  border-radius: 8px;
  border-left: 4px solid var(--accent);
}

.detail-item i {
  font-size: 1.5rem;
  color: var(--primary);
  min-width: 30px;
  text-align: center;
}

.detail-item div {
  display: flex;
  flex-direction: column;
}

.detail-label {
  font-size: 0.85rem;
  color: var(--text-light);
  font-weight: 500;
}

.detail-value {
  font-size: 1.1rem;
  color: var(--dark);
  font-weight: 600;
}

/* Today's Forecast Section */
.todays-forecast {
  margin-bottom: 4rem;
}

.todays-forecast h2 {
  font-size: 2rem;
  color: var(--dark);
  margin-bottom: 2rem;
  text-align: center;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--accent);
}

.forecast-card {
  background: white;
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 2rem;
}

.forecast-detail {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
}

.forecast-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.5rem;
  background-color: var(--light);
  border-radius: 8px;
  text-align: center;
  border-top: 3px solid var(--secondary);
  transition:
    transform 0.3s,
    box-shadow 0.3s;
}

.forecast-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.forecast-item i {
  font-size: 2rem;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.forecast-label {
  font-size: 0.85rem;
  color: var(--text-light);
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.forecast-value {
  font-size: 1.5rem;
  color: var(--dark);
  font-weight: 700;
}

/* Next Days Forecast */
.forecast-section {
  margin-bottom: 4rem;
}

.forecast-section h2 {
  font-size: 2rem;
  color: var(--dark);
  margin-bottom: 2rem;
  text-align: center;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--accent);
}

.forecast-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.5rem;
}

.forecast-day {
  background: white;
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 1.5rem;
  text-align: center;
  border-top: 4px solid var(--accent);
  transition:
    transform 0.3s,
    box-shadow 0.3s;
}

.forecast-day:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.day-header {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #e0e0e0;
}

.day-name {
  font-weight: 600;
  color: var(--dark);
  min-width: 50px;
}

.day-date {
  font-size: 0.85rem;
  color: var(--text-light);
}

.day-icon {
  font-size: 2.5rem;
  color: var(--secondary);
  margin: 1rem 0;
}

.day-temps {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.day-max {
  color: var(--primary);
  font-size: 1.3rem;
}

.day-min {
  color: #888;
  font-size: 1rem;
}

.day-precip {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  margin-top: 0.8rem;
  font-size: 0.85rem;
  color: var(--text-light);
}

.day-precip span {
  padding: 0.3rem 0;
}

.day-precip i {
  margin-right: 0.3rem;
  color: var(--primary);
}

/* Error Message */
.error-message {
  background: white;
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 3rem 2rem;
  text-align: center;
  margin: 2rem 0;
  border-left: 5px solid var(--error);
}

.error-icon {
  font-size: 3rem;
  color: var(--error);
  margin-bottom: 1rem;
}

.error-message h2 {
  color: var(--dark);
  margin-bottom: 1rem;
  font-size: 1.8rem;
}

.error-message p {
  color: var(--text-light);
  font-size: 1rem;
  line-height: 1.6;
}

/* Cache Info */
.cache-info {
  text-align: center;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid #e0e0e0;
  color: #999;
  font-size: 0.9rem;
}

.cache-info i {
  margin-right: 0.5rem;
  color: var(--accent);
}

/* Text Light Variable */
:root {
  --text-light: #666;
}

/* Responsive Design */
@media (max-width: 768px) {
  .current-card {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .weather-hero .hero-content h1 {
    font-size: 2rem;
  }

  .weather-hero .hero-content p {
    font-size: 1rem;
  }

  .weather-details {
    grid-template-columns: 1fr;
  }

  .forecast-detail {
    grid-template-columns: 1fr;
  }

  .forecast-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .day-header {
    flex-direction: column;
    gap: 0.3rem;
  }

  .day-temps {
    justify-content: center;
  }

  .temp-value {
    font-size: 3rem;
  }

  .container {
    padding: 0 1rem;
  }

  .current-weather h2,
  .todays-forecast h2,
  .forecast-section h2 {
    font-size: 1.5rem;
  }
}

@media (max-width: 480px) {
  .weather-hero {
    height: 40vh;
  }

  .weather-hero .hero-content h1 {
    font-size: 1.5rem;
  }

  .weather-hero .hero-content p {
    font-size: 0.9rem;
  }

  .current-card {
    padding: 1.5rem 1rem;
  }

  .forecast-grid {
    grid-template-columns: 1fr;
  }

  .forecast-detail {
    grid-template-columns: 1fr;
  }

  .temp-value {
    font-size: 2.5rem;
  }

  .weather-details {
    gap: 1rem;
  }

  .detail-item {
    padding: 0.8rem;
  }

  .forecast-item {
    padding: 1rem;
  }
}
