/* Jumma Time — shared styles. Brand palette shared with Takbeer Time. */
:root {
  --paper: #FDFAF3;
  --paper-2: #F5EFE0;
  --paper-3: #EAE0C8;
  --green: #0F2A1E;
  --green-2: #1F3A2C;
  --green-3: #2F5440;
  --green-soft: #DFE9E1;
  --brass: #B58B4D;
  --brass-2: #9C7639;
  --brass-soft: #E5D2B0;
  --ink: #161614;
  --ink-2: #3F3D38;
  --ink-3: #76716A;
  --ink-4: #A8A39A;
  --crimson: #8C2A2A;

  --ui: 'Inter Tight', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --display: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --mono: 'JetBrains Mono', ui-monospace, Menlo, Consolas, monospace;

  --pad: clamp(1.1rem, 5vw, 2rem);
  --maxw: 1080px;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(0,0,0,0.04), 0 6px 24px -8px rgba(15,42,30,0.18);
  --rule: 1px solid var(--paper-3);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--ui);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.62;
  font-size: 1.02rem;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--green-3); }
h1, h2, h3 { line-height: 1.18; color: var(--green); font-weight: 700; }
h1 { font-size: clamp(2.1rem, 7vw, 3.4rem); letter-spacing: 0; }
h2 { font-size: clamp(1.5rem, 4vw, 2.1rem); letter-spacing: 0; }
h3 { font-size: clamp(1.12rem, 2.6vw, 1.32rem); }
p { color: var(--ink-2); }
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--pad); }
.eyebrow {
  font-size: 0.74rem; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--brass-2);
}

/* ---- Header ---- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(253,250,243,0.92);
  backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: var(--rule);
}
.site-header__in {
  width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0.7rem var(--pad);
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.brand {
  display: flex; align-items: center; gap: 0.55rem; text-decoration: none;
  color: var(--green); white-space: nowrap;
}
.brand__mark { color: var(--green); display: flex; }
.brand__name { font-family: var(--display); font-weight: 600; font-size: 1.3rem; letter-spacing: 0.01em; }
.site-nav { display: flex; align-items: center; gap: 0.3rem; flex-wrap: wrap; min-width: 0; }
.site-nav a {
  text-decoration: none; color: var(--ink-2); font-weight: 600;
  font-size: 0.92rem; padding: 0.4rem 0.6rem; border-radius: var(--radius-sm);
}
.site-nav a:hover { color: var(--green); background: var(--green-soft); }
.site-nav__cta {
  background: var(--green) !important; color: var(--paper) !important;
  padding: 0.5rem 0.95rem !important;
}
.site-nav__cta:hover { background: var(--green-2) !important; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--ui); font-weight: 700; font-size: 0.98rem;
  padding: 0.8rem 1.4rem; border-radius: var(--radius-sm);
  text-decoration: none; cursor: pointer; border: 2px solid transparent;
  transition: transform 0.06s ease, background 0.15s ease;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--green); color: var(--paper); }
.btn--primary:hover { background: var(--green-2); }
.btn--brass { background: var(--brass); color: #1a1205; }
.btn--brass:hover { background: var(--brass-2); }
.btn--ghost { background: transparent; color: var(--green); border-color: var(--paper-3); }
.btn--ghost:hover { border-color: var(--green-3); background: var(--paper-2); }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.7rem; }

/* ---- Hero ---- */
.hero { padding: clamp(2.4rem, 7vw, 4.6rem) 0 clamp(2rem, 5vw, 3.4rem); }
.hero__grid {
  display: grid; grid-template-columns: 1.15fr 0.85fr; gap: clamp(1.6rem, 4vw, 3rem);
  align-items: center;
}
.hero__grid > * { min-width: 0; }
.hero__lead { font-size: 1.16rem; color: var(--ink-2); margin: 1rem 0 1.4rem; max-width: 38ch; }
.hero h1 .accent { color: var(--brass-2); font-family: var(--display); font-style: italic; }
.hero-note { font-size: 0.88rem; color: var(--ink-3); margin-top: 1rem; max-width: 46ch; }

/* ---- Quick answer / TL;DR box (AI-search extractable) ---- */
.quick-answer {
  background: var(--green-soft); border: 1px solid #cdddd0;
  border-left: 5px solid var(--green-3);
  border-radius: var(--radius); padding: 1.1rem 1.3rem; margin: 1.6rem 0;
}
.quick-answer p { color: var(--green-2); margin: 0; }
.quick-answer strong { color: var(--green); }
.quick-answer .eyebrow { display: block; margin-bottom: 0.35rem; }

/* ---- Jummah countdown widget ---- */
.jw {
  background: var(--green); color: var(--paper-2);
  border-radius: var(--radius); padding: clamp(1.3rem, 3vw, 1.9rem);
  box-shadow: var(--shadow);
  max-width: 100%;
}
.jw__label { font-size: 0.74rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--brass-soft); font-weight: 700; }
.jw__date { font-family: var(--display); font-size: clamp(1.5rem, 4vw, 2rem); color: var(--paper); margin: 0.2rem 0 0.9rem; }
.jw__clock {
  display: flex; gap: 0.55rem; font-family: var(--mono); margin-bottom: 1rem;
}
.jw__unit {
  background: var(--green-2); border-radius: var(--radius-sm);
  padding: 0.55rem 0.4rem; text-align: center; flex: 1; min-width: 0;
}
.jw__num { font-size: clamp(1.4rem, 5vw, 2rem); font-weight: 700; color: var(--paper); display: block; }
.jw__cap { font-size: 0.62rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--brass-soft); }
.jw__note { font-size: 0.8rem; color: #b9c9bd; margin: 0.8rem 0 0; }
.jw .btn--brass { width: 100%; justify-content: center; }
.jw__geo-status { font-size: 0.82rem; color: var(--brass-soft); margin-top: 0.6rem; min-height: 1.1em; }

/* ---- Sections ---- */
section { padding: clamp(2.2rem, 5vw, 3.6rem) 0; }
.section-tight { padding: clamp(1.4rem, 3vw, 2.2rem) 0; }
.lede { font-size: 1.12rem; max-width: 60ch; }
.prose { max-width: 65ch; }
.prose p { margin: 0.9rem 0; }
.prose h2 { margin-top: 2rem; }
.prose h3 { margin-top: 1.5rem; color: var(--green-2); }
.prose ul, .prose ol { margin: 0.8rem 0 0.8rem 1.2rem; }
.prose li { margin: 0.35rem 0; color: var(--ink-2); }
.prose strong { color: var(--green-2); }
.source-note { color: var(--ink-3); font-size: 0.9rem; }
.time-table-wrap {
  overflow-x: auto;
  border: var(--rule);
  border-radius: var(--radius-sm);
  background: var(--paper-2);
  margin-top: 1rem;
}
.time-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 540px;
}
.time-table th,
.time-table td {
  text-align: left;
  vertical-align: top;
  padding: 0.8rem 0.9rem;
  border-bottom: var(--rule);
  color: var(--ink-2);
}
.time-table thead th {
  color: var(--green-2);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.time-table tbody tr:last-child th,
.time-table tbody tr:last-child td { border-bottom: 0; }

/* ---- Cards / steps ---- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1rem; }
.card {
  background: var(--paper-2); border: var(--rule); border-radius: var(--radius);
  padding: 1.3rem;
}
.card h3 { color: var(--green-2); margin-bottom: 0.4rem; }
.card p { font-size: 0.95rem; }
.card__n {
  font-family: var(--mono); font-weight: 700; color: var(--brass-2);
  font-size: 0.85rem; letter-spacing: 0.1em;
}

/* ---- City grid ---- */
.city-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0.7rem; }
.city-link {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--paper-2); border: var(--rule); border-radius: var(--radius-sm);
  padding: 0.8rem 1rem; text-decoration: none; color: var(--green-2); font-weight: 600;
}
.city-link:hover { border-color: var(--brass); background: var(--paper); }
.city-link span { color: var(--ink-4); font-weight: 400; font-size: 0.85rem; }

/* ---- FAQ ---- */
.faq details {
  border: var(--rule); border-radius: var(--radius-sm); margin-bottom: 0.6rem;
  background: var(--paper-2); padding: 0 1rem;
}
.faq summary {
  cursor: pointer; font-weight: 700; color: var(--green-2);
  padding: 0.9rem 0; list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before { content: "+"; color: var(--brass-2); font-family: var(--mono); margin-right: 0.6rem; }
.faq details[open] summary::before { content: "\2212"; }
.faq details[open] summary { border-bottom: var(--rule); }
.faq details p { padding: 0.8rem 0; font-size: 0.96rem; }

/* ---- CTA band ---- */
.cta-band {
  background: var(--green); color: var(--paper-2); border-radius: var(--radius);
  padding: clamp(1.8rem, 5vw, 3rem); text-align: center;
}
.cta-band h2 { color: var(--paper); }
.cta-band p { color: #c4d2c7; max-width: 50ch; margin: 0.7rem auto 1.4rem; }
.cta-band .btn-row { justify-content: center; }

/* ---- Footer ---- */
.site-footer { border-top: var(--rule); padding: 2.2rem 0; margin-top: 1rem; }
.site-footer__grid { display: flex; flex-wrap: wrap; gap: 2rem 3rem; justify-content: space-between; }
.site-footer h4 { color: var(--green-2); font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 0.5rem; }
.site-footer a { display: block; color: var(--ink-2); text-decoration: none; font-size: 0.92rem; padding: 0.18rem 0; }
.site-footer a:hover { color: var(--green); }
.site-footer__legal { color: var(--ink-3); font-size: 0.84rem; margin-top: 1.6rem; }

/* ---- Breadcrumb ---- */
.breadcrumb { font-size: 0.84rem; color: var(--ink-3); padding: 1rem 0 0; }
.breadcrumb a { color: var(--ink-3); text-decoration: none; }
.breadcrumb a:hover { color: var(--green); }

/* ---- Misc ---- */
.spellings { font-size: 0.9rem; color: var(--ink-3); }
.tag-row { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.8rem; }
.tag {
  font-size: 0.78rem; background: var(--paper-2); border: var(--rule);
  border-radius: 100px; padding: 0.25rem 0.7rem; color: var(--ink-2);
}
.language-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.1rem 0.8rem;
}
.skip-link {
  /* Hidden off-screen via negative top — never via negative left, which
     becomes real horizontal overflow in RTL (the "end" edge is the left). */
  position: absolute; top: -48px; left: var(--pad); z-index: 100;
  background: var(--green); color: var(--paper);
  padding: 0.5rem 1rem; border-radius: var(--radius-sm);
  transition: top 0.15s ease;
}
.skip-link:focus { top: 0.5rem; }

@media (max-width: 760px) {
  .site-header__in {
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 0.65rem;
  }
  .site-nav {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.35rem;
  }
  .site-nav a {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    white-space: normal;
    line-height: 1.2;
    min-height: 2.35rem;
    padding: 0.48rem 0.5rem;
    font-size: 0.88rem;
  }
  .site-nav__cta { grid-column: 1 / -1; }
  .hero__grid { grid-template-columns: 1fr; }
  .hero { padding-top: 1.8rem; }
  .hero__lead { max-width: 100%; }
  .jw__clock { gap: 0.35rem; }
  .jw__unit { padding: 0.5rem 0.25rem; }
  .jw__num { font-size: clamp(1.25rem, 8vw, 1.8rem); }
  .jw__cap { font-size: 0.56rem; letter-spacing: 0.07em; }
  .quick-answer { padding: 0.95rem 1rem; }
  .city-link {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.2rem;
  }
}
html[dir="rtl"] .site-header__in,
html[dir="rtl"] .brand,
html[dir="rtl"] .site-nav,
html[dir="rtl"] .btn-row,
html[dir="rtl"] .site-footer__grid {
  direction: rtl;
}
html[dir="rtl"] .quick-answer {
  border-left: 1px solid #cdddd0;
  border-right: 5px solid var(--green-3);
}
html[dir="rtl"] .faq summary::before {
  margin-right: 0;
  margin-left: 0.6rem;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
}
