/* ==========================================================================
   1. FUENTES Y RESET
   ========================================================================== */
@font-face {
    font-family: 'ScriptMTBold';
    /* Ajusta la ruta si tu estructura es diferente */
    src: url('../../MyFebes/fonts/ScriptMTBold.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

.vcard .tel {
    display: block;
}
.febes-font {
    font-family: 'ScriptMTBold', 'Brush Script MT', cursive;
    font-weight: normal;
    font-size: 1.4em; 
    line-height: 1;
    display: inline-block;
}

* { box-sizing: border-box; }

body { 
    margin: 0; 
    padding: 0; 
    font: 16px/1.5 Verdana, Arial, Helvetica, sans-serif; 
    background-color: #fcf5a7; 
    /* CORRECCIÓN: Texto marrón más oscuro para mejor contraste */
    color: #4A2F19; 
}

/* Aseguramos que main se comporte como bloque en todos los navegadores */
main { display: block; }

/* CORRECCIÓN: Enlace naranja más oscuro (Pasa WCAG AA) */
a { text-decoration: none; color: #8A4B08; transition: color 0.3s; }
a:hover { color: #5E3305; }

img { max-width: 100%; height: auto; }

h1 {
    display: block;
    font-size: clamp(1rem, 4vw, 2rem);
    margin-block-start: 0.67em;
    margin-block-end: 0.67em;
    font-weight: bold;
}

/* ==========================================================================
   2. ESTRUCTURA PRINCIPAL
   ========================================================================== */
#contenedor { 
    background: #f5f5dc; 
    width: 100%; 
    max-width: 1200px; 
    margin: 0 auto; 
    box-shadow: 0 0 10px rgba(0,0,0,0.1); 
    position: relative; 
}

/* Cabecera */
#cabecera2 { 
    display: flex; 
    background-color: #f5f5dc; 
    border-bottom: 1px solid #9EA5AC; 
    padding: 5px 0; 
    min-height: 80px; 
    align-items: center; 
}
/* SOLUCIÓN CLS: Reservar espacio exacto para el logotipo */
.logo-box img {
    width: 220px; /* Ancho fijo igual al HTML */
    height: auto;
    aspect-ratio: 213 / 137; /* La fórmula mágica: reserva el hueco proporcional */
}
.title-box { 
    width: 85%; 
    display: flex; 
    flex-direction: column; 
    justify-content: center; 
    align-items: center; 
    padding: 0 10px;
    min-height: 90px; /* Fuerza la altura para que coincida con el logo y no baile */
}
.texto-header-febes { font-family: 'ScriptMTBold', cursive; font-size: clamp(1.5rem, 3.5vw, 2.5rem); color: #4A2F19; line-height: 1; text-shadow: 1px 1px 2px rgba(0,0,0,0.1); text-align: center; }
.con-logo-fondo { background-repeat: no-repeat; background-position: center; background-size: contain; padding: 0 5px; }

/* Barra Título */
#titulo { 
    background: #ff9f33; 
    color: #000; 
    padding: 5px 15px; 
    font-size: 0.85rem; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    min-height: 40px; 
    position: relative; 
    z-index: 1001;
    font-weight: bold;
}

/* CORRECCIÓN: Los enlaces dentro de la barra oscura deben ser BLANCOS */
#titulo a {
    color: #000000 !important;
    text-decoration: underline;
}

/* Contenedor Central */
#contenedor_central { 
    display: flex; 
    flex-wrap: nowrap; 
    align-items: stretch; 
    position: relative; 
}

#menu { width: 20%; min-width: 180px; background: #f5f5dc; border-right: 1px solid #9EA5AC; padding: 10px 0; flex-shrink: 0; }

#cuerpo { 
    width: auto; 
    flex: 1; 
    background-color: #F3E2A9; 
    padding: 20px; 
    /* Crucial para responsive: permite que el contenido se encoja */
    min-width: 0; 
}

#menu_der { width: 20%; min-width: 180px; background: #f5f5dc; border-left: 1px solid #9EA5AC; padding: 10px; flex-shrink: 0; }
#pie { background: #f5f5dc; border-top: 1px solid #9EA5AC; padding: 20px; text-align: center; width: 100%; color: #4A2F19; }

/* ==========================================================================
   3. MENÚ
   ========================================================================== */
#nav { list-style: none; padding: 0; margin: 0; }
#nav > li { position: relative; border-bottom: 1px solid #ddd; }

#nav a, #nav label {
    width: 100%; padding: 10px 15px; color: #041525; font-weight: bold; background: #f5f5dc; cursor: pointer; user-select: none;
    display: flex; align-items: center; justify-content: flex-start;
}
#nav a:hover, #nav label:hover { background-color: #ff9f33; color: #FFF; }

.active-parent { background-color: #ff9f33 !important; color: #FFF !important; }
.current-page { font-weight: bold; color: #d67a1c !important; background-color: #fff !important; border-left: 4px solid #ff9f33; }

.toggle-submenu { position: absolute; opacity: 0; cursor: pointer; height: 0; width: 0; z-index: -1; }
#nav ul { display: none; list-style: none; padding: 0; margin: 0; background: #fff8dc; border-top: 1px solid #ccc; width: 100%; }
#nav ul li a { padding-left: 30px; font-weight: normal; font-size: 0.9em; color: #2f4b80; background: #fff8dc; border-bottom: 1px solid #eee; display: block; }
#nav ul li a:hover { background: #ffeebb; color: #000; }

.toggle-submenu:checked ~ ul { display: block !important; animation: fadeIn 0.3s; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

#nav label { position: relative; }
#nav label::after { 
    content: '+'; position: absolute; right: 15px; top: 50%; transform: translateY(-50%); 
    font-size: 1.2em; font-weight: bold; color: #ff9f33; transition: color 0.2s; 
}
#nav label:hover::after { color: #FFF !important; }
.toggle-submenu:checked ~ label::after { content: '-'; color: #B45F04; }
.active-parent::after { color: #FFF !important; }


/* ==========================================================================
   4. SLIDER
   ========================================================================== */
.slideshow-container { max-width: 100%; position: relative; margin: auto; overflow: hidden; }
.mySlides { display: none; text-align: center; will-change: opacity, transform; transform: translateZ(0); }

.ventana {
    width: 80% !important; display: block; margin: 0 auto;
    border: 5px solid #fff; border-radius: 8px; box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

/* Botones corregidos */
button.prev, button.next, .prev, .next {
    cursor: pointer; position: absolute; top: 50%; width: auto; margin-top: -30px; padding: 16px;
    color: #000000 !important; font-size: 40px !important; font-weight: bold !important;
    transition: 0.2s ease; border-radius: 0 3px 3px 0; user-select: none;
    background-color: rgba(255,255,255,0.3); border: none; outline: none; font-family: inherit; line-height: 1;
}
.next { right: 0; border-radius: 3px 0 0 3px; }
.prev { left: 0; }
.prev:hover, .next:hover {color: #ff9f33 !important; }
button.prev:active, button.next:active {color: #ff9f33; transform: scale(0.95); transition: transform 0.05s; }

.text { color: #4A2F19; font-size: 15px; padding: 10px 12px; position: relative; width: 100%; text-align: center; font-weight: bold; }
.numbertext {
    color: #fde5c8; font-size: 16px; padding: 8px 12px; position: absolute; top: 10px; left: 50%;
    transform: translateX(-50%); background-color: rgba(4, 21, 37, 0.8); border-radius: 20px; z-index: 10;
}
.dot { cursor: pointer; height: 13px; width: 13px; margin: 0 4px; background-color: #bbb; border-radius: 50%; display: inline-block; transition: background-color 0.6s ease; }
.active, .dot:hover { background-color: #041525; }
.fade { animation-name: fade; animation-duration: 1.5s; }
@keyframes fade { from {opacity: .4} to {opacity: 1} }

/* ==========================================================================
   5. WIDGETS Y CONTENIDO
   ========================================================================== */
#ArticulosInteres, #EnlacesInteres, #Noticia, #Cita, #NuestrasFrases {
    background-color: #ffffff; border: 1px solid #9EA5AC; border-radius: 8px; padding: 15px; margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05); width: 100%; overflow: hidden;
}
#ArticulosInteres h1, #EnlacesInteres h1 { font-size: 1.1rem; color: #041525; text-align: center; border-bottom: 2px solid #ff9f33; padding-bottom: 8px; margin: 0 0 10px 0; }
#ArticulosInteres ul { list-style: none; padding: 0; margin: 0; }
#ArticulosInteres li { border-bottom: 1px dotted #ccc; padding: 8px 0; text-align: left; font-size: 0.9rem; }
#ArticulosInteres li:last-child { border-bottom: none; }
#ArticulosInteres a { display: block; color: #041525; }
#ArticulosInteres a:hover { color: #fff; background-color: #ff9f33; padding-left: 5px; border-radius: 3px; }
#Cita { background: url('../../imagenes/pergamino.gif') no-repeat center top; background-size: cover; min-height: 200px; display: flex; align-items: center; justify-content: center; font-family: monospace; font-style: italic; font-weight: bold; color: #833b0f; padding: 20px; text-align: center; }

.central-widgets { display: flex; justify-content: space-around; margin-top: 30px; padding-top: 20px; border-top: 2px dashed #ff9f33; gap: 15px; }
.widget-col { flex: 1; text-align: center; background: rgba(255,255,255,0.5); padding: 10px; border-radius: 10px; transition: transform 0.2s; }
.widget-col:hover { transform: translateY(-5px); }
.widget-col img { max-height: 80px; width: auto; margin-bottom: 5px; }

/* ==========================================================================
   6. BOTÓN HAMBURGUESA
   ========================================================================== */
#menu-toggle { position: absolute; opacity: 0; z-index: -1; }
.menu-btn { display: none; cursor: pointer; background: #ff9f33; padding: 5px 8px; border-radius: 3px; margin-left: 10px; }
.nav-icon { background: #fff; display: block; height: 3px; width: 20px; position: relative; transition: background .2s ease-out; }
.nav-icon:before, .nav-icon:after { background: #fff; content: ''; display: block; height: 100%; position: absolute; width: 100%; transition: all .2s ease-out; }
.nav-icon:before { top: 6px; }
.nav-icon:after { top: -6px; }
#menu-toggle:checked ~ #contenedor #titulo .menu-btn .nav-icon { background: 0 0; }
#menu-toggle:checked ~ #contenedor #titulo .menu-btn .nav-icon:before { transform: rotate(-45deg); top: 0; }
#menu-toggle:checked ~ #contenedor #titulo .menu-btn .nav-icon:after { transform: rotate(45deg); top: 0; }

/* ==========================================================================
   7. RESPONSIVE
   ========================================================================== */
   
/* Reglas para Tablet y Móvil (menos de 850px) */
@media screen and (max-width: 850px) {
    #cabecera2 { padding: 5px; justify-content: center; }
    .logo-box { width: auto; margin-right: 10px; }
    .logo-box img { max-height:200px;  }
    .title-box { width: auto; align-items: flex-start; }
    .texto-header-febes { text-align: left; }
    
    .menu-btn { display: block !important; }
    
    /* El contenedor central pasa a columna vertical */
    #contenedor_central { flex-direction: column; }
    
    /* El menú se oculta y se convierte en overlay */
    #menu {
        position: absolute; top: 0; left: 0; width: 100%; z-index: 1000;
        background-color: #fcf5a7; border-right: none; border-bottom: 3px solid #ff9f33;
        box-shadow: 0 10px 20px rgba(0,0,0,0.2);
        opacity: 0; visibility: hidden; transform: translateY(-20px); transition: all 0.4s ease-in-out;
    }
    
    /* Cuando el checkbox se marca, el menú aparece */
    #menu-toggle:checked ~ #contenedor #contenedor_central #menu { opacity: 1; visibility: visible; transform: translateY(0); }
    
    #cuerpo { width: 100%; padding: 15px; }
    #menu_der { width: 100%; border-left: none; border-top: 1px solid #ccc; }
    
    .con-logo-fondo { display: none !important; }
}

/* Reglas para Móviles Pequeños (menos de 450px) */
@media screen and (max-width: 450px) { 
    .central-widgets { flex-direction: column; }
    .footer-flex { flex-direction: column; }
    .vcard { width: 100% !important; border-bottom: 1px solid #ddd; }
    .contenedor-contacto { gap: 20px; }
 
}

/* ==========================================================================
   8. LOGIN Y OTROS
   ========================================================================== */
/* Contenedor del input y el ojo */
.password-wrapper {
    position: relative;
    width: 100%;
}

numbertext {
    font-size: 12px;
}   
/* El input debe tener un poco de espacio extra a la derecha para que el ojo no tape el texto */
.password-wrapper .input-igual {
    padding-right: 40px; /* Espacio para que el texto no choque con el ojo */
    margin-bottom: 15px !important; /* Mantenemos tu margen inferior */
    width: 100%;
}

/* 3. Posicionamiento preciso del ojo */
.toggle-password {
    position: absolute;
    right: 12px;
    /* Centrado dinámico */
    top: calc(50% - 7.5px); /* 50% menos la mitad del margen inferior del input para compensar */
    cursor: pointer;
    font-size: 1.1rem;
    color: #888;
    user-select: none;
    z-index: 10;
    line-height: 1; /* Evita que el line-height del texto lo empuje */
}

.toggle-password:hover {
    color: #ff9f33;
}   
.login-box {
    background-color: #ffffff; border-radius: 12px; box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    padding: 20px; margin: 20px auto; text-align: center; border: 1px solid #eaeaea; max-width: 250px;
}
.login-header {
    margin-bottom: 15px; padding-bottom: 10px; border-bottom: 2px solid #f2f2f2;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
    font-family: 'Verdana', Arial, sans-serif; color: #041525; font-size: 0.85rem; font-weight: bold; text-transform: uppercase;
}
.login-header .febes-font { color: #e68a2e; font-size: 3rem; text-transform: none; line-height: 1; margin-top: 5px; }
.login-box label { display: block; text-align: left; font-size: 0.8rem; color: #555; margin-bottom: 5px; font-weight: bold; }
.input-igual { width: 100%; padding: 10px; margin-bottom: 15px; border: 1px solid #ddd; border-radius: 6px; display: block; background-color: #fafafa; transition: all 0.3s; }
.input-igual:focus { border-color: #ff9f33; background-color: #fff; outline: none; box-shadow: 0 0 5px rgba(255, 159, 51, 0.2); }
.botongrande { width: 100%; padding: 12px; background: linear-gradient(135deg, #ff9f33, #d67a1c); color: white; border: none; border-radius: 25px; font-size: 0.9rem; font-weight: bold; cursor: pointer; transition: transform 0.2s, box-shadow 0.2s; text-transform: uppercase; }
.botongrande:hover { transform: translateY(-2px); box-shadow: 0 4px 10px rgba(214, 122, 28, 0.4); }
.botongrande:active { transform: translateY(0); }

/* Footer y Contacto */
.footer-flex { display: flex; flex-wrap: wrap; width: 100%; }
.vcard { width: 50%; box-sizing: border-box; padding: 15px; text-align: center; }
 .tel-row {
    white-space: nowrap; /* Evita que el texto salte a la siguiente línea */
    display: block;      /* Asegura que cada bloque ocupe su propia fila vertical */
}  
.fn.org { font-weight: bold; font-size: 1.1em; color: #041525; display: block; margin-bottom: 5px; }

/* CORRECCIÓN: Teléfono en naranja más oscuro */
.tel { font-weight: bold; color: #8A4B08; }

.contenedor-contacto { display: flex; flex-wrap: wrap; justify-content: center; gap: 40px; max-width: 1200px; margin: 0 auto; }
.centro-col { flex: 1; min-width: 300px; text-align: center; background-color: rgba(255, 255, 255, 0.4); padding: 20px; border-radius: 15px; box-shadow: 0 2px 5px rgba(0,0,0,0.05); }
.ventana-mapa {
    position: relative; width: 100%; padding-bottom: 75%; height: 0; overflow: hidden;
    border-radius: 12px; background-color: #eee; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); margin-top: 15px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.ventana-mapa:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2); }
.ventana-mapa iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0; }