/* ==========================================================
   Al-Kindi Counseling Services — Group & Story page styles
   Shared by the group poster pages and the Al-Kindi story page.
   Loaded AFTER styles.css so it can reuse --primary / --accent.
   ========================================================== */

:root {
    --navy: #0f2b3c;
    --navy-deep: #091a25;
    --gold: #b8860b;
    --gold-light: #f5d77f;
    --gold-mid: #d9b64a;
    --ivory: #fbf6ea;
    --ink: #1f1a18;
    --muted: #4a423e;
}

.page-wrap { max-width: 1080px; margin: 0 auto; padding: 2.5rem 1.25rem 4rem; }
.breadcrumb { font-size: 0.85rem; color: var(--muted); margin-bottom: 1.25rem; }
.breadcrumb a { color: var(--navy); }
.eyebrow { display: inline-block; font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold); font-weight: bold; margin-bottom: 0.4rem; }

/* ---------- Hero split: poster + intro ---------- */
.group-hero { display: grid; grid-template-columns: minmax(0, 520px) minmax(0, 1fr); gap: 2.5rem; align-items: start; }
.group-hero .intro h1 { font-size: 2rem; line-height: 1.2; color: var(--navy); margin-bottom: 0.75rem; }
.group-hero .intro .lede { font-size: 1.12rem; color: var(--ink); }
.quick-facts { list-style: none; margin: 1.25rem 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; }
.quick-facts li { background: rgba(255,255,255,0.55); border: 1px solid rgba(15,43,60,0.12); border-radius: 10px; padding: 0.6rem 0.8rem; font-size: 0.92rem; }
.quick-facts strong { display: block; font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gold); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1rem; }
.hero-actions a { text-decoration: none; padding: 0.75rem 1.3rem; border-radius: 8px; }

/* ---------- The poster (exportable element) ---------- */
.poster {
    position: relative; overflow: hidden;
    width: 100%; aspect-ratio: 4 / 5;
    background: radial-gradient(120% 90% at 50% 0%, #17405a 0%, var(--navy) 45%, var(--navy-deep) 100%);
    color: var(--ivory); border-radius: 18px;
    box-shadow: 0 18px 40px rgba(9,26,37,0.35);
    display: flex; flex-direction: column; padding: 6.5% 8% 5.5%;
    font-family: Georgia, 'Times New Roman', serif;
    container-type: inline-size;
}
.poster::before { /* geometric star lattice */
    content: ""; position: absolute; inset: 0; opacity: 0.09; pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 80 80'%3E%3Cg fill='none' stroke='%23f5d77f' stroke-width='1.2'%3E%3Cpath d='M40 6 L49 31 L74 40 L49 49 L40 74 L31 49 L6 40 L31 31 Z'/%3E%3Crect x='22' y='22' width='36' height='36' transform='rotate(45 40 40)'/%3E%3Ccircle cx='40' cy='40' r='9'/%3E%3C/g%3E%3C/svg%3E");
    background-size: 80px 80px;
}
.poster::after { /* inner gold frame */
    content: ""; position: absolute; inset: 3.2%; border: 1.5px solid rgba(245,215,127,0.55); border-radius: 12px; pointer-events: none;
}
.poster > * { position: relative; z-index: 1; }
.poster .p-top { display: flex; justify-content: space-between; align-items: center; font-size: 3.1cqw; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold-light); }
.poster .p-arabic { font-family: 'Amiri', 'Noto Naskh Arabic', 'Geeza Pro', serif; font-size: 10cqw; line-height: 1.1; color: var(--gold-light); text-align: center; margin: 0; direction: rtl; }
.poster .p-icon { display: flex; justify-content: center; margin: 5% 0 3%; }
.poster .p-icon svg { width: 15cqw; height: 15cqw; }
.poster .p-title { font-family: 'Aclonica', Georgia, sans-serif; font-size: 7.6cqw; line-height: 1.08; text-align: center; color: #fff; margin: 1% 0 1.5%; }
.poster .p-sub { text-align: center; font-style: italic; font-size: 3.6cqw; line-height: 1.35; color: var(--gold-light); margin-bottom: 3%; }
.poster .p-rule { width: 30%; height: 1.5px; margin: 0 auto 3%; background: linear-gradient(90deg, transparent, var(--gold-light), transparent); }
.poster .p-points { list-style: none; margin: auto auto 0; padding: 0; font-size: 3.3cqw; line-height: 1.4; max-width: 94%; }
.poster .p-points li { padding-left: 1.3em; position: relative; margin-bottom: 1.2%; }
.poster .p-points li::before { content: "◆"; position: absolute; left: 0; color: var(--gold-mid); font-size: 0.8em; top: 0.12em; }
.poster .p-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 1.6cqw; margin: auto 0 3%; padding-top: 2.5%; }
.poster .p-chips span { border: 1px solid rgba(245,215,127,0.7); color: var(--gold-light); border-radius: 999px; padding: 0.8cqw 2.6cqw; font-size: 2.9cqw; white-space: nowrap; }
.poster .p-foot { display: flex; align-items: center; justify-content: space-between; gap: 3cqw; border-top: 1px solid rgba(245,215,127,0.35); padding-top: 2.5%; }
.poster .p-brand { font-size: 2.8cqw; line-height: 1.35; }
.poster .p-brand b { font-family: 'Aclonica', Georgia, sans-serif; font-weight: normal; font-size: 3.5cqw; color: #fff; display: block; }
.poster .p-qr { background: #fff; border-radius: 6px; padding: 1cqw; width: 15cqw; height: 15cqw; flex: none; }
.poster .p-qr svg { width: 100%; height: 100%; display: block; }

/* ---------- Share toolbar ---------- */
.share-bar { margin-top: 1rem; background: rgba(255,255,255,0.6); border: 1px solid rgba(15,43,60,0.12); border-radius: 12px; padding: 0.85rem; }
.share-bar p { margin: 0 0 0.55rem; font-size: 0.82rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--navy); font-weight: bold; }
.share-buttons { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.share-buttons button, .share-buttons a {
    font: inherit; font-size: 0.86rem; cursor: pointer; text-decoration: none;
    display: inline-flex; align-items: center; gap: 0.35rem;
    background: #fff; color: var(--navy); border: 1px solid rgba(15,43,60,0.25);
    border-radius: 999px; padding: 0.42rem 0.85rem; min-height: 38px;
}
.share-buttons button:hover, .share-buttons a:hover { background: var(--navy); color: #fff; }
.share-buttons .primary { background: var(--navy); color: #fff; border-color: var(--navy); }
.share-buttons .primary:hover { background: var(--gold); border-color: var(--gold); }
.share-status { font-size: 0.85rem; color: #2e6b3a; min-height: 1.2em; margin-top: 0.4rem; }

/* ---------- Content sections ---------- */
.content-section { margin-top: 3.25rem; }
.content-section > h2 { color: var(--navy); margin-bottom: 0.9rem; }
.content-section p { margin-bottom: 0.9rem; max-width: 72ch; }
.answer-box { background: rgba(255,255,255,0.6); border-left: 4px solid var(--gold); border-radius: 0 10px 10px 0; padding: 1rem 1.2rem; max-width: 80ch; }
.answer-box p:last-child { margin-bottom: 0; }

.pems-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 1rem; margin-top: 1rem; }
.pems-card { background: rgba(255,255,255,0.55); border: 1px solid rgba(255,255,255,0.8); border-radius: 12px; padding: 1.1rem; box-shadow: 0 6px 16px rgba(0,0,0,0.05); }
.pems-card .ar { font-family: 'Amiri', serif; font-size: 1.5rem; color: var(--gold); line-height: 1; }
.pems-card h3 { color: var(--navy); margin: 0.35rem 0 0.4rem; }
.pems-card p { font-size: 0.93rem; margin: 0; }

.arc { list-style: none; padding: 0; margin: 1rem 0 0; counter-reset: arc; display: grid; gap: 0.75rem; }
.arc li { counter-increment: arc; display: grid; grid-template-columns: 3rem 1fr; gap: 0.9rem; align-items: start; background: rgba(255,255,255,0.5); border-radius: 12px; padding: 0.9rem 1rem; }
.arc li::before { content: counter(arc); width: 3rem; height: 3rem; border-radius: 50%; background: var(--navy); color: var(--gold-light); border: 2px solid var(--gold); display: flex; align-items: center; justify-content: center; font-family: 'Aclonica', sans-serif; font-size: 1.1rem; }
.arc h3 { color: var(--navy); margin: 0 0 0.2rem; font-size: 1rem; }
.arc p { margin: 0; font-size: 0.95rem; }
.arc .tag { font-size: 0.78rem; color: var(--gold); letter-spacing: 0.06em; text-transform: uppercase; }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.fit-card { background: rgba(255,255,255,0.55); border-radius: 12px; padding: 1.1rem 1.25rem; }
.fit-card h3 { color: var(--navy); margin-bottom: 0.5rem; }
.fit-card ul { padding-left: 1.2rem; margin: 0; }
.fit-card li { margin-bottom: 0.35rem; }

.quote-band { margin-top: 3rem; background: var(--navy); color: var(--ivory); border-radius: 16px; padding: 2rem 1.75rem; text-align: center; position: relative; overflow: hidden; }
.quote-band blockquote { font-size: 1.25rem; font-style: italic; max-width: 46ch; margin: 0 auto; }
.quote-band cite { display: block; margin-top: 0.75rem; color: var(--gold-light); font-style: normal; font-size: 0.9rem; letter-spacing: 0.06em; }

.faq details { background: rgba(255,255,255,0.6); border-radius: 10px; padding: 0.85rem 1.1rem; margin-bottom: 0.6rem; }
.faq summary { cursor: pointer; font-weight: bold; color: var(--navy); }
.faq details p { margin: 0.6rem 0 0; }

.join-panel { margin-top: 3rem; display: grid; grid-template-columns: 1.3fr 1fr; gap: 1.5rem; align-items: center; background: rgba(255,255,255,0.65); border: 1px solid rgba(184,134,11,0.35); border-radius: 16px; padding: 1.75rem; }
.join-panel .price { font-family: 'Aclonica', sans-serif; font-size: 1.6rem; color: var(--navy); }
.join-panel .note { font-size: 0.9rem; color: var(--muted); }
.join-panel .btn-cta { display: block; text-align: center; padding: 0.95rem 1.2rem; border-radius: 8px; text-decoration: none; font-size: 1.05rem; }

.crisis-note { margin-top: 1.5rem; font-size: 0.9rem; background: rgba(255,255,255,0.55); border-radius: 10px; padding: 0.8rem 1rem; }

.related { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 1rem; margin-top: 1rem; }
.related a { display: block; text-decoration: none; color: var(--ink); background: rgba(255,255,255,0.55); border-radius: 12px; padding: 1rem; border: 1px solid rgba(255,255,255,0.8); }
.related a:hover { background: rgba(255,255,255,0.8); }
.related strong { display: block; color: var(--navy); font-family: 'Aclonica', sans-serif; font-weight: normal; margin-bottom: 0.25rem; }
.updated { margin-top: 2.5rem; font-size: 0.82rem; color: var(--muted); }

/* ---------- Story page ---------- */
.story-hero { background: var(--navy); color: var(--ivory); border-radius: 18px; padding: 3rem 2rem; text-align: center; position: relative; overflow: hidden; }
.story-hero::before { content: ""; position: absolute; inset: 0; opacity: 0.08; background-image: inherit; }
.story-hero .ar { font-family: 'Amiri', serif; font-size: 3rem; color: var(--gold-light); line-height: 1.1; }
.story-hero h1 { color: #fff; font-size: 2rem; margin: 0.6rem 0; }
.story-hero p { max-width: 62ch; margin: 0 auto; color: #e9e1cc; }
.timeline { border-left: 2px solid var(--gold); margin: 1rem 0 0 0.6rem; padding-left: 1.4rem; }
.timeline div { position: relative; margin-bottom: 1.1rem; }
.timeline div::before { content: ""; position: absolute; left: -1.95rem; top: 0.45rem; width: 0.9rem; height: 0.9rem; border-radius: 50%; background: var(--navy); border: 2px solid var(--gold); }
.timeline b { color: var(--navy); }
.apply-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 1rem; margin-top: 1rem; }
.apply-card { background: rgba(255,255,255,0.6); border-radius: 12px; padding: 1.2rem; border-top: 4px solid var(--gold); }
.apply-card h3 { color: var(--navy); margin-bottom: 0.4rem; }
.apply-card p { font-size: 0.95rem; margin-bottom: 0.6rem; }
.apply-card a { font-weight: bold; color: var(--navy); }
.sources { font-size: 0.85rem; color: var(--muted); }
.sources li { margin-bottom: 0.3rem; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    .group-hero { grid-template-columns: 1fr; }
    .group-hero .poster-col { max-width: 520px; margin: 0 auto; width: 100%; }
    .pems-grid { grid-template-columns: 1fr 1fr; }
    .related { grid-template-columns: 1fr; }
    .join-panel { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
    .page-wrap { padding: 1.5rem 1rem 3rem; }
    .group-hero .intro h1, .story-hero h1 { font-size: 1.55rem; }
    .quick-facts, .two-col, .apply-grid, .pems-grid { grid-template-columns: 1fr; }
    .story-hero { padding: 2.2rem 1.2rem; }
}

/* ---------- Standalone poster document (opened by "Download PDF") ---------- */
body.poster-print { margin: 0; background: #091a25; display: flex; justify-content: center; align-items: center; min-height: 100vh; }
body.poster-print .poster { width: min(92vw, 72vh); border-radius: 0; }
@page posterpage { size: 8in 10in; margin: 0; }
@media print {
    body.poster-print { display: block; min-height: 0; }
    body.poster-print .poster { page: posterpage; width: 8in; height: 10in; aspect-ratio: auto; box-shadow: none; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    body:not(.poster-print) nav, body:not(.poster-print) .share-bar, body:not(.poster-print) footer { display: none; }
}
