/* ==========================================================
   1. CONFIGURACIÓN BASE Y RESET
   ========================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: linear-gradient(to bottom, #cfcfcf 0%, #93989b 20%, #2c3e50 60%, #1a1a2e 100%);
    color: #fff;
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ==========================================================
   2. HEADER (ENCABEZADO)
   ========================================================== */
.main-header {
    position: relative;
    padding: 20px 10px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    min-height: 150px;
}

.main-header::before {
    content: "";
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-size: cover;
    background-position: center;
    z-index: -1;
    filter: blur(2px);
    background-image: 
        radial-gradient(circle, rgba(255,255,255,0.2) 0%, rgba(0,0,0,0.5) 100%), 
        url('/recursos/fondo.jpeg');
    opacity: 0.7;
}

.rif {
    text-align: right;
    font-size: 0.85rem;
    color: #1a1a2e;
    font-weight: bold;
    margin-bottom: 10px;
    width: 100%;
}

.main-logo {
    max-width: 90%;
    height: auto;
    max-height: 180px;
    filter: drop-shadow(0px 0px 10px rgba(255, 255, 255, 0.6)) 
            drop-shadow(2px 4px 8px rgba(0, 0, 0, 0.5));
    transition: transform 0.3s ease, filter 0.3s ease;
}

.main-logo:hover {
    transform: scale(1.03);
}

/* ==========================================================
   3. NAVEGACIÓN (MENÚ PRINCIPAL Y SUBMENÚ)
   ========================================================== */
.main-nav ul {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    background: #2a2a72;
    border-top: 2px solid #1a1a2e;
    padding: 5px;
}

.main-nav li {
    flex: 1;
    min-width: 120px;
    position: relative; /* Clave para el submenú */
}

.main-nav a {
    display: block;
    padding: 15px;
    text-align: center;
    color: #ffffff;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.4s ease;
}

.main-nav a:hover, 
.main-nav a.active {
    background: #4a69bd; 
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    transform: translateY(-2px);
}

/* --- ESTILOS DEL SUBMENÚ (CORREGIDO) --- */
.main-nav ul .submenu {
    display: none;           /* Se oculta por defecto */
    flex-direction: column;  /* Fuerza la lista vertical */
    position: absolute;
    top: 100%;
    left: 0;
    background: #2a2a72;
    min-width: 200px;
    z-index: 1000;
    padding: 0;
    border-top: none;
    border-bottom: 3px solid #4a69bd;
    box-shadow: 0 8px 16px rgba(0,0,0,0.4);
}

.main-nav .submenu li {
    width: 100%;
    min-width: 100%;
}

.main-nav .submenu a {
    text-align: left;
    padding: 12px 20px;
    font-size: 0.9rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    border-radius: 10; /* Evita bordes redondeados en la lista */
}

.main-nav .submenu a:hover {
    transform: none; /* Evita el salto visual en el submenú */
    background: #4a69bd;
}

/* Mostrar submenú al pasar el mouse */
.main-nav li:hover > .submenu {
    display: flex;
}

/* ==========================================================
   4. SECCIÓN DE INFORMACIÓN (NUEVO)
   ========================================================== */
.container {
    max-width: 90%;
    margin: 40px auto;
    margin-bottom: 10px;
    padding: 0 20px;
}

.content-section {
    display: block; /* Importante para que el float funcione */
    overflow: hidden; 
    background: rgba(0, 0, 0, 0.06); /* Fondo sutil para legibilidad */
    padding: 20px;
    border-radius: 15px;
}

.info-image {
    float: left; /* Esto hace que el texto lo rodee */
    width: 50%;
    max-width: 850px;
    margin-right: 30px;
    margin-bottom: 15px;
    border-radius: 15px; /* Bordes redondeados */
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4); /* Sombra ligera */
    transition: transform 0.3s ease;
}

.info-text {
    text-align: justify;
    font-size: 1.55rem;
    color: #e0e0e0;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}
.info-text p{
    text-indent: 40px
}

.info-text h2 {
    margin-bottom: 10px;
    font-size: 200%;
    color: #ffffff;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}
.info-text h3 {
    margin-top: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    text-decoration-line: underline;
    text-decoration-thickness: 2px;    /* Grosor de la línea */
    text-underline-offset: 5px;       /* Separación del texto */
    text-decoration-color: #4a69bd
}

.info-text ul{
    margin-left: 50px;
}
/* Ajuste para móviles */
@media (max-width: 768px) {
    .info-image {
        float: none; /* Quitamos el float en pantallas pequeñas */
        width: 100%;
        max-width: 100%;
        margin-right: 0;
        margin-bottom: 25px;
    }
    
    .container {
        margin: 20px auto;
    }
    .info-text {
    text-align: justify;
    font-size: 1.25rem;
    color: #e0e0e0;
}
}

/* ==========================================================
   5. CATÁLOGO DE IMÁGENES (GALERÍA)
   ========================================================== */
.image-gallery {
    padding: 10px 0;
    background: rgba(26, 26, 46, 0.5); /* Fondo oscuro semitransparente */
}

.gallery-container {
    max-width: 90%;
    margin: 0 auto;
}

.gallery-title {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 30px;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.gallery-grid {
    display: grid;
    /* Crea columnas de máximo 400px que se ajustan solas */
    grid-template-columns: repeat(auto-fit, minmax(250px, 400px));
    gap: 20px;
    justify-content: center;
}

.gallery-item {
    aspect-ratio: 1 / 1; /* Fuerza la proporción 1:1 (cuadrada) */
    overflow: hidden;
    border-radius: 12px;
    border: 3px solid #4a69bd;
    box-shadow: 0 8px 15px rgba(0,0,0,0.3);
    transition: transform 0.3s ease;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Recorta la imagen para que llene el cuadrado sin deformarse */
    display: block;
    transition: filter 0.3s ease;
}

.gallery-item:hover {
    transform: scale(1.05);
    z-index: 10;
}

.gallery-item:hover img {
    filter: brightness(1.1);
}

/* Ajuste para móviles */
@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 15px;
    }
}

/* ==========================================================
   6. FOOTER (PIE DE PÁGINA)
   ========================================================== */
.main-footer {
    background-color: #333333;
    color: #ffffff;
    padding: 10px 20px;
    text-align: center;
    border-top: 3px solid #4a69bd;
    margin-top: 10px;
}

.footer-content p {
    margin: 5px 0;
    font-size: 0.95rem;
}

/* Responsive */
@media (max-width: 768px) {
    .contact-grid {
        flex-direction: column;
        padding: 20px;
    }
    .main-nav ul {
        flex-direction: column;
    }
}