/* eib-chrome.css — ajustes del header/footer/menú móvil EIB.
   Complementa eib.css. Editable a mano (no se regenera). */

/* ============================================================
   TIPOGRAFÍA: fuentes del template original (decisión del dueño,
   cargadas vía <link> en el layout como skin específico EIB).
   Sobreescribe las variables de eib.css.
   ============================================================ */
:root {
    --display: 'Fraunces', Georgia, serif;
    --texto: 'Public Sans', system-ui, sans-serif;
}

/* El layout fuerza h1-h6 a la fuente de settings; en el sitio EIB los
   headings heredan del body y cada componente aplica var(--display). */
.eib-site h1, .eib-site h2, .eib-site h3,
.eib-site h4, .eib-site h5, .eib-site h6 { font-family: inherit; }

/* ============================================================
   LOGO oficial en el header
   ============================================================ */
.eib-site .brand-logo { height: 52px; width: auto; display: block; }
@media (max-width: 600px) {
    .eib-site .brand-logo { height: 42px; }
}

/* ============================================================
   NEUTRALIZACIÓN de reglas de public.css que colisionan
   (.hero y .btn-primary existen en ambos sistemas de diseño)
   ============================================================ */
.eib-site .hero {
    min-height: 0;
    display: block;
    align-items: normal;
    justify-content: normal;
}
.eib-site .hero::before {
    width: auto;
    height: auto;
    animation: none;
    transform: none;
}
.eib-site .hero h1 {
    margin: 0;
    color: #fff;
}
.eib-site .btn-primary {
    box-shadow: none;
    background: var(--azul);
    border-radius: 8px;
}
.eib-site .btn-primary:hover {
    box-shadow: none;
    background: var(--azul-oscuro);
}

/* El sitio institucional no usa dark mode: colores corporativos fijos */
.eib-site .wc-dark-toggle { display: none; }

/* ============================================================
   BOTONES: hover + activación consistentes en todo el sitio
   ============================================================ */

/* El overlay decorativo del CTA cubría los botones e interceptaba el
   mouse: sin esto, los botones del banner final no reciben hover/click. */
.eib-site .cta::after { pointer-events: none; }
.eib-site .cta .hero-cta { position: relative; }

/* Lift al hover también para los botones secundarios (light/ghost) */
.eib-site .btn-light:hover,
.eib-site .btn-ghost:hover { transform: translateY(-2px); }

/* Feedback táctil al presionar cualquier botón */
.eib-site .btn:active { transform: translateY(0) scale(0.97); }
.eib-site .top-btn:active { transform: scale(0.92); }

/* ============================================================
   SELECT del formulario (Programa de interés): flecha custom,
   cursor y estados hover/focus a juego con el resto del form.
   (Vive aquí porque el CSS de página bloquea data-URIs.)
   ============================================================ */
.eib-site .field select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1l6 6 6-6' fill='none' stroke='%231d71b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 42px;
    cursor: pointer;
    font-weight: 500;
}
.eib-site .field select:hover { border-color: var(--azul); }
.eib-site .field select option { color: var(--tinta); font-weight: 400; }

/* Hero card: foto real de laboratorio EIB (el template original traía un
   placeholder de hotel). Reemplaza el background de eib.css. */
.eib-site .hero-card {
    background:
        linear-gradient(180deg, rgba(36,88,141,0) 40%, rgba(14,34,51,.85)),
        url("https://cdn.prod.website-files.com/66fdf655ad6f661a7de54bfd/68b5f667ea327c46609bc2a5_01.jpg") center/cover,
        var(--azul-oscuro);
}

/* ============================================================
   VOLVER ARRIBA — site.js (data-scroll-top) alterna display
   flex/none, así que el estado inicial es display:none y las
   transiciones de opacity/visibility del diseño original se anulan.
   ============================================================ */
.eib-site .top-btn {
    display: none;
    opacity: 1;
    visibility: visible;
    transform: none;
    align-items: center;
    justify-content: center;
}

/* Menú móvil: panel FIJO bajo el header (visible desde cualquier punto del
   scroll), con scroll interno y fondo oscurecido. Se muestra/oculta con la
   clase .hidden vía site.js (data-mobile-menu). */
.eib-site .eib-mobile-menu {
    position: fixed;
    top: var(--eib-header-h, 84px);
    left: 0; right: 0;
    max-height: calc(100vh - var(--eib-header-h, 84px));
    max-height: calc(100dvh - var(--eib-header-h, 84px));
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    z-index: 49;
    display: flex; flex-direction: column;
    padding: 8px 28px 24px; background: #fff;
    border-bottom: 1px solid var(--linea);
    box-shadow: 0 24px 48px rgba(14, 34, 51, .18);
}
.eib-site .eib-mobile-menu.hidden { display: none; }
/* Fondo oscurecido bajo el panel */
/* Fondo oscurecido: fuera del panel (en el body), bajo el panel y sobre el contenido */
body.eib-menu-open::after {
    content: ""; position: fixed; inset: 0;
    background: rgba(14, 34, 51, .45); z-index: 48;
}
.eib-site .eib-mobile-menu a {
    padding: 13px 0; font-weight: 600; font-size: 1rem;
    color: var(--tinta); border-bottom: 1px solid var(--linea);
}
.eib-site .eib-mobile-menu a.mm-cta {
    margin-top: 14px; border-bottom: none; text-align: center;
    background: var(--azul); color: #fff; border-radius: 8px; padding: 13px;
}
/* Sin scroll de fondo mientras el menú está abierto */
body.eib-menu-open { overflow: hidden; }

/* En desktop (menú horizontal visible) nunca se ve el menú móvil */
@media (min-width: 1181px) {
    .eib-site .eib-mobile-menu { display: none !important; }
    .eib-site .menu-toggle { display: none; }
}

/* Al saltar a una sección por su ancla (#id), deja aire para el header fijo */
.eib-site section[id], .eib-site [id].wc-anchor { scroll-margin-top: 96px; }

/* ===== Submenús desplegables del navbar ===== */
.eib-site nav.menu .menu-item { position: relative; display: flex; align-items: center; }
.eib-site nav.menu .menu-item > a { display: inline-flex; align-items: center; }
.eib-site nav.menu .menu-item .caret {
    font-size: .7em; margin-left: 5px; transition: transform .2s; line-height: 1;
}
.eib-site nav.menu .menu-item:hover .caret { transform: rotate(180deg); }
/* Puente invisible para no perder el hover al bajar al submenú */
.eib-site nav.menu .menu-item::before {
    content: ""; position: absolute; top: 100%; left: 0; right: 0; height: 14px;
}
.eib-site nav.menu .submenu {
    position: absolute; top: 100%; left: 50%;
    transform: translateX(-50%) translateY(10px);
    min-width: 216px; background: #fff;
    border: 1px solid var(--linea, #e5e9f0); border-radius: 12px;
    box-shadow: 0 18px 44px rgba(14, 34, 51, .16);
    padding: 8px; margin-top: 8px;
    display: flex; flex-direction: column; gap: 2px;
    opacity: 0; visibility: hidden; transition: opacity .18s, transform .18s; z-index: 60;
}
.eib-site nav.menu .menu-item:hover .submenu {
    opacity: 1; visibility: visible; transform: translateX(-50%) translateY(4px);
}
.eib-site nav.menu .submenu a {
    padding: 9px 12px; border-radius: 8px; font-size: .88rem;
    font-weight: 500; white-space: nowrap; color: var(--tinta);
}
.eib-site nav.menu .submenu a::after { display: none !important; } /* sin subrayado animado */
.eib-site nav.menu .submenu a:hover { background: var(--azul, #1d71b8); color: #fff; }
/* Sub-ítems en el menú móvil */
.eib-site .eib-mobile-menu a.mm-sub {
    padding-left: 20px; font-size: .92rem; font-weight: 500; opacity: .85;
}
.eib-site .eib-mobile-menu a.mm-sub::before { content: none; }

/* ============================================================
   HEADER CON MENÚ AMPLIO (2026-09)
   - Contenedor del header más ancho que el resto del sitio (1400px)
   - Aire garantizado entre logo y menú; ítems con respiro
   - Hamburguesa desde 1180px para que nunca se parta en dos líneas
   ============================================================ */
.eib-site header .wrap { max-width: 1400px; }
.eib-site .nav { height: 84px; gap: 40px; }
.eib-site .nav .brand { flex-shrink: 0; }
.eib-site nav.menu { gap: 4px; margin-left: auto; }
.eib-site nav.menu > a,
.eib-site nav.menu .menu-item > a {
    white-space: nowrap;
    font-size: .9rem;
    padding: 8px 12px;
    border-radius: 8px;
    transition: background .2s, color .2s;
}
.eib-site nav.menu > a:hover,
.eib-site nav.menu .menu-item:hover > a { background: var(--hueso, #f6f8fb); color: var(--azul-oscuro); }
/* Subrayado amarillo solo bajo el texto, no bajo el padding */
.eib-site nav.menu a::after { left: 12px; right: 12px; width: auto; transform: scaleX(0); transform-origin: left; transition: transform .25s; }
.eib-site nav.menu a:hover::after,
.eib-site nav.menu a.active::after { width: auto; transform: scaleX(1); }
@media (max-width: 1320px) {
    .eib-site nav.menu > a,
    .eib-site nav.menu .menu-item > a { font-size: .85rem; padding: 8px 9px; }
    .eib-site .nav { gap: 24px; }
}
@media (max-width: 1180px) {
    .eib-site nav.menu { display: none; }
    .eib-site .menu-toggle { display: grid; }
}
/* Botones flotantes por debajo del menú móvil abierto */
body.eib-menu-open .top-btn,
body.eib-menu-open .wc-dark-toggle { display: none !important; }

/* Footer: columnas flexibles (acepta 2 o 3 columnas de enlaces) */
.eib-site .foot-grid { grid-template-columns: 1.5fr repeat(auto-fit, minmax(160px, 1fr)); }
.eib-site .foot-grid h4 { margin-bottom: 14px; }
.eib-site .foot-grid ul li { margin-bottom: 9px; }
.eib-site .foot-grid a:hover { color: #fff; text-decoration: underline; }
@media (max-width: 980px) { .eib-site .foot-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .eib-site .foot-grid { grid-template-columns: 1fr; gap: 28px; } }


/* ============================================================
   Buscador interno (/buscar) — topbar, menú móvil y resultados
   ============================================================ */
.eib-site .topbar .links { align-items: center; }
.eib-site .topbar-search { display: flex; align-items: center; height: 26px; border-radius: 999px; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.18); overflow: hidden; transition: background .2s, border-color .2s; }
.eib-site .topbar-search:focus-within { background: rgba(255,255,255,.2); border-color: rgba(255,255,255,.45); }
.eib-site .topbar-search input { width: 150px; height: 100%; padding: 0 0 0 12px; border: 0; background: transparent; color: #fff; font: inherit; font-size: .78rem; outline: none; }
.eib-site .topbar-search input::placeholder { color: #cfe1f2; opacity: .8; }
.eib-site .topbar-search input::-webkit-search-cancel-button { -webkit-appearance: none; }
.eib-site .topbar-search button { height: 100%; padding: 0 10px 0 6px; border: 0; background: transparent; color: #fff; font-size: 1.05rem; line-height: 1; cursor: pointer; opacity: .85; }
.eib-site .topbar-search button:hover { opacity: 1; }

.eib-site .eib-mobile-menu .mm-search { display: flex; gap: 8px; margin: 6px 0 12px; }
.eib-site .eib-mobile-menu .mm-search input { flex: 1; min-width: 0; height: 44px; padding: 0 14px; border: 1px solid var(--linea); border-radius: 10px; background: var(--hueso); font: inherit; font-size: .95rem; color: var(--tinta); outline: none; }
.eib-site .eib-mobile-menu .mm-search input:focus { border-color: var(--azul); background: #fff; }
.eib-site .eib-mobile-menu .mm-search button { height: 44px; padding: 0 16px; border: 0; border-radius: 10px; background: var(--azul); color: #fff; font: inherit; font-weight: 700; font-size: .9rem; cursor: pointer; }

.eib-site .eib-search { padding: 64px 0 96px; background: #fff; }
.eib-site .eib-search .wrap { max-width: 860px; }
.eib-site .eib-search-head { margin-bottom: 26px; }
.eib-site .eib-search-head h1.title { font-family: var(--display); font-weight: 600; font-size: clamp(1.8rem, 3.4vw, 2.6rem); line-height: 1.1; color: var(--azul-oscuro); margin: 10px 0 10px; letter-spacing: -.01em; }
.eib-site .eib-search-head .lead { color: var(--gris); font-size: 1.02rem; }
.eib-site .eib-search-form { display: flex; gap: 10px; margin-bottom: 40px; }
.eib-site .eib-search-form input { flex: 1; min-width: 0; height: 52px; padding: 0 18px; border: 1.5px solid var(--linea); border-radius: 10px; background: var(--hueso); font: inherit; font-size: 1.02rem; color: var(--tinta); outline: none; transition: border-color .2s, background .2s; }
.eib-site .eib-search-form input:focus { border-color: var(--azul); background: #fff; box-shadow: 0 0 0 4px rgba(29,113,184,.12); }
.eib-site .eib-search-form .btn { height: 52px; padding: 0 26px; }
.eib-site .eib-search-list { list-style: none; display: flex; flex-direction: column; gap: 14px; }
.eib-site .eib-search-item { position: relative; padding: 20px 22px 18px; border: 1px solid var(--linea); border-radius: 14px; background: #fff; transition: border-color .2s, box-shadow .2s, transform .2s; }
.eib-site .eib-search-item:hover { border-color: #bcd4ea; box-shadow: 0 10px 26px rgba(14,34,51,.07); transform: translateY(-1px); }
.eib-site .eib-search-type { display: inline-block; margin-bottom: 8px; padding: 3px 10px; border-radius: 999px; font-size: .68rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--azul-oscuro); background: #e7f0f9; }
.eib-site .eib-search-item--post .eib-search-type { color: #7a4b00; background: #fdf1cf; }
.eib-site .eib-search-item--academic .eib-search-type { color: #0b5f7a; background: #dff3f8; }
.eib-site .eib-search-item--alumni .eib-search-type { color: #1f6b3a; background: #e2f3e8; }
.eib-site .eib-search-item h2 { font-family: var(--display); font-weight: 600; font-size: 1.28rem; line-height: 1.25; color: var(--azul-oscuro); margin: 0 0 6px; }
.eib-site .eib-search-item h2 a::after { content: ""; position: absolute; inset: 0; }
.eib-site .eib-search-item h2 a:hover { color: var(--azul); }
.eib-site .eib-search-snippet { color: var(--gris); font-size: .95rem; line-height: 1.6; margin: 0 0 8px; }
.eib-site .eib-search-snippet mark { background: #fdf1cf; color: var(--tinta); padding: 0 2px; border-radius: 3px; }
.eib-site .eib-search-url { display: block; font-size: .78rem; color: #8aa0b3; word-break: break-all; }
.eib-site .eib-search-empty { padding: 28px; border-radius: 14px; background: var(--hueso); }
.eib-site .eib-search-empty p { color: var(--gris); margin-bottom: 14px; }
.eib-site .eib-search-links { display: flex; flex-wrap: wrap; gap: 10px; }
.eib-site .eib-search-links a { padding: 9px 16px; border-radius: 999px; background: #fff; border: 1px solid var(--linea); color: var(--azul-oscuro); font-weight: 600; font-size: .88rem; transition: .2s; }
.eib-site .eib-search-links a:hover { background: var(--azul); border-color: var(--azul); color: #fff; }
@media (max-width: 560px) {
  .eib-site .eib-search { padding: 40px 0 64px; }
  .eib-site .eib-search-form { flex-direction: column; }
  .eib-site .eib-search-form .btn { justify-content: center; }
}


/* ============================================================
   Noticias — listado (/noticias) y artículo (plantilla "eib")
   ============================================================ */
.eib-site .ncard .ph.ph-empty { background-image: linear-gradient(135deg, var(--azul-oscuro), var(--cyan)) !important; }
.eib-site .ncard .nexcerpt { font-size: .9rem; color: var(--gris); line-height: 1.55; margin: 0 0 12px; }
.eib-site .ncard .ntime { font-size: .82rem; color: var(--gris); margin-top: auto; }

.eib-site .eib-news-list { padding: 64px 0 96px; background: #fff; }
.eib-site .eib-news-head { max-width: 720px; margin-bottom: 8px; }
.eib-site .eib-news-head h1.title { font-family: var(--display); font-weight: 600; font-size: clamp(1.9rem, 3.6vw, 2.9rem); line-height: 1.08; color: var(--azul-oscuro); margin: 10px 0 12px; letter-spacing: -.01em; }
.eib-site .eib-news-head .lead { color: var(--gris); font-size: 1.05rem; }
.eib-site .eib-news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 42px; }
.eib-site .eib-news-grid .ncard .ph { height: 210px; }
.eib-site .eib-news-pagination { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 48px; }
.eib-site .eib-news-pagination .pg { padding: 9px 16px; border-radius: 999px; border: 1px solid var(--linea); background: #fff; color: var(--azul-oscuro); font-weight: 600; font-size: .88rem; transition: .2s; }
.eib-site .eib-news-pagination a.pg:hover { background: var(--azul); border-color: var(--azul); color: #fff; }
.eib-site .eib-news-pagination .pg-active { background: var(--azul-oscuro); border-color: var(--azul-oscuro); color: #fff; }
.eib-site .eib-news-pagination .pg-disabled { opacity: .45; }
.eib-site .eib-news-empty { margin-top: 40px; padding: 40px; border-radius: 16px; background: var(--hueso); text-align: center; }
.eib-site .eib-news-empty p { color: var(--gris); margin-bottom: 18px; font-size: 1.05rem; }

.eib-site .eib-post-head { background: linear-gradient(135deg, var(--azul-oscuro) 0%, var(--azul) 70%, var(--cyan) 100%); color: #fff; padding: 56px 0 64px; }
.eib-site .eib-post-head .wrap { max-width: 900px; }
.eib-site .eib-post-back { display: inline-block; font-size: .85rem; font-weight: 600; color: #cfe1f2; margin-bottom: 22px; transition: .2s; }
.eib-site .eib-post-back:hover { color: #fff; }
.eib-site .eib-post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-bottom: 14px; }
.eib-site .eib-post-meta .cat { font-size: .72rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--amarillo); }
.eib-site .eib-post-meta time { font-size: .85rem; color: #cfe1f2; }
.eib-site .eib-post-head h1 { font-family: var(--display); font-weight: 600; font-size: clamp(1.9rem, 3.8vw, 3rem); line-height: 1.1; letter-spacing: -.01em; color: #fff; }
.eib-site .eib-post-excerpt { margin-top: 16px; font-size: 1.12rem; line-height: 1.6; color: #e3eef8; max-width: 760px; }
.eib-site .eib-post-figure { max-width: 900px; margin-top: -32px; }
.eib-site .eib-post-figure img { width: 100%; max-height: 520px; object-fit: cover; border-radius: 16px; box-shadow: 0 20px 44px rgba(14,34,51,.16); }
.eib-site .eib-post-body { max-width: 760px; padding-top: 44px; padding-bottom: 64px; }
.eib-site .eib-post-content { font-size: 1.06rem; line-height: 1.75; color: var(--tinta); }
.eib-site .eib-post-content p { margin: 0 0 1.2em; }
.eib-site .eib-post-content h2, .eib-site .eib-post-content h3 { font-family: var(--display); font-weight: 600; color: var(--azul-oscuro); line-height: 1.2; margin: 1.6em 0 .6em; }
.eib-site .eib-post-content h2 { font-size: 1.7rem; }
.eib-site .eib-post-content h3 { font-size: 1.3rem; }
.eib-site .eib-post-content ul, .eib-site .eib-post-content ol { margin: 0 0 1.2em 1.4em; }
.eib-site .eib-post-content li { margin-bottom: .4em; }
.eib-site .eib-post-content a { color: var(--azul); text-decoration: underline; text-underline-offset: 3px; }
.eib-site .eib-post-content img { border-radius: 12px; margin: 1.4em 0; }
.eib-site .eib-post-content blockquote { margin: 1.6em 0; padding: 16px 22px; border-left: 4px solid var(--amarillo); background: var(--hueso); border-radius: 0 12px 12px 0; font-style: italic; color: var(--gris); }
.eib-site .eib-post-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 32px; }
.eib-site .eib-post-tags span { padding: 5px 12px; border-radius: 999px; background: var(--hueso); color: var(--azul-oscuro); font-size: .8rem; font-weight: 600; }
.eib-site .eib-post-share { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--linea); font-size: .88rem; color: var(--gris); }
.eib-site .eib-post-share a { padding: 7px 14px; border-radius: 999px; border: 1px solid var(--linea); color: var(--azul-oscuro); font-weight: 600; transition: .2s; }
.eib-site .eib-post-share a:hover { background: var(--azul); border-color: var(--azul); color: #fff; }
.eib-site .eib-post-related { padding: 64px 0 96px; background: var(--hueso); }
.eib-site .eib-post-related .eib-news-grid { margin-top: 32px; }
@media (max-width: 980px) {
  .eib-site .eib-news-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .eib-site .eib-news-grid { grid-template-columns: 1fr; }
  .eib-site .eib-news-list { padding: 40px 0 64px; }
  .eib-site .eib-post-head { padding: 36px 0 48px; }
  .eib-site .eib-post-figure { margin-top: -20px; }
}
