/**
 * Bhairav Page / Post Generator
 * Frontend Hero — Compact Corporate Editorial System
 *
 * Behaviour:
 * - Desktop: compact image + title-led content
 * - Image never becomes a full-height banner
 * - Hero height follows content naturally
 * - Short titles produce compact heroes
 * - Longer titles can expand the hero naturally
 * - Mobile: image completely hidden
 * - No fixed oversized hero heights
 */


/* =========================================================
   HERO ROOT
========================================================= */

.bams-ppg-hero {
    --ppg-charcoal: #252a30;
    --ppg-muted: #687078;
    --ppg-gold: #b4872d;
    --ppg-gold-dark: #936b20;
    --ppg-warm: #f6f5f2;
    --ppg-line: #dedbd4;
    --ppg-white: #ffffff;

    position: relative;
    isolation: isolate;

    width: 100%;
    max-width: 1440px;
    min-width: 0;

    margin: 0 auto;

    overflow: hidden;

    background: var(--ppg-white);
}


/* =========================================================
   HERO INNER
========================================================= */

.bams-ppg-hero-inner {
    position: relative;

    display: grid;

    width: 100%;
    min-width: 0;

    min-height: 0;

    align-items: stretch;
}


/* =========================================================
   SPLIT LAYOUT
========================================================= */

.bams-ppg-hero-layout-split_left
.bams-ppg-hero-inner,

.bams-ppg-hero-layout-split_right
.bams-ppg-hero-inner {
    grid-template-columns:
        minmax(0, 46%)
        minmax(0, 54%);
}


/* =========================================================
   FULL WIDTH / CONTAINED
========================================================= */

.bams-ppg-hero-layout-full_width
.bams-ppg-hero-inner,

.bams-ppg-hero-layout-contained
.bams-ppg-hero-inner {
    grid-template-columns: 1fr;
}


.bams-ppg-hero-layout-contained
.bams-ppg-hero-inner {
    max-width: 1240px;

    margin: 0 auto;
}


/* =========================================================
   CONTENT PANEL
========================================================= */

.bams-ppg-hero-content {
    position: relative;
    z-index: 4;

    display: flex;
    flex-direction: column;

    justify-content: center;
    align-items: flex-start;

    min-width: 0;
    min-height: 0;

    /*
     * Compact vertical padding.
     * The content itself determines the hero height.
     */
    padding:
        42px
        clamp(28px, 4vw, 24px);

    overflow: hidden;

    background: var(--ppg-warm);

    box-sizing: border-box;
}


/* =========================================================
   DECORATIVE CONTENT GEOMETRY
========================================================= */

.bams-ppg-hero-content::before {
    content: "";

    position: absolute;

    top: 0;
    right: -100px;
    bottom: 0;

    width: 220px;

    z-index: -1;

    pointer-events: none;

    background:
        linear-gradient(
            112deg,
            transparent 0 44%,
            rgba(180,135,45,.09) 44.2% 49%,
            transparent 49.2% 100%
        );
}


.bams-ppg-hero-content::after {
    content: "";

    position: absolute;

    top: 0;
    right: 0;

    width: 2px;
    height: 100%;

    background:
        linear-gradient(
            to bottom,
            transparent,
            rgba(180,135,45,.70) 20%,
            rgba(180,135,45,.70) 80%,
            transparent
        );

    opacity: .7;
}


/* =========================================================
   EYEBROW
========================================================= */

.bams-ppg-hero-eyebrow {
    position: relative;
    z-index: 5;

    display: inline-flex;
    align-items: center;

    gap: 12px;

    width: auto;
    max-width: 100%;

    margin: 0 0 15px;
    padding: 0;

    border: 0;
    border-radius: 0;

    color: var(--ppg-muted);

    background: transparent;

    font-size: 11px;
    line-height: 1.3;
    font-weight: 700;

    letter-spacing: .15em;

    text-transform: uppercase;
}


.bams-ppg-hero-eyebrow::before {
    content: "";

    width: 40px;
    height: 2px;

    flex: 0 0 40px;

    background: var(--ppg-gold);
}


/* =========================================================
   TITLE
========================================================= */

.bams-ppg-hero-title {
    position: relative;
    z-index: 5;

    width: 100%;
    max-width: 680px;

    margin: 0 !important;
    padding: 0 !important;

    color: var(--ppg-charcoal) !important;

    font-size:
        clamp(36px, 3.8vw, 58px) !important;

    line-height: 1.04 !important;

    font-weight: 760 !important;

    letter-spacing: -.043em;

    text-wrap: balance;
}


/* =========================================================
   TITLE GOLD RULE
========================================================= */

.bams-ppg-hero-title::after {
    content: "";

    display: block;

    width: 54px;
    height: 3px;

    margin-top: 18px;

    background: var(--ppg-gold);
}


/* =========================================================
   INTRODUCTION
========================================================= */

.bams-ppg-hero-introduction {
    position: relative;
    z-index: 5;

    max-width: 620px;

    margin: 18px 0 0;

    color: var(--ppg-muted);

    font-size: 16px;

    line-height: 1.65;

    font-weight: 400;
}


.bams-ppg-hero-introduction p {
    margin: 0;
}


/* =========================================================
   HERO ACTIONS
========================================================= */

.bams-ppg-hero-actions {
    position: relative;
    z-index: 5;

    display: flex;
    flex-wrap: wrap;

    gap: 10px;

    margin-top: 22px;
}


.bams-ppg-hero-action {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    min-height: 46px;

    padding: 0 22px;

    border: 1px solid var(--ppg-gold);
    border-radius: 2px;

    color: #ffffff !important;

    background: var(--ppg-gold);

    box-shadow: none;

    font-size: 14px;
    line-height: 1;

    font-weight: 700;

    letter-spacing: .02em;

    text-decoration: none !important;

    transition:
        transform .2s ease,
        background .2s ease,
        border-color .2s ease;
}


.bams-ppg-hero-action::after {
    content: "→";

    margin-left: 10px;

    font-size: 16px;
    line-height: 1;
}


.bams-ppg-hero-action:hover,
.bams-ppg-hero-action:focus-visible {
    color: #ffffff !important;

    background: var(--ppg-gold-dark);

    border-color: var(--ppg-gold-dark);

    transform: translateY(-1px);
}


.bams-ppg-hero-action-secondary {
    color: var(--ppg-charcoal) !important;

    background: transparent;
}


.bams-ppg-hero-action-secondary:hover,
.bams-ppg-hero-action-secondary:focus-visible {
    color: var(--ppg-charcoal) !important;

    background: #ebe8e0;

    border-color: var(--ppg-gold);
}


/* =========================================================
   VISUAL PANEL
   COMPACT — DOES NOT STRETCH TO FULL HERO HEIGHT
========================================================= */

.bams-ppg-hero-media {
    position: relative;

    align-self: center;

    width: 100%;

    /*
     * The image is deliberately compact.
     * It cannot become a giant vertical banner.
     */
    aspect-ratio: 16 / 8.5;

    height: auto;

    max-height: 330px;

    margin: 0;

    overflow: hidden;

    background: #e9e7e1;

    box-sizing: border-box;
}


/* =========================================================
   IMAGE LEFT TRANSITION
========================================================= */

.bams-ppg-hero-media::before {
    content: "";

    position: absolute;

    top: 0;
    left: -2px;

    z-index: 3;

    width: 88px;
    height: 100%;

    pointer-events: none;

    background:
        linear-gradient(
            116deg,
            var(--ppg-warm) 0 31%,
            transparent 31.5% 100%
        );
}


.bams-ppg-hero-media::after {
    content: "";

    position: absolute;

    top: 0;
    left: 0;

    z-index: 4;

    width: 6px;
    height: 100%;

    pointer-events: none;

    background:
        linear-gradient(
            to bottom,
            transparent 0 8%,
            var(--ppg-gold) 8% 28%,
            transparent 28% 72%,
            var(--ppg-gold) 72% 92%,
            transparent 92%
        );
}


.bams-ppg-hero-media-featured {
    background: #dedbd4;
}


/* =========================================================
   HERO IMAGE
========================================================= */

.bams-ppg-hero-image {
    display: block;

    width: 100% !important;
    height: 100% !important;

    max-width: none !important;

    object-fit: cover;

    object-position: center;

    filter:
        saturate(.88)
        contrast(1.03);

    transform: scale(1.01);

    transition: transform .6s ease;
}


.bams-ppg-hero:hover
.bams-ppg-hero-image {
    transform: scale(1.025);
}


/* =========================================================
   ABSTRACT FALLBACK
========================================================= */

.bams-ppg-hero-media-abstract {
    display: flex;

    align-items: stretch;
    justify-content: stretch;

    background:
        linear-gradient(
            135deg,
            #d9d6cf 0 23%,
            transparent 23.2% 100%
        ),
        linear-gradient(
            112deg,
            #f0eee9 0 47%,
            #d0ccc3 47.2% 48%,
            #363b40 48.2% 100%
        );
}


.bams-ppg-hero-media-abstract::before {
    width: 140px;

    background:
        linear-gradient(
            116deg,
            var(--ppg-warm) 0 29%,
            transparent 29.5% 100%
        );
}


.bams-ppg-hero-abstract-mark {
    position: absolute;

    right: 10%;
    top: 50%;

    width: min(300px, 52%);

    aspect-ratio: 1;

    transform: translateY(-50%);

    border: 1px solid rgba(180,135,45,.65);

    background:
        linear-gradient(
            90deg,
            transparent 49.7%,
            rgba(180,135,45,.65) 50%,
            transparent 50.3%
        ),
        linear-gradient(
            0deg,
            transparent 49.7%,
            rgba(180,135,45,.65) 50%,
            transparent 50.3%
        );
}


.bams-ppg-hero-abstract-mark::before,
.bams-ppg-hero-abstract-mark::after {
    content: "";

    position: absolute;

    border: 1px solid rgba(255,255,255,.38);
}


.bams-ppg-hero-abstract-mark::before {
    inset: 13%;
}


.bams-ppg-hero-abstract-mark::after {
    inset: 28%;

    border-color: rgba(180,135,45,.72);
}


/* =========================================================
   SPLIT ORDER
========================================================= */

.bams-ppg-hero-layout-split_left
.bams-ppg-hero-content {
    order: 1;
}


.bams-ppg-hero-layout-split_left
.bams-ppg-hero-media {
    order: 2;
}


.bams-ppg-hero-layout-split_right
.bams-ppg-hero-media {
    order: 1;
}


.bams-ppg-hero-layout-split_right
.bams-ppg-hero-content {
    order: 2;
}


/* =========================================================
   RIGHT IMAGE TRANSITION
========================================================= */

.bams-ppg-hero-layout-split_right
.bams-ppg-hero-media::before {
    left: auto;
    right: -2px;

    transform: scaleX(-1);
}


/* =========================================================
   ALIGNMENT
========================================================= */

.bams-ppg-hero-align-center
.bams-ppg-hero-content {
    align-items: center;

    text-align: center;
}


.bams-ppg-hero-align-center
.bams-ppg-hero-eyebrow {
    justify-content: center;
}


/* =========================================================
   OVERLAYS
========================================================= */

.bams-ppg-hero-overlay-light
.bams-ppg-hero-media-featured::after,

.bams-ppg-hero-overlay-medium
.bams-ppg-hero-media-featured::after,

.bams-ppg-hero-overlay-strong
.bams-ppg-hero-media-featured::after {
    content: "";

    position: absolute;

    inset: 0;

    z-index: 2;

    pointer-events: none;
}


.bams-ppg-hero-overlay-light
.bams-ppg-hero-media-featured::after {
    background: rgba(37,42,48,.04);
}


.bams-ppg-hero-overlay-medium
.bams-ppg-hero-media-featured::after {
    background: rgba(37,42,48,.10);
}


.bams-ppg-hero-overlay-strong
.bams-ppg-hero-media-featured::after {
    background: rgba(37,42,48,.18);
}


/* =========================================================
   HEIGHT MODES
   Legacy settings retained.
   They affect padding only, not fixed height.
========================================================= */

.bams-ppg-hero-height-auto
.bams-ppg-hero-inner,

.bams-ppg-hero-height-compact
.bams-ppg-hero-inner,

.bams-ppg-hero-height-standard
.bams-ppg-hero-inner,

.bams-ppg-hero-height-large
.bams-ppg-hero-inner {
    min-height: 0;
}


.bams-ppg-hero-height-auto
.bams-ppg-hero-content,

.bams-ppg-hero-height-compact
.bams-ppg-hero-content,

.bams-ppg-hero-height-standard
.bams-ppg-hero-content,

.bams-ppg-hero-height-large
.bams-ppg-hero-content,

.bams-ppg-hero-height-auto
.bams-ppg-hero-media,

.bams-ppg-hero-height-compact
.bams-ppg-hero-media,

.bams-ppg-hero-height-standard
.bams-ppg-hero-media,

.bams-ppg-hero-height-large
.bams-ppg-hero-media {
    min-height: 0;
}


/* =========================================================
   HEIGHT MODE PADDING
========================================================= */

.bams-ppg-hero-height-auto
.bams-ppg-hero-content {
    padding-top: 34px;
    padding-bottom: 34px;
}


.bams-ppg-hero-height-compact
.bams-ppg-hero-content {
    padding-top: 12px;
    padding-bottom: 12px;
}


.bams-ppg-hero-height-standard
.bams-ppg-hero-content {
    padding-top: 12px;
    padding-bottom: 12px;
}


.bams-ppg-hero-height-large
.bams-ppg-hero-content {
    padding-top: 12px;
    padding-bottom: 12px;
}


/* =========================================================
   FULL WIDTH / CONTAINED
========================================================= */

.bams-ppg-hero-layout-full_width
.bams-ppg-hero-inner,

.bams-ppg-hero-layout-contained
.bams-ppg-hero-inner {
    display: block;
}


.bams-ppg-hero-layout-full_width
.bams-ppg-hero-content,

.bams-ppg-hero-layout-contained
.bams-ppg-hero-content {
    min-height: 0;
}


.bams-ppg-hero-layout-full_width
.bams-ppg-hero-media,

.bams-ppg-hero-layout-contained
.bams-ppg-hero-media {
    width: 100%;

    max-width: 100%;

    margin: 0 auto;

    aspect-ratio: 16 / 8.5;

    min-height: 0;
}


/* =========================================================
   TABLET
========================================================= */

@media (max-width: 1100px) {

    .bams-ppg-hero-layout-split_left
    .bams-ppg-hero-inner,

    .bams-ppg-hero-layout-split_right
    .bams-ppg-hero-inner {
        grid-template-columns:
            minmax(0, 48%)
            minmax(0, 52%);
    }


    .bams-ppg-hero-content {
        padding:
            36px
            30px;
    }


    .bams-ppg-hero-title {
        font-size:
            clamp(34px, 4.5vw, 50px) !important;
    }


    .bams-ppg-hero-media {
        max-height: 290px;
    }


    .bams-ppg-hero-introduction {
        font-size: 15.5px;

        line-height: 1.6;
    }
}


/* =========================================================
   MOBILE
   IMAGE IS COMPLETELY HIDDEN
========================================================= */

@media (max-width: 820px) {

    .bams-ppg-hero-layout-split_left
    .bams-ppg-hero-inner,

    .bams-ppg-hero-layout-split_right
    .bams-ppg-hero-inner {
        display: block;
    }


    .bams-ppg-hero-media {
        display: none !important;
    }


    .bams-ppg-hero-content {
        width: 100%;

        min-height: 0;

        padding:
            34px
            28px
            38px;

        box-sizing: border-box;
    }


    .bams-ppg-hero-title {
        max-width: 100%;

        font-size:
            clamp(34px, 7vw, 48px) !important;

        line-height: 1.05 !important;

        letter-spacing: -.04em;
    }


    .bams-ppg-hero-title::after {
        width: 48px;
        height: 3px;

        margin-top: 18px;
    }


    .bams-ppg-hero-eyebrow {
        margin-bottom: 14px;

        font-size: 10px;

        letter-spacing: .13em;
    }


    .bams-ppg-hero-eyebrow::before {
        width: 32px;

        flex-basis: 32px;
    }


    .bams-ppg-hero-introduction {
        max-width: 100%;

        margin-top: 17px;

        font-size: 16px;

        line-height: 1.62;
    }


    .bams-ppg-hero-actions {
        margin-top: 20px;
    }


    /*
     * Prevent legacy height settings from creating
     * large mobile hero areas.
     */
    .bams-ppg-hero-height-auto
    .bams-ppg-hero-content,

    .bams-ppg-hero-height-compact
    .bams-ppg-hero-content,

    .bams-ppg-hero-height-standard
    .bams-ppg-hero-content,

    .bams-ppg-hero-height-large
    .bams-ppg-hero-content {
        min-height: 0;

        padding-top: 34px;
        padding-bottom: 38px;
    }
}


/* =========================================================
   SMALL MOBILE
========================================================= */

@media (max-width: 560px) {

    .bams-ppg-hero-content {
        padding:
            28px
            20px
            32px;
    }


    .bams-ppg-hero-eyebrow {
        gap: 9px;

        margin-bottom: 13px;

        font-size: 9.5px;

        letter-spacing: .12em;
    }


    .bams-ppg-hero-eyebrow::before {
        width: 28px;

        flex-basis: 28px;
    }


    .bams-ppg-hero-title {
        font-size:
            clamp(32px, 10.5vw, 44px) !important;

        line-height: 1.06 !important;

        letter-spacing: -.038em;
    }


    .bams-ppg-hero-title::after {
        width: 44px;
        height: 3px;

        margin-top: 16px;
    }


    .bams-ppg-hero-introduction {
        margin-top: 16px;

        font-size: 15.5px;

        line-height: 1.6;
    }


    .bams-ppg-hero-actions {
        width: 100%;

        margin-top: 20px;
    }


    .bams-ppg-hero-action {
        width: 100%;

        min-height: 46px;
    }
}


/* =========================================================
   VERY SMALL MOBILE
========================================================= */

@media (max-width: 380px) {

    .bams-ppg-hero-content {
        padding:
            24px
            16px
            28px;
    }


    .bams-ppg-hero-title {
        font-size:
            clamp(30px, 10.5vw, 40px) !important;
    }


    .bams-ppg-hero-eyebrow {
        font-size: 9px;
    }
}