@import url("https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;700&family=Aref+Ruqaa:wght@400;700&family=Cinzel+Decorative:wght@400;700;900&display=swap");

:root {
  --primary-green: #10b981;
  --primary-green-rgb: 16, 185, 129;
  --primary-gold: #db8d0d;
  --primary-gold-rgb: 219, 141, 13;
  --bg-color: #f0fdf4;
  --card-bg: rgba(var(--primary-green-rgb), 0.12);
  --card-shadow: 0 4px 15px 0 rgba(0, 0, 0, 0.02);
  --glass-border: 1px solid rgba(var(--primary-green-rgb), 0.15);
  --text-primary: #064e3b;
  /* Deep Dark Green */
  --text-secondary: #374151;
  /* Dark Grey-Green */
}

/* Clean layout styling without glassmorphism */
/* Backgrounds handled per column and via media queries */

@keyframes pulseHighlight {
  0% {
    opacity: 0.85;
  }

  50% {
    opacity: 1;
  }

  100% {
    opacity: 0.85;
  }
}

.highlight-row {
  background-color: transparent !important;
  color: #fff !important;
  background-image:
    url("../images/backgrounds/left-edge.svg"),
    url("../images/backgrounds/right-edge.svg");
  background-position:
    left center,
    right center;
  background-repeat: no-repeat, no-repeat;
  background-size:
    50.1% 100%,
    50.1% 100%;
  animation: pulseHighlight 2s infinite ease-in-out;
}

.highlight-row td:first-child {
  padding-left: 6vw !important;
}

.highlight-row td:last-child {
  padding-right: 6vw !important;
}

.highlight-row td {
  font-weight: bold;
}

h1 {
  color: #0056b3;
}

html,
body {
  font-family: "Outfit", sans-serif;
  height: 100dvh;
  margin: 0;
  padding: 0;
  overflow: hidden;
  background-color: var(--bg-color);
  color: var(--text-primary);
  /* prevent small scroll/gap from viewport quirks */
}

#prayers-tables {
  position: fixed;
  top: 0;
  left: 0;
  width: 100dvw;
  height: 100dvh;
  margin: 0;
  padding: 0;
  z-index: 1;
}

#prayers-tables iframe {
  width: 100dvw;
  height: 100dvh;
  border: none;
  display: block;
}

/* Ensure box-sizing includes padding and borders, hide scrollbar */
* {
  box-sizing: border-box;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

*::-webkit-scrollbar {
  display: none;
}

/* Remove all borders from tables and cells */
table,
th,
td {
  border: none !important;
  border-collapse: collapse;
}

/* ============================================================
   PRAYER PAGE — Card-Based Layout
   ============================================================ */

@keyframes glowPulse {

  0%,
  100% {
    box-shadow:
      0 0 8px rgba(var(--primary-gold-rgb), 0.4),
      inset 0 0 0 2px var(--primary-gold);
  }

  50% {
    box-shadow:
      0 0 20px rgba(var(--primary-gold-rgb), 0.7),
      inset 0 0 0 2px var(--primary-gold);
  }
}

/* Full-page prayer container */
.prayer-page {
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 50%, #f0fdf4 100%);
  color: var(--text-primary);
  font-family: "Outfit", sans-serif;
  position: relative;
}

/* Islamic Geometric Decorations */
.corner-decor {
  position: absolute;
  width: clamp(120px, 20vw, 250px);
  height: clamp(120px, 20vw, 250px);
  z-index: 0;
  pointer-events: none;
  opacity: 0.2;
  background-image: url("../images/backgrounds/islamic-pattern.svg");
  background-size: contain;
  background-repeat: no-repeat;
  transition: all 0.5s ease;
}

.corner-decor.top-left {
  top: -40px;
  left: -40px;
  transform: rotate(22.5deg);
}

.corner-decor.top-right {
  top: -40px;
  right: -40px;
  transform: rotate(-22.5deg);
}

.sidebar .corner-decor.top-right {
  top: -100px;
  right: -100px;
  opacity: 0;
  transition: all 0.7s cubic-bezier(0.165, 0.84, 0.44, 1) 0.2s;
}

.sidebar.open .corner-decor.top-right {
  top: -40px;
  right: -40px;
  opacity: 0.2;
}

.corner-decor.bottom-left {
  bottom: -40px;
  left: -40px;
  transform: rotate(-22.5deg);
}

.corner-decor.bottom-right {
  bottom: -40px;
  right: -40px;
  transform: rotate(22.5deg);
}

.geometric-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  padding: 1.5vh 10vw;
  opacity: 0.9;
  z-index: 1;
}

.geometric-divider .line {
  flex: 1;
  height: 2px;
  background: linear-gradient(to right,
      transparent,
      var(--primary-gold),
      transparent);
  border-radius: 2px;
}

.geometric-divider .center-icon {
  width: 28px;
  height: 28px;
  background-image: url("../images/backgrounds/islamic-pattern.svg");
  background-size: contain;
  /* change color by treating it as a mask optionally, or just leave it green */
}

/* ---------- HEADER ---------- */
.prayer-header {
  padding: 1vh 3vw 0;
  position: relative;
  z-index: 1;
}

.sky-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -3;
  transition:
    background 2s ease,
    opacity 2s ease;
  overflow: hidden;
  border-radius: inherit;
  -webkit-mask-image: linear-gradient(to bottom,
      black 0%,
      black 85%,
      transparent 95%,
      transparent 100%);
  mask-image: linear-gradient(to bottom,
      black 0%,
      black 85%,
      transparent 95%,
      transparent 100%);
}

.celestial-arc {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
  -webkit-mask-image: linear-gradient(to right,
      transparent 5%,
      black 30%,
      black 70%,
      transparent 95%);
  mask-image: linear-gradient(to right,
      transparent 5%,
      black 30%,
      black 70%,
      transparent 95%);
}

.celestial-bodies {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom,
      black 0%,
      black 93%,
      transparent 95%,
      transparent 100%);
  mask-image: linear-gradient(to bottom,
      black 0%,
      black 93%,
      transparent 95%,
      transparent 100%);
}

.celestial-sun,
.celestial-moon {
  position: absolute;
  transition:
    top 1s linear,
    left 1s linear,
    opacity 2s ease;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.celestial-moon {
  font-size: clamp(1.4rem, 3.5vh, 2.8rem);
  /* Core is a bit transparent */
  color: rgba(248, 250, 252, 0.75);
}

.celestial-sun {
  width: clamp(1.4rem, 3.5vh, 2.8rem);
  height: clamp(1.4rem, 3.5vh, 2.8rem);
  /* Core is a bit transparent */
  background: radial-gradient(circle,
      rgba(255, 247, 0, 0.7) 20%,
      rgba(255, 207, 0, 0.9) 100%);
  border-radius: 50%;
  /* More visible glow ~20% of sun size spread */
  box-shadow:
    0 0 12px rgba(255, 207, 0, 0.95),
    0 0 25px rgba(255, 207, 0, 0.7),
    0 0 40px rgba(255, 207, 0, 0.4);
}

.celestial-moon {
  /* Visible glow ~20% of icon size spread */
  filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.8)) drop-shadow(0 0 15px rgba(255, 255, 255, 0.5)) drop-shadow(0 0 25px rgba(255, 255, 255, 0.3));
}

.building-layer {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  height: 80%;
  background-image: url("../images/backgrounds/hicc-building-optimized.svg");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: bottom center;
  opacity: 0.15;
  filter: contrast(1.2);
  z-index: -1;
  pointer-events: none;
}

body.night-mode .header-clock {
  color: #fef08a;
  text-shadow: 0 2px 12px rgba(254, 240, 138, 0.3);
}

body.night-mode .next-label strong,
body.night-mode .next-countdown {
  color: #fef08a;
}

body.night-mode .next-label,
body.night-mode .header-date-row {
  color: #cbd5e1;
}

.header-main {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 2vw;
  padding-left: 60px;
  /* clear the fixed menu button */
}

.header-logo {
  display: flex;
  align-items: center;
}

.header-logo img {
  height: clamp(60px, 14vh, 120px);
  width: auto;
  display: block;
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.15));
}

.header-clock {
  font-family: "Outfit", sans-serif;
  font-size: clamp(2rem, 9vh, 5.5rem);
  font-weight: 700;
  color: var(--primary-gold);
  letter-spacing: 1px;
  font-variant-numeric: tabular-nums;
  -webkit-font-feature-settings: "tnum";
  font-feature-settings: "tnum";
  text-shadow: 0 2px 12px rgba(219, 141, 13, 0.35);
  line-height: 1;
  text-align: center;
}

.header-next-info {
  text-align: right;
}

.next-label {
  font-size: clamp(0.9rem, 2.5vh, 1.5rem);
  color: var(--text-secondary);
  font-weight: 500;
}

.next-label strong {
  color: var(--text-primary);
  font-weight: 700;
}

.next-countdown {
  font-size: clamp(1.2rem, 4vh, 2.5rem);
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.1;
}

.header-date-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2vh;
  font-size: clamp(1.1rem, 3.2vh, 2.3rem);
  color: var(--text-secondary);
  margin-top: 0.5vh;
  margin-bottom: 1vh;
  font-weight: 500;
}

.hijri-date {
  color: var(--primary-gold);
  font-size: 0.9em;
  font-weight: 600;
}

/* ---------- PRAYER CARDS CONTAINER ---------- */
.prayer-cards {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.8vh;
  padding: 0 3vw;
  overflow: hidden;
  justify-content: flex-start;
}

/* ---------- SINGLE PRAYER CARD ---------- */
.p-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--card-bg);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border: var(--glass-border);
  border-radius: 14px;
  padding: 1.2vh 4vw;
  min-height: 9vh;
  transition: all 0.3s ease;
  box-shadow: var(--card-shadow);
  position: relative;
  overflow: hidden;
}

.p-card::before {
  content: "";
  position: absolute;
  right: -20px;
  top: 50%;
  transform: translateY(-50%) rotate(15deg);
  width: 120px;
  height: 120px;
  background-image: url("../images/backgrounds/islamic-pattern.svg");
  background-size: contain;
  background-repeat: no-repeat;
  opacity: 0.08;
  z-index: 0;
  pointer-events: none;
}

.p-card>div {
  z-index: 1;
  position: relative;
}

/* Active / Next prayer card */
.p-card-active {
  background: rgba(var(--primary-gold-rgb), 0.18);
  border-color: var(--primary-gold);
  animation: glowPulse 2.5s ease-in-out infinite;
}

/* Left side: icon + name */
.p-card-left {
  display: flex;
  align-items: center;
  gap: 2vw;
}

.p-card-icon {
  font-size: clamp(1.2rem, 3vh, 2rem);
  color: var(--primary-green);
  width: 2em;
  text-align: center;
}

.p-card-active .p-card-icon {
  color: var(--primary-gold);
}

.p-card-name {
  font-size: clamp(1.2rem, 3.2vh, 2.2rem);
  font-weight: 600;
  color: var(--text-primary);
  min-width: 6em;
}

/* Right side: iqamah + sub-text */
.p-card-right {
  text-align: right;
}

.p-card-iqamah {
  font-family: "Share Tech Mono", monospace;
  font-size: clamp(1.8rem, 5.5vh, 3.8rem);
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -1px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.p-card-active .p-card-iqamah {
  font-size: clamp(1.6rem, 5vh, 3.5rem);
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
  text-shadow: 0 0 12px rgba(var(--primary-gold-rgb), 0.2);
}

.p-card-sub {
  font-size: clamp(0.9rem, 2.4vh, 1.4rem);
  color: var(--text-secondary);
  font-weight: 500;
  margin-top: 2px;
}

/* Sunrise card variant */
.p-card-sunrise {
  background: rgba(var(--primary-gold-rgb), 0.08);
  border-color: rgba(var(--primary-gold-rgb), 0.2);
}

.p-sunrise-icon {
  color: var(--primary-gold) !important;
}

.p-sunrise-time {
  color: var(--primary-gold) !important;
}

/* ---------- JUMUAH ROW (inside cards) ---------- */
.jumuah-row {
  display: flex;
  gap: 0.8vh;
  width: 100%;
}

.jumuah-card {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(var(--primary-gold-rgb), 0.08);
  border: 1px solid rgba(var(--primary-gold-rgb), 0.2);
  border-radius: 14px;
  padding: 1.2vh 4vw;
  min-height: 9vh;
  box-shadow: var(--card-shadow);
}

.jumuah-card-left {
  display: flex;
  align-items: center;
  gap: 1.5vw;
}

.jumuah-icon {
  font-size: clamp(1rem, 2.5vh, 1.8rem);
  color: var(--primary-gold);
}

.jumuah-label {
  font-size: clamp(1rem, 2.6vh, 1.6rem);
  color: var(--text-secondary);
  font-weight: 600;
}

.jumuah-time {
  font-family: "Share Tech Mono", monospace;
  font-size: clamp(1.5rem, 4.2vh, 3rem);
  color: var(--primary-gold);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* ---------- LANDSCAPE / DESKTOP: Two-Panel Side-by-Side ---------- */
@media (orientation: landscape) {

  /* Switch prayer-page to horizontal layout */
  .prayer-page {
    flex-direction: row;
  }

  /* Left panel: info (clock, logo, dates, next prayer) */
  .prayer-header {
    width: 38%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
    align-items: center;
    padding: 8vh 2vw;
    box-sizing: border-box;
  }

  .sky-layer {
    -webkit-mask-image: linear-gradient(to right,
        black 0%,
        black 80%,
        transparent 100%);
    mask-image: linear-gradient(to right,
        black 0%,
        black 80%,
        transparent 100%);
  }

  .celestial-bodies {
    -webkit-mask-image: linear-gradient(to right,
        black 0%,
        black 85%,
        transparent 100%);
    mask-image: linear-gradient(to right,
        black 0%,
        black 85%,
        transparent 100%);
  }

  /* Vertical divider for landscape */
  .geometric-divider {
    flex-direction: column;
    width: 4%;
    height: 80vh;
    padding: 0;
    margin: auto 0;
  }

  .geometric-divider .line {
    width: 2px;
    height: auto;
    background: linear-gradient(to bottom,
        transparent,
        var(--primary-gold),
        transparent);
  }

  .header-main {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4vh;
    padding-left: 0;
    margin-top: 0;
  }

  .header-logo img {
    height: clamp(60px, 14vh, 120px);
    filter: drop-shadow(0 4px 20px rgba(0, 0, 0, 0.6));
  }

  /* Subtle highlight behind logo area for contrast */
  .header-logo {
    padding: 1vh;
    border-radius: 50%;
  }

  .header-clock {
    font-size: clamp(3rem, 12vh, 7rem);
    text-align: center;
  }

  .header-next-info {
    text-align: center;
  }

  .next-label {
    font-size: clamp(1rem, 3vh, 1.8rem);
  }

  .next-countdown {
    font-size: clamp(1.5rem, 5vh, 3rem);
  }

  .header-date-row {
    font-size: clamp(1.1rem, 3.5vh, 2.2rem);
    margin-top: 0;
    margin-bottom: 0;
    gap: 1vh;
  }

  /* Right panel: prayer cards */
  .prayer-cards {
    width: 58%;
    height: 100vh;
    gap: 0.8vh;
    padding: 8vh 2vw;
    justify-content: space-between;
    box-sizing: border-box;
  }

  .p-card {
    padding: 1vh 2.5vw;
    border-radius: 12px;
    min-height: 8vh;
  }

  .p-card-iqamah {
    font-size: clamp(1.8rem, 6vh, 3.8rem);
  }

  .p-card-name {
    font-size: clamp(1.2rem, 3.5vh, 2.2rem);
  }

  .p-card-icon {
    font-size: clamp(1.1rem, 3vh, 2rem);
  }

  .p-card-sub {
    font-size: clamp(0.65rem, 1.6vh, 0.95rem);
  }

  .jumuah-row {
    gap: 0.8vh;
  }

  .jumuah-card {
    min-height: 8vh;
  }
}

/* ---------- EVENT ANIMATIONS ---------- */
@keyframes eventCardPulse {
  0% {
    box-shadow: 0 0 10px rgba(var(--primary-gold-rgb), 0.3), inset 0 0 0 1px var(--primary-gold);
    transform: scale(1);
  }

  50% {
    box-shadow: 0 0 25px rgba(var(--primary-gold-rgb), 0.8), inset 0 0 0 2px var(--primary-gold);
    transform: scale(1.02);
  }

  100% {
    box-shadow: 0 0 10px rgba(var(--primary-gold-rgb), 0.3), inset 0 0 0 1px var(--primary-gold);
    transform: scale(1);
  }
}

.anim-event-card {
  animation: eventCardPulse 2s ease-in-out infinite !important;
  background: rgba(var(--primary-gold-rgb), 0.15) !important;
  border-color: var(--primary-gold) !important;
  z-index: 10;
}

@keyframes iqamahTextPulse {
  0% {
    color: var(--text-primary);
    text-shadow: 0 0 5px rgba(var(--primary-gold-rgb), 0.2);
    transform: scale(1);
  }

  50% {
    color: var(--primary-gold);
    text-shadow: 0 0 15px rgba(var(--primary-gold-rgb), 0.8);
    transform: scale(1.1);
  }

  100% {
    color: var(--text-primary);
    text-shadow: 0 0 5px rgba(var(--primary-gold-rgb), 0.2);
    transform: scale(1);
  }
}

.anim-iqamah-text {
  display: inline-block;
  animation: iqamahTextPulse 1.5s ease-in-out infinite;
  font-weight: 900 !important;
}

/* ---------- FULL SCREEN IQAMAH OVERLAY ---------- */
.iqamah-fullscreen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: #022c1b;
  /* Dark theme to not distract */
  z-index: 3000;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: #f0fdf4;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s ease, visibility 0.5s ease;
  cursor: pointer; /* Click anywhere to dismiss */
}

.iqamah-fullscreen.active {
  display: flex;
  opacity: 1;
  visibility: visible;
}

.iqamah-fs-header {
  position: absolute;
  top: 4vh;
  left: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5vh;
  z-index: 100;
}

.iqamah-fs-main-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 4vw;
}

.iqamah-fs-logo img {
  height: clamp(50px, 12vh, 120px);
  width: auto;
  filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.35));
}

.iqamah-fs-clock {
  font-family: "Outfit", sans-serif;
  font-size: clamp(2rem, 8vh, 6rem);
  font-weight: 700;
  color: var(--primary-gold);
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  line-height: 1;
  font-variant-numeric: tabular-nums;
  -webkit-font-feature-settings: "tnum";
  font-feature-settings: "tnum";
}

.iqamah-fs-dates {
  display: flex;
  gap: 2vw;
  font-size: clamp(1rem, 3vh, 2rem);
  font-weight: 500;
  color: #f0fdf4;
  opacity: 0.8;
}

.iqamah-fs-date-hijri {
  color: var(--primary-gold);
}

.fs-corner-decor {
  position: absolute;
  width: clamp(100px, 15vw, 200px);
  height: clamp(100px, 15vw, 200px);
  z-index: 5;
  pointer-events: none;
  opacity: 0.15;
  background-image: url("../images/backgrounds/islamic-pattern.svg");
  background-size: contain;
  background-repeat: no-repeat;
  filter: sepia(100%) saturate(1000%) hue-rotate(5deg);
  /* Golden tint */
}

.fs-corner-decor.top-left {
  top: 20px;
  left: 20px;
  transform: rotate(22.5deg);
}

.fs-corner-decor.top-right {
  top: 20px;
  right: 20px;
  transform: rotate(-22.5deg);
}

.fs-corner-decor.bottom-left {
  bottom: 20px;
  left: 20px;
  transform: rotate(-22.5deg);
}

.fs-corner-decor.bottom-right {
  bottom: 20px;
  right: 20px;
  transform: rotate(22.5deg);
}

.iqamah-fs-bg {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  height: 80%;
  background-image: url("../images/backgrounds/hicc-building-optimized.svg");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: bottom center;
  opacity: 0.15;
  /* Transparent, non-distracting */
  pointer-events: none;
  z-index: -1;
}

@keyframes titleSlideIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes arabicSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.iqamah-fs-content {
  text-align: center;
  z-index: 10;
  padding: 0 4vw;
}

.iqamah-fs-title {
  display: flex;
  flex-direction: column;
  gap: 1vh;
  margin-bottom: 2vh;
}

.iqamah-fs-english {
  font-family: 'Cinzel Decorative', serif;
  font-size: clamp(2.2rem, 5.5vh, 4rem);
  font-weight: 700;
  color: var(--primary-gold);
  text-shadow: 0 0 30px rgba(var(--primary-gold-rgb), 0.5), 0 0 60px rgba(var(--primary-gold-rgb), 0.2);
  letter-spacing: 2px;
  opacity: 0;
}

.iqamah-fullscreen.active .iqamah-fs-english {
  animation: titleSlideIn 0.8s ease forwards 0.3s;
}

.iqamah-fs-arabic {
  font-family: 'Aref Ruqaa', serif;
  font-size: clamp(3.5rem, 10vh, 7.5rem);
  font-weight: 700;
  color: var(--primary-gold);
  text-shadow: 0 0 30px rgba(var(--primary-gold-rgb), 0.5), 0 0 60px rgba(var(--primary-gold-rgb), 0.2);
  margin-top: 0.5vh;
  direction: rtl;
  opacity: 0;
}

.iqamah-fullscreen.active .iqamah-fs-arabic {
  animation: arabicSlideIn 0.8s ease forwards 0.2s;
}

.iqamah-fs-icon {
  font-size: clamp(4rem, 12vh, 8rem);
  color: var(--primary-green);
  margin: 3vh 0;
  animation: pulseHighlight 2s infinite ease-in-out;
}

.iqamah-fs-note {
  font-size: clamp(1.2rem, 3.5vh, 2rem);
  color: #cbd5e1;
  font-weight: 400;
  letter-spacing: 1px;
}

/* ---------- PORTRAIT TWEAKS ---------- */
@media (orientation: portrait) {
  .prayer-header {
    padding: 3vh 4vw 0.5vh;
  }

  .header-main {
    padding-left: 50px;
    gap: 3vw;
  }

  .header-clock {
    font-size: clamp(1.8rem, 8vw, 3.2rem);
    text-align: center;
  }

  .header-logo img {
    height: clamp(30px, 6vh, 50px);
  }

  .next-countdown {
    font-size: clamp(1rem, 5vw, 2rem);
  }

  .prayer-cards {
    gap: 0.4vh;
    padding: 0 4vw 8vh;
    justify-content: space-between;
  }

  .p-card {
    padding: 0.8vh 5vw;
    border-radius: 16px;
    min-height: 7.5vh;
  }

  .p-card-iqamah {
    font-size: clamp(1.6rem, 6.5vw, 3.2rem);
  }

  .p-card-name {
    font-size: clamp(1.1rem, 4.2vw, 1.8rem);
    min-width: 5em;
  }

  .p-card-icon {
    font-size: clamp(1.1rem, 3.5vw, 1.8rem);
  }

  .jumuah-row {
    gap: 0.6vh;
  }

  .jumuah-card {
    padding: 0.8vh 3vw;
    border-radius: 12px;
    min-height: 7.5vh;
  }

  .jumuah-time {
    font-size: clamp(1.2rem, 5.5vw, 2.5rem);
  }

  .jumuah-label {
    font-size: clamp(0.85rem, 3.5vw, 1.3rem);
  }
}

/* --- Side Menu Styling --- */

.menu-btn {
  position: fixed;
  top: 15px;
  left: 15px;
  z-index: 2000;
  background: rgba(var(--primary-gold-rgb), 0.15);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(var(--primary-gold-rgb), 0.25);
  color: #036335;
  border-radius: 8px;
  width: 45px;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  transition:
    transform 0.2s ease,
    background-color 0.2s ease,
    box-shadow 0.2s ease;
}

.menu-btn:hover {
  background-color: rgba(var(--primary-gold-rgb), 0.25);
  transform: scale(1.05);
  box-shadow: 0 6px 18px rgba(var(--primary-gold-rgb), 0.15);
}

.menu-btn:active {
  transform: scale(0.95);
}

.menu-btn svg,
.menu-btn .mdi {
  width: 24px;
  height: 24px;
  font-size: 24px;
  color: #036335;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 1500;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.3s ease,
    visibility 0.3s ease;
}

.sidebar-overlay.active {
  opacity: 1;
  visibility: visible;
}

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 280px;
  height: 100%;
  background: white;
  z-index: 1600;
  transform: translateX(-100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  box-shadow: 4px 0 25px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.sidebar.open {
  transform: translateX(0);
}

.sidebar-header {
  padding: 75px 20px 20px 20px;
  background: #f7deb6;
  /* Light orange from .column-left */
  color: var(--primary-green);
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: flex-end;
  /* Align title and logo to bottom */
  gap: 15px;
}

.sidebar-header img {
  width: 50px;
  height: auto;
  order: 2;
  /* Put logo on the right */
}

.sidebar-header h2 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 600;
  order: 1;
  /* Put title on the left */
}

.sidebar-nav {
  padding: 20px 0;
  flex: 1;
  overflow-y: auto;
}

.sidebar-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-nav li {
  margin-bottom: 5px;
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 12px 25px;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 500;
  transition:
    background-color 0.2s ease,
    color 0.2s ease;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
  background-color: var(--bg-color);
  color: var(--primary-green);
}

.sidebar-nav a svg,
.sidebar-nav a .mdi {
  width: 20px;
  height: 20px;
  font-size: 20px;
  line-height: 1;
  opacity: 0.7;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sidebar-nav a.active svg,
.sidebar-nav a.active .mdi {
  opacity: 1;
  color: var(--primary-green);
}

.sidebar-footer {
  padding: 20px;
  border-top: 1px solid #eee;
  font-size: 0.8rem;
  color: var(--text-secondary);
  text-align: center;
  z-index: 1;
  background: rgba(255, 255, 255, 0.85);
  /* Semi-transparent background for readability */
}

.sidebar-building {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: auto;
  opacity: 0;
  transform: translateY(300px);
  pointer-events: none;
  z-index: 0;
  transition: transform 0.8s cubic-bezier(0.165, 0.84, 0.44, 1) 0.1s, opacity 0.8s ease 0.1s;
}

.sidebar.open .sidebar-building {
  opacity: 0.25;
  transform: translateY(0);
}