/* =========================================
1. VARIABLES & RESET GLOBAL
========================================= */
:root {
    --primary: #5d2a7b;
    --primary-dark: #4a2162; /* Nota: Esto tiene transparencia, revisar si se busca color sólido */
    --accent: #25D366; /* WhatsApp */
    --text-dark: #1f2937;
    --text-light: #4b5563;
    --white: #ffffff;
    --bg-light: #f9fafb;
    --gradient: linear-gradient(135deg, #5d2a7b, #5d2a7b);
    --gradient-hero: linear-gradient(135deg, rgba(93, 42, 123, 0.08) 0%, rgba(93, 42, 123, 0.15) 100%);
    
    /* Sombras */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    
    --radius: 16px;
}

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

html, body {
    overflow-x: hidden; /* Vital para evitar scroll horizontal en móviles */
    width: 100%;
    position: relative;
}

body {
    font-family: 'Poppins', sans-serif;
    color: var(--text-dark);
    background-color: var(--white);
    line-height: 1.6;
}

body.preloader-active {
    overflow: hidden;
}

a.skip-link {
    position: absolute;
    left: 10px;
    top: -40px;
    background: var(--text-dark);
    color: var(--white);
    padding: 8px 16px;
    border-radius: 6px;
    z-index: 2000;
    transition: top 0.2s ease;
}
a.skip-link:focus {
    top: 10px;
}

a { text-decoration: none; transition: 0.3s ease; }
ul { list-style: none; }
img { max-width: 100%; height: auto; display: block; }

/* =========================================
    2. UTILIDADES DE LAYOUT & GRID
========================================= */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.container-navbar {
    max-width: 1200px;
    margin: 0 auto;
    padding: 5px 20px;
}

.section { padding: 20px 0; }
.text-center { text-align: center; }
.flex-col { display: flex; flex-direction: column; }
.mb-4 { margin-bottom: 1.5rem; }

/* Sistema de Grillas */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; }
.grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 30px; }

/* Utilidades de Imagen */
.img-wrapper { border-radius: 20px; box-shadow: var(--shadow-lg); max-width: 258px !important; }
.img-width { max-width: 350px !important; border-radius: 12px;}
.img-logo { max-width: 300px !important; }

/* =========================================
    3. COMPONENTES GLOBALES (Botones, Títulos)
    ========================================= */
/* Botones */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background: var(--primary-dark);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(165, 39, 138, 0.4);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(165, 39, 138, 0.6); }

.btn-outline {
    border: 2px solid var(--primary);
    color: var(--primary);
    background: transparent;
}
.btn-outline:hover { background: var(--primary); color: var(--white); }

.btn-instagram {
    background: var(--primary);
    color: var(--white);
}
.btn-instagram:hover {
    background: var(--primary-dark);
}
.btn-whatsapp {
    background: #05552b;
    color: #ffffff;
    border: 2px solid #01381c;
    box-shadow: 0 6px 18px rgba(5, 85, 43, 0.45);
    font-weight: 600;
}
.btn-whatsapp:hover {
    background: #01381c;
    color: #ffffff;
}
.btn-whatsapp:focus-visible {
    outline: 3px solid rgba(5, 85, 43, 0.65);
    outline-offset: 3px;
}

/* Títulos de Sección */
.section-title {
    margin-bottom: 60px;
    position: relative;
    display: inline-block;
}
.section-title h2 { font-size: 2.5rem; font-weight: 700; color: var(--text-dark); }
.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--primary-dark);
    margin: 15px auto 0;
    border-radius: 2px;
}
.section-lead {
    max-width: 700px;
    margin: 0 auto 40px;
    color: var(--text-light);
    font-size: 1rem;
}

/* =========================================
    4. NAVBAR & NAVEGACIÓN
    ========================================= */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 10px 0;
    z-index: 1000;
    transition: 0.3s;
    background: transparent;
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
}

.nav-content { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    position: relative; 
}

.logo { font-size: 1.2rem; font-weight: 700; color: var(--primary); width: 220px; display: flex; align-items: center; }
.logo img { max-height: 52px; }

.nav-links { display: flex; gap: 30px; align-items: center; }
.nav-links a { color: var(--text-dark); font-weight: 500; font-size: 0.95rem; }
.nav-links a:hover { color: var(--primary); }

.nav-cta {
    background: var(--primary);
    color: white !important;
    padding: 8px 20px;
    border-radius: 20px;
}

/* Botón Móvil (Lógica Home) */
.nav-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: transparent;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    position: relative;
    z-index: 1300;
}

.nav-toggle span {
    width: 24px;
    height: 2px;
    background: var(--primary);
    position: relative;
    display: block;
    transition: all 0.3s ease;
}

.nav-toggle span::before,
.nav-toggle span::after {
    content: '';
    position: absolute;
    left: 0;
    width: 24px;
    height: 2px;
    background: var(--primary);
    transition: transform 0.3s ease, top 0.3s ease;
}

.nav-toggle span::before { top: -6px; }
.nav-toggle span::after { top: 6px; }

.nav-toggle.active span { background: transparent; }
.nav-toggle.active span::before { top: 0; transform: rotate(45deg); }
.nav-toggle.active span::after { top: 0; transform: rotate(-45deg); }

/* Overlay Oscuro */
.nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
    z-index: 1100;
    backdrop-filter: blur(2px);
}
.nav-overlay.visible { opacity: 1; visibility: visible; z-index: 1; }
body.nav-open { overflow: hidden; }

/* =========================================
    5. HERO SECTION
    ========================================= */
.hero {
    padding-top: 100px;
    padding-bottom: 100px;
    background: linear-gradient(135deg,rgba(93, 42, 123, 0.10) 0%, rgba(93, 42, 123, 0.15) 50%);
    position: relative;
    overflow: hidden;
}

.hero-content h1 { font-size: 3.5rem; line-height: 1.2; margin-bottom: 20px; }
.hero-content h1 strong { color: var(--primary); position: relative; }
.hero-content h1 strong::after {
    content: '';
    display: block;
    width: 100%;
    height: 8px;
    background: rgba(93, 42, 123, 0.15);
    position: absolute;
    bottom: 5px; left: 0; z-index: -1;
    border-radius: 4px;
}

.hero-content p { font-size: 1.1rem; color: var(--text-light); margin-bottom: 40px; margin: 0 auto; padding-bottom: 32px;}

.hero-img img { 
    filter: drop-shadow(0 20px 40px rgba(0,0,0,0.15)); 
    transform: rotate(-5deg);
    transition: 0.5s;
    margin: 0 auto;
    width: 272px !important;
}
.hero-img:hover img { transform: rotate(0deg) scale(1.02); }
.hero-btns { display: flex; gap: 15px; }

/* =========================================
    6. TARJETAS Y SECCIONES (Features, Services)
    ========================================= */
/* Tarjetas Básicas (Features) */
.feature-card {
    background: white;
    padding: 40px 30px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    transition: 0.3s;
    border: 1px solid #eee;
    text-align: center;
}
.feature-card:hover { transform: translateY(-10px); box-shadow: var(--shadow-lg); border-color: transparent; }
.feature-icon { font-size: 3rem; color: var(--primary); margin-bottom: 20px; display: inline-block; }
.feature-card h3 { margin-bottom: 15px; font-size: 1.25rem; }
.feature-card p { color: var(--text-light); font-size: 0.95rem; }

/* More Features (Layout & Cards) */
.more-features-layout {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
    align-items: center;
}
.more-feature-card {
    display: flex;
    align-items: center; /* Alineación vertical centrada */
    gap: 18px;
    padding: 25px;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid #f3f4f6;
}
.more-feature-card-icon {
    width: 48px; height: 48px;
    border-radius: 15px;
    background: rgba(165, 39, 138, 0.1);
    display: flex; align-items: center; justify-content: center;
    color: var(--primary); font-size: 1.4rem;
    flex-shrink: 0;
}
.more-feature-card h3 { margin-bottom: 8px; font-size: 1.1rem; }

/* Services Grid Cards (Travel/Institucional) */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}
.service-card {
    background: var(--white);
    padding: 40px 30px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(0,0,0,0.03);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    z-index: 1;
}
.service-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 0%;
    background: var(--gradient-hero);
    z-index: -1;
    transition: 0.4s ease;
    opacity: 0.3;
}
.service-card:hover { transform: translateY(-10px); box-shadow: var(--shadow-lg); border-color: transparent; }
.service-card:hover::before { height: 100%; }
.service-icon { font-size: 3rem; color: var(--primary); margin-bottom: 20px; display: inline-block; }
.service-card h3 { font-size: 1.3rem; margin-bottom: 15px; color: var(--text-dark); }
.service-card p { color: var(--text-light); font-size: 0.95rem; }

/* =========================================
    7. SECCIONES ESPECÍFICAS
    ========================================= */
/* How It Works (Timeline) */
.steps-container { position: relative; }
.step-item { display: flex; gap: 20px; margin-bottom: 40px; }
.step-number {
    background: var(--primary-dark);
    color: white;
    width: 40px; height: 40px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: bold; flex-shrink: 0;
}
.step-content h3 { margin-bottom: 10px; }
.step-content p { color: var(--text-light); }

/* Conductores (CTA Section & Form) */
.cta-section {
    background: linear-gradient(135deg,rgba(93, 42, 123, 0.10) 0%, rgba(93, 42, 123, 0.15) 50%);
    color: var(--text-dark);
    border-radius: 30px;
    margin: 0 20px;
    padding: 80px 40px;
    text-align: center;
}
.cta-section h2 { margin-bottom: 20px; color: var(--text-dark); font-size: 2rem; text-align: center; }
.cta-section p { color: var(--text-dark); margin-bottom: 40px; text-align: center; }

/* Driver Form Styling */
.driver-form {
    background: var(--white);
    padding: 40px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.5);
}
.driver-form::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 6px;
    background: var(--primary);
}
.driver-form h3 { margin-bottom: 20px; color: var(--text-dark); font-size: 1.5rem; }
.form-group { margin-bottom: 20px; }
.form-control {
    width: 100%;
    padding: 14px 18px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #f9fafb;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}
.form-control:focus {
    outline: none; border-color: var(--primary); background: var(--white);
    box-shadow: 0 0 0 4px rgba(93, 42, 123, 0.1);
}

/* Travel Section & Contact Cards */
.travel-section { background: linear-gradient(135deg,rgba(93, 42, 123, 0.10) 0%, rgba(93, 42, 123, 0.15) 50%); }
.travel-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 25px; }

.contact-card {
    background: white;
    padding: 30px;
    border-radius: var(--radius);
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: 0.3s;
}
.contact-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.contact-card i { font-size: 2.5rem; color: var(--primary); margin-bottom: 15px; display: block; }
.contact-card ul li { margin-bottom: 8px; font-weight: 600; color: var(--text-dark); }

/* About Section */
.about-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 40px; align-items: center; }
.about-card { background: var(--white); border-radius: var(--radius); padding: 30px; box-shadow: var(--shadow-md); }
.about-pillars { margin-top: 20px; }
.about-pillars li { margin-bottom: 10px; color: var(--text-dark); }

/* =========================================
    8. FOOTER
    ========================================= */
footer { background: #f3f4f6; padding: 60px 0 20px; margin-top: 0px; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 40px; margin-bottom: 40px; }
.footer-col h4 { margin-bottom: 20px; color: var(--primary); }
.footer-col ul li { margin-bottom: 10px; }
.footer-col a { color: #374151; }
.footer-col a:hover { color: var(--primary); }
.copyright { text-align: center; border-top: 1px solid #e5e7eb; padding-top: 20px; color: var(--text-light); font-size: 0.9rem; }

.footer-social-links { margin: 15px 0 25px; }
.footer-social-links a {
    display: inline-flex; width: 44px; height: 44px;
    border-radius: 50%; align-items: center; justify-content: center;
    font-size: 1.3rem; color: #fff; margin-right: 10px;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.footer-social-links a.instagram { background: radial-gradient(circle at 30% 30%, #feda75, #d62976, #962fbf, #4f5bd5); }
.footer-social-links a.whatsapp { background: #25D366; }
.footer-social-links a:hover { transform: translateY(-5px); box-shadow: 0 10px 20px rgba(0,0,0,0.15); }
.footer-text { color: var(--text-light); margin-bottom: 20px; margin-top: 20px; line-height: 1.6; }

.page-preloader {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at top, rgba(93,42,123,0.95), rgba(19,18,43,0.95));
    z-index: 3000;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.preloader-logo {
    max-width: 240px;
    margin: 0 auto 20px;
}

/* =========================================
    9. BOTONES FLOTANTES (FABs)
    ========================================= */
.fab-whatsapp {
    position: fixed; bottom: 30px; right: 30px;
    background: #25D366; color: white;
    width: 60px; height: 60px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 30px; box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    z-index: 1; animation: bounce 2s infinite;
}
.fab-instagram {
    position: fixed; bottom: 110px; right: 32px;
    width: 56px; height: 56px;
    border-radius: 50%; color: white;
    background: radial-gradient(circle at 30% 30%, #feda75, #d62976, #962fbf, #4f5bd5);
    display: flex; align-items: center; justify-content: center;
    font-size: 26px; box-shadow: 0 4px 10px rgba(0,0,0,0.25);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    z-index: 1;
}
.fab-instagram:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 14px rgba(0,0,0,0.25);
}
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {transform: translateY(0);}
    40% {transform: translateY(-10px);}
    60% {transform: translateY(-5px);}
}

.fab-top {
    position: fixed; bottom: 190px; right: 36px;
    width: 48px; height: 48px;
    border-radius: 50%; border: none; background: var(--primary); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem; box-shadow: 0 4px 12px rgba(0,0,0,0.25);
    cursor: pointer; opacity: 0; visibility: hidden;
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 1800;
}
.fab-top.visible { opacity: 1; visibility: visible; transform: translateY(-4px);  z-index: 1;}

/* =========================================
    10. RESPONSIVE (MÓVIL)
    ========================================= */
@media (max-width: 801px) {
    /* General */
    .img-logo { max-width: 200px !important; }
    .section { padding: 10px 0; }
    .grid-2 { grid-template-columns: 1fr; }
    
    /* Navbar Móvil */
    .nav-toggle { display: flex; }
    .nav-links {
        position: fixed; top: 0; right: 0;
        width: 280px; height: 100vh;
        background: #ffffff;
        box-shadow: -5px 0 30px rgba(0,0,0,0.15);
        transform: translateX(100%); /* Fix Scroll Horizontal */
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        flex-direction: column;
        padding: 100px 30px 40px;
        z-index: 1200; overflow-y: auto;
    }
    .nav-links.open { transform: translateX(0); }
    .nav-links li { width: 100%; border-bottom: 1px solid #f3f4f6; }
    .nav-links li:last-child { border: none; }
    .nav-links a { display: block; padding: 15px 0; font-size: 1.1rem; color: var(--text-dark); }
    .nav-cta { display: inline-block !important; margin-top: 20px; text-align: center; width: 100%; }

    /* Hero */
    .hero-content h1 { font-size: 1.9rem; margin-bottom: 15px; text-align: center; }
    .hero-content p { margin-bottom: 15px; text-align: center; }
    .hero-img { margin-top: 40px; }
    .hero-btns { display: flex; flex-direction: column; align-items: center; gap: 12px; margin: 10px auto 0px; }
    .hero-img img { width: 232px; }

    /* Utilitarios Móvil */
    .logo { width: auto; }
    .img-width { max-width: 250px !important; }

    /* Secciones */
    .section-title h2 { font-size: 1.9rem; text-align: center; }
    .section-title p { text-align: center; }
    
    /* About */
    .about-grid { display: flex; flex-direction: column; text-align: center; }

    /* Steps / How it works */
    .step-item { display: flex; flex-direction: column; }
    .step-item .step-number { margin: 0 auto !important; }
    .step-item .step-content { margin: 0 auto; display: flex; flex-direction: column; align-items: center; max-width: 300px; }
    
    /* More Features */
    .more-feature-card { display: flex; flex-direction: column; }
    .more-feature-card .more-feature-card-icon { margin: 0 auto; }
    
    /* CTA Drivers */
    .cta-section { margin: 0px 0px; padding: 24px; }
    .cta-section h2 { font-size: 1.5rem; text-align: center; }
    .cta-section .driver-form { padding: 20px 12px; }

    /* Footer */
    footer .img-logo { margin: 0 auto;}
    .footer-col p { margin: 0 auto; text-align: center;}
    .footer-col .footer-social-links { text-align: center;}
    .footer-col h4 { margin: 0 auto; text-align: center;}
    .footer-col ul { margin: 0 auto; text-align: center;}
}
@media (min-width: 801px) and (max-width: 1060px) {
    .non-visible { display: none; }
}