/*
Theme Name: FILO HUB UNGE BY JANEN
Theme URI: https://unge.example/
Author: BY JANEN
Author URI: https://quqos.com/
Description: Tema institucional para FILO HUB UNGE, plataforma integral de investigación filológica.
Version: 1.0.1
License: GPL v2 or later
Text Domain: filo-hub-unge
*/

:root{
  --verde:#0b5d3b;
  --verde2:#0f7a4c;
  --dorado:#c89b3c;
  --rojo:#b33a2e;
  --fondo:#f4f6f3;
  --texto:#1d2a24;
  --muted:#6d786f;
  --card:#ffffff;
  --linea:#dde5dd;
  --sombra:0 14px 35px rgba(20,40,30,.10);
  --radius:18px;
}
*{box-sizing:border-box}
body.filo-hub-body, body{
  margin:0;
  font-family:Arial, Helvetica, sans-serif;
  background:var(--fondo);
  color:var(--texto);
}
a{text-decoration:none;color:inherit}
.fh-header{
  background:linear-gradient(135deg,var(--verde),#083b28);
  color:white;
  padding:20px 32px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
  box-shadow:0 10px 30px rgba(0,0,0,.18);
  position:sticky;
  top:0;
  z-index:1000;
}
.fh-brand{display:flex;align-items:center;gap:16px}
.fh-escudo{
  width:56px;height:56px;border-radius:16px;
  background:linear-gradient(135deg,var(--dorado),#fff2c0);
  display:flex;align-items:center;justify-content:center;
  color:var(--verde);font-weight:900;font-size:22px;
  border:2px solid rgba(255,255,255,.6)
}
.fh-brand h1{font-size:22px;margin:0;letter-spacing:.5px}
.fh-brand p{margin:4px 0 0;font-size:13px;color:#d9efe4}
.fh-top-actions{display:flex;gap:10px;flex-wrap:wrap}
.fh-btn, .fh-button, button.fh-button{
  border:0;background:var(--verde);color:white;padding:11px 16px;border-radius:12px;cursor:pointer;font-weight:700;transition:.2s;display:inline-block
}
.fh-btn:hover,.fh-button:hover{transform:translateY(-1px);filter:brightness(1.05);color:white}
.fh-btn-light{background:white;color:var(--verde)}
.fh-btn-light:hover{color:var(--verde)}
.fh-btn-gold{background:var(--dorado);color:#2d2105}
.fh-btn-red{background:var(--rojo)}
.fh-layout{display:grid;grid-template-columns:270px 1fr;min-height:calc(100vh - 96px)}
.fh-aside{background:white;border-right:1px solid var(--linea);padding:22px 16px}
.fh-menu-title{font-size:12px;color:var(--muted);font-weight:800;margin:12px 12px;text-transform:uppercase}
.fh-nav-item{display:flex;align-items:center;gap:10px;padding:13px 14px;margin:6px 0;border-radius:14px;color:#33443a;cursor:pointer;font-weight:700}
.fh-nav-item.active,.fh-nav-item:hover{background:#eaf4ee;color:var(--verde)}
.fh-nav-item span{font-size:20px}
.fh-main{padding:28px;overflow:visible}
.fh-hero{background:linear-gradient(135deg,#ffffff,#edf7f1);border:1px solid var(--linea);border-radius:var(--radius);padding:28px;box-shadow:var(--sombra);display:grid;grid-template-columns:1.4fr .8fr;gap:24px;margin-bottom:24px}
.fh-hero h2{font-size:32px;margin:0 0 12px;color:var(--verde)}
.fh-hero p{font-size:16px;line-height:1.6;color:#46564c;margin:0 0 18px}
.fh-searchbox{display:flex;gap:10px;margin-top:18px}
.fh-input,.fh-textarea,.fh-searchbox input{flex:1;padding:14px 16px;border:1px solid var(--linea);border-radius:14px;font-size:15px;background:white;width:100%}
.fh-hero-card{background:var(--verde);color:white;border-radius:18px;padding:22px;position:relative;overflow:hidden}
.fh-hero-card:after{content:"";position:absolute;width:150px;height:150px;border-radius:50%;background:rgba(255,255,255,.12);right:-50px;bottom:-50px}
.fh-hero-card h3{margin:0 0 12px;font-size:20px;color:white}
.fh-metric-big{font-size:42px;font-weight:900;margin:8px 0;color:#ffe1a2}
.fh-hero-card p{color:rgba(255,255,255,.92)!important;font-size:14px;position:relative;z-index:1}
.fh-cards{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;margin-bottom:24px}
.fh-card{background:var(--card);border:1px solid var(--linea);border-radius:var(--radius);padding:20px;box-shadow:0 8px 22px rgba(20,40,30,.06);margin-bottom:18px}
.fh-card h3{margin:0 0 8px;font-size:16px;color:var(--verde)}
.fh-card .fh-num{font-size:30px;font-weight:900;margin:8px 0}
.fh-card p{margin:0;color:var(--muted);font-size:13px;line-height:1.4}
.fh-grid-2{display:grid;grid-template-columns:1fr 1fr;gap:18px;margin-bottom:20px}
.fh-section-title{display:flex;align-items:center;justify-content:space-between;margin-bottom:14px;gap:12px}
.fh-section-title h2{font-size:21px;margin:0;color:#20362b}
.fh-table{width:100%;border-collapse:collapse;font-size:14px}
.fh-table th,.fh-table td{text-align:left;padding:13px;border-bottom:1px solid var(--linea)}
.fh-table th{font-size:12px;text-transform:uppercase;color:var(--muted);background:#f8faf8}
.fh-badge{padding:5px 9px;border-radius:999px;font-size:12px;font-weight:800;display:inline-block}
.fh-ok{background:#16a34a!important;color:#fff!important;border-color:#16a34a!important;}.fh-warn{background:#fff0c9;color:#805c00}.fh-danger{background:#f8dedb;color:#8b231a}
.fh-textarea{height:130px;resize:vertical}
.fh-result-box{background:#f7faf7;border:1px dashed #c9d8cd;border-radius:14px;padding:15px;margin-top:14px;color:#405146;line-height:1.5}
.fh-knowledge-map{height:280px;position:relative;background:radial-gradient(circle at center,#f8fff9,#edf5ef);border-radius:18px;overflow:hidden;border:1px solid var(--linea)}
.fh-node{position:absolute;background:white;border:2px solid var(--verde2);border-radius:999px;padding:10px 14px;font-size:13px;font-weight:800;box-shadow:0 8px 20px rgba(0,0,0,.08)}
.fh-center-node{background:var(--verde);color:white;left:38%;top:42%;border-color:var(--dorado)}
.fh-n1{left:8%;top:18%}.fh-n2{right:10%;top:15%}.fh-n3{left:12%;bottom:18%}.fh-n4{right:14%;bottom:20%}.fh-n5{left:42%;top:8%}
.fh-article-list{display:grid;gap:12px}.fh-article{display:flex;justify-content:space-between;gap:14px;align-items:center;border:1px solid var(--linea);border-radius:15px;padding:14px;background:white}.fh-article h4{margin:0 0 5px;color:#20362b}.fh-article p{margin:0;color:var(--muted);font-size:13px}
.fh-footer{text-align:center;color:var(--muted);font-size:13px;padding:22px}.fh-hidden{display:none!important}
.fh-notice{padding:12px 14px;border-radius:14px;margin:10px 0;background:#eef7f1;border:1px solid #cfe3d5;color:#1d5a39;font-weight:700}
/* ═══════════════════════════════════════════════════════
   RESPONSIVE — reescritura completa limpia
   ═══════════════════════════════════════════════════════ */

/* Base global: evitar scroll horizontal en toda la web */
html, body {
  overflow-x: hidden;
  max-width: 100%;
}
*, *::before, *::after {
  box-sizing: border-box;
  max-width: 100%;
}
img, table, iframe, video {
  max-width: 100%;
}

/* ── DESKTOP (>1000px): layout sidebar + main ── */
@media(min-width:1001px){
  .fh-layout{display:grid;grid-template-columns:270px 1fr;min-height:calc(100vh - 96px)}
  .fh-aside{display:block;padding:22px 16px;background:white;border-right:1px solid var(--linea)}
  .fh-menu-title{display:block}
  .fh-hamburger{display:none!important}
  .fh-mobile-menu{display:none!important}
}

/* ── TABLET + MÓVIL (≤1000px): sin sidebar, con hamburguesa ── */
@media(max-width:1000px){
  .fh-layout{display:block}
  .fh-aside{display:none!important}
  .fh-hamburger{display:flex!important}
  .fh-main{padding:20px 16px}
  .fh-hero{grid-template-columns:1fr;gap:16px}
  .fh-cards{grid-template-columns:repeat(2,1fr)}
  .fh-grid-2{grid-template-columns:1fr}
  .fh-repo-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .fh-repo-hero{flex-direction:column;align-items:flex-start}
  .fh-repo-toolbar{grid-template-columns:1fr}
  .fh-tabs-lite{grid-template-columns:1fr}
  .fh-upload-grid{grid-template-columns:1fr}
  .fh-table{display:block;overflow-x:auto;-webkit-overflow-scrolling:touch;white-space:nowrap}
  .fh-form-row{grid-template-columns:1fr}
  .fh-review-form{min-width:0}
}

/* ── MÓVIL (≤640px) ── */
@media(max-width:640px){
  .fh-main{padding:14px 12px}
  .fh-hero{padding:16px}
  .fh-hero h2{font-size:20px!important;line-height:1.3}
  .fh-hero p{font-size:14px}
  .fh-metric-big{font-size:34px}
  .fh-hero-card{padding:16px}
  .fh-hero-card h3{font-size:17px}
  .fh-cards{grid-template-columns:1fr 1fr;gap:10px}
  .fh-card{padding:14px}
  .fh-card .fh-num{font-size:26px}
  .fh-card h3{font-size:14px}
  .fh-repo-grid{grid-template-columns:1fr}
  .fh-repo-hero{padding:14px}
  .fh-repo-hero h2{font-size:19px}
  .fh-doc-card{min-height:auto}
  .fh-section-title{flex-direction:column;align-items:flex-start;gap:8px}
  .fh-section-title h2{font-size:18px}
  .fh-grid-2{gap:12px}
  .fh-searchbox{flex-direction:column}
  .fh-knowledge-map{height:200px}
  .fh-node{font-size:11px;padding:6px 10px}
  .fh-table{font-size:12px}
  .fh-table th,.fh-table td{padding:8px 6px}
  .fh-modal-box{width:100%;border-radius:18px 18px 0 0}
  .fh-modal{align-items:flex-end;padding:0}
  .fh-modal-body{padding:14px}
  .fh-modal-head{padding:14px 16px}
  .fh-article-body{padding:14px;font-size:15px}
  .fh-article-file .fh-button{width:100%;text-align:center}
  .fh-doc-actions,.fh-repo-actions{flex-direction:column}
  .fh-doc-actions .fh-button,.fh-repo-actions .fh-button{width:100%;text-align:center}
  .fh-btn,.fh-button,button.fh-button{min-height:44px}
  .fh-input,.fh-textarea{font-size:16px;min-height:44px} /* evita zoom iOS */
  .fh-textarea{min-height:90px}
  .fh-search-result-top{flex-direction:row}
}

/* ── MÓVIL PEQUEÑO (≤400px) ── */
@media(max-width:400px){
  .fh-cards{grid-template-columns:1fr 1fr}
  .fh-card .fh-num{font-size:22px}
}

/* ── HEADER: IDÉNTICO EN TODOS LOS DISPOSITIVOS ── */
.fh-header{
  padding:16px 20px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  flex-wrap:nowrap;
}
.fh-brand{display:flex;align-items:center;gap:12px;flex:1;min-width:0;overflow:hidden}
.fh-escudo{flex-shrink:0;width:52px;height:52px;border-radius:14px;font-size:13px!important;letter-spacing:-.5px}
.fh-brand>div{min-width:0;overflow:hidden}
.fh-brand-faculty{
  font-size:10px;font-weight:800;color:#c8e8d8;
  letter-spacing:.02em;
  margin:0 0 2px;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
.fh-brand h1{
  font-size:15px;margin:0 0 1px;line-height:1.2;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
.fh-brand-sub{
  font-size:11px;color:#d9efe4;margin:0;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
.fh-brand-sub strong{color:#ffe1a2}
.fh-header-right{display:flex;align-items:center;gap:8px;flex-shrink:0}

@media(max-width:480px){
  .fh-header{padding:12px 14px}
  .fh-escudo{width:42px;height:42px;font-size:11px!important;border-radius:10px}
  .fh-brand h1{font-size:13px}
  .fh-brand-faculty{font-size:9px}
  .fh-header-right .fh-btn-gold{display:none} /* se accede por repositorio */
}

/* ── HAMBURGUESA ── */
.fh-hamburger{
  display:none;
  flex-direction:column;justify-content:center;align-items:center;gap:5px;
  width:44px;height:44px;flex-shrink:0;
  background:rgba(255,255,255,.18);border:1.5px solid rgba(255,255,255,.35);
  border-radius:11px;cursor:pointer;padding:0;transition:background .2s;
}
.fh-hamburger span{
  display:block;width:20px;height:2px;background:white;border-radius:2px;
  transition:transform .25s,opacity .2s;transform-origin:center;
}
.fh-hamburger:hover,.fh-hamburger:focus{background:rgba(255,255,255,.28);outline:none}
.fh-hamburger-open span:nth-child(1){transform:translateY(7px) rotate(45deg)}
.fh-hamburger-open span:nth-child(2){opacity:0;transform:scaleX(0)}
.fh-hamburger-open span:nth-child(3){transform:translateY(-7px) rotate(-45deg)}

/* ── MENÚ MÓVIL (drawer) ── */
.fh-mobile-menu{
  position:fixed;inset:0;z-index:9999;
  display:none;align-items:stretch;
}
.fh-mobile-menu.fh-mobile-menu-open{display:flex}
.fh-mobile-menu-backdrop{
  flex:1;background:rgba(3,20,13,.58);
  -webkit-backdrop-filter:blur(3px);backdrop-filter:blur(3px);
}
.fh-mobile-menu-panel{
  width:min(290px,80vw);background:white;
  display:flex;flex-direction:column;
  box-shadow:-6px 0 40px rgba(0,0,0,.28);
  overflow-y:auto;
  animation:fhSlideIn .22s ease;
}
@keyframes fhSlideIn{from{transform:translateX(100%)}to{transform:translateX(0)}}
.fh-mobile-menu-head{
  display:flex;align-items:center;justify-content:space-between;
  padding:16px 18px;
  background:linear-gradient(135deg,var(--verde),#083b28);
  color:white;font-weight:800;font-size:14px;
  letter-spacing:.02em;flex-shrink:0;
}
.fh-mobile-menu-head button{
  background:rgba(255,255,255,.18);border:1px solid rgba(255,255,255,.3);
  color:white;border-radius:8px;width:34px;height:34px;
  font-size:18px;cursor:pointer;display:flex;align-items:center;justify-content:center;
}
.fh-mobile-nav-item{
  display:flex;align-items:center;gap:14px;
  padding:15px 20px;font-size:16px;font-weight:700;color:#1d3328;
  cursor:pointer;border-bottom:1px solid var(--linea);
  transition:background .15s;-webkit-tap-highlight-color:rgba(0,0,0,.05);
}
.fh-mobile-nav-item span{font-size:22px;flex-shrink:0}
.fh-mobile-nav-item:hover,.fh-mobile-nav-item.active{background:#eaf4ee;color:var(--verde)}
.fh-mobile-nav-item.active{border-left:4px solid var(--verde);padding-left:16px}
body.fh-modal-lock{overflow:hidden}

/* Botón "Subir investigación" en móvil: dentro del menú en vez del header */
.fh-mobile-menu-upload{
  padding:16px 18px;margin-top:auto;border-top:1px solid var(--linea);
}
.fh-mobile-menu-upload .fh-btn-gold{width:100%;text-align:center;display:block;padding:13px}

/* ── FORMULARIOS Y UPLOAD AREA ── */
#fhUploadArea form,
#fhUploadArea .fh-mini-card,
#fhUploadArea .fh-tabs-lite,
#fhUploadArea .fh-academic-box{display:revert!important}
#fhUploadArea .fh-card form{display:grid!important}

/* Repo: ocultar forms públicos heredados (NO los del upload area) */
#repositorio>.fh-repo-hero~form,
#repositorio .fh-auth-grid,
#repositorio .fh-login-box,
#repositorio .fh-register-box,
#repositorio .fh-auth-card{display:none!important}


/* ═══════════════════════════════════════════════════════
   MOBILE HARD FIX BY JANEN — responsive real + menú estable
   ═══════════════════════════════════════════════════════ */
html,body{width:100%;min-width:0;overflow-x:hidden!important}
body.fh-modal-lock{position:relative;overflow:hidden!important;touch-action:none}
.fh-main,.fh-layout,.fh-panel,.fh-card,.fh-hero,.fh-repo-hero,.fh-doc-card,.fh-modal-box{min-width:0;max-width:100%}
.fh-main{width:100%}.fh-panel{width:100%}
.fh-button,.fh-btn{white-space:normal;text-align:center;line-height:1.25}
.fh-section-title .fh-button{flex-shrink:0}
.fh-grid-2,.fh-cards,.fh-repo-grid,.fh-upload-grid,.fh-form-row,.fh-tabs-lite,.fh-repo-toolbar{min-width:0}
.fh-card{overflow:hidden}.fh-card > *{max-width:100%}
.fh-knowledge-map{width:100%;min-width:0;overflow:hidden}
.fh-node{max-width:46%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.fh-table{table-layout:auto;max-width:100%}
.fh-table th,.fh-table td{vertical-align:top;word-break:break-word}
.fh-mobile-menu{pointer-events:none;opacity:0;transition:opacity .18s ease;display:flex!important;visibility:hidden}
.fh-mobile-menu.fh-mobile-menu-open{pointer-events:auto;opacity:1;visibility:visible}
.fh-mobile-menu-panel{transform:translateX(105%);transition:transform .22s ease;margin-left:auto;height:100dvh;max-height:100dvh}
.fh-mobile-menu.fh-mobile-menu-open .fh-mobile-menu-panel{transform:translateX(0)}
.fh-mobile-menu-backdrop{min-width:0}
.fh-hamburger{touch-action:manipulation;z-index:10001}
.fh-hamburger span{max-width:none}
.fh-modal{position:fixed;inset:0;z-index:10000;background:rgba(0,0,0,.48);display:none;align-items:center;justify-content:center;padding:18px}
.fh-modal.fh-modal-open{display:flex}
.fh-modal-backdrop{position:absolute;inset:0}
.fh-modal-box{position:relative;background:#fff;border-radius:20px;width:min(920px,96vw);max-height:92dvh;overflow:hidden;display:flex;flex-direction:column;box-shadow:0 20px 60px rgba(0,0,0,.28)}
.fh-modal-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;padding:16px 18px;border-bottom:1px solid var(--linea);background:#f8faf8;flex-shrink:0}
.fh-modal-head h2{margin:0;color:var(--verde);font-size:20px}.fh-modal-head p{margin:4px 0 0;color:var(--muted)}
.fh-modal-close{border:0;background:var(--verde);color:#fff;border-radius:10px;min-width:40px;height:40px;font-size:24px;line-height:1;cursor:pointer;flex-shrink:0}
.fh-modal-body{padding:18px;overflow:auto;-webkit-overflow-scrolling:touch}
.fh-search-result{border:1px solid var(--linea);border-radius:14px;padding:14px;margin-bottom:12px;background:#fff}.fh-search-result-top{display:flex;justify-content:space-between;gap:12px;align-items:flex-start}.fh-search-result-info{min-width:0}.fh-search-result h3{margin:0 0 4px;color:#20362b}.fh-search-empty,.fh-search-loading{padding:16px;border:1px dashed #c9d8cd;border-radius:14px;background:#f7faf7;color:#405146}
.fh-doc-actions,.fh-repo-actions{display:flex;gap:10px;flex-wrap:wrap}.fh-doc-meta{display:flex;gap:8px;flex-wrap:wrap;color:var(--muted);font-size:13px}.fh-doc-card{display:flex;flex-direction:column;gap:10px}.fh-doc-top{display:flex;justify-content:space-between;gap:8px;align-items:center}.fh-doc-type{font-weight:800;color:var(--verde)}
.fh-repo-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}.fh-repo-toolbar{display:grid;grid-template-columns:1fr 260px;gap:12px;margin:16px 0}.fh-repo-hero{display:flex;align-items:center;justify-content:space-between;gap:18px;background:linear-gradient(135deg,#fff,#edf7f1);border:1px solid var(--linea);border-radius:var(--radius);padding:22px;box-shadow:var(--sombra);margin-bottom:16px}.fh-kicker{font-size:12px;text-transform:uppercase;color:var(--verde);font-weight:900;letter-spacing:.05em}.fh-repo-hero h2{margin:6px 0;color:var(--verde)}.fh-repo-hero p{margin:0;color:#46564c;line-height:1.5}
@media(max-width:1000px){
  .fh-header{position:sticky;top:0;z-index:9000}.fh-layout{display:block!important}.fh-aside{display:none!important}.fh-hamburger{display:flex!important}.fh-main{padding:16px!important}.fh-hero{grid-template-columns:1fr!important}.fh-cards{grid-template-columns:repeat(2,minmax(0,1fr))!important}.fh-grid-2{grid-template-columns:1fr!important}.fh-repo-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.fh-repo-toolbar{grid-template-columns:1fr}.fh-repo-hero{flex-direction:column;align-items:stretch}.fh-repo-actions .fh-button{flex:1}.fh-table{display:block;width:100%;overflow-x:auto;white-space:nowrap;-webkit-overflow-scrolling:touch}.fh-table th,.fh-table td{white-space:normal;min-width:110px}.fh-mobile-menu{z-index:99999!important}
}
@media(max-width:640px){
  .fh-header{padding:10px 12px!important}.fh-brand{gap:9px}.fh-escudo{width:40px!important;height:40px!important;font-size:10px!important}.fh-brand h1{font-size:12px!important}.fh-brand-faculty{font-size:8px!important}.fh-brand-sub{font-size:9px!important}.fh-main{padding:12px!important}.fh-hero,.fh-card,.fh-repo-hero{padding:14px!important;border-radius:16px}.fh-hero h2{font-size:19px!important}.fh-cards{grid-template-columns:1fr 1fr!important}.fh-card{margin-bottom:12px}.fh-card h3{font-size:15px}.fh-card .fh-num{font-size:28px}.fh-section-title{display:flex!important;flex-direction:column!important;align-items:stretch!important}.fh-section-title h2{font-size:20px!important}.fh-section-title .fh-button{width:100%;min-height:48px;display:flex;align-items:center;justify-content:center}.fh-grid-2{display:flex!important;flex-direction:column!important}.fh-knowledge-map{height:240px!important}.fh-center-node{left:31%!important;top:42%!important}.fh-n1{left:8%!important;top:18%!important}.fh-n2{right:5%!important;top:17%!important}.fh-n3{left:8%!important;bottom:18%!important}.fh-n4{right:4%!important;bottom:20%!important}.fh-n5{left:42%!important;top:8%!important}.fh-node{font-size:12px!important;padding:7px 10px!important;max-width:44%}.fh-searchbox{flex-direction:column}.fh-button,.fh-btn{width:auto;min-height:46px;padding:12px 14px}.fh-repo-grid{grid-template-columns:1fr}.fh-repo-actions,.fh-doc-actions{flex-direction:column}.fh-repo-actions .fh-button,.fh-doc-actions .fh-button{width:100%}.fh-mobile-menu-panel{width:min(330px,86vw)}.fh-mobile-nav-item{min-height:52px}.fh-table{font-size:13px}.fh-table th,.fh-table td{padding:10px 8px;min-width:120px}.fh-modal{align-items:flex-end;padding:0}.fh-modal-box{width:100vw;max-height:94dvh;border-radius:18px 18px 0 0}.fh-modal-head h2{font-size:18px}.fh-search-result-top{flex-direction:column}.fh-result-open-btn{width:100%;display:block}.fh-input,.fh-textarea,.fh-searchbox input{font-size:16px!important;min-height:46px}
}
@media(max-width:380px){.fh-cards{grid-template-columns:1fr!important}.fh-brand-sub{display:none}.fh-node{font-size:11px!important;max-width:48%}}


/* ═══════════════════════════════════════════════════════
   FIX FINAL MENÚ MÓVIL IZQUIERDO + MÓDULOS VISIBLES BY JANEN
   ═══════════════════════════════════════════════════════ */
@media(max-width:1000px){
  .fh-header{display:flex!important;align-items:center!important;justify-content:flex-start!important;gap:10px!important;position:sticky!important;top:0!important;z-index:9000!important;width:100%!important;max-width:100vw!important}
  .fh-hamburger{display:flex!important;order:0!important;flex:0 0 44px!important;width:44px!important;height:44px!important;margin:0!important}
  .fh-brand{order:1!important;flex:1 1 auto!important;min-width:0!important;overflow:hidden!important}
  .fh-header-right{order:2!important;flex:0 0 auto!important}
  .fh-header-right .fh-btn-gold{display:none!important}
  .fh-mobile-menu{position:fixed!important;inset:0!important;z-index:99999!important;display:flex!important;align-items:stretch!important;pointer-events:none!important;opacity:0!important;visibility:hidden!important}
  .fh-mobile-menu.fh-mobile-menu-open{pointer-events:auto!important;opacity:1!important;visibility:visible!important}
  .fh-mobile-menu-backdrop{order:2!important;flex:1 1 auto!important;background:rgba(3,20,13,.58)!important;min-width:0!important}
  .fh-mobile-menu-panel{order:1!important;margin-left:0!important;margin-right:0!important;width:min(330px,86vw)!important;height:100dvh!important;max-height:100dvh!important;transform:translateX(-105%)!important;transition:transform .22s ease!important;box-shadow:6px 0 40px rgba(0,0,0,.28)!important;overflow-y:auto!important}
  .fh-mobile-menu.fh-mobile-menu-open .fh-mobile-menu-panel{transform:translateX(0)!important}
  .fh-mobile-nav-item{display:flex!important;align-items:center!important;min-height:54px!important;font-size:16px!important;line-height:1.25!important}
  .fh-mobile-menu-upload{display:block!important}
}
@media(min-width:1001px){
  .fh-header{justify-content:space-between!important}
  .fh-hamburger{display:none!important}
  .fh-header-right .fh-btn-gold{display:inline-block!important}
}
@media(max-width:480px){
  .fh-header{padding:10px 12px!important}
  .fh-brand h1{font-size:12px!important;line-height:1.15!important}
  .fh-brand-faculty{font-size:8px!important}
  .fh-brand-sub{font-size:9px!important}
}

/* BY JANEN - editor completo para artículos de revista */
.fh-editor-wrap{display:flex;flex-direction:column;gap:10px;margin:10px 0 14px}
.fh-editor-label{font-weight:800;color:var(--verde-oscuro)}
.fh-editor-toolbar{display:flex;flex-wrap:wrap;gap:8px;background:#f6fbf8;border:1px solid var(--linea);border-radius:14px;padding:8px;position:sticky;top:0;z-index:2}
.fh-editor-toolbar button{border:1px solid #cfe2d6;background:white;border-radius:10px;padding:8px 12px;font-weight:800;cursor:pointer;color:#153b2a}
.fh-editor-toolbar button:hover{background:#eaf5ef}
.fh-rich-editor{min-height:320px;border:1px solid var(--linea);border-radius:16px;background:white;padding:16px;line-height:1.65;outline:none;overflow:auto}
.fh-rich-editor:empty:before{content:attr(data-placeholder);color:#7a8780}
.fh-rich-editor h2{font-size:22px;margin:14px 0 8px;color:var(--verde)}
.fh-rich-editor p{margin:0 0 12px}
.fh-rich-editor img,.fh-article-full img,.fh-article-inline-images img{max-width:100%;height:auto;border-radius:14px;margin:10px 0;display:block}
.fh-image-upload{display:none!important}
.fh-article-inline-images{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:12px;margin-top:18px}
.fh-article-inline-images figure{margin:0}
@media(max-width:760px){.fh-rich-editor{min-height:260px;font-size:16px}.fh-editor-toolbar{position:relative}.fh-editor-toolbar button{flex:1 1 auto;min-height:42px}.fh-editor-wrap{margin-top:14px}}

/* ═══════════════════════════════════════════════════════
   MENÚ MÓVIL SIN HAMBURGUESA + CONTADORES CLICABLES BY JANEN
   ═══════════════════════════════════════════════════════ */
.fh-mobile-topnav{display:none}
.fh-counter-card{border:1px solid var(--linea);appearance:none;text-align:left;cursor:pointer;font-family:inherit;color:inherit;transition:transform .15s ease, box-shadow .15s ease, border-color .15s ease;background:var(--card)}
.fh-counter-card:hover,.fh-counter-card:focus{transform:translateY(-2px);box-shadow:0 12px 28px rgba(20,40,30,.12);border-color:#9fc6ad;outline:none}
.fh-counter-card:after{content:'Abrir →';display:inline-flex;margin-top:12px;font-size:12px;font-weight:900;color:var(--verde);background:#eaf4ee;border-radius:999px;padding:6px 10px}
@media(max-width:1000px){
  .fh-hamburger,.fh-mobile-menu{display:none!important;visibility:hidden!important;pointer-events:none!important}
  .fh-header{position:sticky!important;top:0!important;z-index:9000!important;justify-content:space-between!important;padding:12px 14px!important;gap:10px!important}
  .fh-brand{max-width:100%!important}
  .fh-header-right .fh-btn-gold{display:none!important}
  .fh-mobile-topnav{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;padding:10px 12px;background:#fff;border-bottom:1px solid var(--linea);position:sticky;top:66px;z-index:8999;box-shadow:0 8px 18px rgba(20,40,30,.07)}
  .fh-mobile-top-item{appearance:none;border:1px solid #dbe8df;background:#f8fbf9;border-radius:14px;min-height:54px;padding:7px 5px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;color:#20362b;font-family:inherit;cursor:pointer;font-size:11px;font-weight:900;line-height:1.05;text-align:center;overflow:hidden}
  .fh-mobile-top-item span{font-size:18px;line-height:1}
  .fh-mobile-top-item b{font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}
  .fh-mobile-top-item.active{background:var(--verde);border-color:var(--verde);color:#fff;box-shadow:0 8px 18px rgba(15,102,64,.22)}
  .fh-hero{padding:18px!important;margin-bottom:14px!important}
  .fh-hero h2{font-size:21px!important;line-height:1.22!important;margin-bottom:8px!important}
  .fh-hero p{font-size:14px!important;line-height:1.45!important;margin-bottom:10px!important}
  .fh-hero-card{display:none!important}
  .fh-cards{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important;margin-bottom:14px!important}
  .fh-card{padding:14px!important;margin-bottom:10px!important;border-radius:16px!important}
  .fh-counter-card p{font-size:12px!important;line-height:1.25!important}
  .fh-counter-card:after{font-size:11px;margin-top:9px;padding:5px 9px}
  .fh-main{padding:14px 12px!important}
}
@media(max-width:560px){
  .fh-mobile-topnav{grid-template-columns:repeat(4,minmax(0,1fr));top:62px;padding:8px 10px;gap:7px;overflow:visible}
  .fh-mobile-top-item{min-height:50px;border-radius:12px;padding:6px 4px}
  .fh-mobile-top-item span{font-size:17px}.fh-mobile-top-item b{font-size:10px}
  .fh-brand-faculty{display:block!important;font-size:8px!important;line-height:1.15!important;white-space:normal!important;overflow:visible!important;text-overflow:clip!important;margin-top:2px!important}
  .fh-brand h1{font-size:12px!important;white-space:normal!important;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
  .fh-brand-sub{font-size:9px!important;display:none!important}
  .fh-escudo{width:42px!important;height:42px!important}
  .fh-hero h2{font-size:18px!important}
  .fh-hero p{display:none!important}
  .fh-searchbox{margin-top:8px!important}
}
@media(max-width:390px){
  .fh-mobile-topnav{grid-template-columns:repeat(3,minmax(0,1fr));position:relative;top:auto}
  .fh-cards{grid-template-columns:1fr 1fr!important}
  .fh-counter-card h3{font-size:13px!important}.fh-card .fh-num{font-size:24px!important}
}

.fh-assistant-results{display:grid;gap:12px;margin-top:10px}
.fh-assistant-match{border:1px solid #dbe7df;background:#f8fbf8;border-radius:14px;padding:12px}
.fh-assistant-match p{margin:5px 0;color:#33443a}
.fh-mini-btn{display:inline-flex!important;padding:7px 10px!important;font-size:13px!important;min-height:auto!important}


/* Ajuste institucional móvil BY JANEN */
@media(max-width:640px){
  .fh-brand h1{font-size:12px!important;line-height:1.15!important;margin:0 0 2px!important;}
  .fh-brand-faculty{display:block!important;font-size:8px!important;line-height:1.15!important;color:#c8e8d8!important;font-weight:700!important;white-space:normal!important;overflow:visible!important;text-overflow:clip!important;margin:0!important;}
  .fh-brand-sub{display:none!important;}
}

/* ═══════════════════════════════════════════════════════
   FIX DEFINITIVO TÍTULO PRINCIPAL EN DOS LÍNEAS BY JANEN
   Mantiene la tarjeta verde estable y evita desbordamientos.
   ═══════════════════════════════════════════════════════ */
.fh-hero{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) minmax(280px,312px)!important;
  align-items:stretch!important;
  gap:24px!important;
  overflow:hidden!important;
}
.fh-hero-content{min-width:0!important;max-width:100%!important;overflow:hidden!important;}
.fh-hero-title,
.fh-hero h2.fh-hero-title{
  margin:0 0 12px!important;
  color:var(--verde)!important;
  font-size:clamp(16px,1.25vw,22px)!important;
  line-height:1.22!important;
  font-weight:900!important;
  letter-spacing:-.045em!important;
  text-transform:uppercase!important;
  max-width:100%!important;
  overflow:visible!important;
}
.fh-hero-title span{display:block!important;white-space:nowrap!important;max-width:100%!important;}
.fh-hero-card{width:100%!important;min-width:0!important;max-width:312px!important;justify-self:end!important;}
.fh-hero-card h3{overflow-wrap:normal!important;word-break:normal!important;}
.fh-hero-card p{overflow-wrap:normal!important;word-break:normal!important;}

@media(min-width:1400px){
  .fh-hero{grid-template-columns:minmax(0,1fr) minmax(300px,330px)!important;}
  .fh-hero-card{max-width:330px!important;}
  .fh-hero-title,.fh-hero h2.fh-hero-title{font-size:24px!important;}
}

@media(max-width:1180px) and (min-width:1001px){
  .fh-hero{grid-template-columns:minmax(0,1fr) 270px!important;gap:18px!important;padding:26px!important;}
  .fh-hero-card{max-width:270px!important;padding:20px!important;}
  .fh-hero-title,.fh-hero h2.fh-hero-title{font-size:15px!important;line-height:1.25!important;letter-spacing:-.05em!important;}
}

@media(max-width:1000px){
  .fh-hero{grid-template-columns:1fr!important;gap:14px!important;overflow:hidden!important;}
  .fh-hero-content{width:100%!important;}
  .fh-hero-card{display:none!important;}
  .fh-hero-title,.fh-hero h2.fh-hero-title{
    font-size:clamp(12px,2.9vw,18px)!important;
    line-height:1.23!important;
    letter-spacing:-.055em!important;
    margin-bottom:8px!important;
  }
  .fh-hero-title span{white-space:nowrap!important;}
}

@media(max-width:560px){
  .fh-hero{padding:16px!important;}
  .fh-hero-title,.fh-hero h2.fh-hero-title{
    font-size:clamp(10.5px,3.15vw,12px)!important;
    line-height:1.24!important;
    letter-spacing:-.065em!important;
  }
}

@media(max-width:380px){
  .fh-hero-title,.fh-hero h2.fh-hero-title{
    font-size:10px!important;
    letter-spacing:-.07em!important;
  }
}


/* Administración visible para todos; acceso protegido por rol */
.fh-admin-cards .fh-card,
.fh-admin-card{ text-decoration:none; color:inherit; display:block; }
.fh-access-denied{ text-align:center; max-width:760px; margin:0 auto; padding:34px; }
.fh-lock-icon{ font-size:46px; margin-bottom:10px; }
.fh-mobile-top-item[data-panel="administracion"],
.fh-nav-item[data-panel="administracion"],
.fh-mobile-nav-item[data-panel="administracion"]{ font-weight:800; }


/* Login de administración desde el botón Administración */
.fh-admin-login-card{ max-width:620px; }
.fh-admin-login-box{ max-width:430px; margin:18px auto 14px; text-align:left; }
.fh-admin-login-box form{ display:grid; gap:12px; }
.fh-admin-login-box label{ font-weight:800; color:#20362b; font-size:14px; }
.fh-admin-login-box input[type="text"],
.fh-admin-login-box input[type="password"]{
  width:100%; padding:14px 16px; border:1px solid var(--linea);
  border-radius:14px; font-size:15px; background:#fff;
}
.fh-admin-login-box .login-remember label{ display:flex; align-items:center; gap:8px; font-weight:700; }
.fh-admin-login-box .button,
.fh-admin-login-box input[type="submit"]{
  border:0; border-radius:14px; padding:13px 18px; background:var(--verde);
  color:#fff; font-weight:900; cursor:pointer; min-height:44px;
}
.fh-button-light{ background:#eaf4ee!important; color:var(--verde)!important; margin-top:8px; }
@media(max-width:640px){ .fh-admin-login-card{padding:22px 16px;} .fh-admin-login-box{max-width:100%;} }


/* Botón cerrar sesión y pie de contacto BY JANEN */
.fh-header-right{display:flex!important;align-items:center!important;gap:10px!important;flex-wrap:wrap!important;justify-content:flex-end!important;}
.fh-btn-logout{background:#eaf4ee!important;color:var(--verde)!important;border:1px solid rgba(255,255,255,.45)!important;box-shadow:none!important;font-weight:900!important;}
.fh-btn-logout:hover{filter:brightness(.96);}
.fh-footer{
  display:flex!important;
  flex-direction:column!important;
  align-items:center!important;
  justify-content:center!important;
  gap:4px!important;
  padding:18px 14px!important;
  text-align:center!important;
  color:var(--verde)!important;
  background:#f6faf7!important;
  border-top:1px solid #dbe8df!important;
  font-size:14px!important;
  font-weight:700!important;
}
.fh-footer strong{font-size:14px!important;font-weight:900!important;}
.fh-footer span{font-size:13px!important;color:#33443a!important;font-weight:700!important;}
@media(max-width:640px){
  .fh-header-right{gap:6px!important;}
  .fh-btn-logout{padding:9px 10px!important;font-size:12px!important;}
  .fh-header .fh-btn-gold{padding:9px 10px!important;font-size:12px!important;}
  .fh-footer{font-size:12px!important;padding:16px 10px!important;}
  .fh-footer span{font-size:12px!important;}
}

/* BY JANEN - mapa del conocimiento clicable */
.fh-knowledge-btn{cursor:pointer;font-family:inherit;color:var(--verde);text-align:center;line-height:1.15;transition:transform .15s ease, box-shadow .15s ease, background .15s ease}
.fh-knowledge-btn:hover,.fh-knowledge-btn:focus{transform:translateY(-2px);box-shadow:0 14px 26px rgba(0,0,0,.14);background:#f4fff7;outline:none}
.fh-knowledge-results{display:flex;flex-direction:column;gap:18px}
.fh-knowledge-group{border:1px solid var(--linea);border-radius:16px;padding:14px;background:#fbfdfb}
.fh-knowledge-group>h3{margin:0 0 12px;color:var(--verde);font-size:18px;display:flex;justify-content:space-between;gap:12px;align-items:center}
.fh-knowledge-group>h3 span{background:var(--verde);color:white;border-radius:999px;padding:4px 10px;font-size:12px}
.fh-knowledge-result{margin-bottom:10px}
.fh-knowledge-result:last-child{margin-bottom:0}
