/*
 * Car Center Honduras - main.css
 * CSS compartido: header, footer, nav, botones globales, hero, inventario, stats, financiamiento, contacto.
 * Autor: Alex Toro - alextoro.lat
 */

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

:root {
    --primary:       #777AEF;
    --primary-dark:  #3F3590;
    --primary-light: #777aef;
    --black:         #000000;
    --white:         #ffffff;
    --gray-100:      #f5f5f7;
    --gray-200:      #e0e0e6;
    --gray-400:      #9999aa;
    --gray-600:      #555566;
    --gray-800:      #1a1a24;
    --gray-900:      #0d0d14;
    --green-wa:      #25D366;
    --font:          'Outfit', sans-serif;
}

html { scroll-behavior: smooth; }

body {
    font-family: var(--font);
    background: var(--black);
    color: var(--white);
    overflow-x: hidden;
}

/* ===================== HEADER ===================== */
header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    padding: 0 5%;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background 0.4s ease, backdrop-filter 0.4s ease, border-color 0.4s ease;
    border-bottom: 1px solid transparent;
}

header.scrolled {
    background: var(--primary);
    backdrop-filter: blur(12px);
    border-bottom-color: rgba(255,255,255,0.06);
}

header.header-light {
    background: rgba(255,255,255,0.97);
    backdrop-filter: blur(12px);
    border-bottom-color: rgba(0,0,0,0.07);
}

header.header-light nav a          { color: rgba(0,0,0,0.7); }
header.header-light nav a:hover    { color: var(--black); }
header.header-light nav a::after   { background: var(--primary); }
header.header-light .header-cta    { background: var(--green-wa) !important; color: var(--white) !important; }
header.header-light .hamburger span { background: var(--black); }

header.header-purple {
    background: var(--primary);
    backdrop-filter: none;
    border-bottom-color: rgba(255,255,255,0.1);
}

header.header-purple nav a          { color: rgba(255,255,255,0.85); }
header.header-purple nav a:hover    { color: var(--white); }
header.header-purple nav a::after   { background: rgba(255,255,255,0.6); }
header.header-purple .header-cta    { background: var(--green-wa) !important; color: var(--white) !important; }
header.header-purple .hamburger span { background: var(--white); }

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    margin-left: 5%;
}

.logo-img {
    height: 48px;
    width: auto;
    display: block;
    transition: filter 0.3s ease;
    transition: height 0.4s ease;
}

header .logo-img               { filter: brightness(0) invert(1); }
header.header-light .logo-img  { filter: brightness(0) saturate(100%) invert(18%) sepia(60%) saturate(800%) hue-rotate(220deg) brightness(90%); }
header.header-purple .logo-img { filter: brightness(0) invert(1); }

header.scrolled .logo-img {height:40px; }

/* ===================== HERO LOGO GRANDE ===================== */
.hero-logo-large {
    position: absolute;
    top: 70px;   
    left: 9%;
    z-index: 3;
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.hero-logo-large img {
    height: 70px;
    width: auto;
    filter: brightness(0) invert(1);
    display: block;
}

.hero-logo-large.hidden {
    opacity: 0;
    display: none;
    pointer-events: none;
}


@media (max-width: 1280px) {
    .hero-logo-large img {
        height: 70px;
    }

    .hero h1 {
        font-size: clamp(34px, 4.7vw, 56px);
    }

    .hero p {
        font-size: 16px;
    }

    .hero-badge {
        font-size: 11px;
        padding: 6px 13px;
    }
}

@media (max-width: 768px) {
    .hero-content {
        padding-top: 88px;
    }
    .hero-logo-large img {
        height: 60px;
    }
}

/* Ocultar logo del header cuando hero-logo está visible */
header.hero-visible .logo {
    opacity: 0;
    pointer-events: none;
}

header .logo {
    transition: opacity 0.4s ease;
}

@media (max-width: 768px) {
    .hero-logo-large img {
        height: 80px;
    }
}

/* Nav */
nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-item {
    position: relative;
    display: flex;
    align-items: center;
}

.nav-item > a { display: flex; align-items: center; }

nav a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    font-size: 18px;
    font-weight: 500;
    padding: 8px 14px;
    position: relative;
    transition: color 0.3s;
    letter-spacing: 0.2px;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: 4px; left: 14px;
    width: 0; height: 2px;
    background: var(--primary-light);
    transition: width 0.3s ease;
}

nav a:hover          { color: var(--white); }
nav a:hover::after   { width: calc(100% - 28px); }

.nav-arrow {
    display: inline-flex;
    align-items: center;
    margin-left: 3px;
    font-size: 13px;
    transition: transform 0.3s ease;
}

.nav-item:hover > a .nav-arrow { transform: rotate(180deg); }

nav a.active          { color: var(--white); }
nav a.active::after   { width: calc(100% - 28px); }

/* WhatsApp CTA header */
.header-cta {
    background: var(--green-wa) !important;
    color: var(--white) !important;
    border-radius: 4px;
    padding: 9px 20px !important;
    font-weight: 600 !important;
    transition: background 0.3s !important;
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.header-cta::after { display: none !important; }
.header-cta:hover  { background: #1ebe5d !important; color: var(--white) !important; }
.header-cta i      { font-size: 16px; }

/* ===================== DROPDOWN ===================== */
.dropdown {
    position: absolute;
    top: 100%; left: 50%;
    transform: translateX(-50%) translateY(4px);
    background: var(--white);
    border-radius: 8px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.14), 0 2px 8px rgba(0,0,0,0.08);
    padding: 12px 0 8px;
    min-width: 210px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s;
    z-index: 999;
}

.dropdown::before {
    content: '';
    position: absolute;
    top: -5px; left: 50%;
    transform: translateX(-50%);
    width: 10px; height: 5px;
    background: var(--white);
    clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
    filter: drop-shadow(0 -1px 1px rgba(0,0,0,0.06));
}

.nav-item:hover .dropdown {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}

.dropdown a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-600) !important;
    transition: background 0.2s, color 0.2s, padding-left 0.2s;
    white-space: nowrap;
}

.dropdown a::after { display: none !important; }

.dropdown a i {
    font-size: 17px;
    color: var(--primary-light);
    flex-shrink: 0;
    transition: color 0.2s;
}

.dropdown a:hover   { background: var(--primary) !important; color: var(--white) !important; padding-left: 22px; }
.dropdown a:hover i { color: var(--white); }

.dropdown-divider {
    height: 1px;
    background: rgba(0,0,0,0.06);
    margin: 4px 12px;
}

/* ===================== HAMBURGER ===================== */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 6px;
    z-index: 1001;
}

.hamburger span {
    width: 24px; height: 2px;
    background: var(--white);
    transition: all 0.3s;
    display: block;
}

.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ===================== MOBILE MENU ===================== */
.mobile-menu {
    display: none;
    position: fixed;
    top: 72px; left: 0; right: 0;
    background: var(--white);
    z-index: 999;
    padding: 16px 0 24px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
    transform: translateY(-8px);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.mobile-menu.open { transform: translateY(0); opacity: 1; }

.mobile-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 13px 24px;
    color: var(--gray-800);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    transition: background 0.2s, color 0.2s;
}

.mobile-menu a:hover { background: rgba(63,53,144,0.05); color: var(--primary); }
.mobile-menu a i     { font-size: 18px; color: var(--primary-light); }

.mobile-submenu {
    background: var(--gray-100);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.mobile-submenu.open    { max-height: 300px; }
.mobile-submenu a       { padding-left: 44px; font-size: 14px; color: var(--gray-600); }
.mobile-submenu a:hover { color: var(--primary); }

.mobile-menu-item-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 13px 24px;
    color: var(--gray-800);
    font-size: 15px;
    font-weight: 500;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.mobile-menu-item-toggle:hover { background: rgba(63,53,144,0.05); color: var(--primary); }
.mobile-menu-item-toggle .toggle-left { display: flex; align-items: center; gap: 10px; }
.mobile-menu-item-toggle i.toggle-icon { font-size: 14px; transition: transform 0.3s; color: var(--gray-400); }
.mobile-menu-item-toggle.active i.toggle-icon { transform: rotate(180deg); color: var(--primary); }

.mobile-menu .mobile-wa {
    margin: 16px 24px 0;
    background: var(--green-wa);
    color: var(--white) !important;
    border-radius: 6px;
    justify-content: center;
    font-weight: 700;
    border-bottom: none !important;
}

.mobile-menu .mobile-wa:hover { background: #1ebe5d !important; color: var(--white) !important; }
.mobile-menu .mobile-wa i     { color: var(--white) !important; }

/* ===================== BOTONES GLOBALES ===================== */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--primary);
    color: var(--white);
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
    padding: 14px 28px;
    border-radius: 4px;
    transition: background 0.3s, transform 0.2s;
    border: none;
    cursor: pointer;
}

.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); }

.btn-outline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    color: var(--white);
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
    padding: 14px 28px;
    border-radius: 4px;
    border: 1px solid rgba(255,255,255,0.3);
    transition: border-color 0.3s, background 0.3s;
    cursor: pointer;
}

.btn-outline:hover { border-color: var(--primary-light); background: rgba(119,122,239,0.08); }

.btn-white {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--white);
    color: var(--primary);
    text-decoration: none;
    font-size: 15px;
    font-weight: 700;
    padding: 14px 28px;
    border-radius: 4px;
    transition: background 0.3s;
}

.btn-white:hover { background: var(--gray-100); }

/* ===================== SECTIONS BASE ===================== */
section { padding: 100px 5%; }

.section-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--primary-light);
    margin-bottom: 12px;
}

.section-title {
    font-size: clamp(28px, 3.5vw, 46px);
    font-weight: 800;
    letter-spacing: -1.5px;
    line-height: 1.1;
    margin-bottom: 48px;
}



/* ===================== FADE UP ANIMATION ===================== */
.fade-up {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Animacion inicial hero */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ===================== HERO ===================== */
.hero {
    position: relative;
    height: 100vh;
    min-height: 700px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
    padding-bottom: 160px;
}

.hero-bg {
    position: absolute; inset: 0;
    background-size: cover;
    background-position: center 40%;
    transition: transform 0.1s ease-out;
}

.hero-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(to right, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.6) 50%, rgba(0,0,0,0.3) 100%);
}

.hero-overlay-bottom {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 200px;
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
}

.hero-content {
    position: relative;
    z-index: 2;
    padding: 0 5%;
    padding-top: 72px;
    max-width: 680px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(63,53,144,0.3);
    border: 1px solid rgba(119,122,239,0.4);
    color: var(--primary-light);
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    padding: 7px 16px;
    border-radius: 3px;
    margin-bottom: 28px;
    animation: fadeUp 0.8s ease both;
}

.hero-badge span {
    width: 6px; height: 6px;
    background: var(--primary-light);
    border-radius: 50%;
    animation: pulse 2s ease infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: 0.5; transform: scale(0.8); }
}

.hero h1 {
    font-size: clamp(38px, 5.5vw, 72px);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -2px;
    margin-bottom: 20px;
    animation: fadeUp 0.8s ease 0.1s both;
}

.hero h1 em { font-style: normal; color: var(--primary-light); }

.hero p {
    font-size: 17px;
    font-weight: 400;
    color: rgba(255,255,255,0.7);
    line-height: 1.6;
    margin-bottom: 36px;
    max-width: 480px;
    animation: fadeUp 0.8s ease 0.2s both;
}

.hero-actions {
    display: flex;
    gap: 14px;
    animation: fadeUp 0.8s ease 0.3s both;
}

/* ===================== SEARCH BAR ===================== */
.search-bar {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    z-index: 10;
    padding: 0 5%;
}

.search-inner {
    background: var(--gray-900);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px;
    padding: 24px 28px;
    display: grid;
    grid-template-columns: repeat(4, 1fr) auto;
    gap: 16px;
    align-items: end;
    max-width: 1100px;
    margin: 0 auto;
}

.search-field label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: var(--gray-400);
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.search-field select,
.search-field input {
    width: 100%;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 4px;
    color: var(--white);
    font-family: var(--font);
    font-size: 14px;
    font-weight: 500;
    padding: 10px 14px;
    appearance: none;
    transition: border-color 0.3s;
    outline: none;
}

.search-field select:focus,
.search-field input:focus { border-color: var(--primary-light); }

.search-field select option { background: var(--gray-900); }

.search-btn {
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 4px;
    font-family: var(--font);
    font-size: 14px;
    font-weight: 700;
    padding: 11px 28px;
    cursor: pointer;
    transition: background 0.3s;
    white-space: nowrap;
    letter-spacing: 0.5px;
}

.search-btn:hover { background: var(--primary-dark); }

/* ===================== INVENTARIO (home) ===================== */
#inventario {
    padding-top: 80px;
    padding-bottom: 100px;
    background: var(--white);
    scroll-margin-top: 72px;
}

.inventory-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 48px;
}

.inventory-header .section-title { margin-bottom: 0; color: var(--black); }
.inventory-header .section-label { color: var(--primary); }

.view-all {
    color: var(--primary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    position: relative;
    padding-bottom: 2px;
}

.view-all::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    width: 0; height: 1px;
    background: var(--primary);
    transition: width 0.3s;
}

.view-all:hover::after { width: 100%; }

/* Grid uniforme 3 columnas */
.inventory-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

/* ===================== VEHICLE CARDS ===================== */
.vehicle-card {
    background: var(--white);
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 10px;
    overflow: hidden;
    transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s;
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.vehicle-card:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(63,53,144,0.12);
}

.card-img-wrap { overflow: hidden; position: relative; }

.card-img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.vehicle-card:hover .card-img { transform: scale(1.03); }

.card-badge {
    position: absolute;
    top: 12px; left: 12px;
    background: var(--primary);
    color: var(--white);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    padding: 5px 10px;
    border-radius: 3px;
}

.card-body {
    padding: 20px 20px 22px;
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}

.card-name {
    font-size: 17px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 12px;
    letter-spacing: -0.3px;
    line-height: 1.2;
}

.card-divider { width: 100%; height: 1px; background: rgba(63,53,144,0.15); margin-bottom: 16px; }

.card-specs {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(0,0,0,0.07);
}

.spec {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    flex: 1;
    font-size: 12px;
    font-weight: 500;
    color: var(--gray-600);
    text-align: center;
    min-width: 0;
}

.spec i     { font-size: 22px; color: var(--primary); }
.spec span  { font-size: 12px; font-weight: 500; color: var(--gray-600); }

.card-footer {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: auto;
}

.card-price {
    font-size: 24px;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -0.5px;
}

.card-price .currency { font-size: 16px; font-weight: 600; margin-right: 2px; color: var(--primary); }

.btn-details {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--primary);
    color: var(--white);
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    padding: 12px 18px;
    border-radius: 6px;
    transition: background 0.3s;
    white-space: nowrap;
    flex-shrink: 0;
}

.btn-details:hover { background: var(--primary-dark); }

/* ===================== STATS ===================== */
.stats-section {
    position: relative;
    padding: 120px 5%;
    overflow: hidden;
    scroll-margin-top: 72px;
}

.stats-bg {
    position: absolute; inset: 0;
    background-size: cover;
    background-position: center;
}

.stats-overlay {
    position: absolute; inset: 0;
    background: rgba(0,0,0,0.82);
}

.stats-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
}

.stats-content .section-label { display: block; margin-bottom: 12px; }
.stats-content .section-title { margin-bottom: 64px; }

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.stat-item { text-align: center; }

.stat-number {
    font-size: clamp(42px, 5vw, 64px);
    font-weight: 900;
    color: var(--white);
    letter-spacing: -2px;
    line-height: 1;
    margin-bottom: 8px;
}

.stat-number em { font-style: normal; color: var(--primary-light); }

.stat-label {
    font-size: 13px;
    font-weight: 500;
    color: rgba(255,255,255,0.5);
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

/* ===================== FINANCIAMIENTO ===================== */
.financing-section {
    background: var(--primary);
    padding: 100px 5%;
    scroll-margin-top: 72px;
}

.financing-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
    max-width: 1100px;
    margin: 0 auto;
}

.financing-content .section-label { color: rgba(255,255,255,0.6); }
.financing-content .section-title { color: var(--white); margin-bottom: 20px; }

.financing-content p {
    font-size: 16px;
    line-height: 1.7;
    color: rgba(255,255,255,0.75);
    margin-bottom: 36px;
}

.financing-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.financing-feature {
    background: rgba(255,255,255,0.1);
    border-radius: 6px;
    padding: 24px 22px;
}

.feature-icon {
    width: 40px; height: 40px;
    background: rgba(255,255,255,0.15);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
    font-size: 20px;
    color: var(--white);
}

.financing-feature h4 { font-size: 15px; font-weight: 700; color: var(--white); margin-bottom: 6px; }
.financing-feature p  { font-size: 13px; color: rgba(255,255,255,0.65); line-height: 1.5; margin-bottom: 0; }

/* ===================== CONTACTO (home) ===================== */
.contact-section {
    background: var(--white);
    padding: 100px 5%;
    scroll-margin-top: 72px;
}

.contact-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: start;
    max-width: 1000px;
    margin: 0 auto;
}

.contact-section .section-title { margin-bottom: 20px; color: var(--black); }

.contact-section > .contact-inner > div > p {
    font-size: 16px;
    color: var(--gray-600);
    line-height: 1.7;
    margin-bottom: 40px;
}

.social-links { display: flex; flex-direction: column; gap: 14px; }

.social-link {
    display: flex;
    align-items: center;
    gap: 16px;
    text-decoration: none;
    color: var(--black);
    font-size: 15px;
    font-weight: 500;
    padding: 14px 18px;
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 6px;
    transition: border-color 0.3s, color 0.3s;
    position: relative;
    overflow: hidden;
}

.social-link::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 0;
    background: var(--primary);
    transition: width 0.3s ease;
    z-index: 0;
}

.social-link:hover { color: var(--white); border-color: var(--primary); }
.social-link:hover::before { width: 100%; }
.social-link > * { position: relative; z-index: 1; }

.social-icon {
    width: 36px; height: 36px;
    background: rgba(63,53,144,0.1);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 18px;
    color: var(--primary);
    transition: background 0.3s, color 0.3s;
}

.social-link:hover .social-icon { background: rgba(255,255,255,0.2); color: var(--white); }

.contact-right { display: flex; flex-direction: column; gap: 28px; }

.contact-info-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--primary);
    margin-bottom: 16px;
}

.location-card {
    background: var(--gray-100);
    border: 1px solid rgba(0,0,0,0.06);
    border-radius: 8px;
    padding: 28px;
}

.location-card h4 { font-size: 16px; font-weight: 700; margin-bottom: 8px; color: var(--black); }
.location-card p  { font-size: 14px; color: var(--gray-600); line-height: 1.6; margin-bottom: 16px; }

.location-hours { display: flex; flex-direction: column; gap: 6px; }

.hour-row { display: flex; justify-content: space-between; font-size: 14px; }
.hour-row .day  { color: var(--gray-600); }
.hour-row .time { color: var(--black); font-weight: 500; }

.whatsapp-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #25D366;
    color: var(--white);
    text-decoration: none;
    font-size: 15px;
    font-weight: 700;
    padding: 16px 24px;
    border-radius: 6px;
    transition: background 0.3s;
    width: fit-content;
}

.whatsapp-btn:hover { background: #1ebe5d; }
.whatsapp-btn i     { font-size: 22px; }

.contact-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--primary-dark);
    color: var(--white);
    text-decoration: none;
    font-size: 15px;
    font-weight: 700;
    padding: 16px 24px;
    border-radius: 6px;
    transition: background 0.3s;
    width: fit-content;
}

.contact-btn:hover { background: var(--primary) }
.contact-btn i     { font-size: 22px; }

/* ===================== FOOTER ===================== */
footer {
    background: var(--black);
    border-top: 1px solid rgba(255,255,255,0.06);
    padding: 90px 0% 36px;
}

.footer-top {
    display: grid;
    grid-template-columns: 0fr 1.5fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 52px;
}


.footer-top,
.footer-bottom {
    padding: 0 10%;
}

.footer-brand p   { font-size: 15px; color: var(--gray-400); line-height: 1.75; margin-top: 18px; max-width: 280px; }
.footer-logo-img  { height: 38px; width: auto; filter: brightness(0) invert(1); }

.footer-col h5 { font-size: 12px; font-weight: 700; color: var(--white); letter-spacing: 2px; text-transform: uppercase; margin-bottom: 22px; }

.footer-col a {
    display: block;
    color: var(--gray-400);
    text-decoration: none;
    font-size: 15px;
    font-weight: 400;
    margin-bottom: 13px;
    position: relative;
    width: fit-content;
    padding-bottom: 1px;
    transition: color 0.3s;
}

.footer-col a::after { content: ''; position: absolute; bottom: 0; left: 0; width: 0; height: 1px; background: var(--primary-light); transition: width 0.3s ease; }
.footer-col a:hover          { color: var(--white); }
.footer-col a:hover::after   { width: 100%; }

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.06);
    padding-top: 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.footer-bottom p { font-size: 14px; color: var(--gray-600); }

.footer-bottom a {
    color: var(--gray-600);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s;
    position: relative;
    padding-bottom: 1px;
}

.footer-bottom a::after { content: ''; position: absolute; bottom: 0; left: 0; width: 0; height: 1px; background: var(--primary-light); transition: width 0.3s; }
.footer-bottom a:hover          { color: var(--white); }
.footer-bottom a:hover::after   { width: 100%; }

/* ===================== BACK TO TOP ===================== */
.back-to-top {
    position: fixed;
    bottom: 32px; right: 32px;
    width: 46px; height: 46px;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 10%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 20px;
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.3s, visibility 0.3s, transform 0.3s, background 0.3s;
    box-shadow: 0 4px 16px rgba(63,53,144,0.35);
}

.back-to-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover   { background: var(--primary-dark); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(63,53,144,0.45); }

/* ===================== RESPONSIVE ===================== */
@media (max-width: 1024px) {
    .search-inner       { grid-template-columns: 1fr 1fr; }
    .inventory-grid     { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .stats-grid         { grid-template-columns: repeat(2, 1fr); gap: 40px; }
    .financing-inner    { grid-template-columns: 1fr; gap: 48px; }
    .footer-top         { grid-template-columns: 1fr 1fr; gap: 40px; }
}

@media (max-width: 768px) {
    nav { display: none; }
    .hamburger { display: flex; }
    
    

    /* ── Hero mobile ── */
    .hero {
        height: auto;
        min-height: 100svh;
        padding-bottom: 0;
        justify-content: flex-start;
    }

    .hero-content {
        padding-top: 88px;       
        padding-bottom: 32px;
        max-width: 100%;
    }

    .hero-badge { font-size: 15px;
    font-weight: 600; }

    .hero h1 { letter-spacing: -1px; }

    /* ── Buscador: fluye debajo del contenido ── */
    .search-bar {
        position: relative;
        bottom: auto;
        left: auto;
        right: auto;
        padding: 0 4% 32px;
        z-index: 2;
    }

    .search-inner {
        grid-template-columns: 1fr;
        border-radius: 8px;
    }

    /* ── Resto ── */
    .inventory-grid     { grid-template-columns: 1fr; }
    .contact-inner      { grid-template-columns: 1fr; gap: 48px; }
    .financing-features { grid-template-columns: 1fr; }

    .footer-top    { grid-template-columns: 1fr; gap: 32px; }
    .footer-bottom { flex-direction: column; gap: 12px; text-align: center; }

    .stats-grid    { grid-template-columns: repeat(2, 1fr); }

    .back-to-top   { bottom: 20px; right: 20px; width: 42px; height: 42px; font-size: 18px; }
}
/* ===================== PAGE LOADER ===================== */
#page-loader {
    position: fixed;
    inset: 0;
    background: var(--white);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

#page-loader.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(63,53,144,0.15);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===================== CAR CENTER CERTIFIED ===================== */
.certified-section {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    background-color: #0d0d1a;
    background-size: cover;
    background-position: center;
    overflow: hidden;
}

.certified-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(10,8,40,0.88) 0%, rgba(30,20,80,0.78) 100%);
    z-index: 1;
}

.certified-inner {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 80px;
    max-width: 1100px;
    width: 100%;
    margin: 0 auto;
    padding: 0 5%;
}

/* Logo lado izquierdo */
.certified-logo {
    flex-shrink: 0;
    width: 300px;
}

.certified-logo img {
    width: 100%;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 8px 48px rgba(0,0,0,0.6));
}

/* Fallback si no hay logo cargado */
.certified-logo-placeholder {
    width: 260px;
    height: 260px;
    background: linear-gradient(135deg, #3F3590, #777aef);
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: 3px solid rgba(255,255,255,0.2);
    box-shadow: 0 0 64px rgba(119,122,239,0.35);
}

.certified-logo-placeholder i {
    font-size: 64px;
    color: #fff;
}

.certified-logo-placeholder span {
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    text-align: center;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    line-height: 1.4;
}

/* Contenido lado derecho */
.certified-content {
    flex: 1;
    min-width: 0;
}

.certified-titulo {
    font-size: clamp(20px, 2.4vw, 30px);
    font-weight: 700;
    color: #fff;
    line-height: 1.4;
    margin-bottom: 44px;
}

.certified-pilares {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 44px;
}

.certified-pilar {
    display: flex;
    align-items: center;
    gap: 16px;
    background: transparent;
    border: 2px solid #fff;
    border-radius: 50px;
    padding: 16px 28px;
    transition: background 0.2s, border-color 0.2s;
}

.certified-pilar:hover {
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.7);
}

.certified-pilar i {
    font-size: 26px;
    color: #fff;
    flex-shrink: 0;
}

.certified-pilar span {
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.certified-subtitulo {
    font-size: 19px;
    color: #fff;
    line-height: 1.7;
    margin-bottom: 14px;
    font-weight: 500;
}

.certified-tagline {
    font-size: 18px;
    color: rgba(255,255,255,0.7);
    font-style: italic;
}

/* Responsive */
@media (max-width: 860px) {
    .certified-section {
        height: auto;
        padding: 80px 5%;
    }

    .certified-inner {
        flex-direction: column;
        gap: 48px;
        text-align: center;
        padding: 0;
    }

    .certified-logo {
        width: 200px;
        margin: 0 auto;
    }

    .certified-logo-placeholder {
        width: 200px;
        height: 200px;
        margin: 0 auto;
    }

    .certified-pilares {
        grid-template-columns: 1fr 1fr;
    }

    .certified-pilar {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .certified-pilares {
        grid-template-columns: 1fr;
    }
}
/* ── WhatsApp flotante mobile ── */
.mobile-wa-float {
    display: none;
    position: fixed;
    bottom: 24px;
    left: 20px;
    width: 50px;
    height: 50px;
    background: var(--green-wa);
    color: var(--white);
    border-radius: 10px;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    text-decoration: none;
    z-index: 997;
    box-shadow: 0 4px 16px rgba(37,211,102,0.4);
    transition: background 0.3s, transform 0.2s;
}

.mobile-wa-float:hover { background: #1ebe5d; transform: translateY(-2px); }

@media (max-width: 768px) {
    .mobile-wa-float { display: flex; }
}

/* ===================== POR QUÉ CAR CENTER ===================== */
.porque-home-section {
    background: var(--primary);
    padding: 100px 5%;

}

.porque-home-inner {
    max-width: 1100px;
    margin: 5% auto;
}

.porque-home-header {
    margin-bottom: 48px;
}

.porque-home-header .section-title {
    margin-bottom: 0;
}

.porque-home-header > p {
    display: none;
}

.porque-home-features {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    grid-template-rows: auto auto;
    gap: 20px;
}

/* Las 4 primeras cards: 2 columnas izquierda */
.porque-home-feature:nth-child(1) { grid-column: 1; grid-row: 1; }
.porque-home-feature:nth-child(2) { grid-column: 2; grid-row: 1; }
.porque-home-feature:nth-child(3) { grid-column: 1; grid-row: 2; }
.porque-home-feature:nth-child(4) { grid-column: 2; grid-row: 2; }

/* 5ta card: columna derecha, ocupa ambas filas — destacada */
.porque-home-feature:nth-child(5) {
    grid-column: 3;
    grid-row: 1 / 3;
    background: var(--primary-dark);
    max-width: 100%;
      display: flex;
    flex-direction: column;
}

.porque-home-feature:nth-child(5) .porque-home-icon {
    background: rgba(255,255,255,0.15);
}

.porque-home-feature:nth-child(5) .porque-home-icon i {
    color: var(--white);
}

.porque-home-feature:nth-child(5) h4 {
    color: var(--white);
    font-size: 22px;
    line-height: 1.25;
}



.porque-home-feature:nth-child(5) p {
    color: rgba(255,255,255,0.75);
    font-size: 15px;
    line-height: 1.7;
}

.porque-home-feature {
    background: var(--gray-100);
    border-radius: 10px;
    padding: 32px 28px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.porque-home-feature:not(:nth-child(5)):hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 36px rgba(63,53,144,0.1);
}

.porque-home-icon {
    width: 48px; height: 48px;
    background: rgba(63,53,144,0.08);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.porque-home-icon i   { font-size: 24px; color: var(--primary); }
.porque-home-feature h4 { font-size: 15px; font-weight: 700; color: var(--gray-800); margin-bottom: 8px; }
.porque-home-feature p  { font-size: 13px; color: var(--gray-600); line-height: 1.6; margin: 0; }

@media (max-width: 1024px) {
    .porque-home-features {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: unset;
    }
    .porque-home-feature:nth-child(1),
    .porque-home-feature:nth-child(2),
    .porque-home-feature:nth-child(3),
    .porque-home-feature:nth-child(4),
    .porque-home-feature:nth-child(5) {
        grid-column: auto;
        grid-row: auto;
    }
    .porque-home-feature:nth-child(5) {
        grid-column: 1 / -1;
    }
}
@media (max-width: 768px) {
    .porque-home-section {
        padding: 64px 5% 80px;
    }
    .porque-home-inner {
        margin: 0 auto;
    }
    .porque-home-features {
        grid-template-columns: 1fr;
        grid-template-rows: unset;
        gap: 16px;
    }
    .porque-home-feature:nth-child(1),
    .porque-home-feature:nth-child(2),
    .porque-home-feature:nth-child(3),
    .porque-home-feature:nth-child(4),
    .porque-home-feature:nth-child(5) {
        grid-column: auto;
        grid-row: auto;
    }
    .porque-home-feature {
        padding: 24px 22px;
    }
    .porque-home-feature:nth-child(5) h4 {
        font-size: 18px;
    }
}
@media (max-width: 600px) {
    .porque-home-features { grid-template-columns: 1fr; }
    .porque-home-feature:nth-child(5) { grid-column: auto; }
}

.porque-home-card-logo {
    display: block;
    width: 140px;
    margin-top: 50px;
    padding-top: 2px;
  
}