/*
Theme Name: VinFast 3S - Eco Tech
Theme URI: https://vinfasthungthinhphat.vn
Description: WordPress theme built for VinFast 3S Dealer with focus on performance, SEO and modern Eco-Tech UI.
Version: 1.0.1
Author: Antigravity AI
Author URI: https://vinfasthungthinhphat.vn
Tags: custom-theme, seo, high-performance, vinfast, eco-tech
*/

/* Performance: Aspect ratio for Sliders to prevent Reflow */
.vinfast-slider.swiper {
    aspect-ratio: 1800/800;
    height: auto;
    min-height: 400px;
    background: #000;
}

.vfpb-car-slider.swiper {
    aspect-ratio: 1200/600;
    min-height: 300px;
}

@media (max-width: 767px) {


    .vfpb-car-slider.swiper {
        aspect-ratio: unset !important;
        min-height: unset !important;
        height: auto !important;
    }
}

/* --- Base Design System --- */
/* --- Font Face Declarations --- */
@font-face {
    font-family: 'Be Vietnam Pro';
    src: url('assets/fonts/be-vietnam-pro-300.woff2') format('woff2');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Be Vietnam Pro';
    src: url('assets/fonts/be-vietnam-pro-regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Be Vietnam Pro';
    src: url('assets/fonts/be-vietnam-pro-500.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Be Vietnam Pro';
    src: url('assets/fonts/be-vietnam-pro-600.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Be Vietnam Pro';
    src: url('assets/fonts/be-vietnam-pro-700.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Be Vietnam Pro';
    src: url('assets/fonts/be-vietnam-pro-800.woff2') format('woff2');
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Be Vietnam Pro';
    src: url('assets/fonts/be-vietnam-pro-900.woff2') format('woff2');
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Outfit';
    src: url('assets/fonts/outfit-300.woff2') format('woff2');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Outfit';
    src: url('assets/fonts/outfit-regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Outfit';
    src: url('assets/fonts/outfit-500.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Outfit';
    src: url('assets/fonts/outfit-600.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Outfit';
    src: url('assets/fonts/outfit-700.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Outfit';
    src: url('assets/fonts/outfit-800.woff2') format('woff2');
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Outfit';
    src: url('assets/fonts/outfit-900.woff2') format('woff2');
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Playfair Display';
    src: url('assets/fonts/playfair-display-regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Playfair Display';
    src: url('assets/fonts/playfair-display-600.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Playfair Display';
    src: url('assets/fonts/playfair-display-700.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Inter';
    src: url('assets/fonts/inter-regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Inter';
    src: url('assets/fonts/inter-500.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Inter';
    src: url('assets/fonts/inter-600.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Inter';
    src: url('assets/fonts/inter-700.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Montserrat';
    src: url('assets/fonts/montserrat-800.woff2') format('woff2');
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}

:root {
    --primary: #004C97;
    /* VinFast Blue */
    --accent: #4CAF50;
    /* Eco Green */
    --luxury-gold: #D4AF37;
    /* Gold Accent */
    --accent-glow: rgba(212, 175, 55, 0.4);
    --dark: #1A1A1A;
    /* Softer, Elegant Black */
    --light: #F8FAFC;
    /* Off-White */
    --white: #FFFFFF;
    --gray: #1e293b;
    /* Slate 800 - Maximum contrast for readability */
    --border: rgba(226, 232, 240, 0.5);
    --glass: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.3);
    --font-main: 'Be Vietnam Pro', 'Outfit', sans-serif;
    --font-body: 'Be Vietnam Pro', sans-serif;
    --font-serif: 'Playfair Display', serif;
    --bento-radius: 24px;
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 20px 40px -10px rgb(0 0 0 / 0.1), 0 8px 12px -6px rgb(0 0 0 / 0.1);
    --transition: all 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);

    /* Layout Tokens */
    --header-height: 100px;
    --header-scrolled-height: 70px;
    --header-mobile-height: 75px;
    --admin-bar-height: 32px;
    --admin-bar-mobile-height: 46px;
}

/* --- Global Animations --- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* PERFORMANCE FIX: .fade-in starts hidden and only animates when IntersectionObserver
   adds .is-visible. This prevents all 424 nodes from triggering layout simultaneously
   on page load — the primary source of the 230ms forced reflow. */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    /* No animation here — wait for .is-visible */
}

.fade-in.is-visible {
    animation: fadeInUp 0.8s ease forwards;
}


* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background: var(--white);
    color: var(--dark);
    font-family: var(--font-body);
    line-height: 1.8;
    overflow-x: hidden;
    scroll-behavior: smooth;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Site Layout clearing */
.header-spacer {
    display: block;
    width: 100%;
    height: var(--header-height);
}

@media (max-width: 768px) {
    .header-spacer {
        height: var(--header-mobile-height) !important;
    }
}

/* Glassmorphism Effect */
.glass-effect {
    background: var(--glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
}

/* Typography Enhancement */
h1,
h2,
h3,
h4 {
    font-family: var(--font-main);
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 0.5em;
    letter-spacing: -0.01em;
    line-height: 1.4;
}

p {
    margin-bottom: 1.2em;
    color: #475569;
    font-weight: 400;
}

a {
    color: var(--primary);
    text-decoration: none;
    /* PERF: Use specific properties instead of 'all' to reduce layout tracking */
    transition: color 0.3s ease, opacity 0.3s ease;
}

a:hover {
    color: var(--accent);
}

/* Sticky Header Refined */
#site-header {
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 2000;
    /* PERF: Specific transition instead of 'all' */
    transition: background 0.4s ease, box-shadow 0.4s ease, top 0.4s ease;
}

/* WordPress Admin Bar Compatibility */
.admin-bar #site-header {
    top: 32px;
}

@media screen and (max-width: 782px) {
    .admin-bar #site-header {
        top: 46px;
    }
}

#site-header.scrolled {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(15px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.site-navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: var(--header-height);
    /* PERF: Only transition height, not all properties */
    transition: height 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

#site-header.scrolled .site-navbar {
    height: var(--header-scrolled-height);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 35px;
}

.nav-menu a {
    font-weight: 600;
    font-size: 0.95rem;
    color: #1e293b;
    position: relative;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    /* PERF: Only 'width' changes — no need to track all properties */
    transition: width 0.3s ease;
}

.nav-menu a:hover::after {
    width: 100%;
}

/* --- Site Logo & Title Alignment --- */
.logo-link {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    /* PERF: Specific property, not 'all' */
    transition: transform 0.3s ease;
}

.logo-link:hover {
    transform: translateX(5px);
}

.logo-v {
    background: var(--primary);
    color: white;
    width: 45px;
    height: 45px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1.5rem;
    box-shadow: 0 4px 10px rgba(0, 76, 151, 0.25);
    flex-shrink: 0;
}

.logo-img {
    height: 48px;
    width: auto;
    object-fit: contain;
    transition: transform 0.3s;
    flex-shrink: 0;
}

.logo-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.site-title {
    margin: 0;
    font-size: 1.35rem;
    color: var(--primary);
    letter-spacing: 0.5px;
    font-weight: 600;
    line-height: 1.1;
    text-transform: uppercase;
}

.accent-text {
    color: var(--accent);
}

.site-description {
    font-size: 0.7rem;
    color: var(--gray);
    font-weight: 500;
    letter-spacing: 1px;
    margin-top: 2px;
    text-transform: uppercase;
    opacity: 0.8;
}

/* Car Card Enhancement (Glass Effect) */
.car-card {
    background: var(--white);
    border-radius: 24px;
    overflow: hidden;
    padding: 10px;
    /* PERF: Specific transition props — transform, box-shadow, border-color only */
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), box-shadow 0.4s ease, border-color 0.4s ease;
    border: 1px solid var(--border);
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    /* PERF: Promote to composite layer to prevent reflow on hover */
    will-change: transform;
}

.car-card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.15);
    border-color: var(--accent);
}

/* Global Layout Utilities */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.car-image {
    border-radius: 18px;
    overflow: hidden;
    height: 220px;
}

/* Scroll Progress Bar */
#scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 4px;
    background: linear-gradient(to right, var(--primary), var(--accent));
    z-index: 1100;
    width: 0;
}

/* Responsive */
/* Mobile Menu Toggle Animation */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1100;
}

.menu-toggle span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: var(--primary);
    border-radius: 3px;
    transition: var(--transition);
}

.menu-toggle.is-active {
    position: relative;
    z-index: 3000 !important;
    /* Higher than primary menu and overlay */
}

.menu-toggle.is-active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.menu-toggle.is-active span:nth-child(2) {
    opacity: 0;
    transform: translateX(-20px);
}

.menu-toggle.is-active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

@media (max-width: 768px) {
    .menu-toggle {
        display: flex !important;
    }

    .nav-menu {
        display: flex;
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        height: 100vh;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        padding: 40px;
        gap: 30px;
        transition: var(--transition);
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
        z-index: 1050;
    }

    .nav-menu.is-active {
        right: 0 !important;
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
    }

    .nav-menu li {
        width: 100%;
        text-align: center;
    }

    .nav-menu a {
        font-size: 1.5rem;
        text-transform: uppercase;
        letter-spacing: 2px;
    }

    body.menu-open {
        overflow: hidden;
        /* Prevent scrolling when menu is open */
    }

    /* Hide header buttons on mobile to prevent overflow */
    .header-cta {
        display: none !important;
    }

    .site-navbar {
        height: var(--header-mobile-height);
    }

    .logo-v {
        width: 38px;
        height: 38px;
        font-size: 1.2rem;
        border-radius: 8px;
    }

    .logo-img {
        max-height: 38px;
    }

    .site-title {
        font-size: 1rem;
        letter-spacing: 0.2px;
    }

    .site-description {
        font-size: 0.6rem;
        margin-top: 1px;
    }

    .logo-link {
        gap: 10px;
    }

    /* Slider mobile refinement: fixed height to prevent thin look with desktop fallbacks */
    .vinfast-slider {
        margin-top: 0;
        padding-top: 0;
        height: calc(100vh - 75px) !important;
        aspect-ratio: unset !important;
    }

    .vinfast-slider .slide-bg::after {
        background: linear-gradient(180deg, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0.85) 100%) !important;
    }

    .vinfast-slider .swiper-slide {
        height: 100% !important;
        display: flex;
        flex-direction: column;
    }

    .vinfast-slider .slide-bg {
        position: absolute !important;
        height: 100% !important;
        top: 0;
        left: 0;
        width: 100%;
    }

    .vinfast-slider .slide-bg img {
        height: 100% !important;
        object-fit: cover !important;
    }

    .vinfast-slider .slide-content {
        position: absolute;
        top: 50%;
        left: 0;
        width: 100%;
        transform: translateY(-50%);
        height: auto !important;
    }

    .slide-text {
        padding: 0 20px !important;
        text-align: center !important;
        margin: 0 auto !important;
    }

    .slide-text h2,
    .slide-text .slide-title-text {
        font-size: 1.8rem !important;
        margin-bottom: 15px;
        line-height: 1.2 !important;
    }

    .slide-text p {
        font-size: 0.95rem !important;
        margin-bottom: 25px;
    }

    .slide-text .btn {
        padding: 12px 30px !important;
        font-size: 0.9rem !important;
    }

    /* Car grid mobile refinement */
    .car-grid {
        gap: 20px;
    }

    .car-card {
        flex: 1 1 100% !important;
        max-width: none !important;
        min-width: 0 !important;
    }

    .car-info {
        padding: 25px !important;
    }

    .section-title h2 {
        font-size: 2rem !important;
    }

    .section-title p {
        font-size: 1rem !important;
    }
}

/* Why Choose Electric Section */
.why-eco-section {
    background: var(--light);
    padding: 100px 0;
    overflow: hidden;
}

.why-eco-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.why-eco-image img {
    width: 100%;
    height: 450px;
    object-fit: cover;
    border-radius: 24px;
    box-shadow: var(--shadow-lg);
    transition: transform 0.5s ease;
}

.why-eco-image img:hover {
    transform: scale(1.02);
}

.why-eco-text h2 {
    font-size: 2.8rem;
    line-height: 1.2;
    margin-bottom: 30px;
}

.why-eco-text p {
    font-size: 1.15rem;
    color: #475569;
    margin-bottom: 30px;
}

.why-eco-text ul {
    list-style: none;
    margin-bottom: 40px;
}

.why-eco-text li {
    font-size: 1.1rem;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.why-eco-text .btn {
    padding: 16px 45px;
    font-size: 1.1rem;
    font-weight: 600;
}

@media (max-width: 991px) {
    .why-eco-grid {
        gap: 40px;
    }

    .why-eco-text h2 {
        font-size: 2.2rem;
    }
}

@media (max-width: 768px) {
    .why-eco-section {
        padding: 60px 0;
    }

    .why-eco-grid {
        grid-template-columns: 1fr;
        gap: 50px;
        text-align: center;
    }

    .why-eco-text li {
        justify-content: center;
    }

    .why-eco-image img {
        height: 300px;
    }

    .why-eco-text h2 {
        font-size: 1.8rem;
    }
}



/* Swiper Slider Customization (Specific to homepage hero) */
.vinfast-slider {
    width: 100%;
    height: auto;
    aspect-ratio: 1800/800;
    margin-top: 0;
    position: relative;
    overflow: hidden;
    background: #000;
}

.vinfast-slider .slide-content {
    height: auto !important;
}

/* Before Swiper is initialized, only show the first slide and hide the others to prevent overlap */
.vinfast-slider:not(.swiper-initialized) .swiper-slide:not(:first-child) {
    display: none !important;
}

.vinfast-slider:not(.swiper-initialized) .swiper-slide:first-child {
    opacity: 1 !important;
}

.vinfast-slider:not(.swiper-initialized) .swiper-slide:first-child .slide-text {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

/* Disable LCP zoom and text transitions on first slide ONLY before Swiper initializes to preserve LCP timing */
.vinfast-slider:not(.swiper-initialized) .swiper-slide:first-child .slide-bg img {
    transition: none !important;
    transform: none !important;
}
.vinfast-slider:not(.swiper-initialized) .swiper-slide:first-child .slide-text {
    transition: none !important;
    transform: none !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.vinfast-slider .swiper-slide {
    position: relative;
    overflow: hidden;
}

.slide-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    display: block;
}

.slide-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.1) 100%);
    z-index: 2;
    pointer-events: none;
}

.slide-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 8s ease-out;
    z-index: 1;
    position: relative;
}

.swiper-slide-active .slide-bg img {
    transform: scale(1.1);
}

.slide-content {
    position: relative;
    z-index: 10;
    height: 100%;
    width: 100%;
    display: flex;
    align-items: center;
    background: transparent !important;
    pointer-events: none;
}

.slide-text {
    max-width: 800px;
    padding: 0;
    padding-right: 40px;
    color: white;
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s ease-out 0.5s;
    pointer-events: auto;
}



.swiper-slide-active .slide-text {
    opacity: 1;
    transform: translateY(0);
}

.slide-text h2,
.slide-text .slide-title-text {
    font-family: 'Outfit', 'Be Vietnam Pro', sans-serif;
    font-weight: 500;
    letter-spacing: -0.02em;
    color: white;
    font-size: 4.5rem;
    line-height: 1.1;
    margin-bottom: 20px;
}

.slide-text p {
    font-family: 'Be Vietnam Pro', sans-serif;
    font-weight: 300;
    letter-spacing: 0.01em;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.85);
    font-size: 1.4rem;
    margin-bottom: 40px;
}

/* Car Grid Display */
.car-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    margin-top: 50px;
}

.car-card {
    flex: 1 1 calc(33.333% - 30px);
    max-width: 400px;
    min-width: 320px;
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    transition: all 0.4s ease;
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
}

@media (max-width: 767px) {
    .car-card {
        min-width: 0 !important;
        max-width: 100% !important;
        overflow: visible !important;
        height: auto !important;
    }

    .car-image {
        flex-shrink: 0;
    }
}

.car-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.car-image {
    height: 220px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f4f6f8;
    /* Light gray to make cars pop */
}

.car-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s;
}

.car-card:hover .car-image img {
    transform: scale(1.05);
}

.car-info {
    padding: 30px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.car-price {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary);
}

/* --- Gutenberg Block Premium Styles --- */
.car-dynamic-content {
    font-family: var(--font-main);
    color: var(--dark);
    line-height: 1.8;
}

.car-dynamic-content .alignwide {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.car-dynamic-content .wp-block-group {
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 40px;
}

.car-dynamic-content .wp-block-heading {
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 20px;
    line-height: 1.3;
}

.car-dynamic-content .wp-block-paragraph {
    color: #475569;
    font-size: 1.15rem;
    margin-bottom: 25px;
}

.car-dynamic-content .wp-block-image img {
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
    transition: transform 0.3s ease;
}

.car-dynamic-content .wp-block-image img:hover {
    transform: translateY(-5px);
}

.car-dynamic-content ul,
.car-dynamic-content ol {
    color: #475569;
    font-size: 1.1rem;
    padding-left: 20px;
    margin-bottom: 30px;
}

.car-dynamic-content li {
    margin-bottom: 12px;
}

.car-dynamic-content .wp-block-columns {
    gap: 40px;
    align-items: center;
    margin-bottom: 40px;
}

@media (max-width: 768px) {
    .car-dynamic-content .wp-block-columns {
        flex-direction: column;
        gap: 20px;
    }
}

.car-dynamic-content .wp-block-quote {
    border-left: 4px solid var(--accent);
    padding: 20px 30px;
    background: #f8fafc;
    border-radius: 0 12px 12px 0;
    margin: 40px 0;
    font-style: italic;
    color: var(--primary);
}

/* --- Archive Filter Pills --- */
.archive-filter .filter-pill {
    display: inline-block;
    padding: 10px 24px;
    background: #f1f5f9;
    color: var(--dark);
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.archive-filter .filter-pill:hover {
    background: #e2e8f0;
    transform: translateY(-2px);
}

.archive-filter .filter-pill.active {
    background: var(--primary);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(0, 76, 151, 0.3);
}

/* --- Archive Hover Enhancement --- */
.car-card {
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.car-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.08);
}

.car-image {
    position: relative;
    background: #f8fafc;
}

.car-image img {
    mix-blend-mode: multiply;
    /* Gives it an integrated catalog look if images have white backgrounds */
}

/* --- Version Tab Switcher --- */
.version-tab-btn {
    transition: all 0.3s ease !important;
}

.version-tab-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 76, 151, 0.2);
}

.spec-tab-btn {
    transition: all 0.3s ease !important;
}

.spec-tab-btn:hover {
    background: #e2e8f0 !important;
}

.spec-tab-btn.active:hover {
    background: var(--primary) !important;
}

/* --- Color Dots --- */
.color-dot:hover {
    transform: scale(1.25) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2) !important;
}

/* --- Luxury PDP Enhancements --- */
.text-serif {
    font-family: var(--font-serif);
}

.text-gold {
    color: var(--luxury-gold) !important;
}

/* Bento Grid Layout */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(2, minmax(200px, auto));
    gap: 20px;
}

.bento-item {
    background: white;
    border-radius: var(--bento-radius);
    padding: 40px;
    border: 1px solid var(--border);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.bento-item:hover {
    transform: translateY(-8px);
    border-color: var(--luxury-gold);
    box-shadow: var(--shadow-lg);
}

.bento-1 {
    grid-column: span 2;
    grid-row: span 2;
}

.bento-2 {
    grid-column: span 2;
}

.bento-3 {
    grid-column: span 1;
}

.bento-4 {
    grid-column: span 1;
}

@media (max-width: 768px) {
    .bento-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }

    .bento-1,
    .bento-2,
    .bento-3,
    .bento-4 {
        grid-column: span 1;
        grid-row: span 1;
    }
}

/* 3-Column Spec Table */
.specs-3-col {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin-top: 50px;
}

.spec-column {
    padding: 30px;
    background: #f8fafc;
    border-radius: 20px;
    border-top: 4px solid var(--primary);
}

.spec-column h4 {
    margin-bottom: 25px;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 2px;
}

@media (max-width: 991px) {
    .specs-3-col {
        grid-template-columns: 1fr;
    }
}

/* Interactive Color Swatches */
.luxury-swatch {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 2px solid white;
    box-shadow: 0 0 0 1px #e2e8f0;
}

.luxury-swatch.active {
    box-shadow: 0 0 0 2px var(--luxury-gold);
    transform: scale(1.25);
}

/* Zig-zag Layout */
.showcase-row {
    display: flex;
    align-items: center;
    gap: 100px;
    margin-bottom: 120px;
}

.showcase-row.reverse {
    flex-direction: row-reverse;
}

.showcase-image {
    flex: 1;
    border-radius: 30px;
    overflow: hidden;
}

.showcase-text {
    flex: 1;
}

@media (max-width: 768px) {

    .showcase-row,
    .showcase-row.reverse {
        flex-direction: column;
        gap: 40px;
        margin-bottom: 80px;
    }
}

/* --- Test Drive CTA Contrast Fix --- */
.cta-drive {
    background: var(--primary) !important;
    color: #FFFFFF !important;
}

.cta-drive h2 {
    color: #FFFFFF !important;
}

.cta-drive p {
    color: #FFFFFF !important;
    opacity: 1 !important;
    font-weight: 500;
}

.cta-drive .vfpb-fe-t,
.cta-drive .vfpb-fe-h {
    color: #FFFFFF !important;
}

/* --- Flatpickr Mobile & Touch Optimization --- */
@media screen and (max-width: 768px) {

    /* Make the calendar container slightly larger on mobile */
    .flatpickr-calendar {
        width: 325px !important;
        font-size: 16px !important;
    }

    /* Increase Month/Year Selector Height and Font */
    .flatpickr-months {
        height: 60px !important;
    }

    .flatpickr-month {
        height: 60px !important;
    }

    .flatpickr-current-month {
        font-size: 1.3rem !important;
        padding: 15px 0 !important;
        height: 60px !important;
    }

    .flatpickr-current-month .flatpickr-monthDropdown-months {
        font-size: 1.2rem !important;
        font-weight: 700 !important;
        padding: 5px 12px !important;
    }

    .flatpickr-current-month input.cur-year {
        font-size: 1.2rem !important;
        font-weight: 700 !important;
        padding-left: 8px !important;
    }

    /* Navigation Arrows: Make them much larger and easier to tap */
    .flatpickr-prev-month,
    .flatpickr-next-month {
        height: 60px !important;
        width: 60px !important;
        padding: 15px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        top: 0 !important;
        z-index: 10 !important;
    }

    .flatpickr-prev-month svg,
    .flatpickr-next-month svg {
        width: 26px !important;
        height: 26px !important;
        fill: var(--primary) !important;
    }

    /* Time Picker Optimization */
    .flatpickr-time {
        height: 75px !important;
        line-height: 75px !important;
        border-top: 1px solid var(--border) !important;
    }

    .flatpickr-time input {
        font-size: 1.6rem !important;
        height: 65px !important;
        font-weight: 700 !important;
    }

    .flatpickr-time .flatpickr-time-separator {
        font-size: 1.6rem !important;
        font-weight: 700 !important;
    }

    .flatpickr-time .flatpickr-am-pm {
        font-size: 1.3rem !important;
        width: 32% !important;
        height: 65px !important;
        font-weight: 600 !important;
    }

    /* Day cells: larger for better touch targets */
    .flatpickr-day {
        height: 46px !important;
        line-height: 46px !important;
        max-width: 46px !important;
        font-size: 1.15rem !important;
        margin: 1px 0 !important;
    }

    .flatpickr-weekday {
        font-size: 0.95rem !important;
        font-weight: 700 !important;
        color: var(--primary) !important;
        padding-bottom: 5px !important;
    }

    /* Number Input Arrows (the tiny ones for year/time) - Increase their size and accessibility */
    .numInputWrapper span {
        width: 28px !important;
        border: none !important;
        opacity: 1 !important;
    }

    .numInputWrapper span:after {
        border-left: 7px solid transparent !important;
        border-right: 7px solid transparent !important;
    }

    .numInputWrapper span.arrowUp:after {
        border-bottom: 9px solid var(--primary) !important;
        top: 25% !important;
    }

    .numInputWrapper span.arrowDown:after {
        border-top: 9px solid var(--primary) !important;
        top: 50% !important;
    }

    /* --- Premium Mobile Time Slot Selector --- */
    .vfpb-time-modal {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(15, 23, 42, 0.9);
        backdrop-filter: blur(10px);
        z-index: 100000;
        display: none;
        align-items: flex-end;
        transition: opacity 0.3s ease;
    }

    .vfpb-time-modal.active {
        display: flex;
    }

    .vfpb-time-container {
        width: 100%;
        background: #fff;
        border-radius: 30px 30px 0 0;
        padding: 30px 20px 50px;
        transform: translateY(100%);
        transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
        max-height: 85vh;
        overflow-y: auto;
    }

    .vfpb-time-modal.active .vfpb-time-container {
        transform: translateY(0);
    }

    .vfpb-time-header {
        text-align: center;
        margin-bottom: 25px;
        position: relative;
    }

    .vfpb-time-header h3 {
        font-size: 20px;
        font-weight: 800;
        color: #1e293b;
        margin: 0;
        text-transform: uppercase;
    }

    .vfpb-time-close {
        position: absolute;
        right: 0;
        top: -5px;
        font-size: 24px;
        background: none;
        border: none;
        color: #94a3b8;
        cursor: pointer;
    }

    .vfpb-time-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }

    .vfpb-time-slot {
        background: #f8fafc;
        border: 2px solid #e2e8f0;
        border-radius: 12px;
        padding: 15px 5px;
        text-align: center;
        font-weight: 700;
        font-size: 16px;
        color: #334155;
        transition: all 0.2s ease;
        cursor: pointer;
    }

    .vfpb-time-slot:hover,
    .vfpb-time-slot.active {
        background: var(--primary);
        border-color: var(--primary);
        color: #fff;
        transform: scale(1.05);
    }

    .vfpb-time-slot.disabled {
        opacity: 0.3;
        cursor: not-allowed;
        pointer-events: none;
    }

    .vfpb-time-section-title {
        grid-column: 1 / -1;
        font-size: 13px;
        font-weight: 800;
        color: #64748b;
        text-transform: uppercase;
        margin: 15px 0 5px;
        letter-spacing: 1px;
    }

    .vfpb-date-card:hover,
    .vfpb-date-card.active {
        background: var(--primary) !important;
        border-color: var(--primary) !important;
        transform: translateY(-5px) scale(1.05);
    }

    .vfpb-date-card:hover div,
    .vfpb-date-card.active div {
        color: #fff !important;
    }
}

/* --- Footer Contrast Overrides --- */
#site-footer,
#site-footer h4,
#site-footer h5,
#site-footer a:not(.rescue-link-container),
#site-footer li:not(.rescue-li),
#site-footer span:not(.rescue-text),
#site-footer p,
#site-footer strong {
    color: #94a3b8 !important;
}

#site-footer h4,
#site-footer h5 {
    color: #f1f5f9 !important;
}

#site-footer a:hover {
    color: #3b82f6 !important;
}

#site-footer .footer-services-menu li a {
    color: #94a3b8 !important;
}

#site-footer .copyright-bar,
#site-footer .copyright-bar a {
    color: #94a3b8 !important;
}

#site-footer .footer-col h4 {
    border-bottom: 2px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 10px;
}


/* --- Rescue 24/7 Co-Phased Synchronized Strobe --- */
@keyframes rescue-left-strobe {
    /* Phase 1: Left is Main (1.0), Right is Dim-Sync (0.8) */
    0%,
    12%,
    24% {
        opacity: 1;
    }

    6%,
    18%,
    30% {
        opacity: 0.25;
    }

    /* Phase 2: Right is Main (1.0), Left is Dim-Sync (0.8) */
    45%,
    57%,
    69% {
        opacity: 0.75;
    }

    51%,
    63%,
    75% {
        opacity: 0.2;
    }

    /* Phase 3: Global Pause (Rhythmic Rest) */
    80%,
    100% {
        opacity: 0.15;
    }
}

@keyframes rescue-right-strobe {
    /* Phase 1: Left is Main (1.0), Right is Dim-Sync (0.8) */
    0%,
    12%,
    24% {
        opacity: 0.75;
    }

    6%,
    18%,
    30% {
        opacity: 0.2;
    }

    /* Phase 2: Right is Main (1.0), Left is Dim-Sync (0.8) */
    45%,
    57%,
    69% {
        opacity: 1;
    }

    51%,
    63%,
    75% {
        opacity: 0.25;
    }

    /* Phase 3: Global Pause (Rhythmic Rest) */
    80%,
    100% {
        opacity: 0.15;
    }
}

.rescue-link-container {
    position: relative !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    text-decoration: none !important;
    padding: 0px 18px !important;
    background: transparent !important;
    border: none !important;
    overflow: visible !important;
    border-radius: 4px;
    isolation: isolate !important;
}

.rescue-link-container::before,
.rescue-link-container::after {
    content: "";
    position: absolute;
    top: 8px;
    bottom: 8px;
    width: 60%;
    z-index: -1;
    filter: blur(5px);
    transition: opacity 0.3s ease;
    background: rgb(255, 176, 0) !important;
    box-shadow: 0 0 35px rgb(255, 176, 0) !important;
    will-change: opacity;
}

.rescue-link-container::before {
    left: 0;
    animation: rescue-left-strobe 1.8s ease-in-out infinite !important;
}

.rescue-link-container::after {
    right: 0;
    animation: rescue-right-strobe 1.8s ease-in-out infinite !important;
}

.rescue-icon,
.rescue-text {
    color: #ffffff !important;
    font-weight: 700 !important;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8) !important;
    z-index: 2;
}


/* =======================================================
   NEWS SINGLE POST – Mobile Left-Alignment Fix
   Overrides vf-page-builder's injected text-align: center
   !important rules which affect all pages on mobile,
   but respects inline alignment set by the page builder!
   ======================================================= */
.single-post-wrapper .entry-content p:not([style*="text-align"]),
.single-post-wrapper .entry-content h1:not([style*="text-align"]),
.single-post-wrapper .entry-content h2:not([style*="text-align"]),
.single-post-wrapper .entry-content h3:not([style*="text-align"]),
.single-post-wrapper .entry-content h4:not([style*="text-align"]),
.single-post-wrapper .entry-content h5:not([style*="text-align"]),
.single-post-wrapper .entry-content h6:not([style*="text-align"]),
.single-post-wrapper .entry-content ul,
.single-post-wrapper .entry-content ol,
.single-post-wrapper .entry-content li,
.single-post-wrapper .entry-content blockquote,
.single-post-wrapper .entry-content span:not([style*="text-align"]),
.single-post-wrapper .entry-content div:not([style*="text-align"]) {
    text-align: left !important;
}

@media (max-width: 768px) {
    .single-post-wrapper .entry-content p:not([style*="text-align"]),
    .single-post-wrapper .entry-content h1:not([style*="text-align"]),
    .single-post-wrapper .entry-content h2:not([style*="text-align"]),
    .single-post-wrapper .entry-content h3:not([style*="text-align"]),
    .single-post-wrapper .entry-content h4:not([style*="text-align"]),
    .single-post-wrapper .entry-content h5:not([style*="text-align"]),
    .single-post-wrapper .entry-content h6:not([style*="text-align"]),
    .single-post-wrapper .entry-content ul,
    .single-post-wrapper .entry-content ol,
    .single-post-wrapper .entry-content li,
    .single-post-wrapper .entry-content blockquote,
    .single-post-wrapper .entry-content span:not([style*="text-align"]),
    .single-post-wrapper .entry-content div:not([style*="text-align"]) {
        text-align: left !important;
    }
}

@media (max-width: 600px) {
    .single-post-wrapper .entry-content p:not([style*="text-align"]),
    .single-post-wrapper .entry-content h1:not([style*="text-align"]),
    .single-post-wrapper .entry-content h2:not([style*="text-align"]),
    .single-post-wrapper .entry-content h3:not([style*="text-align"]),
    .single-post-wrapper .entry-content h4:not([style*="text-align"]),
    .single-post-wrapper .entry-content h5:not([style*="text-align"]),
    .single-post-wrapper .entry-content h6:not([style*="text-align"]),
    .single-post-wrapper .entry-content ul,
    .single-post-wrapper .entry-content ol,
    .single-post-wrapper .entry-content li,
    .single-post-wrapper .entry-content blockquote,
    .single-post-wrapper .entry-content span:not([style*="text-align"]),
    .single-post-wrapper .entry-content div:not([style*="text-align"]) {
        text-align: left !important;
    }
}


/* =======================================================
   CONSULTANT WIDGET PREMIUM STYLES
   ======================================================= */
.vinfast-consultants-section {
    padding: 60px 0;
    background: #f8fafc;
    width: 100%;
}

.consultants-slider-container {
    padding: 20px 0 45px !important;
    position: relative;
}

.consultant-card {
    background: #ffffff;
    border-radius: 24px;
    padding: 35px 20px;
    border: 1px solid rgba(226, 232, 240, 0.8);
    text-align: center;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.03), 0 2px 4px -2px rgba(0, 0, 0, 0.03);
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    position: relative;
    box-sizing: border-box;
}

.consultant-card:hover {
    transform: translateY(-8px);
    border-color: var(--primary);
    box-shadow: 0 20px 40px -15px rgba(0, 76, 151, 0.15);
}

.consultant-avatar-wrap {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    overflow: hidden;
    margin-bottom: 20px;
    border: 3px solid #f1f5f9;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.06);
    transition: all 0.4s ease;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.consultant-card:hover .consultant-avatar-wrap {
    border-color: var(--primary);
    transform: scale(1.05);
}

.consultant-avatar-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.consultant-avatar-wrap .default-avatar {
    font-size: 3rem;
    color: #cbd5e1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.consultant-name {
    font-size: 1.15rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 8px;
    line-height: 1.3;
}

.consultant-position {
    font-size: 0.85rem;
    color: #64748b;
    font-weight: 500;
    margin-bottom: 25px;
    min-height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.consultant-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    width: 100%;
    margin-top: auto;
}

.consultant-action-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff !important;
    font-size: 1.1rem;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    text-decoration: none;
    box-sizing: border-box;
}

.consultant-action-btn:hover {
    transform: scale(1.15) translateY(-2px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.15);
}

.consultant-btn-call {
    background: #22c55e;
}

.consultant-btn-call:hover {
    background: #16a34a;
}

.consultant-btn-zalo {
    background: #0068ff;
}

.consultant-btn-zalo:hover {
    background: #0052cc;
}

.consultant-btn-email {
    background: #64748b;
}

.consultant-btn-email:hover {
    background: #475569;
}

/* Swiper Controls Custom Styling for Consultants Slider */
.consultants-slider-container .swiper-button-next,
.consultants-slider-container .swiper-button-prev {
    color: var(--primary) !important;
    width: 44px;
    height: 44px;
    background: #ffffff;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(226, 232, 240, 0.8);
    transition: all 0.3s ease;
    top: 50%;
    transform: translateY(-50%);
}

.consultants-slider-container .swiper-button-next:after,
.consultants-slider-container .swiper-button-prev:after {
    font-size: 16px;
    font-weight: 800;
}

.consultants-slider-container .swiper-button-next:hover,
.consultants-slider-container .swiper-button-prev:hover {
    background: var(--primary);
    color: #ffffff !important;
    border-color: var(--primary);
}

.consultants-slider-container .swiper-pagination-bullet-active {
    background: var(--primary) !important;
}

/* PC Grid Mode override if <= 5 items */
@media (min-width: 768px) {
    .consultants-slider-container.swiper-no-slide-pc .swiper-wrapper {
        display: grid;
        grid-template-columns: repeat(5, 1fr);
        gap: 24px;
        transform: none !important;
        width: 100% !important;
    }
    
    .consultants-slider-container.swiper-no-slide-pc .swiper-slide {
        width: 100% !important;
        margin-right: 0 !important;
        height: auto !important;
    }
    
    .consultants-slider-container.swiper-no-slide-pc .swiper-button-next,
    .consultants-slider-container.swiper-no-slide-pc .swiper-button-prev,
    .consultants-slider-container.swiper-no-slide-pc .swiper-pagination {
        display: none !important;
    }
}

/* =======================================================
   FOOTER WIDGETS (STICKY CONTACT, BACK TO TOP, MOBILE CTA)
   ======================================================= */
.sticky-contact {
    position: fixed;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 9999;
}
.contact-item {
    position: relative;
    width: 50px;
    height: 50px;
    border-radius: 10px 0 0 10px; /* Flat right edge, rounded left edge */
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: -2px 4px 12px rgba(0,0,0,0.15);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-decoration: none;
}
.contact-item:hover {
    transform: translateX(-6px) scale(1.05); /* Slide left on hover */
    box-shadow: -4px 6px 15px rgba(0,0,0,0.25);
}
.contact-label {
    position: absolute;
    right: 65px;
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: 0.3s;
}
.contact-item:hover .contact-label {
    opacity: 1;
    visibility: visible;
}
.contact-item.zalo { background: #0068ff; }
.contact-item.phone { background: #ff4d4d; }
.contact-item.book { background: #1464f4; }
.contact-item.service { background: #151a24; }

/* Mobile Sticky CTA */
.vfpb-mobile-sticky-cta {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    box-shadow: 0 -10px 30px rgba(0,0,0,0.1);
    z-index: 9998;
}
.vfpb-sticky-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 50px;
    background: #1464f4;
    color: #fff;
    border-radius: 100px;
    font-weight: 700;
    text-decoration: none;
    font-size: 14px;
    letter-spacing: 0.5px;
}

/* Pulse Animation */
@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(255, 77, 77, 0.7); }
    70% { box-shadow: 0 0 0 15px rgba(255, 77, 77, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 77, 77, 0); }
}
.pulse { animation: pulse 2s infinite; }
@keyframes pulse-zalo {
    0% { box-shadow: 0 0 0 0 rgba(0, 104, 255, 0.7); }
    70% { box-shadow: 0 0 0 15px rgba(0, 104, 255, 0); }
    100% { box-shadow: 0 0 0 0 rgba(0, 104, 255, 0); }
}
.pulse-zalo { animation: pulse-zalo 2s infinite; }

/* Sticky Contact Color Change on Footer - Only for Service button */
.sticky-contact.on-footer .contact-item.service {
    background: #fff !important;
    border: 1px solid #e2e8f0;
}
.sticky-contact.on-footer .contact-item.service svg {
    fill: #0f172a !important;
}

/* =======================================================
   BACK TO TOP WITH CIRCULAR PROGRESS (GLOBAL)
   ======================================================= */
.vf-back-to-top {
    position: fixed;
    bottom: 94px; /* Stacked neatly above the Chatbot */
    right: 5px;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.08);
    cursor: pointer;
    z-index: 9999 !important;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.9);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.vf-back-to-top.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.vf-back-to-top:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 8px 30px rgba(15, 23, 42, 0.15);
}

.vf-btt-progress {
    position: absolute;
    top: 0;
    left: 0;
    transform: rotate(-90deg);
}

.vf-btt-circle {
    transition: stroke-dashoffset 0.1s linear;
}

.vf-btt-arrow {
    width: 18px;
    height: 18px;
    color: #0f172a;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
    z-index: 2;
}

.vf-btt-arrow svg {
    width: 100%;
    height: 100%;
    display: block;
}

.vf-back-to-top:hover .vf-btt-arrow {
    transform: translateY(-2px);
    color: #1464f4;
}

@media (max-width: 768px) {
    .sticky-contact { display: none !important; }
    .vfpb-mobile-sticky-cta { display: none !important; }
    .mobile-contact-bar { display: grid; }
    body { padding-bottom: 70px; } /* Prevent footer overlap */
    
    .vf-back-to-top {
        bottom: 145px; /* Stacked above the chatbot on mobile */
        right: 5px;
        width: 46px;
        height: 46px;
    }
    .vf-btt-progress {
        width: 46px;
        height: 46px;
    }
}

/* =======================================================
   CUSTOM FIX: TIN TỨC ARTICLE TITLES FONT WEIGHT
   ======================================================= */
.blog-archive .post-content h3,
.blog-archive .post-content h3 a,
.entry-title,
.entry-title a,
.vfpb-fe-it .vfpb-it-text-wrap h3,
.vfpb-widget-post_grid article h3 a {
    font-weight: 500 !important;
}

/* Bot Fallback for Swiper */
.vinfast-slider:not(.swiper-initialized) .swiper-wrapper { display: flex; flex-wrap: nowrap; }
.vinfast-slider:not(.swiper-initialized) .swiper-slide { width: 100% !important; flex-shrink: 0; opacity: 1 !important; visibility: visible !important; }

/* Crawler LCP fixes: hide the dark gradient overlay to expose LCP image directly to Blink's heuristics */
body.is-bot .vinfast-slider .slide-bg::after {
    display: none !important;
}

/* ==========================================================================
   FIX: WordPress Gutenberg Block Editor Layout Constraints
   Bài viết mới (Gutenberg) bị co lại do WordPress tự thêm max-width 
   qua .is-layout-constrained. Override để hiển thị full width.
   ========================================================================== */

/* Reset Gutenberg layout constraints trong single post */
.post-content-container .entry-content .is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)),
.post-content-container .entry-content .is-layout-flow > *,
.post-content-container .entry-content .is-layout-constrained > * {
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* Reset wp-block elements max-width */
.post-content-container .entry-content .wp-block-paragraph,
.post-content-container .entry-content .wp-block-heading,
.post-content-container .entry-content .wp-block-image,
.post-content-container .entry-content .wp-block-list,
.post-content-container .entry-content .wp-block-quote,
.post-content-container .entry-content .wp-block-table,
.post-content-container .entry-content .wp-block-columns,
.post-content-container .entry-content .wp-block-group,
.post-content-container .entry-content .wp-block-cover,
.post-content-container .entry-content .wp-block-media-text,
.post-content-container .entry-content .wp-block-gallery,
.post-content-container .entry-content .wp-block-video,
.post-content-container .entry-content .wp-block-audio,
.post-content-container .entry-content .wp-block-embed,
.post-content-container .entry-content .wp-block-separator,
.post-content-container .entry-content .wp-block-spacer,
.post-content-container .entry-content .wp-block-buttons,
.post-content-container .entry-content .wp-block-code,
.post-content-container .entry-content .wp-block-preformatted,
.post-content-container .entry-content .wp-block-pullquote,
.post-content-container .entry-content .wp-block-verse,
.post-content-container .entry-content .wp-block-details {
    max-width: 100% !important;
}

/* Override WordPress global content size variable */
.post-content-container .entry-content {
    --wp--style--global--content-size: 100%;
    --wp--style--global--wide-size: 100%;
}

/* Ensure images in Gutenberg blocks display full width */
.post-content-container .entry-content .wp-block-image img,
.post-content-container .entry-content figure img {
    max-width: 100%;
    height: auto;
    border-radius: 16px;
    margin: 30px 0;
}

/* Gutenberg gallery full width */
.post-content-container .entry-content .wp-block-gallery {
    width: 100%;
}

/* Reset any WordPress core layout padding */
.post-content-container .entry-content .has-global-padding {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* Ensure Gutenberg columns span full width */
.post-content-container .entry-content .wp-block-columns {
    width: 100%;
    gap: 30px;
}

/* Style Gutenberg blocks to match theme design */
.post-content-container .entry-content .wp-block-quote {
    border-left: 5px solid #3b82f6;
    padding: 25px 25px 25px 40px;
    background: #f1f5f9;
    border-radius: 0 20px 20px 0;
    margin: 40px 0;
    font-style: italic;
    color: #1e293b;
}

.post-content-container .entry-content .wp-block-separator {
    border-color: #e2e8f0;
    margin: 40px 0;
}

.post-content-container .entry-content .wp-block-table table {
    width: 100%;
    border-collapse: collapse;
}

.post-content-container .entry-content .wp-block-table td,
.post-content-container .entry-content .wp-block-table th {
    padding: 12px 16px;
    border: 1px solid #e2e8f0;
}

.post-content-container .entry-content .wp-block-code {
    background: #1e293b;
    color: #e2e8f0;
    padding: 25px;
    border-radius: 16px;
    overflow-x: auto;
}

/* FIX: Force full width for main containers globally to override Gutenberg body/site-blocks constraints */
#site-header,
#primary,
.site-main,
#site-footer,
.single-post-wrapper,
.wp-site-blocks > * {
    max-width: 100% !important;
    width: 100% !important;
}

body .is-layout-constrained > #site-header,
body .is-layout-constrained > #primary,
body .is-layout-constrained > .site-main,
body .is-layout-constrained > #site-footer {
    max-width: 100% !important;
    width: 100% !important;
}



/* FIX: Prevent inline icons, emojis and small pasted images from expanding inside post content */
.entry-content img.emoji,
.entry-content img.wp-smiley,
.entry-content img[class*="emoji"],
.entry-content img[class*="icon"],
.entry-content p img:not([class*="wp-image-"]):not([class*="size-"]):not([class*="attachment-"]),
.entry-content li img:not([class*="wp-image-"]):not([class*="size-"]):not([class*="attachment-"]),
.entry-content span img:not([class*="wp-image-"]):not([class*="size-"]):not([class*="attachment-"]) {
    display: inline-block !important;
    vertical-align: middle !important;
    width: auto !important;
    max-width: 24px !important;
    height: auto !important;
    max-height: 1.25em !important;
    margin: 0 4px !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
}

/* Accessibility: Force white color for form title inside dark premium form to exceed contrast rules */
.home-premium-form .vfpb-form-title {
    color: #ffffff !important;
}

/* Accessibility: Override background-color for page builder placeholder text to pass contrast audits */
#vfpb-td-car-placeholder div,
#vfpb-td-car-placeholder p {
    background-color: #f1f5f9 !important;
}
