/**
 * Shared base for section / unit pages (hero + functions body).
 * Per-page extras live in assets/css/pages/section-*.css.
 *
 * @package jpd-theme
 */

.jpd-page--section {
    color: var(--jpd-text);
    background: var(--jpd-white);
}

/* ── Hero ─────────────────────────────────────────────────────── */

.jpd-section-hero {
    position: relative;
    overflow: hidden;
    background: var(--jpd-white);
    min-height: clamp(200px, 26vw, 340px);
}

.jpd-section-hero__media {
    display: block;
    width: 100%;
    height: 100%;
    min-height: clamp(200px, 26vw, 340px);
    object-fit: cover;
    object-position: right center;
    pointer-events: none;
    user-select: none;
}

.jpd-section-hero__inner {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-sizing: border-box;
    max-width: var(--jpd-container-max);
    width: 100%;
    margin-inline: auto;
    padding-inline: var(--jpd-container-pad);
    padding-block: clamp(1.25rem, 3vw, 2rem);
    pointer-events: none;
}

.jpd-section-hero__title {
    margin: 0 0 0.65rem;
    max-width: min(36rem, 55%);
    font-family: var(--jpd-font-heading);
    font-size: clamp(1.5rem, 2.8vw + 0.6rem, 2.85rem);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.02em;
    overflow-wrap: break-word;
}

.jpd-section-hero__title-line {
    display: block;
    color: #0b3a74;
}

.jpd-section-hero__title-line--accent {
    color: #b8d400;
}

.jpd-section-hero__subtitle {
    margin: 0;
    max-width: min(36rem, 55%);
    color: #5a5a5a;
    font-size: clamp(0.68rem, 0.35vw + 0.6rem, 0.85rem);
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

/* ── Body ─────────────────────────────────────────────────────── */

.jpd-section-page {
    padding: clamp(2rem, 4vw, 3rem) 0 clamp(2.5rem, 5vw, 4.5rem);
}

.jpd-section-page__content {
    color: #333333;
    font-size: clamp(0.95rem, 0.35vw + 0.85rem, 1.05rem);
    line-height: 1.75;
}

.jpd-section-page__content > *:first-child {
    margin-top: 0;
}

.jpd-section-page__content > *:last-child {
    margin-bottom: 0;
}

.jpd-section-page__content ul {
    margin: 0;
    padding-left: 1.25rem;
    list-style: disc;
}

.jpd-section-page__content li {
    margin: 0 0 1.15rem;
    padding-left: 0.35rem;
}

.jpd-section-page__content li:last-child {
    margin-bottom: 0;
}

.jpd-section-page__content p {
    margin: 0 0 1.15rem;
}

.jpd-section-page__content table {
    max-width: 100%;
}

/* Tablet: keep overlay but give title more room over the white zone */
@media (max-width: 1024px) {
    .jpd-section-hero__title,
    .jpd-section-hero__subtitle {
        max-width: min(28rem, 60%);
    }
}

/* Narrow tablet / large phone: stack title above media so text never clashes */
@media (max-width: 768px) {
    .jpd-section-hero {
        display: flex;
        flex-direction: column;
        min-height: 0;
    }

    .jpd-section-hero__media {
        order: 1;
        width: 100%;
        min-height: clamp(140px, 42vw, 220px);
        max-height: 220px;
        object-position: 72% center;
    }

    .jpd-section-hero__inner {
        position: relative;
        inset: auto;
        order: 0;
        justify-content: flex-start;
        min-height: 0;
        padding-block: 1.5rem 0.75rem;
    }

    .jpd-section-hero__title,
    .jpd-section-hero__subtitle {
        max-width: 100%;
    }

    .jpd-section-page__content ul {
        padding-left: 1.1rem;
    }

    .jpd-section-page__content li {
        margin-bottom: 1rem;
    }
}

@media (max-width: 480px) {
    .jpd-section-hero__media {
        min-height: 130px;
        max-height: 170px;
    }

    .jpd-section-hero__inner {
        padding-block: 1.25rem 0.5rem;
    }

    .jpd-section-hero__subtitle {
        letter-spacing: 0.06em;
    }
}
