/* Campus virtual · Fundación de Ciencias y Deportes "H.Fernández"
   Diseño y desarrollo: LDF - RVF · Equipo de Redes de la Fundación
   Mis cursos · v2 · Solo en /my/courses.php y con <html class="fh-nuevo">.
   Mientras carga, se oculta el contenido original; si el script no llega en 4 s, vuelve a mostrarse solo. */

/* mientras arma la página: ocultar el contenido original (con rescate automático) */
@keyframes fhm-rescate{to{visibility:visible}}
html.fh-nuevo body.pagelayout-mycourses:not(.fh-mc) #topofscroll{visibility:hidden;animation:fhm-rescate 0s linear 4s forwards}

/* página armada */
html.fh-nuevo body.fh-mc{background:#EEEBEA !important;background-image:none !important;font-family:'Jost',system-ui,sans-serif;-webkit-font-smoothing:antialiased}
html.fh-nuevo body.fh-mc #topofscroll,html.fh-nuevo body.fh-mc .drawer,html.fh-nuevo body.fh-mc .drawer-toggles,html.fh-nuevo body.fh-mc #page-footer,html.fh-nuevo body.fh-mc .btn-footer-popover,html.fh-nuevo body.fh-mc .footer-popover{display:none !important}
html.fh-nuevo body.fh-mc #page-wrapper,html.fh-nuevo body.fh-mc #page{background:transparent !important;background-image:none !important}
html.fh-nuevo body.fh-mc #page{padding:0 !important;margin-left:0 !important;margin-right:0 !important;max-width:none !important;width:100% !important;overflow:visible !important}

/* barra superior de Moodle con el estilo de la portada */
html.fh-nuevo body.fh-mc .navbar.fixed-top{background:#FFFFFF !important;border-bottom:1px solid #E6E1E2 !important;box-shadow:none !important}
html.fh-nuevo body.fh-mc .primary-navigation .nav-link{font-family:'Jost',system-ui,sans-serif;font-size:12px !important;font-weight:500 !important;letter-spacing:.16em;text-transform:uppercase;color:#1E1A1B !important;background:transparent !important;border-bottom:1px solid transparent !important}
html.fh-nuevo body.fh-mc .primary-navigation .nav-link:hover,html.fh-nuevo body.fh-mc .primary-navigation .nav-link.active{color:#7A1E2C !important;border-bottom-color:#7A1E2C !important}

/* ---------- contenido nuevo ---------- */
#fh-mc{position:relative;font-family:'Jost',system-ui,sans-serif;font-size:16px;line-height:1.6;color:#1E1A1B}
#fh-mc *{box-sizing:border-box}
#fh-mc a{text-decoration:none}
#fh-mc .fhm-cont{max-width:1240px;margin:0 auto;padding:0 48px}
#fh-mc .fhm-etq{font-size:12px;font-weight:500;letter-spacing:.16em;text-transform:uppercase;line-height:1.4}
#fhm-lados{position:fixed;inset:0;width:100vw;height:100vh;z-index:0;pointer-events:none;display:block}

/* franja de bienvenida */
#fh-mc .fhm-franja{position:relative;z-index:2;background:#151213;color:#FFFFFF;overflow:hidden;touch-action:pan-y}
#fh-mc .fhm-franja canvas{position:absolute;inset:0;width:100%;height:100%;display:block}
#fh-mc .fhm-franja::after{content:"";position:absolute;inset:0;pointer-events:none;background:radial-gradient(ellipse 60% 90% at 85% 50%,rgba(122,30,44,.35),rgba(122,30,44,0) 70%)}
#fh-mc .fhm-franja .fhm-cont{position:relative;z-index:1;padding-top:72px;padding-bottom:72px;display:grid;grid-template-columns:minmax(0,6fr) minmax(0,5fr);gap:56px;align-items:end;pointer-events:none}
#fh-mc .fhm-saludo{display:flex;flex-direction:column;gap:18px}
#fh-mc .fhm-saludo h1{margin:0;font-family:inherit;font-size:clamp(38px,5vw,52px);font-weight:300;line-height:1.06;letter-spacing:-.01em;color:#FFFFFF}
#fh-mc .fhm-saludo p{margin:0;max-width:520px;font-size:17px;font-weight:300;line-height:1.7;color:#E4DCDE}
#fh-mc .fhm-admin{display:flex;gap:18px;flex-wrap:wrap;pointer-events:auto}
#fh-mc .fhm-admin a{font-size:14px;color:#F0CDD4;text-decoration:underline;text-underline-offset:4px}
#fh-mc .fhm-admin a:hover{color:#FFFFFF}
#fh-mc .fhm-ultimo{pointer-events:auto;display:flex;flex-direction:column;gap:10px;padding:24px;border:1px solid rgba(255,255,255,.2);background:rgba(255,255,255,.05);border-radius:2px;color:#FFFFFF;backdrop-filter:blur(4px)}
#fh-mc .fhm-ultimo:hover{border-color:rgba(255,255,255,.5);color:#FFFFFF}
#fh-mc .fhm-ultimo[hidden]{display:none}
#fh-mc .fhm-ultimo-titulo{font-size:19px;font-weight:300;line-height:1.3}
#fh-mc .fhm-pie-ult{display:flex;justify-content:space-between;align-items:center;gap:16px;padding-top:14px;border-top:1px solid rgba(255,255,255,.16);font-size:13px;color:#D4CACD}
#fh-mc .fhm-boton-ult{position:relative;isolation:isolate;overflow:hidden;flex:none;display:inline-flex;align-items:center;gap:14px;min-height:42px;padding:0 6px 0 18px;border:1px solid rgba(255,255,255,.55);border-radius:2px;color:#FFFFFF;font-size:12px;font-weight:500;letter-spacing:.16em;text-transform:uppercase;white-space:nowrap;transition:color .4s ease,border-color .4s ease}
#fh-mc .fhm-boton-ult::before{content:"";position:absolute;inset:0;z-index:-1;background:#FFFFFF;transform:scaleX(0);transform-origin:left center;transition:transform .5s cubic-bezier(.65,0,.35,1)}
#fh-mc .fhm-boton-ult i{width:30px;height:30px;border-radius:50%;background:#FFFFFF;color:#7A1E2C;display:flex;align-items:center;justify-content:center;transition:background-color .4s ease,color .4s ease,transform .35s cubic-bezier(.65,0,.35,1)}
#fh-mc .fhm-ultimo:hover .fhm-boton-ult,#fh-mc .fhm-ultimo:focus-visible .fhm-boton-ult{color:#7A1E2C;border-color:#FFFFFF}
#fh-mc .fhm-ultimo:hover .fhm-boton-ult::before,#fh-mc .fhm-ultimo:focus-visible .fhm-boton-ult::before{transform:scaleX(1)}
#fh-mc .fhm-ultimo:hover .fhm-boton-ult i,#fh-mc .fhm-ultimo:focus-visible .fhm-boton-ult i{background:#7A1E2C;color:#FFFFFF;transform:translateX(2px)}

/* listado */
#fh-mc main.fhm-cont{position:relative;z-index:1;padding-top:64px;padding-bottom:120px}
#fh-mc .fhm-cab{display:flex;align-items:flex-end;justify-content:space-between;gap:28px;flex-wrap:wrap;margin-bottom:36px}
#fh-mc .fhm-cab-izq{display:flex;flex-direction:column;gap:10px}
#fh-mc .fhm-cab h2{margin:0;font-family:inherit;font-size:40px;font-weight:300;line-height:1.1;letter-spacing:-.01em;color:#1E1A1B}
#fh-mc .fhm-tabs{display:flex;gap:28px;flex-wrap:wrap}
#fh-mc .fhm-tabs button{min-height:44px;padding:0;border:0;border-bottom:1px solid transparent;border-radius:0;background:none;font:500 12px 'Jost',system-ui,sans-serif;letter-spacing:.16em;text-transform:uppercase;color:#6E6669;cursor:pointer}
#fh-mc .fhm-tabs button:hover{color:#1E1A1B}
#fh-mc .fhm-tabs button[aria-pressed="true"]{color:#1E1A1B;border-bottom-color:#7A1E2C}
#fh-mc .fhm-herr{display:flex;gap:12px;flex-wrap:wrap;align-items:center}
#fh-mc .fhm-buscar{position:relative;display:block}
#fh-mc .fhm-buscar svg{position:absolute;left:16px;top:17px;color:#7A7275}
#fh-mc .fhm-buscar input,#fh-mc .fhm-herr select{height:50px;border:1px solid #CFC8CB;border-radius:2px;background:#FFFFFF;font:400 15px 'Jost',system-ui,sans-serif;color:#1E1A1B;box-shadow:none}
#fh-mc .fhm-buscar input{width:300px;max-width:100%;padding:0 16px 0 44px}
#fh-mc .fhm-herr select{padding:0 14px}
#fh-mc .fhm-buscar input:focus,#fh-mc .fhm-herr select:focus{outline:none;border-color:#7A1E2C;box-shadow:0 0 0 3px rgba(122,30,44,.12)}
#fh-mc .fhm-oculto-txt{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
#fh-mc .fhm-grilla{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:28px}
#fh-mc .fhm-tarjeta{display:flex;flex-direction:column;background:#FFFFFF;border:1px solid #E6E1E2;border-radius:2px;overflow:hidden;color:#1E1A1B;transition:border-color .25s ease,transform .35s cubic-bezier(.16,1,.3,1),box-shadow .35s ease}
#fh-mc .fhm-tarjeta:hover,#fh-mc .fhm-tarjeta:focus-visible{border-color:#7A1E2C;transform:translateY(-3px);box-shadow:0 20px 40px -26px rgba(30,26,27,.45);color:#1E1A1B;outline:none}
#fh-mc .fhm-img{position:relative;display:block;aspect-ratio:16/9;background:#2A2124 center/cover no-repeat;overflow:hidden}
#fh-mc .fhm-img::before{content:"";position:absolute;inset:0;background:linear-gradient(180deg,rgba(21,18,19,.55) 0%,rgba(21,18,19,0) 45%)}
#fh-mc .fhm-img .fhm-etq{position:absolute;left:20px;top:16px;right:20px;font-size:11px;color:#FFFFFF}
#fh-mc .fhm-marca-oculto{position:absolute;left:20px;bottom:14px;padding:3px 8px;border-radius:2px;background:rgba(21,18,19,.75);color:#FFFFFF;font-size:11px;letter-spacing:.06em}
#fh-mc .fhm-cuerpo{padding:22px 24px 24px;display:flex;flex-direction:column;gap:14px;flex:1}
#fh-mc .fhm-titulo{font-size:20px;font-weight:300;line-height:1.3}
#fh-mc .fhm-pie{margin-top:auto;padding-top:14px;border-top:1px solid #EEEBEA;display:flex;justify-content:space-between;align-items:center;gap:12px;font-size:13px;color:#5C5658}
#fh-mc .fhm-boton{flex:none;display:inline-flex;align-items:center;gap:10px;min-height:40px;padding:0 16px;border-radius:2px;background:#EEEBEA;color:#7A1E2C;font-weight:500;letter-spacing:.14em;text-transform:uppercase;font-size:12px;white-space:nowrap;transition:background-color .25s ease,color .25s ease}
#fh-mc .fhm-boton::after,#fh-mc .fhm-boton-ult i::after{content:"";width:14px;height:14px;background:currentColor;-webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 8h10M9 4l4 4-4 4'/%3E%3C/svg%3E") center/contain no-repeat;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 8h10M9 4l4 4-4 4'/%3E%3C/svg%3E") center/contain no-repeat;transition:transform .3s cubic-bezier(.65,0,.35,1)}
#fh-mc .fhm-tarjeta:hover .fhm-boton,#fh-mc .fhm-tarjeta:focus-visible .fhm-boton{background:#7A1E2C;color:#FFFFFF}
#fh-mc .fhm-tarjeta:hover .fhm-boton::after{transform:translateX(3px)}
#fh-mc .fhm-vacio{margin:0;padding:48px 0;border-top:1px solid #DCD5D7;font-size:17px;font-weight:300;color:#5C5658}
#fh-mc .fhm-cargando .fhm-img,#fh-mc .fhm-cargando .fhm-linea{background:linear-gradient(90deg,#E6E1E2 0%,#F3EFEF 50%,#E6E1E2 100%);background-size:200% 100%;animation:fhm-brillo 1.4s linear infinite}
#fh-mc .fhm-linea{display:block;height:14px;border-radius:2px}
@keyframes fhm-brillo{to{background-position:-200% 0}}

/* pie (como el de la portada) */
html.fh-nuevo body.fh-mc [data-fhm-oculto],html.fh-nuevo body.fh-mc #page-wrapper > footer,html.fh-nuevo body.fh-mc #page > footer,html.fh-nuevo body.fh-mc #page-wrapper > *:not(#page):not(nav):not(.navbar):not(.fixed-top){display:none !important}
#fh-mc .fhm-piepag{position:relative;z-index:1;background:#151213;color:#B8AEB1;padding:80px 0 36px}
#fh-mc .fhm-pie-grid{display:grid;grid-template-columns:minmax(0,1.6fr) minmax(0,1fr) minmax(0,1fr) minmax(0,1.4fr);gap:48px}
#fh-mc .fhm-pie-col{display:flex;flex-direction:column;gap:12px;align-items:flex-start}
#fh-mc .fhm-pie-col p{margin:0}
#fh-mc .fhm-pie-nombre{font-size:20px;font-weight:400;line-height:1.35;color:#FFFFFF}
#fh-mc .fhm-pie-lema{font-size:17px;font-style:italic;font-weight:300;color:#D4CACD}
#fh-mc .fhm-pie-tit{margin:0 0 4px !important;color:#FFFFFF}
#fh-mc .fhm-enlace-pie{font-size:15px;font-weight:300;color:#D4CACD;text-decoration:none;overflow-wrap:anywhere;transition:color .2s ease-out}
#fh-mc .fhm-enlace-pie:hover{color:#FFFFFF}
#fh-mc .fhm-mail{color:#FFFFFF;text-decoration:underline;text-decoration-color:rgba(255,255,255,.35);text-underline-offset:5px}
#fh-mc .fhm-mail:hover{text-decoration-color:#FFFFFF}
#fh-mc .fhm-redes{display:flex;gap:12px}
#fh-mc .fhm-red{width:42px;height:42px;border-radius:50%;border:1px solid rgba(255,255,255,.4);display:flex;align-items:center;justify-content:center;color:#FFFFFF;transition:border-color .2s ease-out,background-color .2s ease-out,color .2s ease-out}
#fh-mc .fhm-red:hover{border-color:#FFFFFF;background:#FFFFFF;color:#7A1E2C}
#fh-mc .fhm-pie-usuario{font-size:14px;font-weight:300;color:#D4CACD}
#fh-mc .fhm-btn-wa{display:inline-flex;align-items:center;gap:10px;min-height:44px;margin-top:6px;padding:0 20px;border:1px solid rgba(255,255,255,.55);border-radius:2px;color:#FFFFFF;font-size:12px;font-weight:500;letter-spacing:.16em;text-transform:uppercase;transition:background-color .25s ease,color .25s ease,border-color .25s ease}
#fh-mc .fhm-btn-wa:hover{background:#FFFFFF;border-color:#FFFFFF;color:#7A1E2C}
#fh-mc .fhm-pie-legal{margin:56px 0 0;padding-top:24px;border-top:1px solid rgba(255,255,255,.12);display:flex;justify-content:space-between;align-items:center;gap:10px 32px;flex-wrap:wrap;font-size:13px;font-weight:300;color:#A89EA1}
#fh-mc .fhm-firma{display:inline-flex;align-items:center;gap:10px;color:#8E8487}
#fh-mc .fhm-ldf{display:inline-flex;align-items:center;justify-content:center;min-width:34px;height:20px;padding:0 6px;border:1px solid rgba(255,255,255,.22);border-radius:2px;font-size:10px;font-weight:500;letter-spacing:.18em;text-decoration:none;color:#C9BFC2;cursor:default}
@media (max-width:960px){#fh-mc .fhm-pie-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:40px}}
@media (max-width:640px){#fh-mc .fhm-pie-grid{grid-template-columns:minmax(0,1fr)}#fh-mc .fhm-piepag{padding-top:56px}}
#fh-mc a:focus-visible,#fh-mc button:focus-visible{outline:2px solid #C98A95;outline-offset:4px}

@media (max-width:960px){
  #fh-mc .fhm-grilla{grid-template-columns:repeat(2,minmax(0,1fr))}
  #fh-mc .fhm-franja .fhm-cont{grid-template-columns:minmax(0,1fr);gap:32px;padding-top:52px;padding-bottom:52px}
}
@media (max-width:640px){
  #fh-mc .fhm-cont{padding:0 20px}
  #fh-mc .fhm-grilla{grid-template-columns:minmax(0,1fr)}
  #fh-mc .fhm-cab h2{font-size:34px}
  #fh-mc .fhm-buscar,#fh-mc .fhm-buscar input,#fh-mc .fhm-herr select{width:100%}
  #fh-mc .fhm-herr{width:100%}
  #fh-mc .fhm-pie-ult{flex-wrap:wrap}
}
@media (prefers-reduced-motion:reduce){
  #fh-mc *,#fh-mc *::before,#fh-mc *::after{animation:none !important;transition:none !important}
}
