/* Weather Page Styles */
.weather-main {
  padding: 2rem 0 4rem;
}

/* Hero */
.weather-hero {
  text-align: center;
  margin-bottom: 2.5rem;
}

.weather-hero-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 1rem;
  color: var(--accent);
  opacity: 0.8;
}

.weather-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.weather-subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
}

/* City Selector - reuse prayer-times pattern */
.city-selector {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.city-selector-inner {
  display: flex;
  gap: 1rem;
  align-items: flex-end;
  flex-wrap: wrap;
}

.selector-group {
  flex: 1;
  min-width: 150px;
}

.selector-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.selector-group select {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-size: 1rem;
  font-family: inherit;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left 12px center;
  transition: border-color 0.2s;
}

[dir="ltr"] .selector-group select {
  background-position: right 12px center;
}

.selector-group select:focus {
  outline: none;
  border-color: var(--accent);
}

.btn-location {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 0.95rem;
  font-family: inherit;
  cursor: pointer;
  transition: opacity 0.2s;
  white-space: nowrap;
}

.btn-location:hover {
  opacity: 0.9;
}

.btn-location .icon {
  width: 18px;
  height: 18px;
}

.city-date {
  text-align: center;
  margin-top: 1rem;
  font-size: 0.95rem;
  color: var(--text-secondary);
}

/* Current Weather Card */
.current-weather {
  margin-bottom: 2.5rem;
}

.current-weather-card {
  border-radius: 20px;
  padding: 2rem 2.5rem;
  text-align: center;
  color: white;
  position: relative;
  overflow: hidden;
  transition: background 0.5s ease;
}

/* Weather gradient backgrounds */
.current-weather-card.weather-clear {
  background: linear-gradient(135deg, #f9a825, #ff8f00, #ef6c00);
}

.current-weather-card.weather-cloudy {
  background: linear-gradient(135deg, #546e7a, #78909c, #90a4ae);
}

.current-weather-card.weather-rain {
  background: linear-gradient(135deg, #37474f, #455a64, #546e7a);
}

.current-weather-card.weather-snow {
  background: linear-gradient(135deg, #b0bec5, #cfd8dc, #eceff1);
  color: #37474f;
}

.current-weather-card.weather-fog {
  background: linear-gradient(135deg, #78909c, #90a4ae, #b0bec5);
}

.current-weather-card.weather-storm {
  background: linear-gradient(135deg, #1a237e, #283593, #3949ab);
}

.current-weather-card.weather-drizzle {
  background: linear-gradient(135deg, #455a64, #607d8b, #78909c);
}

.current-weather-card.weather-default {
  background: linear-gradient(135deg, var(--accent), #0a5c50);
}

[data-theme="dark"] .current-weather-card.weather-clear {
  background: linear-gradient(135deg, #e65100, #bf360c, #8d2600);
}

[data-theme="dark"] .current-weather-card.weather-cloudy {
  background: linear-gradient(135deg, #263238, #37474f, #455a64);
}

[data-theme="dark"] .current-weather-card.weather-rain {
  background: linear-gradient(135deg, #1a2327, #263238, #37474f);
}

[data-theme="dark"] .current-weather-card.weather-snow {
  background: linear-gradient(135deg, #455a64, #546e7a, #607d8b);
  color: #eceff1;
}

[data-theme="dark"] .current-weather-card.weather-fog {
  background: linear-gradient(135deg, #37474f, #455a64, #546e7a);
}

[data-theme="dark"] .current-weather-card.weather-storm {
  background: linear-gradient(135deg, #0d1147, #1a237e, #1e2a7a);
}

.current-weather-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.current-weather-info {
  text-align: start;
}

.current-city-name {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.current-weather-desc {
  font-size: 1rem;
  opacity: 0.9;
}

.current-weather-icon svg {
  width: 80px;
  height: 80px;
}

.current-temp {
  font-size: 5rem;
  font-weight: 700;
  font-family: var(--font-en);
  direction: ltr;
  line-height: 1.1;
  margin-bottom: 1.5rem;
}

.current-weather-details {
  display: flex;
  justify-content: center;
  gap: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.2);
}

.weather-detail {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
}

.weather-detail-icon {
  width: 22px;
  height: 22px;
  opacity: 0.8;
}

.weather-detail-label {
  font-size: 0.8rem;
  opacity: 0.75;
}

.weather-detail-value {
  font-size: 1.1rem;
  font-weight: 700;
  font-family: var(--font-en);
  direction: ltr;
}

/* 7-Day Forecast */
.forecast-section {
  margin-bottom: 2.5rem;
}

.forecast-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  text-align: center;
  margin-bottom: 1.5rem;
}

.forecast-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.75rem;
}

.forecast-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.25rem 0.75rem;
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s;
}

.forecast-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}

.forecast-card--today {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent);
}

.forecast-day {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
}

.forecast-icon svg {
  width: 40px;
  height: 40px;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.forecast-temp-high {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  font-family: var(--font-en);
  direction: ltr;
}

.forecast-temp-low {
  font-size: 0.9rem;
  color: var(--text-tertiary);
  font-family: var(--font-en);
  direction: ltr;
  margin-top: 0.15rem;
}

.forecast-desc {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 0.5rem;
  line-height: 1.3;
}

/* Weather Info Section */
.weather-info {
  margin-bottom: 2.5rem;
}

.weather-info__title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  text-align: center;
  margin-bottom: 1.5rem;
}

.weather-info__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.info-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem;
}

.info-card h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.info-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* Internal Links */
.internal-links {
  margin-bottom: 2rem;
}

.section-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-primary);
  text-align: center;
  margin-bottom: 1.25rem;
}

.internal-links-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.internal-link-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem;
  text-align: center;
  text-decoration: none;
  transition: transform 0.2s, border-color 0.2s;
}

.internal-link-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
}

.internal-link-card__name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.35rem;
}

.internal-link-card__desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* Loading state */
.loading-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.weather-loading {
  text-align: center;
  padding: 3rem;
  color: var(--text-secondary);
  font-size: 1.1rem;
}

.weather-error {
  text-align: center;
  padding: 2rem;
  color: #e53935;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 2rem;
}

/* Responsive */
@media (max-width: 900px) {
  .forecast-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 768px) {
  .weather-title { font-size: 1.5rem; }
  .weather-subtitle { font-size: 0.95rem; }

  .city-selector-inner {
    flex-direction: column;
  }

  .selector-group {
    min-width: 100%;
  }

  .btn-location {
    width: 100%;
    justify-content: center;
  }

  .forecast-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .current-temp {
    font-size: 3.5rem;
  }

  .current-weather-details {
    gap: 1.25rem;
  }

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

  .internal-links-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .forecast-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
  }

  .forecast-card {
    padding: 1rem 0.5rem;
  }

  .current-weather-card {
    padding: 1.5rem;
  }

  .current-temp {
    font-size: 3rem;
  }

  .current-weather-top {
    flex-direction: column;
    text-align: center;
  }

  .current-weather-info {
    text-align: center;
    margin-bottom: 0.5rem;
  }

  .current-weather-details {
    flex-wrap: wrap;
    gap: 1rem;
  }

  .current-weather-icon svg {
    width: 60px;
    height: 60px;
  }
}
