/* =========================================
   VARIABLES GLOBALES (PALETA DE COLORES)
   ========================================= */
/* Declarar variables aquí permite que Mario cambie un color 
   una sola vez y se actualice en toda la página */
:root {
    --primary-blue: #0B2046; /* Azul oscuro elegante */
    --secondary-blue: #1A3668;
    --accent-orange: #FF6B00; /* Color corporativo de acción */
    --white: #FFFFFF;
    --light-bg: #F4F7F6; /* Gris muy suave para fondos alternos */
    --text-dark: #333333; /* Color de texto para mejor lectura */
    --text-light: #666666;
    --transition: all 0.3s ease; /* Estandariza la velocidad de animaciones */
}

/* =========================================
   RESET BÁSICO (LIMPIEZA DE NAVEGADOR)
   ========================================= */
/* Elimina márgenes automáticos que ponen los navegadores por defecto */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box; /* El borde y relleno no aumentan el tamaño de la caja */
    font-family: 'Montserrat', sans-serif;
}

/* 'smooth' hace que al hacer clic en el menú, la página baje suavemente */
html { 
    scroll-behavior: smooth; 
}

body {
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden; 
}

/* =========================================
   NUEVA REGLA: COMPENSACIÓN DEL MENÚ FIJO
   ========================================= */
section {
    /* Le dice al navegador que deje un margen superior "invisible" al hacer scroll, 
       del mismo tamaño que tu barra de navegación (100px), para que no tape los títulos. */
    scroll-margin-top: 100px; 
}

/* =========================================
   CLASES REUTILIZABLES (UTILIDADES)
   ========================================= */
/* Limita el ancho de la página en pantallas gigantes y la centra */
.container { 
    max-width: 1200px; 
    margin: 0 auto; 
    padding: 0 20px; 
}

.section-padding { padding: 80px 0; }
.bg-light { background-color: var(--light-bg); }
.text-center { text-align: center; }
.text-white { color: var(--white); }
/* 'Flex-row' acomoda elementos lado a lado (ej: texto y foto) */
.flex-row { display: flex; flex-wrap: wrap; gap: 40px; align-items: center; }
.w-100 { width: 100%; }
.mt-40 { margin-top: 40px; }

/* Tipografía de títulos de sección */
.section-title { margin-bottom: 50px; }
.section-title h3 { 
    color: var(--accent-orange); 
    text-transform: uppercase; 
    font-size: 0.9rem; 
    letter-spacing: 2px; 
}
.section-title h2 { 
    color: var(--primary-blue); 
    font-size: 2.2rem; 
    font-weight: 700; 
}
.section-title.text-white h2 { color: var(--white); }

/* =========================================
   ESTILOS DE BOTONES
   ========================================= */
.btn {
    padding: 12px 30px; 
    border-radius: 5px; 
    font-weight: 600; 
    text-decoration: none;
    display: inline-block; 
    transition: var(--transition); 
    cursor: pointer; 
    border: none;
}
.btn-primary { 
    background-color: var(--accent-orange); 
    color: var(--white); 
}
/* Al pasar el mouse, el botón se levanta 2px y oscurece */
.btn-primary:hover { 
    background-color: #e65c00; 
    transform: translateY(-2px); 
}
/* Botón transparente con borde blanco (Hero) */
.btn-outline { 
    background-color: transparent; 
    color: var(--white); 
    border: 2px solid var(--white); 
}
.btn-outline:hover { 
    background-color: var(--white); 
    color: var(--primary-blue); 
}

/* =========================================
   HEADER Y LOGO
   ========================================= */
/* position: fixed mantiene la barra azul siempre visible arriba al hacer scroll */
.header {
    background-color: var(--primary-blue); 
    position: fixed; 
    top: 0;
    width: 100%; 
    z-index: 1000; /* Asegura que el header flote sobre todos los demás elementos */
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
.navbar { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    height: 100px;
}

/* Configuración del Logo con Flexbox para alinear imagen e H1 */
.logo a { 
    display: flex; 
    align-items: center; 
    text-decoration: none; 
    gap: 12px; /* Separación entre el icono y las letras */
}
.logo-img { 
    max-height: 55px; 
    width: auto; 
    transition: var(--transition); 
}
.logo-img:hover { transform: scale(1.05); }
.logo h1 { 
    color: var(--white); 
    font-size: 1.6rem; 
    font-weight: 700;
    margin: 0;
}
.logo span { color: var(--accent-orange); }

/* Menú de navegación (oculto en móviles por CSS de media queries más abajo) */
.nav-links { 
    display: flex; 
    list-style: none; 
    gap: 25px; 
}
.nav-links a { 
    color: var(--white); 
    text-decoration: none; 
    font-weight: 500; 
    font-size: 0.9rem; 
    transition: var(--transition); 
}
.nav-links a:hover { color: var(--accent-orange); }

.btn-nav { 
    background-color: var(--accent-orange); 
    padding: 8px 20px; 
    border-radius: 4px; 
}
.btn-nav:hover { 
    color: var(--white) !important; 
    background-color: #e65c00; 
}

/* Hamburguesa (solo visible en pantallas pequeñas) */
.hamburger { 
    display: none; 
    color: var(--white); 
    font-size: 1.5rem; 
    cursor: pointer; 
}

/* =========================================
   SECCIÓN: HERO (PORTADA INICIAL)
   ========================================= */
.hero {
    position: relative; 
    overflow: hidden; 
    height: calc(100vh - 100px); /* Ocupa el 100% de la pantalla menos el espacio de la barra */
    background: linear-gradient(rgba(11, 32, 70, 0.85), rgba(11, 32, 70, 0.92)), url(img/PortadaDeMiAmor.jpg) center/cover;
    display: flex; 
    align-items: center; 
    color: var(--white); 
    margin-top: 100px;
}
/* Marca de agua del logo (derecha) */
.hero-bg-logo {
    position: absolute; 
    top: 50%; 
    right: -10%; 
    transform: translateY(-50%);
    width: 800px; 
    height: 800px; 
    background-image: url('img/logo.png');
    background-size: contain; 
    background-repeat: no-repeat;
    opacity: 0.15; /* Súper transparente */
    pointer-events: none; /* Evita que estorbe al hacer clic en botones */
    z-index: 1;
}
.hero-content { 
    position: relative; 
    z-index: 2; /* Sube el texto por encima de la marca de agua */
    max-width: 800px; 
}
.hero h2 { font-size: 3.5rem; line-height: 1.2; margin-bottom: 20px; }
.hero p { font-size: 1.2rem; margin-bottom: 30px; color: #e0e0e0; }
.hero-buttons { display: flex; gap: 15px; }

/* =========================================
   SECCIÓN: SOBRE NOSOTROS
   ========================================= */
.about-text { flex: 1; min-width: 300px; }
.about-text h3 { color: var(--accent-orange); text-transform: uppercase; font-size: 0.9rem; letter-spacing: 2px; }
.about-text h2 { color: var(--primary-blue); font-size: 2.5rem; margin-bottom: 5px; }
.subtitle { color: var(--text-light); font-weight: 400; margin-bottom: 20px; font-style: italic; }
.about-image { flex: 1; min-width: 300px; display: flex; justify-content: center; }
.img-nosotros {
    width: 100%; 
    max-width: 400px; 
    height: auto; 
    border-radius: 10px;
    box-shadow: -15px 15px 0px var(--accent-orange); /* Sombra rígida color naranja (Look moderno) */
    object-fit: cover;
    display: block; 
    transition: var(--transition);
}
.img-nosotros:hover { 
    transform: translateY(-5px); 
    box-shadow: -20px 20px 0px var(--accent-orange); 
}

/* =========================================
   SECCIÓN: SERVICIOS Y MASCOTA
   ========================================= */
.mascot-header { margin: 30px 0; }
/* Animación CSS Keyframes (crea el efecto de estar flotando) */
.mascot-img { 
    max-width: 250px; 
    height: auto; 
    animation: float 3s ease-in-out infinite; 
}
.mascot-text { color: var(--accent-orange); font-size: 1.2rem; margin-top: 10px; }
@keyframes float { 
    0% { transform: translateY(0px); } 
    50% { transform: translateY(-10px); } 
    100% { transform: translateY(0px); } 
}

/* Grid automático: Si la pantalla es ancha crea 3 o 4 columnas, si es móvil, crea 1 */
/* =========================================
   SISTEMA DE TARJETAS CENTRADAS (FLEXBOX)
   ========================================= */

/* 1. Contenedores: Cambiamos de Grid a Flexbox para poder centrar */
.grid-services, 
.grid-benefits-text, 
.grid-industries-cards { 
    display: flex; 
    flex-wrap: wrap; /* Permite que las tarjetas bajen a la siguiente línea si no caben */
    justify-content: center; /* ¡ESTA ES LA MAGIA QUE CENTRA LAS TARJETAS SOBRANTES! */
    gap: 30px; 
    margin-top: 40px; 
}

/* 2. Tarjetas de Servicios (Las 11 tarjetas) */
/* Configuración base de todas las tarjetas de servicios */
.service-card {
    flex: 1 1 300px; 
    max-width: 350px; 
    background: var(--white); 
    padding: 30px; 
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05); 
    transition: var(--transition); 
    /* Esta línea es clave: prepara un borde transparente en reposo */
    border-bottom: 4px solid transparent; 
}

/* Efecto al poner el cursor encima (Hover) */
.service-card:hover { 
    transform: translateY(-10px); 
    /* Se fuerza la línea naranja corporativa */
    border-bottom: 4px solid var(--accent-orange) !important; 
    box-shadow: 0 15px 30px rgba(0,0,0,0.1); 
}

/* Animación al pasar el mouse (Servicios) */
.service-card:hover { 
    transform: translateY(-10px); 
    border-bottom: 4px solid var(--accent-orange); 
    box-shadow: 0 15px 30px rgba(0,0,0,0.1); 
}

/* 3. Tarjetas de Beneficios (Las 5 azules) */
.benefit-card {
    flex: 1 1 300px;
    max-width: 350px;
    background-color: rgba(255,255,255,0.1); 
    padding: 30px; 
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.2); 
    text-align: left; 
    transition: var(--transition);
}

/* Animación al pasar el mouse (Beneficios) */
.benefit-card:hover { 
    background-color: rgba(255,255,255,0.2); 
    transform: translateY(-5px); 
}

/* 4. Tarjetas de Industrias (Las 4 con borde superior azul) */
.industry-box {
    flex: 1 1 300px;
    max-width: 350px;
    background: var(--white); 
    padding: 30px; 
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05); 
    border-top: 4px solid var(--primary-blue); 
    transition: var(--transition);
}

/* Animación al pasar el mouse (Industrias) */
.industry-box:hover { 
    transform: translateY(-5px); 
    box-shadow: 0 10px 25px rgba(0,0,0,0.1); 
}
.highlight-card { 
    border: 2px solid var(--accent-orange); 
    background-color: rgba(255, 107, 0, 0.05); 
}
.service-card i { font-size: 2.5rem; color: var(--accent-orange); margin-bottom: 20px; }
.service-card h4 { color: var(--primary-blue); margin-bottom: 15px; font-size: 1.1rem; }
.service-card p { color: var(--text-light); font-size: 0.9rem; }
.service-card:hover { 
    transform: translateY(-10px); 
    border-bottom: 4px solid var(--accent-orange); 
    box-shadow: 0 15px 30px rgba(0,0,0,0.1); 
}

/* =========================================
   SECCIÓN: BENEFICIOS
   ========================================= */
.benefits { background-color: var(--primary-blue); }
.grid-benefits-text { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); 
    gap: 30px; 
    margin-top: 40px; 
}
.benefit-card {
    background-color: rgba(255,255,255,0.1); 
    padding: 30px; 
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.2); 
    text-align: left; 
    transition: var(--transition);
}
.benefit-card i { font-size: 2.5rem; color: var(--accent-orange); margin-bottom: 20px; }
.benefit-card h4 { color: var(--white); margin-bottom: 10px; font-size: 1.2rem; }
.benefit-card p { color: #e0e0e0; font-size: 0.95rem; }
.benefit-card:hover { 
    background-color: rgba(255,255,255,0.2); 
    transform: translateY(-5px); 
}

/* =========================================
   SECCIÓN: METODOLOGÍA (TIMELINE VERTICAL)
   ========================================= */
.timeline { 
    position: relative; 
    max-width: 800px; 
    margin: 0 auto; 
}
/* Se crea la línea central de color azul usando el seudoelemento ::after */
.timeline::after {
    content: ''; 
    position: absolute; 
    width: 4px; 
    background-color: var(--secondary-blue);
    top: 0; 
    bottom: 0; 
    left: 20px; 
    margin-left: -2px;
}
.timeline-item { padding: 20px 0 20px 60px; position: relative; }
/* Se crean los círculos naranjas numerados */
.timeline-dot {
    position: absolute; 
    left: 0; 
    top: 20px; 
    width: 40px; 
    height: 40px;
    background-color: var(--accent-orange); 
    border: 4px solid var(--light-bg);
    border-radius: 50%; 
    z-index: 1; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    color: var(--white); 
    font-weight: bold;
}
.timeline-content { 
    background: var(--white); 
    padding: 20px; 
    border-radius: 5px; 
    box-shadow: 0 3px 10px rgba(0,0,0,0.05); 
}
.timeline-content h4 { color: var(--primary-blue); margin-bottom: 10px; }

/* =========================================
   SECCIÓN: INDUSTRIAS
   ========================================= */
.grid-industries-cards { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); 
    gap: 30px; 
    margin-top: 40px; 
}
.industry-box {
    background: var(--white); 
    padding: 30px; 
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05); 
    border-top: 4px solid var(--primary-blue); 
    transition: var(--transition);
}
.industry-box i { font-size: 2.5rem; color: var(--primary-blue); margin-bottom: 15px; }
.industry-box h4 { color: var(--accent-orange); margin-bottom: 15px; }
.industry-box p { color: var(--text-light); font-size: 0.95rem; }
.industry-box:hover { 
    transform: translateY(-5px); 
    box-shadow: 0 10px 25px rgba(0,0,0,0.1); 
}

/* =========================================
   SECCIÓN: TESTIMONIOS (CASOS DE ÉXITO)
   ========================================= */
.grid-testimonials {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}
.testimonial-card {
    background-color: var(--white);
    padding: 40px 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    border-top: 4px solid var(--accent-orange);
    position: relative;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* Empuja el autor hacia el fondo */
}
.testimonial-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}
.quote-icon {
    font-size: 2.5rem;
    color: rgba(255, 107, 0, 0.2);
    margin-bottom: 20px;
}
.testimonial-text {
    color: var(--text-dark);
    font-style: italic;
    font-size: 1rem;
    margin-bottom: 30px;
    line-height: 1.7;
}
.testimonial-author {
    border-top: 1px solid #eeeeee;
    padding-top: 20px;
}
/* =========================================
   ESTILO DEL CARGO (SIN NOMBRE DE EMPRESA)
   ========================================= */
.author-name { 
    color: var(--accent-orange); /* Cambia el color a tu naranja corporativo */
    font-size: 0.95rem; /* Tamaño ligeramente más refinado */
    font-weight: 700; 
    text-transform: uppercase; /* Convierte todo a MAYÚSCULAS */
    letter-spacing: 1px; /* Separa las letras para darle un toque premium */
    margin-bottom: 0; 
}
/* =========================================
   SECCIÓN: FAQ (ACORDEÓN JS)
   ========================================= */
.accordion { max-width: 800px; margin: 0 auto; }
.accordion-item { 
    background-color: var(--white); 
    margin-bottom: 10px; 
    border-radius: 5px; 
    overflow: hidden; 
    box-shadow: 0 2px 5px rgba(0,0,0,0.05); 
}
/* El botón que acciona el despliegue */
.accordion-header {
    width: 100%; 
    padding: 20px; 
    background: none; 
    border: none; 
    text-align: left;
    font-size: 1rem; 
    font-weight: 600; 
    color: var(--primary-blue); 
    cursor: pointer;
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    transition: var(--transition);
}
.accordion-header:hover { color: var(--accent-orange); }
/* El contenido inicia con altura 0 (oculto). JavaScript manipula el 'max-height' */
.accordion-content { 
    max-height: 0; 
    overflow: hidden; 
    transition: max-height 0.3s ease; 
    padding: 0 20px; 
}
.accordion-content p { padding-bottom: 20px; color: var(--text-light); }

/* =========================================
   SECCIÓN: CONTACTO Y FORMULARIO
   ========================================= */
.contact-info, .contact-form { flex: 1; min-width: 300px; }
.contact-info { text-align: center; /* Títulos centrados */ }
.contact-mascot { 
    display: flex; 
    align-items: center; 
    justify-content: center; /* Mascota centrada */
    margin: 20px 0; 
}
.mascot-contact-img { max-width: 150px; height: auto; filter: drop-shadow(0 5px 15px rgba(0,0,0,0.1)); }
.info-item { 
    display: flex; 
    align-items: center; 
    justify-content: center; /* Correos e iconos centrados */
    margin-bottom: 20px; 
}
.info-item i { font-size: 1.5rem; color: var(--accent-orange); margin-right: 15px; width: 30px; text-align: center; }
.info-item p { font-weight: 500; color: var(--primary-blue); }
.info-item div p { margin-bottom: 5px; /* Alineación perfecta entre tus 2 correos */ }

.contact-form form { display: flex; flex-direction: column; gap: 15px; text-align: left; }
.contact-form input, .contact-form textarea { 
    padding: 15px; 
    border: 1px solid #ccc; 
    border-radius: 5px; 
    font-family: 'Montserrat', sans-serif; 
}
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-color: var(--accent-orange); }

/* =========================================
   MODAL DE ÉXITO (VENTANA VERDE EMERGENTE)
   ========================================= */
.modal {
    display: none; /* Inicia oculto. Se activa al enviar el form */
    position: fixed; 
    z-index: 2000; 
    left: 0; top: 0; width: 100%; height: 100%;
    background-color: rgba(11, 32, 70, 0.8); /* Pantalla azul traslúcida */
    align-items: center; 
    justify-content: center; 
    opacity: 0; 
    transition: opacity 0.3s ease;
}
.modal.show { display: flex; opacity: 1; }
.modal-content {
    background-color: var(--white); 
    padding: 40px; 
    border-radius: 10px; 
    text-align: center;
    max-width: 450px; 
    width: 90%; 
    position: relative; 
    transform: scale(0.8); /* Efecto zoom al entrar */
    transition: transform 0.3s ease; 
    box-shadow: 0 15px 30px rgba(0,0,0,0.2);
}
.modal.show .modal-content { transform: scale(1); }
.close-modal { 
    position: absolute; 
    top: 15px; right: 20px; 
    font-size: 1.5rem; 
    color: var(--text-light); 
    cursor: pointer; 
    transition: var(--transition); 
}
.close-modal:hover { color: var(--accent-orange); }
.modal-icon { font-size: 4rem; color: #25d366; margin-bottom: 20px; }
.modal-content h2 { color: var(--primary-blue); margin-bottom: 15px; }
.modal-content p { color: var(--text-light); margin-bottom: 25px; }
.btn-close-modal { width: 100%; }

/* =========================================
   FOOTER & BOTÓN WHATSAPP
   ========================================= */
.footer { background-color: #051024; color: var(--white); padding: 50px 0 20px; }
.footer-content {
    display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 20px; margin-bottom: 20px;
}
.footer-logo-img { 
    max-height: 100px; width: auto; margin-bottom: 15px; 
    background-color: var(--white); padding: 10px; border-radius: 8px; /* El logo se ve bien sobre fondo oscuro */
}
.footer-logo span { color: var(--accent-orange); }
.footer-logo .small { color: #999; font-size: 0.8rem; margin-top: 5px; }
.footer-social a {
    color: var(--white); background-color: rgba(255,255,255,0.1); 
    width: 40px; height: 40px;
    display: inline-flex; align-items: center; justify-content: center; 
    border-radius: 50%; margin-left: 10px; text-decoration: none; transition: var(--transition);
}
.footer-social a:hover { background-color: var(--accent-orange); }
.footer-bottom { font-size: 0.8rem; color: #888; }

.whatsapp-float {
    position: fixed; 
    width: 60px; height: 60px; 
    bottom: 40px; right: 40px;
    background-color: #25d366; color: #FFF; 
    border-radius: 50px; text-align: center;
    font-size: 30px; 
    box-shadow: 2px 2px 10px rgba(0,0,0,0.2); 
    z-index: 100;
    display: flex; align-items: center; justify-content: center; 
    transition: var(--transition); text-decoration: none;
}
.whatsapp-float:hover { background-color: #20b858; transform: scale(1.1); }

/* =========================================
   ANIMACIONES (Efecto Reveal al hacer scroll)
   ========================================= */
/* Elementos inician transparentes y desplazados hacia abajo */
.reveal { 
    opacity: 0; 
    transform: translateY(50px); 
    transition: all 0.8s ease; 
}
/* JS añade la clase 'active' cuando el usuario hace scroll hacia ellos */
.reveal.active { 
    opacity: 1; 
    transform: translateY(0); 
}

/* =========================================
   RESPONSIVE (ADAPTACIÓN A CELULARES)
   ========================================= */
@media (max-width: 768px) {
    .hero h2 { font-size: 2.2rem; }
    .hero-buttons { flex-direction: column; }
    
    /* El menú de botones pasa de ser horizontal a ser un cajón oculto lateral */
    .nav-links {
        position: fixed; 
        right: -100%; /* Oculto fuera de la pantalla */
        top: 100px; 
        flex-direction: column;
        background-color: var(--primary-blue); 
        width: 100%; 
        text-align: center;
        transition: 0.3s; 
        box-shadow: 0 10px 10px rgba(0,0,0,0.1); 
        padding: 20px 0;
    }
    /* JS añade 'active' al tocar la hamburguesa para mostrar el menú */
    .nav-links.active { right: 0; } 
    .hamburger { display: block; }
}

.grid-services, .grid-benefits-text, .grid-industries-cards { 
    display: flex !important; 
    flex-wrap: wrap !important; 
    justify-content: center !important; 
}
.service-card.highlight-card {
    border: 4px solid transparent !important;
    background-color: var(--white) !important;
}