/* AFCMall v1.3.5 — Proportional premium Promo media */

/* ------------------------------------------------------------------
   Promo list cards: ratio follows the actual image instead of forcing
   one fixed crop box.
------------------------------------------------------------------ */
.promo-card-media {
    display: grid !important;
    place-items: center;
    width: 100%;
    height: auto !important;
    min-height: 250px;
    aspect-ratio: 4 / 3;
    padding: 12px !important;
    overflow: hidden;
    isolation: isolate;
    background:
        radial-gradient(circle at 16% 12%, rgba(201,162,39,.16), transparent 31%),
        linear-gradient(145deg, #fafbfc, #edf1f5) !important;
}

.promo-card-media::before {
    content: "";
    position: absolute;
    z-index: -1;
    inset: 0;
    background:
        linear-gradient(125deg, rgba(255,255,255,.68), transparent 48%),
        radial-gradient(circle at 90% 100%, rgba(16,43,74,.08), transparent 42%);
    pointer-events: none;
}

.promo-card-media.is-portrait {
    aspect-ratio: 4 / 5;
    max-height: 470px;
}

.promo-card-media.is-square {
    aspect-ratio: 1 / 1;
    max-height: 420px;
}

.promo-card-media.is-landscape {
    aspect-ratio: 16 / 10;
    max-height: 360px;
}

.promo-card-media img {
    display: block;
    width: 100% !important;
    height: 100% !important;
    max-width: 100%;
    max-height: 100%;
    padding: 0 !important;
    object-fit: contain !important;
    object-position: center !important;
    border-radius: 15px;
    background: transparent !important;
    box-shadow: 0 12px 30px rgba(12,31,55,.08);
}

.promo-card:hover .promo-card-media img {
    transform: scale(1.008) !important;
}

/* ------------------------------------------------------------------
   Detail image: no fixed-height viewport. The image keeps its natural
   ratio and is only constrained by sensible maximum dimensions.
------------------------------------------------------------------ */
.promo-detail-image {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: fit-content !important;
    max-width: min(100%, 1020px) !important;
    min-width: min(100%, 340px);
    min-height: 260px;
    height: auto !important;
    max-height: none !important;
    aspect-ratio: auto !important;
    margin: 0 auto !important;
    padding: clamp(10px, 1.4vw, 16px) !important;
    overflow: hidden;
    isolation: isolate;
    border: 1px solid rgba(20,44,73,.12);
    border-radius: 26px;
    background:
        radial-gradient(circle at 14% 10%, rgba(201,162,39,.14), transparent 30%),
        linear-gradient(145deg, #fbfbfa, #edf1f4) !important;
    box-shadow:
        0 26px 74px rgba(11,30,53,.13),
        inset 0 1px 0 rgba(255,255,255,.86);
}

.promo-detail-image::before {
    content: "";
    position: absolute;
    z-index: -1;
    inset: 0;
    background:
        linear-gradient(120deg, rgba(255,255,255,.70), transparent 48%),
        radial-gradient(circle at 92% 100%, rgba(15,43,75,.08), transparent 40%);
    pointer-events: none;
}

.promo-detail-image img {
    display: block !important;
    width: auto !important;
    height: auto !important;
    max-width: min(100%, 980px) !important;
    max-height: min(68vh, 680px) !important;
    object-fit: contain !important;
    object-position: center !important;
    border-radius: 16px;
    background: transparent !important;
    box-shadow: 0 14px 36px rgba(10,27,49,.10);
}

.promo-detail-image.is-portrait {
    max-width: min(100%, 650px) !important;
}

.promo-detail-image.is-portrait img {
    max-width: min(100%, 610px) !important;
    max-height: min(68vh, 680px) !important;
}

.promo-detail-image.is-square {
    max-width: min(100%, 760px) !important;
}

.promo-detail-image.is-square img {
    max-width: min(100%, 720px) !important;
}

.promo-detail-image.is-landscape {
    max-width: min(100%, 1020px) !important;
}

.promo-detail-image.is-media-error {
    width: min(100%, 760px) !important;
    height: 360px !important;
}

/* ------------------------------------------------------------------
   Video section: no generic card padding around the player. The stage
   reaches the section edges, while native video follows its own ratio.
------------------------------------------------------------------ */
.promo-video-section {
    width: min(100%, 1050px) !important;
    padding: 0 !important;
    overflow: hidden;
    border: 1px solid rgba(18,42,72,.11);
    border-radius: 26px;
    background: #08192c;
    box-shadow: 0 25px 68px rgba(8,27,49,.18);
}

.promo-video-section-head {
    position: relative;
    z-index: 4;
    padding: 24px 28px 18px;
    color: #fff;
    background:
        radial-gradient(circle at 92% 15%, rgba(201,162,39,.16), transparent 30%),
        linear-gradient(135deg, #0a203a, #153352);
}

.promo-video-section-head .promo-eyebrow {
    margin-bottom: 7px;
    color: #e3c871;
}

.promo-video-section-head h2 {
    margin: 0;
    color: #fff;
    font-size: clamp(22px, 3vw, 32px);
}

.promo-video-stage {
    --promo-video-poster: none;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 280px;
    padding: 0;
    overflow: hidden;
    isolation: isolate;
    background:
        radial-gradient(circle at 50% 50%, rgba(43,75,108,.65), transparent 64%),
        #061422;
}

.promo-video-stage::before {
    content: "";
    position: absolute;
    z-index: -2;
    inset: -28px;
    background-image: var(--promo-video-poster);
    background-position: center;
    background-size: cover;
    filter: blur(24px) saturate(.82);
    opacity: .34;
    transform: scale(1.08);
    pointer-events: none;
}

.promo-video-stage::after {
    content: "";
    position: absolute;
    z-index: -1;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(3,14,27,.78), rgba(3,14,27,.25) 48%, rgba(3,14,27,.78)),
        linear-gradient(180deg, rgba(4,17,31,.30), rgba(4,17,31,.70));
    pointer-events: none;
}

.promo-video-stage.is-landscape {
    padding: 0;
}

.promo-video-stage.is-square,
.promo-video-stage.is-portrait {
    padding: clamp(14px, 2.6vw, 28px);
}

.promo-video-frame {
    position: relative !important;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 100%;
    max-width: 100%;
    max-height: min(72vh, 650px);
    margin: 0 auto !important;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.15);
    border-radius: 0;
    background: #050f1b;
    box-shadow: 0 20px 52px rgba(0,0,0,.30);
}

.promo-video-frame--iframe {
    width: 100% !important;
    aspect-ratio: 16 / 9 !important;
    border: 0;
    border-radius: 0;
}

.promo-video-frame--native {
    width: min(100%, 980px);
    aspect-ratio: 16 / 9;
    border-radius: 18px;
    transition: width .24s ease, aspect-ratio .24s ease, border-radius .24s ease;
}

.promo-video-stage.is-landscape .promo-video-frame--native {
    width: 100%;
    max-width: 100%;
    border-width: 0;
    border-radius: 0;
}

.promo-video-frame iframe,
.promo-video-frame video {
    position: absolute !important;
    inset: 0;
    display: block;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    border: 0;
    object-fit: contain !important;
    object-position: center !important;
    background: #040d17;
}

.promo-video-frame.is-loading::after {
    content: "Memuat video…";
    position: absolute;
    z-index: 3;
    left: 50%;
    bottom: 18px;
    padding: 8px 12px;
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 999px;
    color: rgba(255,255,255,.84);
    background: rgba(4,15,28,.72);
    font-size: 12px;
    font-weight: 700;
    transform: translateX(-50%);
    backdrop-filter: blur(8px);
    pointer-events: none;
}

.promo-video-frame:not(.is-loading)::after {
    display: none;
}

.promo-video-error {
    border-radius: inherit;
}

/* Information content stays aligned with the media width. */
.promo-description,
.promo-cta-panel {
    width: min(100%, 1050px) !important;
    margin-inline: auto !important;
}

/* ------------------------------------------------------------------
   Responsive refinements
------------------------------------------------------------------ */
@media (max-width: 760px) {
    .promo-card-media {
        min-height: 220px;
        max-height: none;
        padding: 9px !important;
    }

    .promo-card-media.is-portrait {
        aspect-ratio: 4 / 5;
    }

    .promo-detail-image {
        max-width: 100% !important;
        min-width: 0;
        min-height: 220px;
        padding: 8px !important;
        border-radius: 19px;
    }

    .promo-detail-image img,
    .promo-detail-image.is-portrait img,
    .promo-detail-image.is-square img {
        max-width: 100% !important;
        max-height: min(72vh, 600px) !important;
        border-radius: 13px;
    }

    .promo-video-section {
        border-radius: 19px;
    }

    .promo-video-section-head {
        padding: 20px 18px 15px;
    }

    .promo-video-stage.is-square,
    .promo-video-stage.is-portrait {
        padding: 12px;
    }

    .promo-video-frame--native {
        max-height: min(72vh, 600px);
        border-radius: 13px;
    }
}

@media (max-width: 440px) {
    .promo-detail-image img,
    .promo-detail-image.is-portrait img,
    .promo-detail-image.is-square img {
        max-height: 66vh !important;
    }

    .promo-video-stage {
        min-height: 220px;
    }

    .promo-video-section-head h2 {
        font-size: 23px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .promo-video-frame--native {
        transition: none;
    }
}
