/* Estilos generales */
body {
    font-family: "Liter", sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f7f7f7;
    color: #333;
}
/* Contenedor */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

/* Barra de Navegación */
.topbar {
    background: #001d47; 
    padding: 15px 0;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: all 0.3s ease-in-out;
}

/* Cuando se haga scroll, cambia de color y agrega sombra */
.topbar.scrolled {
    background: rgba(0, 29, 71, 0.9); 
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.3); 
    padding: 10px 0;
}
.topbar {
    background: #001d47;
    padding: 15px 0;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: all 0.3s ease-in-out;
    box-shadow: 0 3px 0 0 white;
}

/* Actualizar el estado scrolled para mantener ambas sombras */
.topbar.scrolled {
    background: rgba(0, 29, 71, 0.9);
    box-shadow: 0 3px 0 0 white, 0px 4px 10px rgba(0, 0, 0, 0.3); 
    padding: 10px 0;
}
/* Navegación */
.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    height: 90px;
    transition: height 0.3s ease-in-out;
}

/* Ajusta el tamaño del logo al hacer scroll */
.topbar.scrolled .logo img {
    height: 40px;
}

/* Estilo para el menú desplegable */
nav ul {
    display: flex;
    gap: 15px;
    list-style: none;
    padding: 0;
}

nav ul li {
    position: relative; 
}

/* Estilo de los enlaces principales */
nav ul li a {
    text-decoration: none;
    color: white;
    font-weight: bold;
    transition: color 0.3s, transform 0.3s;
}

nav ul li a:hover {
    color: #4286c0; 
    transform: scale(1.05);
}

/* Nuevo estilo para el despliegue del menú dropdown */
.dropdown-menu {
    display: block;
    position: absolute;
    top: 120%;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background-color: white;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2); 
    border-radius: 12px;
    width: 240px;
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); 
    overflow: hidden;
    padding: 8px 0;
}

/* Flecha decorativa en la parte superior */
.dropdown-menu::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-bottom: 10px solid white;
    z-index: 1000;
}

/* Mostrar submenú al hacer hover con animación */
.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* Estilo para los elementos del submenú */
.dropdown-menu li {
    padding: 0;
    text-align: left;
    transition: background-color 0.2s ease;
}

.dropdown-menu li a {
    color: #001d47;
    text-decoration: none;
    font-weight: 500;
    display: block;
    padding: 12px 20px;
    position: relative;
    transition: all 0.3s ease;
}

/* Efecto de barra lateral al hover */
.dropdown-menu li a:before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0;
    background-color: #4286c0;
    transition: width 0.3s ease;
}

.dropdown-menu li a:hover {
    color: #4286c0;
    background-color: rgba(59, 146, 211, 0.1);
    padding-left: 25px;
}

.dropdown-menu li a:hover:before {
    width: 4px;
}

/* Indicador para dropdown */
.dropdown > a {
    display: inline-flex;
    align-items: center;
}

.dropdown > a::after {
    content: "▾";
    margin-left: 8px;
    font-size: 0.7em;
    transition: transform 0.3s ease;
}

.dropdown:hover > a::after {
    transform: rotate(180deg);
}

/* Responsividad: ajustar el menú en pantallas pequeñas */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column; 
        align-items: flex-start;
    }

    nav ul {
        flex-direction: column;
        gap: 10px;
    }

    .dropdown-menu {
        position: static;
        transform: none;
        width: 100%;
        box-shadow: none;
        border-radius: 0;
        background-color: rgba(0, 29, 71, 0.7);
        padding: 0;
        max-height: 0;
        opacity: 1;
        visibility: hidden;
    }
    
    .dropdown-menu::before {
        display: none; 
    }
    
    .show-dropdown {
        max-height: 1000px;
        visibility: visible;
        margin-top: 5px;
        margin-bottom: 5px;
        transition: all 0.4s ease;
    }
    
    .dropdown-menu li a {
        color: white;
        padding: 10px 25px;
    }
    
    .dropdown-menu li a:hover {
        background-color: rgba(59, 146, 211, 0.3);
    }
    
    .dropdown-menu li a:before {
        display: none;
    }
    
    .dropdown:hover .dropdown-menu {
        transform: none;
    }
    
    /* Agregar animación al icono en móvil */
    .dropdown.active > a::after {
        transform: rotate(180deg);
    }
}

/* Estilos para el botón hamburguesa */
.hamburger-menu {
    display: none;
    cursor: pointer;
    padding: 10px;
}

.bar {
    width: 25px;
    height: 3px;
    background-color: white;
    margin: 5px 0;
    transition: 0.4s;
}

/* Mostrar/ocultar elementos en pantallas pequeñas */
@media (max-width: 768px) {
    .hamburger-menu {
        display: block;
        position: absolute;
        right: 0px;
        top: 25px;
        transform: translateY(-50%);
    }

    nav {
        width: 100%;
        display: none;
    }

    nav.active {
        display: block;
    }

    .nav-container {
        position: relative;
    }
    
    /* Clase para mostrar el submenú en móvil */
    .dropdown-menu {
        position: static;
        transform: none;
        width: 100%;
        box-shadow: none;
        border-radius: 0;
        background-color: rgba(0, 29, 71, 0.7);
        padding: 0;
        max-height: 0;
        opacity: 1;
        visibility: hidden;
    }
    
    .dropdown-menu li a {
        color: white;
        padding: 10px 25px;
    }
    
    .show-dropdown {
        max-height: 1000px;
        visibility: visible;
        margin-top: 5px;
        margin-bottom: 5px;
        transition: all 0.4s ease;
    }
    
    /* Evitar que hover active el menú en móvil */
    .dropdown:hover .dropdown-menu {
        transform: none;
    }
    
    /* Indicador de menú desplegable */
    .dropdown > a::after {
        content: " ▼";
        font-size: 0.8em;
        vertical-align: middle;
    }
    
    /* Estilo cuando el dropdown está activo */
    .dropdown.active > a::after {
        transform: rotate(180deg);
    }
}


/* Hero Section */

:root {
    --hero-primary-color: #001f5b;
    --hero-secondary-color: #4286c0;
    --hero-accent-color: #800020;
    --hero-accent-hover: #B22222;
    --hero-transition: cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --hero-backdrop-blur: blur(12px);
}

.hero {
    position: relative;
    height: 93vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: white;
    overflow: hidden;
    margin: 0;
    padding: 0;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.hero-content {
    background: rgba(0, 31, 91, 0.65);
    padding: 20px 25px;
    border-radius: 8px;
    z-index: 3;
    position: relative;
    max-width: 480px;
    backdrop-filter: var(--hero-backdrop-blur);
    -webkit-backdrop-filter: var(--hero-backdrop-blur);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.12);
    transform: translateY(0);
    transition: transform 0.5s var(--hero-transition), 
                box-shadow 0.5s ease;
}

.hero-content:hover {
    transform: translateY(-8px);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.3);
}

.hero .btn {
    background: linear-gradient(45deg, var(--hero-primary-color), var(--hero-secondary-color));
    padding: 10px 24px;
    text-decoration: none;
    font-weight: 600;
    border-radius: 4px;
    display: inline-block;
    margin-top: 15px;
    color: white;
    transition: all 0.4s var(--hero-transition);
    border: none;
    letter-spacing: 1px;
    box-shadow: 0 10px 25px rgba(0, 31, 91, 0.35);
    position: relative;
    overflow: hidden;
}

.hero .btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.7s;
}

.hero .btn:hover {
    background: linear-gradient(45deg, var(--hero-accent-color), var(--hero-accent-hover));
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(128, 0, 32, 0.4);
}

.hero .btn:focus {
    outline: 2px solid rgba(255, 255, 255, 0.8);
    outline-offset: 2px;
}

.hero .btn:hover::before {
    left: 100%;
}

/* Imagen de fondo - CORREGIDO SIN PARPADEO */
.hero-images {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    background-color: var(--hero-primary-color);
}

/* CORREGIDO: Sin duplicados y sin conflictos */
.hero-images img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0; /* TODAS empiezan invisibles */
    transition: opacity 0.8s ease-in-out;
    transform-origin: center center;
    filter: brightness(0.9);
    will-change: opacity;
    backface-visibility: hidden;
}

/* CORREGIDO: Solo las imágenes con clase 'active' serán visibles */
.hero-images img.active {
    opacity: 1;
}

/* Overlay mejorado */
.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, 
        rgba(0, 31, 91, 0.1) 0%, 
        rgba(0, 31, 91, 0.15) 50%, 
        rgba(0, 31, 91, 0.2) 100%
    );
    z-index: 2;
}

/* Indicadores mejorados */
.hero-indicators {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    z-index: 4;
}

.hero-indicator {
    width: 12px;
    height: 12px;
    background: rgba(255, 255, 255, 0.4);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    padding: 0;
    transition: all 0.3s var(--hero-transition);
    position: relative;
}

.hero-indicator::after {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0);
    transition: all 0.3s ease;
}

.hero-indicator:hover {
    background: rgba(255, 255, 255, 0.6);
    transform: scale(1.1);
}

.hero-indicator:focus,
.hero-indicator:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.8);
    outline-offset: 2px;
}

.hero-indicator.active {
    background: white;
    transform: scale(1.3);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.3);
}

.hero-indicator.active::after {
    border-color: rgba(255, 255, 255, 0.5);
}

/* Títulos y texto */
.hero-content h1 {
    font-size: 2.8rem;
    font-weight: 600;
    margin-bottom: 20px;
    letter-spacing: 0.5px;
    line-height: 1.2;
}

.hero-content p {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 30px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Accesibilidad - Reducir movimiento */
@media (prefers-reduced-motion: reduce) {
    .hero-images img {
        transition: none;
    }
    .hero-content,
    .hero .btn,
    .hero-indicator {
        transition: none;
    }
    .hero-content:hover {
        transform: none;
    }
    .hero .btn:hover {
        transform: none;
    }
}

/* Responsive */

/* Tablets */
@media (max-width: 992px) {
    .hero {
        height: 80vh;
    }
    .hero-content {
        padding: 30px 40px;
        max-width: 600px;
    }
    .hero-content h1 {
        font-size: 2.4rem;
    }
}

/* Móviles grandes */
@media (max-width: 768px) {
    .hero {
        height: 90vh;
    }
    .hero-content {
        padding: 25px 30px;
        max-width: 90%;
    }
    .hero-content h1 {
        font-size: 2rem;
        margin-bottom: 15px;
    }
    .hero-content p {
        font-size: 1rem;
        margin-bottom: 20px;
    }
    .hero .btn {
        padding: 12px 25px;
        margin-top: 15px;
    }
    .hero-indicators {
        bottom: 20px;
    }
}

/* Móviles pequeños */
@media (max-width: 576px) {
    .hero {
        height: 60vh;
    }
    .hero-content {
        padding: 20px;
    }
    .hero-content h1 {
        font-size: 1.8rem;
    }
    .hero-content p {
        font-size: 0.95rem;
        line-height: 1.5;
    }
    .hero .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    .hero-indicator {
        width: 10px;
        height: 10px;
    }
}

/* Para pantallas muy grandes */
@media (min-width: 1400px) {
    .hero-content h1 {
        font-size: 3.2rem;
    }
}

/* Para móviles en landscape */
@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        height: 100vh;
    }
}
/* Mejoras de contraste para mejor legibilidad */
@media (prefers-contrast: high) {
    .hero-content {
        background: rgba(0, 31, 91, 0.85);
        border: 2px solid rgba(255, 255, 255, 0.3);
    }
    .hero-indicator {
        background: rgba(255, 255, 255, 0.6);
    }
    .hero-indicator.active {
        background: white;
        box-shadow: 0 0 0 2px rgba(0, 31, 91, 0.8);
    }
}
/* Sección Sobre Nosotros */
.nosotros {
    background-color: #001F5B;
    color: white;
    padding: 120px 20px;
    text-align: center;
    position: relative;
    box-sizing: border-box;
    background-image: linear-gradient(120deg, #001F5B 0%, #002266 100%);
}

.nosotros::before {
    content: none;
}

/* Título con borde burdeos fijo y línea decorativa animada */
.nosotros h2 {
    font-size: 3.2rem;
    font-weight: 800;
    color: #FFFFFF;
    position: relative;
    z-index: 2;
    text-transform: uppercase;
    margin-bottom: 30px;
    letter-spacing: 3px;
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.5);
    display: inline-block;
    padding-bottom: 15px;
    border-bottom: 2px solid #800020;
}

/* Efecto de brillo para el título (hover, sin animación infinita) */
.nosotros h2::after {
    content: "";
    position: absolute;
    bottom: -2px;
    left: 20%;
    width: 60%;
    height: 3px;
    background: linear-gradient(to right, transparent, #3B92D3, transparent);
    transform: translateX(-100%);
    opacity: 0;
    pointer-events: none;
    z-index: 1;
    transition: transform 1.8s ease-in-out, opacity 0.3s ease-in;
}

.nosotros h2:hover::after {
    transform: translateX(100%);
    opacity: 1;
}

/* Texto descriptivo */
.nosotros p {
    font-size: 1.3rem;
    line-height: 1.8;
    color: #FFFFFF;
    max-width: 800px;
    margin: 0 auto 50px;
    position: relative;
    z-index: 2;
    padding: 0 15px;
    text-align: center;
    letter-spacing: 1px;
    font-weight: 300;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
}

/* Sección de tarjetas */
.nosotros-grid {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
    flex-wrap: wrap;
    position: relative;
    z-index: 2;
    margin: 30px auto;
    width: 95%;
    max-width: 1200px;
}

/* Estilos para las tarjetas */
.nosotros-card {
    background-color: #f5f5f5;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    width: 45%;
    min-width: 280px;
    max-width: 500px;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s ease-in-out;
    position: relative;
    overflow: hidden;
    z-index: 2;
    border: 1px solid #e0e0e0;
    margin: 0 auto;
    flex: 0 1 auto;
}

/* Efecto hover en tarjetas */
.nosotros-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
}

/* Título dentro de las tarjetas */
.nosotros-card h3 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: #800020;
    font-weight: 600;
    position: relative;
    padding-bottom: 15px;
}

/* Texto dentro de las tarjetas */
.nosotros-card p {
    color: #001F5B;
    font-size: 1.1rem;
    line-height: 1.6;
    text-align: center;
}

/* Lista dentro de las tarjetas */
.nosotros-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nosotros-card ul li {
    font-size: 1.1rem;
    color: #001F5B;
    margin-bottom: 12px;
    line-height: 1.6;
}

.nosotros-card ul li strong {
    color: #800020;
}

/* Media queries agrupadas */

/* Tablet */
@media (max-width: 992px) {
    .nosotros-grid {
        gap: 30px;
    }

    .nosotros-card {
        width: calc(50% - 30px);
    }
}

/* Móvil y tablets pequeñas */
@media (max-width: 768px) {
    .nosotros-grid {
        flex-direction: column;
        align-items: center;
        width: 90%;
    }

    .nosotros-card {
        width: 100%;
        max-width: 500px;
        margin-bottom: 20px;
    }

    .nosotros h2 {
        font-size: 2rem;
    }

    .nosotros p {
        font-size: 1rem;
        max-width: 90%;
        color: #4286c0;
        font-weight: bold;
    }

    .nosotros h2::after {
        display: none;
    }
}

/* Dispositivos muy pequeños */
@media (max-width: 480px) {
    .nosotros-card {
        padding: 20px;
        width: 95%;
    }

    .nosotros-card h3 {
        font-size: 1.5rem;
    }

    .nosotros p {
        font-size: 1rem;
    }
}
@media (prefers-reduced-motion: reduce) {
    .nosotros h2::after,
    .nosotros-card:hover {
        transition: none;
    }
}
/* Ajusta el contenedor de tarjetas en móviles */
@media (max-width: 768px) {
    .nosotros {
        padding-left: 10px;
        padding-right: 10px;
    }

    .nosotros-grid {
        width: 100%;
        margin: 0 auto;
        padding: 0;
    }

    .nosotros-card {
        width: 100%;
        max-width: 100%;
        margin: 10px 0;
        box-sizing: border-box;
    }
}

/* Servicios */
.services {
    padding: 80px 0;
    background-color: #FFFFFF; 
    position: relative;
}

.services::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, #001F5B, #4286c0, #001F5B); 
}

.services .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
}

.services h2 {
    text-align: center;
    font-size: 50px;
    margin-bottom: 60px;
    color: #001F5B; 
    position: relative;
    font-weight: 700;
    letter-spacing: 1px;
}

.services h2::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #001F5B, #800020); 
    margin: 15px auto 0;
    border-radius: 2px;
}

.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 80px; 
    justify-content: center;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
}

@media (min-width: 1200px) {
    .service-grid {
        grid-template-columns: repeat(3, 1fr);
        column-gap: 90px; 
        row-gap: 100px;
    }
    /* Hacer que la última tarjeta (la séptima) se centre en la última fila */
    .service-grid .service-card:last-child {
        grid-column: 2;
        margin-top: 20px;
    }
}

/* Media query para pantallas medianas */
@media (min-width: 768px) and (max-width: 1199px) {
    .service-grid {
        grid-template-columns: repeat(2, 1fr);
        column-gap: 80px; 
        row-gap: 80px; 
    }
    
   /* Si estamos en una pantalla donde las 7 tarjetas se verían en 4 filas (2+2+2+1) */
   .service-grid .service-card:last-child {
    grid-column: 1 / span 2;
    max-width: 400px;
    justify-self: center;
    margin: 0 auto;
    margin-top: 30px;
    }
}

.service-card {
    background: white;
    border-radius: 12px; 
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1); 
    padding: 35px; 
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    border-bottom: 4px solid transparent;
    height: 100%; 
    display: flex;
    flex-direction: column;
}

.service-card:hover {
    transform: translateY(-15px); 
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    border-bottom: 4px solid #3B92D3; 
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, rgba(59, 146, 211, 0.05) 0%, rgba(59, 146, 211, 0) 70%); 
    border-radius: 0 0 0 100%;
}

.service-icon {
    font-size: 2.5rem;
    color: #3B92D3;
    margin-bottom: 25px;
    display: flex;          
    justify-content: center; 
    align-items: center;    
    background: rgba(59, 146, 211, 0.1);
    width: 80px;
    height: 80px;
    border-radius: 50%;
    transition: all 0.3s ease;
    margin-left: auto;
    margin-right: auto;
}

.service-card:hover .service-icon {
    background: #4286c0; 
    color: white;
    transform: rotate(360deg);
}

.service-card h3 {
    font-size: 1.5rem;
    color: #001F5B; 
    margin-bottom: 20px; 
    font-weight: 600;
    position: relative;
    padding-bottom: 15px;
    text-align: center; 
}

.service-card h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    /* Cambio para centrar la línea bajo el título */
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 3px;
    background: #3B92D3;
    transition: width 0.3s ease;
}

.service-card:hover h3::after {
    width: 60px;
}

.service-card p {
    color: #333; 
    line-height: 1.5; 
    font-size: 1.05rem; 
    flex-grow: 1; 
    margin: 0; 
    padding: 0; 
    text-align: center; 
}

/* Efectos adicionales para mejorar la interactividad */
.service-card:nth-child(odd):hover {
    border-bottom-color: #800020; 
}

.service-card:nth-child(odd) .service-icon {
    background: rgba(128, 0, 32, 0.1); 
    color: #800020; 
}

.service-card:nth-child(odd):hover .service-icon {
    background: #800020; 
    color: white;
}

.service-card:nth-child(odd) h3::after {
    background: #800020; 
}

/* Diseño responsivo - MODIFICADO PARA MEJOR ESPACIADO */
@media (max-width: 767px) {
    .service-grid {
        grid-template-columns: 1fr;
        gap: 80px; 
    }
    
    .services h2 {
        font-size: 2rem;
        margin-bottom: 40px;
    }
    
    .service-grid .service-card:last-child {
        grid-column: auto; 
    }
    
    .services .container {
        padding: 0 25px; 
    }
}

/* Media query adicional para móviles muy pequeños */
@media (max-width: 480px) {
    .service-grid {
        gap: 70px; 
        padding: 0 15px;
    }
    
    .services .container {
        padding: 0 15px;
    }
    
    .service-card {
        padding: 30px 25px; 
    }
}

.service-grid {
    padding-bottom: 60px; 
}

/* ===== SECCIÓN CLIENTES ===== */
.clientes {
    background-color: #FFFFFF;
    padding: 60px 20px; 
    color: #001F5B;
    text-align: center;
}

.clientes .container {
    max-width: 900px; 
    margin: 0 auto;
}

/* ===== TÍTULO CON EFECTOS ===== */
.clientes h2 {
    font-size: 42px; 
    font-weight: 800;
    letter-spacing: 1px;
    line-height: 1.2;
    margin-bottom: 20px;
    position: relative;
    color: #001F5B;
    animation: fadeIn 1s ease forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.clientes h2::after {
    content: '';
    display: block;
    width: 0;
    height: 4px;
    background: linear-gradient(90deg, #001F5B, #4286c0);
    margin: 15px auto 0;
    border-radius: 2px;
    animation: underlineGrow 1s ease forwards;
}

@keyframes underlineGrow {
    0% {
        width: 0;
        opacity: 0;
    }
    80% {
        width: 100px;
        opacity: 1;
    }
    100% {
        width: 80px;
    }
}

/* Subtítulo */
.clientes p {
    font-size: 16px; 
    color: #333;
    margin-bottom: 40px; 
    max-width: 500px; 
    margin-left: auto;
    margin-right: auto;
}

/* ===== GRID DE LOGOS COMPACTO ===== */
.cliente-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    grid-template-rows: repeat(2, auto);
    gap: 25px 30px;
    place-items: center;
    max-width: 750px; 
    margin: 0 auto;
    padding: 15px 0; 
}

/* Los primeros 3 elementos ocupan la primera fila - cada uno 2 columnas */
.cliente-logo:nth-child(1) {
    grid-row: 1;
    grid-column: 1 / 3;
}

.cliente-logo:nth-child(2) {
    grid-row: 1;
    grid-column: 3 / 5;
}

.cliente-logo:nth-child(3) {
    grid-row: 1;
    grid-column: 5 / 7;
}

/* Los últimos 2 elementos se centran en la segunda fila */
.cliente-logo:nth-child(4) {
    grid-row: 2;
    grid-column: 2 / 4;
}

.cliente-logo:nth-child(5) {
    grid-row: 2;
    grid-column: 4 / 6;
}

/* ===== CONTENEDORES DE LOGOS COMPACTOS ===== */
.cliente-logo {
    background-color: #ffffff;
    padding: 20px 15px; 
    border-radius: 12px; 
    box-shadow: 0 6px 20px #FFFFFF; 
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100px; 
    width: 100%;
    max-width: 200px; 
    position: relative;
    overflow: hidden;
    border-top: 3px solid; 
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease forwards;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== IMÁGENES DE LOGOS OPTIMIZADAS PARA TAMAÑO PEQUEÑO ===== */
.cliente-logo img {
    width: 75%; 
    height: 70px; 
    object-fit: contain;
    transition: transform 0.3s ease;
}

/* ===== COLORES DE BORDE SUPERIOR ===== */
.cliente-logo:nth-child(1) { 
    border-top-color: #001F5B;
    animation-delay: 0.1s;
}
.cliente-logo:nth-child(2) { 
    border-top-color: #3B92D3;
    animation-delay: 0.2s;
}
.cliente-logo:nth-child(3) { 
    border-top-color: #800020;
    animation-delay: 0.3s;
}
.cliente-logo:nth-child(4) { 
    border-top-color: #3B92D3;
    animation-delay: 0.4s;
}
.cliente-logo:nth-child(5) { 
    border-top-color: #001F5B;
    animation-delay: 0.5s;
}

/* ===== EFECTOS HOVER ===== */
.cliente-logo:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 12px 35px rgba(0, 31, 91, 0.15); 
    background: linear-gradient(135deg, #ffffff 0%, #f8fbff 100%);
}

.cliente-logo:hover img {
    transform: scale(1.05);
}

/* Efecto decorativo */
.cliente-logo::before {
    content: '';
    position: absolute;
    top: -12px; 
    right: -12px; 
    width: 24px; 
    height: 24px; 
    background: radial-gradient(circle, rgba(59, 146, 211, 0.1) 0%, rgba(255, 255, 255, 0) 70%);
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.cliente-logo:hover::before {
    opacity: 1;
}

/* ===== RESPONSIVE DESIGN ===== */

/* Tablets */
@media (max-width: 1024px) {
    .cliente-grid {
        grid-template-columns: repeat(6, 1fr);
        gap: 20px 25px; 
        max-width: 600px; 
    }

    .cliente-logo:nth-child(1) { grid-column: 1 / 3; }
    .cliente-logo:nth-child(2) { grid-column: 3 / 5; }
    .cliente-logo:nth-child(3) { grid-column: 5 / 7; }
    .cliente-logo:nth-child(4) { grid-column: 2 / 4; }
    .cliente-logo:nth-child(5) { grid-column: 4 / 6; }

    .cliente-logo {
        max-width: 160px; 
        min-height: 90px; 
        padding: 18px 12px; 
    }

    .cliente-logo img {
        width: 70%;
        height: 60px;
    }
}

/* Móviles grandes */
@media (max-width: 768px) {
    .clientes {
        padding: 40px 15px; 
    }

    .clientes h2 {
        font-size: 32px; 
        margin-bottom: 15px;
    }

    .clientes p {
        font-size: 15px; 
        margin-bottom: 30px; 
        padding: 0 10px;
    }

    .cliente-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(3, auto);
        gap: 15px; 
        padding: 10px;
        max-width: 400px; 
    }

    .cliente-logo:nth-child(1),
    .cliente-logo:nth-child(2) {
        grid-row: 1;
        grid-column: auto;
    }

    .cliente-logo:nth-child(3),
    .cliente-logo:nth-child(4) {
        grid-row: 2;
        grid-column: auto;
    }

    .cliente-logo:nth-child(5) {
        grid-row: 3;
        grid-column: 1 / 3;
        justify-self: center;
    }

    .cliente-logo {
        max-width: none;
        width: 100%;
        min-height: 80px; 
        padding: 15px 12px; 
    }

    .cliente-logo img {
        width: 70%;
        height: 55px; 
    }
}

/* Móviles pequeños */
@media (max-width: 480px) {
    .clientes {
        padding: 30px 10px; 
    }

    .clientes h2 {
        font-size: 26px; 
    }

    .clientes p {
        font-size: 14px;
        margin-bottom: 25px; 
    }

    .cliente-grid {
        grid-template-columns: 1fr;
        grid-template-rows: repeat(5, auto);
        gap: 12px; 
        max-width: 100%;
    }

    .cliente-logo:nth-child(1),
    .cliente-logo:nth-child(2),
    .cliente-logo:nth-child(3),
    .cliente-logo:nth-child(4),
    .cliente-logo:nth-child(5) {
        grid-row: auto;
        grid-column: 1;
        justify-self: center;
    }

    .cliente-logo {
        min-height: 90px;
        padding: 20px 15px; 
        max-width: 220px; 
    }

    .cliente-logo img {
        width: 70%;
        height: 60px; 
    }
}

/* ===== OPTIMIZACIÓN PARA ACCESIBILIDAD ===== */
@media (prefers-reduced-motion: reduce) {
    .clientes h2,
    .cliente-logo {
        animation: none;
    }

    .cliente-logo {
        opacity: 1;
        transform: none;
    }

    .clientes h2::after {
        animation: none;
        width: 80px;
        opacity: 1;
    }
}

/* ===== MEJORAS PARA PRINT ===== */
@media print {
    .cliente-logo {
        box-shadow: none;
        border: 1px solid #ddd;
    }

    .cliente-logo:hover {
        transform: none;
    }
}

/* Sección Proyectos */
.proyectos {
    padding: 50px 10px;
    background-color: #001F5B;
}

.proyectos h2 {
    text-align: center;
    margin-bottom: 60px;
    color: #FFFFFF;
    font-weight: 700;
    font-size: 40px;
    letter-spacing: 1px;
    z-index: 2;
}

.proyectos > .container > p {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 40px;
    color: #FFFFFF;
    font-size: 30px;
}

/* Carrusel principal */
.carrusel-container {
    position: relative;
    max-width: 75%;
    margin: 0 auto;
    display: flex;
    align-items: center;
    padding: 0 0px;
    box-sizing: border-box;
}

/* Botones del carrusel */
.carrusel-btn {
    background-color: #3B92D3;
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
}

.carrusel-btn:hover {
    background-color: #FFFFFF;
    color: #001F5B;
}

.carrusel-btn.prev {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
}

.carrusel-btn.next {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
}

.carrusel-btn:first-child {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
}

.carrusel-btn:last-child {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
}

/* Slide */
.carrusel-wrapper {
    width: 100%;
    overflow: hidden;
    position: relative;
}

.carrusel-slide {
    display: none;
    transition: transform 0.5s ease;
    width: 100%;
}

.carrusel-slide.active {
    display: block;
}

.carrusel-slide > img {
    width: 100%;
    max-height: 600px;
    object-fit: contain;
    background-color: #071d4a;
}

/* Imagen con proporción */
.imagen-container {
    width: 100%;
    height: 0;
    padding-bottom: 56.25%;
    position: relative;
    background-color: #071d4a;
    display: flex;
    align-items: center;
    justify-content: center;
}

.imagen-container img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Tarjetas de proyecto */
.proyecto-card {
    background-color: #0A2A66;
    border-radius: 10px;
    overflow: hidden; 
    box-shadow: 0 5px 15px rgba(0, 31, 91, 0.4);
    margin: 10px;
    border: 1px solid #3B92D3;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    min-height: 400px; 
}

.proyecto-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(59, 146, 211, 0.35);
    border-color: #3B92D3;
}

.proyecto-imagen {
    width: 100%;
    flex: 1; 
    min-height: 250px; 
    background-color: #071d4a;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.proyecto-imagen img {
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.proyecto-card:hover .proyecto-imagen img {
    transform: scale(1.05);
}

.proyecto-info {
    padding: 20px;
    border-top: 3px solid #3B92D3;
    text-align: center;
    flex-shrink: 0; 
    background-color: #0A2A66; 
}

.proyecto-info h3 {
    margin: 0 0 10px;
    color: #FFFFFF;
    font-size: 1.2rem;
    font-weight: 600;
    line-height: 1.3;
}

.proyecto-info p {
    color: #CCCCCC;
    margin: 0;
    line-height: 1.5;
    font-size: 0.9rem;
}

/* Indicadores del carrusel */
.carrusel-indicadores {
    display: flex;
    justify-content: center;
    margin-top: 30px;
}

.indicador {
    width: 10px;
    height: 10px;
    background-color: #CCCCCC;
    border-radius: 50%;
    margin: 0 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid #888888;
}

.indicador.activo {
    background-color: #3B92D3;
    border-color: #FFFFFF;
    transform: scale(1.2);
}

/* CTA botón */
.proyectos-cta {
    text-align: center;
    margin: 40px 0 50px;
}

.proyectos-cta .btn {
    display: inline-block;
    padding: 14px 35px;
    background: linear-gradient(90deg, #001F5B, #3B92D3);
    color: white;
    font-weight: 600;
    border-radius: 30px;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px rgba(0, 31, 91, 0.3);
}

.proyectos-cta .btn:hover {
    background: linear-gradient(90deg, #800020, #a52a2a);
    transform: translateY(-3px);
    box-shadow: 0 12px 25px rgba(128, 0, 32, 0.3);
}

/* MEDIA QUERIES */

/* Tablets y móviles medianos */
@media (max-width: 768px) {
    .proyectos {
        padding: 30px 10px; 
    }

    .proyectos h2 {
        font-size: 28px;
        margin-bottom: 40px;
    }

    .proyectos > .container > p {
        font-size: 20px;
        margin-bottom: 30px; 
    }

    .proyecto-card {
        min-height: 350px;
        margin: 8px; 
    }

    .proyecto-imagen {
        min-height: 200px; 
    }

    .proyecto-info {
        padding: 15px; 
    }

    .proyecto-info h3 {
        font-size: 1.1rem;
        margin-bottom: 8px;
    }

    .proyecto-info p {
        font-size: 0.85rem;
    }

    .carrusel-btn {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }

    .carrusel-container {
        max-width: 90%;
    }
}

/* Móviles pequeños */
@media (max-width: 480px) {
    .proyectos {
        padding: 20px 5px; 
    }

    .proyectos h2 {
        font-size: 22px;
        margin-bottom: 30px;
    }

    .proyectos > .container > p {
        font-size: 18px;
        margin-bottom: 25px;
        padding: 0 10px;
    }

    .proyecto-card {
        min-height: 320px; 
        margin: 5px; 
    }

    .proyecto-imagen {
        min-height: 180px; 
    }

    .proyecto-info {
        padding: 12px; 
    }

    .proyecto-info h3 {
        font-size: 1rem;
        margin-bottom: 6px;
        line-height: 1.2;
    }

    .proyecto-info p {
        font-size: 0.8rem;
        line-height: 1.4;
    }

    .carrusel-btn {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }

    .carrusel-container {
        max-width: 95%;
    }

    .carrusel-indicadores {
        margin-top: 20px; 
    }

    .proyectos-cta {
        margin: 30px 0 40px;
    }

    .proyectos-cta .btn {
        padding: 12px 25px;
        font-size: 0.9rem;
    }
}

/* Extra pequeños (menos de 360px) */
@media (max-width: 360px) {
    .proyecto-card {
        min-height: 300px;
    }

    .proyecto-imagen {
        min-height: 160px;
    }

    .proyecto-info {
        padding: 10px;
    }

    .proyecto-info h3 {
        font-size: 0.95rem;
    }

    .proyecto-info p {
        font-size: 0.75rem;
    }
}

/* Blog */
/*.blog {
    padding: 50px 20px;
    background: #FFFFFF; /* Fondo blanco para contrastar con la sección anterior */
    /*text-align: center;/*
}/*

/* Título principal de la sección Blog */
/*.blog h2 {
    text-align: center;
    font-size: 50px;
    margin-bottom: 60px;
    color: #001F5B; /* Azul marino oscuro */
    /*position: relative;
    font-weight: 700;
    letter-spacing: 1px;
}*/

/* Línea decorativa debajo del título */
/*.blog h2:after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #3B92D3, #001F5B); /* Azul claro a azul marino */
    /*margin: 15px auto 0;*/
    /*border-radius: 2px;*/
/*}*/

/* Contenedor de los posts */
/*.blog-posts {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}*/

/* Estilo de cada post */
/*.post {
    background: #FFFFFF;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
    width: calc(33.333% - 40px);
    max-width: 400px;
    transition: transform 0.3s ease, box-shadow 0.3s ease-in-out;
    position: relative;
    overflow: hidden;
}

.post:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.3);
    border-left: 3px solid #3B92D3;
}*/

/* Título del post */
/*.post h3 {
    font-size: 1.8rem;
    color: #800020; /* Burdeos */
    /*margin-bottom: 15px;
    font-weight: bold;
    letter-spacing: 1px;
    transition: color 0.3s ease;
}*/

/* Fecha del post */
/*.post .date {
    font-size: 1rem;
    color: #3B92D3; /* Azul claro */
    /*margin-bottom: 20px;
}*/

/* Extracto del post */
/*.post p {
    font-size: 1rem;
    color: #001F5B; /* Azul marino oscuro */
    /*line-height: 1.5;
    margin-bottom: 20px;
    text-align: left;
}*/

/* Botón para ver más */
/*.post .btn-read-more {
    padding: 10px 20px;
    background-color: #800020; /* Burdeos */
    /*color: white;
    text-decoration: none;
    border-radius: 30px;
    font-weight: bold;
    transition: background-color 0.3s ease;
}*/

/*.post .btn-read-more:hover {
    background-color: #3B92D3; /* Azul claro en hover */
/*}*/

/* ===== MEDIA QUERIES RESPONSIVE ===== */

/* Tablets y pantallas medianas (menos de 992px) */
/*@media (max-width: 992px) {
    .post {
        width: calc(50% - 30px);
        max-width: none;
    }
}*/

/* Móviles pequeños (menos de 600px) */
/*@media (max-width: 600px) {
    .blog h2 {
        font-size: 32px;
        margin-bottom: 40px;
    }
    .post {
        width: 100%;
        max-width: none;
        margin-bottom: 20px;
    }
    .post p {
        text-align: justify; /* Mejor lectura en móvil */
    /*}
}*/

/* Sección FAQ con colores renovados */
.faq {
    padding: 80px 0;
    background-color: #f0f5fb; 
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* Elementos decorativos para hacerlo más dinámico */
.faq::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(59, 146, 211, 0.1) 0%, rgba(59, 146, 211, 0) 70%);
    border-radius: 50%;
    z-index: 1;
}

.faq::after {
    content: '';
    position: absolute;
    bottom: -50px;
    left: -50px;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(128, 0, 32, 0.07) 0%, rgba(128, 0, 32, 0) 70%);
    border-radius: 50%;
    z-index: 1;
}

.faq h2 {
    text-align: center;
    font-size: 50px;
    margin-bottom: 60px;
    color: #001F5B; 
    position: relative;
    font-weight: 700;
    letter-spacing: 1px;
    z-index: 2;
}

.faq h2::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #001F5B, #800020); 
    margin: 15px auto 0;
    border-radius: 2px;
}

/* Estilo para los ítems de FAQ */
.faq-item {
    background: #ffffff;
    padding: 25px 30px;
    margin: 18px auto;
    border-radius: 10px; 
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    max-width: 800px;
    cursor: pointer;
    border-left: 4px solid #800020; 
    position: relative;
    /*z-index: 2;*/
}

/* Efecto de hover sobre los ítems de FAQ */
.faq-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0, 31, 91, 0.15);
    background-color: #fffcfc; 
}

/* Título de la pregunta */
.faq-item h3 {
    font-size: 1.4rem;
    color: #001F5B; 
    font-weight: 600;
    margin-bottom: 12px;
    text-align: left;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Respuesta a la pregunta */
.faq-item p {
    font-size: 1.05rem;
    color: #333333; 
    line-height: 1.7;
    display: none;
    text-align: left;
    margin-top: 15px;
    border-top: 1px solid #e9ecef;
    padding-top: 15px;
}

/* Activar la visibilidad de las respuestas al hacer clic */
.faq-item.active {
    background-color: #ffffff;
    border-left: 4px solid #3B92D3;
    box-shadow: 0 10px 30px rgba(59, 146, 211, 0.15);
}

.faq-item.active p {
    display: block;
}

/* Agregar icono de flecha en la pregunta */
.faq-item h3::after {
    content: "+";
    font-size: 1.6rem;
    color: #800020; 
    transition: all 0.3s ease;
    font-weight: 300;
}

/* Cambiar la flecha cuando la pregunta esté activa */
.faq-item.active h3::after {
    content: "−";
    color: #3B92D3; 
}

/* Efecto especial para términos destacados en las respuestas */
.faq-item p strong {
    color: #800020; 
    font-weight: 600;
}

/* Efectos alternados para más dinamismo */
.faq-item:nth-child(odd) {
    border-left-color: #3B92D3; 
}

.faq-item:nth-child(odd) h3::after {
    color: #3B92D3; 
}

.faq-item:nth-child(odd).active {
    border-left-color: #800020; 
}

.faq-item:nth-child(odd).active h3::after {
    color: #800020; 
}

/*/////////////////////////////////////////////////////*/
/* ================= SECCIÓN CERTIFICACIONES ================= */
.partners {
    padding: 80px 20px;
    text-align: center;
    background: #ffffff;
    position: relative;
    overflow: hidden;
    color: #001F5B;
    width: 100%;
    box-sizing: border-box;
}

.partners::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 30% 20%, rgba(59, 146, 211, 0.05) 0%, transparent 25%),
        radial-gradient(circle at 70% 60%, rgba(59, 146, 211, 0.03) 0%, transparent 20%);
    z-index: 1;
    pointer-events: none;
}

.partners h2 {
    font-size: clamp(28px, 5vw, 50px);
    margin-bottom: clamp(30px, 6vw, 50px);
    color: #001F5B;
    position: relative;
    font-weight: 700;
    letter-spacing: 1px;
    z-index: 2;
    line-height: 1.2;
    padding: 0 15px;
}

.partners h2::after {
    content: '';
    display: block;
    width: clamp(50px, 10vw, 80px);
    height: 4px;
    background: linear-gradient(90deg, #800020, #FF5B7F);
    margin: 15px auto 0;
    border-radius: 2px;
    box-shadow: 0 2px 10px rgba(128, 0, 32, 0.4);
}

.partner-logos {
    width: 100%;
    display: flex;
    justify-content: center;
    padding: 20px 0;
    box-sizing: border-box;
    overflow-x: hidden;
}

/* ================= LAYOUT PRINCIPAL 3+1 ================= */
.logo-container.three-top-one-center {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: auto auto;
    gap: 40px 50px;
    max-width: 1000px;
    margin: 0 auto;
    width: 100%;
    padding: 0 20px;
    box-sizing: border-box;
    place-items: center;
    justify-items: center;
}

/* Posicionamiento de los logos en escritorio */
.logo-container.three-top-one-center img:nth-child(1) {
    grid-column: 1;
    grid-row: 1;
}
.logo-container.three-top-one-center img:nth-child(2) {
    grid-column: 2;
    grid-row: 1;
}
.logo-container.three-top-one-center img:nth-child(3) {
    grid-column: 3;
    grid-row: 1;
}
.logo-container.three-top-one-center img:nth-child(4) {
    grid-column: 2;
    grid-row: 2;
    justify-self: center;
    align-self: center;
}

/* ================= ESTILO DE LOS LOGOS ================= */
.logo-container img {
    width: 100%;
    max-width: 250px;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: contain;
    border-radius: 12px;
    background-color: rgba(255, 255, 255, 0.95);
    padding: 20px;
    box-shadow:
        0 8px 25px rgba(0, 0, 0, 0.12),
        0 0 0 1px rgba(255, 255, 255, 0.1),
        inset 0 0 0 1px rgba(255, 255, 255, 0.2);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform;
}

.logo-container img:hover {
    transform: translateY(-8px) scale(1.05);
    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.2),
        0 0 0 2px rgba(59, 146, 211, 0.5),
        0 0 30px rgba(59, 146, 211, 0.3);
    background-color: #FFFFFF;
}

/* ================= RESPONSIVE BREAKPOINTS ================= */

/* Tablets (2+2 layout) */
@media screen and (max-width: 768px) {
    .logo-container.three-top-one-center {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(2, auto);
        gap: 30px;
        max-width: 600px;
    }

    .logo-container.three-top-one-center img:nth-child(1) { grid-column: 1; grid-row: 1; }
    .logo-container.three-top-one-center img:nth-child(2) { grid-column: 2; grid-row: 1; }
    .logo-container.three-top-one-center img:nth-child(3) { grid-column: 1; grid-row: 2; }
    .logo-container.three-top-one-center img:nth-child(4) { grid-column: 2; grid-row: 2; }
}

/* Móviles (una sola columna) */
@media screen and (max-width: 480px) {
    .logo-container.three-top-one-center {
        grid-template-columns: 1fr;
        grid-template-rows: repeat(4, auto);
        gap: 20px;
        max-width: 300px;
        padding: 0 10px;
    }

    .logo-container img {
        max-width: 200px;
        padding: 12px;
        margin: 0 auto;
    }
}

/* Modo paisaje en móviles */
@media screen and (max-height: 500px) and (orientation: landscape) {
    .logo-container.three-top-one-center {
        grid-template-columns: repeat(4, 1fr);
        grid-template-rows: 1fr;
        gap: 15px 20px;
    }

    .logo-container img {
        max-width: 120px;
        padding: 8px;
    }
}

/* Accesibilidad: reduce animaciones */
@media (prefers-reduced-motion: reduce) {
    .logo-container img {
        transition: none;
    }

    .logo-container img:hover {
        transform: none;
        box-shadow:
            0 8px 25px rgba(0, 0, 0, 0.2),
            0 0 0 2px rgba(59, 146, 211, 0.5);
    }
}

/* Touch devices: sin hover */
@media (hover: none) and (pointer: coarse) {
    .logo-container img:hover {
        transform: none;
        box-shadow:
            0 8px 25px rgba(0, 0, 0, 0.12),
            0 0 0 1px rgba(255, 255, 255, 0.1),
            inset 0 0 0 1px rgba(255, 255, 255, 0.2);
    }

    .logo-container img:active {
        transform: scale(0.98);
    }
}

/* ========================================
   RESPONSIVE DESIGN
======================================== */

/* Tablets */
@media (max-width: 768px) {
    .presentation-header h1 {
        font-size: 2rem;
    }

    .presentation-header p {
        font-size: 1.1rem;
    }

    .intro-content h2 {
        font-size: 2rem;
    }

    .stats-row {
        gap: 20px;
    }

    .stat-item {
        min-width: 150px;
        padding: 20px 15px;
    }

    .stat-number {
        font-size: 2.2rem;
    }

    .presentation-wrapper {
        padding: 20px;
    }

    .presentation-title h2 {
        font-size: 2rem;
    }

    .cta-content h2 {
        font-size: 2rem;
    }

    .presentation-info {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* Móviles */
@media (max-width: 480px) {
    .presentation-header {
        padding: 40px 0;
    }

    .presentation-header h1 {
        font-size: 1.8rem;
    }

    .intro-section, 
    .presentation-section {
        padding: 40px 0;
    }

    .presentation-wrapper {
        padding: 15px;
    }

    .intro-content h2 {
        font-size: 1.8rem;
    }

    .presentation-title h2 {
        font-size: 1.8rem;
    }

    .cta-content h2 {
        font-size: 1.8rem;
    }

    .stat-item {
        min-width: 130px;
        padding: 15px 10px;
    }

    .stat-number {
        font-size: 2rem;
    }

    .info-card {
        padding: 20px;
    }

    .cta-button {
        padding: 12px 30px;
        font-size: 1rem;
    }
}

/* Estilos para el nuevo CTA global */
#cta-global {
    padding: 60px 0;
    background: linear-gradient(135deg, #f0f4f8 0%, #dce6f0 100%);
}
.clientes-cta {
    margin-top: 60px;
    padding: 50px 35px;
    background: linear-gradient(45deg, #8e181a, #8e181a);
    border-radius: 18px;
    box-shadow: 0 15px 40px rgba(0, 31, 91, 0.1);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
    color: white;
}

.clientes-cta h3 {
    font-size: 32px;
    font-weight: bold;
    margin-bottom: 20px;
}
  
.clientes-cta p {
    font-size: 18px;
    color: #ffffff;
}

.btn-clientes {
    display: inline-block;
    padding: 14px 35px;
    background: linear-gradient(90deg, #001F5B, #3B92D3);
    color: white;
    font-weight: 600;
    border-radius: 30px;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px rgba(0, 31, 91, 0.2);
    margin-top: 20px;
}

.btn-clientes:hover {
    background: linear-gradient(90deg, #001F5B, #3B92D3);
    transform: translateY(-3px);
    box-shadow: 0 12px 25px rgba(128, 0, 32, 0.3);
}

/* Responsive */
@media (max-width: 990px) {
    h2 {
        font-size: 40px;
    }
    
    .logo-container img {
        width: 160px;
        height: 90px;
        margin: 0 15px;
        padding: 12px;
    }
    
    .cliente-logo {
        width: 180px;
        height: 100px;
    }
    
    .carrusel-container {
        padding: 0 10px;
    }
}

@media (max-width: 768px) {
    /* Estilos generales para responsive */
    h2 {
        font-size: 36px;
    }
    
    .separador {
        margin: 30px auto;
    }
    
    /* Clientes responsive */
    .clientes h2, .partners h2 {
        font-size: 36px;
    }
    
    .clientes p,
    .clientes-cta p {
        font-size: 16px;
    }
    
    .cliente-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 20px;
    }
    
    .cliente-logo {
        width: 100%;
        max-width: 160px;
        height: auto;
    }
    
    .clientes-cta {
        padding: 30px 20px;
    }
    
    .clientes-cta h3 {
        font-size: 22px;
    }
    
    /* Proyectos responsive */
    .carrusel-container {
        flex-direction: column;
    }
    
    .carrusel-btn {
        margin: 10px 0;
    }
    
    .proyecto-imagen {
        height: 200px;
    }
    
    /* Blog responsive */
    .post {
        width: 90%;
    }
    
    /* FAQ responsive */
    .faq {
        padding: 60px 0;
    }
    
    .faq h2 {
        font-size: 32px;
    }
    
    .faq-item {
        padding: 20px;
        max-width: 100%;
    }
    
    .faq-item h3 {
        font-size: 1.2rem;
    }
    
    .faq-item p {
        font-size: 1rem;
    }
    
    /* Partners responsive */
    .logo-container img {
        width: 130px;
        height: 73px;
        margin: 0 12px;
        padding: 10px;
    }
}

@media (max-width: 480px) {
    h2 {
        font-size: 32px;
    }
    
    .clientes-cta h3, .partners h2 {
        font-size: 28px;
    }
    
    .cliente-logo {
        max-width: 120px;
    }
    
    .logo-container img {
        width: 100px;
        height: 56px;
        margin: 0 8px;
        padding: 8px;
    }
    
    .post h3 {
        font-size: 1.5rem;
    }
}


/* Estilos para el Footer */

* {
      margin: 0;
      padding: 0;
      box-sizing: border-box;
    }

.footer {
    background-color: #001d47;
    color: white;
    padding: 40px 0 20px;
    text-align: left;
    box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.2);
}

.footer .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 40px;
    margin-bottom: 30px;
}

.footer-column {
    flex: 1 1 22%;
    min-width: 180px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding-right: 20px;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-column:last-child {
    border-right: none;
    padding-right: 0;
}

.footer-info h3,
.footer h4 {
    color: #4286c0;
    margin-bottom: 15px;
    font-size: clamp(16px, 3vw, 18px);
}

.footer-info p {
    font-size: clamp(13px, 2.5vw, 14px);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    line-height: 1.5;
}

.footer-info p i, 
.footer-info p a i {
    margin-right: 8px;
    color: #4286c0;
    width: 16px;
    text-align: center;
    flex-shrink: 0;
}

.footer-links ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links ul li {
    margin-bottom: 10px;
}

.footer a {
    color: white;
    text-decoration: none;
    transition: color 0.3s ease;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
}

.footer a:hover {
    color: #8e181a;
}

.social-icons {
    display: flex;
    gap: 15px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.social-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(59, 146, 211, 0.2);
    color: white;
    transition: all 0.3s ease;
    min-height: 44px;
    min-width: 44px;
}

.social-icons a:hover {
    color: white;
    background-color: #8e181a;
    transform: translateY(-3px);
}

.footer-logo {
    flex: 1 1 22%;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 150px;
    max-width: 200px;
}

.footer-logo img {
    width: 150px;
    height: auto;
    filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.2));
    max-width: 100%;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
    text-align: center;
    font-size: clamp(12px, 2vw, 13px);
}

.trademark-notice {
    font-size: clamp(11px, 1.8vw, 12px);
    color: rgba(255, 255, 255, 0.7);
    margin-top: 5px;
}

/* Responsivo */

/* Tablets grandes y laptops pequeñas */
@media (max-width: 1024px) {
    .footer-content {
        gap: 30px;
    }
    
    .footer-column {
        flex: 1 1 45%;
        min-width: 200px;
    }
    
    .footer-logo {
        flex: 1 1 100%;
        order: -1;
        margin-bottom: 20px;
        justify-content: center;
    }
}

/* Tablets */
@media (max-width: 900px) {
    .footer-content {
        gap: 25px;
    }
    
    .footer-column {
        min-width: 180px;
        flex: 1 1 40%;
    }
}

/* Tablets pequeñas y móviles grandes */
@media (max-width: 768px) {
    .footer {
        padding: 35px 0 18px;
    }
    
    .footer .container {
        padding: 0 18px;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 30px;
    }
    
    .footer-column {
        width: 100%;
        max-width: none;
        border-right: none;
        padding-right: 0;
        flex: none;
    }
    
    .footer-logo {
        order: -1;
        margin-bottom: 25px;
        justify-content: flex-start;
        max-width: none;
    }
    
    .footer-logo img {
        width: 130px;
    }
    
    .social-icons {
        justify-content: flex-start;
        gap: 12px;
    }
}

/* Móviles */
@media (max-width: 480px) {
    .footer {
        padding: 30px 0 15px;
    }
    
    .footer .container {
        padding: 0 16px;
    }
    
    .footer-content {
        gap: 25px;
    }
    
    .social-icons {
        justify-content: center;
        gap: 10px;
    }
    
    .social-icons a {
        width: 38px;
        height: 38px;
        min-width: 38px;
        min-height: 38px;
    }
    
    .footer-logo {
        justify-content: center;
    }
    
    .footer-logo img {
        width: 120px;
    }
}

/* Móviles muy pequeños */
@media (max-width: 360px) {
    .footer {
        padding: 25px 0 12px;
    }
    
    .footer .container {
        padding: 0 15px;
    }
    
    .footer-content {
        gap: 20px;
    }
    
    .social-icons a {
        width: 36px;
        height: 36px;
        min-width: 36px;
        min-height: 36px;
    }
    
    .footer-logo img {
        width: 110px;
    }
    
    .footer-info p i, 
    .footer-info p a i {
        width: 14px;
        margin-right: 6px;
    }
}

/* Móviles extra pequeños (iPhone SE, etc.) */
@media (max-width: 320px) {
    .footer {
        padding: 20px 0 10px;
    }
    
    .footer .container {
        padding: 0 12px;
    }
    
    .footer-content {
        gap: 18px;
    }
    
    .social-icons {
        gap: 8px;
    }
    
    .social-icons a {
        width: 34px;
        height: 34px;
        min-width: 34px;
        min-height: 34px;
    }
    
    .footer-logo img {
        width: 100px;
    }
    
    .footer-info h3,
    .footer h4 {
        margin-bottom: 12px;
    }
    
    .footer-info p {
        margin-bottom: 8px;
    }
}

/* Orientación horizontal en móviles */
@media (max-height: 500px) and (orientation: landscape) {
    .footer {
        padding: 20px 0 10px;
    }
    
    .footer-content {
        gap: 20px;
    }
    
    .footer-logo {
        margin-bottom: 15px;
    }
    
    .footer-logo img {
        width: 100px;
    }
}

/* Mejoras para accesibilidad en pantallas táctiles */
@media (hover: none) and (pointer: coarse) {
    .footer a {
        min-height: 48px;
        padding: 8px 0;
    }
    
    .social-icons a {
        min-width: 48px;
        min-height: 48px;
        width: 48px;
        height: 48px;
    }
}

/* Soporte para dispositivos con alta densidad de píxeles */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .footer-logo img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Estilo para el botón de volver arriba */
.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #8e181a; 
    color: white;
    padding: 10px 15px;
    border: none;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3); 
    transition: all 0.3s ease;
    z-index: 1000;
}

/* Estilo cuando el usuario pasa el ratón sobre el botón */
.back-to-top:hover {
    background-color: #4286c0; 
    transform: scale(1.1); 
}

/* Estilo para el foco (accesibilidad) */
.back-to-top:focus {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

/* Efecto al hacer clic */
.back-to-top:active {
    transform: scale(0.95);
}

/* Estilo cuando el botón está visible */
.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

/* Responsividad para dispositivos pequeños */
@media (max-width: 768px) {
    .back-to-top {
        bottom: 15px;
        right: 15px;
        width: 50px;
        height: 50px;
        font-size: 20px;
        padding: 0;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .back-to-top.visible {
        display: flex;
        opacity: 1;
        visibility: visible;
    }
}

/* Estilos para el botón flotante de WhatsApp */
.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 40px;
    left: 40px; 
    background-color: #8e181a; 
    color: #FFF;
    border-radius: 50px;
    text-align: center;
    font-size: 30px;
    box-shadow: 2.5px 2.5px 2.5px rgba(0, 0, 0, 0.2); 
    z-index: 100;
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    transition: all 0.3s ease;
}

.whatsapp-float:hover {
    background-color: #4286c0; 
    transform: scale(1.1);
    text-decoration: none;
    color: #FFF;
}

.whatsapp-float:focus {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.fa-whatsapp {
    margin-top: 1px;
}

/* Tooltip informativo */
.whatsapp-float .tooltip-text {
    visibility: hidden;
    width: 120px;
    background-color: #001d47; 
    color: #fff; 
    text-align: center;
    border-radius: 6px;
    padding: 5px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -60px;
    opacity: 0;
    transition: all 0.3s ease;
    font-size: 14px;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.3);
    pointer-events: none;
}

.whatsapp-float .tooltip-text::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #001d47 transparent transparent transparent;
}

.whatsapp-float:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
    transform: translateY(-5px);
}

/* Responsividad para dispositivos móviles */
@media screen and (max-width: 767px) {
    .whatsapp-float {
        width: 50px;
        height: 50px;
        bottom: 90px; /* Posición ajustada para no chocar con botón "volver arriba" */
        left: 20px; 
        font-size: 25px;
    }
    
    .whatsapp-float .tooltip-text {
        width: 100px;
        margin-left: -50px;
        font-size: 12px;
    }
}

/* Animación de pulso opcional */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(142, 24, 26, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(142, 24, 26, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(142, 24, 26, 0);
    }
}

.whatsapp-float.pulse {
    animation: pulse 2s infinite;
}