/* CONFIGURACIÓN GENERAL */
body {
    font-family: 'Arial', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #eef2f3;
    color: #333;
}

/* ENCABEZADO */
header {
    background: linear-gradient(135deg, #003366, #005599);
    color: white;
    text-align: center;
    padding: 15px;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
}

/* LOGO Y TÍTULO */
.header-content {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap; /* Se adapta en pantallas pequeñas */
    gap: 10px;
}

.header-content img {
    width: 50px;
    height: auto;
}

.header-content h1 {
    margin: 0;
    font-size: 22px;
}

/* MENÚ DE NAVEGACIÓN */
nav {
    display: flex;
    justify-content: center;
    background: #005599;
    padding: 10px;
    flex-wrap: wrap;
}

nav ul {
    list-style: none;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

nav ul li a {
    background-color: #003366;
    color: white;
    text-decoration: none;
    font-size: 16px;
    padding: 10px 15px;
    border-radius: 6px;
    transition: 0.3s;
    display: inline-block;
}

nav ul li a:hover {
    background-color: #ff6600;
}

/* CONTENIDO PRINCIPAL */
main {
    width: 90%;
    max-width: 800px;
    margin: 20px auto;
    padding: 15px;
    background: white;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    text-align: center;
}

/* TABLAS */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    overflow-x: auto; /* Permite desplazamiento en móviles */
}

table, th, td {
    border: 1px solid #ddd;
    padding: 10px;
    text-align: center;
}

th {
    background: #005599;
    color: white;
}

td a {
    color: #003366;
    text-decoration: none;
    font-weight: bold;
}

td a:hover {
    color: #ff6600;
}

/* LISTAS */
ul {
    list-style-type: none;
    padding: 0;
}

ul li {
    background: #f8f9fa;
    padding: 12px;
    margin: 8px 0;
    border-left: 5px solid #005599;
    border-radius: 5px;
    text-align: left;
}

/* PIE DE PÁGINA */
footer {
    text-align: center;
    padding: 15px;
    background: #003366;
    color: white;
    margin-top: 20px;
}

/* BOTÓN DE WHATSAPP */
.whatsapp-button {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #25d366;
    color: white;
    padding: 12px 20px;
    font-size: 16px;
    font-weight: bold;
    text-decoration: none;
    border-radius: 5px;
    transition: background 0.3s ease-in-out;
    width: 250px;
}

.whatsapp-button:hover {
    background-color: #1ebe57;
}

.whatsapp-container {
    display: flex;
    justify-content: center;
    margin-top: 10px;
}

/* FORMULARIO DE CONTACTO */
.contact-form {
    max-width: 450px;
    margin: 20px auto;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.contact-form input, 
.contact-form textarea {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.contact-form textarea {
    height: 100px;
    resize: none;
}

.contact-form button {
    width: 100%;
    padding: 10px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
}

.contact-form button:hover {
    background: #0056b3;
}

/* SECCIÓN REDES SOCIALES */
.social-media {
    text-align: center;
    margin: 20px 0;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.social-links a {
    font-size: 20px;
    color: white;
    background-color: #005599;
    padding: 12px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease-in-out, transform 0.3s ease-in-out;
    width: 45px;
    height: 45px;
    text-decoration: none;
}

.social-links a:hover {
    background-color: #ff6600;
    transform: scale(1.1);
}

/* IMÁGENES */
.noticia-img {
    width: 100%;
    max-width: 280px;
    height: auto;
    object-fit: cover;
    display: block;
    margin: 0 auto;
    border-radius: 8px;
}

/* SITIOS DE INTERÉS */
.sitios-interes {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.sitios-interes img {
    width: 80px;
    height: auto;
    border-radius: 6px;
    box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.2);
}

/* MEDIA QUERIES PARA MÓVILES Y TABLETS */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        text-align: center;
    }

    nav ul {
        flex-direction: column;
        align-items: center;
    }

    .sitios-interes {
        flex-direction: column;
        align-items: center;
    }

    .noticia-img {
        max-width: 250px;
    }
}

@media (max-width: 480px) {
    .header-content h1 {
        font-size: 18px;
    }

    .whatsapp-button {
        width: 90%;
    }

    .noticia-img {
        max-width: 220px;
    }

    .contact-form {
        max-width: 90%;
    }
}

/* MODAL CARRUSEL */
/* MODAL CARRUSEL CORREGIDO */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.75);
    justify-content: center;
    align-items: center;
    padding: 20px; /* deja espacio alrededor */
}

.modal-content {
    background-color: #fff;
    margin: auto;
    padding: 15px;
    border-radius: 12px;
    width: 80%;
    max-width: 600px;  /* 🔹 antes era 800px */
    max-height: 80vh;  /* 🔹 evita que cubra toda la pantalla */
    overflow: hidden;
    text-align: center;
    position: relative;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

/* El contenedor del carrusel se adapta sin distorsionar */
.carousel-container {
    width: 100%;
    aspect-ratio: 16 / 9;  /* 🔹 formato más panorámico */
    max-height: 60vh;      /* 🔹 evita ocupar toda la altura */
    background-color: #000;
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

/* Imagen adaptada correctamente al contenedor sin recorte */
#carousel-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

/* BOTONES DEL CARRUSEL MODERNOS */
.carousel-controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 15px;
}

.carousel-controls button {
    background-color: #005599;
    border: none;
    color: white;
    padding: 12px 16px;
    font-size: 18px;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    box-shadow: 0px 3px 6px rgba(0,0,0,0.2);
}

.carousel-controls button:hover {
    background-color: #003366;
    transform: scale(1.05);
}

.close-btn {
    position: absolute;
    top: 12px;
    right: 18px;
    font-size: 28px;
    color: #333;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close-btn:hover {
    color: #ff6600;
}

/* 🔥 Enlace destacado Rifa Pro Fondos */
.rifa-link {
    background: linear-gradient(135deg, #ffcc00, #ff9900);
    color: #003366 !important;
    font-weight: bold;
    padding: 8px 16px;
    border-radius: 8px;
    text-transform: uppercase;
    box-shadow: 0 4px 8px rgba(0,0,0,0.25);
    transition: transform 0.2s ease, background 0.3s ease;
}

.rifa-link:hover {
    background: linear-gradient(135deg, #ffdb4d, #ffb84d);
    transform: scale(1.08);
    color: #001f3f !important;
}

.rifa-link i {
    color: #003366;
    margin: 0 4px;
}

/* ===== Ficha de inscripción ===== */
        /* Estilos propios de la ficha de inscripción,
   reutilizando la paleta de colores del sitio */
.ficha-form {
    max-width: 700px;
    margin: 20px auto;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    text-align: left;
}

.ficha-form fieldset {
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-bottom: 20px;
    padding: 15px 20px 20px;
}

.ficha-form legend {
    font-weight: bold;
    color: #003366;
    padding: 0 8px;
}

.form-grupo {
    margin-bottom: 14px;
}

.form-grupo label {
    display: block;
    font-weight: bold;
    color: #003366;
    margin-bottom: 5px;
}

.form-grupo input[type="text"],
.form-grupo input[type="date"],
.form-grupo input[type="email"],
.form-grupo input[type="tel"],
.form-grupo input[type="file"],
.form-grupo textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-sizing: border-box;
    font-family: inherit;
    font-size: 15px;
}

.form-grupo textarea {
    height: 90px;
    resize: vertical;
}

.form-grupo small {
    display: block;
    color: #777;
    margin-top: 4px;
}

.form-fila {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.form-fila .form-grupo {
    flex: 1;
    min-width: 200px;
}

.radio-opciones {
    display: flex;
    gap: 20px;
    align-items: center;
}

.radio-opciones label {
    font-weight: normal;
    display: flex;
    align-items: center;
    gap: 6px;
    color: #333;
}

.ficha-form button[type="submit"] {
    width: 100%;
    padding: 12px;
    background: #005599;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 17px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s ease-in-out;
}

.ficha-form button[type="submit"]:hover {
    background: #003366;
}

.mensaje-exito {
    background: #e6f7ec;
    border: 1px solid #25d366;
    color: #1c6b3a;
    padding: 14px;
    border-radius: 6px;
    margin: 15px auto;
    max-width: 700px;
    text-align: center;
    font-weight: bold;
}

.mensaje-error {
    background: #fdeaea;
    border: 1px solid #e74c3c;
    color: #b32d1e;
    padding: 14px;
    border-radius: 6px;
    margin: 15px auto;
    max-width: 700px;
}

.mensaje-error ul {
    margin: 0;
    padding-left: 18px;
    list-style: disc;
    text-align: left;
}

.mensaje-error li {
    background: none;
    border: none;
    padding: 2px 0;
    margin: 0;
}
    


/* ===================================================================
   AÑADIDOS (reemplazan estilos que estaban "inline" en el HTML)
   =================================================================== */

/* Accesibilidad */
.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    background: #fff;
    color: #003366;
    padding: 8px 14px;
    z-index: 10000;
}
.skip-link:focus { left: 8px; top: 8px; }

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 3px solid #ff6600;
    outline-offset: 2px;
}

nav ul li a[aria-current="page"] { background-color: #ff6600; }

/* Título con RUC (inicio) */
.header-content h1 .ruc { display: inline-block; margin-top: 6px; font-size: 16px; font-weight: normal; }

/* Tablas con desplazamiento horizontal en móviles (antes: style="**...**", que nunca se aplicaba) */
.table-wrap { overflow-x: auto; width: 100%; }
.logo-small { max-width: 100px; width: 100%; height: auto; }

/* Pie */
.footer-link { color: #fff; text-decoration: underline; }

/* Mapa */
.map-container iframe { width: 100%; height: 300px; border: 0; }

/* Mensajes de formularios (contacto e inscripción) */
.mensaje-exito, .mensaje-error {
    max-width: 700px;
    margin: 15px auto;
    padding: 14px;
    border-radius: 6px;
}
.contact-form .mensaje-exito, .contact-form .mensaje-error { max-width: 450px; padding: 10px; }
.contact-form .mensaje-error ul { margin: 0; }

/* Campo trampa anti-bots: invisible para personas */
.hp-field {
    position: absolute !important;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.label-like { display: block; font-weight: bold; color: #003366; margin-bottom: 5px; }

.btn-link {
    display: inline-block;
    background: #005599;
    color: #fff;
    padding: 10px 18px;
    border-radius: 6px;
    text-decoration: none;
}
.btn-link:hover { background: #ff6600; }

/* Carrusel: apertura por clase (sin estilos inline) y botón de cierre accesible */
.modal.is-open { display: flex; }

button.close-btn {
    background: none;
    border: none;
    padding: 0;
    line-height: 1;
    font-family: inherit;
}
