/* ==========================================================
   UIP Page Header  (.uip-ph)
   ========================================================== */

/* ── Base ── */
.uip-ph {
    position: relative;
    overflow: hidden;
    background: #0d1f3c;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
}

/* ── Grid pattern overlay (animated) ── */
.uip-ph::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    animation: uipPhGrid 20s linear infinite;
    z-index: 1;
    pointer-events: none;
}

@keyframes uipPhGrid {
    0% {
        background-position: 0 0;
    }

    100% {
        background-position: 60px 60px;
    }
}

/* ── Dark overlay (gradient + bg photo tint) ── */
.uip-ph__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(12, 87, 168, 0.88) 0%, rgba(13, 31, 60, 0.96) 100%);
    z-index: 0;
}

/* ── Inner container ── */
.uip-ph__inner {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    padding-top: 48px;
    padding-bottom: 48px;
    width: 100%;
    max-width: var(--max-width, 1200px);
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--row-padding, 10px);
    padding-right: var(--row-padding, 10px);
    box-sizing: border-box;
}

/* ── Content ── */
.uip-ph__content {
    flex: 1;
    min-width: 0;
    max-width: 650px;
}

/* Center alignment */
.uip-ph--center .uip-ph__inner {
    flex-direction: column;
    text-align: center;
}

.uip-ph--center .uip-ph__label {
    justify-content: center;
}

.uip-ph--center .uip-ph__content {
    flex: none;
    max-width: 650px;
}

/* ── Height variants ── */
.uip-ph--sm {
    min-height: 240px;
}

.uip-ph--md {
    min-height: 360px;
}

.uip-ph--lg {
    min-height: 480px;
}

/* ── Label ── */
.uip-ph__label {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 16px;
}

.uip-ph__label::before {
    content: '';
    display: inline-block;
    width: 28px;
    height: 2px;
    background: var(--color-accent, #40B026);
    flex-shrink: 0;
}

/* ── Word animation ── */
@keyframes uip-ph-enter {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.uip-ph__title .uip-word {
    display: inline-block;
    will-change: transform, opacity;
}

/* ── Title ── */
.uip-ph__title {
    font-size: clamp(1.75rem, 3.5vw, 2.75rem);
    font-weight: 800;
    line-height: 1.15;
    color: #fff;
    margin: 0 0 16px;
}

.uip-ph__accent {
    color: var(--color-accent, #40B026);
}

/* ── Description ── */
.uip-ph__desc {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.72);
    line-height: 1.6;
    margin: 0;
    max-width: 520px;
}

.uip-ph--center .uip-ph__desc {
    max-width: 100%;
}

/* ── Right-side image ── */
.uip-ph__media {
    flex: 0 0 var(--uip-ph-iw, 45%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.uip-ph__image {
    max-width: 100%;
    max-height: 400px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 16px 32px rgba(0, 0, 0, 0.35));
    will-change: transform;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}

/* ── Responsive ── */
@media (max-width: 850px) {
    .uip-ph__content {
        max-width: 530px;
    }

    .uip-ph__inner {
        flex-direction: column;
        text-align: center;
        padding-top: 32px;
        padding-bottom: 32px;
    }

    .uip-ph__label {
        justify-content: center;
    }

    .uip-ph__title {
        margin: 20px 0 20px;
    }

    .uip-ph__desc {
        font-size: 0.75rem;
        margin: 0 auto;
        max-width: 420px !important;
    }

    .uip-ph__media {
        flex: none;
        width: var(--uip-ph-iw-md, var(--uip-ph-iw, 100%));
        overflow: visible;
        padding-bottom: 8px;
    }

    .uip-ph__image {
        max-height: 180px;
    }
}

@media (max-width: 550px) {
    .uip-ph__content {
        max-width: 530px;
    }

    .uip-ph__desc {
        max-width: 320px !important;
    }

    .uip-ph__media {
        width: var(--uip-ph-iw-sm, var(--uip-ph-iw-md, var(--uip-ph-iw, 100%)));
    }
}

@media (max-width: 549px) {
    .uip-ph--sm {
        min-height: auto;
    }

    .uip-ph--md {
        min-height: auto;
    }

    .uip-ph__title {
        font-size: 1.6rem;
    }
}