/* Giao diện dùng chung cho các trang prosure */

/* Tên thương hiệu trên header */
.logo-header .logo-title {
    display: block; margin: 0;
    font-size: 1.5rem; font-weight: 600; line-height: 1.3;
    color: #fff; text-transform: uppercase; white-space: nowrap;
    background: linear-gradient(45deg, var(--gold), #fff);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Dropdown "Lĩnh vực" - desktop */
.nav-menu ul li { position: relative; }
.arrow-down { display: inline-block; font-size: 0.7em; margin-left: 6px; transition: transform 0.3s ease; }
.has-dropdown.open .arrow-down { transform: rotate(180deg); color: var(--gold); }

.nav-menu .dropdown-menu {
    position: absolute; top: 100%; left: 0;
    width: 220px; background: rgba(0, 0, 0, 0.95);
    border: 1px solid var(--header-border); border-top: 2px solid var(--gold);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
    opacity: 0; visibility: hidden; transform: translateY(15px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex; flex-direction: column; gap: 0; padding: 0;
    border-radius: 0 0 8px 8px; z-index: 1100;
}
.has-dropdown.open .dropdown-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown-menu li { width: 100%; margin: 0; }
.dropdown-menu a {
    display: block; padding: 12px 20px; font-size: 0.95rem;
    color: #eee; border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    text-align: left; transition: all 0.2s;
}
.dropdown-menu a:hover, .dropdown-menu a.active { background: rgba(255, 215, 0, 0.1); color: var(--gold); padding-left: 25px; }
.dropdown-menu a::after, .dropdown-menu a:hover::after { width: 0; }

/* Footer */
.footer-map iframe { border-radius: 14px; }
.footer-info { overflow-wrap: anywhere; }

@keyframes prosureHeaderShine { to { background-position: -200% 0; } }

/* Mobile & tablet */
@media (max-width: 900px) {
    html, body { overflow-x: hidden; }
    a, button { -webkit-tap-highlight-color: transparent; }
    .nav-menu, .nav-menu *, .he-gallery, .he-gallery * { box-sizing: border-box; }

    /* Header kính mờ */
    header {
        background: rgba(5, 5, 5, 0.82);
        backdrop-filter: blur(14px) saturate(140%);
        -webkit-backdrop-filter: blur(14px) saturate(140%);
        border-bottom: 1px solid rgba(255, 215, 0, 0.1);
    }
    header::after {
        content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px;
        background: linear-gradient(90deg, transparent 0%, rgba(255, 215, 0, 0.7) 50%, transparent 100%);
        background-size: 200% 100%;
        animation: prosureHeaderShine 6s linear infinite;
        pointer-events: none;
    }
    .header-content { padding: 0 15px; height: 70px; }
    .logo-header, .logo-header a { gap: 0.75rem !important; position: relative; z-index: 1002; }
    .logo-header img { width: 40px; }
    .logo-header .logo-title { font-size: 1.1rem; }

    /* Nút hamburger */
    .hamburger {
        display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 5px;
        width: 42px; height: 42px; border-radius: 12px;
        border: 1px solid rgba(255, 215, 0, 0.25);
        background: rgba(255, 255, 255, 0.04);
        transition: border-color 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
        z-index: 1001;
    }
    .hamburger:active { transform: scale(0.94); }
    .hamburger .bar {
        width: 20px; height: 2px; margin: 0; border-radius: 2px;
        transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.25s ease, background 0.3s ease;
    }
    .hamburger .bar:nth-child(2) { width: 14px; }
    .hamburger.active {
        border-color: var(--gold);
        background: rgba(255, 215, 0, 0.08);
        box-shadow: 0 0 16px rgba(255, 215, 0, 0.25);
    }
    .hamburger.active .bar:nth-child(1) { transform: translateY(7px) rotate(45deg); background: var(--gold); }
    .hamburger.active .bar:nth-child(2) { opacity: 0; transform: scaleX(0); }
    .hamburger.active .bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); background: var(--gold); }

    /* Menu trượt từ phải */
    .nav-menu {
        position: fixed; top: 0; left: 0; z-index: 999;
        width: 100%; height: 100vh; height: 100dvh;
        display: flex; flex-direction: column;
        padding: 90px 0 2rem; overflow-y: auto; text-align: left;
        transform: translateX(100%); opacity: 0; visibility: hidden;
        background:
            radial-gradient(circle at 85% 0%, rgba(255, 215, 0, 0.12), transparent 55%),
            radial-gradient(circle at 0% 100%, rgba(255, 165, 0, 0.06), transparent 50%),
            rgba(0, 0, 0, 0.96);
        transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.35s ease, visibility 0.45s;
    }
    .nav-menu.active { left: 0; transform: none; opacity: 1; visibility: visible; }
    .nav-menu > ul { flex-direction: column; width: 100%; padding: 0 1.25rem; gap: 0.6rem; }

    /* Mục menu hiện lần lượt */
    .nav-menu > ul > li {
        opacity: 0; transform: translateX(24px);
        transition: opacity 0.4s ease, transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
    }
    .nav-menu.active > ul > li { opacity: 1; transform: none; }
    .nav-menu.active > ul > li:nth-child(1) { transition-delay: 0.08s; }
    .nav-menu.active > ul > li:nth-child(2) { transition-delay: 0.13s; }
    .nav-menu.active > ul > li:nth-child(3) { transition-delay: 0.18s; }
    .nav-menu.active > ul > li:nth-child(4) { transition-delay: 0.23s; }
    .nav-menu.active > ul > li:nth-child(5) { transition-delay: 0.28s; }

    /* Mục menu dạng thẻ */
    .nav-menu > ul > li > a {
        display: flex; justify-content: flex-start; align-items: center; width: 100%;
        font-size: 1.1rem; font-weight: 500; letter-spacing: 0.3px; text-align: left;
        padding: 1rem 1.25rem;
        border: 1px solid rgba(255, 255, 255, 0.06); border-radius: 14px;
        background: rgba(255, 255, 255, 0.03);
        transition: background 0.3s ease, border-color 0.3s ease, color 0.3s ease, transform 0.2s ease;
    }
    .nav-menu > ul > li > a::after {
        content: '›'; position: static; width: auto; height: auto;
        background: none; color: var(--gold); font-size: 1.4rem; line-height: 1;
        margin-left: auto; opacity: 0.5;
        transition: transform 0.3s ease, opacity 0.3s ease;
    }
    .nav-menu > ul > li > a.dropdown-toggle::after { content: none; }
    .dropdown-toggle .arrow-down { margin-left: auto; }
    .nav-menu > ul > li > a:hover,
    .nav-menu > ul > li > a:active,
    .nav-menu > ul > li > a.active,
    .has-dropdown.open > .dropdown-toggle {
        color: var(--gold);
        border-color: rgba(255, 215, 0, 0.35);
        background: rgba(255, 215, 0, 0.07);
    }
    .nav-menu > ul > li > a:hover::after,
    .nav-menu > ul > li > a.active::after { opacity: 1; transform: translateX(4px); }
    .nav-menu > ul > li > a:active { transform: scale(0.98); }

    /* Dropdown trong menu mobile */
    .has-dropdown { display: flex; flex-direction: column; width: 100%; }
    .nav-menu .dropdown-menu {
        position: static; width: 100%; box-shadow: none; border: none; border-radius: 14px;
        background: rgba(255, 215, 0, 0.03);
        max-height: 0; opacity: 0; visibility: visible; overflow: hidden; transform: none;
        transition: max-height 0.4s ease, opacity 0.3s ease, margin 0.3s ease;
    }
    .nav-menu .has-dropdown.open .dropdown-menu {
        max-height: 400px; opacity: 1;
        margin-top: 0.5rem; padding: 0.4rem 0;
        border: 1px solid rgba(255, 215, 0, 0.12);
    }
    .dropdown-menu a {
        display: flex; align-items: center;
        padding: 0.8rem 1.25rem; font-size: 1rem; color: #bbb; border-bottom: none;
    }
    .dropdown-menu a::before {
        content: ''; width: 6px; height: 6px; border-radius: 50%; margin-right: 0.7rem;
        background: var(--gold); opacity: 0.45; flex-shrink: 0;
        transition: opacity 0.3s ease, box-shadow 0.3s ease;
    }
    .dropdown-menu a:hover, .dropdown-menu a:active, .dropdown-menu a.active {
        color: var(--gold); background: transparent; padding-left: 1.25rem;
    }
    .dropdown-menu a:hover::before, .dropdown-menu a:active::before, .dropdown-menu a.active::before {
        opacity: 1; box-shadow: 0 0 8px rgba(255, 215, 0, 0.6);
    }

    html:has(.nav-menu.active), body:has(.nav-menu.active) { overflow: hidden; }

    /* Nội dung */
    .he-wrapper { padding: 14px; }
    .he-hero { padding: 100px 0 32px; margin-bottom: 24px; }
    .he-hero-title { font-size: 1.9rem; letter-spacing: 2px; line-height: 1.25; overflow-wrap: anywhere; }
    .he-hero h3 { font-size: 1.1rem !important; line-height: 1.6 !important; padding: 0 6px; }

    .he-main-content { grid-template-columns: 1fr; gap: 16px; padding-bottom: 40px; }
    .he-nav { margin-bottom: 4px; gap: 12px; }
    .he-dropdown-trigger { min-height: 52px; padding: 14px 18px; border-radius: 12px; }
    .he-dropdown-list { border-radius: 12px; }
    .he-dropdown-list .he-btn { padding: 14px 20px; }

    .he-display-area { --pad-x: 18px; padding: 22px var(--pad-x); min-height: 0; border-radius: 16px; }
    .he-panel-header { flex-direction: column; align-items: flex-start; gap: 6px; padding-bottom: 16px; margin-bottom: 22px; }
    .he-panel-title { font-size: 1.6rem; letter-spacing: 1px; line-height: 1.3; overflow-wrap: anywhere; }
    .he-panel-subtitle { font-size: 0.95rem; line-height: 1.5; }
    .intro-text { font-size: 1rem; line-height: 1.7; margin-bottom: 28px; text-align: left; }

    .he-slider-container { height: 300px; border-radius: 12px; margin-bottom: 28px; }
    .tech-grid { grid-template-columns: 1fr; gap: 16px; }
    .tech-column { padding: 18px 16px; border-radius: 12px; }
    .spec-value li { margin-left: 1.1em; }

    /* Ảnh vuốt ngang */
    .he-gallery, .he-gallery.cols-2, .he-gallery.cols-1 {
        display: flex; gap: 12px;
        overflow-x: auto; overflow-y: hidden;
        scroll-snap-type: x mandatory; scroll-padding: 0 var(--pad-x);
        overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        margin: 0 calc(var(--pad-x) * -1) 32px; padding: 0 var(--pad-x) 4px;
    }
    .he-gallery::-webkit-scrollbar { display: none; }
    .he-gallery > .he-shot { flex: 0 0 82%; scroll-snap-align: start; border-radius: 12px; }
    .he-gallery.cols-1 > .he-shot { flex-basis: 100%; }

    .he-banner { border-radius: 16px; margin-bottom: 24px; }
    .he-banner-btn { width: 100%; min-height: 46px; border-radius: 10px; }
    .he-stats { border-radius: 12px; }
    .he-table-wrap { border-radius: 12px; -webkit-overflow-scrolling: touch; }
    .coming-soon-container { height: 220px; border-radius: 12px; }
    .coming-soon-text { font-size: 2.2rem; }

    footer { padding: 2.5rem 1.25rem 1rem; }
    .footer-content { grid-template-columns: 1fr; text-align: center; gap: 2rem; }
    .footer-logo img { margin: 0 auto 0.5rem auto; }
    .footer-info p, .footer-bottom p { text-align: center; }
    .footer-bottom { font-size: 0.85rem; }
    .footer-map iframe { height: 200px; }

    #back-to-top { width: 45px; height: 45px; bottom: 80px; right: 20px; font-size: 1.2rem; }
}

/* Điện thoại */
@media (max-width: 600px) {
    .he-hero-title { font-size: 1.6rem; }
    .he-hero .sub-title { font-size: 1rem !important; letter-spacing: 1px !important; }
    .he-panel-title { font-size: 1.35rem; }
    .he-new-tag { margin-left: 8px; font-size: 0.6rem; }
    .he-slider-container { height: 240px; }
    .he-stat { padding: 16px 8px; }
    .he-stat b { font-size: 1.2rem; }
    .he-stat span { font-size: 0.68rem; letter-spacing: 1px; }
    .he-table { font-size: 0.85rem; }
    .he-swatches { gap: 16px; justify-content: center; }
    .he-lightbox { padding: 12px; }
    .he-lightbox img { max-width: 100%; max-height: 72vh; }
    .he-lb-prev, .he-lb-next { top: auto; bottom: 18px; transform: none; }
    .he-lb-prev { left: calc(50% - 56px); }
    .he-lb-next { right: calc(50% - 56px); }
    .coming-soon-text { font-size: 1.7rem; }
}

/* Màn hình nhỏ */
@media (max-width: 400px) {
    .header-content { padding: 0 12px; }
    .logo-header img { width: 36px; }
    .logo-header .logo-title { font-size: 1rem; }
    .he-wrapper { padding: 10px; }
    .he-display-area { --pad-x: 14px; padding: 18px var(--pad-x); }
    .he-hero-title { font-size: 1.4rem; }
}

/* Cảm ứng: bỏ hiệu ứng hover */
@media (hover: none) {
    .he-shot:hover, .he-shot:hover img { transform: none; }
}

/* Giảm chuyển động */
@media (prefers-reduced-motion: reduce) {
    header::after { animation: none; }
    .nav-menu, .nav-menu > ul > li, .hamburger .bar { transition: none; }
}
