/* ============================================================
   VISA24H UI — CSS CHUNG TOÀN SITE
   Gọi từ header: <link rel='stylesheet' href='<?php echo base_url(); ?>frontend/css/visa24h-ui.css'>
   Phiên bản: 1.0 — Inter + Be Vietnam Pro
============================================================ */

/*
 * CÁCH SỬ DỤNG:
 * 1. Trong header PHP, thêm trước </head>:
 *    <link rel="preconnect" href="https://fonts.googleapis.com">
 *    <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
 *    <link href="https://fonts.googleapis.com/css2?family=Be+Vietnam+Pro:wght@300;400;500;600;700&family=Inter:wght@400;500;600;700&display=swap" rel="stylesheet">
 *    <link rel="stylesheet" href="[base_url]frontend/css/visa24h-ui.css">
 *
 * 2. Trang chủ thêm: visa24h-home.css
 * 3. Trang tin tức:  visa24h-news.css
 * 4. Footer view:    common/footer_main
 */

/* Google Fonts — preload trong header PHP */
/* @import url('https://fonts.googleapis.com/css2?family=Be+Vietnam+Pro:wght@300;400;500;600;700&family=Inter:wght@400;500;600;700&display=swap'); */

/* ===================== RESET & BASE ===================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --navy:    #0E2040;
    --navy-2:  #1A3561;
    --gold:    #C09A4A;
    --gold-lt: #E8D49A;
    --gold-pale:#FAF5E8;
    --cream:   #FDFBF7;
    --white:   #FFFFFF;
    --muted:   #6B7280;
    --border:  rgba(14,32,64,.10);
    --border-gold: rgba(192,154,74,.25);
    --ff-serif: 'Be Vietnam Pro', sans-serif;
    --ff-sans:  'Inter', 'Be Vietnam Pro', sans-serif;
    --shadow-sm: 0 2px 12px rgba(14,32,64,.06);
    --shadow-md: 0 6px 30px rgba(14,32,64,.10);
    --radius:  10px;
    --radius-lg: 16px;
}

body { font-family: var(--ff-sans); background: var(--cream); color: var(--navy); }


/* ===================== HEADER / NAV ===================== */
.v24-header {
    position: sticky; top: 0; z-index: 999;
    background: rgba(253,251,247,.96);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-gold);
}
.v24-nav-inner {
    max-width: 1200px; margin: 0 auto;
    padding: 0 24px;
    display: flex; align-items: center; gap: 32px;
    height: 68px;
}
.v24-logo img { height: 44px; width: auto; display: block; }
.v24-nav-main { flex: 1; }

/* Override Bootstrap nav to match tone */
.v24-nav-main .navbar { padding: 0; background: transparent !important; }
.v24-nav-main .navbar-nav .nav-link {
    font-family: var(--ff-sans); font-size: 14px; font-weight: 500;
    color: var(--navy) !important; letter-spacing: .02em;
    padding: 6px 14px !important; border-radius: 6px;
    transition: background .2s, color .2s;
}
.v24-nav-main .navbar-nav .nav-link:hover,
.v24-nav-main .navbar-nav .nav-link.active { background: var(--gold-pale); color: var(--gold) !important; }
.v24-nav-main .navbar-collapse { justify-content: flex-end; }

.v24-nav-cta {
    flex-shrink: 0;
    display: inline-flex; align-items: center; gap: 7px;
    padding: 9px 20px; background: var(--gold);
    color: var(--white) !important; border-radius: 50px;
    font-size: 14px; font-weight: 500; text-decoration: none;
    letter-spacing: .03em; transition: background .2s, transform .15s;
    white-space: nowrap;
}
.v24-nav-cta:hover { background: var(--navy); transform: translateY(-1px); }
.v24-nav-cta svg { flex-shrink: 0; }

/* Mobile toggler */
.v24-toggler {
    display: none; background: none; border: 1px solid var(--border);
    width: 38px; height: 38px; border-radius: 8px; cursor: pointer;
    flex-direction: column; align-items: center; justify-content: center;
    margin-left: 12px; flex-shrink: 0;
}
.v24-toggler span {
    display: block; width: 18px; height: 2px; background: var(--navy);
    border-radius: 2px; transition: all .25s;
}
.v24-toggler span + span { margin-top: 4px; }
.v24-toggler.active span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.v24-toggler.active span:nth-child(2) { opacity: 0; }
.v24-toggler.active span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }


/* ===================== FOOTER ===================== */
.v24-footer { background: var(--navy); }

/* Top bar */
.v24-footer-topbar {
    background: rgba(255,255,255,.04);
    border-bottom: 1px solid rgba(255,255,255,.08);
}
.v24-footer-topbar-inner {
    max-width: 1200px; margin: 0 auto; padding: 24px 24px;
    display: flex; align-items: center; gap: 0; flex-wrap: wrap;
}
.v24-footer-contact-item {
    display: flex; align-items: center; gap: 12px;
    flex: 1; min-width: 200px; padding: 8px 24px 8px 0;
}
.v24-footer-contact-icon {
    width: 40px; height: 40px; border-radius: 50%;
    background: rgba(192,154,74,.15); border: 1px solid rgba(192,154,74,.25);
    display: flex; align-items: center; justify-content: center;
    color: var(--gold); flex-shrink: 0;
}
.v24-footer-contact-label { font-size: 11px; color: rgba(255,255,255,.4); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 3px; }
.v24-footer-contact-val { font-size: 14px; font-weight: 500; color: var(--white); text-decoration: none; transition: color .2s; display: block; }
.v24-footer-contact-val:hover { color: var(--gold-lt); }
.v24-footer-topbar-divider { width: 1px; height: 40px; background: rgba(255,255,255,.08); margin-right: 24px; flex-shrink: 0; }

/* Main grid */
.v24-footer-main { padding: 52px 24px 44px; }
.v24-footer-grid {
    max-width: 1200px; margin: 0 auto;
    display: grid; grid-template-columns: 1.2fr 1fr 1fr 1.3fr; gap: 36px;
}

/* Social links (dùng trong cột Về Visa24h) */
.v24-footer-social { display: flex; gap: 8px; flex-wrap: wrap; }
.v24-footer-social-link {
    width: 34px; height: 34px; border-radius: 50%;
    border: 1px solid rgba(255,255,255,.15);
    display: flex; align-items: center; justify-content: center;
    color: rgba(255,255,255,.5); text-decoration: none; transition: all .2s;
}
.v24-footer-social-link:hover { border-color: var(--gold); color: var(--gold); background: rgba(192,154,74,.1); }

/* Link cols */
.v24-footer-col-title {
    font-size: 12px; font-weight: 600; letter-spacing: .1em;
    text-transform: uppercase; color: var(--white);
    margin-bottom: 16px; padding-bottom: 10px;
    border-bottom: 1px solid rgba(192,154,74,.25);
}
.v24-footer-links { list-style: none; margin: 0; padding: 0; }
.v24-footer-links li { margin-bottom: 10px; }
.v24-footer-links li a {
    font-size: 14px; color: rgba(255,255,255,.55);
    text-decoration: none; transition: color .2s;
    display: flex; align-items: center; gap: 6px;
}
.v24-footer-links li a::before {
    content: ''; width: 4px; height: 4px; border-radius: 50%;
    background: var(--gold); opacity: .5; flex-shrink: 0; transition: opacity .2s;
}
.v24-footer-links li a:hover { color: var(--gold-lt); }
.v24-footer-links li a:hover::before { opacity: 1; }

/* Module-rendered menu inside footer col */
.v24-footer-col ul { list-style: none; margin: 0; padding: 0; }
.v24-footer-col ul li { margin-bottom: 10px; }
.v24-footer-col ul li a { font-size: 14px; color: rgba(255,255,255,.55); text-decoration: none; transition: color .2s; display: flex; align-items: center; gap: 6px; }
.v24-footer-col ul li a::before { content: ''; width: 4px; height: 4px; border-radius: 50%; background: var(--gold); opacity: .5; flex-shrink: 0; }
.v24-footer-col ul li a:hover { color: var(--gold-lt); }

/* Zalo CTA in footer */
.v24-footer-zalo-cta {
    display: inline-flex; align-items: center; gap: 8px;
    margin-top: 20px; padding: 10px 18px;
    background: rgba(192,154,74,.15); border: 1px solid rgba(192,154,74,.3);
    color: var(--gold-lt) !important; font-size: 13px; font-weight: 500;
    border-radius: 50px; text-decoration: none !important; transition: all .2s;
}
.v24-footer-zalo-cta:hover { background: rgba(192,154,74,.25); border-color: var(--gold); }

/* Bottom bar */
.v24-footer-bottom-bar {
    border-top: 1px solid rgba(255,255,255,.08);
}
.v24-footer-bottom-inner {
    max-width: 1200px; margin: 0 auto; padding: 18px 24px;
    display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px;
}
.v24-footer-copy { font-size: 13px; color: rgba(255,255,255,.4); margin: 0; }
.v24-footer-bottom-links { display: flex; align-items: center; gap: 10px; }
.v24-footer-bottom-links a { font-size: 13px; color: rgba(255,255,255,.4); text-decoration: none; transition: color .2s; }
.v24-footer-bottom-links a:hover { color: var(--gold-lt); }
.v24-footer-bottom-links span { color: rgba(255,255,255,.2); }


/* ===================== FLOATING CTA BUTTONS ===================== */
.v24-float-group {
    position: fixed; bottom: 24px; right: 24px; z-index: 900;
    display: flex; flex-direction: column; gap: 10px; align-items: flex-end;
}
.v24-float-btn {
    display: inline-flex; align-items: center; gap: 10px;
    padding: 12px 20px; border-radius: 50px; text-decoration: none;
    font-size: 14px; font-weight: 500; white-space: nowrap;
    box-shadow: 0 4px 18px rgba(0,0,0,.2); transition: all .2s;
}
.v24-float-zalo { background: #0068FF; color: #fff; }
.v24-float-zalo:hover { background: #0052CC; transform: translateY(-2px); box-shadow: 0 6px 24px rgba(0,104,255,.4); }
.v24-float-calc { background: var(--gold); color: #fff; }
.v24-float-calc:hover { background: #A8832E; transform: translateY(-2px); box-shadow: 0 6px 24px rgba(192,154,74,.5); }


/* ===================== CONTENT AREA ===================== */
.v24-content-section { background: var(--white); }
.v24-content-inner {
    max-width: 860px; margin: 0 auto; padding: 60px 24px;
}
.v24-content-inner h1, .v24-content-inner h2 {
    font-family: var(--ff-serif); color: var(--navy);
}
.v24-content-inner h2 {
    font-size: 28px; font-weight: 600; margin: 36px 0 14px;
    padding-bottom: 10px; border-bottom: 1px solid var(--border);
}
.v24-content-inner p { line-height: 1.8; color: #374151; margin-bottom: 16px; font-size: 16px; }
.v24-content-inner ul li { line-height: 1.8; margin-bottom: 6px; color: #374151; font-size: 16px; }

/* CTA after H2 in articles */
.cta-zalo-wrapper {
    margin: 24px 0 !important;
    text-align: center;
}
.cta-zalo-wrapper a {
    display: inline-flex; align-items: center; gap: 9px;
    padding: 12px 30px; background: #D94735; color: #fff !important;
    font-weight: 500; font-size: 15px; border-radius: 50px;
    text-decoration: none; transition: all .2s;
    box-shadow: 0 4px 14px rgba(217,71,53,.3);
}
.cta-zalo-wrapper a:hover { background: #B83827; transform: translateY(-2px); }

.cta-calc-wrapper {
    margin: 36px 0 !important; padding: 32px !important;
    background: #F0FBF4 !important; border: 1px solid #C3E6CB !important;
    border-radius: 12px !important; text-align: center;
}
.cta-calc-wrapper p {
    font-size: 17px !important; font-weight: 500 !important;
    color: #1A6B3C !important; margin-bottom: 18px;
}
.cta-calc-wrapper a {
    display: inline-flex; align-items: center; gap: 9px;
    padding: 13px 36px; background: #28A745; color: #fff !important;
    font-size: 16px; font-weight: 500; text-decoration: none;
    border-radius: 50px; box-shadow: 0 4px 14px rgba(40,167,69,.3);
    transition: all .2s;
}
.cta-calc-wrapper a:hover { background: #218838; transform: translateY(-2px); }


/* ===================== MOBILE MENU DROPDOWN ===================== */
/* Luôn render trong DOM, ẩn/hiện bằng max-height để animation mượt */
.v24-mobile-menu {
    display: none; /* ẩn trên desktop */
}


/* ===================== ẨN FOOTER CŨ ===================== */
/* Dùng class .v24-page trên <body> để override footer_news cũ */
body.v24-page #footer,
body.v24-page footer.footer,
body.v24-page footer.bg-light,
body.v24-page .footer.bg-light,
body.v24-page .footer-bottom,
body.v24-page .fix_tel,
body.v24-page .zalo-container,
body.v24-page #footer1,
body.v24-page .landmax-alo-phone { display: none !important; }


/* ===================== MOBILE MENU OPEN STATE ===================== */
.v24-mobile-menu.open {
    max-height: 600px !important;
    border-top-color: var(--border-gold) !important;
}

/* ===================== RESPONSIVE HEADER ===================== */
@media (max-width: 768px) {
    .v24-nav-main { display: none !important; }
    .v24-nav-cta  { display: none !important; }
    .v24-toggler  { display: flex !important; }
    .v24-nav-inner {
        height: auto !important;
        padding: 12px 16px !important;
        flex-wrap: nowrap !important;
        gap: 0 !important;
        position: relative;
    }
    .v24-logo { flex: 1; }
    .v24-logo img { height: 36px !important; }

    /* Mobile menu container */
    .v24-mobile-menu {
        display: block !important;
        width: 100%;
        max-height: 0;
        overflow: hidden;
        transition: max-height .32s ease;
        background: var(--white);
        border-top: 1px solid transparent;
        position: absolute;
        top: 60px;
        left: 0;
        right: 0;
        z-index: 9999;
        box-shadow: 0 8px 24px rgba(14,32,64,.12);
    }
    .v24-mobile-menu ul  { list-style: none !important; margin: 0 !important; padding: 0 !important; }
    .v24-mobile-menu li  { display: block !important; margin: 0 !important; }
    .v24-mobile-menu a,
    .v24-mobile-menu .nav-link {
        display: block !important;
        padding: 13px 20px !important;
        font-size: 15px !important;
        font-weight: 400 !important;
        color: var(--navy) !important;
        text-decoration: none !important;
        border-bottom: 1px solid var(--border) !important;
        transition: background .15s !important;
    }
    .v24-mobile-menu a:hover { background: var(--gold-pale) !important; color: var(--gold) !important; }
    .v24-mobile-menu .v24-mob-cta {
        font-weight: 600 !important;
        color: var(--gold) !important;
        background: var(--gold-pale) !important;
    }
    /* Dropdown trong mobile */
    .v24-mobile-menu .dropdown-menu {
        position: static !important;
        float: none !important;
        border: none !important;
        box-shadow: none !important;
        background: var(--cream) !important;
        padding: 0 !important;
    }
    .v24-mobile-menu .dropdown-item {
        padding: 10px 32px !important;
        font-size: 14px !important;
        border-bottom: 1px solid var(--border) !important;
    }
}

/* ===================== RESPONSIVE FOOTER MOBILE ===================== */
.v24-footer-mobile { display: none; }

@media (max-width: 768px) {
    .v24-footer-main   { display: none !important; }
    .v24-footer-topbar { display: none !important; }
    .v24-footer-mobile { display: block !important; }
    .v24-footer-bottom-bar { order: 999; }
    .v24-footer-bottom-inner {
        flex-direction: column !important;
        text-align: center !important;
        gap: 8px !important;
        padding: 16px !important;
    }
    /* Đưa bottom bar xuống dưới cùng footer mobile */
    .v24-footer {
        display: flex !important;
        flex-direction: column !important;
    }
    .v24-footer-mobile  { order: 1; }
    .v24-footer-bottom-bar { order: 2; }
}
