/* ==========================================================================
   VARIABLES Y CONFIGURACIÓN GENERAL (J&M IDENTITY)
   ========================================================================== */
:root {
    --primary-blue: #0A192F;       /* Azul profundo dominante */
    --secondary-violet: #6C5CE7;    /* Violeta / Índigo secundario */
    --accent-coral: #FF4757;       /* Rojo Coral / Magenta acento */
    --surface-light: #F0F4F8;      /* Azul muy claro */
    --bg-white: #FFFFFF;
    --text-dark: #0F172A;
    --text-muted: #64748B;
    --border-color: #E2E8F0;
    
    --font-main: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    --transition-smooth: cubic-bezier(0.25, 0.8, 0.25, 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-dark);
    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 Layout */
.container {
    width: 90%;
    max-width: 1240px;
    margin: 0 auto;
}

.section {
    padding: 120px 0;
    position: relative;
}

.bg-light { background-color: var(--surface-light); }
.bg-dark { background-color: var(--primary-blue); }
.text-white { color: var(--bg-white) !important; }
.text-center { text-align: center; }
.relative { position: relative; z-index: 2; }
.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 de Sección */
.section-subtitle {
    text-transform: uppercase;
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 2px;
    color: var(--secondary-violet);
    display: block;
    margin-bottom: 12px;
}

.accent-coral { color: var(--accent-coral) !important; }

.section-title {
    font-size: 2.6rem;
    font-weight: 800;
    color: var(--primary-blue);
    margin-bottom: 24px;
    line-height: 1.2;
}

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

.btn-primary {
    background: linear-gradient(135deg, var(--secondary-violet), #5A4AD1);
    color: var(--bg-white);
    border: none;
    box-shadow: 0 10px 20px rgba(108, 92, 231, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 25px rgba(108, 92, 231, 0.4);
}

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

.btn-secondary:hover {
    border-color: var(--accent-coral);
    color: var(--accent-coral);
    background-color: rgba(255, 71, 87, 0.05);
    transform: translateY(-2px);
}

.btn-header {
    background-color: var(--accent-coral);
    color: #fff;
    padding: 10px 22px;
    font-size: 0.85rem;
    border-radius: 6px;
}

.btn-header:hover {
    background-color: #E03E4D;
    box-shadow: 0 6px 15px rgba(255, 71, 87, 0.3);
}

.btn-card {
    display: block;
    width: 100%;
    text-align: center;
    padding: 12px;
    background-color: transparent;
    border: 1px solid var(--secondary-violet);
    color: var(--secondary-violet);
    font-weight: 700;
    border-radius: 6px;
    margin-top: 15px;
}

.btn-card:hover {
    background-color: var(--secondary-violet);
    color: #fff;
}

.btn-whatsapp-lg {
    background: linear-gradient(135deg, var(--accent-coral), #E03E4D);
    color: #fff;
    padding: 18px 40px;
    font-size: 1.1rem;
    font-weight: 800;
    border-radius: 6px;
    box-shadow: 0 12px 25px rgba(255, 71, 87, 0.35);
    max-width: 100%;
}

.btn-whatsapp-lg:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 30px rgba(255, 71, 87, 0.45);
}

/* ==========================================================================
   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(10, 25, 47, 0.95);
    backdrop-filter: blur(12px);
    padding: 16px 0;
    box-shadow: 0 4px 25px rgba(0,0,0,0.2);
}

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

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

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

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

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

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

.menu-close {
    display: none;
    position: absolute;
    top: 25px;
    right: 25px;
    background: none;
    border: none;
    color: var(--accent-coral);
    font-size: 2.2rem;
    font-weight: 700;
    cursor: pointer;
    line-height: 1;
}

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

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

.hero-brand {
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: 3px;
    color: var(--accent-coral);
    margin-bottom: 12px;
    display: block;
}

.hero h1 {
    font-size: 3.8rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 16px;
    letter-spacing: -0.5px;
}

.hero-description {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 40px;
    font-weight: 400;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

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

.hero-indicators {
    position: absolute;
    bottom: 35px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 0.75rem;
    letter-spacing: 3px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.7);
}

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

/* ==========================================================================
   2. SOBRE J&M (NUEVO LAYOUT MODERNO Y DINÁMICO)
   ========================================================================== */
.sobre-nosotros {
    padding: 130px 0;
}

.about-image-wrapper {
    position: relative;
    padding-bottom: 20px;
    padding-right: 20px;
}

.about-img {
    border-radius: 12px;
    box-shadow: 0 25px 50px rgba(10, 25, 47, 0.15);
    object-fit: cover;
}

.about-floating-card {
    position: absolute;
    bottom: 0;
    right: 0;
    background: linear-gradient(135deg, var(--primary-blue), #112240);
    border: 1px solid rgba(108, 92, 231, 0.3);
    padding: 24px 28px;
    border-radius: 10px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    max-width: 260px;
}

.card-badge-num {
    display: block;
    font-size: 2rem;
    font-weight: 800;
    color: var(--accent-coral);
    line-height: 1;
    margin-bottom: 6px;
}

.card-badge-txt {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--bg-white);
    line-height: 1.3;
    display: block;
}

.about-lead {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--primary-blue);
    margin-bottom: 16px;
    line-height: 1.5;
}

.about-body {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 30px;
}

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-top: 30px;
    background-color: var(--surface-light);
    padding: 24px;
    border-radius: 10px;
    border-left: 4px solid var(--secondary-violet);
}

.kpi-number {
    display: block;
    font-size: 2rem;
    font-weight: 800;
    color: var(--secondary-violet);
    line-height: 1.1;
}

.kpi-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ==========================================================================
   3. NUESTROS PRODUCTOS
   ========================================================================== */
.category-card {
    background-color: var(--bg-white);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.category-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 30px rgba(10, 25, 47, 0.08);
}

.category-violeta { border-top: 4px solid var(--secondary-violet); }
.category-coral { border-top: 4px solid var(--accent-coral); }

.category-img-box {
    position: relative;
    height: 240px;
}

.category-img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.badge-category {
    position: absolute;
    top: 16px;
    right: 16px;
    background-color: var(--primary-blue);
    color: #fff;
    padding: 4px 12px;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 4px;
    text-transform: uppercase;
}

.category-content {
    padding: 28px;
}

.category-content h3 {
    font-size: 1.3rem;
    color: var(--primary-blue);
    margin-bottom: 10px;
    font-weight: 800;
}

.category-content p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 16px;
}

.placeholder-note {
    font-size: 0.75rem;
    color: var(--secondary-violet);
    background-color: var(--surface-light);
    padding: 10px;
    border-radius: 4px;
    border: 1px dashed var(--border-color);
}

/* ==========================================================================
   4. MAYORISTA
   ========================================================================== */
.clients-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 24px;
}

.tag-float {
    background-color: var(--surface-light);
    color: var(--primary-blue);
    padding: 8px 18px;
    border-radius: 30px;
    font-weight: 700;
    font-size: 0.85rem;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 10px rgba(0,0,0,0.03);
}

.mayorista-img-box img {
    border-radius: 8px;
}

/* ==========================================================================
   5. DISTRIBUCIÓN
   ========================================================================== */
.distribucion-section {
    position: relative;
}

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

.process-steps-grid {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-top: 60px;
}

.process-card {
    flex: 1;
    text-align: center;
    padding: 0 16px;
}

.step-num {
    display: inline-block;
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--accent-coral);
    margin-bottom: 12px;
}

.process-card h3 {
    font-size: 1.2rem;
    margin-bottom: 8px;
}

.process-card p {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
}

.step-line {
    height: 2px;
    background: linear-gradient(90deg, var(--primary-blue), var(--secondary-violet), var(--accent-coral));
    flex: 0.5;
    margin-top: 28px;
    opacity: 0.8;
}

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

.product-img-box {
    height: 220px;
}

.product-img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-body {
    padding: 24px;
}

.product-body h3 {
    font-size: 1.15rem;
    margin-bottom: 8px;
    color: var(--primary-blue);
}

.product-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.product-presentation {
    display: block;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--secondary-violet);
}

/* ==========================================================================
   7. COBERTURA
   ========================================================================== */
.cobertura-details {
    margin-top: 24px;
}

.detail-item {
    margin-bottom: 14px;
}

.detail-item strong {
    color: var(--secondary-violet);
    font-size: 0.9rem;
}

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

.stylized-map {
    position: relative;
    height: 320px;
    background-color: var(--surface-light);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.map-grid {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(var(--secondary-violet) 1px, transparent 1px);
    background-size: 24px 24px;
    opacity: 0.15;
}

.map-point {
    position: absolute;
    width: 14px;
    height: 14px;
    background-color: var(--accent-coral);
    border-radius: 50%;
    box-shadow: 0 0 0 6px rgba(255, 71, 87, 0.25);
}

.point-1 { top: 35%; left: 42%; }
.point-2 { top: 60%; left: 65%; }
.point-3 { top: 72%; left: 30%; }

.map-label {
    position: relative;
    z-index: 2;
    background-color: var(--primary-blue);
    color: var(--bg-white);
    padding: 8px 18px;
    font-size: 0.8rem;
    font-weight: 700;
    border-radius: 4px;
    letter-spacing: 1px;
}

/* ==========================================================================
   8. FLOTA Y OPERACIÓN
   ========================================================================== */
.editorial-fleet-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.fleet-item {
    background-color: var(--bg-white);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.fleet-img-box {
    height: 250px;
}

.fleet-img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.fleet-content {
    padding: 24px;
}

.fleet-content h3 {
    margin-bottom: 8px;
    color: var(--primary-blue);
}

.fleet-content p {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.specs-placeholder {
    font-size: 0.8rem;
    color: var(--secondary-violet);
    background-color: var(--surface-light);
    padding: 8px 12px;
    border-radius: 4px;
}

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

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

.gallery-item.item-large { grid-column: span 2; }
.gallery-item.item-wide { grid-column: span 3; height: 320px; }

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.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(10, 25, 47, 0.95);
    justify-content: center;
    align-items: center;
}

.lightbox-content {
    max-width: 85%;
    max-height: 85%;
    border-radius: 6px;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: var(--bg-white);
    font-size: 40px;
    cursor: pointer;
}

/* ==========================================================================
   10. HISTORIA (TIMELINE)
   ========================================================================== */
.timeline {
    position: relative;
    max-width: 700px;
    margin: 40px auto 0;
}

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

.timeline-item {
    position: relative;
    padding-left: 50px;
    margin-bottom: 40px;
}

.timeline-dot {
    position: absolute;
    top: 4px;
    left: 11px;
    width: 16px;
    height: 16px;
    background-color: var(--accent-coral);
    border-radius: 50%;
    border: 3px solid var(--surface-light);
}

.timeline-stage {
    display: inline-block;
    font-weight: 800;
    color: var(--primary-blue);
    margin-bottom: 4px;
}

/* ==========================================================================
   11. POR QUÉ J&M
   ========================================================================== */
.feature-box {
    background-color: var(--bg-white);
    padding: 32px 24px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.feature-num {
    display: block;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--secondary-violet);
    margin-bottom: 12px;
}

.feature-box h3 {
    margin-bottom: 8px;
    font-size: 1.1rem;
    color: var(--primary-blue);
}

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

/* ==========================================================================
   12. CONTACTO
   ========================================================================== */
.contacto-section { position: relative; }

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

.contacto-lead {
    max-width: 650px;
    margin: 0 auto 40px;
    color: rgba(255, 255, 255, 0.85);
    font-size: 1.15rem;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer {
    background-color: #060E1A;
    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.6rem;
    font-weight: 800;
    color: var(--bg-white);
    margin-bottom: 16px;
}

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

.social-links a {
    display: inline-block;
    margin-right: 12px;
    color: var(--secondary-violet);
    font-weight: 700;
    font-size: 0.9rem;
}

.footer-bottom {
    margin-top: 60px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.85rem;
}

/* ==========================================================================
   ANIMACIONES REVEAL (SCROLL)
   ========================================================================== */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

/* ==========================================================================
   RESPONSIVE DESIGN (CORRECCIONES APLICADAS)
   ========================================================================== */
@media (max-width: 992px) {
    .grid-4, .grid-3 { grid-template-columns: repeat(2, 1fr); }
    .hero h1 { font-size: 2.8rem; }
    .process-steps-grid { flex-direction: column; gap: 30px; }
    .step-line { display: none; }
    .gallery-item.item-large, .gallery-item.item-wide { grid-column: span 1; }
    .editorial-fleet-grid { grid-template-columns: 1fr; }
    .kpi-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .section { padding: 80px 0; }
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
    
    .menu-toggle { display: flex; }
    
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 85%;
        height: 100vh;
        background-color: var(--primary-blue);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: right 0.4s ease;
        z-index: 1001;
        box-shadow: -10px 0 30px rgba(0,0,0,0.5);
    }
    
    .nav-menu.active { right: 0; }
    .menu-close { display: block; }
    
    .hero h1 { font-size: 2.2rem; }
    .hero-actions { flex-direction: column; }
    .btn { width: 100%; max-width: 320px; margin: 0 auto; }
    .btn-whatsapp-lg { width: auto; max-width: 100%; display: inline-flex; }

    .about-image-wrapper { padding-right: 0; padding-bottom: 0; margin-bottom: 30px; }
    .about-floating-card { position: relative; max-width: 100%; margin-top: 15px; }

    .gallery-masonry { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .hero h1 { font-size: 1.8rem; }
    .section-title { font-size: 1.8rem; }
    .kpi-grid { grid-template-columns: 1fr; }
}