/* ═══════════════════════════════════════════════════════════════
   TALEEMAAT-E-ISLAM — SHARED STYLESHEET
   Covers: Design system, base reset, top-bar, navbar, footer,
           common utility classes, animations, and responsive rules.
   Page-specific styles remain in each page's own <style> block.
   ═══════════════════════════════════════════════════════════════ */

/* ═══ DESIGN SYSTEM VARIABLES ═══ */
:root {
  --green-deep:#0d2818; --green-mid:#1a4a2e; --green-rich:#1e5c38; --green-bright:#2d7a50; --green-light:#e8f5ee;
  --gold:#c9963a; --gold-light:#e8b84b; --gold-pale:#f5e6c0; --gold-dim:#7a5a1a;
  --white:#ffffff; --off-white:#faf9f5; --text-dark:#1a2a1e; --text-mid:#3d5a45; --text-muted:#6b8a73;
  --border:rgba(201,150,58,0.25); --shadow-green:rgba(13,40,24,0.18); --nav-h:72px; --radius:4px; --transition:0.3s ease;
}

/* ═══ BASE RESET ═══ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body { font-family: 'Nunito', sans-serif; font-weight: 400; color: var(--text-dark); background: var(--off-white); line-height: 1.7; overflow-x: hidden; display: flex; flex-direction: column; min-height: 100vh; }
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
main { flex: 1; }

/* ═══ LAYOUT UTILITIES ═══ */
.container { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.section-label { display: inline-block; font-size: 0.7rem; font-weight: 600; letter-spacing: 0.28em; text-transform: uppercase; color: var(--gold); margin-bottom: 12px; }
.section-title { font-family: 'Playfair Display', serif; font-size: clamp(1.8rem,3.5vw,2.6rem); font-weight: 700; color: var(--green-deep); line-height: 1.25; }
.section-title span { color: var(--gold); }
.divider-gold { display: flex; align-items: center; gap: 12px; margin: 16px 0 32px; }
.divider-gold .line { height: 1px; background: var(--border); flex: 1; max-width: 60px; }
.divider-gold .diamond { width: 7px; height: 7px; background: var(--gold); transform: rotate(45deg); }

/* ═══ COMPONENT PLACEHOLDERS ═══ */
/* display:contents makes the wrapper div invisible to layout,
   so the injected <nav> and <footer> act as direct body children —
   required for position:sticky on the navbar to work correctly. */
#site-header { display: contents; }
#site-footer { display: contents; }

/* ═══ TOP UTILITY BAR ═══ */
.top-bar {
  background: #060f0a;
  color: rgba(255,255,255,0.75);
  font-size: 0.75rem;
  padding: 10px 0;
  font-family: 'Nunito', sans-serif;
  border-bottom: 1px solid rgba(201,150,58,0.2);
}
.top-bar .container { display: flex; justify-content: space-between; align-items: center; }
.top-left { display: flex; align-items: center; gap: 12px; }
.top-left-arabic { color: var(--gold-light); font-family: 'Amiri', serif; font-size: 1.1rem; line-height: 1; }
.top-left-text { opacity: 0.85; letter-spacing: 0.03em; }
.top-socials { display: flex; align-items: center; gap: 14px; margin-left: 10px; }
.top-socials a { color: var(--gold-light); transition: all var(--transition); display: flex; }
.top-socials a:hover { color: var(--white); transform: translateY(-2px) scale(1.1); }
.top-socials svg { width: 14px; height: 14px; fill: currentColor; }
.time-date-wrapper { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: center; }
.time-date-wrapper .separator { color: var(--gold-dim); font-size: 0.7rem; }
#hijri-date { color: var(--gold-light); font-weight: 600; }
#live-time { font-weight: 600; letter-spacing: 0.05em; }

/* ═══ MASTER NAVBAR ═══ */
.navbar { position: sticky; top: 0; z-index: 1000; background: var(--green-mid); height: var(--nav-h); border-bottom: 1px solid rgba(201,150,58,0.2); box-shadow: 0 2px 20px var(--shadow-green); }
.navbar .container { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.nav-logo { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.nav-logo-icon { width: 40px; height: 40px; background: var(--gold); clip-path: polygon(50% 0%,61% 35%,98% 35%,68% 57%,79% 91%,50% 70%,21% 91%,32% 57%,2% 35%,39% 35%); flex-shrink: 0; }
.nav-logo-text strong { display: block; font-family: 'Playfair Display', serif; font-size: 1.05rem; font-weight: 700; color: var(--gold-light); letter-spacing: 0.03em; line-height: 1.2; }
.nav-logo-text span { font-size: 0.62rem; letter-spacing: 0.2em; text-transform: uppercase; color: rgba(232,184,75,0.6); }
.nav-menu { display: flex; align-items: center; gap: 0; height: 100%; margin-left: auto; }
.nav-item { position: relative; height: 100%; display: flex; align-items: center; }
.nav-link { display: flex; align-items: center; gap: 5px; padding: 0 10px; height: 100%; font-size: 0.76rem; font-weight: 600; letter-spacing: 0.03em; color: rgba(255,255,255,0.82); transition: color var(--transition), background var(--transition); white-space: nowrap; }
.nav-link:hover, .nav-item:hover > .nav-link { color: var(--gold-light); background: rgba(255,255,255,0.06); }
.nav-link.active { color: var(--gold-light); }
.nav-link svg { width: 10px; height: 10px; fill: currentColor; transition: transform var(--transition); }
.nav-item:hover > .nav-link svg { transform: rotate(180deg); }
.dropdown { position: absolute; top: 100%; left: 0; min-width: 250px; background: var(--green-deep); border: 1px solid var(--border); border-top: 2px solid var(--gold); box-shadow: 0 8px 30px var(--shadow-green); opacity: 0; visibility: hidden; transform: translateY(8px); transition: all 0.22s ease; z-index: 100; }
.nav-item:hover .dropdown, .nav-item:focus-within .dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown a { display: block; padding: 12px 20px; font-size: 0.82rem; font-weight: 600; color: rgba(255,255,255,0.75); border-bottom: 1px solid rgba(255,255,255,0.05); transition: background var(--transition), color var(--transition), padding-left var(--transition); }
.dropdown a:last-child { border-bottom: none; }
.dropdown a:hover { background: rgba(201,150,58,0.12); color: var(--gold-light); padding-left: 26px; }

/* Mobile hamburger */
.nav-hamburger { display: none; flex-direction: column; justify-content: center; gap: 5px; width: 36px; height: 36px; background: none; border: none; cursor: pointer; padding: 4px; }
.nav-hamburger span { display: block; height: 2px; background: var(--gold-light); border-radius: 2px; transition: all 0.3s ease; transform-origin: center; }
.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.nav-drawer { display: none; position: fixed; top: var(--nav-h); left: 0; right: 0; bottom: 0; background: var(--green-deep); z-index: 999; overflow-y: auto; transform: translateX(100%); transition: transform 0.3s ease; }
.nav-drawer.open { transform: translateX(0); }
.drawer-links { padding: 20px 0 40px; }
.drawer-link { display: block; padding: 14px 28px; font-size: 0.95rem; font-weight: 600; color: rgba(255,255,255,0.8); border-bottom: 1px solid rgba(255,255,255,0.06); }
.drawer-link:hover { color: var(--gold-light); background: rgba(255,255,255,0.04); }
.drawer-section-title { padding: 18px 28px 6px; font-size: 0.65rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--gold-dim); font-weight: 700; }
.drawer-sub { padding-left: 44px; font-size: 0.88rem; }

/* ═══ INNER HERO (shared by inner pages) ═══ */
.inner-hero { position: relative; background: var(--green-deep); padding: 80px 0 60px; text-align: center; overflow: hidden; }
.inner-hero::before { content: ''; position: absolute; inset: 0; opacity: 0.04; background-image: repeating-linear-gradient(45deg,transparent,transparent 29px,rgba(201,150,58,1) 30px), repeating-linear-gradient(-45deg,transparent,transparent 29px,rgba(201,150,58,1) 30px); }
.inner-hero .container { position: relative; z-index: 2; }
.inner-title { font-family: 'Playfair Display', serif; font-size: clamp(2.5rem,5vw,3.8rem); font-weight: 700; color: var(--white); margin-bottom: 12px; line-height: 1.2; }
.inner-title span { color: var(--gold); }
.hero-bismillah { font-family: 'Amiri', serif; font-size: clamp(1.4rem,3vw,2rem); color: var(--gold-light); margin-bottom: 20px; }
.inner-desc { color: rgba(255,255,255,0.8); max-width: 750px; margin: 0 auto; font-size: 1.1rem; line-height: 1.8; }

/* ═══ MASTER FOOTER ═══ */
footer { background: #060f0a; color: rgba(255,255,255,0.55); }
.footer-main { padding: 64px 0 40px; display: grid; grid-template-columns: 1.5fr 1fr 0.8fr 1.1fr; gap: 40px; }
.footer-brand strong { display: block; font-family: 'Playfair Display', serif; font-size: 1.3rem; color: var(--gold-light); margin-bottom: 12px; }
.footer-col h4 { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold); margin-bottom: 18px; }
.footer-col a { display: block; font-size: 0.82rem; color: rgba(255,255,255,0.5); padding: 5px 0; transition: color var(--transition); }
.footer-col a:hover { color: var(--gold-light); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.07); padding: 20px 0; display: flex; justify-content: space-between; align-items: center; font-size: 0.75rem; }
.footer-email-link { color: var(--gold-light); text-decoration: none; font-weight: 600; letter-spacing: 0.04em; transition: color var(--transition); }
.footer-email-link:hover { color: var(--white); }

/* ═══ ANIMATIONS ═══ */
@keyframes fadeUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ═══ RESPONSIVE ═══ */
@media(max-width:1280px) {
  .nav-logo-text span { display: none; }
  .nav-link { padding: 0 8px; font-size: 0.73rem; letter-spacing: 0.02em; }
}

@media(max-width:1160px) {
  .nav-menu { display: none; }
  .nav-hamburger { display: flex; }
  .nav-drawer { display: block; }
}

@media(max-width:1024px) {
  .footer-main { grid-template-columns: 1fr 1fr; gap: 36px; }
}

@media(max-width:768px) {
  :root { --nav-h: 64px; }

  /* Top bar mobile: hide text, show socials + clock */
  .top-left-text, .top-left-arabic, .time-date-wrapper .separator { display: none; }
  .top-left { gap: 0; }
  .top-socials { margin-left: 0; margin-right: auto; }
  .top-bar .container { justify-content: space-between; }

  /* Nav mobile */
  .nav-menu { display: none; }
  .nav-hamburger { display: flex; }
  .nav-drawer { display: block; }

  /* Footer mobile */
  .footer-main { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; gap: 12px; text-align: center; }
}
