/* 🌙 Base Variables & Typography */
:root {
  --font-primary: 'Segoe UI', sans-serif;
  --font-accent: 'Scheherazade New', serif;

  --text-color: darkgreen;         /* Main text */
  --accent-color: #005f3c; /* Deep green */
  --calligraphy-color: #FFD700;  /* Gold for overlays */
  --muted-color: #888888;        /* Secondary info like DST status */

  --bg-color: #0D0D0D;
  --card-bg: #1A1A1A;
  --border-color: #444;
  --highlight-color: #7CFC00;
}
body {
  background-color: #e6f0d5; /* Parchment Green */
  color: darkgreen;
  font-family: 'Segoe UI', sans-serif;
  margin: 0;
  padding: 0;
  position: relative;
}

/* 🌟 Top Bar Container */
.top-bar {
 font-family: var(--font-primary);
  position: relative;
  height: 130px;
  background: linear-gradient(to right, #e6f0d5, #A3BE8C);
  border-bottom: 1px solid var(--border-color);
  z-index: 2;
}

/* 📍 Location Group Floated Right */
.location-group {
  position: absolute;
  top: 10px;
  right: 20px;
  text-align: right;
  font-family: var(--font-primary);
  color: var(--accent-color);
}

.location-group .location,
.location-group .time,
.location-group .dst-status,
.location-group .weather {
  margin-bottom: 4px;
  font-size: 0.95rem;
  font-weight: 500;
}
.location,
.time,
.dst-status {
  font-family: var(--font-primary);
  color: var(--accent-color);
  font-weight: 300;
  font-size: 0.75rem;
  margin-top: 4px;
}

.time {
  font-size: 1.2rem;
  font-weight: bold;
  transition: opacity 0.5s ease-in-out;
  opacity: 1;
}

.dst-status {
  color: var(--accent-color);
  font-size: 0.9rem;
  margin-top: 2px;
}

/* 🕒 Clock Section */
.clock {
  padding: 15px 20px;
  text-align: right;
}

/* 🌗 Moon Display & Lunar Info */
.moon-display,
.lunar-info {
  background-color: var(--card-bg);
  border-radius: 8px;
  padding: 5px 7px;
  margin: auto;
  text-align: center;
  font-size: 1.0rem;
  color: var(--text-color);
  font-family: var(--font-primary);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}
@media (max-width: 600px) {
  .moon-display div,
  .lunar-info div {
    font-size: 1rem;
    margin-bottom: 4px;
  }
}

/* 🖋️ Calligraphy Overlay */
.calligraphy-overlay {
  position: absolute;
  top: 10px;
  right: 10px;
  opacity: 0.85;
  z-index: 3;
  pointer-events: none;
  width: 120px;
  height: auto;
  color: var(--calligraphy-color);
  font-family: var(--font-accent);
}

.calligraphy-overlay img {
  mix-blend-mode: multiply;
  filter: drop-shadow(1px 1px 2px rgba(0,0,0,0.2));
}

/* 🌤️ Weather */
.weather {
  font-size: 0.95rem;
  color: var(--accent-color);
  font-family: var(--font-primary);
  margin-top: 6px;
}

/* 📱 Bottom Navigation */
.bottom-nav {
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 12px 0;
  background-color: #2E3440;
  border-top: 1px solid var(--border-color);
  position: fixed;
  bottom: 0;
  width: 100%;
  z-index: 10;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.3);
  backdrop-filter: blur(6px);
  background-color: #e6f0d5; /* Parchment Green */
}

.bottom-nav a {
  text-decoration: none;
  color: var(--text-color);
  font-weight: bold;
  font-family: var(--font-primary);
  padding: 10px 16px;
  transition: color 0.3s ease, text-shadow 0.3s ease;
}

.bottom-nav a:hover {
  color: var(--accent-color);
  text-shadow: 0 0 6px rgba(163, 190, 140, 0.4);
}
/* 🌙 Moon Pulse Animation */
@keyframes pulse {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.05); opacity: 0.8; }
  100% { transform: scale(1); opacity: 1; }
}

.moon-icon {
  font-size: 4em;
  animation: 
    pulse 3s infinite ease-in-out,
    driftRight 15s infinite ease-in-out alternate;
    }

/* 🗓️ Month Name */
.month-name {
  position: absolute;
  top: 20px; /* Adjust as needed to sit above the moon */
  left: 50%;
  transform: translateX(-50%);
  z-index: 20; /* Ensure it floats above orbit visuals */
  font-weight: bold;
  font-size: 1.0rem;
  color: darkgreen;
  font-family: var(--font-primary);
}

/* 🌙 Hijri Month-Based Moon Themes */
.moon-muharram    { color: #C0C0C0; animation: pulse 4s infinite ease-in-out; }
.moon-rabi1       { color: #CCCCCC; animation: shimmer 5s infinite ease-in-out; }
.moon-ramadan     { color: #FFD700; animation: pulse 2s infinite ease-in-out; }
.moon-shawwal     { color: #FFFFFF; animation: sparkle 3s infinite ease-in-out; }
.moon-dhulhijjah  { color: #8B4513; animation: halo 5s infinite ease-in-out; }

/* ✨ Moon Animations */
@keyframes driftRight {
  0%   { transform: translateX(0, 0) rotate(0deg); }
  100% { transform: translateX(2450px); } /* Adjust distance as needed */
}
@keyframes shimmer {
  0% { opacity: 0.8; }
  50% { opacity: 1; }
  100% { opacity: 0.8; }
}

@keyframes sparkle {
  0% { text-shadow: 0 0 2px #fff; }
  50% { text-shadow: 0 0 6px #fff; }
  100% { text-shadow: 0 0 2px #fff; }
}

@keyframes halo {
  0% { box-shadow: 0 0 4px #8B4513; }
  50% { box-shadow: 0 0 12px #8B4513; }
  100% { box-shadow: 0 0 4px #8B4513; }
}
/* 🌙 Wrapper for Navigation + Calendar */
.calendar-wrapper {
  max-width: 700px;
  margin-left: calc(43% - 350px); /* half of max-width */
  padding: 1rem;
  background-color: #e6f0d5; /* Parchment Green */
}

/* 📅 Navigation Controls */
.calendar-nav {
  display: grid;
  grid-template-columns: repeat(7, 1fr); /* Match calendar grid */
  align-items: center;
  width: 160%;
  height: 40px;
  margin-bottom: 1rem;
  padding: 0;
  font-family: 'Noto Naskh Arabic', sans-serif;
}

/* 🗓️ Month Label */
#month-label {
display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1.5rem;
  font-weight: 500;
  color: #f5f5f5;
}

/* 🌙 Lunar Calendar Section */
.lunar-calendar {
  padding: 2rem;
  background: linear-gradient(to bottom, #0f0f0f, #1a1a1a);
  width: 150%;
  border-radius: 12px;
  color: #f5f5f5;
  font-family: 'Noto Naskh Arabic', sans-serif;
  box-shadow: 0 0 12px rgba(255, 215, 0, 0.1);
  margin-top: 1rem;
}

/* 📆 Weekday Header */
.calendar-header {
  background-color: #1A1A1A;;
  display: grid;
  grid-template-columns: repeat(7, 2fr);
  font-family: var(--font-accent);
  color: var(--calligraphy-color);
  font-size: 1.2rem;
  font-weight: bold;
  align-items: center;
  width: auto;
  text-align: center;
padding: 4px;

 }
/* 📆 Weekday Header Cells */
.calendar-header div {
  height: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

/* 📅 Calendar Grid */
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  grid-auto-rows: minmax(80px, auto); /* Add this */
  gap: 1.5px;
  width: 100%;
  height: auto;
  text-align: center;
  box-sizing: border-box;
}
/* 📅 Normalize Grid and Header Cells */
.calendar-header div,
.calendar-grid .day-cell {
  padding: 1px;
  box-sizing: border-box;
}
/* 🗓️ Hijri Month Header Styling */
.month-header {
  text-align: center;
  margin-top: 1.2rem;
  font-family: var(--font-accent);
  color: var(--calligraphy-color);
  font-size: 1.0rem;
  text-shadow: 0 0 4px rgba(255, 215, 0, 0.3);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.month-header .ar {
  display: flex;
  flex-direction: row;
  font-family: var(--font-accent);
  color: var(--calligraphy-color);
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  font-size: 1.2rem;
}

.hijri-year {
  font-weight: bold;
  font-size: 1.8rem;
  margin-right: 6px
  font-family: var(--font-accent);
  color: maroon;
}

.hijri-range {
  font-family: var(--font-accent);
  color: maroon;
  font-size: 1.8rem;
}
/* 🧩 Day Cells */
.day-cell {
  aspect-ratio: unset;
  background-color: #00637C;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  font-size: 1.2em;
  height: 120px;
  padding: 6px;
  border: 1px solid #ccc;
  box-sizing: border-box;
  position: relative;
  transition: background 0.3s ease;
  border-radius: 6px;
}
.day-cell.faded {
  opacity: 0.4;
  background-color: #00637C;
  font-style: italic;
  font-size: 1.2em;
}
.day-cell.today {
  background-color: #00637C;
  border: 2px solid Red;
  font-weight: bold;
  color: white;
  font-size: 1.2em;
}

/* 📅 Day Labels */
.gregorian-day {
  font-weight: bold;
  font-size: 0.95rem;
  }

.hijri-day {
  color: var(--calligraphy-color);
  font-family: var(--font-accent);
  font-size: 0.85rem;
  text-shadow: 0 0 2px rgba(255, 215, 0, 0.2);
  text-align: left;
}
.day-cell.significant .hijri-day {
  background-color: rgba(255, 215, 0, 0.1);
  border-radius: 4px;
  padding: 2px 4px;
}
/* 🎨 Revelation-Based Color Overrides */
.day-cell.significance-torah .hijri-day,
.day-cell.significance-torah .significance-label {
font-weight: 700; /* Makes it bold */
  color: #4B0082 !important; /* Royal Indigo */
}

.day-cell.significance-bible .hijri-day,
.day-cell.significance-bible .significance-label {
font-weight: 700; /* Makes it bold */
  color: #4B0082 !important; /* Royal Indigo */
}

.day-cell.significance-zabur .hijri-day,
.day-cell.significance-zabur .significance-label {
font-weight: 700; /* Makes it bold */
  color: #4B0082 !important; /* Royal Indigo */
}

.day-cell.significance-AlQuran .hijri-day,
.day-cell.significance-AlQuran .significance-label {
font-weight: 700; /* Makes it bold */
  color: #FFD700 !important; /* Gold for overlays */
}
.day-cell.significance-alGhadir .hijri-day,
.day-cell.significance-alGhadir .significance-label {
font-weight: 700; /* Makes it bold */
  color: #660099 !important; /* Imperial Purple */
}

/* ✨ Hover Effects */
.day-cell:hover {
  background-color: #1f2a2e;
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.1);
  transform: scale(1.02);
  transition: all 0.2s ease-in-out;
  cursor: pointer;
}
/* 🌙  Wiladats */
.significance-mawlid,
.significance-wiladatimamAli,
.significance-wiladatbibiZahra,
.significance-wiladatImamHasan,
.significance-wiladatImamHussain,
.significance-wiladatImamAbid,
.significance-wiladatImamBaqir,
.significance-imamKazim,
.significance-wiladatimamAliNaqi,
.significance-wiladatimamMohammadTaqi,
.significance-wiladatimamHasanAskari,
.significance-imamMahdi,
.significance-HAliAkbar,
.significance-HQasim,
.significance-bibiFizza,
.significance-wiladatMaulaAbbas,
.significance-wiladatbibiZainab,
.significance-syedaKulsum,
.significance-wiladatHazrateAliAsghar,
.significance-wiladatImamReza,
.significance-wiladatIbrahimIsa,
.significance-aqd,
.significance-wiladateimamAliNaqi  {
 background-color: #006400; /* Revelation Green */
 color: #fff;
}
/* 🔴 Martyrdom */
.significance-ashura,  
.significance-soyem,
.significance-imamAbid,
.significance-bibiSakina,
.significance-imamReza,
.significance-arbaeen,
.significance-bibiZainab,
.significance-wafat,
.significance-wafatMasoomeQum,
.significance-imamHasanAskari,
.significance-bibiZahra,
.significance-imamAliNaqi,
.significance-imamMusaKazim,
.significance-WHAbuTalib,
.significance-HazratKhatija,
.significance-shabeZarbat,
.significance-shahadatImamAli,
.significance-Baqi,
.significance-ImamSadiq,
.significance-imamMohammadTaqi,
.significance-ImamBaqir,
.significance-arafah,
.significance-tiflaan  {
  background-color: #CC0000; /* revelation-red-dark */
  color: #fff;
}
/* 🌟 Islamic Victories */
.significance-naharwan,
.significance-jamal,
.significance-Khaybar,
.significance-badr,
.significance-uhud  {
  background-color: #4682B4; /* Gold */
color: #fff;
}
/* 🌟 Eid and Niaz */
.significance-eideZehra,
.significance-Kunde,
.significance-eid,
.significance-eidAdha,
.significance-mubahalah {
  background-color: #3e8e41; /* Festive green */
  color: #fff;
}
/* Books Revelation */
.significance-torah,
.significance-bible,
.significance-zabur,
.significance-AlQuran {
  background-color:  #87CEFA; /* Light Sky Blue */

  color: #1A1A1A;
}
/* 🌌 Journey */
.significance-isra,
.significance-28Rajab {
  background-color: #6A5ACD; /* Indigo */
  color: #fff;
}
/* 🌙 Shaʿban – Fasting in Ramadan was made obligatory and Shab-e-Baraat */
.significance-fasting ,
.significance-shabeBaraat {
  background-color: #20B2AA; /* Teal */
  color: #fff;
}
/* 🌠 Ramadan – Laylat al-Qadr */
.significance-laylat {
  background-color: #4B0082; /* Midnight purple */
  color: #fff;
}
/* 🌠 Shawwal –  Ghaibat-e-Kubra of Imam-e-Zamana */
.significance-kubra {
background-color: #708090; /* Earthy brown */
  color: #fff;
}
/* 🕋 Dhu al-Ḥijjah – Hajj Days */
.significance-hajj,
.significance-AlQuds {
  background-color: #8B4513; /* Earthy brown */
  color: #fff;
}
/* 🕋 Dhu al-Ḥijjah – Al Ghadir */
.significance-alGhadir {
  background-color: #EAEAEA; /* MoonLight Pearl */
  color: #fff;
}

/* 🌙 Dual-Language Hijri Month Header */
#monthHeader {
  text-align: center;
  margin-top: 10px;
}
/* 🌟 Month Header Container */
.month-header {
  display: flex;
  justify-content: center;
  gap: 1rem;
  font-size: 3.6rem;
  font-weight: 600;
  color: var(--accent-color);
  opacity: 0;
  animation: fadeIn 1.5s ease-in-out forwards;
  transition: opacity 0.6s ease-in-out;
}

/* 🖋️ Arabic Calligraphy Styling */
.month-header .ar {
  font-family: var(--font-accent);
  direction: rtl;
  color: var(--calligraphy-color);
  text-align: center;
  margin-top: 10px;
  text-shadow: 0 0 6px rgba(255, 215, 0, 0.3);
  transition: text-shadow 0.3s ease-in-out;
}

/* ✨ Hover Glow for Arabic Name */
.month-header .ar:hover {
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}
.day-cell:hover .significance-label {
  text-shadow: 0 0 4px rgba(255, 215, 0, 0.6); /* soft glow */
  }

/* 🌠 Fade-In Animation */
@keyframes fadeIn {
  to { opacity: 1; }
}
/* 🆕 Top Header Date Display */
.top-header {
  font-family: var(--font-primary);
  color: var(--accent-color);
  font-size: 0.95rem;
  line-height: 1.4;
  margin-top: 10px;
  text-align: Left;
  padding-left: 10px;
  border-left: 2px solid var(--accent-color);
}

.top-header div {
  margin-bottom: 4px;
  font-weight: 500;
  letter-spacing: 0.4px;
}

@media (max-width: 600px) {
  .top-header {
    font-size: 1rem;
    padding-left: 6px;
  }
}
/* 🌙 Orbital Wrapper */
.moon-orbit {
  position: absolute;
  top: 120px; /* Adjust to clear the header */
  left: 750px;
  width: 150px; /* Increase if needed */
  height: 150px;
  overflow: visible; /* Prevent clipping */
  z-index: 10;
  animation: rotateOrbit 12s linear infinite;
  transform-origin: center center;
}
/* 🌙 Moon Icon Positioning Inside Orbit */
.moon-icon {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  font-size: 3em;
  animation: pulse 3s infinite ease-in-out;
}

/* 🌙 Orbit Rotation */
@keyframes rotateOrbit {
  0%   { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
.top-center-info {
  position: relative;
}
.significance-label {
  font-size: 0.75em;
  font-style: italic;
  margin-top: 4px;
  display: block;
  line-height: 1.2;
  white-space: normal;
  color: var(--calligraphy-color); /* matches .hijri-day */
  font-family: var(--font-accent); /* optional: unify typography */
  text-shadow: 0 0 2px rgba(255, 215, 0, 0.2); /* optional: match glow */
}
.day-cell.significance-torah .significance-label {
font-weight: 700; /* Makes it bold */
  color: #4B0082 !important; /* Royal Indigo */
}

.day-cell.significance-bible .significance-label {
font-weight: 700; /* Makes it bold */
  color: #4B0082 !important; /* Royal Indigo */
}

.day-cell.significance-zabur .significance-label {
font-weight: 700; /* Makes it bold */
  color: #4B0082 !important; /* Royal Indigo */
}

.day-cell.significance-AlQuran .significance-label {
font-weight: 700; /* Makes it bold */
  color: #FFD700 !important; /* Gold for overlays */
}
.day-cell.significance-alGhadir .significance-label {
font-weight: 700; /* Makes it bold */
  color: #660099 !important; /* Imperial Purple */
}
.significance-eclipse-lunar .significance-label {
  color: #FFD700 !important; /* Gold for overlays */
}

.significance-eclipse-solar .significance-label {
  color: #FFD700 !important; /* Gold for overlays */
}
.calendar-header-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1rem;
  background-color: #f5f5f5; /* Optional backdrop */
}

.calendar-header-content {
  max-width: 800px;
  width: 100%;
  margin: 0 auto;
  position: relative;
}
.calendar-nav button {
  font-size: 1.6em;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--accent-color);
  }

.gregorian-month-title {
  flex-grow: 1;
  text-align: center;
  font-weight: bold;
  font-size: 1.2em;
}


#prev-month, #next-month {
  transform: translateY(+1px); /* or +1px */
}
