/* Sunrise & Sunset Page Styles */
.sunrise-main {
  padding: 2rem 0 4rem;
}

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

.hero-visual {
  position: relative;
  width: 120px;
  height: 120px;
  margin: 0 auto 1.5rem;
}

.hero-sun {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 50px;
  height: 50px;
  animation: heroSunPulse 3s ease-in-out infinite;
}

.hero-sun__core {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 24px;
  height: 24px;
  background: linear-gradient(135deg, #facc15, #f97316);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 20px rgba(250, 204, 21, 0.4), 0 0 40px rgba(249, 115, 22, 0.2);
}

.hero-sun__ray {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 3px;
  height: 10px;
  background: linear-gradient(to top, #facc15, transparent);
  border-radius: 2px;
  transform-origin: center -4px;
}

.hero-sun__ray--1 { transform: translate(-50%, -50%) rotate(0deg) translateY(-16px); }
.hero-sun__ray--2 { transform: translate(-50%, -50%) rotate(45deg) translateY(-16px); }
.hero-sun__ray--3 { transform: translate(-50%, -50%) rotate(90deg) translateY(-16px); }
.hero-sun__ray--4 { transform: translate(-50%, -50%) rotate(135deg) translateY(-16px); }
.hero-sun__ray--5 { transform: translate(-50%, -50%) rotate(180deg) translateY(-16px); }
.hero-sun__ray--6 { transform: translate(-50%, -50%) rotate(225deg) translateY(-16px); }
.hero-sun__ray--7 { transform: translate(-50%, -50%) rotate(270deg) translateY(-16px); }
.hero-sun__ray--8 { transform: translate(-50%, -50%) rotate(315deg) translateY(-16px); }

@keyframes heroSunPulse {
  0%, 100% { transform: translateX(-50%) scale(1); opacity: 1; }
  50% { transform: translateX(-50%) scale(1.08); opacity: 0.9; }
}

.hero-moon {
  position: absolute;
  bottom: 15px;
  right: 10px;
  width: 30px;
  height: 30px;
  animation: heroMoonFloat 4s ease-in-out infinite;
}

.hero-moon__body {
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, #a78bfa, #7c3aed);
  border-radius: 50%;
  box-shadow: 0 0 12px rgba(167, 139, 250, 0.3);
  position: relative;
}

.hero-moon__body::after {
  content: '';
  position: absolute;
  top: -3px;
  right: -2px;
  width: 22px;
  height: 22px;
  background: var(--bg-primary);
  border-radius: 50%;
  transition: background var(--transition);
}

.hero-moon__crater {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
}

.hero-moon__crater--1 { width: 5px; height: 5px; top: 12px; left: 6px; }
.hero-moon__crater--2 { width: 3px; height: 3px; top: 18px; left: 12px; }

@keyframes heroMoonFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

.hero-horizon {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0.4;
}

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

.sunrise-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);
}

/* Main Sun Time Cards */
.sun-times-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.sun-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.5rem 1rem;
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s;
  position: relative;
  overflow: hidden;
}

.sun-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  border-radius: 16px 16px 0 0;
}

.sun-card--sunrise::before {
  background: linear-gradient(90deg, #f97316, #facc15);
}

.sun-card--sunset::before {
  background: linear-gradient(90deg, #a855f7, #ec4899);
}

.sun-card--daylength::before {
  background: linear-gradient(90deg, #3b82f6, #06b6d4);
}

.sun-card--solarnoon::before {
  background: linear-gradient(90deg, #facc15, #f59e0b);
}

.sun-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.sun-card__icon {
  width: 44px;
  height: 44px;
  margin: 0 auto 0.75rem;
  color: var(--accent);
  opacity: 0.7;
}

.sun-card__label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.sun-card__time {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-primary);
  font-family: var(--font-en);
  direction: ltr;
}

.sun-card--sunrise .sun-card__time {
  color: #f97316;
}

.sun-card--sunset .sun-card__time {
  color: #a855f7;
}

.sun-card--daylength .sun-card__time {
  color: #3b82f6;
}

.sun-card--solarnoon .sun-card__time {
  color: #f59e0b;
}

[data-theme="dark"] .sun-card--sunrise .sun-card__time { color: #fb923c; }
[data-theme="dark"] .sun-card--sunset .sun-card__time { color: #c084fc; }
[data-theme="dark"] .sun-card--daylength .sun-card__time { color: #60a5fa; }
[data-theme="dark"] .sun-card--solarnoon .sun-card__time { color: #fbbf24; }

/* Sun Arc Section */
.sun-arc-section {
  margin-bottom: 2.5rem;
}

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

.sun-arc-container {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2rem 1.5rem 1rem;
  overflow: hidden;
}

.sun-arc-svg {
  width: 100%;
  height: auto;
  max-height: 280px;
}

.sun-arc-svg text {
  font-family: var(--font-en);
}

[dir="rtl"] .sun-arc-svg text {
  font-family: var(--font-ar);
}

/* Extra Times Grid */
.extra-times-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.extra-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.25rem;
  text-align: center;
  transition: transform 0.2s;
}

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

.extra-card__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin: 0 auto 0.75rem;
}

.extra-card__dot--dawn {
  background: linear-gradient(135deg, #1e3a5f, #5c6bc0);
  box-shadow: 0 0 8px rgba(92, 107, 192, 0.4);
}

.extra-card__dot--dusk {
  background: linear-gradient(135deg, #e91e63, #9c27b0);
  box-shadow: 0 0 8px rgba(233, 30, 99, 0.4);
}

.extra-card__dot--golden {
  background: linear-gradient(135deg, #f9a825, #ff8f00);
  box-shadow: 0 0 8px rgba(249, 168, 37, 0.4);
}

.extra-card__label {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.extra-card__desc {
  font-size: 0.8rem;
  color: var(--text-tertiary);
  margin-bottom: 0.75rem;
}

.extra-card__time {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--accent);
  font-family: var(--font-en);
  direction: ltr;
}

.extra-card__time--sub {
  font-size: 1rem;
  margin-top: 0.25rem;
  opacity: 0.75;
}

/* Islam Info Section */
.sunrise-info {
  margin-bottom: 2.5rem;
}

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

.sunrise-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 */
.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); }
}

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

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

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

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

  .sun-times-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .sun-card__time {
    font-size: 1.4rem;
  }

  .extra-times-grid {
    grid-template-columns: 1fr;
  }

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

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

  .sun-arc-container {
    padding: 1.5rem 0.75rem 0.75rem;
  }
}

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

  .sun-card {
    padding: 1rem 0.75rem;
  }

  .sun-card__time {
    font-size: 1.2rem;
  }

  .hero-visual {
    width: 100px;
    height: 100px;
  }
}
