/* --- 0. GLOBAL FIXES (Del Home) --- */
html, body {
    overflow-x: hidden;
    width: 100%;
    position: relative;
}

/* --- 1. CORE VARIABLES --- */
:root {
    --primary: #5d2a7b;
    --primary-dark: #4a2162;
    --accent: #25D366;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --white: #ffffff;
    --bg-soft: #f9fafb;
    --gradient-hero: linear-gradient(135deg, rgba(93, 42, 123, 0.08) 0%, rgba(93, 42, 123, 0.15) 100%);
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --radius: 16px;
}

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

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-visible {
    top: 10px;
    outline: 3px solid rgba(93, 42, 123, 0.5);
    outline-offset: 3px;
}

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

/* --- 2. LAYOUT UTILITIES --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

/* 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. COMPONENTS --- */
.btn {
    display: inline-block;
    padding: 14px 32px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    border: none;
    letter-spacing: 0.5px;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(93, 42, 123, 0.3);
}
.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(93, 42, 123, 0.4);
}
.btn-whatsapp {
    background: #0f8b4c;
    color: #ffffff !important;
    border: 2px solid #0c6c3b;
    box-shadow: 0 6px 18px rgba(15,139,76,0.35);
}
.btn-whatsapp:hover {
    background: #0c6c3b;
    color: #ffffff;
}
.btn-whatsapp:focus-visible {
    outline: 3px solid rgba(15,139,76,0.4);
    outline-offset: 3px;
}

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

/* --- 4. NAVBAR (Sistema Unificado con Home) --- */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 10px 0; /* Ajustado al Home */
    transition: 0.3s ease;
    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.5rem;
    font-weight: 700;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-text span { color: var(--text-dark); }

.nav-links {
    display: flex;
    gap: 30px;
    align-items: center;
}

.nav-links a {
    color: var(--text-dark);
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
}

.nav-links a:hover { color: var(--primary); }

.nav-cta-btn {
    background: var(--primary);
    color: white !important;
    padding: 10px 25px;
    border-radius: 30px;
    box-shadow: 0 4px 10px rgba(93, 42, 123, 0.2);
}
.nav-cta-btn:hover { transform: translateY(-1px); }

/* 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 */
.nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
    z-index: 1;
    backdrop-filter: blur(2px);
}

.nav-overlay.visible {
    opacity: 1;
    visibility: visible;
}

body.nav-open { overflow: hidden; }

.page-preloader {
    position: fixed;
    inset: 0;
    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;
}
.page-preloader.fade-out {
    opacity: 0;
    visibility: hidden;
}
.preloader-inner {
    text-align: center;
    color: var(--white);
    animation: float 2s ease-in-out infinite;
}
.preloader-logo {
    max-width: 240px;
    margin: 0 auto 20px;
}
.preloader-spinner {
    width: 64px;
    height: 64px;
    margin: 0 auto;
    border-radius: 50%;
    border: 4px solid rgba(255,255,255,0.3);
    border-top-color: var(--white);
    animation: spin 1s linear infinite;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

/* --- 5. HERO SECTION --- */
.hero {
    padding-top: 160px;
    padding-bottom: 100px;
    background: var(--gradient-hero);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -100px;
    right: -100px;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(93,42,123,0.05) 0%, rgba(255,255,255,0) 70%);
    border-radius: 50%;
}

.hero-content h1 {
    font-size: 3.5rem;
    line-height: 1.15;
    margin-bottom: 24px;
    color: var(--text-dark);
}

.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.15rem;
    color: var(--text-light);
    margin-bottom: 40px;
    max-width: 540px;
    line-height: 1.8;
}

.hero-img-container {
    position: relative;
    display: flex;
    justify-content: center;
}

.hero-img-container img {
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    transform: rotate(-2deg);
    transition: transform 0.5s ease;
    max-width: 90%;
}

.hero-img-container:hover img { transform: rotate(0deg) scale(1.02); }

.floating-badge {
    position: absolute;
    top: 20px;
    right: 40px;
    background: white;
    padding: 15px 25px;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 12px;
    animation: float 4s ease-in-out infinite;
}
.floating-badge i { font-size: 24px; color: var(--accent); }
.floating-badge span { font-weight: 700; color: var(--text-dark); font-size: 0.9rem; }

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* --- SERVICIOS --- */
.services-section { padding: 80px 0; background-color: var(--bg-soft); }
.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; }

/* --- FLOTA --- */
.fleet-section { padding: 80px 0; }
.fleet-content { display: flex; flex-direction: column; justify-content: center; gap: 30px; }
.fleet-item { display: flex; gap: 20px; align-items: flex-start; }

.fleet-icon-box {
    width: 60px; height: 60px;
    background: rgba(93, 42, 123, 0.1);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: var(--primary); font-size: 1.8rem; flex-shrink: 0;
}

/* --- EMPRESA --- */
.company-section { background: var(--white); padding: 80px 0; }
.history-text { font-size: 1.05rem; color: var(--text-light); margin-bottom: 20px; }
.highlight { color: var(--primary); font-weight: 600; }
.company-pillars {
    margin-top: 25px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}
.pillar-item { display: flex; align-items: center; gap: 10px; font-weight: 500; color: var(--text-dark); }
.pillar-item i { color: var(--accent); font-size: 1.2rem; }

/* --- CONTACTO --- */
.contact-section { background: var(--gradient-hero); padding: 80px 0; margin-top: 40px; }
.contact-section h2 { font-size: 2.5rem; font-weight: 700; color: var(--text-dark); }

.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); }

/* --- FOOTER --- */
footer { background: #f3f4f6; padding: 60px 0 20px; border-top: 1px solid #e5e7eb; }
.footer-logo { font-size: 1.5rem; font-weight: 700; color: var(--primary); margin-bottom: 20px; display: block; }
.footer-text { color: #374151; margin-bottom: 20px; margin-top: 20px; line-height: 1.6; }

.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); }

.copyright {
    border-top: 1px solid #e5e7eb;
    margin-top: 40px;
    padding-top: 20px;
    text-align: center;
    color: #1f2937;
    font-size: 0.95rem;
    font-weight: 500;
}

/* --- 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%;
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 26px;
    background: radial-gradient(circle at 30% 30%, #feda75, #d62976, #962fbf, #4f5bd5);
    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;
    z-index: 1;
}
.fab-top.visible { opacity: 1; visibility: visible; transform: translateY(-4px); }

/* --- RESPONSIVE OPTIMIZADO (De Institucional) --- */
@media (max-width: 801px) {
    .img-logo { max-width: 200px !important; }
    .grid-2 { grid-template-columns: 1fr; gap: 40px; }
    .hero-content h1 { font-size: 2.2rem; text-align: center; }
    .hero-content p { text-align: center; }
    .hero-btns { display: flex; flex-direction: column; align-items: center; gap: 15px; }
    .btn-outline { margin-left: 0; }
    .hero-img-container { margin-top: 40px; }
    
    /* Navbar Móvil Fix */
    .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; }
    
    .nav-cta-btn { display: inline-block !important; width: 100%; text-align: center; margin-top: 20px; }

    /* Ajustes Secciones Específicas */
    .contact-section h2 { font-size: 1.9rem; text-align: center;}
    .services-section, .fleet-section, .company-section { padding: 50px 0; }
    .fleet-content, .company-section .grid-2 > div:first-child { text-align: center; }
    .fleet-item { flex-direction: column; align-items: center; text-align: center; }
    .company-pillars { justify-content: center; }
    
    /* 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;}

    /* Hero Badge */    
    .floating-badge {
        position: absolute;
        top: 130px;
        right: 40px;
        background: white;
        padding: 15px 25px;
        border-radius: 12px;
        box-shadow: var(--shadow-lg);
        display: flex;
        align-items: center;
        gap: 12px;
        animation: float 4s ease-in-out infinite;
    }
    .floating-badge i { font-size: 24px; color: var(--accent); }
    .floating-badge span { font-weight: 700; color: var(--text-dark); font-size: 0.9rem; }

}