/* Variables corporativas basadas en el logo X7 */
:root {
    --primary-blue: #1b3370;
    --secondary-blue: #1883c7;
    --light-gray: #f9f9f9;
    --dark-text: #222222;
    --white: #ffffff;
}

* { margin: 0; padding: 0; box-sizing: border-box; scroll-behavior: smooth; }
body { font-family: 'Roboto', sans-serif; color: var(--dark-text); line-height: 1.7; overflow-x: hidden; }
h1, h2, h3, h4 { font-family: 'Montserrat', sans-serif; font-weight: 800; }

/* 1. PRELOADER */
#preloader {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background-color: var(--primary-blue);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: var(--white);
    transition: opacity 0.8s ease, visibility 0.8s ease;
}
.loader-plane i {
    font-size: 50px;
    color: var(--secondary-blue);
    animation: fly 2s infinite ease-in-out;
    margin-bottom: 20px;
}
@keyframes fly {
    0% { transform: translate(-30px, 30px) scale(0.8); opacity: 0; }
    50% { transform: translate(0, 0) scale(1.2); opacity: 1; }
    100% { transform: translate(30px, -30px) scale(0.8); opacity: 0; }
}

/* Elementos gráficos */
.divider { width: 60px; height: 4px; background-color: var(--secondary-blue); margin: 15px 0 25px 0; }
.divider.center { margin: 15px auto 25px auto; }

/* Navegación */
nav {
    position: fixed; width: 100%; top: 0; background: var(--white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1); z-index: 1000; transition: all 0.3s ease;
}
.nav-container { display: flex; justify-content: space-between; align-items: center; padding: 15px 5%; max-width: 1300px; margin: 0 auto; }
.logo img { height: 55px; }
.nav-links { list-style: none; display: flex; align-items: center; }
.nav-links li { margin-left: 25px; }
.nav-links a { text-decoration: none; color: var(--primary-blue); font-weight: 700; font-family: 'Montserrat', sans-serif; text-transform: uppercase; font-size: 0.85rem; transition: color 0.3s; }
.nav-links a:hover { color: var(--secondary-blue); }
.btn-nav { background: var(--secondary-blue); color: var(--white) !important; padding: 10px 20px; border-radius: 3px; }
.btn-nav:hover { background: var(--primary-blue); }

/* Slider Hero */
.hero-slider { position: relative; height: 100vh; width: 100%; overflow: hidden; background-color: var(--primary-blue); }
.slide {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background-size: cover; background-position: center; opacity: 0;
    transition: opacity 1s ease-in-out; display: flex; align-items: center; justify-content: center; text-align: center;
}
.slide.active { opacity: 1; z-index: 1; }
.slide-content { color: var(--white); max-width: 900px; padding: 0 20px; margin-top: 50px; transform: translateY(20px); animation: fadeInUp 1s forwards; }
.slide-content h1 { font-size: 3.5rem; margin-bottom: 20px; text-transform: uppercase; }
.slide-content p { font-size: 1.3rem; font-weight: 300; margin-bottom: 40px; }
.prev, .next { cursor: pointer; position: absolute; top: 50%; width: auto; padding: 20px; margin-top: -22px; color: white; font-weight: bold; font-size: 24px; transition: 0.6s ease; border-radius: 0 3px 3px 0; z-index: 10; }
.next { right: 0; border-radius: 3px 0 0 3px; }
.prev:hover, .next:hover { background-color: rgba(0,0,0,0.5); }
@keyframes fadeInUp { to { transform: translateY(0); } }

/* Botones */
.btn-primary { display: inline-block; background: var(--secondary-blue); color: var(--white); padding: 15px 35px; text-decoration: none; font-weight: 700; text-transform: uppercase; font-family: 'Montserrat', sans-serif; border: none; border-radius: 3px; cursor: pointer; transition: background 0.3s; }
.btn-primary:hover { background: var(--white); color: var(--primary-blue); }

/* CONTADORES (Stats) */
.stats-section { background: var(--light-gray); padding: 50px 5%; border-bottom: 1px solid #ddd; }
.stats-container { display: flex; justify-content: space-around; flex-wrap: wrap; max-width: 1200px; margin: 0 auto; text-align: center; }
.stat-box { margin: 20px; }
.stat-box i { font-size: 2.5rem; color: var(--secondary-blue); margin-bottom: 10px; }
.stat-box h3 { font-size: 3rem; color: var(--primary-blue); }
.stat-box p { font-weight: 500; text-transform: uppercase; letter-spacing: 1px; }

/* Secciones Generales */
section { padding: 100px 5%; }
section h2 { font-size: 2.5rem; color: var(--primary-blue); text-transform: uppercase; }

/* Nosotros */
.about-container { display: flex; align-items: center; gap: 60px; max-width: 1200px; margin: 0 auto; }
.about-text { flex: 1; }
.about-text p { margin-bottom: 20px; font-size: 1.1rem; }
.about-image { flex: 1; position: relative; }
.about-image img { width: 100%; box-shadow: -15px 15px 0 var(--light-gray); position: relative; z-index: 2; }
.x7-shape { position: absolute; top: -20px; right: -20px; width: 150px; height: 150px; background: var(--secondary-blue); z-index: 1; clip-path: polygon(100% 0, 0 0, 100% 100%); }

/* Propuesta de Valor + PARALLAX */
.angled-section {
    background-color: var(--primary-blue);
    color: var(--white); text-align: center; padding: 150px 5%; margin-top: 40px;
    clip-path: polygon(0 5vw, 100% 0, 100% calc(100% - 5vw), 0 100%);
}
.parallax {
    background-attachment: fixed; /* Esto crea el efecto parallax */
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}
.angled-section h2 { color: var(--white); margin-bottom: 20px; }
.val-container { max-width: 800px; margin: 0 auto; }
.val-container p { font-size: 1.3rem; font-weight: 300; }

/* Servicios (Microinteracciones) */
.services h2 { text-align: center; }
.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 40px; max-width: 1200px; margin: 40px auto 0 auto; }
.service-card { background: var(--white); padding: 40px 30px; text-align: center; border: 1px solid #eaeaea; transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); border-bottom: 4px solid transparent; cursor: default; }
.service-card:hover { transform: translateY(-15px); box-shadow: 0 20px 40px rgba(27, 51, 112, 0.15); border-bottom: 4px solid var(--secondary-blue); }
.icon-wrap { width: 80px; height: 80px; background: var(--light-gray); border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 20px auto; transition: all 0.4s ease; }
.service-card:hover .icon-wrap { background: var(--secondary-blue); transform: rotateY(360deg); } /* Gira el icono al pasar el mouse */
.service-card i { font-size: 2.2rem; color: var(--primary-blue); transition: color 0.4s ease; }
.service-card:hover i { color: var(--white); }
.service-card h3 { margin-bottom: 15px; color: var(--primary-blue); font-size: 1.2rem; }

/* Testimonios */
.testimonials { background: var(--secondary-blue); color: var(--white); text-align: center; padding: 80px 5%; }
.test-container { max-width: 800px; margin: 0 auto; }
.quote-icon { font-size: 40px; margin-bottom: 20px; opacity: 0.5; }
.test-text { font-size: 1.5rem; font-style: italic; margin-bottom: 20px; font-weight: 300; }
.test-container h4 { text-transform: uppercase; letter-spacing: 1px; font-size: 0.9rem; }

/* Galería */
.gallery { background: var(--light-gray); text-align: center; }
.gallery-subtitle { margin-bottom: 40px; color: #666; }
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 15px; max-width: 1200px; margin: 0 auto; }
.gallery-img { width: 100%; height: 250px; object-fit: cover; cursor: pointer; transition: transform 0.3s ease, filter 0.3s ease; filter: brightness(0.9); }
.gallery-img:hover { transform: scale(1.03); filter: brightness(1); z-index: 10; box-shadow: 0 10px 20px rgba(0,0,0,0.2); }

/* Lightbox */
.lightbox { display: none; position: fixed; z-index: 2000; padding-top: 60px; left: 0; top: 0; width: 100%; height: 100%; background-color: rgba(27, 51, 112, 0.95); align-items: center; justify-content: center; }
.lightbox-content { max-width: 90%; max-height: 80vh; box-shadow: 0 5px 25px rgba(0,0,0,0.5); animation: zoomIn 0.3s; }
@keyframes zoomIn { from {transform:scale(0.8)} to {transform:scale(1)} }
.close-lightbox { position: absolute; top: 30px; right: 40px; color: #f1f1f1; font-size: 40px; font-weight: bold; cursor: pointer; transition: 0.3s; }
.close-lightbox:hover { color: var(--secondary-blue); }

/* Alianzas */
.alliances h2 { text-align: center; }
.alliances-container { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 50px; max-width: 1000px; margin: 40px auto 0 auto; }
.alliances-container img { max-width: 150px; filter: grayscale(100%); opacity: 0.6; transition: all 0.3s; }
.alliances-container img:hover { filter: grayscale(0%); opacity: 1; transform: scale(1.1); }

/* Contacto y Ubicación */
.angled-section-top { background: var(--primary-blue); color: var(--white); clip-path: polygon(0 5vw, 100% 0, 100% 100%, 0 100%); padding-top: 120px; }
.angled-section-top h2 { color: var(--white); }
.contact-container { display: flex; gap: 60px; max-width: 1200px; margin: 0 auto; }
.location-box, .contact-box { flex: 1; }
.map-img { width: 100%; border-radius: 3px; margin-bottom: 20px; }
.contact-person p { margin-bottom: 10px; }
.contact-person i { color: var(--secondary-blue); width: 25px; }
.mt-2 { margin-top: 40px; }

/* Footer */
footer { background: #0d1b3f; color: var(--white); text-align: center; padding: 25px; font-size: 0.9rem; }
footer a { text-decoration: none; font-weight: bold; }

/* Botón WhatsApp */
.whatsapp-float { position: fixed; width: 60px; height: 60px; bottom: 40px; right: 40px; background-color: #25d366; color: #FFF; border-radius: 50%; box-shadow: 2px 2px 10px rgba(0,0,0,0.2); z-index: 1000; display: flex; align-items: center; justify-content: center; font-size: 35px; text-decoration: none; transition: transform 0.3s ease, box-shadow 0.3s ease; }
.whatsapp-float:hover { transform: scale(1.1); box-shadow: 2px 2px 15px rgba(0,0,0,0.3); color: #FFF; }

/* Responsive */
@media (max-width: 900px) {
    .nav-links { display: none; }
    .slide-content h1 { font-size: 2.2rem; }
    .about-container, .contact-container { flex-direction: column; }
    .angled-section, .angled-section-top { clip-path: polygon(0 2vw, 100% 0, 100% calc(100% - 2vw), 0 100%); padding: 80px 5%;}
    .angled-section-top { clip-path: polygon(0 2vw, 100% 0, 100% 100%, 0 100%); }
    .whatsapp-float { width: 50px; height: 50px; bottom: 20px; right: 20px; font-size: 30px; }
}