:root {
    --primary-color: #0d2b45;
    --secondary-color: #203a43;
    --accent-color: #00a8cc;
    --light-bg: #e6f2f8;
    --text-color: #2b3e50;
    --white: #ffffff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    color: var(--text-color);
    background-color: var(--light-bg);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

/* =========================================
   HEADER Y MENÚ OCULTABLE
   ========================================= */

header {
    background-color: var(--white);
    box-shadow: 0 4px 15px rgba(13, 43, 69, 0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    border-top: 4px solid var(--accent-color);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

header.nav-hidden {
    transform: translateY(-100%);
}

.nav-hover-trigger {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 20px;
    z-index: 999;
}

.navbar {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
}

.logo {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo i, 
.logo span {
    color: var(--accent-color);
}

/* =========================================
   MENÚ: DOBLE TEXTO ROTATORIO Y RAYITA ACTIVA
   ========================================= */

.nav-links {
    display: flex;
    list-style: none;
    gap: 25px;
    align-items: center;
    perspective: 1000px;
}

.nav-links li a {
    position: relative;
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    font-size: 0.95rem;
    padding-bottom: 5px;
    display: inline-block;
    overflow: hidden;
    transition: color 0.3s ease;
}

.nav-links li a span {
    display: inline-block;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform-origin: center center;
}

.nav-links li a:hover span {
    transform: translateY(-100%) rotateX(90deg);
}

.nav-links li a.active {
    color: var(--accent-color) !important;
}

.nav-links li a::before {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    color: var(--accent-color);
    transform: translateY(100%) rotateX(-90deg);
    transform-origin: center center;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
}

.nav-links li a:hover::before {
    transform: translateY(0) rotateX(0deg);
}

.nav-links li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-color);
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-links li a:hover::after,
.nav-links li a.active::after {
    width: 100% !important;
}

/* =========================================
   ESTILOS DEL HERO DE VIDEO Y BOTONES CON LUZ
   ========================================= */

.hero-video-section {
    position: relative;
    width: 100%;
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background-color: #0b1a28;
    margin-top: 75px;
}

.hero-video-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-video-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(13, 27, 42, 0.65) 0%, rgba(13, 27, 42, 0.75) 100%);
    z-index: 2;
}

.hero-animation-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-video-section .hero-content {
    position: relative;
    z-index: 3;
    text-align: center;
    color: #ffffff;
    padding: 20px;
    max-width: 900px;
}

.hero-video-section .hero-content h1 {
    font-size: 2.8rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 15px;
    text-shadow: 0px 3px 10px rgba(0, 0, 0, 0.8);
}

.hero-video-section .hero-content p {
    font-size: 1.2rem;
    color: #e2e8f0;
    line-height: 1.6;
    margin-bottom: 25px;
    text-shadow: 0px 2px 8px rgba(0, 0, 0, 0.8);
}

/* RESTAURANDO LA LUZ Y EL BRILLO EN LOS BOTONES */
.hero-content a.btn, 
button, 
.form-wrapper button {
    background: var(--accent-color);
    color: #fff;
    padding: 12px 28px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    display: inline-block;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 0 15px rgba(0, 168, 204, 0.4); /* Luz base del botón */
}

.hero-content a.btn:hover, 
button:hover, 
.form-wrapper button:hover {
    background-color: #008fa8;
    box-shadow: 0 0 25px rgba(0, 168, 204, 0.8), 0 0 10px rgba(255, 255, 255, 0.5); /* Efecto de encendido de luz al pasar el cursor */
    transform: translateY(-2px);
}

/* =========================================
   GALERÍA INTERACTIVA Y CUADRÍCULAS
   ========================================= */

.photo-grid-section {
    background-color: rgba(13, 43, 69, 0.95);
    padding: 90px 4%;
    overflow: hidden;
    border-top: 3px solid var(--accent-color);
    border-bottom: 3px solid var(--accent-color);
}

.section-header-text {
    text-align: center;
    margin-bottom: 40px;
    padding-top: 10px;
}

.section-header-text .section-title {
    color: #ffffff;
    font-size: 2.3rem;
}

.section-header-text .section-subtitle {
    color: #00a8cc;
    font-size: 1.1rem;
}

.nabep-grid-dynamic {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 200px;
    gap: 15px;
    max-width: 1300px;
    margin: 0 auto;
}

.grid-item {
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: 6px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.4);
}

.grid-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.grid-item:hover img {
    transform: scale(1.08);
}

/* =========================================
   CONTENEDORES Y SECCIONES SECUNDARIAS
   ========================================= */

.container-section,
.services-section-expanded {
    padding: 40px 2rem 80px;
    max-width: 1150px;
    margin: 30px auto 0;
}

.about-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 40px;
    align-items: center;
    background: var(--white);
    padding: 45px;
    border-radius: 10px;
    box-shadow: 0 8px 25px rgba(13, 43, 69, 0.08);
    border-left: 5px solid var(--primary-color);
}

.card-mv {
    background: #f4f9fd;
    padding: 25px;
    border-left: 4px solid var(--accent-color);
    border-radius: 6px;
    margin-bottom: 20px;
}

.service-detail-block {
    display: flex;
    align-items: center;
    gap: 40px;
    background: var(--white);
    margin-bottom: 30px;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 6px 20px rgba(13, 43, 69, 0.08);
    border-left: 4px solid var(--accent-color);
}

.service-detail-block.reverse {
    flex-direction: row-reverse;
    border-left: none;
    border-right: 4px solid var(--accent-color);
}

.service-detail-text {
    flex: 1;
}

.service-detail-text h3 {
    color: var(--primary-color);
    font-size: 1.4rem;
    margin-bottom: 15px;
}

.service-detail-text p {
    color: #444;
    font-size: 1rem;
}

.service-detail-img {
    flex: 1;
    max-width: 450px;
}

.service-detail-img img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 6px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
}

.form-wrapper {
    max-width: 850px;
    margin: 40px auto 0;
    background: var(--white);
    padding: 45px;
    border-radius: 10px;
    box-shadow: 0 8px 25px rgba(13, 43, 69, 0.08);
    border-top: 4px solid var(--accent-color);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--primary-color);
}

.form-group input, 
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccd1d9;
    border-radius: 4px;
    outline: none;
    font-size: 0.95rem;
    background: var(--white);
}

.form-group input:focus, 
.form-group textarea:focus {
    border-color: var(--accent-color);
}

.offices-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
    gap: 25px;
}

.office-card {
    background: var(--white);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 6px 20px rgba(13, 43, 69, 0.08);
    border-top: 4px solid var(--primary-color);
}

footer {
    background-color: var(--primary-color);
    color: var(--white);
    text-align: center;
    padding: 40px 2rem;
    margin-top: 80px;
    border-top: 4px solid var(--accent-color);
}

/* =========================================
   EFECTOS DE MOVIMIENTO FLUIDO Y DE ALTO IMPACTO
   ========================================= */

.hero-content,
.service-detail-block, 
.grid-item, 
.office-card, 
.container-section > div > div {
    opacity: 0;
    transform: translateY(45px) scale(0.97);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform, opacity;
}

.en-pantalla {
    opacity: 1 !important;
    transform: translateY(0) scale(1) !important;
}

body p, body h1, body h2, body h3, body span, body a, body img, body form, body label, body input, body textarea {
    opacity: 1 !important;
    visibility: visible !important;
}

/* =========================================
   ADECUACIÓN MÓVIL EXACTA (<= 768px)
   ========================================= */

@media (max-width: 768px) {
    html, body {
        width: 100% !important;
        overflow-x: hidden !important;
    }

    .navbar {
        padding: 0.8rem 1rem !important;
    }

    .nav-links {
        gap: 10px !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
    }

    .nav-links li a {
        font-size: 0.8rem !important;
    }

    .container-section {
        padding: 20px 15px !important;
        margin-top: 20px !important;
    }

    .about-grid {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        padding: 20px !important;
        gap: 20px !important;
    }

    .nabep-grid-dynamic {
        grid-template-columns: repeat(2, 1fr) !important;
        grid-auto-rows: 150px !important;
        gap: 10px !important;
    }
}
@media (max-width: 768px) {
    .service-detail-block {
        flex-direction: column !important;
        gap: 20px !important;
        padding: 20px !important;
    }
    .service-detail-img {
        width: 100% !important;
        max-width: 100% !important;
    }
    .service-detail-img img {
        width: 100% !important;
        height: auto !important;
        max-height: 280px !important;
        object-fit: contain !important;
        background-color: #0d1117;
        padding: 4px;
        border-radius: 6px;
    }
}