﻿* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', sans-serif;
    color: #333;
    background-image: url("img/fondo.png");
    background-size: cover;
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-position: center;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

header {
    background-color: #003366;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.logo-header img {
    height: 67px;
    object-fit: contain;
    filter: drop-shadow(0 0 3px rgba(0, 0, 0, 0.5)); 
    background-color: #ffffff;
    padding: 4px; 
    border-radius: 6px; 
}

nav {
    background-color: #002147;
}

nav ul {
    display: flex;
    justify-content: center;
    list-style: none;
    flex-wrap: wrap;
}

nav li {
    margin: 0.5rem 1rem;
}

nav a {
    color: white;
    text-decoration: none;
    padding: 0.75rem 1rem;
    display: block;
    transition: background-color 0.3s;
}

    nav a:hover {
        background-color: #DAA520;
    }

main {
    padding: 2rem 1rem;
    max-width: 1200px;
    margin: auto;
    flex: 1;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 8px;
}

.destacado {
    background-color: #e6f0ff;
    padding: 2rem;
    border-left: 5px solid gold;
    margin-bottom: 2rem;
    border-radius: 5px;
}

.destacado.bienvenidos {
    background-color: #003366;
    padding: 1.5rem;
    border-left: 5px solid gold;
    margin-bottom: 2rem;
    color:white;
}

.tarjetas {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.tarjeta {
    background-color: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    border-top: 5px solid #003366;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s;
}

.tarjeta:hover {
    transform: translateY(-5px);
}

.tarjeta a {
    display: inline-block;
    margin-top: 1rem;
    color: #003366;
    font-weight: bold;
    text-decoration: none;
}

.tarjeta a:hover {
    color: gold;
}

.tarjeta p {
    text-align: justify;
}

.tarjeta::after {
    content: "";
    position: absolute;
    top: 0;
    left: -75%;
    width: 50%;
    height: 100%;
    background: linear-gradient(120deg, rgba(255, 215, 0, 0.0) 0%, rgba(255, 215, 0, 0.3) 50%, rgba(255, 215, 0, 0.0) 100%);
    transform: skewX(-20deg);
    z-index: 0;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.tarjeta:hover::after {
    animation: destelloDorado 0.8s ease-out forwards;
    opacity: 1;
}

@keyframes destelloDorado {
    0% {
        left: -75%;
        opacity: 0.3;
    }

    50% {
        opacity: 0.6;
    }

    100% {
        left: 125%;
        opacity: 0;
    }
}

footer {
    background-color: #003366;
    color: white;
    text-align: center;
    padding: 1rem 0;
}

.logo-central {
    background-color: white;
    width: 100%;
    padding: 3rem 0;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 0;
    margin-bottom: 2rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.logo-central img {
    max-width: 500px;
    width: 90%;
    height: auto;
    object-fit: contain;
}

.titulo-menu {
    color: white;
    font-size: 1rem;
    font-weight: 600;
    position: relative;
    padding-right: 1.5rem;
    line-height: 1.4;
    white-space: normal;
}

.barra-navegacion {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    background-color: #002147;
    padding: 0.5rem 1rem;
}

.menu-items {
    grid-column: 2 / 3;
    display: flex;
    justify-content: center;
}

.menu-items ul {
    display: flex;
    gap: 1.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.menu-items li a {
    position: relative;
    color: white;
    text-decoration: none;
    padding: 0.75rem 1.5rem;
    display: inline-block;
    transition: background-color 0.3s;
}

.menu-items li a:hover {
    background-color: #DAA520;
}

.menu-items li a::before,
.menu-items li a::after {
    display: none;
}

.carrusel-central {
    width: 100%;
    max-width: 1200px;
    aspect-ratio: 21/9;
    margin: 0 auto 2rem auto;
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.carrusel-central video, .carrusel-central img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease;
    cursor: pointer;
}

.slide.active {
    opacity: 1;
    z-index: 1;
}

.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    backdrop-filter: blur(3px);
    background-color: rgba(0, 0, 0, 0.4);
}

.modal.mostrar {
    display: flex;
}

.modal-contenido {
    background-color: #fff;
    margin: 5% auto;
    border-radius: 15px;
    width: 90%;
    #max-width: 90vh;
    max-width: 95vw;
    max-height: 90vh;
    overflow-y: auto;
    padding: 30px 40px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    animation: animarModal 0.4s;
    position: relative;
}

.modal-contenido::-webkit-scrollbar {
    width: 12px;
}

.modal-contenido::-webkit-scrollbar-track {
    background: #002147; /* Azul institucional fondo de la barra */
    border-radius: 10px;
}

.modal-contenido::-webkit-scrollbar-thumb {
    background-color: #DAA520; /* Amarillo institucional */
    border-radius: 10px;
    border: 3px solid #002147; /* Borde azul */
}

.modal-contenido::-webkit-scrollbar-thumb:hover {
    background-color: #ffcc33; /* Efecto más dorado al pasar el mouse */
}



@keyframes animarModal {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.cerrar {
    color: #aaa;
    position: absolute;
    top: 15px;
    right: 25px;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
}

.cerrar:hover {
    color: #000;
}

.modal-logo {
    max-width: 150px;
    display: block;
    margin: 0 auto 15px auto;
}

.modal-cuerpo p, .modal-cuerpo ul {
    text-align: justify;
    margin-bottom: 10px;
    line-height: 1.6;
    font-size: 1rem;
}

.modal-cuerpo h3 {
    margin-top: 20px;
    color: #003366;
    font-size: 1.3rem;
}

.modal-cuerpo h4 {
    margin-top: 15px;
    color: #004080;
    font-size: 1.1rem;
}

.modal-cuerpo ul {
    padding-left: 20px;
}

.titulo-estilo {
    background-color: #002b5c; /* azul marino */
    color: white !important; /* texto blanco forzado */
    padding: 12px 16px;
    font-weight: bold;
    font-size: 20px;
    border-left: 5px solid #ffd700; /* borde amarillo */
    border-radius: 6px;
    margin: 30px 0 20px 0;
    width: 100%;
    display: block;
}

/* Responsive */

@media (max-width: 768px) {
    .contenedor-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .menu-toggle {
        display: block;
    }

    nav ul {
        flex-direction: column;
        display: none;
        width: 100%;
    }

    nav.mostrar ul {
        display: flex;
    }

    nav ul li {
        width: 100%;
    }

    nav a {
        padding: 1rem;
        border-top: 1px solid #004080;
    }
}

@media (orientation: portrait) and (min-height: 800px) {
    body {
        justify-content: center;
    }

    main {
        margin-top: 2rem;
        margin-bottom: 2rem;
    }

    .contenedor-header h1 {
        text-align: center;
        width: 100%;
    }
}

/* Sección Nosotros */
.nosotros-descripcion {
    background-color: white;
    border-left: 5px solid #003366;
    color: #333;
}

.nosotros-descripcion h2 {
    font-size: 1.8rem;
    color: #003366;
    margin-bottom: 1rem;
}

.nosotros-descripcion p {
    font-size: 1.1rem;
    line-height: 1.6;
    text-align: justify;
}

.funciones-nosotros {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    justify-content: center;
    margin-top: 2rem;
}

.funcion-cuadro {
    background-color: #003366;
    color: white;
    padding: 2rem;
    border-radius: 10px;
    width: 100%;
    max-width: 560px;
    box-shadow: 0 0 10px rgba(0,0,0,0.2);
    text-align: justify;
    transition: transform 0.3s ease;
}

.funcion-cuadro:hover {
    transform: translateY(-5px);
    background-color: #002147;
}

.funcion-cuadro h3 {
    color: #DAA520;
    margin-bottom: 1rem;
    font-size: 1.4rem;
}




/* Estilos para el botón alineado a la derecha */
.modal-footer {
    text-align: right; /* Alinea el contenido a la derecha */
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.btn-cerrar {
    background-color: #dc3545;
    color: white;
    border: none;
    padding: 10px 25px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
    margin-left: auto; /* Empuja el botón a la derecha */
    display: block; /* O inline-block para que respete text-align */
}

.btn-cerrar:hover {
    background-color: #c82333;
}