/* ==========================================================================
   Holiday Program Detail Widget (hpd-)
   ========================================================================== */

/* ---------- Header ---------- */

.hpd-header {
    margin-bottom: 28px;
}

.hpd-header-title {
    margin: 0;
    color: var(--iabt-text-heading, var(--iabt-text-primary, hsl(222, 47%, 11%)));
}

.hpd-header-subtitle {
    margin: 12px 0 0;
    color: var(--iabt-text-secondary, hsl(215, 19%, 35%));
    font-family: var(--iabt-font-family, 'Inter', system-ui, sans-serif);
    font-size: var(--iabt-text-base, 1rem);
    font-weight: var(--iabt-font-regular, 400);
    line-height: var(--iabt-line-height-body, 1.6);
    max-width: 58ch;
    display: inline-block;
    vertical-align: top;
}

/* Layout — two-column flex */
.hpd-layout {
    display: flex;
    gap: 32px;
    align-items: stretch;
}

.hpd-gallery {
    flex: 0 0 55%;
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
}

.hpd-info-card {
    flex: 1;
    min-width: 0;
    background: var(--iabt-bg-main, #fff);
    border: 1px solid var(--iabt-border, hsl(214, 32%, 91%));
    border-radius: 18px;
    padding: 32px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

/* ---------- Gallery grid ---------- */

.hpd-gallery-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: var(--iabt-bg-soft, hsl(216, 45%, 98%));
}

.hpd-gallery-item img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hpd-gallery-item--primary {
    aspect-ratio: 16 / 9;
}

.hpd-gallery-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.hpd-gallery-item--secondary {
    aspect-ratio: 16 / 9;
}

/* ---------- Video overlay ---------- */

.hpd-video-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
}

.hpd-video-poster {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hpd-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    background: var(--iabt-overlay-bg);
    color: var(--iabt-bg-main);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
    z-index: 2;
    padding: 0;
}

.hpd-play-btn svg {
    width: 50%;
    height: 50%;
}

.hpd-play-btn:hover {
    background: var(--iabt-overlay-hover);
    transform: translate(-50%, -50%) scale(1.08);
}

.hpd-video-player {
    display: none;
    position: absolute;
    inset: 0;
    z-index: 3;
}

.hpd-video-player iframe,
.hpd-video-player video {
    width: 100%;
    height: 100%;
    border: 0;
}

/* Playing state — hide poster and play button, show player */
.hpd-video-wrapper.is-playing .hpd-video-poster,
.hpd-video-wrapper.is-playing .hpd-play-btn {
    display: none;
}

.hpd-video-wrapper.is-playing .hpd-video-player {
    display: block;
}

/* ---------- Title ---------- */

.hpd-title {
    margin: 0 0 24px;
    font-family: var(--iabt-font-family, 'Inter', system-ui, sans-serif);
    font-weight: var(--iabt-font-bold, 700);
    line-height: 1.25;
    color: var(--iabt-text-primary, hsl(222, 47%, 11%));
}

h1.hpd-title { font-size: var(--iabt-h1, 2.75rem); }
h2.hpd-title { font-size: var(--iabt-h2, 2rem); }
h3.hpd-title { font-size: var(--iabt-h3, 1.5rem); }
h4.hpd-title { font-size: var(--iabt-h4, 1.25rem); }
h5.hpd-title { font-size: var(--iabt-h5, 1.125rem); }
h6.hpd-title { font-size: var(--iabt-h6, 1rem); }

/* ---------- Metadata list ---------- */

.hpd-meta-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 28px;
    align-items: start;
}

.hpd-meta-item {
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: 6px;
    row-gap: 2px;
}

.hpd-meta-item > i,
.hpd-meta-item > svg {
    grid-column: 1;
    grid-row: 1;
    align-self: center;
    flex: 0 0 auto;
    font-size: var(--iabt-text-sm, 0.875rem);
    color: var(--iabt-primary, hsl(214, 83%, 26%));
}

.hpd-meta-item > svg {
    width: var(--iabt-text-sm, 0.875rem);
    height: var(--iabt-text-sm, 0.875rem);
    fill: var(--iabt-primary, hsl(214, 83%, 26%));
}

.hpd-meta-label {
    grid-column: 2;
    grid-row: 1;
    font-family: var(--iabt-font-family, 'Inter', system-ui, sans-serif);
    font-size: var(--iabt-text-sm, 0.875rem);
    font-weight: var(--iabt-font-medium, 500);
    color: var(--iabt-text-primary, hsl(222, 47%, 11%));
    line-height: 1;
}

.hpd-meta-value {
    grid-column: 2;
    grid-row: 2;
    font-family: var(--iabt-font-family, 'Inter', system-ui, sans-serif);
    font-size: var(--iabt-text-xs, 0.75rem);
    font-weight: var(--iabt-font-medium, 500);
    color: var(--iabt-text-secondary, hsl(215, 19%, 35%));
    line-height: 1.3;
    text-transform: capitalize;
    letter-spacing: 0.04em;
}

/* ---------- Apply button ---------- */

.hpd-apply {
    margin-top: auto;
    padding-top: 8px;
    display: flex;
}

.hpd-apply-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.hpd-apply-btn--fit {
    width: auto;
}

/* ---------- Responsive ---------- */

/* Tablet (<=991px): stack vertically */
@media (max-width: 991px) {
    .hpd-layout {
        flex-direction: column;
    }

    .hpd-gallery {
        flex: 0 0 auto !important;
        width: 100%;
    }

    .hpd-info-card {
        width: 100%;
    }
}

/* Mobile (<=767px): tighter spacing */
@media (max-width: 767px) {
    h1.hpd-header-title { font-size: var(--iabt-h2); }
    h2.hpd-header-title { font-size: var(--iabt-h3); }
    h3.hpd-header-title { font-size: var(--iabt-h4); }
    h4.hpd-header-title { font-size: var(--iabt-h5); }
    h5.hpd-header-title { font-size: var(--iabt-h6); }
    h6.hpd-header-title { font-size: var(--iabt-h6); }

    .hpd-header {
        margin-bottom: 20px;
    }

    .hpd-header-subtitle {
        margin-top: 10px;
    }

    .hpd-layout {
        gap: 20px;
    }

    .hpd-gallery {
        gap: 10px;
    }

    .hpd-gallery-row {
        gap: 10px;
    }

    .hpd-info-card {
        padding: 20px;
        border-radius: 14px;
    }

    .hpd-title {
        margin-bottom: 18px;
    }

    .hpd-meta-list {
        grid-template-columns: 1fr;
        gap: 12px;
        margin-bottom: 20px;
    }

    .hpd-play-btn {
        width: 48px;
        height: 48px;
    }

    .hpd-gallery-item {
        border-radius: 10px;
    }
}
