/* ==========================================================================
   VARIABLES Y ESTILOS BASE
   ========================================================================== */
:root {
    --primary-color: #0b131f;       /* Azul Petróleo / Profundo */
    --secondary-color: #152238;     /* Azul Corp Medio */
    --accent-color: #00a86b;        /* Verde Esmeralda Premium */
    --accent-hover: #008f5b;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --bg-light: #f4f7f6;            /* Gris claro muy suave */
    --bg-white: #ffffff;
    --border-color: #e2e8f0;
    
    --font-main: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    --transition-smooth: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-main);
    color: var(--text-main);
    background-color: var(--bg-white);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Helpers */
.container {
    width: 90%;
    max-width: 1240px;
    margin: 0 auto;
}

.section {
    padding: 100px 0;
}

.bg-light { background-color: var(--bg-light); }
.bg-dark { background-color: var(--primary-color); }
.text-white { color: var(--bg-white); }
.text-center { text-align: center; }
.margin-top-20 { margin-top: 20px; }
.margin-top-40 { margin-top: 40px; }
.align-center { align-items: center; }

.grid {
    display: grid;
    gap: 36px;
}

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

/* SECCIONES Y ENCABEZADOS (AJUSTE DE ESPACIADOS) */
.section-header {
    margin-bottom: 50px; /* Margen amplio para evitar que se junten títulos y fotos/cards */
}

.section-subtitle {
    text-transform: uppercase;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 2.5px;
    color: var(--accent-color);
    display: block;
    margin-bottom: 12px;
}

.section-title {
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--primary-color);
    line-height: 1.2;
    letter-spacing: -0.02em;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 15px 30px;
    font-weight: 700;
    font-size: 0.9rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s var(--transition-smooth);
    white-space: nowrap;
}

.btn-primary {
    background-color: var(--accent-color);
    color: var(--bg-white);
    border: 2px solid var(--accent-color);
}

.btn-primary:hover {
    background-color: var(--accent-hover);
    border-color: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 168, 107, 0.25);
}

.btn-secondary {
    background-color: transparent;
    color: var(--bg-white);
    border: 2px solid rgba(255, 255, 255, 0.4);
}

.btn-secondary:hover {
    border-color: var(--bg-white);
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.btn-header {
    background-color: var(--accent-color);
    color: var(--bg-white);
    padding: 10px 22px;
    font-size: 0.85rem;
    flex-shrink: 0;
}

/* ==========================================================================
   HEADER / NAVBAR
   ========================================================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 20px 0;
    transition: all 0.4s ease;
}

.navbar.scrolled {
    background-color: rgba(11, 19, 31, 0.95);
    backdrop-filter: blur(12px);
    padding: 12px 0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

.brand-logo {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--bg-white);
    letter-spacing: 1px;
    flex-shrink: 0;
}

.brand-logo span {
    color: var(--accent-color);
}

.nav-menu {
    display: flex;
    gap: 24px;
}

.nav-link {
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.85rem;
    font-weight: 600;
}

.nav-link:hover, .nav-link.active {
    color: var(--accent-color);
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 6px;
    z-index: 1100;
}

.menu-toggle span {
    width: 25px;
    height: 2px;
    background-color: var(--bg-white);
    transition: all 0.3s ease;
}

/* ==========================================================================
   1. HERO
   ========================================================================== */
.hero {
    position: relative;
    min-height: 100vh;
    padding: 140px 0 80px;
    display: flex;
    align-items: center;
    color: var(--bg-white);
}

.hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    z-index: -1;
}

.hero-content {
    max-width: 850px;
}

.hero-badge {
    display: inline-block;
    padding: 6px 16px;
    background-color: rgba(0, 168, 107, 0.2);
    border: 1px solid var(--accent-color);
    color: var(--bg-white);
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 4px;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.hero h1 {
    font-size: 3.6rem;
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.02em;
    margin-bottom: 12px;
}

.hero-tagline {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--accent-color);
    margin-bottom: 16px;
}

.hero-subtext {
    font-size: 1.05rem;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 36px;
    max-width: 680px;
    font-weight: 300;
}

.hero-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.hero-indicators {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 700;
}

.hero-indicators .dot { color: var(--accent-color); }

/* ==========================================================================
   2. SOBRE MAYSAN
   ========================================================================== */
.about-image-wrapper { position: relative; }

.about-img {
    border-radius: 8px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.12);
}

.about-badge {
    position: absolute;
    bottom: -20px;
    right: -20px;
    background-color: var(--primary-color);
    color: var(--bg-white);
    padding: 20px 24px;
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    border-left: 4px solid var(--accent-color);
}

.badge-title { font-size: 1rem; font-weight: 800; }
.badge-sub { font-size: 0.78rem; opacity: 0.7; }

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 36px;
    border-top: 1px solid var(--border-color);
    padding-top: 24px;
}

.kpi-number {
    display: block;
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--primary-color);
}

.kpi-label { font-size: 0.82rem; color: var(--text-muted); }

/* ==========================================================================
   3. SERVICIOS (CARDS ELEGANTES)
   ========================================================================== */
.service-cards-grid {
    margin-top: 10px; /* Separación asegurada tras el header */
}

.service-card-editorial {
    position: relative;
    height: 380px;
    border-radius: 8px;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: flex-end;
    padding: 36px;
    overflow: hidden;
    transition: transform 0.4s var(--transition-smooth);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.service-card-editorial:hover {
    transform: translateY(-6px);
}

.card-num {
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--accent-color);
    display: block;
    margin-bottom: 6px;
}

.card-editorial-content h3 {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--bg-white);
    margin-bottom: 10px;
}

.card-editorial-content p {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
}

/* ==========================================================================
   4. BEBIDAS (CATÁLOGO CARDS)
   ========================================================================== */
.catalog-grid {
    margin-top: 10px;
}

.product-card {
    background: var(--bg-white);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.product-card:hover {
    border-color: var(--accent-color);
    transform: translateY(-4px);
}

.product-img-box { height: 200px; }
.product-img-box img { width: 100%; height: 100%; object-fit: cover; }
.product-info { padding: 24px; }
.product-info h3 { font-size: 1.15rem; margin-bottom: 8px; color: var(--primary-color); }
.product-info p { font-size: 0.88rem; color: var(--text-muted); }

/* ==========================================================================
   5. FLETES Y TRANSPORTE
   ========================================================================== */
.fletes-img { border-radius: 8px; box-shadow: 0 15px 30px rgba(0,0,0,0.08); }
.fletes-list { list-style: none; margin: 24px 0; }
.fletes-list li { font-size: 0.9rem; margin-bottom: 12px; color: var(--text-muted); }
.fletes-list strong { color: var(--primary-color); }

/* ==========================================================================
   6. FLOTA SHOWCASE
   ========================================================================== */
.showcase-card {
    background: var(--bg-white);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    border-top: 3px solid var(--accent-color);
}

.showcase-img-box { height: 260px; }
.showcase-img-box img { width: 100%; height: 100%; object-fit: cover; }
.showcase-data { padding: 30px; }
.unit-tag { font-size: 0.7rem; font-weight: 800; letter-spacing: 1px; color: var(--accent-color); }
.showcase-data h3 { font-size: 1.3rem; margin: 4px 0 16px; }

.data-row {
    font-size: 0.85rem;
    padding: 8px 0;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
}

.data-row span { font-weight: 700; color: var(--primary-color); }

/* ==========================================================================
   7. CÓMO TRABAJAMOS (PROCESO)
   ========================================================================== */
.proceso-timeline {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-top: 40px;
}

.proceso-step { text-align: center; flex: 1; }

.step-number {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--accent-color);
    margin-bottom: 12px;
}

.proceso-step h4 { font-size: 1.1rem; margin-bottom: 6px; }
.proceso-step p { font-size: 0.85rem; color: rgba(255, 255, 255, 0.7); }
.proceso-line { height: 2px; background: rgba(255, 255, 255, 0.1); flex: 0.5; margin-top: 25px; }

/* ==========================================================================
   8. COBERTURA
   ========================================================================== */
.cobertura-fields { margin-top: 24px; }
.c-field { margin-bottom: 16px; }
.c-field strong { display: block; font-size: 0.9rem; color: var(--primary-color); }
.c-field p { font-size: 0.85rem; color: var(--text-muted); }

.map-placeholder {
    height: 340px;
    background-color: var(--secondary-color);
    border-radius: 8px;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--bg-white);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.map-grid-overlay {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255,255,255,0.1) 1px, transparent 0);
    background-size: 20px 20px;
}

.map-pin { font-size: 3rem; margin-bottom: 10px; z-index: 2; }
.map-text { font-size: 0.88rem; z-index: 2; color: rgba(255,255,255,0.85); font-weight: 600; }

/* ==========================================================================
   9. GALERÍA MASONRY & LIGHTBOX
   ========================================================================== */
.gallery-masonry {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.g-item {
    height: 230px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
}

.g-item.g-tall { grid-row: span 2; height: 478px; }
.g-item.g-wide { grid-column: span 2; }

.g-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.g-item:hover img { transform: scale(1.05); }

.lightbox {
    display: none;
    position: fixed;
    z-index: 2000;
    inset: 0;
    background: rgba(0,0,0,0.92);
    justify-content: center;
    align-items: center;
}

.lightbox-content { max-width: 85%; max-height: 85%; border-radius: 4px; }
.lightbox-close { position: absolute; top: 20px; right: 30px; color: #fff; font-size: 40px; cursor: pointer; }

/* ==========================================================================
   10. HISTORIA TIMELINE (EVALUACIÓN CONTINUA DESKTOP)
   ========================================================================== */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 40px auto 0;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 100%;
    background-color: var(--border-color);
}

.timeline-item {
    position: relative;
    margin-bottom: 40px;
    width: 50%;
    box-sizing: border-box;
}

.timeline-item:nth-child(odd) { left: 0; padding-right: 40px; text-align: right; }
.timeline-item:nth-child(even) { left: 50%; padding-left: 40px; text-align: left; }

.timeline-dot {
    position: absolute;
    top: 4px;
    width: 14px;
    height: 14px;
    background-color: var(--accent-color);
    border-radius: 50%;
    z-index: 2;
}

.timeline-item:nth-child(odd) .timeline-dot { right: -7px; }
.timeline-item:nth-child(even) .timeline-dot { left: -7px; }

.timeline-stage {
    display: inline-block;
    padding: 3px 12px;
    background-color: var(--primary-color);
    color: var(--bg-white);
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 4px;
    margin-bottom: 8px;
}

/* ==========================================================================
   11. CONTACTO
   ========================================================================== */
.contacto-sub { max-width: 600px; margin: 0 auto; color: rgba(255,255,255,0.7); }

.contacto-buttons-grid {
    display: flex;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
}

.wa-contact-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 32px 24px;
    border-radius: 8px;
    text-align: center;
    flex: 1;
    min-width: 260px;
    max-width: 380px;
    color: var(--bg-white);
    transition: all 0.3s ease;
}

.wa-contact-card:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-4px);
    border-color: #25D366;
}

.wa-contact-card.highlighted {
    border-color: var(--accent-color);
    background: rgba(0, 168, 107, 0.1);
}

.wa-card-icon { font-size: 2.2rem; display: block; margin-bottom: 12px; }
.wa-contact-card strong { display: block; font-size: 1.1rem; margin-bottom: 6px; }
.wa-contact-card p { font-size: 0.82rem; color: rgba(255,255,255,0.6); }

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer {
    background-color: #070c14;
    color: rgba(255, 255, 255, 0.6);
    padding: 70px 0 30px;
    font-size: 0.85rem;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.footer-brand { font-size: 1.15rem; font-weight: 800; color: #fff; margin-bottom: 12px; }
.footer-brand span { color: var(--accent-color); }
.footer-col h4 { color: #fff; margin-bottom: 16px; font-size: 0.9rem; }
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 8px; }
.social-links a { margin-right: 12px; color: #fff; }
.footer-bottom { margin-top: 50px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,0.05); }

/* Animations Reveal */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.8s var(--transition-smooth), transform 0.8s var(--transition-smooth);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================================================
   RESPONSIVE DESIGN (DISPOSITIVOS Y MÓVILES)
   ========================================================================== */
@media (max-width: 992px) {
    .section { padding: 80px 0; }
    .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
    .hero h1 { font-size: 2.8rem; }
    .proceso-timeline { flex-direction: column; gap: 24px; }
    .proceso-line { display: none; }
}

@media (max-width: 768px) {
    .section { padding: 60px 0; }
    .section-header { margin-bottom: 30px; }
    
    /* Botón flotante/Header adaptado sin recortes */
    .btn-header {
        padding: 8px 14px;
        font-size: 0.78rem;
    }

    .menu-toggle { display: flex; }
    
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        height: 100vh;
        background-color: var(--primary-color);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: right 0.4s ease;
        box-shadow: -5px 0 20px rgba(0,0,0,0.3);
    }
    
    .nav-menu.active { right: 0; }
    
    .hero {
        padding-top: 120px;
    }

    .hero h1 { font-size: 2.2rem; }
    .hero-tagline { font-size: 1.1rem; }
    .hero-actions { flex-direction: column; width: 100%; }
    .hero-actions .btn { width: 100%; }

    .about-badge {
        position: relative;
        bottom: 0;
        right: 0;
        margin-top: 16px;
    }

    /* GALERÍA MÓVIL */
    .gallery-masonry { grid-template-columns: 1fr; }
    .g-item.g-tall, .g-item.g-wide { grid-column: span 1; grid-row: span 1; height: 230px; }

    /* RESTRUCTURACIÓN COMPLETA TIMELINE HISTORIA PARA MÓVIL */
    .timeline::before { 
        left: 18px; 
        transform: none;
    }

    .timeline-item,
    .timeline-item:nth-child(odd),
    .timeline-item:nth-child(even) { 
        width: 100% !important;
        left: 0 !important;
        padding-left: 48px !important; 
        padding-right: 0 !important;
        text-align: left !important;
        margin-bottom: 30px;
    }

    .timeline-item:nth-child(odd) .timeline-dot,
    .timeline-item:nth-child(even) .timeline-dot { 
        left: 11px !important;
        right: auto !important;
    }

    .hero-indicators { display: none; }
}

@media (max-width: 480px) {
    .brand-logo { font-size: 1rem; }
    .btn-header { font-size: 0.75rem; padding: 6px 12px; }
    .wa-contact-card { min-width: 100%; }
}