/* ==========================================
   VARIABLES Y CONFIGURACIÓN GENERAL
   ========================================== */
:root {
    --color-principal: rgb(30, 64, 175);
    --color-principal-hover: rgb(29, 53, 137);
    --color-acento: rgb(37, 99, 235);
    --color-fondo: rgb(248, 250, 252);
    --color-superficie: rgb(255, 255, 255);
    --color-texto: rgb(15, 23, 42);
    --color-texto-muted: rgb(71, 85, 105);
    
    --borde-radio: 8px;
    --borde-radio-lg: 12px;
    --sombra-tarjeta: 0 4px 12px rgba(15, 23, 42, 0.05);
    --transicion-base: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--color-fondo);
    color: var(--color-texto);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.7;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

main {
    width: 90%;
    max-width: 1100px;
    margin: 40px auto;
    padding: 0 20px;
    background-color: transparent; 
    border: none;                
    box-shadow: none;              
    flex: 1;
}

/* ==========================================
   TIPOGRAFÍA Y TÍTULOS
   ========================================== */
h1 {
    color: var(--color-principal);
    font-size: clamp(1.8rem, 3.5vw, 2.4rem);
    font-weight: 800;
    text-align: left;
    margin-bottom: 2rem;
    letter-spacing: -0.03em;
    line-height: 1.2;
    display: flex;
    align-items: center;
    gap: 14px;
}

h1::before {
    content: "";
    display: inline-block;
    width: 6px;
    height: 1.8rem;
    background: linear-gradient(to bottom, rgb(37, 99, 235), rgb(30, 64, 175));
    border-radius: 4px;
}

h2 {
    color: var(--color-principal);
    font-size: clamp(1.3rem, 2.5vw, 1.5rem);
    font-weight: 600;
    margin-top: 2rem;
    margin-bottom: 1rem;
    letter-spacing: -0.01em;
}

h3 {
    color: var(--color-texto);
    font-size: 1.1rem;
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

p {
    font-size: 1rem;
    color: var(--color-texto-muted);
    margin-bottom: 1.25rem;
}

/* ==========================================
   BARRA DE NAVEGACIÓN SUPERIOR (STICKY) + LUPA Y MENÚ HAMBURGUESA
   ========================================== */
.navbar-superior {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 28px;
    background-color: #ffffff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
    flex-wrap: nowrap;
    gap: 15px;
}

.nav-logo h1 {
    font-size: 1.35rem;
    margin: 0;
    color: #1e293b;
    font-weight: 700;
}

.nav-logo h1::before {
    display: none; /* Quitamos la barrita extra para que el logo quede limpio */
}

.nav-enlaces {
    display: flex;
    gap: 20px;
}

.nav-enlaces a {
    text-decoration: none;
    color: #475569;
    background-color: #f1f5f9; /* Fondo de botoncito sutil */
    font-weight: 500;
    font-size: 0.9rem;
    padding: 8px 14px;
    border-radius: var(--borde-radio);
    border: 1px solid #e2e8f0;
    transition: var(--transicion-base);
}

.nav-enlaces a:hover {
    background-color: rgb(30, 64, 175); /* Pasa al azul principal al pasar el mouse */
    color: #ffffff;
    border-color: rgb(30, 64, 175);
}

/* Buscador con lupa */
.search-form {
    display: flex;
    align-items: center;
    background: #f1f5f9;
    border-radius: 6px;
    padding: 5px 10px;
    border: 1px solid #e2e8f0;
}

.search-form input {
    border: none;
    background: transparent;
    outline: none;
    padding: 4px;
    font-size: 14px;
    color: #334155;
    width: 170px;
    margin-bottom: 0;
}

.search-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    color: #64748b;
    display: flex;
    align-items: center;
    padding: 2px;
    box-shadow: none;
    transition: color 0.2s;
}

.search-btn:hover {
    color: #2563eb;
    background: transparent;
}

/* Menú hamburguesa desplegable */
.menu-container {
    position: relative;
    display: inline-block;
}

.menu-checkbox {
    display: none;
}

.hamburger-btn {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 18px;
    cursor: pointer;
    padding: 2px;
}

.hamburger-btn span {
    display: block;
    height: 3px;
    width: 100%;
    background-color: #334155;
    border-radius: 2px;
    transition: background-color 0.2s;
}

.hamburger-btn:hover span {
    background-color: #2563eb;
}

.dropdown-menu {
    display: none;
    position: absolute;
    right: 0;
    top: 45px;
    background: #ffffff;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
    width: 220px;
    z-index: 1100;
}

.dropdown-menu a {
    display: block;
    padding: 12px 16px;
    text-decoration: none;
    color: #334155;
    font-size: 14px;
    border-bottom: 1px solid #f1f5f9;
    white-space: nowrap;
    transition: background 0.2s, color 0.2s;
}

.dropdown-menu a:last-child {
    border-bottom: none;
}

.dropdown-menu a:hover {
    background-color: #f8fafc;
    color: #2563eb;
}

.menu-checkbox:checked ~ .dropdown-menu {
    display: block;
}

/* ==========================================
   BANNERS Y DESTACADOS
   ========================================== */
.banner-contenedor {
    width: 100%;
    margin: 0 0 20px 0;
    padding: 0;
    background-color: #f8fafc;
}

.Banner-img {
    width: 100%;
    height: 350px;
    object-fit: cover;
    display: block;
    border-radius: 0;
    border: none;
    box-shadow: none;
    margin: 0;
}

.banner-contenedor figcaption {
    text-align: center;
    font-size: 0.85rem;
    color: #64748b;
    margin-top: 6px;
}

.banner-anuncio {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 30px;
    max-width: 700px;
    margin: 30px auto;
    padding: 25px 30px;
    background-color: #f9fafb;
    border-radius: 12px;
    border: 1px solid rgb(226, 232, 240);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.portada-img {
    width: 140px;
    height: auto;
    border-radius: 6px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border: 1px solid rgb(226, 232, 240);
    margin: 0;
}

.banner-texto {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.banner-tag {
    font-size: 0.85rem;
    font-weight: bold;
    color: #2563eb;
}

.banner-texto h3 {
    margin: 0;
    font-size: 1.25rem;
    color: #1f2937;
}

.banner-texto p {
    margin: 0;
    color: #4b5563;
    font-size: 0.95rem;
}

/* ==========================================
   FORMULARIOS Y CAMPOS DE ENTRADA
   ========================================== */
fieldset {
    border: none;
    background-color: transparent;
    box-shadow: none;
    padding: 0;
    margin-bottom: 30px;
    width: 100%;
}

legend {
    font-weight: 700;
    color: var(--color-principal);
    background-color: transparent;
    padding: 0;
    margin-bottom: 8px;
    font-size: 1.15rem;
}

label {
    display: block;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--color-texto);
    font-size: 0.95rem;
}

input, select, textarea {
    width: 100%;
    padding: 12px 16px;
    box-sizing: border-box;
    border-radius: var(--borde-radio);
    border: 1px solid rgb(203, 213, 225);
    font-size: 1rem;
    background-color: rgb(255, 255, 255);
    color: var(--color-texto);
    margin-bottom: 20px;
    transition: var(--transicion-base);
}

input:hover, select:hover, textarea:hover {
    border-color: rgb(148, 163, 184);
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible,
button:focus-visible {
    outline: 3px solid rgb(37, 99, 235);
    outline-offset: 2px;
    border-color: rgb(30, 64, 175);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15);
}

button {
    color: rgb(255, 255, 255);
    background-color: rgb(30, 64, 175);
    border: none;
    padding: 12px 24px;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: var(--borde-radio);
    cursor: pointer;
    transition: var(--transicion-base);
    display: inline-block;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

button:hover {
    background-color: rgb(29, 53, 137);
}

button:active {
    background-color: rgb(23, 37, 84);
}

/* ==========================================
   ELEMENTOS MULTIMEDIA Y OTROS
   ========================================== */
img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 24px auto;
    border: 1px solid rgb(226, 232, 240);
    border-radius: var(--borde-radio);
    box-shadow: var(--sombra-tarjeta);
}

iframe {
    width: 100%;
    height: 100vh; 
    border: 1px solid rgb(226, 232, 240);
    border-radius: var(--borde-radio);
    background-color: var(--color-superficie);
    box-shadow: var(--sombra-tarjeta);
    margin-top: 24px;
    overflow: hidden; 
}

footer {
    text-align: left;
    padding: 24px 32px;
    font-size: 0.9rem;
    color: var(--color-texto-muted);
    background-color: rgb(255, 255, 255);
    border-top: 1px solid rgb(226, 232, 240);
    margin-top: auto;
}

/* ==========================================
   DISEÑO RESPONSIVO (MÓVILES)
   ========================================== */
@media screen and (max-width: 768px) {
    .navbar-superior {
        padding: 10px 15px;
        flex-wrap: wrap;
    }

    .nav-enlaces {
        gap: 10px;
    }

    main {
        width: 95%;
        padding: 0 10px;
        margin: 20px auto;
    }
}