/*
 * SBN Developer Notes.
 * Scope: inner page header, hero media, breadcrumbs, page intro bands.
 * Used by: membership, events, members, contact, sponsorship, articles, and custom pages.
 * Edit risk: high; many templates share these classes.
 * QA: pages with and without hero images, long titles, mobile stacking.
 */

/* ==========================================================================
   PAGE HEADER (Section opener)
   ========================================================================== */

.sbn-page-header,
.sbn-inner-hero {
    background: var(--sbn-navy);
    padding: var(--sbn-inner-hero-space-top) var(--sbn-dynamic-edge) var(--sbn-inner-hero-space-bottom);
    position: relative;
    overflow: hidden;
    min-height: 420px;
    color: var(--sbn-cream);
}

/* Page header with optional image (two-column layout) */
.sbn-page-header--with-image,
.sbn-inner-hero--with-image {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 56px;
}

.sbn-page-header-content,
.sbn-inner-hero__content {
    flex: 0 0 48%;
    max-width: 55%;
    position: relative;
    z-index: 3;
}

.sbn-page-header-media,
.sbn-inner-hero__media {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: var(--sbn-page-header-media-left, 30%);
    z-index: 1;
    max-width: none;
    pointer-events: none;
}

.sbn-page-header-media img,
.sbn-inner-hero__media img {
    position: absolute;
    inset: 0;
    width: 80%;
    max-width: none;
    height: 100%;
    object-fit: cover;
    object-position: var(--sbn-page-header-image-position, center right);
    border-radius: 0;
    transform: none;
    transition: none;
}

/* Eyebrow + Gold rule label (section opener) */
.sbn-section-label {
    font-family: var(--sbn-sans);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.26em;
    text-transform: uppercase;
    color: var(--sbn-gold);
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.sbn-section-label::before {
    content: "";
    display: block;
    width: 72px;
    height: 3px;
    background: var(--sbn-gold);
    border-radius: 2px;
}

/* Headings in page header */
.sbn-page-header h1,
.sbn-page-header h2,
.sbn-page-header--with-image h1,
.sbn-page-header--with-image h2,
.sbn-inner-hero__title,
.sbn-page-header .wp-block-post-title {
    font-family: var(--sbn-serif);
    font-size: clamp(42px, 5vw, 60px);
    color: var(--sbn-cream);
    font-weight: 400;
    line-height: 1.15;
    margin: 0 0 20px;
}

.sbn-page-header h1 em,
.sbn-page-header h2 em,
.sbn-page-header--with-image h1 em,
.sbn-page-header--with-image h2 em,
.sbn-inner-hero__title em {
    font-style: italic;
    color: var(--sbn-gold);
}

/* Descriptive paragraph in page header */
.sbn-page-header p,
.sbn-page-header--with-image p,
.sbn-inner-hero__subtitle {
    font-size: 16px;
    color: rgba(245, 239, 227, 0.7);
    max-width: 520px;
    margin: 0;
    line-height: 1.6;
}

/* Responsive: tablet and below */
@media (max-width: 1239px) {
    .sbn-page-header,
    .sbn-inner-hero {
        padding: var(--sbn-inner-hero-space-top) var(--sbn-dynamic-edge) var(--sbn-inner-hero-space-bottom);
        min-height: 280px;
    }

    .sbn-page-header-media,
    .sbn-inner-hero__media {
        left: var(--sbn-page-header-media-left-tablet, 34%);
    }
}

@media (max-width: 992px) {
    .sbn-page-header--with-image,
    .sbn-inner-hero--with-image {
        flex-direction: column;
        text-align: center;
        gap: 40px;
    }

    .sbn-page-header-content,
    .sbn-inner-hero__content {
        flex: 1;
        max-width: 100%;
        text-align: center;
    }

    .sbn-page-header p,
    .sbn-inner-hero__subtitle {
        margin-left: auto;
        margin-right: auto;
    }

    .sbn-page-header-media,
    .sbn-inner-hero__media {
        position: relative;
        top: auto;
        right: auto;
        bottom: auto;
        left: auto;
        width: 100%;
        max-width: 100%;
        overflow: hidden;
        pointer-events: auto;
    }

    .sbn-page-header-media img,
    .sbn-inner-hero__media img {
        position: relative;
        right: auto;
        bottom: auto;
        width: 100%;
        max-width: 100%;
        height: auto;
        object-fit: initial;
        object-position: initial;
        transform: none;
        border-radius: 14px;
    }

    .sbn-section-label {
        justify-content: center;
    }

    .sbn-section-label::before {
        display: none;
    }
}

/* Mobile */
@media (max-width: 767px) {
    .sbn-page-header,
    .sbn-inner-hero {
        padding: var(--sbn-inner-hero-space-top) var(--sbn-dynamic-edge) var(--sbn-inner-hero-space-bottom);
        min-height: auto;
    }

    .sbn-page-header h1,
    .sbn-page-header h2,
    .sbn-inner-hero__title {
        font-size: clamp(32px, 4vw, 44px);
        margin-bottom: 16px;
    }

    .sbn-page-header p,
    .sbn-inner-hero__subtitle {
        font-size: 15px;
    }
}

@media (max-width: 768px) {
    .sbn-page-header--with-image,
    .sbn-inner-hero--with-image {
        display: flex;
        flex-direction: column;
        gap: var(--sbn-space-sm);
    }

    .sbn-page-header-content,
    .sbn-inner-hero__content {
        order: 1;
        width: 100%;
        max-width: none;
    }

    .sbn-page-header-media,
    .sbn-inner-hero__media {
        order: 2;
        width: 100%;
        max-width: none;
    }

    .sbn-page-header-media img,
    .sbn-inner-hero__media img {
        width: 100%;
        max-height: 360px;
        object-fit: cover;
        border-radius: var(--sbn-radius-card);
    }

    .sbn-page-header h1,
    .sbn-page-header h2,
    .sbn-inner-hero__title {
        font-size: clamp(2rem, 7vw, 2.75rem);
    }

    .sbn-page-header p,
    .sbn-inner-hero__subtitle {
        font-size: 16px;
    }
}
