/* ==========================================================================
   VARIABLES GLOBALES Y CONFIGURACIÓN CORPORATIVA
   ========================================================================== */

:root {
    --primary: #0F52BA;
    /* Azul Corporativo */
    --secondary: #10B981;
    /* Verde Tecnológico / Agrícola */
    --dark: #1E293B;
    /* Slate Oscuro */
    --light: #F8FAFC;
    /* Fondo Claro */
    --border: #E2E8F0;
    --text-main: #334155;
    --text-secondary: #64748B;
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}


/* Tipografía y Estilos Base Base */

html,
body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    /* Bloquea el desborde de raíz en ambos elementos */
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', system-ui, sans-serif;
    color: var(--text-main);
    background-color: #ffffff;
}

.container {
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 20px;
}


/* Títulos Comunes */

.section-title {
    text-align: center;
    margin-bottom: 60px;
}

.section-subtitle {
    display: inline-block;
    color: var(--primary);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 2px;
    margin-bottom: 12px;
}

.section-title h2 {
    font-size: 42px;
    color: var(--dark);
    font-weight: 800;
    letter-spacing: -0.5px;
}


/* Botones Universales Premium */

.btn-primary,
.btn-secondary,
.btn-whatsapp-cta,
.btn-whatsapp-large,
.btn-outline-white {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 15px;
    text-decoration: none;
    transition: var(--transition);
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}

.btn-primary:hover {
    background: #0d47a1;
    transform: translateY(-2px);
}

.btn-whatsapp-cta {
    background: #25D366;
    color: #fff;
}

.btn-whatsapp-cta:hover {
    background: #1ebd59;
    transform: translateY(-2px);
}


/* ==========================================================================
   1. HERO SLIDER MODERNO
   ========================================================================== */

.hero-slider {
    position: relative;
    height: 750px;
    overflow: hidden;
    background: #000;
}

.slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    z-index: 1;
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.slide.active {
    opacity: 1;
    z-index: 2;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.05);
    transition: transform 6s ease;
}

.slide.active img {
    transform: scale(1);
}

.slide-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.9) 0%, rgba(15, 23, 42, 0.5) 60%, rgba(0, 0, 0, 0.2) 100%);
}

.slide-content {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: #fff;
    z-index: 3;
    max-width: 850px;
}

.hero-badge {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-bottom: 24px;
}

.slide-content h1 {
    font-size: 58px;
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 20px;
    letter-spacing: -1px;
}

.slide-content p {
    font-size: 19px;
    line-height: 1.6;
    margin-bottom: 35px;
    color: #E2E8F0;
}

.hero-buttons {
    display: flex;
    gap: 15px;
}


/* Flechas del Slider */

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.slider-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
}

.prev-btn {
    left: 30px;
}

.next-btn {
    right: 30px;
}


/* ==========================================================================
   2. CATEGORÍAS (CARDS PREMIUM CON IMAGEN)
   ========================================================================== */

.categories {
    padding: 100px 0;
    background: var(--light);
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.category-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.card-img-wrapper {
    height: 220px;
    overflow: hidden;
}

.card-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.category-card:hover .card-img-wrapper img {
    transform: scale(1.08);
}

.card-body {
    padding: 25px;
}

.card-body h3 {
    font-size: 20px;
    color: var(--dark);
    margin-bottom: 12px;
    font-weight: 700;
}

.card-body p {
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.5;
    margin-bottom: 20px;
}

.card-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: var(--transition);
}

.category-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-md);
}


/* ==========================================================================
   3. ABOUT PREVIEW
   ========================================================================== */

.about-preview {
    padding: 100px 0;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.about-image-box {
    position: relative;
    max-width: 100%;
}

.about-experience-badge {
    position: absolute;
    bottom: -20px;
    right: 20px;
    /* Posicionado firmemente hacia adentro del marco de la imagen */
    background: var(--secondary);
    color: #fff;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    box-shadow: var(--shadow-md);
    z-index: 5;
}

.about-image-box img {
    width: 100%;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
}

.about-experience-badge {
    position: absolute;
    bottom: -20px;
    right: -20px;
    background: var(--secondary);
    color: #fff;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    box-shadow: var(--shadow-md);
}

.about-experience-badge span {
    font-size: 32px;
    font-weight: 800;
    display: block;
}

.about-experience-badge p {
    font-size: 12px;
    font-weight: 600;
    margin: 0;
}


/* ==========================================================================
   4. POR QUÉ ELEGIRNOS (CON ICONOS)
   ========================================================================== */

.why-us {
    padding: 100px 0;
    background: var(--light);
}

.why-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
}

.why-card {
    background: #fff;
    padding: 40px 30px;
    border-radius: 16px;
    border: 1px solid var(--border);
    text-align: center;
    transition: var(--transition);
}

.why-icon {
    font-size: 36px;
    color: var(--primary);
    margin-bottom: 20px;
}

.why-card h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 12px;
}

.why-card p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.why-card:hover {
    background: var(--dark);
    color: #fff;
}

.why-card:hover .why-icon {
    color: var(--secondary);
}


/* ==========================================================================
   5. SECCIÓN ESTADÍSTICAS
   ========================================================================== */

.stats-section {
    background: var(--dark);
    color: #fff;
    padding: 60px 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    text-align: center;
}

.stat-number {
    font-size: 48px;
    font-weight: 800;
    color: var(--secondary);
    margin-bottom: 5px;
}

.stat-text {
    font-size: 14px;
    color: #94A3B8;
    text-transform: uppercase;
    letter-spacing: 1px;
}


/* ==========================================================================
   6. GALERÍA MASONRY / GRID
   ========================================================================== */

.gallery-section {
    padding: 100px 0;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 240px;
    gap: 20px;
}

.gallery-item {
    overflow: hidden;
    border-radius: 12px;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-item.tall {
    grid-row: span 2;
}


/* ==========================================================================
   7. CTA FINAL PREMIUM
   ========================================================================== */

.cta-section {
    padding: 60px 0 100px 0;
}

.cta-box {
    background: linear-gradient(135deg, var(--primary) 0%, #0B3C8A 50%, var(--secondary) 100%);
    color: #fff;
    text-align: center;
    padding: 80px 60px;
    border-radius: 24px;
    box-shadow: var(--shadow-md);
}

.cta-box h2 {
    font-size: 44px;
    font-weight: 800;
    margin-bottom: 20px;
    letter-spacing: -1px;
}

.cta-box p {
    font-size: 18px;
    max-width: 700px;
    margin: 0 auto 40px auto;
    opacity: 0.9;
    line-height: 1.6;
}

.cta-actions {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.btn-whatsapp-large {
    background: #25D366;
    color: #fff;
    font-size: 16px;
    padding: 16px 36px;
}

.btn-outline-white {
    border: 2px solid #fff;
    color: #fff;
}

.btn-outline-white:hover {
    background: #fff;
    color: var(--dark);
}


/* ==========================================================================
   8. BOTÓN FLOTANTE WHATSAPP
   ========================================================================== */

.whatsapp-floating {
    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 12px rgba(0, 0, 0, 0.3);
    z-index: 999;
    transition: var(--transition);
}

.whatsapp-floating:hover {
    transform: scale(1.1);
    background: #1ebd59;
}


/* ==========================================================================
   RESPONSIVE DESIGN (MOBILE ADAPTATION)
   ========================================================================== */

@media (max-width: 1024px) {
    .category-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 200px;
    }
    .gallery-item.tall {
        grid-row: span 1;
    }
}

@media (max-width: 768px) {
    .hero-slider {
        height: 600px;
    }
    .slide-content h1 {
        font-size: 38px;
    }
    .slide-content p {
        font-size: 16px;
    }
    .hero-buttons,
    .cta-actions {
        flex-direction: column;
        gap: 10px;
    }
    .category-grid,
    .why-grid,
    .about-grid,
    .stats-grid,
    .gallery-grid {
        grid-template-columns: 1fr;
    }
    .about-image-box {
        margin-bottom: 40px;
    }
    .about-experience-badge {
        right: 0;
        bottom: -10px;
    }
    .cta-box {
        padding: 50px 20px;
    }
    .cta-box h2 {
        font-size: 28px;
    }
}