@import url('https://fonts.googleapis.com/css2?family=Be+Vietnam+Pro:wght@400;500;600;700&display=swap');

/* Vietpan.vn Brand Colors & High-Precision Typography */
:root {
    --vietpan-green: #1B5E52;
    --vietpan-green-dark: #124038;
    --vietpan-green-light: #257e6f;
    --vietpan-red: #D9383A;
    --vietpan-red-dark: #b5292b;
    --vietpan-bg-light: #f8faf9;
    --vietpan-header-height: 82px;
    --vietpan-bottom-nav-height: 62px;
}

body {
    font-family: 'Be Vietnam Pro', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--vietpan-bg-light);
    color: #2b3036;
    font-size: 0.95rem;
    line-height: 1.6;
    letter-spacing: -0.01em;
    padding-top: calc(var(--vietpan-header-height) + 10px);
    padding-bottom: calc(var(--vietpan-bottom-nav-height) + 15px);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Concise Typography Scale */
h1, .h1 { font-size: 1.85rem; font-weight: 700; letter-spacing: -0.02em; }
h2, .h2 { font-size: 1.55rem; font-weight: 700; letter-spacing: -0.02em; }
h3, .h3 { font-size: 1.35rem; font-weight: 700; letter-spacing: -0.01em; }
h4, .h4 { font-size: 1.15rem; font-weight: 600; }
h5, .h5 { font-size: 1.02rem; font-weight: 600; }
h6, .h6 { font-size: 0.92rem; font-weight: 600; }

/* Custom Utilities */
.bg-vietpan-green { background-color: var(--vietpan-green) !important; }
.bg-vietpan-red { background-color: var(--vietpan-red) !important; }
.text-vietpan-green { color: var(--vietpan-green) !important; }
.text-vietpan-red { color: var(--vietpan-red) !important; }

.btn-vietpan-green {
    background-color: var(--vietpan-green);
    color: #ffffff;
    border: none;
    font-weight: 600;
    transition: all 0.25s ease;
}
.btn-vietpan-green:hover {
    background-color: var(--vietpan-green-dark);
    color: #ffffff;
    transform: translateY(-1px);
}

.btn-vietpan-red {
    background-color: var(--vietpan-red);
    color: #ffffff;
    border: none;
    font-weight: 600;
    transition: all 0.25s ease;
}
.btn-vietpan-red:hover {
    background-color: var(--vietpan-red-dark);
    color: #ffffff;
    transform: translateY(-1px);
}

/* Fixed Header Top - 2 Rows Centered Layout */
.fixed-top-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1030;
    background: #ffffff;
    border-bottom: 1px solid rgba(27, 94, 82, 0.12);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
    height: var(--vietpan-header-height);
}

.header-logo-long {
    max-height: 40px;
    width: auto;
    object-fit: contain;
}

.header-slogan-wrapper {
    margin-top: 1px;
}

.header-slogan {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--vietpan-green);
    letter-spacing: 0.02em;
}

/* 16:9 Aspect Ratio Container */
.ratio-16x9 {
    aspect-ratio: 16 / 9;
    object-fit: cover;
    width: 100%;
}

/* Hero Banner (Fixed Ratio 1920 x 600) - Tăng độ sáng và rực rỡ */
.ratio-banner-hero {
    aspect-ratio: 1920 / 600;
    max-height: 420px;
    min-height: 140px;
    object-fit: cover;
    width: 100%;
    filter: brightness(1.08) contrast(1.04) saturate(1.08);
    transition: filter 0.3s ease;
}

/* Vietpan Brand Emerald Fresh & Bright Overlay */
.banner-emerald-overlay {
    position: relative;
    overflow: hidden;
}

/* Layer 1: Lớp phủ mờ xanh lục bảo tươi sáng (Soft Light Blend Mode) */
.banner-emerald-overlay::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 104, 56, 0.22) 0%, rgba(0, 140, 75, 0.15) 50%, rgba(0, 87, 48, 0.25) 100%);
    mix-blend-mode: soft-light;
    pointer-events: none;
    z-index: 2;
}

/* Layer 2: Dải ánh sáng tươi & tương phản nhẹ chân chữ */
.banner-emerald-overlay::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.06) 0%, rgba(0, 35, 18, 0.22) 100%);
    pointer-events: none;
    z-index: 3;
}

/* Ensure Caption Content (Badge, Title, Description & Contact Button) floats ON TOP of Overlay layer */
.banner-emerald-overlay .carousel-caption {
    z-index: 10 !important;
    position: absolute;
    pointer-events: auto;
}

.banner-emerald-overlay .carousel-caption .badge {
    position: relative;
    z-index: 12;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.45) !important;
    font-weight: 700 !important;
    letter-spacing: 0.04em;
}

.banner-emerald-overlay .carousel-caption h4 {
    position: relative;
    z-index: 12;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.95), 0 1px 4px rgba(0, 0, 0, 0.85) !important;
}

.banner-emerald-overlay .carousel-caption p {
    position: relative;
    z-index: 12;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.95) !important;
    opacity: 0.98 !important;
}

.banner-emerald-overlay .carousel-caption .btn {
    position: relative;
    z-index: 12;
    box-shadow: 0 4px 14px rgba(220, 53, 69, 0.55), 0 2px 6px rgba(0, 0, 0, 0.4) !important;
    transition: all 0.2s ease-in-out;
}

.banner-emerald-overlay .carousel-caption .btn:hover {
    transform: translateY(-2px) scale(1.04);
    box-shadow: 0 6px 20px rgba(220, 53, 69, 0.75), 0 3px 10px rgba(0, 0, 0, 0.5) !important;
}

@media (max-width: 991px) {
    .ratio-banner-hero {
        aspect-ratio: 1920 / 600;
        max-height: 280px;
        min-height: 120px;
    }
}

@media (max-width: 576px) {
    .ratio-banner-hero {
        aspect-ratio: 1920 / 600;
        max-height: 180px;
        min-height: 100px;
    }
}

/* Minimalist Transparent Carousel Overlay (No Background Card) */
.carousel-caption-minimal {
    position: absolute;
    bottom: 1rem;
    left: 2rem;
    z-index: 2;
    padding: 0;
    margin: 0;
    text-align: left;
    max-width: 580px;
}

.text-shadow-strong {
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.95), 0 1px 3px rgba(0, 0, 0, 0.85);
}

/* Card Styling */
.vietpan-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.04);
    transition: all 0.25s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
}
.vietpan-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(27, 94, 82, 0.1);
}

/* Fixed Bottom Navigation Bar */
.fixed-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1040;
    background: var(--vietpan-green);
    height: var(--vietpan-bottom-nav-height);
    box-shadow: 0 -3px 15px rgba(0,0,0,0.12);
}

.bottom-nav-container {
    max-width: 1200px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    position: relative;
}

.bottom-nav-item {
    color: rgba(255, 255, 255, 0.88);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.92rem;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 20px;
    transition: all 0.2s ease;
}
.bottom-nav-item i {
    font-size: 1.15rem;
}
.bottom-nav-item:hover, .bottom-nav-item.active {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
}

/* Prominent Floating 3D Home Button */
.center-home-circle-btn {
    position: absolute;
    left: 50%;
    bottom: 10px;
    transform: translateX(-50%);
    width: 68px;
    height: 68px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #ffffff 0%, #f0f4f3 70%, #d8e4e1 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35), 0 3px 6px rgba(0, 0, 0, 0.2), inset 0 2px 3px rgba(255, 255, 255, 0.9), inset 0 -2px 4px rgba(0, 0, 0, 0.15);
    border: none;
    z-index: 1050;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    text-decoration: none;
}
.center-home-circle-btn:hover {
    transform: translateX(-50%) scale(1.08);
    box-shadow: 0 12px 25px rgba(217, 56, 58, 0.45), 0 4px 10px rgba(0, 0, 0, 0.25), inset 0 2px 4px rgba(255, 255, 255, 1);
}
.center-home-circle-inner {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.12);
}
.center-home-circle-inner img {
    max-width: 40px;
    max-height: 40px;
    object-fit: contain;
}

/* Social Media Icons Bar */
.social-icon-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    text-decoration: none;
    font-size: 0.78rem;
    font-weight: 700;
    transition: all 0.2s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
}
.social-icon-btn:hover {
    transform: scale(1.12);
    color: #ffffff;
}
.social-facebook { background-color: #1877F2; }
.social-zalo { background-color: #0068FF; font-size: 0.65rem; }
.social-youtube { background-color: #FF0000; }
.social-tiktok { background-color: #000000; }

/* Floating Contact Bubble & Modal Window */
.contact-bubble-btn {
    position: fixed;
    bottom: calc(var(--vietpan-bottom-nav-height) + 16px);
    right: 20px;
    z-index: 1045;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--vietpan-red), #b82527);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    box-shadow: 0 6px 18px rgba(217, 56, 58, 0.4);
    cursor: pointer;
    transition: all 0.3s ease;
    animation: pulseBubble 2s infinite;
}
.contact-bubble-btn:hover {
    transform: scale(1.1);
}
@keyframes pulseBubble {
    0% { box-shadow: 0 0 0 0 rgba(217, 56, 58, 0.6); }
    70% { box-shadow: 0 0 0 14px rgba(217, 56, 58, 0); }
    100% { box-shadow: 0 0 0 0 rgba(217, 56, 58, 0); }
}

.contact-modal-window {
    position: fixed;
    bottom: calc(var(--vietpan-bottom-nav-height) + 75px);
    right: 20px;
    width: 350px;
    max-width: calc(100vw - 40px);
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.18);
    border: 1px solid rgba(27, 94, 82, 0.15);
    z-index: 1046;
    display: none;
    overflow: hidden;
    animation: slideUpModal 0.25s cubic-bezier(0.165, 0.84, 0.44, 1);
}
@keyframes slideUpModal {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
.contact-modal-header {
    background: linear-gradient(135deg, var(--vietpan-green), var(--vietpan-green-dark));
    color: #ffffff;
    padding: 16px;
    position: relative;
}
.contact-modal-header .btn-close-white {
    position: absolute;
    top: 12px;
    right: 14px;
    cursor: pointer;
    font-size: 1.4rem;
    color: #ffffff;
    opacity: 0.8;
}

/* Horizontal Swipe Grid Container */
.swipe-grid-container,
.swipe-pages-container {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    width: 100%;
}
.swipe-grid-container::-webkit-scrollbar,
.swipe-pages-container::-webkit-scrollbar {
    display: none;
}
.swipe-page,
.swipe-page-item {
    flex: 0 0 100%;
    min-width: 100%;
    max-width: 100%;
    scroll-snap-align: start;
    box-sizing: border-box;
}

/* Footer Styling */
footer {
    background: linear-gradient(135deg, #13443b, #0c2d27);
    color: rgba(255, 255, 255, 0.85);
    padding-top: 45px;
    padding-bottom: 25px;
    font-size: 0.9rem;
}
footer h5 {
    font-size: 1.05rem;
    letter-spacing: -0.01em;
}

/* Mobile Responsiveness Fine-Tuning */
@media (max-width: 576px) {
    :root {
        --vietpan-header-height: 76px;
        --vietpan-bottom-nav-height: 58px;
    }
    body {
        font-size: 0.9rem;
    }
    .header-logo-long {
        max-height: 34px;
    }
    .header-slogan {
        font-size: 0.8rem;
    }
    .center-home-circle-btn {
        width: 60px;
        height: 60px;
        bottom: 8px;
    }
    .center-home-circle-inner {
        width: 48px;
        height: 48px;
    }
    .center-home-circle-inner img {
        max-width: 34px;
        max-height: 34px;
    }
    .bottom-nav-item {
        font-size: 0.82rem;
        padding: 4px 10px;
    }
}

/* Infinite Seamless Horizontal Marquee Ticker for Partner Logos */
.partner-marquee-wrapper {
    overflow: hidden;
    position: relative;
    width: 100%;
    padding: 12px 0;
    user-select: none;
}
.partner-marquee-track {
    display: flex;
    align-items: center;
    gap: 30px;
    width: max-content;
    animation: marqueeScroll 25s linear infinite;
}
.partner-marquee-wrapper:hover .partner-marquee-track {
    animation-play-state: paused;
}
.partner-item {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 60px;
    padding: 0 20px;
    background: #ffffff;
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: all 0.25s ease;
}
.partner-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(27, 94, 82, 0.15);
}
.partner-item img {
    max-height: 40px;
    width: auto;
    object-fit: contain;
}

@keyframes marqueeScroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* 3 Criteria Minimalist Cards */
.criteria-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.07) !important;
}

.criteria-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 14px 28px rgba(27, 94, 82, 0.12) !important;
    border-color: rgba(27, 94, 82, 0.3) !important;
}

.crit-icon-badge {
    width: 68px;
    height: 68px;
    background: linear-gradient(135deg, rgba(27, 94, 82, 0.1), rgba(27, 94, 82, 0.03));
    color: var(--vietpan-green);
    font-size: 1.6rem;
    transition: transform 0.3s ease, background-color 0.3s ease, color 0.3s ease;
}

.criteria-card:hover .crit-icon-badge {
    transform: scale(1.08);
    background: var(--vietpan-green);
    color: #ffffff;
}

.crit-btn-link {
    background-color: rgba(27, 94, 82, 0.06);
    color: var(--vietpan-green);
    border: 1px solid rgba(27, 94, 82, 0.15);
    transition: all 0.25s ease;
    font-size: 0.82rem;
}

.crit-btn-link:hover {
    background-color: var(--vietpan-green);
    color: #ffffff !important;
    border-color: var(--vietpan-green);
    box-shadow: 0 4px 12px rgba(27, 94, 82, 0.25);
}

/* Social Icon Buttons (Facebook, Zalo, Gmail) */
.social-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    color: #ffffff !important;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 700;
    transition: all 0.25s ease;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}
.social-icon-btn:hover {
    transform: translateY(-2px) scale(1.08);
    box-shadow: 0 5px 12px rgba(0,0,0,0.25);
}
.social-facebook { background-color: #1877F2; }
.social-zalo { background-color: #0068FF; font-size: 0.72rem; letter-spacing: 0.5px; }
.social-gmail { background-color: #EA4335; }

/* Sub-category block highlight & smooth scroll margin */
.sub-category-block {
    scroll-margin-top: 100px;
    transition: box-shadow 0.4s ease, border-color 0.4s ease;
}
.sub-category-block.highlight-subgroup {
    box-shadow: 0 0 0 4px rgba(0, 104, 56, 0.35), 0 12px 32px rgba(0, 104, 56, 0.18) !important;
    border-color: var(--vietpan-green) !important;
}

.category-tab-bar-card .dropdown-menu {
    border-top: 3px solid var(--vietpan-green) !important;
}

.category-tab-bar-card .dropdown-item:hover {
    background-color: rgba(0, 104, 56, 0.08);
    color: var(--vietpan-green);
}

@media (min-width: 768px) {
    .category-tab-dropdown:hover .dropdown-menu {
        display: block;
        margin-top: 0;
        animation: fadeIn 0.2s ease-in-out;
    }
}

