/* AstroSaathi inner pages: page hero, legal pages, About, Contact, 404. Tokens: as-ui.css. */

/* ============================================================ PAGE HERO */
.as-pagehero {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    background: var(--as-hero-bg);
    border-bottom: 1px solid var(--as-border);
    padding-block: clamp(22px, 3.4vw, 40px) clamp(30px, 4.5vw, 56px);
}

.as-pagehero__grid {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr);
    align-items: center;
    gap: 24px;
    min-height: clamp(150px, 18vw, 230px);
}

.as-pagehero h1 { margin: 6px 0 10px; }
.as-pagehero .as-lead { max-width: 640px; }
.as-pagehero__chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }

.as-pagehero__art {
    position: relative;
    justify-self: end;
    width: min(300px, 100%);
    aspect-ratio: 1 / 1;
    display: grid;
    place-items: center;
}

.as-pagehero__art .as-wheel { width: 100%; animation-duration: 200s; }

.as-emblem {
    position: relative;
    z-index: 1;
    width: 38%;
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: #fff;
    font-size: clamp(1.8rem, 1.2rem + 2vw, 2.8rem);
    background: radial-gradient(circle at 35% 30%, #ffe18a, #ffb000 55%, #e07a00 100%);
    box-shadow: 0 0 0 10px var(--as-primary-soft), 0 18px 46px -16px rgba(255, 150, 0, .85);
}

/* app.min.css paints every .fa-star gold: the daily horoscope's star went gold on gold. */
.as-emblem > i { color: inherit; text-shadow: none; }

:root[data-theme="dark"] .as-emblem {
    background: radial-gradient(circle at 35% 30%, #2a2214, #120f0a 70%);
    color: var(--as-primary);
    border: 2px solid var(--as-primary);
    box-shadow: 0 0 0 10px rgba(247, 196, 64, .07), 0 0 46px -6px rgba(247, 196, 64, .5);
}

.as-pagehero__art .as-orb--violet { width: 34px; height: 34px; left: 6%; top: 10%; }
.as-pagehero__art .as-orb--amber { width: 44px; height: 44px; right: 2%; bottom: 8%; }

@media (max-width: 760px) {
    .as-pagehero__grid { grid-template-columns: minmax(0, 1fr); min-height: 0; }
    .as-pagehero__art {
        position: absolute;
        right: -60px;
        top: -40px;
        width: 220px;
        opacity: .35;
        pointer-events: none;
    }
    .as-pagehero__art .as-emblem,
    .as-pagehero__art .as-orb { display: none; }
}

/* ================================================================ PROSE */
.as-prose { color: var(--as-text-2); line-height: 1.75; font-size: 1rem; overflow-wrap: anywhere; }
.as-prose > *:first-child { margin-top: 0; }
.as-prose > *:last-child { margin-bottom: 0; }
.as-prose p { margin: 0 0 12px; }
.as-prose p:empty { display: none; }
.as-prose h2,
.as-prose h3,
.as-prose h4 { margin: 22px 0 10px; font-weight: 700; }
.as-prose h2 { font-size: 1.35rem; }
.as-prose h3 { font-size: 1.15rem; }
.as-prose ul,
.as-prose ol { padding-left: 1.25em; margin: 0 0 12px; }
.as-prose li { margin: 4px 0; }
.as-prose li::marker { color: var(--as-primary-2); }
.as-prose a { color: var(--as-hl); text-decoration: underline; text-underline-offset: 3px; }
.as-prose strong,
.as-prose b { color: var(--as-text); }
.as-prose img { border-radius: var(--as-radius); height: auto; }
.as-prose table { width: 100%; border-collapse: collapse; margin: 0 0 14px; display: block; overflow-x: auto; }
.as-prose th,
.as-prose td { border: 1px solid var(--as-border); padding: 8px 10px; text-align: left; }
.as-prose blockquote { margin: 0 0 14px; padding: 12px 16px; border-left: 3px solid var(--as-primary); background: var(--as-surface-2); border-radius: 0 12px 12px 0; }

/* ================================================================ LEGAL */
.as-legal {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: clamp(18px, 3vw, 32px);
    align-items: start;
}

.as-toc {
    position: -webkit-sticky;
    position: sticky;
    top: calc(var(--as-header-h) + 18px);
    display: grid;
    gap: 14px;
}

.as-toc nav { padding: 18px 14px; }
.as-toc h2 { font-size: 1.05rem; display: flex; align-items: center; gap: 10px; padding: 0 6px 10px; }
.as-toc h2 i { color: var(--as-primary-2); }
.as-toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; counter-reset: toc; max-height: calc(100vh - var(--as-header-h) - 220px); overflow-y: auto; }
.as-toc li { counter-increment: toc; }

/* The contents list's links (not the help card's button below it). */
.as-toc li > a {
    display: flex;
    gap: 12px;
    padding: 8px 10px;
    border-radius: 10px;
    color: var(--as-text-2);
    text-decoration: none;
    font-size: .9rem;
    line-height: 1.35;
}

.as-toc li > a::before { content: counter(toc, decimal-leading-zero); color: var(--as-muted); font-variant-numeric: tabular-nums; font-weight: 600; }
.as-toc li > a:hover,
.as-toc li > a.is-current { background: var(--as-primary-soft); color: var(--as-text); }
.as-toc li > a.is-current::before { color: var(--as-primary-2); }

.as-help { padding: 18px; text-align: center; display: grid; justify-items: center; gap: 8px; }
.as-help i.as-help__icon { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; font-size: 1.3rem; background: var(--as-primary-soft); color: var(--as-primary-2); }
.as-help p { margin: 0; font-size: .86rem; color: var(--as-muted); }

.as-legal__updated { text-align: right; font-size: .82rem; color: var(--as-muted); margin: 0 0 10px; }
.as-legal__sections { display: grid; gap: 14px; }

.as-lsec {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr);
    gap: 16px;
    padding: clamp(16px, 2.2vw, 24px);
    scroll-margin-top: calc(var(--as-header-h) + 16px);
}

.as-lsec__icon {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--as-primary-soft);
    color: var(--as-primary-2);
    font-size: 1.2rem;
}

.as-lsec h2 { font-size: 1.12rem; font-weight: 700; margin-bottom: 8px; display: flex; gap: 10px; align-items: baseline; }
.as-lsec h2 small { font-size: .95rem; color: var(--as-hl); font-variant-numeric: tabular-nums; }

@media (max-width: 920px) {
    .as-legal { grid-template-columns: minmax(0, 1fr); }
    .as-toc { position: static; }
    .as-toc ol { max-height: none; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .as-toc .as-help { display: none; }
}

@media (max-width: 560px) {
    .as-toc ol { grid-template-columns: minmax(0, 1fr); }
    .as-lsec { grid-template-columns: minmax(0, 1fr); }
    .as-lsec__icon { width: 42px; height: 42px; font-size: 1rem; }
}

/* ================================================================ ABOUT */
.as-story {
    display: grid;
    grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr);
    gap: clamp(20px, 4vw, 48px);
    align-items: start;
}


.as-story__quote {
    position: -webkit-sticky;
    position: sticky;
    top: calc(var(--as-header-h) + 20px);
    min-height: 320px;
    border-radius: var(--as-radius-xl);
    overflow: hidden;
    padding: clamp(24px, 4vw, 44px);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    color: #fff;
    background:
        linear-gradient(180deg, rgba(20, 10, 0, .05), rgba(20, 10, 0, .78)),
        url('../homeimage/astrologer_portrait.webp') center 30% / cover no-repeat;
    box-shadow: var(--as-shadow-lg);
}

.as-story__quote span { font-family: Georgia, serif; font-size: 3.2rem; line-height: .6; color: #ffcf5a; }
.as-story__quote p { font-family: var(--as-font-head); font-size: clamp(1.3rem, 1.1rem + 1vw, 1.8rem); font-weight: 700; line-height: 1.25; margin: 8px 0 0; color: #fff; }

.as-mv { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.as-mv .as-card { display: flex; gap: 18px; align-items: center; padding: 22px; }
.as-mv .as-icon-tile { width: 64px; height: 64px; border-radius: 50%; font-size: 1.5rem; }
.as-mv h3 { font-size: 1.15rem; margin-bottom: 6px; }
.as-mv p { margin: 0; color: var(--as-muted); }

.as-values { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.as-value { text-align: center; padding: 22px 16px; }
.as-value .as-icon-tile { width: 54px; height: 54px; border-radius: 50%; margin-bottom: 12px; }
.as-value h3 { font-size: 1.02rem; margin-bottom: 6px; }
.as-value p { margin: 0; font-size: .88rem; color: var(--as-muted); }

@media (max-width: 900px) {
    .as-story { grid-template-columns: minmax(0, 1fr); }
    .as-story__quote { position: relative; top: 0; min-height: 260px; }
    .as-values { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 600px) {
    .as-mv { grid-template-columns: minmax(0, 1fr); }
}

/* ============================================================== CONTACT */
.as-contact {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
    gap: clamp(16px, 3vw, 28px);
    /* Each card as tall as its own content (stretched, the details card was half empty). */
    align-items: start;
}

.as-contact__info {
    position: relative;
    overflow: hidden;
    padding: clamp(20px, 3vw, 30px);
    background:
        radial-gradient(360px 240px at 100% 100%, rgba(255, 170, 40, .18), transparent 70%),
        var(--as-surface-2);
}

.as-contact__info h2 { font-size: 1.5rem; }
.as-contact__info > p { margin: 4px 0 18px; color: var(--as-muted); }
.as-contact__row { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 16px; }
.as-contact__row i { width: 40px; height: 40px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--as-primary-soft); color: var(--as-hl); }
.as-contact__row div { color: var(--as-text-2); line-height: 1.5; }
.as-contact__row a { color: var(--as-text); font-weight: 600; text-decoration: none; }
.as-contact__row small { display: block; color: var(--as-muted); }

.as-contact form { display: grid; gap: 14px; }
.as-contact .as-form2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.as-contact .as-err { color: var(--as-danger); font-size: .8rem; min-height: 1em; }
.as-contact .alert { display: none; padding: 10px 14px; border-radius: 10px; font-size: .9rem; }
.as-contact .alert-success { display: block; background: var(--as-online-soft); color: var(--as-online); }
.as-contact .alert-danger { display: block; background: var(--as-danger-soft); color: var(--as-danger); }

.as-reach { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.as-reach .as-card { padding: 20px; display: grid; grid-template-rows: auto auto auto 1fr; gap: 8px; align-content: start; }
/* The three buttons on one line, whatever the text above them wraps to. */
.as-reach .as-card > .as-btn { align-self: end; justify-self: start; }
.as-reach .as-icon-tile { border-radius: 50%; }
.as-reach h3 { font-size: 1.05rem; }
.as-reach strong { color: var(--as-text); }
.as-reach p { margin: 0; color: var(--as-muted); font-size: .9rem; }

.as-cta-strip {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    padding: 18px 22px;
    border-radius: var(--as-radius-lg);
    background: var(--as-violet-soft);
    border: 1px solid var(--as-border);
}

.as-cta-strip > i { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: var(--as-violet); color: #fff; font-size: 1.2rem; flex: none; }
.as-cta-strip h3 { font-size: 1.1rem; }
.as-cta-strip p { margin: 2px 0 0; color: var(--as-muted); font-size: .9rem; }
.as-cta-strip .as-row { margin-left: auto; }
/* A longer text shares the row with its button instead of pushing it under. */
.as-cta-strip > div:not(.as-row) { flex: 1 1 320px; min-width: 0; }

@media (max-width: 900px) {
    .as-contact { grid-template-columns: minmax(0, 1fr); }
    .as-reach { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 560px) {
    .as-contact .as-form2 { grid-template-columns: minmax(0, 1fr); }
    .as-cta-strip .as-row { margin-left: 0; width: 100%; }
    .as-cta-strip .as-row .as-btn { flex: 1; }
}

/* ================================================================== 404 */
.as-404 {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, .9fr);
    align-items: center;
    gap: clamp(20px, 4vw, 48px);
    min-height: calc(100vh - var(--as-header-h) - 120px);
}

.as-404__code {
    font-family: var(--as-font-head);
    font-size: clamp(6rem, 4rem + 9vw, 11rem);
    font-weight: 800;
    line-height: .9;
    letter-spacing: -.04em;
    color: var(--as-text);
    display: flex;
    align-items: center;
    gap: .06em;
}

.as-404__moon {
    width: .82em;
    height: .82em;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #fff1b8, #ffc23d 45%, #e58a00 100%);
    box-shadow: 0 0 0 .07em var(--as-text), 0 0 60px -6px rgba(255, 170, 0, .8);
}

.as-404__links { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 24px; max-width: 520px; }
.as-404__links a { display: grid; justify-items: center; gap: 6px; padding: 14px 8px; border-radius: var(--as-radius); border: 1px solid var(--as-border); background: var(--as-surface); color: var(--as-text) !important; text-decoration: none !important; font-weight: 600; font-size: .9rem; }
.as-404__links a i { font-size: 1.3rem; color: var(--as-primary-2); }
.as-404__art { border-radius: var(--as-radius-xl); overflow: hidden; box-shadow: var(--as-shadow-lg); max-width: 520px; justify-self: center; }
.as-404__art img { display: block; width: 100%; height: auto; filter: var(--as-art-filter); }

@media (max-width: 860px) {
    .as-404 { grid-template-columns: minmax(0, 1fr); text-align: center; min-height: 0; }
    .as-404__code { justify-content: center; }
    .as-404__links { margin-inline: auto; }
    .as-404 .as-hero__cta { justify-content: center; }
    .as-404__art { max-width: 360px; }
}

/* ================================================================= BLOG */
.as-blog-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(14px, 2vw, 24px); }

.as-post {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: var(--as-radius-lg);
    background: var(--as-surface);
    border: 1px solid var(--as-border);
    box-shadow: var(--as-shadow);
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.as-post:hover { transform: translateY(-3px); box-shadow: var(--as-shadow-lg); border-color: var(--as-border-2); }
.as-post__media { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--as-surface-3); }
.as-post__media img,
.as-post__media video { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s ease; }
.as-post:hover .as-post__media img { transform: scale(1.04); }
.as-post__body { display: flex; flex-direction: column; gap: 8px; padding: 16px 18px 18px; flex: 1; }
.as-post__meta { display: flex; flex-wrap: wrap; gap: 14px; font-size: .8rem; color: var(--as-muted); }
.as-post__meta i { color: var(--as-primary-2); margin-right: 4px; }
.as-post h2,
.as-post h3 { font-size: 1.08rem; font-weight: 700; line-height: 1.35; }
.as-post h2 a,
.as-post h3 a { color: var(--as-text) !important; text-decoration: none !important; }
.as-post p { margin: 0; color: var(--as-muted); font-size: .9rem; line-height: 1.55; }
.as-post .as-link { margin-top: auto; padding-top: 6px; }

.as-cats { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 24px; }
.as-cats a { padding: 7px 14px; border-radius: var(--as-pill); border: 1px solid var(--as-border); background: var(--as-surface); color: var(--as-text-2) !important; text-decoration: none !important; font-size: .86rem; font-weight: 600; }
/* The picked one as the other picked states (date tabs, sign strip): the gold button, dark ink. */
.as-cats a.is-active { background: var(--as-btn-grad); border-color: transparent; color: var(--as-primary-ink) !important; }

.as-article {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: clamp(18px, 3vw, 36px);
    align-items: start;
}

.as-article h1 { font-size: clamp(1.7rem, 1.2rem + 2vw, 2.6rem); font-weight: 800; letter-spacing: -.02em; line-height: 1.15; }
.as-article__meta { display: flex; flex-wrap: wrap; gap: 16px; margin: 12px 0 18px; color: var(--as-muted); font-size: .88rem; }
.as-article__meta i { color: var(--as-primary-2); margin-right: 6px; }
.as-article__media { border-radius: var(--as-radius-lg); overflow: hidden; margin-bottom: 22px; box-shadow: var(--as-shadow); background: var(--as-surface-3); }
.as-article__media img,
.as-article__media video { width: 100%; height: auto; max-height: 520px; object-fit: cover; display: block; }
.as-article .as-prose { font-size: 1.04rem; }
.as-article .as-prose p { margin-bottom: 14px; }

.as-share { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 26px 0; padding-top: 18px; border-top: 1px solid var(--as-border); }
.as-share strong { margin-right: 4px; }
.as-share a,
.as-share button { width: 38px; height: 38px; border-radius: 50%; display: inline-grid; place-items: center; border: 1px solid var(--as-border); background: var(--as-surface); color: var(--as-text-2) !important; text-decoration: none !important; cursor: pointer; font-size: .95rem; padding: 0; }
.as-share a:hover,
.as-share button:hover { border-color: var(--as-primary); color: var(--as-hl) !important; }

.as-author { display: flex; gap: 16px; align-items: center; padding: 18px; }
.as-author p { margin: 2px 0 0; color: var(--as-muted); font-size: .88rem; }

.as-side { display: grid; gap: 16px; position: -webkit-sticky; position: sticky; top: calc(var(--as-header-h) + 18px); }
.as-side .as-card { padding: 18px; background: var(--as-surface-2); }
.as-side h2 { font-size: 1.15rem; margin-bottom: 12px; }
/* The hover pad reaches out past the card's text edge, so pictures and titles line up with the heading. */
.as-side__post { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 12px; padding: 8px; margin-inline: -8px; border-radius: 12px; text-decoration: none !important; }
.as-side__post:hover { background: var(--as-surface); }
.as-side__post img,
.as-side__post video { width: 76px; height: 64px; border-radius: 10px; object-fit: cover; }
.as-side__post strong { display: block; font-size: .88rem; line-height: 1.35; color: var(--as-text); }
.as-side__post small { color: var(--as-muted); font-size: .76rem; }
.as-side ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.as-side li a { display: flex; justify-content: space-between; gap: 10px; padding: 8px 10px; margin-inline: -10px; border-radius: 10px; color: var(--as-text-2) !important; text-decoration: none !important; font-size: .9rem; }
.as-side li a:hover { background: var(--as-surface); }
.as-side li a span { color: var(--as-muted); }

@media (max-width: 1000px) {
    .as-blog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .as-article { grid-template-columns: minmax(0, 1fr); }
    .as-side { position: static; }
}

@media (max-width: 600px) {
    .as-blog-grid { grid-template-columns: minmax(0, 1fr); }
}

/* ============================================ NEWS (in the news) */
/* An astrologer in the side list: a round photo. */
.as-side__post--person { grid-template-columns: 52px minmax(0, 1fr); align-items: center; }
.as-side__post--person img { width: 52px; height: 52px; border-radius: 50%; }

/* Video cards that open in a pop-up. */
/* Columns of a set width, the row centred: three videos sit under their centred heading. */
.as-videos { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 280px)); justify-content: center; gap: 18px; }
.as-video {
    display: grid;
    gap: 10px;
    padding: 0 0 14px;
    overflow: hidden;
    border: 1px solid var(--as-border);
    border-radius: var(--as-radius-lg);
    background: var(--as-surface);
    color: var(--as-text);
    font: inherit;
    text-align: left;
    cursor: pointer;
    box-shadow: var(--as-shadow);
    transition: transform .2s ease, box-shadow .2s ease;
}
.as-video:hover { transform: translateY(-3px); box-shadow: var(--as-shadow-lg); }
.as-video__thumb { position: relative; display: block; aspect-ratio: 16 / 9; background: var(--as-surface-3); }
.as-video__thumb img { width: 100%; height: 100%; object-fit: cover; }
.as-video__thumb i { position: absolute; inset: 0; margin: auto; width: 54px; height: 54px; display: grid; place-items: center; font-size: 3.2rem; color: #fff; text-shadow: 0 4px 18px rgba(0, 0, 0, .45); }
.as-video__title { padding: 0 14px; font-weight: 600; line-height: 1.35; }
