/* ==========================================================================
   Page template: Meie ajalugu
   ========================================================================== */

.pv-history-page {
    display: block;
}

/* ── Hero ── */

.pv-history-hero {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    min-height: calc(480px * var(--pv-ui-scale));
    /* Fallback when no background image is set. */
    background: var(--wp--preset--color--primary-blue, #0068ff);
}

/* Full-opacity background image; cat kept visible on the right. */
.pv-history-hero__background {
    position: absolute;
    inset: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: right center;
}

/* Blue gradient: solid on the left for readable text, clear on the right. */
.pv-history-hero__overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(
        to right,
        rgba(0, 104, 255, 0.78) 0%,
        rgba(0, 104, 255, 0.45) 40%,
        rgba(0, 104, 255, 0.12) 72%,
        rgba(0, 104, 255, 0) 100%
    );
}

.pv-history-hero__inner {
    position: relative;
    z-index: 2;
    width: 100%;
    padding: calc(80px * var(--pv-ui-scale)) calc(58px * var(--pv-ui-scale));
}

.pv-history-hero__title {
    font-family: var(--wp--preset--font-family--plus-jakarta-sans, 'Plus Jakarta Sans', sans-serif);
    font-weight: 700;
    font-size: clamp(calc(42px * var(--pv-ui-scale)), 5vw, calc(62px * var(--pv-ui-scale)));
    line-height: 1.1;
    letter-spacing: -0.03em;
    color: #ffffff;
    margin: 0;
}

.pv-history-hero__text {
    font-family: var(--wp--preset--font-family--inter, 'Inter', sans-serif);
    font-size: calc(18px * var(--pv-ui-scale));
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.92);
    max-width: calc(520px * var(--pv-ui-scale));
    margin: calc(20px * var(--pv-ui-scale)) 0 0;
}

/* ── Content body (reserved for future blocks) ── */

.pv-history-page__body {
    padding: calc(64px * var(--pv-ui-scale)) calc(58px * var(--pv-ui-scale)) calc(80px * var(--pv-ui-scale));
}

/* ── Responsive ── */

@media (max-width: 1280px) {
    .pv-history-hero__inner {
        padding: calc(72px * var(--pv-ui-scale)) calc(40px * var(--pv-ui-scale));
    }

    .pv-history-page__body {
        padding: calc(56px * var(--pv-ui-scale)) calc(40px * var(--pv-ui-scale)) calc(72px * var(--pv-ui-scale));
    }
}

@media (max-width: 900px) {
    .pv-history-hero {
        min-height: calc(380px * var(--pv-ui-scale));
    }

    .pv-history-hero__background {
        object-position: 72% center;
    }

    .pv-history-hero__overlay {
        background: linear-gradient(
            to right,
            rgba(0, 104, 255, 0.8) 0%,
            rgba(0, 104, 255, 0.5) 55%,
            rgba(0, 104, 255, 0.18) 100%
        );
    }

    .pv-history-hero__inner {
        padding: calc(56px * var(--pv-ui-scale)) calc(24px * var(--pv-ui-scale));
    }

    .pv-history-page__body {
        padding: calc(48px * var(--pv-ui-scale)) calc(24px * var(--pv-ui-scale)) calc(64px * var(--pv-ui-scale));
    }
}

@media (max-width: 600px) {
    .pv-history-hero {
        min-height: calc(320px * var(--pv-ui-scale));
    }

    .pv-history-hero__background {
        object-position: 78% center;
    }

    .pv-history-hero__overlay {
        background: linear-gradient(
            to right,
            rgba(0, 104, 255, 0.84) 0%,
            rgba(0, 104, 255, 0.5) 100%
        );
    }

    .pv-history-hero__inner {
        padding: calc(44px * var(--pv-ui-scale)) calc(16px * var(--pv-ui-scale));
    }

    .pv-history-hero__text {
        font-size: calc(16px * var(--pv-ui-scale));
        max-width: 100%;
    }

    .pv-history-page__body {
        padding: calc(32px * var(--pv-ui-scale)) calc(16px * var(--pv-ui-scale)) calc(48px * var(--pv-ui-scale));
    }
}
