/* =========================================
   1. VARIABLES Y CONFIGURACIÓN (EL CEREBRO)
   ========================================= */
:root {
    /* Colores Corporativos */
    --primary-color: #004481; /* Azul A&N */
    --accent-color: #ff6600;  /* Naranja llamada a la acción */
    
    /* Textos y Fondos */
    --text-dark: #333333;
    --text-light: #f4f4f4;
    --bg-light: #ffffff;
    --bg-gray: #f9f9f9;
    
    /* Tipografía */
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Poppins', sans-serif; /* Corregido mayúscula */
    
    /* Medidas Estándar */
    --container-width: 1200px;
    --section-padding: 80px 0;
    --slider-height: 600px;
}

/* =========================================
   2. RESET BÁSICO Y MODERNO (MEJORADO)
   ========================================= */

/* 1. Control total de tamaños (incluyendo pseudo-elementos) */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* 2. Configuración base del cuerpo */
body {
    font-family: var(--font-body);
    color: var(--text-dark);
    line-height: 1.6;
    background-color: var(--bg-light);
    /* Hace que el texto se vea más nítido en Mac y móviles */
    -webkit-font-smoothing: antialiased; 
    -moz-osx-font-smoothing: grayscale;
}

/* 3. Imágenes flexibles (VITAL para que no se salgan del ancho en celular) */
img, picture, video, canvas, svg {
    display: block;
    max-width: 100%;
}

/* 4. FORMULARIOS Y BOTONES (Esto arregla los clicks y fuentes) */
/* Fuerza a que los inputs usen tu fuente Poppins/Montserrat y no la fea del sistema */
input, button, textarea, select {
    font: inherit; 
    outline: none; /* Quita el borde azul predeterminado al escribir */
}

/* Asegura que todo lo "cliqueable" tenga manito y responda rápido */
button, input[type="submit"], input[type="button"], a {
    cursor: pointer;
    touch-action: manipulation; /* Elimina el retraso de 300ms en clicks de celular */
    -webkit-tap-highlight-color: transparent; /* Quita el parpadeo azul/gris al tocar en Android/iOS */
}

/* 5. Tipografía y Enlaces */
h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    overflow-wrap: break-word; /* Evita que una palabra muy larga rompa el diseño móvil */
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.3s;
}

ul { list-style: none; }

/* 6. Comportamiento general */
html {
    scroll-behavior: smooth; /* Desplazamiento suave al ir a #secciones */
}

/* =========================================
   3. CLASES UTILITARIAS (HERRAMIENTAS)
   ========================================= */
.container {
    width: 90%;            /* En móviles ocupa el 90% */
    max-width: 1200px;     /* En PC tope de 1200px */
    margin: 0 auto;        /* CENTRADO HORIZONTAL */
    padding: 0 15px;       
    position: relative;    
}

.flex-between { display: flex; justify-content: space-between; align-items: center; }

/* Botón Principal (Naranja) */
.btn-primary {
    display: inline-block;
    background: var(--accent-color);
    color: white;
    padding: 12px 30px;
    border-radius: 4px;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}
.btn-primary:hover { 
    background: #e65c00; 
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.15);
}

/* Botón Secundario (Borde Azul) */
.btn-secondary {
    display: inline-block;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    padding: 10px 25px;
    border-radius: 4px;
    font-weight: 600;
    transition: all 0.3s ease;
}
.btn-secondary:hover { 
    background: var(--primary-color); 
    color: white; 
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.15);
}

/* Fondos */
.bg-light { background-color: white; }
.bg-gray { background-color: var(--bg-gray); }

/* =========================================
   4. TOP BAR (BARRA SUPERIOR CONTACTO)
   ========================================= */
.top-bar {
    background-color: var(--primary-color);
    color: white;
    font-size: 0.85rem;
    padding: 10px 0;
}
.contact-info span { margin-right: 20px; }
.contact-info i { margin-right: 5px; color: var(--accent-color); }
.social-icons a { color: white; margin-left: 15px; font-size: 1rem; }
.social-icons a:hover { color: var(--accent-color); }

/* =========================================
   5. HEADER PRINCIPAL Y MENÚ (ESCRITORIO)
   ========================================= */
.main-header {
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    height: 80px;
    display: flex;
    align-items: center;
    position: sticky; /* Menú pegajoso */
    top: 0;
    z-index: 1000;
}

/* Contenedor del menú: Ocupa todo el ancho y separa extremos */
.nav-container {
    display: flex;
    justify-content: space-between; 
    align-items: center;
    height: 100%;
    width: 100%; 
}

.logo {
    display: flex;
    align-items: center;
    height: 100%;
}

.logo img {
    max-height: 60px;
    width: auto;
    display: block;
}

/* Menú en Escritorio */
.nav-menu {
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav-list {
    display: flex;
    list-style: none;
    gap: 25px;
    margin: 0;
    padding: 0;
}

.nav-menu a {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 0.95rem;
    display: inline-block;
    transition: all 0.5s ease;
}

.nav-menu a:hover {
    color: var(--accent-color);
    transform: translateY(-2px);
}
/* --- ESTADO ACTIVO DEL MENÚ (SECCIÓN ACTUAL) --- */
.nav-menu a.active {
    color: var(--accent-color); /* Se pinta Naranja */
    font-weight: 600; /* Se pone un poco más gordita la letra */
    position: relative;
}





/* Botón destacado dentro del menú */
.nav-menu .btn-nav-cta {
    background: var(--accent-color);
    color: white !important; /* Force white text */
    padding: 10px 20px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.nav-menu .btn-nav-cta:hover {
    background: #e65c00;
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.15);
}

/* Icono hamburguesa (Oculto en PC) */
.nav-toggle {
    display: none; 
    font-size: 1.8rem;
    cursor: pointer;
    color: var(--primary-color);
}
.page-header .overlay {
    background: rgba(0, 40, 80, 0.7);
}
.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 20, 40, 0.75);
    z-index: 1;
}



/* =========================================
   6. HERO SLIDER (BANNER PRINCIPAL) - LIMPIO
   ========================================= */


/* 1. EL CONTENEDOR PRINCIPAL */
.hero-slider {
    width: 100%;
    height: var(--slider-height); /* Usa la variable (ej: 600px) */
    min-height: 600px; /* Altura mínima para laptops */
    position: relative;
    overflow: hidden;
}

/* 2. LA DIAPOSITIVA (Específico para evitar !important) */
.hero-slider .swiper-slide {
    /* Layout Flexbox para centrar todo */
    display: flex;
    justify-content: center; /* Centrado Horizontal */
    align-items: center;     /* Centrado Vertical */
    
    /* Dimensiones */
    width: 100%;
    height: 100%;
    
    /* Fondo */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
}

/* 3. CAPA OSCURA (Radial para resaltar el centro) */
.hero-slider .overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 20, 40, 0.75); /* Tu color personalizado */
    z-index: 1;
}

/* 4. CONTENIDO DEL TEXTO */
.hero-slider .slide-content {
    position: relative;
    z-index: 2; /* Encima del overlay */
    width: 100%;
    max-width: 800px; /* Ancho máximo de lectura */
    padding: 0 20px;
    
    /* Alineación de texto */
    text-align: center;
    margin: 0 auto;
}

/* Título */
.hero-slider .slide-content h1 {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 20px;
    text-transform: uppercase;
    color: white;
    text-shadow: 0 4px 10px rgba(0,0,0,0.3);
    
    opacity: 0; 
    animation: fadeInUp 1s ease forwards 0.5s;
}

/* Subtítulo */
.hero-slider .sub-h1 {
    display: block;
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--accent-color); /* Naranja */
    margin-top: 10px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* Párrafo */
.hero-slider .slide-content p {
    font-size: 1.2rem;
    color: #f0f0f0;
    margin-bottom: 35px;
    line-height: 1.6;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    
    opacity: 0; 
    animation: fadeInUp 1s ease forwards 0.7s;
}

/* Animación de entrada */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(40px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- 5. PUNTOS DE NAVEGACIÓN (Estilo Elástico) --- */
.hero-slider .swiper-pagination {
    bottom: 30px;
    z-index: 10;
}

.hero-slider .swiper-pagination-bullet {
    width: 12px; height: 12px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 1;
    margin: 0 8px !important; /* El único !important necesario por la librería */
    transition: all 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.hero-slider .swiper-pagination-bullet-active {
    width: 40px; /* Se estira */
    border-radius: 10px;
    background: var(--accent-color);
}

/* --- 6. FLECHAS MODERNAS (Glassmorphism) --- */
.hero-slider .swiper-button-prev,
.hero-slider .swiper-button-next {
    width: 55px; height: 55px;
    background-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: white;
    transition: all 0.3s ease;
    display: flex; justify-content: center; align-items: center;
    z-index: 10;
}

/* Ocultar flecha por defecto */
.hero-slider .swiper-button-prev::after,
.hero-slider .swiper-button-next::after { display: none; }

/* Icono interior */
.hero-slider .swiper-button-prev i,
.hero-slider .swiper-button-next i { font-size: 1.2rem; }

/* Efecto Hover Flechas */
.hero-slider .swiper-button-prev:hover,
.hero-slider .swiper-button-next:hover {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    box-shadow: 0 0 15px rgba(255, 102, 0, 0.6);
    transform: scale(1.1);
}

/* --- RESPONSIVE (Móvil) --- */
@media (max-width: 768px) {
    .hero-slider .slide-content h1 { font-size: 2.2rem; }
    .hero-slider .sub-h1 { font-size: 1rem; }
    .hero-slider .slide-content p { font-size: 1rem; }
    
    /* Ajuste flechas en móvil (un poco más chicas) */
    .hero-slider .swiper-button-prev,
    .hero-slider .swiper-button-next {
        width: 40px; height: 40px;
        display: none; /* Opcional: Ocultar flechas en móvil para ver mejor la foto */
    }
}

/* =========================================
   7. SECCIONES GENERALES
   ========================================= */
.page-section { padding: var(--section-padding); }

.section-header { text-align: center; margin-bottom: 50px; }

.section-title {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.divider {
    height: 4px;
    width: 60px;
    background: var(--accent-color);
    margin: 0 auto 20px auto;
}

.content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.check-list li { margin-bottom: 10px; font-size: 1.1rem; }
.check-list i { color: var(--accent-color); margin-right: 10px; }
/* --- IMAGEN PLACEHOLDER (Caja gris para Nosotros) --- */
.img-placeholder {
    width: 100%;
    height: 100%;
    min-height: 300px;      /* Altura mínima para que no desaparezca */
    background: #e0e0e0;    /* Gris suave */
    display: flex;          /* Para centrar el texto dentro */
    align-items: center;
    justify-content: center;
    border-radius: 8px;     /* Bordes redondeados */
    color: #666;            /* Color del texto */
    font-weight: bold;
    font-size: 1.1rem;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.05); /* Sombra interna sutil */
}

/* =========================================
   8. SERVICIOS (TARJETAS)
   ========================================= */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.service-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.15);
}

.card-img {
    height: 220px;
    background-color: #eee;
    background-size: cover;
    background-position: center;
}

.card-body { padding: 25px; text-align: center; }
.card-body h3 { color: var(--primary-color); margin-bottom: 10px; font-size: 1.3rem; }
.card-body p { font-size: 0.95rem; color: #666; }

.service-list {
    text-align: left;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
    font-size: 0.85rem;
    color: #555;
}
.service-list li { margin-bottom: 8px; display: flex; align-items: center; }
.service-list i { color: var(--accent-color); margin-right: 10px; font-size: 0.8rem; }

/* =========================================
   9. POR QUÉ ELEGIRNOS (FEATURES)
   ========================================= */
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin-top: 40px;
}

.feature-item {
    text-align: center;
    padding: 35px 25px;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 68, 129, 0.1); 
    border-radius: 12px;
    background: linear-gradient(to bottom, #ffffff 0%, #f4f8fb 100%);
}

.feature-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 68, 129, 0.1); 
    border-color: rgba(255, 102, 0, 0.5); 
    background: #ffffff;
}

.feature-icon {
    width: 80px; height: 80px;
    background: var(--bg-gray);
    color: var(--accent-color);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 2rem;
    margin: 0 auto 25px auto;
    transition: 0.3s;
}

.feature-item:hover .feature-icon {
    background: var(--accent-color);
    color: white;
}

.feature-item h3 { font-size: 1.4rem; margin-bottom: 15px; color: var(--primary-color); }
.feature-item p { font-size: 0.95rem; color: #666; line-height: 1.7; }

/* =========================================
   10. CARRUSEL CLIENTES
   ========================================= */
.carousel-viewport {
    width: 100%;
    overflow: hidden; 
    position: relative;
    padding: 20px 0;
}
.carousel-track {
    display: flex;
    align-items: center;
    transition: transform 0.5s ease-in-out;
}
.client-slide {
    flex: 0 0 20%;
    max-width: 20%;
    padding: 0 15px;
    display: flex; justify-content: center; align-items: center;
}
.client-slide img {
    max-width: 100%; height: auto; max-height: 80px;
    filter: grayscale(100%); opacity: 0.7; transition: 0.3s;
}
.client-slide img:hover {
    filter: grayscale(0%); opacity: 1; transform: scale(1.1);
}

/* =========================================
   11. GALERÍA FILTRABLE
   ========================================= */
/* --- FILTROS Y TABS (Se mantiene para organizar la grilla) --- */
.gallery-tabs {
    display: flex; justify-content: center; flex-wrap: wrap;
    gap: 15px; margin-bottom: 40px;
}
.tab-btn {
    border: 1px solid #ddd; background: transparent;
    padding: 10px 25px;
    font-family: var(--font-heading); font-weight: 600; font-size: 1rem;
    color: #666; cursor: pointer; border-radius: 30px;
    transition: all 0.3s ease;
}
.tab-btn:hover, .tab-btn.active {
    background: var(--primary-color); color: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,40,80, 0.2);
}

/* --- GRILLA DE LA GALERÍA --- */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

/* --- ITEM INDIVIDUAL --- */
.gallery-item {
    position: relative; height: 250px;
    border-radius: 8px; overflow: hidden; cursor: pointer;
    transition: all 0.4s ease; 
}

/* Clases para el filtrado JS (si usas filtros) */
.gallery-item.hide { display: none; }
.gallery-item.show { animation: fadeIn 0.5s ease; }

@keyframes fadeIn {
    0% { opacity: 0; transform: scale(0.9); }
    100% { opacity: 1; transform: scale(1); }
}

/* --- ESTILOS DEL ENLACE (Nuevo para Fancybox) --- */
/* Esto asegura que el link <a href> ocupe todo el cuadro y no rompa el diseño */
.gallery-item a.enlace-galeria {
    text-decoration: none;
    color: inherit;
    display: block; 
    width: 100%;
    height: 100%;
}

/* --- IMAGEN Y EFECTO ZOOM --- */
.gallery-item img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform 0.5s ease;
}
.gallery-item:hover img { transform: scale(1.1); }

/* --- OVERLAY (Texto sobre la imagen miniatura) --- */
.item-overlay {
    position: absolute; bottom: -100%; left: 0; width: 100%;
    padding: 20px;
    background: rgba(0, 68, 129, 0.9);
    color: white;
    transition: bottom 0.3s ease;
    /* Aseguramos que el texto no capture el clic, para que siempre active el enlace */
    pointer-events: none; 
}

.gallery-item:hover .item-overlay { bottom: 0; }

.item-overlay h4 { font-size: 1.1rem; margin-bottom: 5px; }

/* =========================================
   12. PÁGINA CONTACTO & FOOTER
   ========================================= */
.page-header {
    position: relative; height: 300px;
    background-size: cover; background-position: center;
    background-color: #333;
    display: flex; align-items: center; justify-content: center;
    text-align: center; color: white;
}
.page-header .overlay { background: rgba(0, 40, 80, 0.7); }

.breadcrumb { font-size: 1rem; opacity: 0.8; font-weight: 600; }

.contact-wrapper {
    display: flex; flex-wrap: wrap; gap: 0;
    background: white; border-radius: 10px;
    overflow: hidden; box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}
.contact-form-area { flex: 2; padding: 50px; min-width: 300px; }
.contact-info-panel {
    flex: 1; background: var(--primary-color);
    color: white; padding: 50px; min-width: 300px;
    display: flex; flex-direction: column; justify-content: center;
}

/* Form inputs */
.main-form .form-row { display: flex; gap: 20px; margin-bottom: 20px; }
.main-form .form-group { flex: 1; display: flex; flex-direction: column; }
.main-form .full-width { width: 100%; margin-bottom: 20px; }
.main-form label { font-weight: 600; margin-bottom: 8px; font-size: 0.9rem; color: #444; }
.main-form input, .main-form select, .main-form textarea {
    padding: 12px 15px; border: 1px solid #ddd;
    border-radius: 4px; font-family: var(--font-body);
    font-size: 1rem; transition: 0.3s; background: #fcfcfc;
}
.main-form input:focus, .main-form textarea:focus {
    border-color: var(--accent-color); outline: none;
    background: white; box-shadow: 0 0 0 3px rgba(255, 102, 0, 0.1);
}

.info-list li { display: flex; align-items: flex-start; margin-bottom: 25px; }
.info-list i { font-size: 1.2rem; color: var(--accent-color); margin-right: 15px; margin-top: 5px; }
.social-links-panel a {
    display: inline-block; width: 40px; height: 40px;
    background: rgba(255,255,255,0.1); color: white;
    text-align: center; line-height: 40px; border-radius: 50%;
    margin-right: 10px; transition: 0.3s;
}
.social-links-panel a:hover { background: var(--accent-color); transform: translateY(-3px); }

.main-footer {
    background: var(--primary-color); color: white;
    text-align: center; padding: 30px 20px; margin-top: auto;
}

/* =========================================
   13. EXTRAS (WHATSAPP, RECAPTCHA)
   ========================================= */
.whatsapp-float {
    position: fixed; bottom: 30px; right: 30px;
    background-color: #25d366; color: white;
    width: 60px; height: 60px; border-radius: 50%;
    text-align: center; font-size: 35px;
    box-shadow: 2px 2px 10px rgba(0,0,0,0.3);
    z-index: 1000; display: flex;
    align-items: center; justify-content: center;
    transition: all 0.3s ease; text-decoration: none;
    animation: pulse-green 2s infinite;
}
.whatsapp-float:hover {
    background-color: #128c7e; transform: scale(1.1); color: white;
}
@keyframes pulse-green {
    0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7); }
    70% { box-shadow: 0 0 0 15px rgba(37, 211, 102, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

.grecaptcha-badge {
    width: 70px !important; overflow: hidden !important;
    transition: all 0.3s ease !important;
    left: 10px !important; right: auto !important;
    bottom: 10px !important;
}
.grecaptcha-badge:hover { width: 256px !important; }

/* =========================================
   14. RESPONSIVE (MÓVIL TOTAL)
   ========================================= */
/* TODAS las reglas para celular están aquí unificadas */
@media (max-width: 768px) {
    
    /* Top Bar */
    .top-bar .container {
        flex-direction: column; gap: 10px; text-align: center;
    }
    .contact-info { flex-direction: column; gap: 5px; }

    /* Menú Móvil */
    .nav-toggle { display: block; }

    .nav-menu {
        position: absolute;
        top: 80px; /* Debajo del header */
        left: 0; right: 0;
        background: white;
        padding: 40px 20px;
        box-shadow: 0 10px 20px rgba(0,0,0,0.1);
        
        /* Oculto por defecto */
        flex-direction: column;
        align-items: center;
        text-align: center;
        
        transform: translateY(-150%);
        transition: transform 0.3s ease-in-out;
        z-index: 999;
        width: 100%;
    }

    .nav-menu.active { transform: translateY(0); }

    .nav-list {
        flex-direction: column; gap: 0; width: 100%;
    }

    .nav-list li a {
        display: block; padding: 15px 0;
        border-bottom: 1px solid #f5f5f5; width: 100%;
    }

    .nav-menu .btn-nav-cta {
        margin-top: 20px; margin-left: 0;
        display: inline-block; width: 80%; text-align: center;
    }
    

    /* Grids a 1 columna */
    .content-grid { grid-template-columns: 1fr; }
    .features-grid { grid-template-columns: 1fr; gap: 50px; }
    .client-slide { flex: 0 0 33.33%; max-width: 33.33%; }
    
    /* Contacto */
    .contact-wrapper { flex-direction: column; }
    .main-form .form-row { flex-direction: column; gap: 0; }
    .contact-form-area, .contact-info-panel { padding: 30px; }
    
    /* WhatsApp */
    .whatsapp-float {
        width: 50px; height: 50px; font-size: 28px;
        bottom: 20px; right: 20px;
    }
   .page-header .page-title  { /* Reemplaza .page-title por la clase real de tu título */
        font-size: 2.5rem; /* Ajusta este número hasta que entre bien */
        line-height: 1.2; /* Reduce un poco el espacio entre líneas */
       
    }
}

@media (max-width: 480px) {
    .client-slide { flex: 0 0 50%; max-width: 50%; }
}

/* =========================================
   15. ESTILOS PÁGINAS INTERNAS (NOSOTROS, MISIÓN, VISIÓN)
   ========================================= */

/* A. Grid de Misión / Visión / Valores */
.values-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.value-card {
    background: white;
    padding: 40px 30px;
    text-align: center;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    border-bottom: 4px solid transparent; /* Línea invisible lista para el hover */
}

.value-card:hover {
    transform: translateY(-10px); /* Efecto de flotar */
    border-bottom: 4px solid var(--accent-color); /* Aparece la línea naranja */
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

.icon-box {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 20px;
    display: inline-block;
    transition: 0.3s;
}

.value-card:hover .icon-box {
    color: var(--accent-color); /* El icono cambia a naranja */
    transform: scale(1.1);
}

.value-card h3 {
    margin-bottom: 15px;
    color: var(--text-dark);
    font-size: 1.5rem;
}

.value-card p {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.7;
}

/* B. Sección CTA (Llamada a la acción azul al final) */
.cta-section {
    background: var(--primary-color); /* Fondo azul corporativo */
    color: white;
    text-align: center;
    padding: 80px 20px;
}

.cta-section h2 { 
    margin-bottom: 15px; 
    color: white; 
    font-size: 2.2rem;
}

.cta-section p { 
    margin-bottom: 30px; 
    opacity: 0.9; 
    font-size: 1.1rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* C. Cabeceras de Páginas Internas (Breadcrumbs) */
/* Esto arregla el banner superior de Nosotros/Servicios */
.page-header {
    position: relative;
    height: 300px; /* Altura más corta que el Home */
    background-size: cover;
    background-position: center;
    background-color: #333; /* Fondo de respaldo */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
}

.page-header .overlay {
    background: rgba(0, 30, 60, 0.8); /* Azul oscuro semitransparente */
}

.container.relative {
    position: relative;
    z-index: 2;
}

.page-title {
    font-size: 3rem;
    margin-bottom: 10px;
    text-transform: uppercase;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.breadcrumb {
    font-size: 1.1rem;
    opacity: 0.3;
    font-weight: 500;
    letter-spacing: 1px;
}
/* --- SUBTÍTULO DEL H1 (La parte de "y Mecanizados...") --- */
.sub-h1 {
    display: block;           /* Hace que ocupe su propia línea aunque no haya <br> */
    font-size: 1.3rem;        /* Mucho más pequeño que el título principal */
    font-weight: 400;         /* Letra normal (no negrita) para contraste */
    color: #e0e0e0;           /* Un blanco ligeramente gris para jerarquía */
    margin-top: 10px;         /* Separación del texto de arriba */
    letter-spacing: 2px;      /* Espaciado elegante entre letras */
    text-transform: uppercase; /* Lo fuerza a mayúsculas para verse industrial */
    line-height: 1.4;
    text-shadow: none;        /* Opcional: Le quitamos la sombra fuerte para que se vea más limpio */
}

/* Ajuste para celulares (para que no quede gigante) */
@media (max-width: 768px) {
    .sub-h1 {
        font-size: 0.9rem;    /* Más pequeño en móvil */
        margin-top: 5px;
        letter-spacing: 1px;
    }
}

/* =========================================
   16. AJUSTES FINALES (EL TOQUE MAESTRO)
   ========================================= */

/* A. CORRECCIÓN DE TEXTOS EN MÓVIL 
   (Para que el título no se coma la pantalla en celulares) */
@media (max-width: 768px) {
    .slide-content h1 {
        font-size: 2.2rem; /* Bajamos de 3.5rem a 2.2rem */
    }
    
    .slide-content p {
        font-size: 1rem;   /* Texto un poco más pequeño */
    }

    .section-title {
        font-size: 2rem;   /* Títulos de secciones más controlados */
    }
}

/* =========================================
   ESTILOS DEL CARRUSEL DE CLIENTES (SWIPER)
   ========================================= */

/* 1. Contenedor Principal */
.logoSwiper {
    width: 100%;
    overflow: hidden;   /* Vital: oculta lo que se sale de la pantalla */
    position: relative;
    padding: 10px 0;    /* Un poco de aire arriba y abajo */
}

/* 2. La Pista (Wrapper) - Incluye el parche anti-salto vertical */
.logoSwiper .swiper-wrapper {
    display: flex;      /* ¡CLAVE! Fuerza la fila horizontal inmediatamente */
    width: 100%;
    height: 100%;
    align-items: center; /* Centrado vertical */
    
    /* Hace que la animación de desplazamiento sea constante (sin frenarse) */
    transition-timing-function: linear; 
}

/* 3. Cada Logo Individual (Slide) */
.logoSwiper .swiper-slide {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100px;      /* Altura fija para uniformidad */
    flex-shrink: 0;     /* Evita que los logos se aplasten */
}

/* 4. Estilo de las Imágenes */
.logoSwiper .swiper-slide img {
    max-width: 100%;
    max-height: 80px;   /* Controlamos que ningún logo sea gigante */
    object-fit: contain;
    
    /* Estilo inicial: Gris y semitransparente */
    filter: grayscale(100%); 
    opacity: 0.6;
    transition: all 0.3s ease;
}

/* 5. Efecto Hover: Al pasar el mouse, se ponen a color */
.logoSwiper:hover .swiper-slide img {
    filter: grayscale(0%);
    opacity: 1;
}

/* --- IMAGEN DE NOSOTROS (TALLER) --- */
.about-img-box {
    width: 100%;
    /* El alto ya lo tienes en el HTML (400px), pero el CSS lo asegura */
    height: 100%; 
    min-height: 400px; /* Asegura que no se achique */
    
    /* 1. Bordes Redondeados */
    border-radius: 12px; 
    
    /* 2. Sombra Discreta */
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1); 
    
    /* 3. IMPORTANTE: Para que la imagen respete los bordes redondeados */
    overflow: hidden; 
    position: relative;
}

.about-img-box img {
    width: 100%;
    height: 100%;
    
    /* 4. LA MAGIA: Esto hace que la imagen cubra todo sin deformarse */
    object-fit: cover; 
    object-position: center; /* Centra el foco de la imagen */
    
    display: block; /* Elimina espacios extraños debajo de la imagen */
}

/* --- ESTILOS EXCLUSIVOS PARA LA PÁGINA DE SERVICIOS --- */

/* Al aumentar el tamaño mínimo a 350px (en vez de 250px del home),
   obligamos al navegador a poner MÁXIMO 3 tarjetas por fila en PC,
   o 2 en tablets. Así se ven grandes y con aire. */
.services-grid.grid-expandido {
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 40px; /* Más separación entre ellas para que respiren */
}

/* Opcional: Hacer las imágenes un poco más altas para que luzcan mejor */
.services-grid.grid-expandido .card-img {
    height: 280px; /* En el home es de 220px */
}

/* Opcional: Aumentar un poco la letra de la descripción en esta página */
.services-grid.grid-expandido .card-body p {
    font-size: 1rem;
    line-height: 1.6;
}

/* --- ESTILOS PARA SERVICIOS 2x2 (2 Arriba, 2 Abajo) --- */

/* 1. Solo aplica en pantallas medianas y grandes (Tablets, Laptops, PC) */
@media (min-width: 768px) {
    .services-grid.grid-2x2 {
        /* FORZAMOS 2 COLUMNAS EXACTAS */
        grid-template-columns: repeat(2, 1fr); 
        
        /* Espacio grande entre tarjetas para que se vea elegante */
        gap: 50px; 
    }

    /* 2. Como ahora son más anchas, hacemos la imagen más alta */
    .services-grid.grid-2x2 .card-img {
        height: 300px; /* Antes era 220px, ahora más impactante */
    }

    /* 3. Agrandamos un poco el título y texto para aprovechar el espacio */
    .services-grid.grid-2x2 .card-body {
        padding: 40px; /* Más aire interno */
    }
    
    .services-grid.grid-2x2 h3 {
        font-size: 1.5rem; /* Título más grande */
    }
}