/* ==========================================================================
   VARIABLES - ¡EDITA ESTOS COLORES FÁCILMENTE!
   ========================================================================== */
/* ==========================================================================
   VARIABLES - NUEVA IDENTIDAD GRUPO SMITH
   ========================================================================== */
:root {
    --primary-color: #173754;   /* Azul marino oscuro (Extraído de tu nuevo logo) */
    --secondary-color: #2980b9; /* Azul corporativo brillante para botones y detalles */
    --accent-color: #f4f6f9;    /* Gris muy claro/azulado para fondos de secciones */
    --text-color: #334155;      /* Gris pizarra oscuro para texto general (más elegante que negro) */
    --text-light: #ffffff;      /* Blanco puro */
    --font-main: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --transition: all 0.3s ease-in-out;
}

/* Busca la sección de BOTONES (línea 130 aprox) y reemplaza .btn-primary y .btn-primary:hover
para mejorar el contraste con la nueva paleta:
*/

.btn-primary {
    background-color: var(--secondary-color);
    color: var(--text-light); /* Cambiado a blanco para que resalte sobre el botón azul */
    border: 2px solid var(--secondary-color);
}

.btn-primary:hover {
    background-color: transparent;
    color: var(--secondary-color);
}

/* ==========================================================================
   RESETEOS Y ESTILOS BASE
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    color: var(--text-color);
    line-height: 1.6;
    background-color: #fff;
}

a {
    text-decoration: none;
    color: var(--secondary-color);
    transition: var(--transition);
}

ul {
    list-style: none;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

.section-padding {
    padding: 80px 0;
}

.text-center {
    text-align: center;
}

.text-justify {
    text-align: justify;
}

.about-lead {
    max-width: 900px;
    margin: 0 auto;
    font-size: 1.1rem;
}

/* ==========================================================================
   TIPOGRAFÍA Y TÍTULOS
   ========================================================================== */
.section-title {
    text-align: center;
    margin-bottom: 40px;
}

.section-title h2 {
    font-size: 2.5rem;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.section-title.light h2 {
    color: var(--secondary-color);
}

.divider {
    height: 4px;
    width: 60px;
    background-color: var(--secondary-color);
    margin: 10px auto;
    border-radius: 2px;
}

/* ==========================================================================
   NAVEGACIÓN (HEADER)
   ========================================================================== */
.navbar {
    background-color: var(--text-light);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

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

.logo h2 {
    color: var(--secondary-color);
    font-size: 1.8rem;
    letter-spacing: 1px;
}

.nav-links {
    display: flex;
    gap: 20px;
}

.nav-links li a {
    color: var(--primary-color);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
}

.nav-links li a:hover {
    color: var(--secondary-color);
}

.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.menu-toggle .bar {
    height: 3px;
    width: 25px;
    background-color: var(--secondary-color);
    margin: 3px 0;
    border-radius: 3px;
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero {
    height: 100vh;
    /* Usamos tu azul marino con 85% de opacidad para que se vea la imagen de fondo */
    background: linear-gradient(rgba(23, 55, 84, 0.85), rgba(23, 55, 84, 0.4)), url('../assets/images/hero-bg.jpg') center/cover;
    background-color: var(--primary-color); 
    display: flex;
    align-items: center;
    text-align: center;
    color: var(--text-light);
    padding-top: 60px;
}

.hero-content h1 {
    font-size: 4rem;
    color: var(--text-light); /* Ahora es blanco puro */
    margin-bottom: 10px;
    letter-spacing: 3px;
    font-weight: 800; /* Un poco más grueso para mayor impacto */
}

.hero .subtitle {
    font-size: 2rem;
    font-weight: 300;
    margin-bottom: 20px;
}

.hero p {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto 30px auto;
}

/* BOTONES */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 5px;
    font-weight: bold;
    text-transform: uppercase;
    transition: var(--transition);
    cursor: pointer;
}

.btn-primary {
    background-color: var(--text-light); /* Fondo blanco */
    color: var(--primary-color); /* Texto en tu azul marino corporativo */
    border: 2px solid var(--text-light); /* Borde blanco */
}

.btn-primary:hover {
    background-color: transparent; /* Al pasar el mouse se vuelve transparente */
    color: var(--text-light); /* El texto se vuelve blanco */
    border: 2px solid var(--text-light); /* Mantiene el borde blanco */
}

.btn-outline {
    background-color: transparent;
    color: var(--secondary-color);
    border: 2px solid var(--secondary-color);
    margin: 5px;
}

.btn-outline:hover {
    background-color: var(--secondary-color);
    color: var(--primary-color);
}

/* ==========================================================================
   SECCIONES Y GRIDS
   ========================================================================== */
.bg-light { background-color: var(--accent-color); }
.bg-dark { background-color: var(--primary-color); color: var(--text-light); }
.mt-4 { margin-top: 40px; }
.mt-2 { margin-top: 20px; }

.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

/* CARDS */
.card {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    border-top: 4px solid var(--secondary-color);
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.card h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.5rem;
}

/* LISTAS DE SERVICIOS */
.service-list li {
    background: #fff;
    margin-bottom: 10px;
    padding: 15px;
    border-left: 4px solid var(--secondary-color);
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

/* TAGS DE MAQUINARIA */
.tags-container {
    justify-items: center;
}
.tag {
    background: var(--primary-color);
    color: var(--text-light);
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 0.9rem;
    text-align: center;
    width: 100%;
    border: 1px solid var(--secondary-color);
}

/* CONTACTO */
.contact-info {
    text-align: center;
    font-size: 1.2rem;
}

.contact-info p {
    margin-bottom: 15px;
}

/* FOOTER */
footer {
    background-color: var(--primary-color);
    color: var(--text-light);
    padding: 20px 0;
    font-size: 0.9rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2); /* Solo una línea delgada y elegante para separar */
}

/* ==========================================================================
   AJUSTES SECCIÓN CONTACTO (FONDO OSCURO)
   ========================================================================== */
/* El título "Contacto" en blanco para que resalte sobre el azul marino */
.section-title.light h2 {
    color: var(--text-light); 
}

/* La rayita debajo del título la dejamos en el azul brillante */
.section-title.light .divider {
    background-color: var(--secondary-color); 
}

/* Color del enlace del correo electrónico */
.contact-info a {
    color: var(--secondary-color);
    font-weight: 600;
}

.contact-info a:hover {
    color: var(--text-light);
}

/* Botones Redes Sociales con Iconos */
.btn-social {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px; /* Espacio entre el icono y el texto */
    background-color: var(--text-light); /* Fondo blanco puro */
    color: var(--primary-color); /* Letras e iconos en azul marino corporativo */
    border: 2px solid var(--text-light); /* Borde blanco */
    margin: 5px;
    padding: 10px 25px; /* Tamaño del botón */
    border-radius: 5px;
    font-weight: bold;
    text-transform: uppercase;
    transition: var(--transition);
}

.btn-social:hover {
    background-color: transparent; /* Fondo transparente al pasar el mouse */
    color: var(--text-light); /* Letras e iconos cambian a blanco */
    border-color: var(--text-light); /* Mantiene el borde blanco */
}

/* ==========================================================================
   ANIMACIONES Y UTILIDADES
   ========================================================================== */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================================================
   RESPONSIVE (MÓVILES Y TABLETS)
   ========================================================================== */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        position: absolute;
        top: 60px;
        left: 0;
        background-color: var(--primary-color);
        padding: 20px 0;
        text-align: center;
    }

    .nav-links.active {
        display: flex;
    }

    .menu-toggle {
        display: flex;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .hero .subtitle {
        font-size: 1.2rem;
    }
}

/* ==========================================================================
   GALERÍA VISUAL DE SERVICIOS (TIPO ESTUDIO)
   ========================================================================== */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 20px;
}

.gallery-card {
    background: var(--text-light);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    transition: var(--transition);
    border: 1px solid rgba(0,0,0,0.05);
}

.gallery-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
}

/* El fondo "Tipo Estudio" */
/* Contenedor del Carrusel */
.img-container {
    height: 220px;
    width: 100%;
    background: radial-gradient(circle, #ffffff 0%, #e2e8f0 100%);
    position: relative; /* Necesario para apilar las imágenes */
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Todas las imágenes ocultas por defecto y centradas */
.img-container img {
    position: absolute; /* Apila una sobre otra */
    max-width: 85%; /* Se muestran grandes y completas */
    max-height: 85%;
    object-fit: contain;
    opacity: 0; /* Ocultas */
    transition: opacity 1s ease-in-out, transform 0.4s ease; /* Transición suave */
    filter: drop-shadow(0px 8px 8px rgba(0,0,0,0.25));
}

/* Solo se ve la imagen activa */
.img-container img.active {
    opacity: 1; /* Visible */
    z-index: 5;
}

/* Efecto Zoom al pasar el mouse por la tarjeta */
.gallery-card:hover .img-container img.active {
    transform: scale(1.15) translateY(-5px);
    filter: drop-shadow(0px 15px 15px rgba(0,0,0,0.3));
}

.gallery-info {
    padding: 25px 20px;
    text-align: center;
    border-top: 3px solid var(--secondary-color);
}

.gallery-info h3 {
    color: var(--primary-color);
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.gallery-info p {
    font-size: 0.95rem;
    color: #555;
    line-height: 1.4;
}

/* ==========================================================================
   SECCIÓN DE INFRAESTRUCTURA Y MAQUINARIA
   ========================================================================== */
.infrastructure-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.infra-card {
    background: var(--text-light);
    border: 1px solid rgba(0,0,0,0.05);
    border-radius: 8px;
    padding: 30px 25px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    transition: var(--transition);
    border-top: 4px solid var(--primary-color);
}

.infra-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    border-top-color: var(--secondary-color);
}

/* Contenedor de la foto de la máquina */
.infra-img {
    width: 100%;
    height: 180px; /* Altura uniforme para todas las fotos */
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 20px;
    background-color: var(--accent-color);
}

.infra-img img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Recorta la foto para que llene el espacio sin deformarse */
    transition: transform 0.5s ease;
}

/* Efecto zoom en la foto de la máquina al pasar el ratón */
.infra-card:hover .infra-img img {
    transform: scale(1.08);
}

.infra-card h3 {
    color: var(--primary-color);
    font-size: 1.3rem;
    margin-bottom: 15px;
}

.infra-list {
    list-style: none;
    padding: 0;
}

.infra-list li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 8px;
    font-size: 0.95rem;
    color: #555;
}

/* Viñeta personalizada con el color secundario */
.infra-list li::before {
    content: "■";
    position: absolute;
    left: 0;
    top: -2px;
    color: var(--secondary-color);
    font-size: 0.8rem;
}


/* ==========================================================================
   FRANJA DE GARANTÍA DE CALIDAD
   ========================================================================== */
.quality-banner {
    background-color: var(--primary-color); /* Tu azul marino corporativo */
    padding: 50px 0;
    margin-bottom: 40px;
    border-top: 4px solid var(--secondary-color); /* Línea de acento para resaltar */
}

.quality-content {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.quality-icon {
    color: var(--secondary-color);
    margin-bottom: 15px;
    filter: drop-shadow(0px 4px 6px rgba(0,0,0,0.3));
}

.quality-banner h3 {
    font-size: 1.8rem;
    margin-bottom: 15px;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.quality-banner p {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #cbd5e1; /* Gris azulado claro para perfecta lectura */
}

/* ==========================================================================
   BOTÓN FLOTANTE DE WHATSAPP
   ========================================================================== */
.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 30px;
    right: 30px;
    background-color: #25D366; /* Verde oficial de WhatsApp */
    color: #FFF;
    border-radius: 50px;
    text-align: center;
    box-shadow: 0px 6px 15px rgba(0,0,0,0.3);
    z-index: 1000; /* Asegura que siempre esté por encima de todo */
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.whatsapp-float:hover {
    transform: scale(1.15); /* Crece un poco al pasar el mouse */
    background-color: #128C7E; /* Verde más oscuro al hacer hover */
    color: #FFF;
}

/* Ajuste del botón para pantallas de celular */
@media (max-width: 768px) {
    .whatsapp-float {
        width: 50px;
        height: 50px;
        bottom: 20px;
        right: 20px;
    }
    .whatsapp-float svg {
        width: 26px;
        height: 26px;
    }
}

/* ==========================================================================
   MAPA DE UBICACIÓN
   ========================================================================== */
.map-container {
    width: 100%;
    height: 350px;
    border-radius: 10px;
    overflow: hidden;
    margin-top: 40px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    border: 2px solid var(--text-light); /* Un borde blanco sutil */
}

.map-container iframe {
    width: 100%;
    height: 100%;
    border: 0;
}