/* Skin ngày 28 — CHỈ section.hero-slider (mobile-first)
 * base <744 → 744 (iPad Mini 6 vật lý = 744 CSS px; DevTools hay 768)
 *   → 992 → 1440 → 1600 → 2560
 *
 * Ảnh Admin: mobile <1440; PC ≥1440.
 * Mobile gốc (style.css) ẩn .hero-slider .quick-access-bar và dùng sticky cố định
 * → đè / đẩy search. Skin này: bật lại QA trong hero, ẩn sticky, search cách QA 25px.
 *
 * Tablet ≥744 tham khảo Figma 2160:50374 (không copy toàn bộ): QA bottom/side 24, h≈120,
 * item glass riêng, search max 600, gap search→QA = 25px.
 */
@import url('./commemorative.css');

body.event-theme-ngay-28 {
    --hero-layout-max: 100%;
    --header-height: 72px;
    --hero-qa-side: 12px;
    --hero-qa-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    --hero-stack-gap: 25px; /* khoảng cách search ↔ QA */
    --hero-qa-h: 110px; /* fallback; JS đo lại offsetHeight */
    --hero-qa-icon: 44px;
    --hero-qa-icon-img: 24px;
    --hero-qa-label: clamp(9px, 2.3vw, 11px);
    --hero-qa-radius: 18px;
    --hero-qa-item-radius: 16px;
    --hero-qa-gap: 2px;
    --hero-qa-pad: 10px 6px;
    --hero-qa-glass: rgba(255, 255, 255, 0.28);
    --hero-qa-glass-border: rgba(255, 255, 255, 0.5);
    --hero-qa-item-glass: rgba(255, 255, 255, 0.24);
    --hero-search-max-w: min(92vw, 560px);
    --hero-search-height: 48px;
    --hero-search-radius: 50px;
    --hero-search-blur: 12px;
    --hero-search-bg: rgba(255, 255, 255, 0.3);
    --hero-search-shadow: 0 4px 20px rgba(0, 0, 0, 0.28);
    --hero-search-font: 15px;
    --hero-search-btn-pad-x: 18px;
    --hero-search-btn-grad: linear-gradient(135deg, #fb1a1a 0%, #9a1515 55%, #701b1b 100%);
}

/* —— iPad Mini vật lý ≥744 (Mini 6 = 744×1133; giả lập hay 768) —— */
@media (min-width: 744px) {
    body.event-theme-ngay-28 {
        --hero-layout-max: 100%;
        --hero-qa-side: 24px;
        --hero-qa-bottom: calc(20px + env(safe-area-inset-bottom, 0px));
        --hero-qa-h: 88px;
        --hero-stack-gap: 20px;
        --hero-qa-icon: 40px;
        --hero-qa-icon-img: 22px;
        --hero-qa-label: 10px;
        --hero-qa-radius: 20px;
        --hero-qa-item-radius: 12px;
        --hero-qa-gap: 10px;
        --hero-qa-pad: 0;
        --hero-search-max-w: min(560px, 72vw);
        --hero-search-height: 48px;
        --hero-search-btn-pad-x: 28px;
        --hero-search-font: 15px;
        --hero-search-blur: 16px;
    }
}

@media (min-width: 992px) {
    body.event-theme-ngay-28 {
        --hero-layout-max: 1320px;
        --hero-qa-side: 4%;
        --hero-qa-bottom: calc(20px + env(safe-area-inset-bottom, 0px));
        --hero-qa-h: 88px;
        --hero-qa-icon: 40px;
        --hero-qa-icon-img: 22px;
        --hero-qa-label: 10px;
        --hero-qa-gap: 12px;
        --hero-stack-gap: 20px;
        --hero-search-max-w: min(560px, 48vw);
        --hero-search-height: 48px;
        --hero-search-btn-pad-x: 28px;
        --hero-search-font: 15px;
    }
}

@media (min-width: 1600px) {
    body.event-theme-ngay-28 {
        --hero-layout-max: 1440px;
        --hero-search-max-w: min(600px, 40vw);
        --hero-qa-h: 92px;
        --hero-qa-icon: 44px;
        --hero-qa-icon-img: 24px;
    }

    body.event-theme-ngay-28 .hero-slider {
        background-size: contain !important;
    }
}

@media (min-width: 2560px) {
    body.event-theme-ngay-28 {
        --header-height: 88px;
        --hero-layout-max: 1680px;
        --hero-qa-side: 5%;
        --hero-qa-bottom: calc(3vh + env(safe-area-inset-bottom, 0px));
        --hero-qa-h: 9.5vh;
        --hero-qa-icon: 48px;
        --hero-qa-icon-img: 26px;
        --hero-qa-label: 11px;
        --hero-qa-gap: 14px;
        --hero-stack-gap: 24px;
        --hero-search-max-w: min(720px, 28vw);
        --hero-search-height: 52px;
        --hero-search-font: 17px;
        --hero-search-btn-pad-x: 44px;
    }
}

/* Sticky mobile (ngoài hero) đè search — tắt khi dùng QA trong hero */
body.event-theme-ngay-28 .sticky-quick-access-bar {
    display: none !important;
}

/* ═══════════════ HERO SLIDER ═══════════════ */
/* Mobile <744 */
body.event-theme-ngay-28 .hero-slider {
    position: relative !important;
    height: 100% !important;
    min-height: 420px !important;
    max-height: none !important;
    transition: none !important;
    background-color: #00122e;
    background-image: var(--hero-bg-mobile, var(--hero-bg-desktop, var(--hero-bg, none)));
    background-position: top center !important;
    background-size: contain !important;
    background-repeat: no-repeat;
    display: block !important;
    align-items: unset !important;
    justify-content: unset !important;
    overflow: hidden;
    z-index: 20;
    box-sizing: border-box;
    padding: 0 !important;
}

@media (min-width: 744px) {
    body.event-theme-ngay-28 {
        --header-height: 80px;
    }

    /* iPad Mini 6 vật lý ≥744 — ảnh mobile từ Admin */
    body.event-theme-ngay-28 .hero-slider {
        background-image: var(--hero-bg-mobile, var(--hero-bg-desktop, var(--hero-bg, none))) !important;
        background-size: cover !important;
        background-repeat: no-repeat !important;
        margin-top: 0;
        height: auto !important;
        max-height: none !important;
        min-height: 544px !important;
        background-position: 0 calc(0px - var(--header-height)) !important;
    }

    body.event-theme-ngay-28 .hero-slider .hero-search-form {
        --hero-qa-bottom: calc(20px + env(safe-area-inset-bottom, 0px));
    }

    body.event-theme-ngay-28 .hero-slider .quick-access-bar {
        --hero-qa-bottom: calc(20px + env(safe-area-inset-bottom, 0px));
    }
}

@media (min-width: 768px) {
    body.event-theme-ngay-28 .hero-slider {
        min-height: 544px !important;
    }

    body.event-theme-ngay-28 .hero-slider .hero-search-form {
        --hero-qa-bottom: calc(20px + env(safe-area-inset-bottom, 0px));
    }

    body.event-theme-ngay-28 .hero-slider .quick-access-bar {
        --hero-qa-bottom: calc(20px + env(safe-area-inset-bottom, 0px));
    }
}

@media (min-width: 992px) {
    body.event-theme-ngay-28 .hero-slider {
        background-image: var(--hero-bg-mobile, var(--hero-bg-desktop, var(--hero-bg, none))) !important;
        background-size: cover !important;
        background-repeat: no-repeat !important;
        margin-top: 0;
        height: auto !important;
        max-height: none !important;
        min-height: 700px !important;
        background-position: center center !important;
    }

    body.event-theme-ngay-28 .hero-slider .hero-search-form {
        --hero-qa-bottom: calc(20px + env(safe-area-inset-bottom, 0px));
    }

    body.event-theme-ngay-28 .hero-slider .quick-access-bar {
        --hero-qa-bottom: calc(20px + env(safe-area-inset-bottom, 0px));
    }
}

@media (min-width: 1200px) {
    body.event-theme-ngay-28 .hero-slider {
        min-height: 100vh !important;
        max-height: 100vh !important;
        background-image: var(--hero-bg-mobile, var(--hero-bg-desktop, var(--hero-bg, none))) !important;
        background-position: center center !important;
        background-size: cover !important;
    }

    body.event-theme-ngay-28 .hero-slider .hero-search-form,
    body.event-theme-ngay-28 .hero-slider .quick-access-bar {
        --hero-qa-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
    }
}

/* Overlay title 2560 — CHỈ ≥1440; mobile không hiện (JS cũng không tạo DOM) */
body.event-theme-ngay-28 .hero-slider .event-28-wide-title {
    display: none !important;
    position: absolute;
    left: 50%;
    top: clamp(12%, calc(var(--header-height) + 6%), 22%);
    transform: translateX(-50%);
    z-index: 2;
    width: min(560px, 38vw);
    max-width: 90%;
    margin: 0;
    padding: 0;
    pointer-events: none;
    justify-content: center;
    align-items: flex-start;
}

body.event-theme-ngay-28 .hero-slider .event-28-wide-title img {
    width: 100%;
    height: auto;
    max-height: min(420px, 42vh);
    object-fit: contain;
    display: block;
}

/* ≥1440: ảnh PC Admin + hiện overlay title do JS chèn */
@media (min-width: 1440px) {
    body.event-theme-ngay-28 .hero-slider {
        height: min(100vh, calc(100vw * 900 / 1920)) !important;
        min-height: min(100vh, calc(100vw * 900 / 1920)) !important;
        max-height: 100vh !important;
        background-image: var(--hero-bg-desktop, var(--hero-bg, none)) !important;
        background-position: center center !important;
        background-size: cover !important;
    }

    body.event-theme-ngay-28 .hero-slider .event-28-wide-title {
        display: flex !important;
    }
}

/* QHD 27" 2560×1440 — full viewport (đè rule 1440 aspect); size kế thừa contain từ ≥1600 */
@media (min-width: 2560px) {
    body.event-theme-ngay-28 .hero-slider {
        height: 100vh !important;
        min-height: 100vh !important;
        max-height: 100vh !important;
        background-image: var(--hero-bg-desktop, var(--hero-bg, none)) !important;
        background-position: center center !important;
        background-size: contain !important;
    }

    body.event-theme-ngay-28 .hero-slider .hero-search-form,
    body.event-theme-ngay-28 .hero-slider .quick-access-bar {
        --hero-qa-bottom: calc(3vh + env(safe-area-inset-bottom, 0px));
    }

    body.event-theme-ngay-28 .hero-slider .event-28-wide-title {
        top: clamp(10%, calc(var(--header-height) + 4%), 18%);
        width: min(720px, 28vw);
    }

    body.event-theme-ngay-28 .hero-slider .event-28-wide-title img {
        max-height: min(520px, 40vh);
    }
}

body.event-theme-ngay-28 .hero-slider .hero-background {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    z-index: 0 !important;
}

body.event-theme-ngay-28 .hero-slider .hero-overlay {
    background: linear-gradient(
        180deg,
        rgba(0, 18, 46, 0.2) 0%,
        transparent 45%,
        rgba(0, 18, 46, 0.4) 100%
    );
}

body.event-theme-ngay-28 .hero-slider .hero-greeting,
body.event-theme-ngay-28 .hero-slider .hero-greeting .greeting-icon,
body.event-theme-ngay-28 .hero-slider .hero-greeting .greeting-welcome,
body.event-theme-ngay-28 .hero-slider .hero-greeting .greeting-text {
    display: none !important;
}

body.event-theme-ngay-28 .hero-slider .hero-under-search-banner,
body.event-theme-ngay-28 .hero-slider .banner-event {
    display: none !important;
}

/* Khung neo cho search */
body.event-theme-ngay-28 .hero-slider > .hero-content.container,
body.event-theme-ngay-28 .hero-slider .hero-content {
    position: absolute !important;
    left: 50% !important;
    top: 0 !important;
    bottom: 0 !important;
    transform: translateX(-50%) !important;
    z-index: 5;
    width: 100% !important;
    max-width: var(--hero-layout-max) !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    display: block !important;
    box-sizing: border-box;
    pointer-events: none;
}

body.event-theme-ngay-28 .hero-slider .hero-content .hero-search-form {
    pointer-events: auto;
}

/* Search — absolute, cách đỉnh QA đúng --hero-stack-gap (JS cập nhật --hero-qa-h) */
body.event-theme-ngay-28 .hero-slider .hero-search-form {
    position: absolute !important;
    left: 50%;
    right: auto;
    top: auto !important;
    bottom: calc(var(--hero-qa-bottom) + var(--hero-qa-h) + var(--hero-stack-gap)) !important;
    transform: translateX(-50%);
    width: var(--hero-search-max-w);
    height: var(--hero-search-height);
    max-width: calc(100% - 30px);
    margin: 0 !important;
    padding: 0 !important;
    z-index: 6;
    overflow: visible;
    box-sizing: border-box;
    display: block !important;
}

body.event-theme-ngay-28 .hero-slider .hero-search-form .search-input-wrapper {
    background: var(--hero-search-bg);
    backdrop-filter: blur(var(--hero-search-blur));
    -webkit-backdrop-filter: blur(var(--hero-search-blur));
    border: none !important;
    border-radius: var(--hero-search-radius);
    box-shadow: var(--hero-search-shadow);
    overflow: hidden;
    height: 100% !important;
    min-height: 0 !important;
    max-height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    position: relative;
    box-sizing: border-box;
}

body.event-theme-ngay-28 .hero-slider .hero-search-form .search-input-wrapper:focus-within {
    box-shadow: var(--hero-search-shadow);
}

body.event-theme-ngay-28 .hero-slider #heroSearchDropdown,
body.event-theme-ngay-28 .hero-slider .hero-search-dropdown,
body.event-theme-ngay-28 .hero-slider .hero-search-form > div[id="heroSearchDropdown"] {
    z-index: 30 !important;
    background: #fff;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    border-radius: 12px;
    color: #1f2937;
}

body.event-theme-ngay-28 .hero-slider .hero-search-form .search-icon {
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
}

body.event-theme-ngay-28 .hero-slider .hero-search-form .search-icon path {
    stroke: #ffffff !important;
}

body.event-theme-ngay-28 .hero-slider .hero-search-form .hero-search-input {
    padding: 0 16px 0 48px !important;
    height: 100% !important;
    min-height: 0 !important;
    margin: 0 !important;
    border: none !important;
    font-size: var(--hero-search-font) !important;
    font-weight: 400;
    line-height: 1 !important;
    color: #ffffff !important;
    caret-color: #ffffff;
    align-self: stretch;
    box-sizing: border-box;
}

body.event-theme-ngay-28 .hero-slider .hero-search-form .hero-search-input::placeholder {
    color: #ffffff !important;
    opacity: 0.95 !important;
}

body.event-theme-ngay-28 .hero-slider .search-submit-btn {
    background: var(--hero-search-btn-grad) !important;
    background-image: var(--hero-search-btn-grad) !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 0 var(--hero-search-radius) var(--hero-search-radius) 0 !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.18) !important;
    padding: 0 var(--hero-search-btn-pad-x) !important;
    height: 100% !important;
    min-height: 0 !important;
    margin: 0 !important;
    font-size: var(--hero-search-font) !important;
    font-weight: 600;
    line-height: 1 !important;
    white-space: nowrap;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    align-self: stretch;
    flex-shrink: 0;
    transform: none !important;
    box-sizing: border-box;
}

body.event-theme-ngay-28 .hero-slider .search-submit-btn:hover {
    background: linear-gradient(135deg, #e01010 0%, #5a1515 100%) !important;
    background-image: linear-gradient(135deg, #e01010 0%, #5a1515 100%) !important;
    color: #ffffff !important;
    transform: none !important;
}

/* QA trong hero — BẮT BUỘC hiện trên mobile (style.css đang display:none) */
body.event-theme-ngay-28 .hero-slider .quick-access-bar {
    display: block !important;
    position: absolute !important;
    left: var(--hero-qa-side) !important;
    right: var(--hero-qa-side) !important;
    bottom: var(--hero-qa-bottom) !important;
    top: auto !important;
    z-index: 4;
    width: auto !important;
    max-width: var(--hero-layout-max) !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 auto !important;
    background: transparent !important;
    padding: 0 !important;
    padding-bottom: 0 !important;
    transform: none !important;
    animation: none !important;
    opacity: 1 !important;
    visibility: visible !important;
    border-radius: 0 !important;
}

body.event-theme-ngay-28 .hero-slider .quick-access-bar .container {
    max-width: none;
    width: 100%;
    height: auto;
    min-height: 0;
    background: var(--hero-qa-glass) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: var(--hero-qa-radius) !important;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.2),
        inset 0 0 0 1px var(--hero-qa-glass-border) !important;
    padding: var(--hero-qa-pad) !important;
}

/* iPad+: container trong suốt — glass theo từng item (Figma 2160:50374) */
@media (min-width: 744px) {
    body.event-theme-ngay-28 .hero-slider .quick-access-bar .container {
        background: transparent !important;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        border-radius: 0 !important;
        box-shadow: none !important;
        padding: 0 !important;
    }

    body.event-theme-ngay-28 .hero-slider .quick-access-bar .row {
        gap: var(--hero-qa-gap);
        align-items: stretch;
        height: var(--hero-qa-h);
        min-height: var(--hero-qa-h);
    }

    body.event-theme-ngay-28 .hero-slider .quick-access-bar .row > [class*="col"],
    body.event-theme-ngay-28 .hero-slider .quick-access-bar .row > * {
        height: 100%;
        padding-left: 0;
        padding-right: 0;
    }

    body.event-theme-ngay-28 .hero-slider .quick-access-item {
        background: var(--hero-qa-item-glass) !important;
        border: 1px solid rgba(255, 255, 255, 0.9) !important;
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
        border-radius: var(--hero-qa-item-radius) !important;
        box-shadow: inset 0 0 16px 0 rgba(163, 224, 255, 0.35) !important;
        padding: 6px 4px !important;
        gap: 5px !important;
    }

    body.event-theme-ngay-28 .hero-slider .quick-access-item .quick-label {
        color: #e8e8e8 !important;
        font-weight: 600;
        font-size: var(--hero-qa-label) !important;
        text-shadow: none;
    }

    body.event-theme-ngay-28 .hero-slider .quick-access-item .quick-icon {
        background: linear-gradient(135deg, #f5f8fc 0%, #e8f2f8 100%) !important;
        border: 1px solid rgba(208, 0, 0, 0.1) !important;
        border-radius: var(--hero-qa-item-radius) !important;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    }

    body.event-theme-ngay-28 .hero-slider .quick-access-item:hover {
        background: rgba(255, 255, 255, 0.32) !important;
        transform: translateY(-2px) !important;
    }

    body.event-theme-ngay-28 .hero-slider .quick-access-item:hover .quick-label {
        color: #ffffff !important;
    }

    /* Search icon xám như Figma tablet (placeholder vẫn trắng trên glass đỏ theme) */
    body.event-theme-ngay-28 .hero-slider .hero-search-form .search-icon {
        left: 24px;
        width: 20px;
        height: 20px;
    }

    body.event-theme-ngay-28 .hero-slider .hero-search-form .hero-search-input {
        padding: 0 24px 0 56px !important;
    }
}

body.event-theme-ngay-28 .hero-slider .quick-access-bar .row {
    justify-content: space-between;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: var(--hero-qa-gap);
    height: auto;
    margin: 0;
}

body.event-theme-ngay-28 .hero-slider .quick-access-bar .row > [class*="col"],
body.event-theme-ngay-28 .hero-slider .quick-access-bar .row > * {
    flex: 1 1 0 !important;
    width: auto !important;
    max-width: none !important;
    min-width: 0;
    height: auto;
    min-height: 0;
    display: flex;
    padding-left: 2px;
    padding-right: 2px;
}

body.event-theme-ngay-28 .hero-slider .quick-access-item {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    color: #fff;
    width: 100%;
    height: 100%;
    min-height: 0 !important;
    padding: 4px 2px !important;
    gap: 6px !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    animation: none !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
}

body.event-theme-ngay-28 .hero-slider .quick-access-item::before {
    display: none !important;
}

body.event-theme-ngay-28 .hero-slider .quick-access-item .quick-label {
    color: #ffffff !important;
    font-weight: 500;
    font-size: var(--hero-qa-label) !important;
    line-height: 1.2 !important;
    white-space: normal;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}

body.event-theme-ngay-28 .hero-slider .quick-access-item .quick-icon {
    background: #ffffff !important;
    border: none !important;
    border-radius: 10px !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
    width: var(--hero-qa-icon) !important;
    height: var(--hero-qa-icon) !important;
    min-width: var(--hero-qa-icon);
    min-height: var(--hero-qa-icon);
    flex: 0 0 auto;
    overflow: visible;
}

body.event-theme-ngay-28 .hero-slider .quick-access-item .quick-icon::after {
    display: none !important;
}

body.event-theme-ngay-28 .hero-slider .quick-access-item .quick-icon-img {
    width: var(--hero-qa-icon-img) !important;
    height: var(--hero-qa-icon-img) !important;
    object-fit: contain;
    filter: grayscale(1) brightness(0) invert(28%) !important;
    opacity: 0.9;
    transform: none !important;
}

body.event-theme-ngay-28 .hero-slider .quick-access-item:hover {
    transform: translateY(-2px) !important;
}

body.event-theme-ngay-28 .hero-slider .quick-access-item:hover .quick-label {
    color: #ffffff !important;
}

body.event-theme-ngay-28 .hero-slider .quick-access-item:hover .quick-icon {
    background: #ffffff !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18) !important;
}

body.event-theme-ngay-28 .hero-slider .quick-access-item:hover .quick-icon-img {
    filter: grayscale(1) brightness(0) invert(28%) !important;
}

@media (prefers-reduced-motion: reduce) {
    body.event-theme-ngay-28 .hero-slider .quick-access-item:hover {
        transform: none !important;
    }
}
