/* =====================================================================
   India Helpline — additional styles for detail / static pages
   Layered on top of style.css (which defines the base tokens & nav).
   ===================================================================== */

.page-main {
    padding: 108px 0 80px;
    min-height: 60vh;
}

/* ---------- breadcrumbs ---------- */
.crumbs ol {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    list-style: none;
    padding: 0;
    margin: 0 0 24px;
    font-size: 13px;
    color: var(--text-3);
}
.crumbs a {
    color: var(--text-2);
    text-decoration: none;
}
.crumbs a:hover { color: var(--brand); }
.crumbs [aria-current="page"] {
    color: var(--text);
    font-weight: 600;
}
.crumb-sep {
    margin: 0 4px;
    color: var(--text-3);
    opacity: 0.5;
}

/* ---------- detail hero ---------- */
.detail-hero {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 24px;
    align-items: flex-start;
    padding: 28px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    margin-bottom: 24px;
}
.dh-logo {
    width: 72px;
    height: 72px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    font-family: 'Sora', system-ui, sans-serif;
    font-weight: 800;
    font-size: 26px;
    color: #fff;
    letter-spacing: -0.02em;
}
.dh-copy .eyebrow {
    margin: 0 0 6px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
}
.dh-copy .eyebrow a { text-decoration: none; }
.dh-copy h1 {
    margin: 0 0 10px;
    font-family: 'Sora', system-ui, sans-serif;
    font-size: clamp(24px, 3vw, 34px);
    line-height: 1.15;
    letter-spacing: -0.02em;
}
.dh-desc {
    margin: 0 0 14px;
    color: var(--text-2);
    max-width: 68ch;
}
.dh-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    font-size: 12px;
    font-weight: 600;
    color: var(--text-2);
}
.tag.toll { background: rgba(52,211,153,0.12); color: #34d399; border-color: rgba(52,211,153,0.3); }
.tag.verified { background: rgba(124,92,255,0.12); color: #a78bfa; border-color: rgba(124,92,255,0.3); }

@media (max-width: 640px) {
    .detail-hero { grid-template-columns: 1fr; padding: 20px; }
    .dh-logo { width: 56px; height: 56px; font-size: 22px; }
}

/* ---------- detail body ---------- */
.detail-body,
.related,
.cross-emergency,
.safety-tip,
.faq-section,
.other-cats,
.cat-list,
.em-when,
.em-others {
    margin: 32px 0;
}
.detail-body h2,
.related h2,
.cross-emergency h2,
.faq-section h2,
.other-cats h2,
.cat-list h2,
.em-when h2,
.em-others h2 {
    font-family: 'Sora', system-ui, sans-serif;
    font-size: clamp(20px, 2.4vw, 26px);
    margin: 0 0 16px;
    letter-spacing: -0.01em;
}

/* ---------- numbers list ---------- */
.num-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 12px;
}
.num-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 16px;
    align-items: center;
    padding: 18px 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
}
.num-info { display: flex; flex-direction: column; gap: 4px; }
.num-label { font-size: 13px; color: var(--text-3); font-weight: 600; }
.num-value {
    font-family: 'Sora', system-ui, sans-serif;
    font-size: 22px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.01em;
}
.num-note { font-size: 12px; color: var(--text-3); }
.num-actions { display: flex; gap: 8px; }

@media (max-width: 640px) {
    .num-row { grid-template-columns: 1fr; }
    .num-actions { flex-wrap: wrap; }
    .num-actions .btn { flex: 1; }
}

/* ---------- official link + safety tip ---------- */
.official-link {
    margin-top: 16px;
    padding: 12px 16px;
    background: var(--surface-2);
    border-radius: 10px;
    font-size: 14px;
    color: var(--text-2);
}
.official-link a { color: var(--brand); word-break: break-all; }

.safety-tip {
    padding: 20px 24px;
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.24);
    border-radius: 14px;
}
.safety-tip h3 {
    margin: 0 0 8px;
    font-size: 16px;
    color: #ef4444;
    display: flex;
    align-items: center;
    gap: 8px;
}
.safety-tip h3::before {
    content: '⚠';
    font-size: 18px;
}
.safety-tip p { margin: 0; color: var(--text-2); font-size: 14px; }
.safety-tip a { color: #ef4444; font-weight: 600; }

/* ---------- related companies ---------- */
.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 12px;
}
.related-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    transition: border-color .2s, transform .2s;
}
.related-card:hover {
    border-color: var(--brand);
    transform: translateY(-2px);
}
.rc-logo {
    width: 40px; height: 40px;
    border-radius: 10px;
    display: grid; place-items: center;
    color: #fff;
    font-weight: 700;
    font-size: 14px;
    font-family: 'Sora', system-ui, sans-serif;
    flex-shrink: 0;
}
.rc-name { font-weight: 600; font-size: 14px; }
.rc-num { font-size: 12px; color: var(--text-3); margin-top: 2px; }

/* ---------- cross-emergency links ---------- */
.em-links {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 10px;
}
.em-link {
    display: flex;
    flex-direction: column;
    padding: 14px;
    border-radius: 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-left: 3px solid var(--em-color, var(--brand));
    text-decoration: none;
    color: inherit;
    transition: transform .2s;
}
.em-link:hover { transform: translateY(-2px); }
.em-link strong {
    font-family: 'Sora', system-ui, sans-serif;
    font-size: 20px;
    color: var(--em-color, var(--brand));
}
.em-link span { font-size: 12px; color: var(--text-3); }

/* ---------- FAQ on detail pages ---------- */
.faq-item-page {
    padding: 16px 20px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
    margin-bottom: 10px;
}
.faq-item-page summary {
    font-weight: 600;
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    gap: 12px;
}
.faq-item-page summary::-webkit-details-marker { display: none; }
.faq-item-page summary::after {
    content: '+';
    font-size: 20px;
    color: var(--text-3);
    font-weight: 400;
    line-height: 1;
}
.faq-item-page[open] summary::after { content: '−'; }
.faq-item-page .faq-a-inner {
    margin-top: 12px;
    color: var(--text-2);
    font-size: 14px;
    line-height: 1.65;
}
.faq-item-page a { color: var(--brand); }

/* ---------- category page ---------- */
.cat-hero {
    padding: 40px 32px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    margin-bottom: 32px;
    border-left: 4px solid var(--cat-color, var(--brand));
}
.cat-hero .eyebrow {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--cat-color, var(--brand));
    font-weight: 700;
    margin: 0 0 8px;
}
.cat-hero h1 {
    margin: 0 0 12px;
    font-family: 'Sora', system-ui, sans-serif;
    font-size: clamp(24px, 3vw, 36px);
    letter-spacing: -0.02em;
}
.cat-hero .lead {
    margin: 0;
    color: var(--text-2);
    max-width: 72ch;
    font-size: 15px;
}

.cat-list-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
}
.cat-item {
    padding: 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.ci-head {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    text-decoration: none;
    color: inherit;
}
.ci-head h3 { margin: 0 0 4px; font-size: 16px; }
.ci-head p { margin: 0; font-size: 13px; color: var(--text-3); line-height: 1.5; }
.ci-logo {
    width: 42px; height: 42px;
    border-radius: 10px;
    display: grid; place-items: center;
    color: #fff;
    font-weight: 700;
    font-family: 'Sora', system-ui, sans-serif;
    flex-shrink: 0;
}
.ci-numbers {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 12px;
    background: var(--surface-2);
    border-radius: 10px;
}
.ci-num { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 13px; }
.ci-label { color: var(--text-3); }
.ci-value { color: var(--brand); font-weight: 700; text-decoration: none; }
.ci-value:hover { text-decoration: underline; }

/* ---------- other categories ---------- */
.oc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 10px;
}
.oc-card {
    padding: 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    border-top: 3px solid var(--cat-color, var(--brand));
    transition: transform .2s;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.oc-card:hover { transform: translateY(-2px); }
.oc-name { font-weight: 600; font-size: 14px; }
.oc-count { font-size: 12px; color: var(--text-3); }

/* ---------- emergency detail ---------- */
.em-hero {
    text-align: center;
    padding: 40px 24px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    border-top: 4px solid var(--em-color, #ef4444);
}
.em-big-num {
    font-family: 'Sora', system-ui, sans-serif;
    font-size: clamp(60px, 12vw, 120px);
    font-weight: 800;
    color: var(--em-color, #ef4444);
    line-height: 1;
    letter-spacing: -0.04em;
    margin-bottom: 8px;
}
.em-hero h1 { margin: 0 0 12px; font-family: 'Sora'; font-size: clamp(22px, 2.8vw, 32px); }
.em-hero .lead { margin: 0 auto 20px; max-width: 60ch; color: var(--text-2); }
.em-hero .btn-lg { font-size: 16px; padding: 14px 28px; }
.toll-note { margin: 16px 0 0; font-size: 13px; color: var(--text-3); }

/* ---------- ad slots ---------- */
.ad-slot {
    margin: 28px 0;
    min-height: 100px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: transparent;
}
.ad-slot::before {
    content: 'Advertisement';
    position: absolute;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-3);
    opacity: 0.5;
    transform: translateY(-14px);
}
.ad-slot { position: relative; }

/* Only show slots after consent has been granted */
html:not([data-consent="accepted"]) .ad-slot { display: none; }

/* ---------- cookie banner ---------- */
.cookie-banner {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: 16px;
    z-index: 9000;
    background: var(--bg-2);
    border: 1px solid var(--border-strong);
    border-radius: 16px;
    padding: 18px 22px;
    box-shadow: 0 24px 80px rgba(0,0,0,0.55);
    animation: cookieSlide .35s ease both;
}
[data-theme="light"] .cookie-banner {
    background: #ffffff;
}
@keyframes cookieSlide {
    from { transform: translateY(30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}
.cookie-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    max-width: 1100px;
    margin: 0 auto;
    flex-wrap: wrap;
}
.cookie-copy { max-width: 640px; }
.cookie-copy strong { display: block; margin-bottom: 4px; font-size: 14px; }
.cookie-copy p { margin: 0; font-size: 13px; color: var(--text-2); line-height: 1.55; }
.cookie-copy a { color: var(--brand); }
.cookie-actions { display: flex; gap: 8px; flex-wrap: wrap; }

@media (max-width: 640px) {
    .cookie-banner { padding: 14px; left: 8px; right: 8px; bottom: 8px; }
    .cookie-actions { width: 100%; }
    .cookie-actions .btn { flex: 1; }
}

/* ---------- generic static page (privacy/terms/about) ---------- */
.legal-page {
    max-width: 780px;
    margin: 0 auto;
    padding: 20px 0;
}
.legal-page h1 {
    font-family: 'Sora', system-ui, sans-serif;
    font-size: clamp(28px, 3vw, 40px);
    margin: 0 0 12px;
    letter-spacing: -0.02em;
}
.legal-page .updated {
    color: var(--text-3);
    font-size: 13px;
    margin: 0 0 32px;
}
.legal-page h2 {
    font-family: 'Sora', system-ui, sans-serif;
    font-size: 20px;
    margin: 32px 0 12px;
}
.legal-page h3 {
    font-size: 16px;
    margin: 20px 0 8px;
}
.legal-page p, .legal-page li {
    color: var(--text-2);
    font-size: 15px;
    line-height: 1.7;
}
.legal-page ul { padding-left: 20px; }
.legal-page a { color: var(--brand); }

/* ---------- misc ---------- */
.btn-lg {
    padding: 14px 28px;
    font-size: 15px;
}
.btn-ghost.btn-sm { align-self: flex-start; }

/* content-visibility improves rendering perf for below-the-fold sections */
.detail-body,
.related,
.cross-emergency,
.faq-section,
.cat-list,
.other-cats,
.em-others {
    content-visibility: auto;
    contain-intrinsic-size: 400px;
}
