/* ==========================================================================
   VARIABLES Y ESTILOS BASE
   ========================================================================== */
:root {
    --primary-color: #0d1117;       /* Grafito Industrial Oscuro */
    --secondary-color: #161b22;     /* Gris Industrial Medio */
    --accent-color: #d9531e;        /* Terracota / Naranja Industrial Premium */
    --text-main: #24292f;           /* Texto Oscuro */
    --text-muted: #57606a;          /* Texto Secundario */
    --bg-light: #f6f8fa;            /* Fondo Claro Editorial */
    --bg-white: #ffffff;
    --border-color: #e1e4e8;
    
    --font-main: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 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 de Maquetación */
.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-50 { margin-top: 50px; }
.align-center { align-items: center; }

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

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

/* Tipografía Editorial */
.section-subtitle {
    text-transform: uppercase;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--accent-color);
    display: block;
    margin-bottom: 8px;
}

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

/* Botones Premium */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 16px 32px;
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s var(--transition-smooth);
}

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

.btn-primary:hover {
    background-color: #be4315;
    border-color: #be4315;
    transform: translateY(-2px);
}

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

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

.navbar.scrolled {
    background-color: rgba(13, 17, 23, 0.95);
    backdrop-filter: blur(12px);
    padding: 14px 0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

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

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

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

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

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

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

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

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

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

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    z-index: -1;
}

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

.hero-tag {
    display: inline-block;
    padding: 6px 16px;
    background-color: rgba(217, 83, 30, 0.25);
    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.8rem;
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.02em;
    margin-bottom: 16px;
}

.hero-tagline {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--accent-color);
    margin-bottom: 12px;
}

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

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

.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: 600;
}

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

/* ==========================================================================
   2. QUIÉNES SOMOS
   ========================================================================== */
.sobre-nosotros { align-items: center; }

.about-image-wrapper { position: relative; }

.about-img {
    border-radius: 6px;
    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: 24px;
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    border-left: 4px solid var(--accent-color);
}

.badge-title { font-size: 1.2rem; font-weight: 700; }
.badge-sub { font-size: 0.8rem; opacity: 0.7; }

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    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.85rem; color: var(--text-muted); }

/* ==========================================================================
   3. SERVICIOS (EDITORIAL CARDS)
   ========================================================================== */
.service-cards-grid { gap: 30px; }

.service-card-editorial {
    position: relative;
    height: 380px;
    border-radius: 6px;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: flex-end;
    padding: 40px;
    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-editorial-content {
    color: var(--bg-white);
    z-index: 2;
}

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

.card-editorial-content h3 {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 10px;
    letter-spacing: -0.01em;
}

.card-editorial-content p {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.8);
    max-width: 450px;
}

/* ==========================================================================
   4. FLETES (FLUJO)
   ========================================================================== */
.fletes-flow {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 50px;
}

.flow-card {
    background-color: var(--bg-light);
    border: 1px solid var(--border-color);
    padding: 40px 30px;
    border-radius: 6px;
    flex: 1;
    text-align: center;
}

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

.flow-card h3 {
    font-size: 1.25rem;
    margin-bottom: 10px;
}

.flow-card p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.flow-arrow {
    font-size: 1.8rem;
    color: var(--text-muted);
    padding: 0 20px;
}

/* ==========================================================================
   5. DISTRIBUCIÓN
   ========================================================================== */
.editorial-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 40px;
}

.editorial-item {
    background-color: var(--secondary-color);
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.editorial-img-box {
    height: 240px;
    overflow: hidden;
}

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

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

.editorial-info { padding: 30px; }
.editorial-info h3 { font-size: 1.3rem; margin-bottom: 10px; color: var(--bg-white); }
.editorial-info p { font-size: 0.9rem; color: rgba(255, 255, 255, 0.7); }

/* ==========================================================================
   6. FLOTA
   ========================================================================== */
.flota-card {
    background-color: var(--bg-white);
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.flota-img-box { height: 220px; overflow: hidden; }
.flota-img-box img { width: 100%; height: 100%; object-fit: cover; }
.flota-body { padding: 24px; }
.flota-body h3 { font-size: 1.15rem; margin-bottom: 10px; color: var(--primary-color); }
.flota-body p { font-size: 0.88rem; color: var(--text-muted); margin-bottom: 16px; }

.flota-specs {
    list-style: none;
    border-top: 1px solid var(--border-color);
    padding-top: 12px;
}

.flota-specs li { font-size: 0.82rem; margin-bottom: 6px; color: var(--text-main); }

/* ==========================================================================
   7. COBERTURA
   ========================================================================== */
.cobertura-list { margin-top: 24px; }
.cobertura-item { margin-bottom: 20px; }
.cobertura-item strong { display: block; font-size: 0.95rem; color: var(--primary-color); }
.cobertura-item p { font-size: 0.9rem; color: var(--text-muted); }

.map-placeholder {
    height: 380px;
    background-color: var(--secondary-color);
    border-radius: 6px;
    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.9rem; z-index: 2; color: rgba(255,255,255,0.8); }

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

.gallery-item {
    position: relative;
    height: 260px;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
}

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

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

.gallery-overlay {
    position: absolute;
    inset: 0;
    background-color: rgba(13, 17, 23, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bg-white);
    opacity: 0;
    transition: opacity 0.3s ease;
    font-weight: 600;
}

.gallery-item:hover img { transform: scale(1.05); }
.gallery-item:hover .gallery-overlay { opacity: 1; }

.lightbox {
    display: none;
    position: fixed;
    z-index: 2000;
    inset: 0;
    background-color: 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: var(--bg-white); font-size: 40px; cursor: pointer; }

/* ==========================================================================
   9. POR QUÉ ELEGIRNOS
   ========================================================================== */
.feature-card {
    background-color: var(--bg-white);
    padding: 30px 24px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
}

.feature-icon { font-size: 1.5rem; color: var(--accent-color); margin-bottom: 12px; }
.feature-card h3 { font-size: 1.1rem; margin-bottom: 8px; }
.feature-card p { font-size: 0.88rem; color: var(--text-muted); }

/* ==========================================================================
   10. CONTACTO WHATSAPP
   ========================================================================== */
.contacto-lead { max-width: 600px; margin: 0 auto 40px; color: rgba(255, 255, 255, 0.8); }

.whatsapp-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.wa-box {
    background-color: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 28px 20px;
    border-radius: 6px;
    text-align: center;
    color: var(--bg-white);
    transition: all 0.3s ease;
}

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

.wa-box.highlighted {
    border-color: var(--accent-color);
    background-color: rgba(217, 83, 30, 0.1);
}

.wa-icon { font-size: 2rem; display: block; margin-bottom: 10px; }
.wa-box strong { display: block; font-size: 1.05rem; margin-bottom: 4px; }
.wa-box p { font-size: 0.8rem; color: rgba(255, 255, 255, 0.6); }

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer {
    background-color: #080b0f;
    color: rgba(255, 255, 255, 0.7);
    padding: 80px 0 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-brand { font-size: 1.2rem; font-weight: 800; color: var(--bg-white); margin-bottom: 16px; }
.footer-brand span { color: var(--accent-color); font-weight: 300; }
.footer-col h4 { color: var(--bg-white); margin-bottom: 20px; font-size: 0.95rem; }
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 10px; }
.footer-links a:hover { color: var(--bg-white); }
.footer-bottom { margin-top: 60px; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, 0.05); font-size: 0.85rem; }
.gep-link { color: var(--bg-white); font-weight: 600; text-decoration: underline; }
.gep-link:hover { color: var(--accent-color); }

/* ==========================================================================
   REVEAL SCROLL ANIMATION
   ========================================================================== */
.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
   ========================================================================== */
@media (max-width: 992px) {
    .grid-4, .grid-3 { grid-template-columns: repeat(2, 1fr); }
    .whatsapp-grid { grid-template-columns: repeat(2, 1fr); }
    .editorial-grid { grid-template-columns: 1fr; }
    .hero h1 { font-size: 2.8rem; }
    .fletes-flow { flex-direction: column; gap: 20px; }
    .flow-arrow { transform: rotate(90deg); padding: 10px 0; }
}

@media (max-width: 768px) {
    .section { padding: 60px 0; }
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
    
    .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;
    }
    
    .nav-menu.active { right: 0; }
    
    .hero h1 { font-size: 2.2rem; }
    .hero-actions { flex-direction: column; width: 100%; }
    .btn { width: 100%; }
    
    .about-badge { position: relative; bottom: 0; right: 0; margin-top: 20px; }
    
    .gallery-masonry { grid-template-columns: 1fr; }
    .gallery-item.item-tall, .gallery-item.item-wide { grid-column: span 1; grid-row: span 1; height: 260px; }
    .whatsapp-grid { grid-template-columns: 1fr; }
}