/* 1. Variables Globales */
:root {
    --primary: #304896;
    --secondary: #3f6bb3;
    --white: #fff;
    --text-dark: #1a1a1a; 
    --font-titles: 'Raleway', sans-serif;
    --font-body: 'Crimson Text', serif;
    --font-nav: 'Open Sans', sans-serif;
}



/* Preloader */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

#preloader.fade-out {
    opacity: 0;
    visibility: hidden;
}

.loader-content {
    text-align: center;
}

.loader-gif {
    width: 40px; /* Ajusta según el tamaño de tu GIF */
    height: auto;
    margin-bottom: 20px;
}


/* 2. Estilos Base */
* {
    margin: 0; padding: 0; box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

section {
    scroll-margin-top: 100px;
}

body {
    font-family: 'Ralewa', sans-serif;
    background-color: var(--white);
    color: var(--text-dark);
    -webkit-font-smoothing: antialiased;
    padding-top: 120px; 
}


html, body {
    max-width: 100%;
    overflow-x: hidden;
    position: relative;
}

.main-wrapper {
    width: 100%;
    overflow-x: hidden; /* Doble seguridad para el contenido interno */
    position: relative;
    z-index: 20;
    background-color: var(--white);
    /* Asegúrate de quitar el margin-top de 100vh si usas la solución del contenedor anterior */
}


.main-wrapper {
    width: 100%;
    overflow-x: hidden; /* Doble seguridad para el contenido interno */
    position: relative;
    z-index: 20;
    background-color: var(--white);
    /* Asegúrate de quitar el margin-top de 100vh si usas la solución del contenedor anterior */
}
h1, h2, h3 {
    font-family: var(--font-titles);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 20px;
}

/* 3. Barra de Navegación */
.navbar {
    background-color: #fff; 
    height: 120px;
    display: flex;
    align-items: center;
    position: fixed;
    top: 0; 
    width: 100%; 
    z-index: 1000;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    
    
    transition: height 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease;
    will-change: height, box-shadow; 
}

.navbar.scrolled {
    height: 80px;
    background-color: #fff;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 30px;
}

.logo-img {
    height: 80px;
    width: auto;
    transition: all 0.3s ease;
}

.navbar.scrolled .logo-img {
    height: 60px;
}

/* 4. Enlaces de Navegación (Desktop) */
.nav-links {
    display: flex;
    list-style: none;
    gap: 30px;
    align-items: center;
}

.nav-links li {
    display: flex;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-dark);
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    padding: 8px 0;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
}

.nav-links a:hover { color: var(--secondary); }

/* Dropdown e ITCS */
.dropdown { position: relative; }

.dropbtn {
    gap: 6px;
}

.arrow {
    font-size: 9px;
    display: inline-block;
    transition: transform 0.3s ease;
    line-height: 0;
    pointer-events: none;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: var(--white);
    min-width: 200px;
    box-shadow: 1px 8px 16px rgba(0,0,0,0.1);
    z-index: 1001;
    list-style: none;
    padding: 10px 0;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
}

.dropdown-content a {
    color: var(--text-dark);
    padding: 12px 20px;
    text-transform: none;
    display: flex; 
    justify-content: center; 
    align-items: center;
    width: 100%;
    font-size: 13px;
    transition: background 0.3s;
}

.dropdown-content a:hover {
    background-color: #f1f1f1;
}

/* Hover Desktop */
@media (min-width: 993px) {
    .dropdown:hover .dropdown-content { display: block; }
    .dropdown:hover .arrow { transform: rotate(180deg); }
    
    .nav-links a::after {
        content: '';
        position: absolute;
        width: 0; height: 2px; bottom: 0; left: 50%;
        background-color: var(--secondary);
        transition: all 0.3s ease;
        transform: translateX(-50%);
    }
    .nav-links a:hover::after { width: 100%; }
}

/* 5. Switch de Idioma */
.lang-switch-container {
    display: flex;
    align-items: center;
    gap: 8px;
}

.lang-label { font-size: 12px; font-weight: 700; }

.switch {
    position: relative; display: inline-block;
    width: 44px; height: 22px;
}

.switch input { opacity: 0; width: 0; height: 0; }

.slider {
    position: absolute; cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #ccc; transition: .4s;
    border-radius: 34px;
}

.slider:before {
    content: ""; position: absolute;
    height: 16px; width: 16px; left: 3px; bottom: 3px;
    background-color: white; border-radius: 50%;
    transition: .4s;
}

input:checked + .slider { background-color: var(--primary); }
input:checked + .slider:before { transform: translateX(22px); }

/* 6. Responsivo y Menú Móvil */
.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
    z-index: 1100;
}

.menu-toggle .bar {
    width: 22px; height: 2px;
    background-color: var(--primary);
    transition: 0.3s;
}

@media (max-width: 992px) {
    body { padding-top: 100px; }
    .navbar { height: 100px; }
    
    .navbar .container {
        justify-content: center; 
        position: relative;
    }

    .menu-toggle {
        display: flex;
        position: absolute;
        right: 25px;
    }

    .nav-links {
        position: fixed;
        left: 0; top: -100%;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        background-color: var(--white);
        width: 100%;
        height: 100vh;
        gap: 0;
        transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
        opacity: 0;
        visibility: hidden;
        overflow-y: auto;
    }

    .nav-links.active {
        top: 0;
        opacity: 1;
        visibility: visible;
    }

    .nav-links li { 
        width: 100%; 
        justify-content: center; 
        flex-direction: column; 
    }
    
    .nav-links a {
        padding: 15px 0;
        font-size: 16px;
        width: 100%;
        justify-content: center;
    }

    .dropdown-content {
        position: static;
        transform: none;
        box-shadow: none;
        background-color: #f8f9fa;
        width: 100%;
        display: none;
        padding: 0;
    }
    
    .dropdown-content li { 
        width: 100%; 
    }
    .dropdown-content a { 
        justify-content: center; 
        padding: 15px 0; 
        width: 100%; 
    }
    
    .dropdown-content.show { 
        display: block; 
    }
    .dropdown.active .arrow { 
        transform: rotate(180deg); 
    }

    .nav-switch-mobile {
        margin-top: 20px;
        width: 100%;
        display: flex;
        justify-content: center;
    }

    #mobile-menu.active .bar:nth-child(1) { 
        transform: translateY(7px) rotate(45deg); 
    }
    #mobile-menu.active .bar:nth-child(2) { 
        opacity: 0; 
    }
    #mobile-menu.active .bar:nth-child(3) { 
        transform: translateY(-7px) rotate(-45deg); 
    }
}

/* SECCIÓN HERO */
.hero-parallax {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh; 
    z-index: 1; 
    background: url('../images/hero-bg/Banner_1.webp') no-repeat center center;
    background-size: cover;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
    will-change: transform; 
}

.hero-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.5); 
    z-index: 2;
    pointer-events: none; 
}

.hero-content {
    position: relative;
    z-index: 10;
    padding: 0 20px;
    max-width: 900px;
}

.hero-title {
    letter-spacing: 1px;
    font-size: 3rem;
    font-weight: 600;
    margin-bottom: 20px; 
    min-height: 2.4em; 
    display: flex;
    flex-direction: column; 
    align-items: center;
    justify-content: center;
    gap: 15px; 
}

/* LÍNEA DECORATIVA */
.hero-title::after {
    content: "";
    margin-top: 10px;
    width: 50px;
    height: 3px;
    background-color: #fff;
    border-radius: 2px;
    display: block;
}

.hero-content p {
    letter-spacing: 1px;
    font-size: 1.2rem;
    margin-bottom: 30px;
    line-height: 1.5;
}

.main-wrapper {
    position: relative;
    z-index: 20; 
    background-color: var(--white); 
    margin-top: 100vh; 
    padding: 60px 0; 
    box-shadow: 0 -10px 30px rgba(0,0,0,0.2);
}

@media (max-width: 768px) {
    .hero-title { 
        font-size: 1.8rem; 
        min-height: 3.5em; 
    }
    
    /* Ajuste de línea en móvil */
    .hero-title::after {
        width: 60px;
        height: 3px;
    }

    .hero-content p { font-size: 1rem; }
    
    .hero-parallax { 
        background-attachment: scroll; 
    }

    .main-wrapper {
        margin-top: 100vh;
    }
}

.btn-primary-hero {
    display: inline-block !important;
    padding: 12px 30px !important;
    background-color: var(--primary) !important;
    color: var(--white) !important;
    font-size: 15px !important;
    text-decoration: none !important;
    font-weight: 500 !important;
    border-radius: 50px !important;
    border: 2px solid var(--primary) !important;
    cursor: pointer !important;
    position: relative !important;
    z-index: 20 !important;
    pointer-events: auto !important;
    transition: all 0.3s ease-in-out !important;
}

.btn-primary-hero:hover {
    background-color: var(--white) !important;
    color: var(--primary) !important;
    border-color: var(--white) !important;
    transform: translateY(-5px) !important;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4) !important;
}



/* Keyframes para la animación de flotado */
@keyframes floatScrollRect {
    0% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px); /* Sube 10px */
    }
    100% {
        transform: translateY(0px);
    }
}

/* Ocultar en pantallas muy bajas */
@media (max-height: 550px) {
    .scroll-down-wrapper {
        display: none;
    }
}


.arrow-down {
    width: 20px;
    height: 20px;
    border-right: 2px solid var(--white, #ffffff);
    border-bottom: 2px solid var(--white, #ffffff);
    transform: rotate(45deg);
    animation: scrollMove 2s infinite;
}

/* Animación de subida y bajada */
@keyframes scrollMove {
    0% {
        transform: rotate(45deg) translate(0, 0);
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        transform: rotate(45deg) translate(15px, 15px);
        opacity: 0;
    }
}

/* Ocultar en pantallas muy pequeñas */
@media (max-height: 500px) {
    .scroll-down-btn {
        display: none;
    }
}


/* Contenedor de la flecha */
.scroll-down-container {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
}

/* Estilo de la flecha */
.scroll-down-arrow {
    display: block;
    width: 30px;
    height: 50px;
    text-decoration: none;
}

.arrow-icon {
    display: block;
    width: 20px;
    height: 20px;
    border-bottom: 3px solid #ffffff; 
    border-right: 3px solid #ffffff;
    transform: rotate(45deg);
    margin: 0 auto;
    animation: bounce 2s infinite;
}

/* Animación de rebote */
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0) rotate(45deg);
    }
    40% {
        transform: translateY(10px) rotate(45deg);
    }
    60% {
        transform: translateY(5px) rotate(45deg);
    }
}

/* Contenedor principal */
.scroll-down-container {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 999;
    text-align: center;
}

/* El cuerpo del mouse */
.mouse {
    width: 26px;
    height: 42px;
    border: 2px solid rgba(255, 255, 255, 0.8);
    border-radius: 20px;
    display: block;
    margin: 0 auto 10px;
    position: relative;
    backdrop-filter: blur(2px); 
}

/* La rueda del mouse animada */
.wheel {
    width: 4px;
    height: 8px;
    background: #fff;
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 2px;
    animation: scroll-wheel 2s infinite;
}

/* Flecha pequeña debajo del mouse */
.arrow-tip {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.arrow-tip span {
    display: block;
    width: 8px;
    height: 8px;
    border-bottom: 2px solid #fff;
    border-right: 2px solid #fff;
    transform: rotate(45deg);
    opacity: 0.5;
    animation: arrow-fade 2s infinite;
}

.arrow-tip .s2 {
    animation-delay: 0.2s;
}

/* Animaciones */
@keyframes scroll-wheel {
    0% { opacity: 1; transform: translateX(-50%) translateY(0); }
    100% { opacity: 0; transform: translateX(-50%) translateY(15px); }
}

@keyframes arrow-fade {
    0%, 100% { opacity: 0.2; }
    50% { opacity: 0.8; }
}


.scroll-down-arrow:hover .mouse {
    border-color: #fff;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}


/* SECCIÓN NOSOTROS */
.section-nosotros {
    padding: 40px 20px;
    background-color: var(--white);
    text-align: center;
}

.container-small {
    max-width: 1200px; 
    margin: 0 auto;
}

.section-title-centered {
    font-size: 28px;
    color: var(--text-dark);
    letter-spacing: 2px;
    margin-bottom: 60px;
    text-transform: uppercase;
    position: relative;
}

/* Línea divisora */
.section-title-centered::after {
    content: "";
    display: bl0ck;
    width: 50px;
    height: 3px;
    border-radius: 50px;
    background-color: #ddd;
    margin: 20px auto 0;
}

.nosotros-content p {
    padding: 5px 250px;
    font-size: 15px;
    line-height: 1.6;
    color: #666; 
    margin-bottom: 40px;
    font-weight: 400;
    text-align: justify;
}

.nosotros-logo-footer {
    margin-top: 60px;
}

.logo-about {
    max-width: 400px; 
    height: auto;
    opacity: 0.9;
}


@media (max-width: 992px) {
    .nosotros-content p {
    padding: 0px 160px;
    font-size: 15px;
    line-height: 1.6;
    color: #666; 
    margin-bottom: 40px;
    font-weight: 400;
    text-align: justify;
    }
}

/* Ajustes para móviles */
@media (max-width: 768px) {
    .section-nosotros {
        padding: 40px 50px; 
    }
    
    .nosotros-content p {
        padding: 0px 0px;
        font-size: 14px;
        text-align: justify;
        line-height: 1.6;
    }
    
    .logo-about {
        display: block;
        margin: 30px auto 0; 
        max-width: 100%; 
        height: auto;
        padding: 0 0 40px 0; 
    }
}

.nosotros-logo-footer {
    margin: 60px 0 80px 0;
    text-align: center;
}

.nosotros-grid {
    max-width: 1200px;
    padding: 50px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 50px;
    text-align: center;
    border-top: 1px solid #eee; 
    padding-top: 60px;
}

.nosotros-grid p {
    text-align: justify;
    font-size: 13px;
    line-height: 1.6;
    letter-spacing: 0px;
}

/* --- GRID NOSOTROS (Misión, Visión, Valores) --- */

.nosotros-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 columnas en escritorio */
    gap: 40px;
    margin-top: 80px;
    text-align: center;
    border-top: 1px solid #eee; /* Línea divisoria */
    padding-top: 60px;
}

.grid-item {
    padding: 10px;
}

.icon-wrapper {
    margin-bottom: 10px;
    display: flex;
    justify-content: center;
}

.grid-icon {
    width: 50px;
    height: auto;
}

.grid-item h3 {
    font-size: 16px;
    letter-spacing: 1px;
    margin-bottom: 15px;
    color: var(--text-dark);
    font-weight: 700;
    text-transform: uppercase;
}

.grid-item p {
    font-size: 14px;
    font-weight: 400;
    line-height: 1.6;
    color: #777;
    margin: 0;
}

/* --- RESPONSIVO PARA MÓVIL --- */

@media (max-width: 992px) {
    .nosotros-grid {
        grid-template-columns: 1fr; /* Cambia a 1 sola columna */
        gap: 50px;
        margin-top: 50px;
        padding-top: 40px;
    }

    .grid-item {
        max-width: 500px;
        margin: 0 auto;
    }
    
    .grid-item p {
        text-align: justify; /* Centrado en móvil */
    }
    
    .section-title-centered {
    font-size: 22px;
    }
}

/* Animación */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}


.nosotros-grid .grid-item:nth-child(1).active { transition-delay: 0.1s; }
.nosotros-grid .grid-item:nth-child(2).active { transition-delay: 0.3s; }
.nosotros-grid .grid-item:nth-child(3).active { transition-delay: 0.5s; }




/* --- SECCIÓN SERVICIOS (IT&CS) --- */
.container-services {
    max-width: 1200px;
    margin: 0 auto; 
    width: 100%;
}


.section-services {
    padding: 60px 0;
    background-color: var(--white);
    overflow: hidden;
    border-top: 1px solid #eeeeee; 
}

.section-services {
    background-color: var(--white);
    overflow: hidden;
}


.section-services .section-title-centered {
    text-align: center;
    width: 100%;
    display: block;
    font-family: var(--font-titles); 
    font-weight: 700;
    font-size: 28px;
    letter-spacing: 2px;
    margin-bottom: 23px;
}

.services-subtitle {
    text-align: center;
    font-family: var(--font-ui); 
    font-size: 14px;
    color: #999;
    margin-bottom: 60px;
    letter-spacing: 1px;
    text-transform: none;
}

/* Contenedor de Retícula Principal */
.services-grid-container {
    max-width: 1080px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1.2fr 1fr;
    align-items: center;
    gap: 0px; 
}

/* --- AJUSTE DE PADDING EN COLUMNAS --- */
.services-column.left {
    padding-right: 40px; 
    padding-left: 0;
}

.services-column.right {
    padding-left: 40px; 
    padding-right: 0;
}

/* Estilo de los Botones de Servicio */
.service-item {
    display: flex;
    align-items: center;
    text-decoration: none;
    margin-bottom: 45px;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 0.4s ease;
    opacity: 0.9;
}

/* ALINEACIÓN COLUMNA DERECHA */
.services-column.right .service-item {
    justify-content: flex-end; 
}

.service-item:hover {
    opacity: 1;
    transform: translateX(12px);
}

.services-column.right .service-item:hover {
    transform: translateX(-12px); 
}


.service-icon {
    width: 48px;
    height: auto;
    margin-right: 18px;
    transition: transform 0.6s ease-in-out;
}

.service-item:hover .service-icon {
    transform: rotateY(180deg);
}

.services-column.right .service-icon {
    margin-right: 0;
    margin-left: 18px;
    order: 2;
}

.service-text {
    display: flex;
    flex-direction: column;
}

.services-column.right .service-text {
    text-align: right; 
    order: 1; 
}

.service-text .title {
    font-family: var(--font-titles); 
    font-size: 13.5px;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1.2;
}

.service-text .subtitle {
    font-family: var(--font-titles); 
    font-size: 12px;
    color: #bbb;
    margin-top: 4px;
}

/* Mapa Central */
.services-map-center {
    text-align: center;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 5;
}

.map-image {
    width: 110%;
    max-width: 110%;
    height: auto;
    opacity: 0;
    transform: translateY(15px); /* Movimiento ligero */
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
    will-change: opacity, transform;
}

.map-image.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Ajustes para Dispositivos Móviles */
@media (max-width: 992px) {
    .services-grid-container {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 20px;
        padding: 0 20px;
    }
    
    .services-map-center {
        width: 100%;
        margin-bottom: 10px;
        display: flex;
        justify-content: center;
    }
    
    .map-image {
    max-width: 70%;
    height: auto;
    transform: scale(0.85);
    opacity: 0;
    transition: all 1.5s cubic-bezier(0.165, 0.84, 0.44, 1);
    }

    .section-services {
    padding: 100px 50px;
    background-color: var(--white);
    overflow: hidden;
    /* Línea divisora delgada de extremo a extremo */
    border-top: 1px solid #eeeeee; 
}
    
    .services-column.left, 
    .services-column.right {
        padding: 0 220px; 
    }
    
    
    .services-column.right .service-item {
        justify-content: flex-start;
        flex-direction: row;
        text-align: left;
    }
    
    .services-column.right .service-icon {
        order: 0;
        margin-left: 0;
        margin-right: 18px;
    }
    
    .services-column.right .service-text {
        text-align: left;
    }
    
    .section-services .section-title-centered {
    font-size: 22px;
    }
    
}

/* Ajustes para Dispositivos Móviles */
@media (max-width: 768px) {
    .services-grid-container {
        grid-template-columns: 1fr;
    }
      
    .map-image {
    max-width: 150%;
    height: auto;
    transform: scale(0.85);
    opacity: 0;
    transition: all 1.5s cubic-bezier(0.165, 0.84, 0.44, 1);
    }

    .section-services {
    padding: 100px 50px;
    background-color: var(--white);
    overflow: hidden;
    /* Línea divisora delgada de extremo a extremo */
    border-top: 1px solid #eeeeee; 
}
    
    .services-column.left, 
    .services-column.right {
        padding: 0 20px; 
    }
    
    .services-map-center {
        grid-row: 0;
        margin-bottom: 50px;
    }
    
    .services-column.right .service-item {
        justify-content: flex-start;
        flex-direction: row;
        text-align: left;
    }
    
    .services-column.right .service-icon {
        order: 0;
        margin-left: 0;
        margin-right: 18px;
    }
    
    .services-column.right .service-text {
        text-align: left;
    }
    
    .section-services .section-title-centered {
    font-size: 22px;
    }
    
}

/* --- VIDEO PARALLAX BANNER --- */
.video-parallax-container {
    position: relative;
    width: 100%;
    height: 350px; /* Ajusta la altura según el diseño */
    margin-top: 80px;
    margin-bottom: 80px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}

.video-parallax-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 150%; 
    background-image: url('../images/experiencia/tweet-bg.webp'); 
    background-attachment: scroll; 
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    z-index: 1;
    
    will-change: transform; 
    transform: translate3d(0, 0, 0); 
}

.video-overlay {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
    background: rgba(30, 65, 155, 0.75); 
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    text-align: center;
}


/* --- BOTÓN PLAY --- */
.play-btn {
    display: inline-grid;
    place-items: center; 
    width: 70px;
    height: 70px;
    border: 3px solid #fff;
    border-radius: 50%;
    color: #fff; 
    background: transparent;
    transition: all 0.4s ease;
    text-decoration: none;
    cursor: pointer;
    margin-bottom: 30px;
}

/* --- SVG DEL TRIÁNGULO --- */
.play-icon-svg {
    width: 50px; 
    height: 50px;  
    display: block; 
}

/* --- EFECTO HOVER --- */
.play-btn:hover {
    background-color: #ffffff;
    color: #2453a1; 
    transform: scale(1.1);
}

.video-title {
    font-family: var(--font-titles);
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 5px;
    letter-spacing: 2px;
}

.video-description {
    font-family: var(--font-ui);
    font-size: 18px;
    font-weight: 300;
    opacity: 0.9;
}

/* Ajuste móvil */
@media (max-width: 768px) {
    .video-parallax-container { height: 250px; }
    .video-title { font-size: 32px; }
    .video-parallax-bg { background-attachment: scroll; } /* Desactiva parallax en móvil para mejor rendimiento */
}


/* Ajuste móvil */
@media (max-width: 992px) {
    .video-parallax-container { 
        height: 250px; 
        
        /* BORDE A BORDE TOTAL */
        width: 100vw; 
        position: relative;
        left: 50%;
        right: 50%;
        margin-left: -50vw;
        margin-right: -50vw;
        border-radius: 0; 
        margin-top: 40px;
        margin-bottom: 40px;
    }


    .video-parallax-bg { 
        background-attachment: scroll; 
        height: 180%; 
    }

    .video-overlay {
        width: 100%;
    }

    /* Ajuste de textos en móvil */
    .video-brand { 
        font-size: 28px; 
    }
    
    .video-tagline {
        font-size: 14px;
        padding: 0 20px; 
    }
    
    .video-description {
    font-family: var(--font-ui);
    font-size: 14px;
    font-weight: 300;
    opacity: 0.9;
    }
}

/* --- SECCIÓN FIRMA (EQUIPO DIRECTIVO) --- */
.section-firma {
    background-color: var(--white);
    padding: 50px 0; 
}

.section-firma .section-title-centered {
    text-align: center;
    width: 100%;
    display: block;
    font-family: var(--font-titles);
    font-weight: 700;
    font-size: 28px;
    letter-spacing: 2px;
    margin-bottom: 23px;
    color: var(--text-dark);
}

.firma-subtitle {
    text-align: center;
    font-family: var(--font-ui);
    font-size: 14px;
    color: #999;
    margin-bottom: 60px;
    letter-spacing: 1px;
}

/* NAVEGACIÓN DE BOTONES */
.firma-tabs-nav {
    display: flex;
    justify-content: center; 
    flex-wrap: wrap;         
    gap: 10px 50px;         
    max-width: 1100px; /* Aumentado para dar aire */
    width: 90%;            
    margin: 0 auto 40px auto; 
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.tab-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 10px 0;
    color: var(--text-dark);
    position: relative;
    transition: color 0.3s ease;
}

.tab-btn::after {
    content: '';
    position: absolute;
    width: 0;                
    height: 2px;
    bottom: -1px;           
    left: 50%;
    background-color: var(--secondary);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.tab-btn:hover {
    color: var(--secondary);
}

.tab-btn:hover::after {
    width: 100%;             
}

.tab-btn.active {
    color: var(--secondary);
}

.tab-btn.active::after {
    width: 100%;             /* Se mantiene al 100% si está activa */
}

/* CONTENEDOR DE IMÁGENES (GRID) */
.firma-grid-container {
    max-width: 1000px; 
    width: 90%;
    margin: 40px auto;
    display: grid;
    grid-template-columns: repeat(2, max-content); /* Siempre 2 columnas */
    gap: 30px; 
    justify-items: center;
    justify-content: center;
}

/* TARJETAS */
.team-member-card {
   display: none; 
    position: relative;
    width: 250px;
    aspect-ratio: 3 / 4;
    contain: paint;
    
}

.team-member-card.show:only-child {
    grid-column: 1 / span 2;
}

.team-member-card.show {
    display: block;
    animation: fadeIn 0.5s ease forwards;
  
    will-change: transform, opacity; 
}

.member-photo {
    width: 100%;
    height: 100%;
    object-fit: cover; 
    transition: transform 0.4s ease-out;

    transform: translateZ(0); 
}

.team-member-card:hover .member-photo {
    transform: scale(1.05);
}

/* OVERLAY */
.member-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.96); 
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none; 
    opacity: 0;
    transition: opacity 0.4s ease;
}

.team-member-card:hover .member-overlay {
    opacity: 1;
    pointer-events: auto;
}

.overlay-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}


/* Color del Icono LinkedIn */
.linkedin-link {
    padding: 20px;
    display: inline-flex; 
    text-decoration: none;
    transition: transform 0.3s ease;
}

.linkedin-link svg {
    fill: #444444;
    transition: fill 0.3s ease;
}

/* Efecto opcional al pasar el mouse sobre el icono */
.linkedin-link:hover svg {
    fill: #0077b5; /* Cambia al azul oficial de LinkedIn al hacer hover */
    transform: scale(1.1);
}

/* --- MEDIA QUERIES --- */

@media (max-width: 992px) {
    .firma-tabs-nav {
        gap: 15px 25px; 
        max-width: 100%; 
    }

    .firma-grid-container {
        /* Usamos 2 columnas de ancho fijo para que no se separen */
        grid-template-columns: repeat(2, 250px); 
        gap: 15px; /* Gap pequeño entre ellas */
        justify-content: center; /* Esto las mantiene al centro de la pantalla */
        width: 100%;
        margin: auto;
    }

    .team-member-card {
        width: 100%; /* Se adaptan a los 160px del grid */
        max-width: none;
    }
}

@media (max-width: 768px) {
    .firma-grid-container {
        /* En móviles más pequeños, bajamos un poco más el tamaño 
           para que quepan 2 tarjetas por fila sin scroll horizontal */
        grid-template-columns: repeat(2, 145px); 
        gap: 10px; /* Gap mínimo */
        justify-content: center;
        padding: 0 10px;
    }

    .team-member-card {
        width: 100%;
        margin: 0; /* Quitamos márgenes para que el gap mande */
    }
}
@media (max-width: 768px) {
    .section-firma .section-title-centered { font-size: 22px; }
    
    .firma-grid-container {
        grid-template-columns: 1fr; /* En móviles una sola foto por fila para que no se vea minúsculo */
        max-width: 350px; /* Centramos la foto única */
    }

    .member-overlay { padding: 20px; }
    .member-description { display: none; } /* Quitamos texto largo en móvil */
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}


/* --- SECCIÓN PARALLAX FIRMA --- */
.firma-parallax-banner {
    position: relative;
    width: 100%;
    height: 300px;
    margin-top: 100px;
    overflow: hidden;
    z-index: 10;
}

.parallax-bg-image {
    position: absolute;
    top: -30%; /* Aumentamos el margen superior para el recorrido del scroll */
    left: 0;
    width: 100%;
    height: 200%; 
    background-image: url('../images/temp/stats-bg.webp');
    background-attachment: scroll; 
    background-position: center center;
    background-repeat: no-repeat;
    background-size: cover;
    z-index: 1;
    will-change: transform;
    transform: translateZ(0);
}

/* Capa Oscura (Overlay) y Alineación */
.parallax-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%; 
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 10%;
    box-sizing: border-box; 
}

/* --- COLUMNA IZQUIERDA: TEXTOS --- */
.parallax-content-left {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    color: var(--white);
    max-width: 55%;
}

.parallax-tagline {
    font-family: var(--font-titles); /* Raleway */
    font-size: 16px;
    font-weight: 300;
    letter-spacing: 1px;
    line-height: 1.5;
    margin: 0 0 20px 0;
    text-transform: none; 
}

.parallax-brand-subtitle {
    font-family: var(--font-ui); /* Open Sans */
    font-size: 11px;
    color: #bbb;
    margin: 0 0 30px 0;
    font-style: italic;
    letter-spacing: 1px;
}

/* Botón Contacto Estilo Firma */
.btn-firma-contacto {
    display: inline-block;
    padding: 12px 30px;
    border: 1px solid var(--white);
    color: var(--white);
    font-family: var(--font-titles); /* Raleway */
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-firma-contacto:hover {
    background: var(--white);
    color: var(--text-dark);
    transform: translateY(-2px);
}

/* --- COLUMNA DERECHA: LOGO ANIMADO --- */
.parallax-content-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    width: 35%;
}

.animated-logo-container {
    width: 100%; 
    height: auto;
}

.floating-logo {
    width: 80%;
    height: auto;
}



/* Ajustes Responsivos */
@media (max-width: 992px) {
    .parallax-overlay { padding: 0 5%; }
    .parallax-content-left { max-width: 60%; }
    .animated-logo-container { 
        width: 180px; 
        margin-top: 10px;
        margin-right: 45px;
    }
    
    .parallax-tagline {
    margin-left: 60px;
    font-family: var(--font-titles); /* Raleway */
    font-size: 16px;
    font-weight: 300;
    letter-spacing: 1px;
    line-height: 1.5;
    text-transform: none; 
}
    
    .parallax-brand-subtitle {
    margin-left: -85px;
    font-size: 12px;
   
}
    
     .parallax-content-left {
        align-items: center;
        max-width: 90%;
        margin-bottom: 40px;
    }
    
    .animated-logo-container { 
        width: 180px; 
        margin-top: 10px;
        margin-right: 20px;
      
    }
}

@media (max-width: 768px) {
    .firma-parallax-banner { height: 500px; } 
    .parallax-bg-image { background-attachment: scroll; } 
    .parallax-overlay {
        flex-direction: column;
        justify-content: center;
        text-align: center;
    }
    .parallax-content-left {
        align-items: center;
        max-width: 90%;
        margin-bottom: 40px;
    }
    
    .parallax-tagline {
    margin-left: 0px;
    
}
    .parallax-brand-subtitle { 
        margin-left: 0;
        font-size: 10px; 
    }
    .animated-logo-container { 
        width: 180px; 
        margin-top: 10px;
        margin-right: 30px;
      
    }  
}

/* --- SECCIÓN PROBLEMAS DE ATENCIÓN 1 (DESKTOP) --- */
.firma-problems {
    background-color: #f8f8f8;
    overflow: hidden;
    padding: 100px 0; 
}

.container-firma-problems {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    align-items: center; 
    padding: 0 40px; 
}

.problems-content {
   
    flex: 1.2; 
    padding-right: 60px;
}

.problems-title {
    font-family: 'Raleway', sans-serif;
    font-size: 2.5rem; 
    color: #333;
    margin-bottom: 20px;
    line-height: 1.1;
    letter-spacing: -0.5px;
    
}

.problems-intro {
    font-family: var(--font-ui); 
    font-size: 15px;
    color: #888;
    margin-bottom: 50px;
    line-height: 1.6;
    max-width: 90%; 
}

/* --- LISTA DE PROBLEMAS --- */
.problems-list {
    list-style: none;
    padding: 0;
}

.problems-list li {
    margin-bottom: 35px;
    position: relative;
    padding-left: 30px; 
}

.problems-list li::before {
    content: "•";
    position: absolute;
    left: 0;
    top: -2px;
    color: #2c3e8c; 
    font-size: 1.5rem;
}

.problems-list strong {
    display: block;
    font-size: 0.85rem;
    letter-spacing: .5px;
    color: #333;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.problems-list p {
    font-family: var(--font-ui); 
    font-size: 0.85rem;
    color: #444;
    margin: 0;
    line-height: 1.4;
}

/* --- BOTÓN SOLICITA --- */
.btn-solicita {
    display: inline-block;
    background-color: #2c3e8c; 
    color: #fff;
    padding: 16px 35px; 
    border-radius: 100px;
    text-decoration: none;
    font-size: 14px;
    letter-spacing: 1px;
    font-weight: bold;
    margin-top: 20px;
    transition: all 0.4s ease;
    box-shadow: 0 4px 15px rgba(44, 62, 140, 0.2);
}

.btn-solicita:hover {
    background-color: #1e2b63; 
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(44, 62, 140, 0.4);
}

/* --- IMAGEN (CONTROL DE INVASIÓN) --- */
.problems-image {
    flex: 0.8; 
    text-align: right;
    display: flex;
    justify-content: flex-end;
}

.floating-professional {
    max-width: 100%; 
    height: auto;
    filter: drop-shadow(0 20px 50px rgba(0,0,0,0.1)); 
    transition: transform 0.5s ease;
}

/* --- SECCIÓN PROBLEMAS DE ATENCIÓN 2 (DISEÑO INVERSO) --- */

.firma-problems-1 {
    background-color: #f8f8f8;
    overflow: hidden;
    padding: 100px 0; 
    border-top: 1px solid #eeeeee; 
    display: flex;
    justify-content: center;
}

.container-firma-problems-1 {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: row-reverse; 
    align-items: center;
    padding: 0 40px;
}

/* --- CONTENIDO DE TEXTO (Lado Derecho ahora) --- */
.problems-content-1 {
    flex: 1.2;
    padding-left: 60px; 
}

.problems-title-1 {
    font-family: 'Raleway', sans-serif;
    font-size: 2.2rem; 
    color: #333;
    margin-bottom: 30px;
    line-height: 1.2;
    letter-spacing: -0.5px;
}


/* --- IMAGEN (Lado Izquierdo ahora) --- */
.problems-image-1 {
    flex: 0.8; 
    text-align: left;
    display: flex;
    justify-content: flex-start;
}

.floating-professional-1 {
    max-width: 85%; 
    height: auto;
    margin-top: 0; 
    filter: drop-shadow(0 15px 35px rgba(0,0,0,0.08));
    transition: transform 0.6s ease;
}



.problems-list-1 {
    list-style: none;
    padding: 0;
}

.problems-list-1 li {
    margin-bottom: 25px;
    padding-left: 30px;
    position: relative;
}

.problems-list-1 li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: #2c3e8c;
    font-size: 1.5rem;
}



@media (max-width: 992px) {
    .firma-problems, .firma-problems-1 {
        padding: 60px 0; 
    }

    .container-firma-problems, 
    .container-firma-problems-1 {
        flex-direction: column; 
        padding: 0 30px;
        text-align: center; 
    }


    .problems-content, 
    .problems-content-1 {
        padding: 0;
        margin-bottom: 40px;
        width: 100%;
        max-width: 650px; 
        order: 1; 
    }

    .problems-image, 
    .problems-image-1 {
        width: 50%;
        justify-content: center;
        text-align: center;
        order: 2; 
    }

    /* --- TEXTOS Y TÍTULOS --- */
    .problems-title, 
    .problems-title-1 {
        font-size: 1.8rem; 
        margin-left: 0;
        text-align: center;
    }

    .problems-intro, 
    .problems-intro-1 {
        margin: 0 auto 40px auto;
        text-align: center;
        max-width: 100%;
    }

    
    .problems-list, 
    .problems-list-1 {
        display: inline-block;
        text-align: left;
        max-width: 450px;
        margin: 0 auto;
    }

    .problems-list li, 
    .problems-list-1 li {
        margin-bottom: 25px;
        font-size: 14px;
    }

    
    .btn-solicita {
        margin: 30px auto;
        display: table; 
    }

    
    .floating-professional, 
    .floating-professional-1 {
        max-width: 60%; 
        margin: 0 auto;
        filter: drop-shadow(0 10px 30px rgba(0,0,0,0.1));
    }
}


@media (max-width: 768px) {
    .problems-title, 
    .problems-title-1 {
        font-size: 1.5rem;
    }

    .floating-professional, 
    .floating-professional-1 {
        max-width: 85%; 
    }
    
    .problems-list, 
    .problems-list-1 {
        max-width: 100%;
    }
}


/*-- SECCION CLIENTES--*/

.clients {
    margin-top: 100px;
    padding: 100px;
    background-color: var(--white);
    overflow: hidden;
    /* Línea divisora delgada de extremo a extremo */
    border-top: 1px solid #eeeeee; 
}


.section-clients .container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex; 
    flex-direction: column;
    align-items: center; 
}


.section-title-centered {
    text-align: center;
    width: 100%;
    margin-bottom: 10px;
}


.clients-subtitle {
    text-align: center;
    width: 100%;
    color: #888;
    font-size: 0.9rem;
    margin-bottom: 50px;
    letter-spacing: 1px;
    
}
.section-clients {
   padding: 80px 0;
    margin-top: 100px;
    background-color: #fff;
    overflow: hidden;
    width: 100%;
    border-top: 1px solid #eeeeee;
}


.section-clients .container {
    max-width: 1200px; /* Consolidado a un solo valor */
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
}

.clients-subtitle {
    text-align: center;
    color: #888;
    font-size: 0.9rem;
    margin-bottom: 50px;
    letter-spacing: 1px;
    font-family: 'Raleway', sans-serif;
}

/* --- CARRUSEL --- */
.carousel-container {
    max-width: 1200px;
    margin: 0 auto;
    overflow: hidden;
    padding: 0 10px;
    position: relative;
    box-sizing: border-box; 
}

.carousel-track {
    display: flex;
    gap: 12px;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
    justify-content: flex-start;
}

.client-card {
    flex: 0 0 calc(20% - 10px);
    display: flex;
    flex-direction: column;
    background-color: transparent;
}

.card-image {
    aspect-ratio: 577 / 800;
    width: 100%;
    overflow: hidden;
    background-color: #f4f4f4;
    backface-visibility: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.card-footer {
   width: 100%; 
    background-color: #f8f8f8;
    border-top: 1px solid #eee;
    min-height: 80px; 
    height: auto !important; 
    padding: 15px 12px; 
    display: flex;
    align-items: center; 
    gap: 10px; 
    box-sizing: border-box;
    overflow: hidden;
    flex-grow: 1; 
}

.card-number {
    font-size: 2rem;
    font-weight: 700;
    color: #333;
    line-height: 1;
    font-family: 'Open Sans', sans-serif;
    flex-shrink: 0; 
    min-width: 40px; 
    text-align: center;
    margin-top: -2px; 
}

.card-text-wrapper {
    flex: 1; 
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    min-width: 0; 
    overflow-wrap: break-word;
}

.card-footer p {
   color: #444;
    font-size: 0.85rem; 
    text-transform: none;
    font-weight: 500;
    margin: 0;
    line-height: 1.2; 
    letter-spacing: 0.5px;
    white-space: normal !important; 
    word-break: break-word; 
    hyphens: auto; 
    width: 100%;
}

/* --- CONTROLES --- */
.carousel-controls {
    display: flex;
    justify-content: center;
    gap: 15px; 
    margin: 25px 0;
}

.carousel-control-btn {
   background-color: #bcbcbc;
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.carousel-control-btn:hover {
    background-color: #999;
    transform: scale(1.1);
}


@media (max-width: 992px) {
    .client-card {
        flex: 0 0 calc(25% - 9px) !important; 
        max-width: calc(25% - 9px) !important;
    }

  
    .card-footer {
        
        background-color: #f8f8f8;
        border-top: 1px solid #eee;
        padding: 12px 10px !important;
        min-height: 70px !important;
        gap: 8px !important;
    }

    .card-number {
        font-size: 1.5rem;
        color: #333;
        min-width: 30px !important;
    }

    .card-footer p {
        font-size: 0.8rem !important;
        color: #444;
        text-transform: none;
        font-weight: 500;
        line-height: 1.2 !important;
    }


    .carousel-controls {
        display: flex !important;
        justify-content: center !important;
        margin: 20px 0 !important;
    }
}


@media (max-width: 768px) {
    .client-card {
        flex: 0 0 calc(50% - 15px) !important;
        max-width: calc(50% - 15px) !important;
        margin: 0 !important;
    }

  
    .card-image {
        aspect-ratio: 1 / 1 !important; 
        border-radius: 4px 4px 0 0; 
    }

   
    .card-footer {
        min-height: 65px !important;
        padding: 12px 10px !important;
        background-color: #f8f8f8 !important; 
        border-top: 1px solid #eee; 
        align-items: center !important; 
    }

    .card-number {
        font-size: 1.5rem !important;
        color: #333 !important;
        min-width: 30px !important;
    }

    .card-footer p {
        font-size: 0.75rem !important;
        color: #444 !important;
        text-transform: none !important; 
        font-weight: 500 !important;
        line-height: 1.2 !important;
    }
    
   
    .carousel-controls {
        display: none !important;
    }

 
    .carousel-control-btn:active {
        transform: scale(0.9);
        background-color: #555 !important;
    }
}

/* --- BANNER CLIENTES PARALLAX --- */
.clients-banner {
    position: relative;
    width: 100%;
    min-height: 250px;
    padding: 60px 0;
    margin-top: 50px;
    display: flex;
    align-items: center;
    overflow: hidden;
    background: #1a1a1a; 
}

.clients-banner::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../images/clients/clients-bg.webp');
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    will-change: transform;
    z-index: 0;
}
.banner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7); 
    z-index: 1;
}

.clients-banner .container {
    position: relative;
    z-index: 2;
}

/* ---  LOGOS (6 COLUMNAS) --- */
.logos-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr); /* 6 columnas exactas */
    gap: 40px;
    align-items: center;
    justify-items: center;
}

.logo-item {
    width: 70%;
    max-width: 140px; 
}

.logo-item img {
    width: 100%;
    color: #fff;
    height: auto;
    object-fit: contain;
}




@media (max-width: 992px) {
    .logos-grid {
        grid-template-columns: repeat(3, 1fr); /* 3 filas de 2 en tablet */
        gap: 30px;
    }
}

@media (max-width: 768px) {
    .clients-banner {
        background-attachment: scroll; /* El parallax suele fallar en móviles */
        padding: 40px 0;
    }
    
    .logos-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 columnas en móvil */
        gap: 20px;
    }
    
    .logo-item {
        max-width: 100px;
    }
}


/* ----- SECCIÓN CONTACTO -----*/

.section-contacto {
    padding: 80px 0 0 0;
    background-color: #ffffff;
    font-family: 'Raleway', sans-serif;
}

.contact-subtitle {
    text-align: center;
    max-width: 700px;
    margin: 20px auto 50px;
    font-size: 1.1rem;
    line-height: 1.6;
    color: #666;
    font-weight: 300;
}


.contact-data-banner {
    background-color: #fdfdfd; 
    border-top: 1px solid #eee;
    padding: 60px 0;
    margin-top: 40px;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); 
    gap: 30px;
    text-align: center;
    align-items: start;
}

.contact-item {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.contact-label {
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    color: #333;
    letter-spacing: 1px;
}

.contact-text, 
.contact-link {
    font-size: 1rem;
    color: #555;
    line-height: 1.5;
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-link:hover {
    color: #0056b3;
}


@media (max-width: 768px) {
    .contact-grid {
        grid-template-columns: 1fr; 
        gap: 40px;
    }
    
    .section-contacto {
        padding: 50px 20px 0 20px;
    }
    
    .contact-subtitle {
        font-size: 1rem;
    }
}


.section-title-centered::after {
    content: "";
    display: block;
    width: 50px;
    height: 2px;
    background: #ccc;
    margin: 15px auto;
}

/* ------ SECCIÓN MAPA ------ */
.section-mapa {
    width: 100%;
    background-color: #fff;
    overflow: hidden;
}

.map-container {
    position: relative;
    width: 100%;
    cursor: pointer;
    filter: grayscale(20%);
    transition: filter 0.4s ease;
    background-color: #eee;
}

.map-overlay-text {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6); 
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
    z-index: 5;
    pointer-events: none;
    transition: opacity 0.3s ease, visibility 0.3s;
}

/* Estado base del iframe */
.map-container iframe {
    display: block;
    width: 100%;
    border: 0;
    pointer-events: none; /* Bloqueado por defecto */
    aspect-ratio: 16 / 9;
    min-height: 350px;
    
}

/* Estado Activo (vía JS) */
.map-container.active {
    filter: grayscale(0%);
    cursor: default;
}

.map-container.active iframe {
    pointer-events: auto; /* Activado */
}

.map-container.active .map-overlay-text {
    opacity: 0;
    visibility: hidden; /* Evita que el texto invisible reciba interacciones */
}

@media (max-width: 768px) {
    .map-container iframe {
        aspect-ratio: 4 / 3;
        min-height: 300px;
    }
}

/* ----- FOOTER ------ */
.main-footer {
    width: 100%;
    background-color: #fcfcfc; 
    border-top: 1px solid #eee;
    padding: 60px 0 30px 0; 
    font-family: 'Raleway', sans-serif; 
    color: #444; 
}


.container-footer {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    align-items: center; 
    gap: 30px; 
}

/* Redes Sociales */
.footer-social-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px; 
    text-align: center;
}

.footer-social-link {
    font-size: 0.9rem;
    font-weight: 500;
    color: #333; 
    text-decoration: none;
    text-transform: uppercase; 
    letter-spacing: 1.2px; 
    transition: color 0.3s ease, transform 0.3s ease;
}

.footer-social-link:hover {
    color: #0056b3; 
    transform: translateY(-2px); 
}


.footer-copyright-text {
    font-size: 0.75rem; 
    color: #777;
    font-weight: 300;
    margin: 0;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px; 
}


.copyright-brand {
    font-weight: 600; 
    color: #333; 
    text-decoration: none;
    letter-spacing: 0.5px;
    transition: color 0.3s ease;
}

.copyright-brand:hover {
    color: #000; 
}


@media (max-width: 768px) {
    .main-footer {
        padding: 50px 20px 20px 20px;
    }
    
    .footer-social-links {
        gap: 20px; 
    }
    
    .footer-social-link {
        font-size: 0.8rem;
    }
    
    .footer-copyright-text {
        font-size: 0.65rem;
        flex-direction: column;
        gap: 4px;
    }
}

/* ----- BOTÓN VOLVER ARRIBA (UX)-----*/

#btn-back-to-top {
    position: fixed;
    bottom: 33px; 
    right: 30px;
    width: 40px; 
    height: 40px;
    background-color: #3f6bb3; 
    color: #fff; 
    border-radius: 8px; 
    border: none;
    
    
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1001; 
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    
    
    opacity: 0; /* Oculto inicialmente */
    visibility: hidden;
    transform: translateY(15px); 
    
    
    transition: 
        opacity 0.5s ease,      
        visibility 0.5s ease,    
        transform 0.5s ease,     
        background-color 0.3s ease, 
        box-shadow 0.3s ease;
}


#btn-back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}


#btn-back-to-top:hover {
    background-color: #304896; 
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15); 
    transform: translateY(-5px);
}


.icon-chevron-top {
    width: 26px; 
    height: 26px;
    stroke-width: 2.5; 
    transition: transform 0.3s ease;
}

#btn-back-to-top:hover .icon-chevron-top {
    transform: translateY(-2px); 
}


@media (max-width: 768px) {
    #btn-back-to-top {
        bottom: 20px;
        right: 20px;
        width: 40px;
        height: 40px;
    }
    
    .icon-chevron-top {
        width: 22px;
        height: 22px;
    }
}


/* ----- SUBSECCIÓN SERVICIOS -----*/
.btn-inicio {
    background-color: #3b53a4; /* Azul IT&CS */
    color: white;
    padding: 12px 40px;
    text-decoration: none;
    font-size: 14px;
    text-transform: uppercase;
    transition: background 0.3s ease;
    display: inline-block;
}

.btn-inicio:hover {
    background-color: #2a3d7a;
}


/* Ocultar todos los paneles por defecto */
.service-panel {
    display: none;
    animation: fadeIn 0.5s ease;
}

/* Mostrar solo el activo */
.service-panel.active {
    display: block;
}

/* Menú de pestañas inferior */
/* --- CONTENEDORES DE NAVEGACIÓN --- */
/* Esta regla aplica a ambos: el de arriba (.services-nav-tab) y el de abajo (.services-nav-tabs) */
.services-nav-tab, 
.services-nav-tabs {
    display: flex;
    justify-content: center; 
    flex-wrap: wrap;         
    max-width: 1100px; 
    width: 90%;            
    margin: 0 auto 40px auto; 
    gap: 15px 40px; /* Espaciado equilibrado */
}

/* Diferenciación de bordes (Superior vs Inferior) */
.services-nav-tab {
    padding-bottom: 20px;
    border-bottom: 1px solid #eee; /* Barra de arriba */
}

.services-nav-tabs {
    padding-top: 30px;
    border-top: 1px solid #eee; /* Barra de abajo */
    margin-top: 50px;
}

/* --- ESTILO ÚNICO PARA LOS ENLACES (TAB-LINK) --- */
.tab-link {
    text-decoration: none;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 13px; /* Tamaño unificado */
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 10px 0;
    color: var(--text-dark);
    position: relative;
    transition: color 0.3s ease;
}

/* EFECTO DE LÍNEA QUE NACE DEL CENTRO */
.tab-link::after {
    content: '';
    position: absolute;
    width: 0; 
    height: 2px;
    /* Para .services-nav-tab (arriba) la línea baja, para .services-nav-tabs (abajo) la línea sube */
    bottom: -2px; 
    left: 50%;
    background-color: var(--secondary); /* Usamos tu variable global */
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

/* Ajuste específico para la barra superior: la línea debe pisar el borde gris */
.services-nav-tab .tab-link::after {
    bottom: -21px; 
}

/* ESTADOS HOVER Y ACTIVO (UNIFICADOS) */
.tab-link:hover, 
.tab-link.active {
    color: var(--secondary);
}

.tab-link:hover::after,
.tab-link.active::after {
    width: 100%; /* La línea se expande al 100% */
}

/* ANIMACIÓN DE ENTRADA */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}