/* ================= VARIABLES ================= */
:root {
    --rojo-ipsum: #D81E05;
    --negro-bg: #111111;
    --gris-oscuro: #1A1A1A;
    --gris-claro: #F5F5F5;
    --texto-oscuro: #333333;
    --blanco: #FFFFFF;
}

* { margin: 0; padding: 0; box-sizing: border-box; border-radius: 0 !important; scroll-behavior: smooth; }
body { font-family: 'Roboto', sans-serif; background-color: var(--negro-bg); color: var(--blanco); overflow-x: hidden; }
h1, h2, h3, h4 { font-family: 'Montserrat', sans-serif; text-transform: uppercase; }

/* ================= NAVEGACIÓN ================= */
header {
    background-color: rgba(17, 17, 17, 0.8); backdrop-filter: blur(10px); padding: 10px 50px;
    display: flex; justify-content: space-between; align-items: center; position: fixed; width: 100%;
    top: 0; z-index: 1000; border-bottom: 3px solid transparent; transition: all 0.4s ease;
}
header.scrolled { background-color: var(--negro-bg); border-bottom: 3px solid var(--rojo-ipsum); padding: 5px 50px; }
.logo-container { display: flex; align-items: center; }
.logo-img { height: 60px; width: auto; transition: transform 0.3s; }
.logo-img:hover { transform: scale(1.05); }

nav ul { display: flex; gap: 30px; list-style: none; align-items: center; }
nav a { color: var(--blanco); text-decoration: none; font-weight: 500; font-size: 14px; text-transform: uppercase; transition: 0.3s; }
nav a:hover { color: var(--rojo-ipsum); }

.dropdown { position: relative; display: inline-block; }
.dropdown-content {
    display: none; position: absolute; background-color: var(--negro-bg); min-width: 180px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.5); z-index: 1001; border-top: 3px solid var(--rojo-ipsum); top: 100%; left: 0;
}
.dropdown-content a { color: var(--blanco); padding: 15px 20px; text-decoration: none; display: block; text-align: left; font-size: 13px; border-bottom: 1px solid #333; transition: 0.3s; }
.dropdown-content a:hover { background-color: var(--gris-oscuro); color: var(--rojo-ipsum); padding-left: 25px; }
.dropdown:hover .dropdown-content { display: block; }

.contact-top { 
    font-size: 16px; font-weight: bold; color: var(--blanco); background-color: var(--rojo-ipsum); 
    padding: 10px 20px; text-decoration: none; transition: 0.3s; display: flex; align-items: center; gap: 8px;
}
.contact-top:hover { background-color: var(--blanco); color: var(--rojo-ipsum); }

.menu-toggle { display: none; font-size: 1.8rem; color: var(--blanco); cursor: pointer; }

/* ================= HERO DIVIDIDO ================= */
.hero-split { position: relative; display: flex; width: 100%; height: 100vh; overflow: hidden; background: var(--negro-bg); }
.split { position: relative; flex: 1; display: flex; align-items: center; justify-content: center; transition: flex 0.7s cubic-bezier(0.4, 0, 0.2, 1); overflow: hidden; cursor: default; }
.split:hover { flex: 2.5; }
.video-split { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; filter: brightness(0.4) grayscale(50%); transition: filter 0.6s ease, transform 6s ease; transform: scale(1.05); }
.split:hover .video-split { filter: brightness(0.7) grayscale(0%); transform: scale(1); }
.split-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(17, 17, 17, 0.4); z-index: 2; transition: background 0.5s ease; }
.split:hover .split-overlay { background: rgba(17, 17, 17, 0.1); }
.split-content { position: relative; z-index: 3; text-align: center; color: white; padding: 20px; white-space: nowrap; }
.split-content h1 { font-size: 4rem; font-style: italic; margin-bottom: 10px; text-shadow: 2px 2px 10px rgba(0,0,0,0.8); }
.split-content p { font-size: 1.5rem; margin-bottom: 25px; text-shadow: 1px 1px 5px rgba(0,0,0,0.8); font-weight: 500; }
.btn-split { display: inline-block; padding: 12px 30px; border: 2px solid var(--rojo-ipsum); background: rgba(216, 30, 5, 0.2); color: white; text-decoration: none; font-weight: bold; text-transform: uppercase; transition: all 0.3s ease; backdrop-filter: blur(3px); }
.btn-split:hover { background-color: var(--rojo-ipsum); transform: translateY(-3px); }

.flecha-guia-central { position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%); z-index: 10; color: var(--rojo-ipsum); font-size: 2.5rem; text-decoration: none; animation: rebotar 2s infinite; transition: color 0.3s; }
.flecha-guia-central:hover { color: var(--blanco); }

@keyframes rebotar { 0%, 20%, 50%, 80%, 100% { transform: translate(-50%, 0); } 40% { transform: translate(-50%, -20px); } 60% { transform: translate(-50%, -10px); } }

/* ================= SECCIONES GENERALES ================= */
.seccion { padding: 100px 10vw; background-color: var(--gris-claro); color: var(--texto-oscuro); }
.seccion-oscura { background-color: var(--gris-oscuro); color: var(--blanco); }
.titulo-seccion { font-size: 3rem; margin-bottom: 50px; border-left: 8px solid var(--rojo-ipsum); padding-left: 15px; }

.grid-nosotros { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: center; }
.nosotros-texto p { font-size: 1.2rem; line-height: 1.6; margin-bottom: 20px; }
.fortalezas { list-style: none; margin-top: 20px; }
.fortalezas li { font-size: 1.1rem; margin-bottom: 15px; padding-left: 30px; position: relative; font-weight: bold; }
.fortalezas li::before { content: "✔"; color: var(--rojo-ipsum); position: absolute; left: 0; font-size: 1.2rem; }

.grid-galeria { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.tarjeta { position: relative; height: 350px; overflow: hidden; background-color: var(--negro-bg); cursor: pointer; }
.tarjeta img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; filter: grayscale(50%); }
.tarjeta:hover img { transform: scale(1.1); filter: grayscale(0%); }

.overlay { position: absolute; top: 0; left: 0; right: 0; bottom: 0; background-color: rgba(216, 30, 5, 0); transition: background-color 0.4s ease; display: flex; flex-direction: column; justify-content: flex-end; padding: 30px; }
.tarjeta:hover .overlay { background-color: rgba(216, 30, 5, 0.85); }
.overlay h3 { color: var(--blanco); font-size: 1.5rem; transform: translateY(20px); transition: transform 0.4s ease; }
.overlay p { color: var(--blanco); font-size: 1rem; opacity: 0; transform: translateY(20px); transition: 0.4s ease; margin-top: 10px; }
.tarjeta:hover .overlay h3, .tarjeta:hover .overlay p { transform: translateY(0); opacity: 1; }

.oculto { opacity: 0; transform: translateY(50px); transition: opacity 0.8s ease-out, transform 0.8s ease-out; }
.visible { opacity: 1; transform: translateY(0); }

footer { background-color: var(--negro-bg); text-align: center; padding: 50px 20px; border-top: 5px solid var(--rojo-ipsum); }
.btn-rojo { background-color: var(--rojo-ipsum); color: var(--blanco); padding: 15px 40px; text-decoration: none; font-weight: bold; font-size: 16px; text-transform: uppercase; display: inline-block; margin-top: 20px; transition: 0.3s; }
.btn-rojo:hover { background-color: var(--blanco); color: var(--negro-bg); }

/* ================= MÁSCARA DE FLECHA (Chevron) ================= */
.tarjeta-flecha { position: relative; height: 350px; clip-path: polygon(0% 0%, 80% 0%, 100% 50%, 80% 100%, 0% 100%, 20% 50%); background-color: var(--gris-oscuro); cursor: pointer; overflow: hidden; transition: all 0.4s ease; }
.tarjeta-flecha img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; display: block; }
.tarjeta-flecha:hover img { transform: scale(1.15); }
.tarjeta-flecha .overlay-flecha { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(216, 30, 5, 0.7); display: flex; flex-direction: column; justify-content: center; align-items: center; opacity: 0; transition: opacity 0.4s ease; z-index: 2; }
.tarjeta-flecha:hover .overlay-flecha { opacity: 1; }
.overlay-flecha h3 { color: white; font-size: 1.8rem; text-align: center; padding: 0 22%; margin-bottom: 10px; transform: translateY(20px); transition: transform 0.4s ease; }
.overlay-flecha p { color: white; font-size: 1rem; line-height: 1.5; text-align: center; padding: 0 25%; opacity: 0; transform: translateY(20px); transition: transform 0.5s ease, opacity 0.5s ease; }
.tarjeta-flecha:hover .overlay-flecha h3 { transform: translateY(0); }
.tarjeta-flecha:hover .overlay-flecha p { transform: translateY(0); opacity: 1; }

/* ================= LIGHTBOX ================= */
.lightbox { display: none; position: fixed; z-index: 2000; padding-top: 60px; left: 0; top: 0; width: 100%; height: 100%; background-color: rgba(0,0,0,0.9); }
.lightbox-contenido { margin: auto; display: block; max-width: 90%; max-height: 80vh; border: 3px solid var(--rojo-ipsum); animation: zoomIn 0.3s ease; }
@keyframes zoomIn { from {transform: scale(0.8); opacity: 0;} to {transform: scale(1); opacity: 1;} }
.cerrar-lightbox { position: absolute; top: 20px; right: 40px; color: #f1f1f1; font-size: 50px; font-weight: bold; cursor: pointer; transition: 0.3s; }
.cerrar-lightbox:hover { color: var(--rojo-ipsum); }


/* ========================================================= */
/* ================= PÁGINA NOSOTROS (CARRUSEL) ============ */
/* ========================================================= */
.seccion-nosotros { position: relative; height: 100vh; width: 100%; }
.banda-roja {
    position: absolute; top: 0; left: 0; width: 100%; height: 180px;
    background: linear-gradient(135deg, var(--rojo-ipsum) 40%, rgba(216, 30, 5, 0.8) 100%);
    z-index: 10; display: flex; align-items: flex-end; padding-left: 10%; padding-bottom: 30px;
    clip-path: polygon(0 0, 100% 0, 100% 60%, 0% 100%); box-shadow: 0 5px 15px rgba(0,0,0,0.5);
}
.banda-roja h1 { color: var(--blanco); font-size: 3.5rem; font-style: italic; text-shadow: 2px 2px 4px rgba(0,0,0,0.3); letter-spacing: 2px; }
.swiper { width: 100%; height: 100%; }
.swiper-slide { text-align: center; background: var(--negro-bg); display: flex; justify-content: center; align-items: center; position: relative; overflow: hidden; }
.swiper-slide img { display: block; width: 100%; height: 100%; object-fit: cover; filter: brightness(0.6); transform: scale(1.05); transition: transform 6s ease; }
.swiper-slide-active img { transform: scale(1); }

/* --- TRIÁNGULO ANIMADO (ESCRITORIO) --- */
.info-triangulo {
    position: absolute; bottom: 0; right: 0; width: 65%; height: 100%; background-color: var(--rojo-ipsum);
    /* 4 puntos (oculto) para que la animación sea perfecta */
    clip-path: polygon(100% 100%, 100% 100%, 100% 100%, 100% 100%); 
    display: flex; flex-direction: column; justify-content: flex-end; align-items: flex-end;
    padding: 50px 80px 100px 20%; text-align: right; z-index: 10; transition: clip-path 1.2s cubic-bezier(0.19, 1, 0.22, 1);
}
/* Al activarse se vuelve un triángulo a la derecha */
.swiper-slide-active .info-triangulo { clip-path: polygon(100% 0, 100% 0, 100% 100%, 0 100%); }

.info-triangulo h2, .info-triangulo p { opacity: 0; transform: translateY(50px); transition: all 0.8s ease; }
.info-triangulo h2 { color: var(--blanco); font-size: 3.5rem; margin-bottom: 15px; text-shadow: 2px 2px 5px rgba(0,0,0,0.3); font-style: italic; }
.info-triangulo p { font-size: 1.3rem; line-height: 1.6; max-width: 500px; color: var(--blanco); font-weight: 500; }
.swiper-slide-active .info-triangulo h2 { opacity: 1; transform: translateY(0); transition-delay: 0.4s; }
.swiper-slide-active .info-triangulo p { opacity: 1; transform: translateY(0); transition-delay: 0.6s; }

.swiper-button-next, .swiper-button-prev { color: var(--blanco) !important; background-color: rgba(0, 0, 0, 0.5); width: 50px !important; height: 50px !important; border-radius: 50% !important; transition: 0.3s; }
.swiper-button-next:hover, .swiper-button-prev:hover { background-color: var(--rojo-ipsum); }
.swiper-pagination-bullet { background: var(--blanco) !important; opacity: 0.5; width: 12px; height: 12px; }
.swiper-pagination-bullet-active { background: var(--rojo-ipsum) !important; opacity: 1; transform: scale(1.3); }


/* ========================================================= */
/* ================= RESPONSIVO (MÓVILES Y TABLETS) ======== */
/* ========================================================= */

@media (max-width: 992px) {
    /* CABECERA Y NAVEGACIÓN (Menú Hamburguesa) */
    header { padding: 15px 20px; flex-wrap: wrap; }
    .logo-img { height: 45px; }
    .hide-mobile { display: none !important; }
    .menu-toggle { display: block; }
    
    #nav-menu { display: none; width: 100%; margin-top: 15px; }
    #nav-menu.activo { display: block; }
    #nav-menu ul { flex-direction: column; gap: 15px; align-items: center; padding-bottom: 10px; }
    
    .dropdown-content { position: relative; min-width: 100%; text-align: center; border: none; box-shadow: none; }
    .dropdown-content a { text-align: center; }

    /* HERO DIVIDIDO (Se apilan los videos verticalmente) */
    .hero-split { flex-direction: column; }
    .split { flex: 1 !important; }
    .split:hover { flex: 1 !important; } 
    .split-content h1 { font-size: 2.5rem; }
    .split-content p { font-size: 1.2rem; margin-bottom: 15px; }
    .btn-split { padding: 8px 20px; font-size: 0.9rem; }
    .flecha-guia-central { display: none; }

    /* SECCIONES GENERALES */
    .seccion { padding: 60px 5vw; }
    .titulo-seccion { font-size: 2rem; margin-bottom: 30px; }
    .grid-nosotros { grid-template-columns: 1fr; gap: 30px; }

    /* TARJETAS FLECHA - Menos afiladas para que quepa el texto en móviles */
    .tarjeta-flecha { height: auto; min-height: 300px; clip-path: polygon(0% 0%, 90% 0%, 100% 50%, 90% 100%, 0% 100%, 10% 50%); }
    .overlay-flecha h3 { font-size: 1.4rem; padding: 0 12%; }
    .overlay-flecha p { font-size: 0.95rem; padding: 0 12%; }

    /* ========================================================= */
    /* === PÁGINA NOSOTROS (CARRUSEL RESPONSIVO EN MÓVIL) ====== */
    /* ========================================================= */
    .banda-roja { height: 120px; padding-bottom: 20px; clip-path: polygon(0 0, 100% 0, 100% 80%, 0% 100%); }
    .banda-roja h1 { font-size: 2.2rem; }
    
    .info-triangulo { 
        width: 100%; 
        height: auto; 
        min-height: 45%; /* Ocupa casi la mitad de la pantalla inferior */
        padding: 30px 20px 50px 20px; 
        align-items: center; 
        text-align: center;
        justify-content: center;
        /* Oculto inicialmente con 4 puntos */
        clip-path: polygon(100% 100%, 100% 100%, 100% 100%, 100% 100%); 
    }
    
    /* En móvil el triángulo se vuelve un cartel inclinado hacia arriba */
    .swiper-slide-active .info-triangulo { 
        clip-path: polygon(0 15%, 100% 0, 100% 100%, 0 100%) !important; 
    }
    
    .info-triangulo h2 { font-size: 2rem; margin-bottom: 10px; }
    .info-triangulo p { font-size: 1rem; max-width: 100%; }
    
    .swiper-button-next, .swiper-button-prev { display: none !important; }
}