/* ==========================================================================
   assets/css/responsive.css
   Shared mobile fixes for all pages (load AFTER the page's own <style>)
   ========================================================================== */

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    overflow-x: hidden;
}

img,
video {
    max-width: 100%;
}

/* anchor targets should not hide under the fixed header */
section[id] {
    scroll-margin-top: 70px;
}

/* ---------- Hamburger button (injected by assets/js/nav.js) ---------- */
.nav-toggle {
    display: none;
    position: absolute;
    top: 50%;
    left: 12px;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.12);
    flex-direction: column;
    justify-content: space-between;
    cursor: pointer;
    z-index: 1101;
}

.nav-toggle span {
    display: block;
    height: 2px;
    width: 100%;
    background: #fff;
    border-radius: 2px;
    transition: transform 0.25s ease, opacity 0.2s ease;
}

.nav-open .nav-toggle span:nth-child(1) {
    transform: translateY(10px) rotate(45deg);
}

.nav-open .nav-toggle span:nth-child(2) {
    opacity: 0;
}

.nav-open .nav-toggle span:nth-child(3) {
    transform: translateY(-10px) rotate(-45deg);
}

.site-header.scrolled {
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.18);
}

/* ---------- Tablet & phone ---------- */
@media (max-width: 991.98px) {
    .site-header {
        height: 60px !important;
        min-height: 60px !important;
        padding: 0 12px !important;
    }

    .nav-toggle {
        display: flex;
    }

    .site-header nav {
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        max-width: none !important;
        display: flex !important;
        flex-direction: column;
        align-items: stretch !important;
        text-align: center;
        flex-wrap: nowrap !important;
        gap: 0 !important;
        padding: 6px 0;
        background: rgba(11, 26, 46, 0.97);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
        max-height: calc(100vh - 60px);
        overflow-y: auto;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-8px);
        transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
    }

    .site-header.nav-open nav {
        opacity: 1;
        visibility: visible;
        transform: none;
    }

    .site-header nav a {
        display: block;
        margin: 0 !important;
        padding: 14px 22px;
        font-size: 1rem !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    }

    .site-header nav a:last-child {
        border-bottom: 0;
    }

    .site-header nav a:active,
    .site-header nav a:hover {
        background: rgba(255, 255, 255, 0.06);
    }
}

@media (max-width: 767.98px) {
    /* readable tables on product pages */
    .table-responsive,
    table {
        font-size: 0.9rem;
    }

    .program-detail table td,
    .program-detail table th {
        word-break: break-word;
    }

    .brand-header-box {
        flex-direction: column;
        text-align: center;
    }

    .program-detail h1 {
        font-size: 1.45rem;
        line-height: 1.5;
    }

    .btn {
        min-height: 40px;
    }
}
