/* rattilha.com — صفحات الأقسام: /quran /azkar /hijri /qibla /ramadan (site/_sections).
   تُحمَّل بعد style.css و prayer.css وتعيد استخدام متغيّراتهما (سماء الوقت + ورق دافئ). خصائص منطقية فقط.
   بلا صور ولا حركة متكررة؛ الخط القرآني Amiri Quran (موجود في fonts.css، يُحمَّل عند الحاجة فقط). */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.sx-page .pt-head h1 { overflow-wrap: anywhere; }
.sx-page .pt-grid > * { min-width: 0; }
.sx-page [hidden] { display: none !important; }

/* شريط الأقسام */
.sx-tools { margin-block: 2.5rem 0; }
.sx-tools h2 { margin: 0 0 .75rem; font-size: 1.1rem; color: var(--head); }
.sx-tools ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.sx-tools a { display: inline-flex; align-items: center; min-height: 44px; padding: .4rem 1rem; border-radius: 999px; border: 1px solid var(--line); background: var(--paper); font-weight: 600; text-decoration: none; color: var(--brand-d); }
.sx-tools a:hover { border-color: var(--brand); }

/* ── القرآن ── */
.sx-surahs { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: .55rem; }
.sx-surahs a { display: grid; grid-template-columns: 2.4rem 1fr; grid-template-rows: auto auto; column-gap: .7rem; align-items: center; padding: .6rem .8rem; min-height: 64px; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; text-decoration: none; color: var(--ink); }
.sx-surahs a:hover { border-color: var(--brand); }
.sx-sn { grid-row: span 3; width: 2.4rem; height: 2.4rem; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; background: var(--mint); color: var(--brand-d); font-weight: 700; font-size: .9rem; }
.sx-surahs b { font-family: "Amiri Quran", "Noto Kufi Arabic", serif; font-weight: 400; font-size: 1.35rem; line-height: 1.6; color: var(--head); }
.sx-surahs i { font-style: normal; font-weight: 600; font-size: .85rem; color: var(--ink-2); }
.sx-surahs small { color: var(--muted); font-size: .78rem; }

.sx-player { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem .8rem; margin-top: .25rem; }
.sx-player .btn { min-height: 48px; padding: .55rem 1.3rem; }
.sx-player select { min-height: 48px; max-width: 100%; padding: .4rem .8rem; border-radius: 12px; border: 1px solid var(--sky-line); background: var(--sky-glass); color: var(--sky-ink); font: inherit; font-weight: 600; }
.sx-player select option { color: #1D2A28; background: #fff; }
.qa-st { font-size: .9rem; color: var(--sky-soft); }

.sx-mushaf { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); padding: clamp(1.1rem, .6rem + 2.5vw, 2.5rem); margin-block: 1rem 1.5rem; }
.sx-basmala { margin: 0 0 1rem; text-align: center; font-family: "Amiri Quran", "Traditional Arabic", serif; font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.2rem); line-height: 2; color: var(--gold-text); }
.q-text { margin: 0; font-family: "Amiri Quran", "Traditional Arabic", serif; font-size: clamp(1.45rem, 1.1rem + 1.1vw, 2rem); line-height: 2.35; text-align: justify; color: var(--ink); word-spacing: .04em; }
.q-v { border-radius: 8px; transition: background .2s; scroll-margin-block: 6rem; }
.q-v:target, .q-v.is-on { background: var(--goldsoft); box-shadow: 0 0 0 .2rem var(--goldsoft); }
.vn { display: inline-flex; align-items: center; justify-content: center; min-width: 1.75em; height: 1.75em; padding-inline: .15em; margin-inline: .1em; border: 1.5px solid var(--gold); border-radius: 50%; font-family: "Noto Kufi Arabic", system-ui, sans-serif; font-size: .5em; font-weight: 700; line-height: 1; color: var(--gold-text); text-decoration: none; vertical-align: .35em; }
.vn:hover, .vn:focus-visible { background: var(--gold-l); color: #3a2a08; }

.sx-note { background: var(--goldsoft); border: 1px solid color-mix(in srgb, var(--gold) 40%, transparent); border-radius: var(--r); padding: 1.1rem 1.4rem; margin-block: 0 1.25rem; }
.sx-note h2 { margin: 0 0 .5rem; font-size: 1.1rem; color: var(--head); }
.sx-note blockquote { margin: 0; font-family: "Amiri Quran", "Traditional Arabic", serif; font-size: 1.35rem; line-height: 2; color: var(--ink); }
.sx-note blockquote p { margin: 0; }
.sx-src { margin: .4rem 0 0; font-size: .86rem; color: var(--muted); }
.sx-parts { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem .6rem; margin-block: .5rem 0; font-size: .92rem; }
.sx-parts > span:first-child { color: var(--muted); }
.sx-parts a, .sx-parts span[aria-current] { padding: .35rem .8rem; min-height: 40px; display: inline-flex; align-items: center; border-radius: 999px; border: 1px solid var(--line); background: var(--paper); text-decoration: none; font-weight: 600; }
.sx-parts span[aria-current] { background: var(--brand-d); color: #fff; border-color: var(--brand-d); }
.sx-next { margin: 0 0 1.5rem; }
.sx-pn { display: flex; justify-content: space-between; gap: 1rem; margin-block: 1.5rem; }
.sx-pn a { display: flex; flex-direction: column; padding: .7rem 1.1rem; min-width: 10rem; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; text-decoration: none; }
.sx-pn a[rel="next"] { text-align: end; }
.sx-pn small { color: var(--muted); font-size: .8rem; }
.sx-pn b { color: var(--head); }
.sx-quran .pt-head { padding-block-end: 3.5rem; }

/* ── الأذكار ── */
.sx-azkar { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; counter-reset: z; }
.sx-z { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); padding: 1.15rem 1.35rem; transition: opacity .2s; }
.sx-z.is-done { opacity: .62; }
.sx-zt { margin: 0 0 .9rem; font-size: 1.22rem; line-height: 2.05; color: var(--ink); }
.sx-zm { display: grid; grid-template-columns: auto 1fr; column-gap: 1rem; align-items: start; }
.sx-zm > p { grid-column: 2; }
.sx-tap { grid-row: span 3; display: inline-flex; flex-direction: column; align-items: center; justify-content: center; min-width: 5.2rem; min-height: 64px; padding: .4rem .7rem; border-radius: 16px; border: 1.5px solid var(--brand); background: var(--mint); color: var(--brand-d); font: inherit; cursor: pointer; touch-action: manipulation; }
.sx-tap b { font-size: 1.45rem; line-height: 1.2; }
.sx-tap small { font-size: .7rem; font-weight: 600; white-space: nowrap; }
.sx-tap.is-done { background: var(--brand-d); color: #fff; }
.sx-virtue, .sx-zm .sx-src { margin: 0 0 .3rem; font-size: .9rem; color: var(--ink-2); line-height: 1.8; }
.sx-virtue > span:first-child, .sx-zm .sx-src > span:first-child { display: inline-block; margin-inline-end: .35rem; padding: 0 .5rem; border-radius: 6px; background: var(--stone); color: var(--muted); font-size: .76rem; font-weight: 700; }

/* ── الهجري ── */
.sx-today { display: inline-block; padding: 1rem 1.4rem; border-radius: 20px; background: var(--sky-glass); border: 1px solid var(--sky-line); }
.sx-today p { margin: 0; color: var(--sky-soft); }
.sx-hbig { font-size: clamp(1.6rem, 1.1rem + 2vw, 2.4rem); font-weight: 800; color: var(--sky-ink) !important; line-height: 1.5; }
.sx-forms { margin-block: 1rem; }
.sx-forms h3, .sx-manual h2 { margin: 0 0 .8rem; font-size: 1.05rem; color: var(--head); }
.sx-forms form, .sx-manual { display: flex; flex-direction: column; gap: .8rem; }
.sx-row { display: flex; flex-wrap: wrap; gap: .6rem; }
.sx-row label { flex: 1 1 6rem; }
.sx-row label:has(select[name="hm"]) { flex: 2 1 9rem; }
.sx-nw { white-space: nowrap; }
.sx-forms label, .sx-manual label { display: flex; flex-direction: column; gap: .3rem; font-size: .88rem; color: var(--muted); font-weight: 600; }
.sx-forms input, .sx-forms select, .sx-manual input { width: 100%; min-width: 0; box-sizing: border-box; min-height: 48px; padding: .4rem .7rem; border-radius: 12px; border: 1px solid var(--line); background: var(--stone); color: var(--ink); font: inherit; font-size: 1rem; }
.sx-forms .btn, .sx-manual .btn { align-self: flex-start; min-height: 48px; }
.sx-result { margin: 0 0 1rem; padding: 1rem 1.25rem; border-radius: 16px; background: var(--mint); border: 1px solid color-mix(in srgb, var(--brand) 30%, transparent); font-size: 1.1rem; }
.sx-result span { margin-inline: .35rem; color: var(--muted); }
.sx-err { margin: 0 0 1rem; padding: .9rem 1.2rem; border-radius: 14px; background: #fbe9e5; color: #8a2a17; }
.sx-cal { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); padding: .8rem; }
.sx-cal-h, .sx-cal-b { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .35rem; }
.sx-cal-h span { text-align: center; font-size: .78rem; font-weight: 700; color: var(--muted); padding: .3rem 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sx-cal-b span { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 3.6rem; border-radius: 12px; background: var(--stone); }
.sx-cal-b span.is-pad { background: transparent; }
.sx-cal-b b { font-size: 1.15rem; color: var(--head); line-height: 1.3; }
.sx-cal-b small { font-size: .7rem; color: var(--muted); white-space: nowrap; }
.sx-cal-b .is-today { background: var(--gold-l); outline: 2px solid var(--gold); }
.sx-cal-b .is-today b, .sx-cal-b .is-today small { color: #3a2a08; }
.sx-occ tbody th span { margin-inline-start: .35rem; font-size: .8rem; color: var(--muted); }
.sx-occ tbody th a { text-decoration: none; }

/* ── القبلة ── */
.sx-qf { display: flex; flex-wrap: wrap; align-items: center; gap: 1.25rem 2rem; margin-top: .5rem; }
.sx-dial { width: min(260px, 70vw); height: auto; flex: none; overflow: visible; }
.sx-rot { transform-origin: 100px 100px; transition: transform .25s linear; }
.sx-dial .d-ring { fill: var(--sky-glass); stroke: var(--sky-line); stroke-width: 3; }
.sx-dial .d-tick { stroke: var(--sky-ink); stroke-width: 3; opacity: .6; }
.sx-dial .d-n { fill: var(--sky-ink); font: 700 20px "Noto Kufi Arabic", system-ui, sans-serif; }
.sx-dial .d-arrow { fill: var(--brand-d); }
.sx-dial .d-kaaba { fill: #1D2A28; stroke: var(--gold); stroke-width: 2.5; }
.sx-dial .d-hub { fill: var(--gold); }
.sx-dial .d-top { stroke: var(--gold); stroke-width: 5; stroke-linecap: round; }
.sx-qf.is-ok .d-ring { fill: rgba(63, 176, 163, .35); }
.sx-qr { flex: 1 1 16rem; }
.sx-qr p { margin: 0 0 .4rem; color: var(--sky-soft); }
.sx-qdeg b { font-size: clamp(2.4rem, 1.8rem + 2.5vw, 3.4rem); font-weight: 800; color: var(--sky-ink); line-height: 1.2; }
.sx-qdeg span { font-size: 1.15rem; font-weight: 700; color: var(--sky-ink); }
.sx-qs { min-height: 1.6em; font-weight: 600; }
.sx-qb { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: .6rem; }
.sx-ghost { background: var(--sky-glass); color: var(--sky-ink); border: 1px solid var(--sky-line); }
.sx-steps { margin: 0; padding-inline-start: 1.25rem; display: grid; gap: .5rem; color: var(--ink-2); }
.sx-list { margin: 0; padding-inline-start: 1.1rem; display: grid; gap: .45rem; }
.sx-list a { font-weight: 600; }

/* ── رمضان ── */
.sx-cds { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: .7rem; margin-top: .5rem; }
.sx-cd { display: flex; flex-direction: column; gap: .1rem; padding: .9rem 1.1rem; border-radius: 18px; background: var(--sky-glass); border: 1px solid var(--sky-line); }
.sx-cd:first-child { background: var(--gold-l); border-color: var(--gold); color: #3a2a08; }
.sx-cd-l { font-size: .9rem; font-weight: 600; opacity: .9; }
.sx-cd-n { font-size: clamp(1.45rem, 1.1rem + 1.2vw, 2rem); font-weight: 800; line-height: 1.35; }
.sx-cd-t { font-size: .62em; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.sx-cd small { font-size: .82rem; opacity: .9; }
.sx-imsak th.sx-key, .sx-imsak td.sx-key { background: color-mix(in srgb, var(--gold-l) 45%, transparent); font-weight: 700; }
.sx-imsak tbody th span { display: block; font-size: .78rem; color: var(--muted); }
.sx-imsak tr.sx-ten > * { border-top: 2px solid var(--gold); }
.sx-sight { max-width: 80ch; }

@media (max-width: 560px) {
    .sx-surahs { grid-template-columns: 1fr 1fr; gap: .45rem; }
    .sx-surahs a { grid-template-columns: 1fr; padding: .55rem .65rem; }
    .sx-sn { grid-row: auto; width: 2rem; height: 2rem; font-size: .8rem; }
    .q-text { text-align: start; line-height: 2.25; }
    .sx-mushaf { margin-inline: -1rem; border-radius: 0; border-inline: 0; }
    .sx-pn a { min-width: 0; flex: 1; }
    .sx-z { padding: 1rem 1rem; }
    .sx-zt { font-size: 1.12rem; }
    .sx-zm { grid-template-columns: 1fr; }
    .sx-zm > p { grid-column: 1; }
    .sx-tap { grid-row: auto; flex-direction: row; gap: .6rem; justify-self: stretch; margin-bottom: .6rem; }
    .sx-cal { padding: .45rem; margin-inline: -.5rem; }
    .sx-cal-h, .sx-cal-b { gap: .2rem; }
    .sx-cal-h span { font-size: .62rem; }
    .sx-cal-b span { min-height: 3rem; border-radius: 8px; }
    .sx-cal-b b { font-size: 1rem; }
    .sx-cal-b small { font-size: .56rem; }
    .sx-qf { justify-content: center; }
    .sx-qr { text-align: center; }
    .sx-qb { justify-content: center; }
    /* الإمساكية: كل الأعمدة الأساسية بلا تمرير — الظهر والعصر يُخفيان على الهاتف */
    .sx-imsak tr > :nth-child(3), .sx-imsak tr > :nth-child(4) { display: none; }
    .sx-imsak tbody th { white-space: normal; min-width: 4.4rem; }
    .sx-imsak thead th { white-space: normal; font-size: .7rem; line-height: 1.4; padding-inline: .2rem; }
    .sx-imsak th, .sx-imsak td { padding-inline: .25rem; }
    /* prayer.css يخفي العمود الثالث في جداول المدن على الهاتف — جداول الأقسام تحتاجه */
    .pt-week.sx-occ tr > :nth-child(3) { display: table-cell; }
    .sx-occ th, .sx-occ td { white-space: normal; }
}
