/* AF Menú — base (escritorio). Las reglas móviles están en mobile.css y se envuelven en el punto de corte configurado. */
#afm,#afm *,#afm-bottom,#afm-bottom *{box-sizing:border-box}
#afm{position:relative;z-index:9990;width:100%;background:var(--afm-bg);color:var(--afm-tx);font-family:var(--afm-font);font-size:15px;line-height:1.25}
#afm.afm-sticky{position:sticky;top:var(--wp-admin--admin-bar--height,0px)}
#afm ul{list-style:none;margin:0;padding:0}
#afm li{margin:0;padding:0}
#afm a,#afm button{font:inherit;color:inherit;text-decoration:none}
#afm button{background:none;border:0;cursor:pointer;padding:0;margin:0;box-shadow:none;text-transform:none}
#afm :focus-visible,#afm-bottom :focus-visible{outline:3px solid var(--afm-ac);outline-offset:2px}
html.afm-lock{overflow:hidden}

/* Redes */
#afm .afm-top{display:flex;justify-content:center;gap:6px;padding:8px 12px 0;max-height:52px;overflow:hidden;transition:max-height .25s ease,padding .25s ease,opacity .2s ease}
#afm .afm-soc{display:grid;place-items:center;width:34px;height:34px;border-radius:50%;opacity:.85;transition:background .2s,color .2s,transform .2s,opacity .2s}
#afm .afm-soc svg{width:18px;height:18px}
#afm .afm-soc:hover{background:var(--afm-ac);color:var(--afm-actx);opacity:1;transform:translateY(-2px)}
#afm.is-scrolled .afm-top{max-height:0;padding-top:0;opacity:0}

/* Barra principal */
#afm .afm-bar{display:flex;align-items:center;gap:20px;max-width:1400px;margin:0 auto;padding:8px 20px}
#afm .afm-logo{display:block;flex:none}
#afm .afm-logo img{display:block;height:var(--afm-logo);width:auto;max-width:none;transition:height .25s ease}
#afm.is-scrolled .afm-logo img{height:calc(var(--afm-logo) * .62)}
#afm .afm-lt{font-weight:900;font-size:1.4em}
#afm .afm-nav{flex:1;min-width:0}
#afm .afm-list{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:4px}
#afm .afm-link{display:inline-flex;align-items:center;gap:7px;padding:10px 14px;border-radius:12px;font-weight:800;white-space:nowrap;transition:background .2s,color .2s}
#afm .afm-i{font-size:1.25em;line-height:1}
#afm .afm-badge{font-style:normal;font-size:.68em;font-weight:900;padding:2px 6px;border-radius:99px;background:var(--afm-ac);color:var(--afm-actx)}
#afm .afm-list>li>.afm-link:hover,#afm .afm-has:focus-within>.afm-link{background:rgba(255,255,255,.15)}
#afm .afm-list .afm-link.active{box-shadow:inset 0 -3px 0 var(--afm-ac)}
#afm .afm-cta{background:var(--afm-ac);color:var(--afm-actx)!important;animation:afmPulse 2.8s ease-out infinite}
#afm .afm-cta:hover{background:var(--afm-ac)!important;filter:brightness(1.06)}
#afm .afm-cta .afm-badge{background:var(--afm-actx);color:var(--afm-ac)}
@keyframes afmPulse{0%{box-shadow:0 0 0 0 color-mix(in srgb,var(--afm-ac) 65%,transparent)}70%,100%{box-shadow:0 0 0 12px transparent}}

/* Desplegables */
#afm .afm-has{position:relative;display:flex;align-items:center}
#afm .afm-tg{display:grid;place-items:center;width:26px;height:26px;margin-left:-8px;border-radius:8px}
#afm .afm-tg svg{width:14px;height:14px;transition:transform .2s}
#afm .afm-has.open>.afm-tg svg{transform:rotate(180deg)}
#afm .afm-sub{position:absolute;top:100%;left:0;min-width:250px;padding:8px;background:#fff;color:#12233a;border-radius:14px;box-shadow:0 18px 40px rgba(0,20,50,.35);opacity:0;visibility:hidden;transform:translateY(8px);transition:opacity .18s,transform .18s,visibility .18s;z-index:5}
#afm .afm-list>.afm-has:nth-last-child(-n+2)>.afm-sub{left:auto;right:0}
#afm .afm-has:hover>.afm-sub,#afm .afm-has.open>.afm-sub,#afm .afm-has:focus-within>.afm-sub{opacity:1;visibility:visible;transform:none}
#afm .afm-sub .afm-link{display:flex;width:100%;color:#12233a;font-weight:700;border-radius:9px}
#afm .afm-sub .afm-link:hover{background:#e6f0fb}

/* Buscador */
#afm .afm-sbtn{display:grid;place-items:center;width:42px;height:42px;flex:none;border-radius:12px;transition:background .2s}
#afm .afm-sbtn svg{width:20px;height:20px}
#afm .afm-sbtn:hover{background:rgba(255,255,255,.15)}
#afm .afm-search{display:none;max-width:720px;margin:0 auto;padding:0 20px 10px}
#afm .afm-search.open{display:block}
#afm .afm-search form{display:flex;gap:8px;margin:0}
#afm .afm-search input{flex:1;min-width:0;height:46px;margin:0;padding:0 16px;border:0;border-radius:12px;background:#fff;color:#12233a;font-size:16px}
#afm .afm-search button{height:46px;padding:0 20px;border-radius:12px;background:var(--afm-ac);color:var(--afm-actx);font-weight:800}

/* Herramientas */
#afm .afm-tools{background:var(--afm-bg2);max-height:80px;overflow:hidden;transition:max-height .25s ease}
#afm .afm-tools ul{display:flex;gap:8px;max-width:1400px;margin:0 auto;padding:10px 20px;overflow-x:auto;scrollbar-width:none}
#afm .afm-tools ul::-webkit-scrollbar,#afm .afm-crests ul::-webkit-scrollbar{display:none}
#afm .afm-tools li:first-child,#afm .afm-crests li:first-child{margin-left:auto}
#afm .afm-tools li:last-child,#afm .afm-crests li:last-child{margin-right:auto}
#afm .afm-chip{display:inline-flex;align-items:center;gap:8px;padding:6px 14px 6px 6px;border-radius:99px;background:rgba(255,255,255,.1);border:1px solid rgba(255,255,255,.2);font-weight:700;white-space:nowrap;transition:transform .15s,background .2s,color .2s,border-color .2s}
#afm .afm-chip .afm-i{display:grid;place-items:center;width:30px;height:30px;border-radius:50%;background:rgba(255,255,255,.18);font-size:1.05em}
#afm .afm-chip:not(:has(.afm-i)){padding-left:14px}
#afm .afm-chip:hover,#afm .afm-chip.active{background:var(--afm-ac);border-color:var(--afm-ac);color:var(--afm-actx)}
#afm .afm-chip:hover{transform:translateY(-2px)}
#afm .afm-chip:hover .afm-i,#afm .afm-chip.active .afm-i{background:rgba(255,255,255,.6)}

/* Escudos */
#afm .afm-crests{background:var(--afm-cr);max-height:80px;overflow:hidden;transition:max-height .25s ease,opacity .2s ease}
#afm .afm-crests ul{display:flex;align-items:center;gap:14px;max-width:1400px;margin:0 auto;padding:10px 20px;overflow-x:auto;scrollbar-width:none}
#afm .afm-crests a{display:block;flex:none;width:40px;height:40px;transition:transform .18s}
#afm .afm-crests img{display:block;width:100%;height:100%;object-fit:contain}
#afm .afm-crests a:hover{transform:scale(1.22) translateY(-2px)}
#afm.is-scrolled .afm-crests{max-height:0;opacity:0}

/* Cajón móvil (oculto en escritorio) */
#afm .afm-burger{display:none}
#afm .afm-ov{position:fixed;inset:0;z-index:9991;background:rgba(0,15,40,.55);opacity:0;visibility:hidden;transition:opacity .25s,visibility .25s}
#afm .afm-drawer{position:fixed;top:0;bottom:0;left:0;z-index:9992;width:min(88vw,380px);padding:14px 14px calc(24px + env(safe-area-inset-bottom));background:var(--afm-bg);overflow-y:auto;overscroll-behavior:contain;transform:translateX(-102%);visibility:hidden;transition:transform .28s cubic-bezier(.2,.8,.2,1),visibility .28s}
#afm.drawer-open .afm-ov{opacity:1;visibility:visible}
#afm.drawer-open .afm-drawer{transform:none;visibility:visible}
#afm .afm-dh{display:flex;align-items:center;justify-content:space-between;margin-bottom:14px}
#afm .afm-dh .afm-logo img{height:48px}
#afm .afm-x{display:grid;place-items:center;width:44px;height:44px;border-radius:12px;background:rgba(255,255,255,.12)}
#afm .afm-x svg{width:20px;height:20px}
#afm .afm-dlist .afm-has{display:block;position:relative}
#afm .afm-dlist .afm-link{display:flex;width:100%;padding:14px 12px;margin-bottom:8px;border-radius:14px;font-size:1.08em;background:rgba(255,255,255,.09)}
#afm .afm-dlist .afm-cta{background:var(--afm-ac)}
#afm .afm-dlist .afm-tg{position:absolute;right:6px;top:7px;width:40px;height:40px;margin:0;background:rgba(255,255,255,.12)}
#afm .afm-dlist .afm-sub{position:static;min-width:0;padding:0 0 0 14px;background:transparent;color:inherit;box-shadow:none;max-height:0;overflow:hidden;transition:max-height .25s ease}
#afm .afm-dlist .afm-has.open>.afm-sub{max-height:700px}
#afm .afm-dlist .afm-sub .afm-link{color:inherit;background:rgba(255,255,255,.05)}
#afm .afm-dt{margin:18px 4px 8px;font-size:.9em;font-weight:700;opacity:.75}
#afm .afm-dgrid{display:grid;grid-template-columns:1fr 1fr;gap:8px}
#afm .afm-tile{display:flex;flex-direction:column;align-items:flex-start;gap:6px;height:100%;padding:12px;border-radius:14px;background:rgba(255,255,255,.09);font-weight:700;font-size:.92em}
#afm .afm-tile .afm-i{font-size:1.7em}
#afm .afm-tile.active{background:var(--afm-ac);color:var(--afm-actx)}
#afm .afm-dsoc{display:flex;flex-wrap:wrap;gap:6px;margin-top:20px}

/* Barra inferior (solo se muestra en móvil, ver mobile.css) */
#afm-bottom{display:none}

@media (prefers-reduced-motion:reduce){
	#afm *,#afm-bottom *{animation:none!important;transition:none!important}
}
