/* ══════════════════════════════════════════════════════════
   MASJID ALRAHMA — style.css
   ══════════════════════════════════════════════════════════ */

:root {
  --burgundy: #7b0d1e;
  --burgundy-deep: #560a15;
  --burgundy-mid: #9b1a2f;
  --ivory: #fefaf0;
  --ivory-warm: #f5edd8;
  --ivory-dark: #ede2c8;
  --gold: #c9a84c;
  --gold-lite: #e8c97a;
  --text-dark: #2a1a1a;
  --text-mid: #5a3a3a;
  --text-light: #8a6a6a;
  --white: #ffffff;
  --shadow: 0 4px 32px rgba(123, 13, 30, 0.1);
  --shadow-deep: 0 8px 48px rgba(123, 13, 30, 0.18);
  --radius: 14px;
  --radius-lg: 22px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  scroll-behavior: smooth;
}
body {
  background: var(--ivory);
  color: var(--text-dark);
  font-family: "Lato", sans-serif;
  font-weight: 300;
  line-height: 1.65;
  overflow-x: hidden;
}
img {
  max-width: 100%;
  display: block;
}

/* ══════════════════════════════════════════════════════════
     HEADER
     ══════════════════════════════════════════════════════════ */
.site-header {
  background: linear-gradient(
    160deg,
    var(--burgundy-deep) 0%,
    var(--burgundy) 55%,
    var(--burgundy-mid) 100%
  );
  position: relative;
  overflow: hidden;
}

.header-bg-pattern {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(
      circle at 15% 50%,
      rgba(201, 168, 76, 0.08) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 85% 20%,
      rgba(201, 168, 76, 0.06) 0%,
      transparent 40%
    ),
    repeating-linear-gradient(
      45deg,
      transparent,
      transparent 30px,
      rgba(255, 255, 255, 0.015) 30px,
      rgba(255, 255, 255, 0.015) 31px
    );
  pointer-events: none;
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 2rem;
  max-width: 960px;
  margin: 0 auto;
  padding: 2.5rem 2rem 2rem;
}

.logo-img {
  width: 160px;
  height: 160px;
  object-fit: contain;
  border-radius: 50%;
  border: 2px solid rgba(201, 168, 76, 0.35);
  background: rgba(255, 255, 255, 0.06);
  padding: 8px;
  box-shadow: 0 0 40px rgba(201, 168, 76, 0.15), 0 4px 24px rgba(0, 0, 0, 0.3);
  flex-shrink: 0;
}

.header-sub {
  font-family: "Amiri", serif;
  font-size: 1.3rem;
  color: var(--gold-lite);
  letter-spacing: 0.04em;
  margin-bottom: 0.4rem;
}

.mosque-name {
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 600;
  color: var(--white);
  letter-spacing: 0.04em;
  line-height: 1.1;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.3);
}

.mosque-tagline {
  font-size: 0.88rem;
  font-weight: 400;
  color: var(--ivory-dark);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-top: 0.5rem;
  opacity: 0.75;
}

.date-bar {
  background: rgba(0, 0, 0, 0.25);
  border-top: 1px solid rgba(201, 168, 76, 0.2);
  text-align: center;
  padding: 0.65rem 1rem;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.75rem;
}

.date-hijri {
  font-family: "Amiri", serif;
  font-size: 1.05rem;
  color: var(--gold-lite);
}

.date-gregorian {
  font-size: 0.9rem;
  color: rgba(254, 250, 240, 0.7);
  letter-spacing: 0.06em;
}

.date-sep {
  color: rgba(201, 168, 76, 0.4);
}

/* ══════════════════════════════════════════════════════════
     LIVE CLOCK + COUNTDOWN BAR
     ══════════════════════════════════════════════════════════ */
.clock-bar {
  background: var(--white);
  border-bottom: 3px solid var(--gold);
  box-shadow: 0 4px 20px rgba(123, 13, 30, 0.08);
  position: sticky;
  top: 0;
  z-index: 100;
}

.clock-bar-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 1.1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3rem;
}

.clock-divider {
  width: 1px;
  height: 60px;
  background: linear-gradient(
    to bottom,
    transparent,
    var(--ivory-dark),
    transparent
  );
  flex-shrink: 0;
}

/* Live clock */
.live-clock-wrap {
  text-align: center;
}

.live-clock {
  font-family: "Lato", sans-serif;
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--burgundy);
  letter-spacing: 0.06em;
  line-height: 1;
}

.live-clock-label {
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-light);
  margin-top: 0.35rem;
}

/* Countdown */
.countdown-wrap {
  text-align: center;
}

.countdown-label {
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-light);
  margin-bottom: 0.15rem;
}

.countdown-prayer {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--burgundy);
  letter-spacing: 0.04em;
  line-height: 1.2;
}

.countdown-timer {
  font-family: "Lato", sans-serif;
  font-size: 1.9rem;
  font-weight: 700;
  color: var(--text-dark);
  letter-spacing: 0.08em;
  line-height: 1.1;
}

.countdown-timer.urgent {
  color: var(--burgundy);
  animation: pulse 1s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.6;
  }
}

.countdown-sub {
  font-size: 0.8rem;
  color: var(--text-light);
  letter-spacing: 0.04em;
}

/* ══════════════════════════════════════════════════════════
     PRAYER TIMES SECTION
     ══════════════════════════════════════════════════════════ */
.prayer-section {
  max-width: 780px;
  margin: 0 auto;
  padding: 3rem 1.5rem 2rem;
}

.section-label {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.9rem;
  font-weight: 500;
  color: var(--burgundy);
  text-align: center;
  letter-spacing: 0.05em;
  margin-bottom: 1.75rem;
}

.section-label::after {
  content: "";
  display: block;
  width: 70px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  margin: 0.65rem auto 0;
}

.prayer-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-deep);
  overflow: hidden;
  border: 1px solid rgba(123, 13, 30, 0.07);
}

.prayer-header-row {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  background: linear-gradient(
    135deg,
    var(--burgundy) 0%,
    var(--burgundy-mid) 100%
  );
  padding: 1rem 1.75rem;
  color: var(--ivory);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.col-adhan,
.col-iqama {
  text-align: center;
}

.prayer-row {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  align-items: center;
  padding: 1.15rem 1.75rem;
  border-bottom: 1px solid rgba(123, 13, 30, 0.06);
  transition: background 0.2s ease;
  animation: fadeSlideIn 0.5s ease both;
}

.prayer-row:last-child {
  border-bottom: none;
}
.prayer-row:nth-child(odd) {
  background: rgba(254, 250, 240, 0.5);
}
.prayer-row:hover {
  background: rgba(123, 13, 30, 0.04);
}

.prayer-row:nth-child(2) {
  animation-delay: 0.05s;
}
.prayer-row:nth-child(3) {
  animation-delay: 0.1s;
}
.prayer-row:nth-child(4) {
  animation-delay: 0.15s;
}
.prayer-row:nth-child(5) {
  animation-delay: 0.2s;
}
.prayer-row:nth-child(6) {
  animation-delay: 0.25s;
}
.prayer-row:nth-child(7) {
  animation-delay: 0.3s;
}

@keyframes fadeSlideIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.sunrise-row {
  opacity: 0.65;
}

.prayer-name {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: "Cormorant Garamond", serif;
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--text-dark);
}

.prayer-icon {
  font-size: 1.2rem;
  width: 1.6rem;
  text-align: center;
}

.prayer-adhan {
  text-align: center;
  font-size: 1.05rem;
  font-weight: 300;
  color: var(--text-mid);
  letter-spacing: 0.02em;
}

.prayer-iqama {
  text-align: center;
  font-family: "Cormorant Garamond", serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--burgundy);
}

.prayer-adhan.loading {
  color: var(--text-light);
  font-style: italic;
  font-size: 0.85rem;
}

/* Next prayer highlight */
.prayer-row.next-prayer {
  background: rgba(123, 13, 30, 0.05) !important;
  border-left: 4px solid var(--burgundy);
}

.prayer-row.next-prayer .prayer-name {
  color: var(--burgundy);
}
.prayer-row.next-prayer .prayer-adhan {
  color: var(--burgundy-mid);
  font-weight: 400;
}

/* ══════════════════════════════════════════════════════════
     JUMU'AH CARD
     ══════════════════════════════════════════════════════════ */
.jumuah-card {
  margin-top: 1.1rem;
  background: linear-gradient(
    135deg,
    var(--burgundy-deep) 0%,
    var(--burgundy) 100%
  );
  border-radius: var(--radius-lg);
  padding: 1.6rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 6px 28px rgba(123, 13, 30, 0.22);
  position: relative;
  overflow: hidden;
  animation: fadeSlideIn 0.5s ease 0.4s both;
}

.jumuah-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 18px,
    rgba(255, 255, 255, 0.025) 18px,
    rgba(255, 255, 255, 0.025) 19px
  );
  pointer-events: none;
}

.jumuah-card-left {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  position: relative;
}

.jumuah-mosque-icon {
  font-size: 2.4rem;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.3));
}

.jumuah-title {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.45rem;
  font-weight: 600;
  color: var(--white);
  letter-spacing: 0.03em;
  line-height: 1.2;
}

.jumuah-day {
  font-size: 0.78rem;
  color: var(--gold-lite);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-top: 0.25rem;
  opacity: 0.85;
}

.jumuah-divider {
  width: 1px;
  height: 52px;
  background: linear-gradient(
    to bottom,
    transparent,
    rgba(201, 168, 76, 0.45),
    transparent
  );
  flex-shrink: 0;
  position: relative;
}

.jumuah-card-right {
  text-align: center;
  position: relative;
}

.jumuah-time-label {
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-lite);
  opacity: 0.75;
  margin-bottom: 0.25rem;
}

.jumuah-time {
  font-family: "Cormorant Garamond", serif;
  font-size: 2.1rem;
  font-weight: 700;
  color: var(--gold-lite);
  letter-spacing: 0.04em;
  line-height: 1;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.times-note {
  text-align: center;
  font-size: 0.78rem;
  color: var(--text-light);
  margin-top: 1.1rem;
  line-height: 1.7;
}

/* ══════════════════════════════════════════════════════════
     VERSE
     ══════════════════════════════════════════════════════════ */
.verse-section {
  background: linear-gradient(
    135deg,
    var(--burgundy-deep) 0%,
    var(--burgundy) 100%
  );
  padding: 4rem 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.verse-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    -45deg,
    transparent,
    transparent 20px,
    rgba(255, 255, 255, 0.018) 20px,
    rgba(255, 255, 255, 0.018) 21px
  );
}

.verse-ornament {
  font-size: 2.2rem;
  color: var(--gold);
  opacity: 0.6;
  margin-bottom: 1.3rem;
  display: block;
  position: relative;
}

.verse-text {
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(1.15rem, 2.5vw, 1.55rem);
  font-style: italic;
  color: var(--ivory);
  max-width: 720px;
  margin: 0 auto 1.35rem;
  line-height: 1.8;
  position: relative;
}

.verse-cite {
  display: block;
  font-size: 0.85rem;
  font-style: normal;
  color: var(--gold-lite);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.85;
  position: relative;
}

/* ══════════════════════════════════════════════════════════
     RAMADAN BANNER
     ══════════════════════════════════════════════════════════ */
.ramadan-banner {
  background: linear-gradient(135deg, var(--ivory-warm), var(--ivory-dark));
  border-top: 3px solid var(--gold);
  border-bottom: 3px solid var(--gold);
  padding: 1.75rem 2rem;
}

.ramadan-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
}

.ramadan-icon {
  font-size: 1.6rem;
  color: var(--burgundy);
  opacity: 0.5;
  flex-shrink: 0;
}
.ramadan-title {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.65rem;
  font-weight: 600;
  color: var(--burgundy);
  letter-spacing: 0.05em;
}
.ramadan-sub {
  font-size: 0.9rem;
  color: var(--text-mid);
  font-style: italic;
  margin-top: 0.25rem;
}

/* ══════════════════════════════════════════════════════════
     FOOTER
     ══════════════════════════════════════════════════════════ */
.site-footer {
  background: var(--burgundy-deep);
  color: var(--ivory);
  padding: 3rem 2rem 1.5rem;
}

.footer-logo-wrap {
  text-align: center;
  margin-bottom: 2rem;
}
.footer-logo {
  width: 80px;
  height: 80px;
  object-fit: contain;
  border-radius: 50%;
  margin: 0 auto;
  opacity: 0.7;
}

.footer-cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  max-width: 780px;
  margin: 0 auto 2.5rem;
  text-align: center;
}

.footer-col h4 {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--gold-lite);
  letter-spacing: 0.05em;
  margin-bottom: 0.65rem;
}

.footer-col p {
  font-size: 0.86rem;
  color: rgba(254, 250, 240, 0.6);
  line-height: 1.9;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 1.25rem;
  text-align: center;
  font-size: 0.78rem;
  color: rgba(254, 250, 240, 0.35);
  letter-spacing: 0.05em;
  position: relative;
}

.admin-link {
  position: absolute;
  right: 0;
  top: 1.25rem;
  font-size: 0.9rem;
  color: rgba(254, 250, 240, 0.12);
  text-decoration: none;
  transition: color 0.2s;
  line-height: 1;
}

.admin-link:hover {
  color: rgba(201, 168, 76, 0.6);
}

/* ══════════════════════════════════════════════════════════
     RESPONSIVE — TABLET (max 768px)
     ══════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .header-inner {
    gap: 1.5rem;
    padding: 2rem 1.5rem 1.75rem;
  }

  .logo-img {
    width: 130px;
    height: 130px;
  }
  .mosque-name {
    font-size: clamp(1.8rem, 6vw, 2.6rem);
  }

  .prayer-section {
    padding: 2.5rem 1.25rem 2rem;
  }
  .section-label {
    font-size: 1.7rem;
  }

  .prayer-header-row {
    padding: 0.9rem 1.5rem;
    font-size: 0.75rem;
  }
  .prayer-row {
    padding: 1.05rem 1.5rem;
  }
  .prayer-name {
    font-size: 1.2rem;
  }
  .prayer-adhan {
    font-size: 1rem;
  }
  .prayer-iqama {
    font-size: 1.2rem;
  }

  .jumuah-card {
    padding: 1.4rem 1.5rem;
  }
  .jumuah-title {
    font-size: 1.3rem;
  }
  .jumuah-time {
    font-size: 1.9rem;
  }

  .clock-bar-inner {
    gap: 2rem;
  }
  .live-clock {
    font-size: 2.1rem;
  }
  .countdown-timer {
    font-size: 1.7rem;
  }

  .footer-cols {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
  }
}

/* ══════════════════════════════════════════════════════════
     RESPONSIVE — MOBILE (max 480px)
     ══════════════════════════════════════════════════════════ */
@media (max-width: 480px) {
  /* Header stacks vertically on small phones */
  .header-inner {
    flex-direction: column;
    text-align: center;
    padding: 1.75rem 1.25rem 1.5rem;
    gap: 1rem;
  }

  .logo-img {
    width: 110px;
    height: 110px;
  }
  .header-sub {
    font-size: 1.1rem;
  }
  .mosque-name {
    font-size: 2rem;
  }
  .mosque-tagline {
    font-size: 0.78rem;
  }

  /* Date bar wraps on small screens */
  .date-bar {
    flex-wrap: wrap;
    gap: 0.4rem;
    padding: 0.55rem 0.75rem;
  }
  .date-hijri {
    font-size: 0.92rem;
  }
  .date-gregorian {
    font-size: 0.8rem;
  }

  /* Clock bar — stacked on very small phones */
  .clock-bar-inner {
    flex-direction: column;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
  }

  .clock-divider {
    width: 60px;
    height: 1px;
    background: linear-gradient(
      to right,
      transparent,
      var(--ivory-dark),
      transparent
    );
  }

  .live-clock {
    font-size: 2rem;
  }
  .countdown-timer {
    font-size: 1.6rem;
  }
  .countdown-prayer {
    font-size: 1.1rem;
  }

  /* Prayer table */
  .prayer-section {
    padding: 2rem 1rem 1.5rem;
  }
  .section-label {
    font-size: 1.5rem;
  }

  .prayer-header-row {
    grid-template-columns: 1.2fr 1fr 1fr;
    padding: 0.8rem 1rem;
    font-size: 0.68rem;
    letter-spacing: 0.08em;
  }

  .prayer-row {
    grid-template-columns: 1.2fr 1fr 1fr;
    padding: 0.95rem 1rem;
  }

  .prayer-name {
    font-size: 1.1rem;
    gap: 0.5rem;
  }

  .prayer-icon {
    font-size: 1rem;
    width: 1.3rem;
  }
  .prayer-adhan {
    font-size: 0.92rem;
  }
  .prayer-iqama {
    font-size: 1.1rem;
  }

  /* Jumu'ah card */
  .jumuah-card {
    padding: 1.2rem 1.25rem;
    gap: 0.75rem;
  }

  .jumuah-mosque-icon {
    font-size: 1.9rem;
  }
  .jumuah-title {
    font-size: 1.15rem;
  }
  .jumuah-day {
    font-size: 0.7rem;
  }
  .jumuah-time {
    font-size: 1.65rem;
  }

  /* Sections */
  .verse-section {
    padding: 2.75rem 1.25rem;
  }
  .ramadan-inner {
    flex-direction: column;
    gap: 0.5rem;
  }
  .ramadan-icon:last-child {
    display: none;
  }
  .ramadan-title {
    font-size: 1.4rem;
  }

  /* Footer */
  .footer-cols {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}
