/* ===== RESET BÁSICO Y VARIABLES GLOBALES ===== */
:root {
    --primary-color: #003366; /* Azul institucional oscuro */
    --secondary-color: #D4AF37; /* Dorado para acentos */
    --accent-color: #CE1126; /* Rojo para llamadas a la acción */
    --text-color: #333;
    --bg-color: #f4f7f6;
    --font-main: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

/* ===== ESTILOS DEL ENCABEZADO ===== */
.main-header .top-bar {
    height: 5px;
    background: linear-gradient(to right, #FFD100, #0038A8, #CE1126); /* Bandera de Venezuela */
}

.main-header .main-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
    /* Transición para el cambio de padding */
    padding: 1rem 5%;
    transition: padding 0.3s ease-in-out;
}

.main-header .logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
    /* Transición para el cambio de tamaño de fuente */
    transition: font-size 0.3s ease-in-out;
}

.main-header .nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.main-header .nav-links a {
    text-decoration: none;
    color: var(--primary-color);
    font-weight: 600;
    transition: color 0.3s ease;
}

.main-header .nav-links a:hover {
    color: var(--secondary-color);
}

.cta-button {
    background-color: var(--primary-color);
    color: white;
    padding: 0.7rem 1.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0, 51, 102, 0.3);
}

/* ===== ESTILOS DE LA SECCIÓN HERO ===== */
.hero {
    color: white;
    height: 80vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden; /* Oculta lo que se salga del contenedor */
}

.hero-slider {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.hero .slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1.5s ease-in-out; /* Transición suave de opacidad */
}

.hero .slide.active {
    opacity: 1;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(0, 51, 102, 0.7), rgba(0, 51, 102, 0.7));
    z-index: 1;
}

.hero-content {
    max-width: 800px;
    padding: 0 2rem;
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

.cta-button-hero {
    background-color: var(--accent-color);
    color: white;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cta-button-hero:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(206, 17, 38, 0.4);
}

/* ===== ESTILOS DE LA SECCIÓN "QUIÉNES SOMOS" ===== */
.about-section {
    padding: 5rem 5%;
    background-color: var(--card-bg-color);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .about-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.about-text h2 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.about-text h3 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.about-text ul {
    list-style-position: inside;
    padding-left: 0;
}

.about-image img {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

/* ===== ESTILOS DE LA SECCIÓN DE NOTICIAS ===== */
.news-section {
    padding: 5rem 5%;
    background-color: var(--bg-color);
}

.news-section h2 {
    text-align: center;
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 3rem;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.news-card {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.news-card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.news-card-content {
    padding: 1.5rem;
}

.news-card-content h3 {
    font-size: 1.25rem;
    color: var(--primary-color);
    margin-bottom: 0.75rem;
}

/* ===== ESTILOS DE LA PAGINACIÓN ===== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 3rem;
    gap: 0.5rem;
}

.pagination-button {
    border: 1px solid var(--primary-color);
    background-color: #fff;
    color: var(--primary-color);
    padding: 0.5rem 1rem;
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s;
    border-radius: 5px;
    font-weight: 600;
}

.pagination-button:hover,
.pagination-button.active {
    background-color: var(--primary-color);
    color: #fff;
}

.pagination-button:disabled {
    background-color: #e9ecef;
    border-color: #dee2e6;
    cursor: not-allowed;
}

/* ===== ESTILOS DEL ENCABEZADO CUANDO SE HACE SCROLL ===== */
.main-header.scrolled .main-nav {
    /* Reducimos el padding vertical para hacerlo más compacto */
    padding: 0.5rem 5%;
}

.main-header.scrolled .logo {
    /* Reducimos el tamaño del logo */
    font-size: 1.3rem;
}

/* ===== OTRAS SECCIONES Y PIE DE PÁGINA ===== */
.placeholder-section {
    padding: 4rem 5%;
    text-align: center;
    min-height: 300px;
    border-bottom: 1px solid #ddd;
}

.main-footer {
    background-color: var(--primary-color);
    color: white;
    text-align: center;
    padding: 2rem;
}

/* ===== ESTILOS DE LA SECCIÓN DE REGISTRO ===== */
.registration-section {
    background-color: #fff;
    padding: 5rem 5%;
    text-align: center;
}

.registration-section .container {
    max-width: 900px;
    margin: 0 auto;
    text-align: left;
}

.registration-section h2 {
    font-size: 2.5rem;
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 1rem;
}

.registration-section p {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 1.1rem;
    color: #666;
}

.registration-form fieldset {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.registration-form legend {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-color);
    padding: 0 0.5rem;
    margin-left: 1rem;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #555;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"] {
    padding: 0.8rem;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 5px rgba(0, 51, 102, 0.2);
}

.checkbox-group {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
}

.checkbox-group input {
    margin-right: 0.7rem;
}

.submit-button {
    display: block;
    width: 100%;
    padding: 1rem;
    background-color: var(--accent-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.3s;
}

.submit-button:hover {
    background-color: #a50f1f; /* Un rojo más oscuro */
    transform: translateY(-2px);
}

/* ESTILOS PARA MENSAJES DE RESPUESTA DEL FORMULARIO */
.form-message {
    padding: 1rem;
    margin-bottom: 1.5rem;
    border-radius: 8px;
    text-align: center;
    font-weight: 600;
}

.form-message.success {
    background-color: #d4edda;
    color: #155724;
}

.form-message.error {
    background-color: #f8d7da;
    color: #721c24;
}

/* ===== ESTILOS DEL SPINNER DE CARGA ===== */
.loading-spinner {
    border: 5px solid rgba(0, 0, 0, 0.1);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border-left-color: var(--primary-color);
    animation: spin 1s ease-in-out infinite;
    margin: 3rem auto; /* Centrar el spinner en su contenedor */
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* ===== ESTILOS DEL INTERRUPTOR DE TEMA (DARK MODE) ===== */
.theme-switch-wrapper {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.theme-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
}

.theme-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: var(--primary-color);
}

input:checked + .slider:before {
    transform: translateX(24px);
}

/* ===== ESTILOS DEL MODAL DE NOTICIAS ===== */
.modal {
    display: none; /* Oculto por defecto */
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: var(--card-bg-color);
    margin: 10% auto;
    padding: 2rem;
    border: 1px solid var(--border-color);
    width: 90%;
    max-width: 700px;
    border-radius: 8px;
    position: relative;
    animation: fadeIn 0.3s;
}

.close-button {
    color: var(--subtle-text-color);
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
}

.close-button:hover,
.close-button:focus {
    color: var(--accent-color);
}

.modal-image {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.modal-text-content #modal-title {
    color: var(--primary-color);
}

.modal-text-content #modal-date {
    color: var(--subtle-text-color);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}
}
