/* ========================================
   MGD EXPORT - ESTILOS CORPORATIVOS
   ======================================== */

/* ========== DESIGN VARIABLES ========== */
:root {
    /* CORPORATE COLORS */
    --color-primary: #B8900F;        /* Dark navy blue - Original */
    --color-secondary: #D4A843;      /* Amarillo industrial/Dorado */
    --color-accent: #FFC107;         /* Amarillo más brillante */
    --color-white: #FFFFFF;
    --color-light-gray: #E8E8E8;
    --color-medium-gray: #CCCCCC;
    --color-dark-gray: #666666;
    --color-text: #333333;
    --color-card: #001a33;
    
    /* TYPOGRAPHY */
    --font-family: 'Inter', 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-heading: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-size-base: 16px;
    --font-size-h1: 48px;
    --font-size-h2: 36px;
    --font-size-h3: 24px;
    --font-size-h4: 18px;
    
    /* SPACING */
    --spacing-xs: 8px;
    --spacing-sm: 16px;
    --spacing-md: 24px;
    --spacing-lg: 40px;
    --spacing-xl: 60px;
    --spacing-2xl: 80px;
    
    /* BORDERS AND SHADOWS */
    --border-radius: 4px;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.3);
}

/* ========== RESET AND GLOBAL STYLES ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-white);
}

/* ========== CONTENEDOR ========== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-xl);
}

/* ========== TIPOGRAFÍA ========== */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: var(--spacing-md);
    line-height: 1.2;
}

h1 {
    font-size: var(--font-size-h1);
}

h2 {
    font-size: var(--font-size-h2);
}

h3 {
    font-size: var(--font-size-h3);
}

h4 {
    font-size: var(--font-size-h4);
}

p {
    margin-bottom: var(--spacing-md);
    color: var(--color-text);
    line-height: 1.8;
}

a {
    color: var(--color-secondary);
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: var(--color-white);
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.6), 0 0 16px rgba(255, 255, 255, 0.4);
    text-decoration: underline;
}

/* ========== BOTONES ========== */
.btn {
    display: inline-block;
    padding: 15px 40px;
    border-radius: var(--border-radius);
    font-weight: 700;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    border: 2px solid transparent;
    font-family: var(--font-heading);
}

.btn-primary {
    background-color: var(--color-secondary);
    /* color: var(--color-primary);*/
    color: var(--color-white);
}

.btn-primary:hover {
    background-color: #B8900F;
    transform: translateY(-px);
    box-shadow: 0 8px 16px rgba(255, 255, 255, 0.3);
}

.btn-secondary {
    background-color: transparent;
    color: var(--color-secondary);
    border-color: var(--color-secondary);
}

.btn-secondary:hover {
    background-color: var(--color-secondary);
    color: var(--color-white);
    transform: translateY(-2px);
}

.btn-nav {
    background-color: #001a33;
    color: var(--color-white);
    padding: 10px 25px;
    font-size: 12px;
    border-radius: var(--border-radius);
}

/* ========== HEADER / NAVIGATION ========== */
/* .header {
    position: sticky;
    top: 0;
    background-color: var(--color-primary);
    box-shadow: var(--shadow-md);
    z-index: 1000;
} */

/* ========== HEADER BASE (Transparente sobre el video) ========== */
.header {
    position: fixed; /* Esto hace que el menú siga a la pantalla al bajar */
    top: 0;
    left: 0;
    width: 100%;
    background-color: transparent; /* Fondo transparente al inicio */
    transition: background-color 0.4s ease, box-shadow 0.4s ease; /* Efecto de transición suave */
    z-index: 1000; /* Asegura que el menú siempre esté por encima de las fotos/videos */
}

/* ========== HEADER SCROLLED (Color sólido al bajar) ========== */
/* Esta clase se la agregaremos con JavaScript cuando el usuario haga scroll */
.header.scrolled {
    background-color: var(--color-primary); /* Tu azul marino corporativo */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3); /* Una sombra elegante para separarlo del contenido */
}

.navbar {
    padding: 5px 0; /* <-- Cambiamos var(--spacing-md) por 5px para reducir la altura */
}

.navbar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h2 {
    color: var(--color-white);
    font-size: 24px;
    font-weight: 700;
    margin: 0;
    letter-spacing: -0.5px;
}

/* LOGO IMAGE - Visible over dark header */
.logo-img {
    height: 80px;
    width: auto;
    max-width: 250px;
    object-fit: contain;
    transition: all 0.3s ease;
    
    /* Reduced filters - lighter header now */
    filter: brightness(1.1) contrast(1.1) drop-shadow(0 1px 3px rgba(0,0,0,0.2));
}

.logo-img:hover {
    filter: brightness(1.2) contrast(1.2) drop-shadow(0 2px 4px rgba(0,0,0,0.3));
    transform: scale(1.05);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: var(--spacing-lg);
    align-items: center;
}

.nav-links a {
    color: var(--color-light-gray);
    font-weight: 500;
    font-size: 14px;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--color-white);
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background-color: var(--color-white);
    margin: 5px 0;
    transition: 0.3s;
}

/* ========== HERO SECTION ========== */
.hero {
    background: #001a33;
    padding: var(--spacing-2xl) 0;
    padding-top: 130px;
    min-height: 650px;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: rgba(212, 168, 67, 0.05);
    border-radius: 50%;
}

.hero-grid {
    display: grid;
    grid-template-columns: 60% 40%;
    gap: var(--spacing-xl);
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-title {
    color: var(--color-white);
    font-size: var(--font-size-h1);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: var(--spacing-md);
}

.hero-subtitle {
    color: var(--color-light-gray);
    font-size: 18px;
    line-height: 1.8;
    margin-bottom: var(--spacing-lg);
    max-width: 90%;
}

.hero-buttons {
    display: flex;
    gap: var(--spacing-md);
    flex-wrap: wrap;
}

.hero-buttons .btn {
    font-size: 13px;
    padding: 15px 35px;
}

/* Video de fondo con Blur (Efecto de Hero.jsx) */
.hero-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(6px); /* El desenfoque que estaba en el JSX */
    z-index: 0;
}

/* Capa oscura sobre el video para resaltar el texto */
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.7));
    z-index: 1;
}

/* Esta clase asegura que todo tu contenido (texto e iconos) quede por encima del video */
.relative-z {
    position: relative;
    z-index: 2;
    width: 100%;
}

/* HERO ICONS */
.hero-icons {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
    justify-content: center;
}

.icon-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.icon-circle {
    width: 100px;
    height: 100px;
    background: rgba(212, 168, 67, 0.1);
    border: 3px solid var(--color-secondary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    color: var(--color-secondary);
    margin-bottom: var(--spacing-md);
    transition: all 0.3s ease;
}

.icon-item:hover .icon-circle {
    background: rgba(212, 168, 67, 0.2);
    transform: scale(1.1);
}

.icon-item p {
    color: var(--color-light-gray);
    font-weight: 500;
    font-size: 14px;
    margin: 0;
}

/* ========== SECCIÓN GENÉRICA ========== */
.section-header {
    text-align: center;
    margin-bottom: var(--spacing-2xl);
}

.section-header h2 {
    color: var(--color-primary);
    font-size: var(--font-size-h2);
    margin-bottom: var(--spacing-md);
}

.section-header p {
    color: var(--color-dark-gray);
    font-size: 18px;
    max-width: 600px;
    margin: 0 auto;
}

/* ========== SERVICES ========== */
.servicios {
    padding: var(--spacing-2xl) 0;
    background-color: var(--color-white);
}

.servicios .container {
    max-width: 1350px; 
    padding: 0 20px;
}

.servicios-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px; /* Reducimos el hueco entre tarjetas para aprovechar el espacio */
}

.servicio-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    padding: 24px; /* Reducimos el relleno interno (antes era 40px) para darle más ancho al texto */
    border-radius: 8px;
    border-left: 4px solid var(--color-card);
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
    height: 100%; /* Obliga a que todas las tarjetas midan exactamente lo mismo de alto */
    display: flex;
    flex-direction: column;
}

.servicio-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-left-color: var(--color-accent);
}

.servicio-icon {
    font-size: 40px;
    color: var(--color-card);
    margin-bottom: var(--spacing-md);
}

.servicio-card h3 {
    color: var(--color-card);
    font-size: var(--font-size-h4);
    margin-bottom: var(--spacing-md);
}

.servicio-list {
    list-style: none;
    margin-bottom: var(--spacing-md);
}

.servicio-list li {
    padding: 6px 0;
    color: var(--color-text);
    font-size: 14px;
    position: relative;
    padding-left: 20px;
}

.servicio-list li:before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--color-card);
    font-weight: bold;
}

.servicio-link {
    color: var(--color-card);
    font-weight: 600;
    font-size: 14px;
    display: inline-block;
    transition: all 0.3s ease;
    margin-top: auto; 
}

.servicio-link:hover {
    color: var(--color-accent);
    margin-left: 5px;
}

/* ========== PRODUCTS ========== */
.productos {
    position: relative;
    padding: var(--spacing-2xl) 0;
    overflow: hidden;
    background-color: #001a33;
}

/* Video de fondo para productos */
.productos-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(4px);
    z-index: 0;
}

/* Capa superpuesta oscura */
.productos-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6); /* El 0.6 es la opacidad (60%), puedes subirlo o bajarlo */
    z-index: 1;
}

/* Ajustes de color para el encabezado sobre fondo oscuro */
.productos .section-header h2 {
    color: var(--color-white);
}

.productos .section-header p {
    color: var(--color-light-gray);
}

.productos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-lg);
}

.producto-card {
    background: var(--color-white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.producto-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.producto-header {
    background: #001a33;
    color: var(--color-white);
    padding: var(--spacing-lg);
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.producto-header i {
    font-size: 32px;
    color: var(--color-secondary);
}

.producto-header h3 {
    color: var(--color-white);
    font-size: var(--font-size-h4);
    margin: 0;
}

.producto-body {
    padding: var(--spacing-lg);
}

.producto-body ul {
    list-style: none;
}

.producto-body li {
    padding: 10px 0;
    color: var(--color-text);
    font-size: 14px;
    line-height: 1.6;
}

.producto-body strong {
    color: var(--color-primary);
}

/* ========== ALIANZAS ========== */
.alianzas {
    padding: var(--spacing-2xl) 0;
    background: #001a33;
}

.alianzas .section-header h2,
.alianzas .section-header p {
    color: var(--color-white);
}

.alianzas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-lg);
    margin-top: var(--spacing-xl);
}

.alianza-card {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid var(--color-secondary);
    padding: var(--spacing-lg);
    border-radius: 8px;
    text-align: center;
    transition: all 0.3s ease;
    color: var(--color-white);
}

.alianza-card:hover {
    background: rgba(212, 168, 67, 0.1);
    transform: translateY(-8px);
}

.alianza-icon {
    font-size: 48px;
    color: var(--color-secondary);
    margin-bottom: var(--spacing-md);
}

.alianza-card h3 {
    color: var(--color-white);
    font-size: var(--font-size-h4);
    margin-bottom: var(--spacing-md);
}

.alianza-card p {
    color: var(--color-light-gray);
    font-size: 14px;
    margin: 0;
}

/* ========== NOSOTROS ========== */
.nosotros {
    padding: var(--spacing-2xl) 0;
    background-color: #f8f9fa;
}

.nosotros-content {
    display: grid;
    grid-template-columns: 55% 45%;
    gap: var(--spacing-xl);
    align-items: center;
}

.nosotros-text h2 {
    color: var(--color-primary);
    font-size: var(--font-size-h2);
    margin-bottom: var(--spacing-md);
}

.nosotros-text p {
    color: var(--color-text);
    font-size: 16px;
    line-height: 1.8;
    margin-bottom: var(--spacing-md);
}

.nosotros-text strong {
    color: var(--color-primary);
}

.nosotros-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-md);
    margin-top: var(--spacing-xl);
}

.stat {
    text-align: center;
    padding: var(--spacing-md);
    background: #f8f9fa;
    border-radius: 8px;
}

.stat h4 {
    color: var(--color-secondary);
    font-size: 32px;
    margin: 0 0 var(--spacing-sm) 0;
}

.stat p {
    color: var(--color-dark-gray);
    font-size: 14px;
    margin: 0;
}

.image-placeholder {
    background: linear-gradient(135deg, #f0f0f0 0%, #d8d8d8 100%);
    border-radius: 8px;
    height: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--color-dark-gray);
}

.nosotros-img {
    width: 100%;
    height: 100%;
    max-height: 450px; /* Mantiene una altura similar al placeholder que tenías */
    object-fit: cover; /* Evita que la imagen se estire o deforme */
    border-radius: 8px; /* Mantiene los bordes redondeados de tu diseño */
    box-shadow: var(--shadow-sm); /* Le da una sombra suave */
    transition: all 0.3s ease;
}

.nosotros-img:hover {
    box-shadow: var(--shadow-lg); /* Efecto al pasar el mouse, opcional */
}

.image-placeholder i {
    font-size: 80px;
    margin-bottom: var(--spacing-md);
}

/* ========== CASOS DE ÉXITO ========== */
.casos-exito {
    padding: var(--spacing-2xl) 0;
    background-color: #f8f9fa;
}

.casos-exito .container {
    max-width: 1350px; 
    padding: 0 20px;
}

.casos-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* Forzamos las 4 columnas */
    gap: 20px; /* Reducimos el espacio entre tarjetas */
}

.caso-card {
    background: var(--color-white);
    padding: var(--spacing-lg);
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    position: relative;
    transition: all 0.3s ease;
    border-top: 4px solid var(--color-card);
}

.caso-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.caso-number {
    font-size: 48px;
    font-weight: 700;
    color: rgba(32, 15, 126, 0.15);
    position: absolute;
    top: 10px;
    right: 15px;
}

.caso-card h3 {
    color: var(--color-card);
    font-size: var(--font-size-h4);
    margin-bottom: var(--spacing-sm);
    position: relative;
    z-index: 1;
}

.caso-card p {
    color: var(--color-card);
    font-size: 14px;
    margin-bottom: var(--spacing-sm);
}

.caso-card p strong {
    color: var(--color-card);
}

/* Estilos para el nuevo globo estable */
.globo-wrapper-fijo canvas {
    cursor: grab !important; /* Muestra la mano para arrastrar */
}
.globo-wrapper-fijo canvas:active {
    cursor: grabbing !important; /* Muestra la mano cerrada al arrastrar */
}

/* ========== CONTACTO ========== */
.contacto {
    position: relative; /* Agregado para contener el video */
    padding: var(--spacing-2xl) 0;
    background: #001a33;
    overflow: hidden; /* Agregado para que el video no se desborde */
}

.contacto-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(4px);
    z-index: 0;
}

.contacto-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1;
}

.contacto .section-header h2,
.contacto .section-header p {
    color: var(--color-white);
}

.contacto-content {
    display: grid;
    grid-template-columns: 40% 60%;
    gap: var(--spacing-xl);
    margin-top: var(--spacing-xl);
}

.contacto-info {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

.info-item {
    /* Le damos el mismo fondo sólido oscuro que al formulario */
    background-color: #001a33; 
    padding: var(--spacing-lg);
    border-radius: 8px;
    border-left: 4px solid var(--color-secondary);
    box-shadow: var(--shadow-md); /* Sombreado suave para darle profundidad */
    position: relative; /* Asegura que quede por encima del video */
    z-index: 2;
}

.info-item i {
    font-size: 32px;
    color: var(--color-secondary);
    margin-bottom: var(--spacing-sm);
}

.info-item h4 {
    color: var(--color-white);
    margin-bottom: var(--spacing-sm);
}

.info-item p {
    color: var(--color-light-gray);
    font-size: 14px;
    margin-bottom: 6px;
}

.info-item a {
    color: var(--color-secondary);
    font-weight: 600;
}

/* FORMULARIO */
.contacto-form {
    flex: 1;
    min-width: 300px;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    
    /* ========== SOLUCIÓN A LA TRANSPARENCIA ========== */
    background-color: #001a33; /* Usamos tu color primario oscuro sólido */
    padding: var(--spacing-lg); /* Añadimos espaciado interno para que no pegue el borde */
    border-radius: 8px; /* Bordes redondeados para que combine con las tarjetas */
    box-shadow: var(--shadow-lg); /* Una sombra para darle profundidad sobre el video */
    position: relative; /* Asegura su posición */
    z-index: 2; /* Lo pone por encima del overlay del video */
}

.form-group {
    margin-bottom: var(--spacing-md);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--color-white);
    font-family: var(--font-family);
    font-size: 14px;
    transition: all 0.3s ease;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-secondary);
    background: rgba(255, 255, 255, 0.08);
}

.contacto-form .btn {
    width: 100%;
    margin-top: var(--spacing-md);
}

/* ========== FOOTER ========== */
.footer {
    background-color: #000d1a;
    color: var(--color-light-gray);
    padding: var(--spacing-xl) 0 var(--spacing-md);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
}

.footer-section h4 {
    color: var(--color-white);
    font-size: var(--font-size-h4);
    margin-bottom: var(--spacing-md);
}

.footer-section p {
    font-size: 14px;
    color: var(--color-light-gray);
    margin-bottom: 0;
    line-height: 1.8;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 8px;
}

.footer-section a {
    color: var(--color-light-gray);
    font-size: 14px;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: var(--color-secondary);
}

.social-links {
    display: flex;
    gap: var(--spacing-md);
}

.social-links a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(212, 168, 67, 0.1);
    border-radius: 50%;
    font-size: 18px;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: var(--color-secondary);
    color: var(--color-primary);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: var(--spacing-md);
    text-align: center;
    color: var(--color-dark-gray);
    font-size: 13px;
}

/* ========== RESPONSIVE DESIGN ========== */

/* ESTILO BASE DEL BOTÓN HAMBURGUESA (Oculto en PC) */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 6px;
    z-index: 1001; /* Queda por encima del menú desplegable */
}

.hamburger span {
    width: 30px;
    height: 3px;
    background-color: var(--color-white);
    transition: all 0.3s ease-in-out;
    border-radius: 3px;
}

/* ========== TABLET Y MENÚ MÓVIL (Hasta 768px) ========== */
@media (max-width: 768px) {
    /* --- 1. Lógica del Menú --- */
    .hamburger {
        display: flex;
    }

    .nav-links {
        display: none; /* Oculto por defecto */
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--color-primary);
        padding: 20px 0;
        box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    }

    .nav-links.active {
        display: flex; 
    }

    .nav-links li {
        margin: 15px 0;
        text-align: center;
    }

    .lang-switch {
        justify-content: center;
        margin-left: 0;
        margin-top: 10px;
    }

    /* Animación del botón a una "X" */
    .hamburger.active span:nth-child(1) {
        transform: translateY(9px) rotate(45deg);
    }
    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }
    .hamburger.active span:nth-child(3) {
        transform: translateY(-9px) rotate(-45deg);
    }

    /* --- 2. Ajustes de Estructura Tablet (Tu código original) --- */
    .container {
        padding: 0 var(--spacing-md);
    }

    .hero {
        padding-top: 100px; /* Un poco menos de espacio superior en celulares */
    }

    .hero-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }

    .hero-title {
        font-size: 36px;
    }

    .hero-subtitle {
        font-size: 16px;
        max-width: 100%;
    }

    .hero-buttons {
        flex-direction: column;
        max-width: 250px;
    }

    .hero-buttons .btn {
        width: 100%;
    }

    .nosotros-content,
    .contacto-content,
    .nosotros-stats {
        grid-template-columns: 1fr;
    }

    .servicios-grid,
    .productos-grid,
    .casos-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

/* ========== MÓVIL PEQUEÑO (Hasta 480px) ========== */
@media (max-width: 480px) {
    /* --- Ajustes finos para celulares (Tu código original) --- */
    :root {
        --font-size-h1: 28px;
        --font-size-h2: 24px;
        --font-size-h3: 20px;
        --spacing-xl: 40px;
        --spacing-2xl: 40px;
    }

    .hero {
        min-height: 500px;
        padding: var(--spacing-lg) 0;
    }

    .hero-title {
        font-size: 28px;
    }

    .hero-subtitle {
        font-size: 14px;
    }

    .hero-buttons {
        gap: var(--spacing-sm);
    }

    .hero-buttons .btn {
        padding: 12px 25px;
        font-size: 12px;
    }

    .hero-icons {
        flex-direction: row;
        justify-content: space-around;
    }

    .icon-circle {
        width: 70px;
        height: 70px;
        font-size: 28px;
    }

    .icon-item p {
        font-size: 12px;
    }

    .servicios,
    .productos,
    .alianzas,
    .casos-exito {
        padding: var(--spacing-lg) 0;
    }

    /* Fuerza 1 sola columna en pantallas muy pequeñas */
    .servicios-grid,
    .productos-grid,
    .casos-grid,
    .alianzas-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }

    .footer-content {
        grid-template-columns: 1fr;
    }
}

/* ========== MODAL ========== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    justify-content: center;
    align-items: center;
}

.modal.active {
    display: flex;
    animation: fadeIn 0.3s ease-out;
}

.modal.closing {
    animation: fadeOut 0.3s ease-out;
}

.modal-content {
    background: white;
    padding: 48px;
    border-radius: 8px;
    max-width: 500px;
    width: 90%;
    box-shadow: var(--shadow-lg);
    text-align: center;
    animation: slideUp 0.3s ease-out;
}

.modal.closing .modal-content {
    animation: slideDown 0.3s ease-out;
}

.modal-icon {
    font-size: 64px;
    margin-bottom: 24px;
    color: var(--color-primary);
}

.modal-title {
    font-size: var(--font-size-h2);
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--color-text);
    font-family: var(--font-heading);
}

.modal-message {
    font-size: var(--font-size-base);
    color: var(--color-dark-gray);
    margin-bottom: 32px;
    line-height: 1.6;
}

.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.modal-btn {
    padding: 12px 32px;
    border: none;
    border-radius: var(--border-radius);
    font-size: var(--font-size-base);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal-btn-primary {
    background-color: var(--color-primary);
    color: white;
}

.modal-btn-primary:hover {
    background-color: #9a7c0a;
    transform: translateY(-2px);
}

.modal-btn-secondary {
    background-color: var(--color-light-gray);
    color: var(--color-text);
}

.modal-btn-secondary:hover {
    background-color: var(--color-medium-gray);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideDown {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(20px);
    }
}

@keyframes fadeIn {
    from {
        background-color: rgba(0, 0, 0, 0);
    }
    to {
        background-color: rgba(0, 0, 0, 0.5);
    }
}

@keyframes fadeOut {
    from {
        background-color: rgba(0, 0, 0, 0.5);
    }
    to {
        background-color: rgba(0, 0, 0, 0);
    }
}
