/* ============================================================
   LUYENTRACNGHIEM.COM — style.css
   ============================================================ */

/* ── CSS VARIABLES ── */
:root {
    --orange      : #f5a623;
    --orange-dark : #e09318;
    --orange-light: #fff8ee;
    --black       : #1a1a1a;
    --black-soft  : #2c2c2c;
    --gray-dark   : #3d3d3d;
    --gray-mid    : #666666;
    --gray-light  : #999999;
    --gray-border : #e0e0e0;
    --gray-bg     : #f5f5f5;
    --white       : #ffffff;
    --font        : 'Roboto', 'Segoe UI', Arial, sans-serif;
    --radius      : 6px;
    --shadow-sm   : 0 1px 4px rgba(0,0,0,0.08);
    --shadow-md   : 0 3px 14px rgba(0,0,0,0.10);
    --shadow-lg   : 0 6px 28px rgba(0,0,0,0.14);
    --max-w       : 1250px;
    --side-pad    : 16px;
}

/* ============================================================
   RESET
   ============================================================ */
*{ margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family           : var(--font);
    font-size             : 14px;
    line-height           : 1.65;
    background            : #f9f9f9;
    color                 : var(--black);
    -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: var(--orange); }
img { display: inline-block; max-width: 100%; }
button { cursor: pointer; font-family: var(--font); }

/* ============================================================
   TYPOGRAPHY — h, p, ul, ol, table
   ============================================================ */
h1, h2, h3, h4, h5, h6 {
    font-family  : var(--font);
    font-weight  : 800;
    line-height  : 1.25;
    color        : var(--black);
    margin-bottom: .6em;
}
h1 { font-size: 28px; }
h2 { font-size: 22px; margin-bottom: 18px; }
h3 { font-size: 18px; margin-top: 24px; color: var(--gray-dark); }
h4 { font-size: 15px; color: var(--gray-dark); margin-top: 16px; }
h5 { font-size: 13px; color: var(--gray-mid); font-weight: 700; }
h6 { font-size: 12px; color: var(--gray-light); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }

p { font-size: 14px; color: #383838; line-height: 1.8; margin-bottom: 14px; }
p:last-child { margin-bottom: 0; }

ul, ol { padding-left: 25px; margin-bottom: 14px; color: rgb(12, 12, 12); font-size: 14px; line-height: 1.8; }
ul { list-style: disc; }
ol { list-style: decimal; }
li { margin-bottom: 5px; }
li::marker { color: var(--orange); }
ul ul, ol ol, ul ol, ol ul { margin-top: 5px; margin-bottom: 5px; padding-left: 18px; }

table {
    width          : 100%;
    border-collapse: collapse;
    font-size      : 13.5px;
    color          : var(--black);
    margin-bottom  : 20px;
    background     : var(--white);
    border-radius  : var(--radius);
    overflow       : hidden;
    box-shadow     : var(--shadow-sm);
}
thead { background: var(--orange); color: var(--white); }
thead th { padding: 11px 14px; font-weight: 700; font-size: 13px; text-align: left; white-space: nowrap; }
tbody tr { border-bottom: 1px solid var(--gray-border); }
tbody tr:last-child { border-bottom: none; }
tbody tr:nth-child(even) { background: #fafafa; }
tbody tr:hover { background: var(--orange-light); }
tbody td { padding: 10px 14px; color: #444; vertical-align: middle; }
tfoot td { padding: 10px 14px; font-weight: 700; color: var(--black); border-top: 2px solid var(--orange); background: #fafafa; }

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
    background: var(--white);
    position  : sticky;
    top       : 0;
    z-index   : 400;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

/* ── Tầng 1 ── */
.header-top {
    max-width  : var(--max-w);
    margin     : 0 auto;
    padding    : 0 24px;
    height     : 80px;
    display    : flex;
    align-items: center;
    gap        : 20px;
}
.header-logo {
    flex-shrink: 0;
    display    : flex;
    align-items: center;
}
.header-logo img {
    height    : 75px;
    width     : auto;
    object-fit: contain;
}

/* ── Nav chính ── */
.header-nav-main {
    display    : flex;
    align-items: center;
    flex       : 1;
}
.nav-main-link {
    color         : var(--black);
    font-size     : 12px;
    font-weight   : 700;
    padding       : 0 12px;
    height        : 65px;
    display       : flex;
    align-items   : center;
    letter-spacing: 0.3px;
    white-space   : nowrap;
    transition    : color .18s;
}
.nav-main-link:hover,
.nav-main-link.active { color: var(--orange); }

/* ── Search ── */
.header-search {
    display      : flex;
    align-items  : center;
    height       : 36px;
    border       : 1.5px solid #ddd;
    border-radius: var(--radius);
    overflow     : hidden;
    background   : var(--white);
    transition   : border-color .2s, box-shadow .2s;
    margin-left  : auto;
    flex         : 1;
    min-width    : 150px;
    max-width    : 300px;
}
.header-search:focus-within {
    border-color: var(--orange);
    box-shadow  : 0 0 0 3px rgba(245,166,35,0.15);
}
.header-search input {
    border    : none;
    outline   : none;
    font-size : 13px;
    color     : var(--black);
    background: transparent;
    padding   : 0 12px;
    width     : 100%;
    min-width : 0;
}
.header-search input::placeholder { color: #bbb; }
.header-search button {
    display        : flex;
    align-items    : center;
    justify-content: center;
    background     : var(--white);
    border         : none;
    padding        : 0 10px;
    height         : 100%;
}
.header-search button img {
    width     : 16px;
    height    : 16px;
    opacity   : 0.45;
    object-fit: contain;
}

/* ── Hamburger ── */
.header-hamburger {
    display       : none;
    flex-direction: column;
    gap           : 5px;
    background    : none;
    border        : none;
    padding       : 4px;
    flex-shrink   : 0;
}
.header-hamburger span {
    display      : block;
    width        : 24px;
    height       : 2px;
    background   : var(--black);
    border-radius: 2px;
    transition   : all 0.25s ease;
}
.header-hamburger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.header-hamburger.is-open span:nth-child(2) { opacity: 0; }
.header-hamburger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Tầng 2 sub-nav cam ── */
.header-bottom { background: var(--orange); }
.header-bottom-inner {
    max-width      : var(--max-w);
    margin         : 0 auto;
    padding        : 0 24px;
    height         : 38px;
    display        : flex;
    align-items    : center;
    justify-content: center;
}
.header-nav-sub {
    display                   : flex;
    align-items               : center;
    justify-content           : center;
    height                    : 38px;
    overflow-x                : auto;
    scrollbar-width           : none;
    -webkit-overflow-scrolling: touch;
}
.header-nav-sub::-webkit-scrollbar { display: none; }
.nav-sub-link {
    color        : rgba(255,255,255,0.88);
    font-size    : 13px;
    font-weight  : 550;
    padding      : 2px 15px;
    height       : auto;
    display      : flex;
    align-items  : center;
    white-space  : nowrap;
    transition   : color .15s, background .15s;
    flex-shrink  : 0;
    border-radius: 999px;
    margin       : 0 2px;
}
.nav-sub-link:hover {
    color     : var(--white);
    background: rgba(255,255,255,0.18);
}
.nav-sub-link.active {
    color      : var(--orange);
    font-weight: 700;
    background : var(--white);
}

/* ============================================================
   MOBILE DRAWER
   ============================================================ */
.mobile-drawer-overlay {
    display       : none;
    position      : fixed;
    inset         : 0;
    background    : rgba(0,0,0,0.5);
    z-index       : 910;
    opacity       : 0;
    pointer-events: none;
    transition    : opacity 0.25s ease;
}
.mobile-drawer {
    display       : flex;
    flex-direction: column;
    position      : fixed;
    top           : 0;
    right         : 0;
    bottom        : 0;
    width         : 100%;
    background    : var(--white);
    z-index       : 920;
    transform     : translateX(100%);
    transition    : transform 0.28s cubic-bezier(.4,0,.2,1);
    overflow-y    : auto;
}

/* ============================================================
   BREADCRUMB
   ============================================================ */
.breadcrumb-bar { background: #f8f8f8; border-bottom: 1px solid var(--gray-border); }
.breadcrumb {
    max-width  : var(--max-w);
    margin     : 0 auto;
    padding    : 12px var(--side-pad);
    display    : flex;
    align-items: center;
    gap        : 6px;
    font-size  : 14px;
    color      : #666;
    flex-wrap  : wrap;
    list-style : none;
}
.breadcrumb a { color: var(--orange); font-weight: 600; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb .sep { color: #aaa; }

/* ============================================================
   LAYOUT
   ============================================================ */
.container.layout {
    max-width : var(--max-w);
    margin    : 10px auto;
    padding   : 0 var(--side-pad);
    width     : 100%;
    box-sizing: border-box;
}
.content   { width: 100%; min-width: 0; }
.main-inner { width: 100%; box-sizing: border-box; }

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar-widget {
    background   : var(--white);
    border-radius: 8px;
    overflow     : hidden;
    margin-bottom: 18px;
    box-shadow   : var(--shadow-sm);
    border       : 1px solid var(--gray-border);
}
.sidebar-widget .widget-title {
    background    : var(--orange);
    color         : var(--white);
    font-size     : 11px;
    font-weight   : 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding       : 10px 16px;
}
.sidebar-widget .widget-body { padding: 14px 16px; }
.sidebar-widget ul { list-style: none; padding-left: 0; margin-bottom: 0; color: inherit; }
.sidebar-widget ul li { border-bottom: 1px solid #f0f0f0; margin-bottom: 0; }
.sidebar-widget ul li:last-child { border-bottom: none; }
.sidebar-widget ul li::marker { content: none; }
.sidebar-widget ul li a {
    display    : flex;
    align-items: center;
    gap        : 8px;
    padding    : 9px 4px;
    font-size  : 13px;
    color      : #444;
    transition : color .15s, padding-left .15s;
}
.sidebar-widget ul li a::before { content: '›'; color: var(--orange); font-size: 16px; font-weight: 700; line-height: 1; flex-shrink: 0; }
.sidebar-widget ul li a:hover { color: var(--orange); padding-left: 6px; }

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
    background: var(--white);
    color     : var(--black);
    margin-top: 48px;
    border-top: 1px solid var(--gray-border);
    font-family: var(--font);
}
.footer-top {
    max-width  : var(--max-w);
    margin     : 0 auto;
    padding    : 48px var(--side-pad) 40px;
    display    : grid;
    grid-template-columns: 2fr 1.2fr 1fr 1.2fr;
    gap        : 40px;
    align-items: start;
}
.footer-logo {
    height       : 64px;
    width        : auto;
    display      : block;
    margin-bottom: 16px;
    object-fit   : contain;
}
.footer-col--brand p {
    font-size    : 13px;
    color        : var(--gray-mid);
    line-height  : 1.7;
    margin-bottom: 20px;
}
.footer-col-title {
    font-size    : 15px;
    font-weight  : 800;
    color        : var(--orange) !important;
    margin-bottom: 14px;
    margin-top   : 0 !important;
    line-height  : 1.4;
}
.footer-social-title {
    font-size    : 15px;
    font-weight  : 800;
    color        : var(--orange) !important;
    margin-bottom: 12px;
    margin-top   : 0 !important;
}
.footer-socials { display: flex; gap: 8px; flex-wrap: wrap; }
.fs-btn {
    width          : 36px;
    height         : 36px;
    border-radius  : 50%;
    display        : flex;
    align-items    : center;
    justify-content: center;
    color          : var(--white);
    text-decoration: none;
    transition     : opacity .2s;
}
.fs-btn:hover  { opacity: 0.85; }
.fs-tiktok    { background: #000000; }
.fs-x         { background: #000000; }
.fs-pinterest { background: #e60023; }
.fs-linkedin  { background: #0077b5; }
.fs-youtube   { background: #ff0000; }
.fs-twitch    { background: #9146ff; }

.footer-col ul {
    list-style   : none;
    padding-left : 0;
    margin-bottom: 24px;
}
.footer-col ul:last-of-type { margin-bottom: 0; }
.footer-col ul li {
    display      : flex;
    align-items  : center;
    gap          : 8px;
    padding      : 5px 0;
    margin-bottom: 0;
}
.footer-col ul li::before {
    content    : '•';
    color      : var(--orange);
    font-size  : 14px;
    font-weight: 700;
    flex-shrink: 0;
}
.footer-col ul li a {
    font-size  : 13px;
    color      : var(--gray-dark);
    transition : color .15s;
}
.footer-col ul li a:hover { color: var(--orange); }

.footer-dmca { display: inline-block; margin-top: 16px; }
.footer-dmca img { border: 1px solid #ddd; border-radius: 4px; }

.footer-bottom {
    background     : var(--orange);
    padding        : 14px var(--side-pad);
    display        : flex;
    align-items    : center;
    justify-content: center;
}
.footer-bottom p        { color: var(--white); font-size: 14px; margin: 0; }
.footer-bottom p strong { font-weight: 700; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
    display        : inline-flex;
    align-items    : center;
    justify-content: center;
    gap            : 7px;
    padding        : 10px 22px;
    border-radius  : var(--radius);
    font-size      : 13.5px;
    font-weight    : 700;
    border         : 2px solid transparent;
    transition     : background .18s, border-color .18s, color .18s, transform .13s;
    cursor         : pointer;
    white-space    : nowrap;
}
.btn-primary { background: var(--orange); color: var(--white); border-color: var(--orange); }
.btn-primary:hover { background: var(--orange-dark); border-color: var(--orange-dark); transform: translateY(-1px); }
.btn-outline { background: transparent; color: var(--orange); border-color: var(--orange); }
.btn-outline:hover { background: var(--orange); color: var(--white); }

/* ============================================================
   BACK TO TOP
   ============================================================ */
.back-to-top {
    position   : fixed;
    right      : 20px;
    bottom     : 20px;
    width      : 52px;
    height     : 52px;
    border-radius  : 50%;
    background     : var(--orange);
    color          : var(--white);
    border         : none;
    display        : flex;
    align-items    : center;
    justify-content: center;
    box-shadow     : 0 4px 14px rgba(0,0,0,0.25);
    cursor         : pointer;
    z-index        : 500;
    opacity        : 0;
    visibility     : hidden;
    transform      : translateY(15px);
    transition     : opacity .25s, transform .25s, background .18s, visibility .25s;
}
.back-to-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { background: var(--orange-dark); }
.back-to-top svg { width: 24px; height: 24px; }

/* ============================================================
   UTILITY
   ============================================================ */
.text-orange { color: var(--orange) !important; }
.text-center { text-align: center !important; }
.text-muted  { color: var(--gray-light) !important; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1100px) {
    .footer-top { grid-template-columns: 1.5fr 1.2fr 1fr 1fr; gap: 28px; }
    .header-search input { width: 150px; }
}

@media (max-width: 900px) {
    .footer-top { grid-template-columns: 1fr 1fr; gap: 28px 24px; }
    .header-search input { width: 120px; }
    .nav-main-link { padding: 0 8px; font-size: 11px; }
}

@media (max-width: 768px) {

    /* ── Header mobile ── */
    .header-nav-main  { display: none; }
    .header-search    { display: none; }
    .header-hamburger { display: flex; }

    .header-top {
        position       : relative;
        height         : 56px;
        padding        : 0 16px;
        justify-content: space-between;
    }
    /* Logo canh giữa tuyệt đối */
    .header-logo {
        position : absolute;
        left     : 50%;
        transform: translateX(-50%);
    }
    .header-logo img { height: 55px; }

    .header-bottom { display: none; }
    .nav-sub-link { font-size: 12px; padding: 0 10px; }

    /* ── Mobile drawer ── */
    .mobile-drawer-overlay { display: block; }
    .mobile-drawer         { display: flex; }
    .mobile-drawer.is-open { transform: translateX(0); }
    .mobile-drawer-overlay.is-open { opacity: 1; pointer-events: all; }

    .mobile-drawer .md-top {
        display        : flex;
        align-items    : center;
        justify-content: space-between;
        padding        : 0 16px;
        height         : 52px;
        border-bottom  : 2px solid var(--orange);
        background     : var(--white);
        flex-shrink    : 0;
    }
    .mobile-drawer .md-title {
        font-size     : 14px;
        font-weight   : 700;
        color         : var(--orange);
        text-transform: uppercase;
        letter-spacing: 0.1em;
    }
    .mobile-drawer .md-close {
        background: none;
        border    : none;
        font-size : 22px;
        cursor    : pointer;
        color     : var(--gray-dark);
        padding   : 4px 8px;
        transition: color .15s;
    }
    .mobile-drawer .md-close:hover { color: var(--orange); }
    .mobile-drawer .md-divider {
        border    : none;
        border-top: 1px solid var(--gray-border);
        margin    : 0;
    }
    .mobile-drawer nav {
        display       : flex;
        flex-direction: column;
        padding       : 0;
        width         : 100%;
    }
    .mobile-drawer .md-nav-main a {
        display      : flex;
        align-items  : center;
        padding      : 14px 20px;
        font-size    : 14px;
        font-weight  : 700;
        color        : var(--black);
        border-bottom: 1px solid var(--gray-border);
        transition   : background .15s, color .15s;
    }
    .mobile-drawer .md-nav-main a:hover  { background: var(--orange-light); color: var(--orange); }
    .mobile-drawer .md-nav-main a.active { color: var(--orange); border-left: 4px solid var(--orange); padding-left: 16px; }
    .mobile-drawer .md-nav-sub a {
        display      : flex;
        align-items  : center;
        padding      : 12px 20px;
        font-size    : 13px;
        font-weight  : 500;
        color        : var(--gray-dark);
        border-bottom: 1px solid #f0f0f0;
        transition   : background .15s, color .15s;
    }
    .mobile-drawer .md-nav-sub a:hover  { background: var(--orange-light); color: var(--orange); }
    .mobile-drawer .md-nav-sub a.active { color: var(--orange); font-weight: 700; }
    .mobile-drawer .md-footer {
        margin-top : auto;
        padding    : 16px 20px;
        font-size  : 12px;
        color      : var(--gray-light);
        border-top : 1px solid var(--gray-border);
        text-align : center;
        flex-shrink: 0;
    }

    /* ── Layout ── */
    .container.layout {
        margin : 12px auto;
        padding: 0 12px;
    }

    /* ── Footer mobile ── */
    .footer      { margin-top: 24px; }
    .footer-top  { grid-template-columns: 1fr; gap: 24px; padding: 28px 16px; }

    /* ── Typography mobile ── */
    h1 { font-size: 22px; }
    h2 { font-size: 18px; }
    h3 { font-size: 15px; }

    /* ── Back to top ── */
    .back-to-top { right: 14px; bottom: 16px; width: 46px; height: 46px; }
    
    /* ── Images trong content ── */
    .main-inner img,
    .content img {
        max-width : 100% !important;
        width     : auto !important;
        height    : auto !important;
    }
}