/* ============================================================
   Shree Pithad Dham — About / History Page
   Namespace: ab-
   Design system vars & shared classes inherited from custom.css:
   --mp-saffron, --mp-saffron-deep, --mp-maroon, --mp-cream,
   --mp-ink, --mp-gold, --mp-line
   Shared: .mp-page-banner, .mp-section, .mp-section-cream,
           .mp-section-head, .mp-section-title, .mp-lead,
           .mp-eyebrow, .mp-eyebrow-dark, .mp-btn, .mp-btn-primary,
           .mp-btn-ghost, .mp-divider, .mp-card-generic, .mp-facts, .mp-frame
   ============================================================ */


/* ================================================================
   SECTION 1 — Two-column intro
   ================================================================ */

.ab-intro-section {
    background: #fff;
}

.ab-intro-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 56px;
    align-items: center;
}

.ab-intro-heading {
    text-align: left;
    margin-top: 10px;
}

.ab-intro-para {
    color: var(--mp-ink, #2A1A12);
    font-size: 16px;
    line-height: 1.85;
    margin-bottom: 18px;
}

.ab-intro-para strong {
    color: var(--mp-maroon, #6E1E1E);
}

.ab-facts {
    margin-top: 24px;
}

/* Image media */
.ab-intro-media {
    position: relative;
}

/* min-height handled by mp-frame */
.ab-intro-media .mp-frame img {
    min-height: 420px;
    object-position: center;
}

/* gold corner accent line */
.ab-intro-media::before {
    content: '';
    position: absolute;
    top: -14px;
    right: -14px;
    width: 100px;
    height: 100px;
    border-top: 3px solid var(--mp-gold, #C99A3F);
    border-right: 3px solid var(--mp-gold, #C99A3F);
    border-radius: 0 14px 0 0;
    pointer-events: none;
    z-index: 1;
}

.ab-intro-media::after {
    content: '';
    position: absolute;
    bottom: -14px;
    left: -14px;
    width: 100px;
    height: 100px;
    border-bottom: 3px solid var(--mp-gold, #C99A3F);
    border-left: 3px solid var(--mp-gold, #C99A3F);
    border-radius: 0 0 0 14px;
    pointer-events: none;
    z-index: 1;
}

@media (max-width: 991px) {
    .ab-intro-grid {
        grid-template-columns: 1fr;
        gap: 36px;
    }

    /* Image goes below text on mobile */
    .ab-intro-media {
        order: 2;
    }

    .ab-intro-body {
        order: 1;
    }

    .ab-intro-media::before,
    .ab-intro-media::after {
        display: none;
    }
}


/* ================================================================
   SECTION 2 — Stats / fact strip
   ================================================================ */

.ab-stats-section {
    /* uses .mp-section-cream for background */
}

.ab-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.ab-stat-card {
    background: #fff;
    border-radius: 14px;
    padding: 32px 24px 28px;
    text-align: center;
    box-shadow: 0 14px 34px -18px rgba(42, 12, 12, 0.28);
    border-top: 3px solid var(--mp-gold, #C99A3F);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ab-stat-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 22px 44px -16px rgba(42, 12, 12, 0.38);
}

.ab-stat-icon {
    font-size: 18px;
    color: var(--mp-gold, #C99A3F);
    margin-bottom: 12px;
    opacity: 0.7;
}

.ab-stat-value {
    font-family: var(--mp-font-display);
    font-size: 3rem;
    line-height: 1;
    color: var(--mp-saffron, #E8820C);
    margin-bottom: 6px;
}

.ab-stat-value.ab-stat-small {
    font-size: 1.8rem;
}

.ab-stat-label {
    font-family: var(--mp-font-display);
    font-size: 0.92rem;
    color: var(--mp-maroon, #6E1E1E);
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.ab-stat-desc {
    font-size: 14px;
    color: #6a5b52;
    line-height: 1.65;
    margin: 0;
}

@media (max-width: 991px) {
    .ab-stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 18px;
    }
}

@media (max-width: 575px) {
    .ab-stats-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}


/* ================================================================
   SECTION 3 — Deities
   ================================================================ */

.ab-deities-section {
    background: #fff;
}

.ab-deities-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    align-items: start;
}

/* Deity card overrides on top of .mp-card-generic */
.ab-deity-card {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 0;
    overflow: hidden;
}

/* Primary card (Pithad Mataji) gets maroon top border */
.ab-deity-card.ab-deity-primary {
    border-top-color: var(--mp-maroon, #6E1E1E);
}

.ab-deity-img-wrap {
    width: 100%;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    background: var(--mp-cream, #FBF4E9);
}

.ab-deity-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    transition: transform 0.4s ease;
}

.ab-deity-card:hover .ab-deity-img-wrap img {
    transform: scale(1.05);
}

/* Placeholder for non-image deity cards */
.ab-deity-icon-wrap {
    width: 100%;
    aspect-ratio: 4 / 3;
    background: linear-gradient(135deg, var(--mp-cream) 0%, #f0dfc2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.ab-deity-motif {
    font-size: 72px;
    color: var(--mp-gold, #C99A3F);
    opacity: 0.45;
}

.ab-deity-body {
    padding: 24px 24px 28px;
    flex: 1;
}

.ab-deity-eyebrow {
    font-size: 12px;
    margin-bottom: 8px;
}

.ab-deity-name {
    font-family: var(--mp-font-display);
    color: var(--mp-maroon, #6E1E1E);
    font-size: 1.25rem;
    font-weight: 400;
    line-height: 1.3;
    margin: 0 0 14px;
}

.ab-deity-desc {
    font-size: 14.5px;
    color: #6a5b52;
    line-height: 1.75;
    margin: 0;
}

@media (max-width: 991px) {
    .ab-deities-grid {
        grid-template-columns: 1fr;
        max-width: 520px;
        margin: 0 auto;
    }
}

@media (min-width: 576px) and (max-width: 991px) {
    .ab-deities-grid {
        grid-template-columns: repeat(2, 1fr);
        max-width: none;
    }

    .ab-deity-card.ab-deity-primary {
        grid-column: 1 / -1;
    }

    .ab-deity-card.ab-deity-primary .ab-deity-img-wrap {
        aspect-ratio: 16 / 6;
    }
}


/* ================================================================
   SECTION 4 — Vertical Timeline (Our Journey)
   ================================================================ */

.ab-timeline-section {
    /* uses .mp-section-cream */
}

.ab-timeline {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    padding: 20px 0 10px;
}

/* Central vertical rule */
.ab-timeline::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    background: linear-gradient(to bottom,
        transparent 0%,
        var(--mp-gold, #C99A3F) 8%,
        var(--mp-gold, #C99A3F) 92%,
        transparent 100%
    );
}

/* Timeline row */
.ab-timeline-item {
    display: grid;
    grid-template-columns: 1fr 48px 1fr;
    align-items: start;
    gap: 0;
    margin-bottom: 56px;
}

.ab-timeline-item:last-child {
    margin-bottom: 0;
}

/* Content box */
.ab-tl-content {
    background: #fff;
    border-radius: 14px;
    padding: 28px 28px 24px;
    box-shadow: 0 14px 34px -18px rgba(42, 12, 12, 0.26);
    border: 1px solid var(--mp-line, rgba(110, 30, 30, 0.12));
    position: relative;
}

/* Arrow pointing toward center line */
.ab-tl-left .ab-tl-content::after {
    content: '';
    position: absolute;
    top: 30px;
    right: -10px;
    width: 10px;
    height: 10px;
    background: #fff;
    border-right: 1px solid var(--mp-line, rgba(110, 30, 30, 0.12));
    border-top: 1px solid var(--mp-line, rgba(110, 30, 30, 0.12));
    transform: rotate(45deg);
}

.ab-tl-right .ab-tl-content::after {
    content: '';
    position: absolute;
    top: 30px;
    left: -10px;
    width: 10px;
    height: 10px;
    background: #fff;
    border-left: 1px solid var(--mp-line, rgba(110, 30, 30, 0.12));
    border-bottom: 1px solid var(--mp-line, rgba(110, 30, 30, 0.12));
    transform: rotate(45deg);
}

.ab-tl-era {
    display: inline-block;
    font-family: var(--mp-font-display);
    font-size: 11px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--mp-saffron, #E8820C);
    background: rgba(232, 130, 12, 0.08);
    border-radius: 999px;
    padding: 4px 14px;
    margin-bottom: 12px;
}

.ab-tl-heading {
    font-family: var(--mp-font-display);
    color: var(--mp-ink, #2A1A12);
    font-size: 1.2rem;
    font-weight: 400;
    margin: 0 0 12px;
    line-height: 1.3;
}

.ab-tl-body {
    font-size: 14.5px;
    color: #6a5b52;
    line-height: 1.78;
    margin: 0;
}

/* Gold diamond node */
.ab-tl-diamond {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 26px;
    position: relative;
    z-index: 2;
}

.ab-tl-diamond span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--mp-cream, #FBF4E9);
    border: 2px solid var(--mp-gold, #C99A3F);
    border-radius: 50%;
    font-size: 16px;
    color: var(--mp-gold, #C99A3F);
    box-shadow: 0 4px 16px rgba(201, 154, 63, 0.30);
    flex-shrink: 0;
}

/* Spacer column (empty side) */
.ab-tl-spacer {
    /* intentionally empty — occupies the opposite column */
}

/* Left-side items: content | diamond | spacer */
.ab-tl-left {
    grid-template-areas: "content diamond spacer";
}

.ab-tl-left .ab-tl-content  { grid-area: content; }
.ab-tl-left .ab-tl-diamond  { grid-area: diamond; }
.ab-tl-left .ab-tl-spacer   { grid-area: spacer; }

/* Right-side items: spacer | diamond | content */
.ab-tl-right {
    grid-template-areas: "spacer diamond content";
}

.ab-tl-right .ab-tl-spacer  { grid-area: spacer; }
.ab-tl-right .ab-tl-diamond { grid-area: diamond; }
.ab-tl-right .ab-tl-content { grid-area: content; }

/* Highlight the "Today" milestone */
.ab-tl-right:last-child .ab-tl-content {
    border-color: rgba(201, 154, 63, 0.30);
    box-shadow: 0 14px 34px -12px rgba(201, 154, 63, 0.30);
}

.ab-tl-right:last-child .ab-tl-diamond span {
    background: var(--mp-gold, #C99A3F);
    color: #fff;
}

/* ── Mobile: collapse to single-column ── */
@media (max-width: 767px) {
    .ab-timeline::before {
        left: 20px;
    }

    .ab-timeline-item,
    .ab-tl-left,
    .ab-tl-right {
        display: flex;
        flex-direction: row;
        gap: 16px;
        align-items: flex-start;
        grid-template-areas: none;
    }

    .ab-tl-spacer {
        display: none;
    }

    .ab-tl-diamond {
        order: -1;
        flex-shrink: 0;
        padding-top: 0;
        margin-top: 24px;
    }

    .ab-tl-content {
        flex: 1;
    }

    /* Remove arrows on mobile */
    .ab-tl-left .ab-tl-content::after,
    .ab-tl-right .ab-tl-content::after {
        display: none;
    }
}


/* ================================================================
   SECTION 5 — Closing CTA band
   ================================================================ */

.ab-cta-band {
    background: var(--mp-cream, #FBF4E9);
    position: relative;
    padding: 72px 0 80px;
    text-align: center;
    border-top: 3px solid var(--mp-gold, #C99A3F);
    overflow: hidden;
}

/* Subtle radial warm glow */
.ab-cta-band::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 50% 100%, rgba(232, 130, 12, 0.10) 0%, transparent 65%);
    pointer-events: none;
}

.ab-cta-inner {
    position: relative;
    z-index: 1;
    max-width: 680px;
    margin: 0 auto;
}

.ab-cta-eyebrow {
    margin-bottom: 14px;
}

.ab-cta-heading {
    font-family: var(--mp-font-display);
    color: var(--mp-ink, #2A1A12);
    font-size: clamp(28px, 4vw, 44px);
    line-height: 1.15;
    margin: 0 0 18px;
    font-weight: 400;
}

.ab-cta-lead {
    font-size: 16px;
    color: #6a5b52;
    line-height: 1.78;
    margin: 0 0 36px;
}

.ab-cta-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 16px;
}

/* Ghost button on cream background — override for light context */
.ab-cta-band .mp-btn-ghost {
    background: transparent;
    color: var(--mp-maroon, #6E1E1E);
    border: 1px solid var(--mp-maroon, #6E1E1E);
    backdrop-filter: none;
}

.ab-cta-band .mp-btn-ghost:hover {
    background: var(--mp-maroon, #6E1E1E);
    color: #fff;
    transform: translateY(-2px);
}

@media (max-width: 575px) {
    .ab-cta-band {
        padding: 52px 0 60px;
    }

    .ab-cta-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .ab-cta-actions .mp-btn {
        text-align: center;
        justify-content: center;
    }
}

/* Deities without a photograph: ornamental maroon panel instead of an empty box */
.ab-deity-icon-wrap {
    position: relative;
    background:
        radial-gradient(circle at 50% 50%, rgba(201, 154, 63, 0.18) 0%, transparent 60%),
        linear-gradient(160deg, var(--mp-maroon) 0%, var(--mp-maroon-deep, #4A1414) 100%);
    overflow: hidden;
}
.ab-deity-icon-wrap::before {
    content: '';
    position: absolute;
    inset: 12px;
    border: 1px solid rgba(201, 154, 63, 0.45);
    border-radius: 10px;
}
.ab-deity-icon-wrap::after {
    content: '';
    position: absolute;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 1px solid rgba(201, 154, 63, 0.4);
    box-shadow: 0 0 0 18px rgba(201, 154, 63, 0.06), 0 0 0 36px rgba(201, 154, 63, 0.04);
}
.ab-deity-motif {
    position: relative;
    z-index: 1;
    font-size: 0;
    color: var(--mp-gold-soft, #F4C77E);
    opacity: 1;
}
