/* =========================================
   IMPORTACIÓN DE FUENTES (GOOGLE FONTS)
========================================= */
@import url('https://fonts.googleapis.com/css2?family=Nunito+Sans:opsz,wght@6..12,300;6..12,400;6..12,600&family=Playfair+Display:wght@400;600;700&display=swap');

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

body {
    font-family: 'Nunito Sans', sans-serif;
    font-weight: 300; 
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', serif;
}

/* =========================================
   ENCABEZADO Y NAVEGACIÓN (CON MENÚ DESPLEGABLE)
========================================= */
header {
    background-color: #1a365d; 
    padding: 15px 50px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 100;
}

header img {
    height: 65px; 
}

nav ul {
    list-style: none; 
    display: flex; 
    gap: 35px; 
    align-items: center;
}

nav ul li {
    position: relative; /* Contenedor de referencia para el submenú flotante */
}

nav ul li a {
    text-decoration: none; 
    color: #ffffff; 
    font-size: 16px;
    padding-top: 15px;
    padding-bottom: 15px; 
    border-top: 2px solid transparent; 
    transition: 0.3s;
    display: block;
}

nav ul li a:hover {
    border-top: 2px solid #ffffff; 
}

/* =========================================
   ESTILOS DEL MENÚ DESPLEGABLE (DROPDOWN)
========================================= */
.menu-desplegable {
    display: none; /* Oculto por defecto */
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #1a365d;
    min-width: 240px;
    box-shadow: 0px 8px 16px rgba(0,0,0,0.2);
    list-style: none;
    flex-direction: column;
    gap: 0;
    padding: 10px 0;
    z-index: 1000;
}

.menu-desplegable li {
    width: 100%;
}

.menu-desplegable li a {
    padding: 10px 20px;
    font-size: 14px;
    color: #ffffff;
    white-space: nowrap;
    border-top: none;
    text-align: left;
    transition: background 0.2s;
}

.menu-desplegable li a:hover {
    background-color: #335178;
    border-top: none;
}

/* Muestra el menú al pasar el cursor sobre el elemento padre */
nav ul li.tiene-dropdown:hover .menu-desplegable {
    display: flex;
}

/* =========================================
   ESTILOS DE LA PÁGINA: INICIO (index.html)
========================================= */
main {
    padding: 50px 0;
    background-color: #f4f4f4; 
}

main h1 {
    color: #1a365d;
    margin-bottom: 20px;
    font-size: 36px;
    text-align: center;
}

main > section > p {
    color: #555555;
    font-size: 18px;
    max-width: 800px;
    margin: 0 auto; 
    line-height: 1.6;
    text-align: center;
}

.servicios {
    margin-top: 60px;
    padding: 40px 20px;
}

.servicios h2 {
    color: #1a365d; 
    font-size: 28px;
    margin-bottom: 40px;
    text-align: center;
}

.contenedor-servicios {
    display: flex; 
    justify-content: center; 
    gap: 30px; 
    flex-wrap: wrap; 
}

.tarjeta-servicio {
    background-color: white;
    padding: 30px;
    border-radius: 8px; 
    box-shadow: 0 4px 8px rgba(0,0,0,0.1); 
    width: 300px; 
    text-align: center;
    border-top: 4px solid #1a365d; 
}

.tarjeta-servicio h3 {
    color: #333;
    font-size: 20px;
    margin-bottom: 15px;
}

.tarjeta-servicio p {
    color: #666;
    font-size: 15px;
    line-height: 1.5;
}

/* =========================================
   PIE DE PÁGINA GLOBAL
========================================= */
footer {
    background-color: #1a365d; 
    color: white; 
    text-align: center;
    padding: 30px;
}

footer p {
    margin-bottom: 10px;
    font-size: 14px;
}

/* =========================================
   ESTILOS DE LA PÁGINA: NOSOTROS (nosotros.html)
========================================= */
.main-nosotros {
    padding: 0; 
    background-color: #ffffff;
}

.banner-quienes-somos {
    background-image: url('../imagenes/fondo-quienes-somos.jpg');
    background-size: cover;
    background-position: center;
    padding: 100px 20px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.caja-azul-centro {
    background-color: rgba(26, 54, 93, 0.85); 
    color: white;
    padding: 50px;
    max-width: 800px;
    text-align: center;
}

.caja-azul-centro h1 {
    color: white;
    margin-bottom: 30px;
    font-size: 36px;
}

.caja-azul-centro p {
    color: white;
    margin-bottom: 15px;
    font-size: 16px;
    line-height: 1.8;
    text-align: justify;
}

.seccion-alcance {
    padding: 60px 20px;
    text-align: center;
}

.seccion-alcance h2 {
    color: #1a365d;
    margin-bottom: 20px;
    font-size: 32px;
}

.seccion-alcance p {
    color: #555;
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.6;
    font-size: 18px;
}

.banner-mision-vision {
    background-image: url('../imagenes/fondo-mision.jpeg');
    background-size: cover;
    background-position: center;
    padding: 100px 20px; 
    display: flex;
    justify-content: center;
    align-items: center;
}

.caja-azul-continua {
    background-color: rgba(26, 54, 93, 0.85); 
    width: 85%; 
    max-width: 1200px;
    display: flex;
    justify-content: space-between; 
    padding: 60px 50px;
}

.bloque-texto-interior {
    width: 45%; 
    text-align: center;
}

.bloque-texto-interior h2 {
    color: white;
    font-size: 32px;
    margin-bottom: 10px;
}

.linea-blanca {
    width: 50px;
    height: 2px;
    background-color: white;
    margin: 0 auto 20px auto;
}

.bloque-texto-interior p {
    color: white;
    font-size: 16px;
    line-height: 1.8;
    text-align: justify;
}

.seccion-compromisos {
    padding: 80px 20px;
    text-align: center;
}

.seccion-compromisos h2 {
    color: #1a365d;
    font-size: 32px;
    margin-bottom: 15px;
}

.subtitulo-compromisos {
    color: #555;
    max-width: 900px;
    margin: 0 auto 40px auto;
    font-size: 18px;
}

.grid-compromisos {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    max-width: 1000px;
    margin: 0 auto;
}

.bloque-compromiso {
    display: flex;
    width: 48%; 
    background-color: #142a4c;
}

.texto-compromiso {
    width: 50%;
    padding: 40px 30px;
    text-align: left;
}

.texto-compromiso h3 {
    color: white;
    font-size: 24px;
    margin-bottom: 20px;
}

.texto-compromiso p {
    color: white;
    font-size: 15px;
    line-height: 1.6;
}

.imagen-compromiso {
    width: 50%;
}

.imagen-compromiso img {
    width: 100%;
    height: 100%;
    object-fit: cover; 
}

.seccion-valores {
    padding: 80px 50px;
    max-width: 1200px;
    margin: 0 auto;
    display: flex; 
    justify-content: space-between;
    gap: 60px;
    align-items: center; 
}

.valores-columna-izq {
    width: 50%;
    text-align: left;
}

.valores-columna-izq h2 {
    color: #1a365d;
    font-size: 32px;
    margin-bottom: 5px;
}

.valores-columna-izq h3 {
    color: #333;
    font-size: 20px;
    margin-bottom: 25px;
    font-weight: 600;
}

.valores-columna-izq p, .valores-columna-der p {
    color: #555;
    line-height: 1.8;
    font-size: 16px;
    text-align: justify;
}

.valores-columna-der {
    width: 50%;
    display: flex;
    flex-direction: column;
    gap: 40px; 
}

.contenedor-carrusel {
    width: 100%;
    overflow: hidden; 
    position: relative;
    padding: 20px 0;
}

.carrusel-track {
    display: flex;
    gap: 50px; 
    width: max-content; 
    animation: deslizar 14s linear infinite; 
}

.carrusel-track img {
    width: 180px; 
    height: 180px;
    object-fit: contain;
}

@keyframes deslizar {
    0% { transform: translateX(0); }
    100% { transform: translateX(-920px); }
}

.seccion-organigrama {
    padding: 60px 20px;
    text-align: center;
    background-color: #f9f9f9;
}

.seccion-organigrama h2 {
    color: #1a365d;
    font-size: 32px;
    margin-bottom: 30px;
}

.img-organigrama {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

/* =========================================
   ESTILOS DE LA PÁGINA: SERVICIOS (servicios.html)
========================================= */
.main-servicios {
    padding: 0;
    background-color: #ffffff;
}

/* Colores */
.bg-blanco { background-color: #ffffff; }
.bg-azul-oscuro { background-color: #1a365d; }
.bg-azul-medio { background-color: #335178; } 

/* BANNER PRINCIPAL CON VIDEO Y TRANSICIÓN DE TEXTO */
.banner-servicios {
    position: relative;
    height: 450px;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

.video-fondo {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    z-index: 0;
    object-fit: cover;
}

.overlay-video {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.45); 
    z-index: 1;
}

.contenedor-textos-banner {
    position: relative;
    z-index: 2;
    text-align: center;
    width: 100%;
    max-width: 900px;
    height: 100px;
}

.texto-animado {
    position: absolute;
    width: 100%;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0;
    animation: transicionBanner 8s infinite;
}

.texto-1 {
    animation-delay: 0s;
}

.texto-2 {
    animation-delay: 4s; 
}

.texto-animado h2 {
    color: white;
    font-size: 20px;
    letter-spacing: 2px;
    margin-bottom: 10px;
    font-weight: 400;
}

.texto-animado h1 {
    color: white;
    font-size: 42px;
    letter-spacing: 2px;
    font-weight: 700;
}

@keyframes transicionBanner {
    0% { opacity: 0; transform: translateY(-50%) scale(0.98); }
    15% { opacity: 1; transform: translateY(-50%) scale(1); }
    40% { opacity: 1; transform: translateY(-50%) scale(1); }
    55% { opacity: 0; transform: translateY(-50%) scale(1.02); }
    100% { opacity: 0; transform: translateY(-50%) scale(1.02); }
}

/* SISTEMA DE CUADRÍCULA MODULAR 50/50 */
.bloque-servicio-modular {
    padding: 40px 20px; 
}

.contenedor-servicio-modular {
    display: flex;
    max-width: 1100px; 
    margin: 0 auto;
    gap: 50px; 
}

.alineado-estirado {
    align-items: stretch; 
}

.alineado-arriba {
    align-items: flex-start; 
}

.contenedor-servicio-modular.invertido {
    flex-direction: row-reverse;
}

.columna-texto-titulo {
    width: 50%; 
    display: flex;
    flex-direction: column;
}

.columna-texto-titulo h2 {
    color: #1a365d;
    font-size: 32px;
    text-align: center; 
    margin-bottom: 15px; 
}

.caja-texto {
    width: 100%; 
    padding: 25px 35px; 
    color: white;
}

.caja-texto ul {
    list-style-position: outside; 
    margin-left: 15px; 
    font-size: 15px;
    line-height: 1.5; 
}

.caja-texto ul li {
    margin-bottom: 4px; 
    text-align: justify; 
}

.columna-imagen {
    width: 50%; 
}

.columna-imagen img {
    width: 100%;
    height: 100%;
    object-fit: cover; 
}

/* SECCIÓN: FONDO DE MAR COMPARTIDO */
.seccion-fondo-mar {
    position: relative;
    background-image: url('../imagenes/fondo-mar.jpeg');
    background-size: cover;
    background-position: center;
    padding: 70px 20px;
}

.seccion-fondo-mar::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(26, 54, 93, 0.75); 
}

.contenido-fondo-mar {
    position: relative;
    z-index: 1; 
    display: flex;
    flex-direction: column;
    gap: 50px; 
}

.contenedor-texto-centrado {
    max-width: 900px;
    margin: 0 auto;
    text-align: center; 
    color: white;
}

.contenedor-texto-centrado h2 {
    color: white;
    font-size: 32px;
    margin-bottom: 20px;
}

.contenedor-texto-centrado ul {
    list-style-position: outside; 
    margin-left: 15px;
    font-size: 16px;
    line-height: 1.6;
    text-align: left; 
    display: inline-block; 
    max-width: 800px; 
}

.contenedor-texto-centrado ul li {
    margin-bottom: 8px;
}

/* PIE DE PÁGINA SERVICIOS */
.footer-servicios {
    background-color: #1a365d;
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 20px;
    gap: 60px;
}

.footer-logo-asav img {
    height: 120px; 
}

.footer-info {
    display: flex;
    gap: 80px;
}

.footer-columna {
    max-width: 300px;
    text-align: left;
}

.footer-columna h3 {
    font-size: 18px;
    margin-bottom: 15px;
    border-bottom: 1px solid rgba(255,255,255,0.3);
    padding-bottom: 10px;
}

.footer-columna p {
    font-size: 14px;
    line-height: 1.6;
    color: #d1d5db;
}

/* =========================================
   ESTILOS DE LA SECCIÓN: DIVISIÓN NAVAL E INDUSTRIA
========================================= */

/* Quitar franja blanca en páginas de proyectos */
.main-division {
    padding: 0;
    background-color: #ffffff;
}

.banner-division {
    background-image: url('../imagenes/banner-division-naval.jpg');
    background-size: cover;
    background-position: center;
    height: 450px;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.banner-division::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.45);
}

.caja-intro-division {
    position: relative;
    z-index: 1;
    background-color: rgba(26, 54, 93, 0.85);
    color: white;
    padding: 40px 50px;
    max-width: 750px;
    text-align: center;
}

.caja-intro-division h1 {
    color: white; 
    font-size: 32px;
    margin-bottom: 20px;
}

.caja-intro-division p {
    font-size: 15px;
    line-height: 1.8;
    text-align: justify;
}

/* Sección de Tarjetas Proyectos y Clientes */
.seccion-proyectos-clientes {
    padding: 70px 20px;
    max-width: 1100px;
    margin: 0 auto;
    text-align: center;
}

.seccion-proyectos-clientes h2 {
    color: #1a365d;
    font-size: 32px;
    margin-bottom: 15px;
}

.seccion-proyectos-clientes > p {
    color: #555;
    font-size: 16px;
    max-width: 800px;
    margin: 0 auto 50px auto;
    line-height: 1.6;
}

.grid-tarjetas-proyectos {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

/* ===== AQUÍ ESTÁN LAS MODIFICACIONES DE ANIMACIÓN (ZOOM Y DESAPARICIÓN) ===== */
.tarjeta-proyecto-imagen {
    position: relative;
    width: 48%;
    min-width: 300px;
    height: 380px;
    overflow: hidden;
    border-radius: 4px;
    cursor: pointer; /* Cambia el cursor a una manito */
}

/* Se agrega transición fluida a la imagen base */
.tarjeta-proyecto-imagen img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease; 
}

/* Al poner el mouse, la imagen hace un zoom suave */
.tarjeta-proyecto-imagen:hover img {
    transform: scale(1.1);
}

/* Se agrega opacidad y transición al velo negro con texto */
.overlay-tarjeta {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.85), rgba(0,0,0,0.2));
    color: white;
    padding: 25px 20px;
    text-align: left;
    opacity: 1; /* Visible por defecto */
    transition: opacity 0.5s ease; /* Transición fluida */
}

/* Al poner el mouse, el velo con texto se hace transparente */
.tarjeta-proyecto-imagen:hover .overlay-tarjeta {
    opacity: 0;
}
/* ========================================================================= */

.overlay-tarjeta h3 {
    font-size: 18px;
    margin-bottom: 10px;
    font-family: 'Playfair Display', serif;
}

.overlay-tarjeta p {
    font-size: 13px;
    line-height: 1.5;
    color: #e5e7eb;
    text-align: justify;
}

/* Sección Arquitectura Naval (Caja Azul Doble Columna) */
.seccion-arquitectura-naval {
    padding: 60px 20px 80px 20px;
    background-color: #ffffff;
    text-align: center;
}

.seccion-arquitectura-naval > h2 {
    color: #1a365d;
    font-size: 32px;
    margin-bottom: 40px;
}

.caja-azul-arquitectura {
    max-width: 1100px;
    margin: 0 auto;
    background-color: #1a365d;
    color: white;
    padding: 50px;
    display: flex;
    justify-content: space-between;
    gap: 50px;
    text-align: left;
}

.columna-arquitectura {
    width: 50%;
}

.columna-arquitectura h3 {
    font-size: 24px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255,255,255,0.4);
}

.columna-arquitectura ul {
    list-style-position: outside;
    margin-left: 15px;
    font-size: 14px;
    line-height: 1.7;
}

.columna-arquitectura ul li {
    margin-bottom: 10px;
    text-align: justify;
}

/* =========================================
   CARRUSEL DE ANCHO COMPLETO (DIVISIÓN NAVAL)
========================================= */
.seccion-carrusel-completo {
    width: 100%;
    margin: 40px 0;
    position: relative;
}

/* 1. Modifica la altura del contenedor principal del carrusel */
.seccion-carrusel-completo .carrusel-contenedor {
    width: 100%;
    height: 650px; /* <--- Aumenta o ajusta esta altura vertical global */
    position: relative;
    overflow: hidden;
    background-color: #000;
}

/* 2. Asegura que el contenedor interno y la imagen ocupen el 100% de esa nueva altura */
.seccion-carrusel-completo .carrusel-slides,
.seccion-carrusel-completo .slide {
    width: 100%;
    height: 100%;
}

.seccion-carrusel-completo .slide img {
    width: 100%;
    height: 100%; /* <--- Que tome el 100% de la altura del slide */
    object-fit: cover; /* Cambia a 'contain' si quieres ver la imagen completa sin recortes */
    display: block;
}

/* Capa oscura y texto superpuesto */
.carrusel-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0.2));
    padding: 30px 50px;
    color: #ffffff;
    box-sizing: border-box;
}

.carrusel-overlay h3 {
    font-size: 26px;
    font-family: 'Playfair Display', serif;
    margin-bottom: 8px;
    color: #ffffff;
}

.carrusel-overlay p {
    font-size: 15px;
    font-family: 'Nunito Sans', sans-serif;
    max-width: 900px;
    line-height: 1.5;
    color: #e0e0e0;
}

/* Flechas de navegación (Ajuste para asegurar clics) */
.carrusel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: #ffffff;
    border: none;
    width: 45px;
    height: 50px;
    cursor: pointer;
    z-index: 30; /* Elevamos el nivel para que esté sobre todo */
    pointer-events: auto; /* Fuerza la interacción con el mouse */
    font-size: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s;
}

.carrusel-btn:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

.btn-prev {
    left: 0;
    border-radius: 0 4px 4px 0;
}

.btn-next {
    right: 0;
    border-radius: 4px 0 0 4px;
}
/* Puntos indicadores (Dots) */
.carrusel-dots {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 20;
}

.dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(0, 0, 0, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
}

.dot.activo {
    background-color: #ffffff;
    border-color: #1a365d;
    transform: scale(1.2);
}

/* Título inferior */
.titulo-carrusel-naval {
    text-align: center;
    color: #1a365d;
    font-size: 22px;
    margin-top: 25px;
    font-weight: 700;
    text-transform: uppercase;
}

/* =========================================
   CARRUSEL INTERACTIVO DE IMÁGENES
========================================= */
.seccion-carrusel-mineria {
    padding: 20px 20px 80px 20px;
    max-width: 1000px;
    margin: 0 auto;
}

.carrusel-contenedor {
    position: relative;
    width: 100%;
    height: 500px;
    overflow: hidden;
    background-color: #f4f4f4;
}

.carrusel-slides {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.5s ease-in-out; /* Transición fluida al deslizar */
}

.carrusel-slides .slide {
    min-width: 100%; /* Cada imagen ocupa el 100% del contenedor */
    height: 100%;
    object-fit: cover;
}

/* Botones Flechas */
.carrusel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.6);
    color: #1a365d;
    border: none;
    padding: 15px 20px;
    font-size: 24px;
    cursor: pointer;
    transition: background 0.3s;
    z-index: 10;
}

.carrusel-btn:hover {
    background-color: rgba(255, 255, 255, 1);
}

.carrusel-btn.prev {
    left: 10px;
}

.carrusel-btn.next {
    right: 10px;
}

/* Puntos indicadores inferiores */
.carrusel-puntos {
    position: absolute;
    bottom: 20px;
    width: 100%;
    text-align: center;
    z-index: 10;
}

.punto {
    display: inline-block;
    width: 12px;
    height: 12px;
    margin: 0 5px;
    background-color: rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.3s;
}

.punto.activo, .punto:hover {
    background-color: white;
}
/* =========================================
   ESTILOS SECCIÓN CIVIL (ZIGZAG Y TEXTO EN CARRUSEL)
========================================= */

/* Modificación para que el slide contenga imagen y texto */
.carrusel-slides .slide {
    min-width: 100%;
    height: 100%;
    position: relative; /* Permite colocar el texto encima */
}

.carrusel-slides .slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Recuadro oscuro con texto dentro del carrusel */
.carrusel-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.9), rgba(0,0,0,0.1));
    color: white;
    padding: 30px 40px 45px 40px;
    text-align: left;
}

.carrusel-overlay h3 {
    font-size: 24px;
    margin-bottom: 8px;
    font-family: 'Playfair Display', serif;
}

.carrusel-overlay p {
    font-size: 14px;
    line-height: 1.5;
}

/* Sistema de cuadrícula ZigZag */
.seccion-zigzag {
    padding: 60px 20px;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 80px;
}

.fila-zigzag {
    display: flex;
    gap: 40px;
    align-items: center; /* Centra verticalmente el texto y el carrusel */
}

/* Esta clase invierte el orden (Carrusel Izq / Texto Der) */
.fila-zigzag.invertida {
    flex-direction: row-reverse;
}

.mitad-texto {
    width: 40%;
    display: flex;
    flex-direction: column;
}

.mitad-texto h2 {
    color: #1a365d;
    font-size: 28px;
    margin-bottom: 25px;
    text-align: center;
}

.caja-texto-civil {
    padding: 40px;
    text-align: justify;
    line-height: 1.6;
    font-size: 15px;
}

.fondo-azul {
    background-color: #1a365d;
    color: white;
}

.fondo-blanco {
    background-color: transparent;
    color: #555;
    padding: 0; /* Quita el padding para que no se vea como caja */
}

.mitad-carrusel {
    width: 60%;
}

.mitad-carrusel .carrusel-contenedor {
    height: 450px; 
    border-radius: 4px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}
/* =========================================
   ESTILOS PÁGINA DE INICIO (index.html)
========================================= */
.main-inicio {
    padding: 0;
    background-color: #ffffff;
}

/* 1. Banner Principal Dinámico */
.banner-inicio-video {
    position: relative;
    height: 100vh;
    min-height: 600px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.banner-inicio-video video {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    min-width: 100%;
    min-height: 100%;
    object-fit: cover;
    z-index: 0;
}

.overlay-banner-inicio {
    position: absolute;
    inset: 0;
    background: rgba(15, 30, 55, 0.5);
    z-index: 1;
}

/* AJUSTE: El contenedor ahora abarca todo el banner para calcular el centro exacto */
.texto-banner-inicio {
    position: absolute;
    inset: 0; 
    width: 100%;
    height: 100%;
    z-index: 2;
    text-align: center;
}

.texto-animado-inicio {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    opacity: 0;
    animation: fadeTextInicio 10s infinite;
}

.texto-animado-inicio.t2 {
    animation-delay: 5s;
}

/* AJUSTE: Se añade 'main' para darle mayor prioridad y forzar el color blanco */
main .texto-animado-inicio h3 {
    color: #ffffff;
    font-size: 20px;
    letter-spacing: 3px;
    margin-bottom: 10px;
    font-weight: 300;
    font-family: 'Nunito Sans', sans-serif;
}

main .texto-animado-inicio h1 {
    color: #ffffff;
    font-size: 50px;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin: 0; 
}

@keyframes fadeTextInicio {
    0%, 10% { opacity: 0; transform: translate(-50%, -45%); }
    20%, 40% { opacity: 1; transform: translate(-50%, -50%); }
    50%, 100% { opacity: 0; transform: translate(-50%, -55%); }
}

/* 2. Sección "Avanzamos Juntos" (Cuadrícula 2x2) */
.seccion-avanzamos {
    max-width: 1200px;
    margin: 80px auto;
    padding: 0 20px;
    display: flex;
    gap: 20px; 
}

.columna-izq, .columna-der {
    width: 50%;
    display: flex;
    flex-direction: column;
    gap: 20px; 
}

.media-arriba, .media-abajo {
    width: 100%;
    height: 350px; 
}

.media-arriba video, .media-arriba img, .media-abajo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.caja-texto-azul {
    background-color: #335178; 
    color: white;
    padding: 40px;
    flex-grow: 1; 
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.caja-texto-azul h4 {
    color: #e2e8f0; 
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
    font-family: 'Nunito Sans', sans-serif;
}

.caja-texto-azul h2 {
    color: white;
    font-size: 38px;
    margin-bottom: 15px;
}

.caja-texto-azul h3 {
    color: white;
    font-size: 15px;
    margin-bottom: 15px;
    font-family: 'Nunito Sans', sans-serif;
    font-weight: 600;
}

.caja-texto-azul p {
    color: white;
    line-height: 1.6;
    font-size: 15px;
    text-align: justify;
}
/* 3. Tarjetas de Servicios con Hover de Lista (DISEÑO ACTUALIZADO) */
.seccion-servicios-tarjetas {
    max-width: 1200px;
    margin: 60px auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.tarjeta-hover {
    position: relative;
    height: 520px; /* Altura incrementada para textos largos */
    overflow: hidden;
    cursor: pointer;
    border: 4px solid #ffffff; 
    background-color: #222; 
}

/* Marco interno fino permanente */
.tarjeta-hover::after {
    content: '';
    position: absolute;
    inset: 12px; 
    border: 1px solid #ffffff;
    z-index: 4;
    pointer-events: none; 
}

.tarjeta-hover > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

/* Filtro oscuro fijo sobre la imagen */
.tarjeta-hover::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 1;
    transition: background 0.4s;
}

.tarjeta-hover > h2 {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #ffffff;
    font-size: 22px;
    text-align: center;
    text-transform: uppercase;
    z-index: 2;
    transition: opacity 0.3s;
    width: 80%;
    font-weight: 700;
}

/* Caja azul flotante ampliada (Capa Oculta) */
.capa-oculta {
    position: absolute;
    inset: 20px; /* Se expande hacia los bordes */
    background: rgba(43, 67, 102, 0.70); /* Tu color exacto */
    color: #ffffff;
    padding: 40px 30px; /* Margen interno para el texto */
    z-index: 3;
    opacity: 0;
    transform: scale(0.95); 
    transition: all 0.4s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Textos, Tipografía y Sub-listas */
.capa-oculta ol {
    font-family: 'Nunito Sans', sans-serif; 
    padding-left: 20px;
    font-size: 15px; 
    line-height: 1.6;
    margin: 0;
}

.capa-oculta ol li {
    margin-bottom: 8px;
}

.capa-oculta ul {
    list-style-type: circle; /* Viñetas de círculo vacío */
    padding-left: 20px;
    margin-top: 5px;
    margin-bottom: 0;
}

.capa-oculta ul li {
    margin-bottom: 4px;
}

/* Efectos de Hover */
.tarjeta-hover:hover > img {
    transform: scale(1.08); 
}

.tarjeta-hover:hover > h2 {
    opacity: 0; 
}

.tarjeta-hover:hover .capa-oculta {
    opacity: 1;
    transform: scale(1); 
}
/* 4. Carrusel Áreas de Especialización (3 columnas) */
.seccion-areas-carrusel {
    max-width: 1200px;
    margin: 80px auto;
    text-align: center;
    position: relative;
}

.seccion-areas-carrusel h2 {
    color: #1a365d;
    font-size: 32px;
    margin-bottom: 40px;
}

.carrusel-areas-contenedor {
    position: relative;
    overflow: hidden;
    padding: 0 40px;
}

.track-areas {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.slide-area {
    flex: 0 0 33.3333%;
    padding: 0 10px;
    position: relative;
}

.slide-area img {
    width: 100%;
    height: 350px;
    object-fit: cover;
}

.overlay-area {
    position: absolute;
    bottom: 10px;
    left: 10px;
    right: 10px;
    height: 0;
    background: rgba(26,54,93,0.85);
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    transition: height 0.4s ease;
}

.slide-area:hover .overlay-area {
    height: calc(100% - 20px);
}

.overlay-area h3 {
    font-size: 18px;
    margin-bottom: 15px;
    text-align: center;
    padding: 0 10px;
}

.btn-leer-mas {
    border: 1px solid white;
    color: white;
    padding: 8px 20px;
    text-decoration: none;
    font-size: 14px;
    transition: background 0.3s, color 0.3s;
}

.btn-leer-mas:hover {
    background: white;
    color: #1a365d;
}

.btn-areas {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: white;
    color: #1a365d;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    z-index: 10;
}

.btn-areas.prev { left: 0; }
.btn-areas.next { right: 0; }
/* =========================================
   ESTILOS PÁGINA DE CONTACTO (contacto.html)
========================================= */
.main-contacto {
    padding: 0;
    background-color: #ffffff;
}

/* 1. Banner Principal de Contacto */
.banner-contacto-video {
    position: relative;
    height: 60vh;
    min-height: 400px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.banner-contacto-video video {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    min-width: 100%;
    min-height: 100%;
    object-fit: cover;
    z-index: 0;
}

.overlay-banner-contacto {
    position: absolute;
    inset: 0;
    background: rgba(15, 30, 55, 0.4);
    z-index: 1;
}

.texto-banner-contacto {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    text-align: center;
}

.texto-animado-contacto {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    opacity: 0;
    animation: fadeTextContacto 10s infinite;
}

.texto-animado-contacto.t2 {
    animation-delay: 5s;
}

main .texto-animado-contacto h3 {
    color: #ffffff;
    font-size: 20px;
    letter-spacing: 2px;
    margin-bottom: 10px;
    font-weight: 300;
    font-family: 'Nunito Sans', sans-serif;
    text-transform: uppercase;
}

main .texto-animado-contacto h1 {
    color: #ffffff;
    font-size: 45px;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin: 0;
}

@keyframes fadeTextContacto {
    0%, 10% { opacity: 0; transform: translate(-50%, -45%); }
    20%, 40% { opacity: 1; transform: translate(-50%, -50%); }
    50%, 100% { opacity: 0; transform: translate(-50%, -55%); }
}

/* 2. Franja Azul de Introducción */
.franja-azul-contacto {
    background-color: #1a365d;
    color: white;
    text-align: center;
    padding: 50px 20px;
    margin-top: 40px; /* AJUSTE: Crea la franja blanca entre el video y este bloque */
}

.franja-azul-contacto h2 {
    font-size: 32px;
    margin-bottom: 15px;
}

.franja-azul-contacto p {
    color: #ffffff; /* AJUSTE: Forzamos el color blanco puro */
    font-size: 16px;
    max-width: 800px;
    margin: 0 auto;
    font-family: 'Nunito Sans', sans-serif;
    line-height: 1.6;
}

/* 3. Sección Ubícanos (50/50) */
.seccion-ubicanos {
    max-width: 1200px;
    margin: 60px auto;
    padding: 0 20px;
    display: flex;
    gap: 40px;
    align-items: center;
}

.ubicanos-info {
    width: 50%;
}

.ubicanos-info h2 {
    color: #1a365d;
    font-size: 32px;
    margin-bottom: 30px;
}

.bloque-info {
    margin-bottom: 25px;
}

.bloque-info h4 {
    color: #335178;
    font-size: 16px;
    margin-bottom: 5px;
}

.bloque-info p {
    color: #555;
    font-size: 15px;
    font-family: 'Nunito Sans', sans-serif;
    line-height: 1.6;
}

.ubicanos-imagen {
    width: 50%;
}

.ubicanos-imagen img {
    width: 100%;
    height: 350px;
    object-fit: cover;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* 4. Mapa Interactivo */
.seccion-mapa {
    width: 100%;
    height: 450px;
    line-height: 0;
}

.seccion-mapa iframe {
    width: 100%;
    height: 100%;
    border: none;
}
/* =========================================
   AJUSTE DE ESPACIADOS Y MÁRGENES (UNIFICADOS)
========================================= */

/* Espaciado uniforme para todos los títulos de sección en páginas de división */
.main-division section h2,
.seccion-proyectos-clientes h2,
.seccion-arquitectura-naval h2,
.titulo-carrusel-naval {
    margin-top: 25px !important;
    margin-bottom: 15px !important;
}

/* Reducir separación vertical entre los bloques de contenido */
.seccion-proyectos-clientes,
.seccion-arquitectura-naval,
.seccion-carrusel-naval,
.seccion-carrusel-completo {
    padding-top: 15px !important;
    padding-bottom: 15px !important;
    margin-top: 10px !important;
    margin-bottom: 10px !important;
}

/* Ajuste específico para la caja azul de arquitectura naval */
.caja-azul-arquitectura {
    margin-top: 10px !important;
    margin-bottom: 15px !important;
}

/* Distancia controlada para los párrafos descriptivos iniciales */
.seccion-proyectos-clientes > p {
    margin-bottom: 20px !important;
}
/* =========================================
   AJUSTE DE TEXTO Y POSICIÓN EN CARRUSEL (INDEX)
========================================= */
#carruselInicioArea .carrusel-overlay {
    position: absolute;
    bottom: 70px;
    left: 70px;
    width: 100%;
    background: transparent; /* Elimina por completo el fondo oscuro */
    padding: 40px 60px;
    box-sizing: border-box;
    text-align: left;
}
/* Tamaño grande y destacado para el título */
#carruselInicioArea .carrusel-overlay h3 {
    font-size: 38px !important; /* Título más grande */
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    margin-bottom: 12px;
    color: #ffffff;
    line-height: 1.2;
}

/* Tamaño y legibilidad para el párrafo descriptivo */
#carruselInicioArea .carrusel-overlay p {
    font-size: 18px !important; /* Párrafo más legible */
    font-family: 'Nunito Sans', sans-serif;
    max-width: 800px;
    margin-bottom: 18px;
    line-height: 1.5;
    color: #f1f5f9;
}

/* Estilo profesional para el botón de enlace */
#carruselInicioArea .carrusel-overlay .btn-leer-mas {
    font-size: 14px;
    letter-spacing: 1px;
    padding: 10px 25px !important;
    background-color: transparent;
    border: 2px solid #ffffff !important;
    transition: background 0.3s, color 0.3s;
}

#carruselInicioArea .carrusel-overlay .btn-leer-mas:hover {
    background-color: #ffffff;
    color: #1a365d;
}

/* =========================================
   ESTILOS: CUMPLIMIENTO NORMATIVO Y ESTÁNDARES
========================================= */
.seccion-normativa {
    padding: 60px 20px;
    background-color: #ffffff;
    text-align: center;
    border-top: 1px solid #eaeaea;
}

.contenedor-normativa {
    max-width: 1100px;
    margin: 0 auto;
}

.encabezado-normativa {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 25px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.logo-normativa {
    height: 1px;
    object-fit: contain;
}

.encabezado-normativa h2 {
    color: #1a365d;
    font-size: 30px;
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    margin: 0;
}

.logos-normativa {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 60px;
    flex-wrap: wrap;
}

.logos-normativa img {
    height: 75px;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.logos-normativa img:hover {
    transform: scale(1.05);
}

/* =========================================
   ESTILOS: SECCIÓN Y FORMULARIO DE CONTACTO
========================================= */
.seccion-contacto {
    padding: 70px 20px;
    background-color: #f8fafc;
    display: flex;
    justify-content: center;
}

.contenedor-contacto {
    max-width: 650px;
    width: 100%;
    background-color: #ffffff;
    padding: 40px 50px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.contenedor-contacto h2 {
    color: #1a365d;
    font-size: 32px;
    font-family: 'Playfair Display', serif;
    text-align: center;
    margin-bottom: 10px;
}

.contenedor-contacto p {
    color: #64748b;
    text-align: center;
    font-size: 15px;
    margin-bottom: 30px;
}

.formulario-contacto .grupo-input {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
}

.formulario-contacto label {
    font-size: 14px;
    font-weight: 600;
    color: #1a365d;
    margin-bottom: 8px;
}

.formulario-contacto input,
.formulario-contacto textarea {
    padding: 12px 15px;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    font-size: 15px;
    font-family: 'Nunito Sans', sans-serif;
    outline: none;
    transition: border-color 0.3s;
}

.formulario-contacto input:focus,
.formulario-contacto textarea:focus {
    border-color: #1a365d;
}

.btn-enviar {
    width: 100%;
    background-color: #1a365d;
    color: #ffffff;
    border: none;
    padding: 14px;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 1px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
    margin-top: 10px;
}

.btn-enviar:hover {
    background-color: #2a4365;
}