/* =====================================================================
   Módulo ACCESOS · barra de botones y pie de página (sitio público)
   Se edita desde el panel: "Botones y logos" y "Pie de página".
   ===================================================================== */

/* ---------- Colores de los botones ---------- */
.acc-btn--verde    { --acc-bg: #0B5A1F; --acc-fg: #fff; }
.acc-btn--rojo     { --acc-bg: #C8102E; --acc-fg: #fff; }
.acc-btn--naranja  { --acc-bg: #D9820F; --acc-fg: #fff; }
.acc-btn--azul     { --acc-bg: #1A5FB0; --acc-fg: #fff; }
.acc-btn--celeste  { --acc-bg: #0B7FB0; --acc-fg: #fff; }
.acc-btn--turquesa { --acc-bg: #0E7C7B; --acc-fg: #fff; }
.acc-btn--morado   { --acc-bg: #5E3A99; --acc-fg: #fff; }
.acc-btn--granate  { --acc-bg: #8E1B2E; --acc-fg: #fff; }
.acc-btn--gris     { --acc-bg: #3F4C5A; --acc-fg: #fff; }
.acc-btn--blanco   { --acc-bg: #FFFFFF; --acc-fg: #1F2D3A; }

/* ---------- Barra ---------- */
.acc-bar {
  position: relative;
  padding: clamp(40px, 5vw, 64px) 0 clamp(24px, 3vw, 40px);
  /* UGEL.GOB: verde claro, para que los logos oficiales (azules, rojos, grises) se lean bien */
  background:
    radial-gradient(rgba(46, 139, 87, .08) 1px, transparent 1.5px) 0 0 / 26px 26px,
    linear-gradient(180deg, #EAF5EC 0%, #D9EEDF 100%);
  border-top: 4px solid #1F6B43;
}
/* Título de la barra (UGEL.GOB): centrado, con el mismo degradado verde de los títulos del sitio. */
.acc-bar__title {
  margin: 0 0 6px;
  font-size: clamp(2rem, 1.5rem + 1.6vw, 2.9rem);
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -.01em;
  text-align: center;
  color: #1F6B43;
  background: linear-gradient(135deg, #1F6B43 0%, #2E8B57 50%, #1aa76d 100%);
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
}
.acc-bar__title::after {
  content: "";
  display: block;
  width: 72px;
  height: 5px;
  margin: .45rem auto 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #F5C400 0%, #FFD84D 100%);
}
.acc-bar__list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(204px, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.acc-bar__list > li { display: flex; min-width: 0; }

.acc-btn {
  position: relative;
  display: flex;
  flex: 1;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  padding: 10px 14px 10px 10px;
  border-radius: 10px;
  background: var(--acc-bg, #3F4C5A);
  color: var(--acc-fg, #fff);
  text-decoration: none;
  box-shadow: 0 10px 18px -14px rgba(0, 0, 0, .9), inset 0 1px 0 rgba(255, 255, 255, .16);
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}
.acc-btn:hover,
.acc-btn:focus-visible {
  color: var(--acc-fg, #fff);
  filter: brightness(1.08);
  transform: translateY(-2px);
  box-shadow: 0 16px 24px -16px rgba(0, 0, 0, .95), inset 0 1px 0 rgba(255, 255, 255, .2);
}
.acc-btn:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.acc-btn__ico {
  display: grid;
  flex: none;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: rgba(255, 255, 255, .16);
}
.acc-btn--blanco .acc-btn__ico { background: #EEF2F5; }
.acc-btn__ico .acc-ico { width: 21px; height: 21px; }
.acc-btn__txt {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: .78rem;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: .03em;
  text-transform: uppercase;
}
.acc-btn__ext { flex: none; opacity: .7; }
.acc-btn--logo { justify-content: center; padding: 8px 14px; }
.acc-btn--logo img { display: block; width: auto; max-width: 100%; max-height: 40px; }
.acc-btn.is-pending { opacity: .5; box-shadow: none; pointer-events: none; }
.acc-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Pie ---------- */
.acc-foot {
  background:
    radial-gradient(60% 80% at 10% 0%, rgba(46, 139, 87, .25) 0%, rgba(46, 139, 87, 0) 70%),
    linear-gradient(180deg, #0B2A26 0%, #04160E 100%);
  color: #CFE3D7;
  font-size: .95rem;
  line-height: 1.7;
}
.acc-foot a { text-decoration: none; }
.acc-foot__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, .85fr);
  gap: 32px;
  padding-top: 60px;
  padding-bottom: 40px;
}
.acc-foot__grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.acc-foot__title { margin: 0 0 18px; color: #fff; font-size: 1.1rem; font-weight: 700; line-height: 1.3; }

.acc-foot__links { display: grid; gap: 11px; margin: 0; padding: 0; list-style: none; }
.acc-foot__links a { display: inline-flex; align-items: center; gap: 10px; color: #BFD8C9; font-weight: 700; transition: color .15s ease; }
.acc-foot__links a:hover,
.acc-foot__links a:focus-visible { color: #FFD84D; }
.acc-foot__chev { width: 7px; height: 7px; flex: none; border-top: 2px solid currentColor; border-right: 2px solid currentColor; transform: rotate(45deg); }

.acc-foot__contact { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.acc-foot__contact li { display: flex; align-items: flex-start; gap: 12px; line-height: 1.45; }
.acc-foot__contact .icon { width: 17px; height: 17px; flex: none; margin-top: 2px; color: #b8c2c8; }
.acc-foot__contact a { color: #c3ccd1; overflow-wrap: anywhere; }
.acc-foot__contact a:hover,
.acc-foot__contact a:focus-visible { color: #fff; }

.acc-foot__logos { display: flex; flex-direction: column; align-items: center; gap: 22px; }
.acc-foot__logo { display: inline-block; transition: opacity .15s ease, transform .15s ease; }
.acc-foot__logo:hover,
.acc-foot__logo:focus-visible { opacity: .85; transform: translateY(-2px); }
.acc-foot__logo img { display: block; width: auto; height: auto; max-width: 100%; max-height: 120px; }
.acc-foot__logo.is-pending { opacity: .45; pointer-events: none; }

.acc-foot__bar { padding-top: 20px; padding-bottom: 24px; border-top: 1px solid rgba(255, 255, 255, .14); text-align: center; }
.acc-foot__bar p { margin: 0; color: #aab4ba; font-size: .9rem; }
.acc-foot__bar strong { color: #fff; font-weight: 600; }

/* ---------- Pantallas medianas y celulares ---------- */
@media (max-width: 960px) {
  .acc-foot__grid,
  .acc-foot__grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); padding-top: 48px; }
  .acc-foot__logos { align-items: flex-start; }
}
@media (max-width: 560px) {
  .acc-bar { padding: 16px 0 18px; }
  .acc-bar__list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .acc-btn { min-height: 52px; gap: 9px; padding: 8px 10px 8px 8px; }
  .acc-btn__ico { width: 32px; height: 32px; }
  .acc-btn__ico .acc-ico { width: 18px; height: 18px; }
  .acc-btn__txt { font-size: .7rem; }
  .acc-btn__ext { display: none; }
  .acc-foot__grid,
  .acc-foot__grid--3 { grid-template-columns: 1fr; gap: 28px; padding-top: 40px; }
  .acc-foot__logos { flex-direction: row; flex-wrap: wrap; align-items: center; }
}
@media (prefers-reduced-motion: reduce) {
  .acc-btn, .acc-foot__logo { transition: none; }
  .acc-btn:hover, .acc-foot__logo:hover { transform: none; }
}

/* ---------- Pie dinámico ---------- */
.acc-foot__toggle { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: default; }
.acc-foot__toggle:disabled { opacity: 1; }
.acc-foot__caret { display: none; width: 9px; height: 9px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); transition: transform .2s ease; }
.acc-foot__toggle[aria-expanded="true"] .acc-foot__caret { transform: rotate(-135deg); }

.acc-foot__links a > span:last-child { display: flex; flex-direction: column; }
.acc-foot__links--news a { align-items: flex-start; font-weight: 600; line-height: 1.35; }
.acc-foot__links--news .acc-foot__chev { margin-top: 6px; }
.acc-foot__date { margin-top: 2px; color: #8fa0aa; font-size: .78rem; font-weight: 500; }
.acc-foot__new { margin-left: 4px; padding: 1px 6px; border-radius: 999px; background: #2E8B57; color: #fff; font-size: .66rem; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; }
.acc-foot__more a { color: #fff; }

.acc-status { display: inline-flex; align-items: center; gap: 8px; margin: -4px 0 14px; padding: 5px 12px 5px 10px; border-radius: 999px; background: rgba(255, 255, 255, .08); color: #e6ecef; font-size: .84rem; font-weight: 700; }
.acc-status__dot { width: 9px; height: 9px; border-radius: 50%; background: #E5484D; box-shadow: 0 0 0 3px rgba(229, 72, 77, .25); }
.acc-status.is-open .acc-status__dot { background: #3CCB7F; box-shadow: 0 0 0 3px rgba(60, 203, 127, .25); animation: acc-pulso 2s ease-in-out infinite; }
@keyframes acc-pulso { 50% { box-shadow: 0 0 0 6px rgba(60, 203, 127, 0); } }

.acc-social { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0 0; padding: 0; list-style: none; }
.acc-social__link { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: rgba(255, 255, 255, .1); color: #fff; transition: background .15s ease, transform .15s ease; }
.acc-social__link:hover, .acc-social__link:focus-visible { color: #fff; transform: translateY(-2px); }
.acc-social__link--facebook:hover { background: #1877F2; }
.acc-social__link--youtube:hover { background: #FF0000; }
.acc-social__link--tiktok:hover { background: #111; }
.acc-social__link--instagram:hover { background: #C13584; }
.acc-social__link--whatsapp:hover { background: #25D366; }

.acc-foot__bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 24px; }
.acc-top { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 1px solid rgba(255, 255, 255, .2); border-radius: 999px; color: #c3ccd1; font-size: .82rem; font-weight: 700; }
.acc-top:hover, .acc-top:focus-visible { border-color: #fff; color: #fff; }

@media (max-width: 560px) {
  .acc-foot__grid, .acc-foot__grid--3 { gap: 0; }
  .acc-foot__col[data-fold] { padding: 14px 0; border-bottom: 1px solid rgba(255, 255, 255, .12); }
  .acc-foot__col[data-fold] .acc-foot__title { margin: 0; }
  .acc-foot__col[data-fold] .acc-foot__title + * { margin-top: 14px; }
  .acc-foot__toggle { cursor: pointer; }
  .acc-foot__caret { display: inline-block; }
  .acc-foot__logos { padding-top: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  .acc-status.is-open .acc-status__dot { animation: none; }
}

.acc-foot [hidden] { display: none !important; }

/* =====================================================================
   Carrusel de logos (Enlaces directos y UGEL.GOB)
   Logos sin fondo, grandes, que se desplazan solos de derecha a izquierda.
   Se detienen solo mientras el mouse está encima o al usar el teclado.
   Sin JavaScript, o con "reducir movimiento" activado en el equipo, quedan
   en una fila centrada que se desliza a mano.
   ===================================================================== */
.orbit {
  position: relative;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 24px 0 18px;
  scrollbar-width: none;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 7%, #000 93%, transparent 100%);
          mask-image: linear-gradient(90deg, transparent 0, #000 7%, #000 93%, transparent 100%);
}
.orbit::-webkit-scrollbar { display: none; }
.orbit__track {
  display: flex;
  align-items: center;
  gap: clamp(44px, 5vw, 76px);
  width: max-content;
  margin: 0 auto;
  padding: 0 5%;
  list-style: none;
}
.orbit.is-running { overflow: hidden; }
.orbit.is-running .orbit__track {
  margin: 0;
  padding: 0;
  animation: orbit-move var(--orbit-dur, 30s) linear infinite;
  will-change: transform;
}
.orbit.is-running:hover .orbit__track,
.orbit.is-running:focus-within .orbit__track { animation-play-state: paused; }
@keyframes orbit-move {
  to { transform: translate3d(calc(-1 * var(--orbit-shift, 50%)), 0, 0); }
}

.orbit__item { flex: 0 0 auto; display: flex; }
.orbit-link {
  --orb: #2E8B57;
  display: inline-flex;
  align-items: center;
  gap: 16px;
  padding: 10px 6px;
  border-radius: 16px;
  color: #1D2B33;
  text-decoration: none;
  white-space: nowrap;
}
.orbit-link__logo {
  display: block;
  width: auto;
  height: 68px;
  max-width: 300px;
  object-fit: contain;
  filter: drop-shadow(0 6px 10px rgba(16, 42, 67, .10));
  transition: transform .3s ease, filter .3s ease;
}
.orbit-link__logo.is-tall { height: 96px; }
.orbit-link__icon {
  display: grid;
  flex: none;
  place-items: center;
  width: 66px;
  height: 66px;
  border-radius: 50%;
  color: #fff;
  background:
    radial-gradient(120% 120% at 28% 18%, rgba(255, 255, 255, .38) 0, rgba(255, 255, 255, 0) 46%),
    var(--orb);
  box-shadow: 0 14px 24px -14px rgba(0, 0, 0, .45);
  transition: transform .3s ease;
}
.orbit-link__icon svg { width: 30px; height: 30px; }
.orbit-link__label {
  font-size: 1.15rem;
  font-weight: 800;
  line-height: 1.4;
  letter-spacing: .01em;
  transition: color .2s ease;
}
.orbit-link:hover .orbit-link__logo,
.orbit-link:focus-visible .orbit-link__logo {
  transform: translateY(-4px) scale(1.06);
  filter: drop-shadow(0 14px 16px rgba(16, 42, 67, .2));
}
.orbit-link:hover .orbit-link__icon,
.orbit-link:focus-visible .orbit-link__icon { transform: translateY(-3px) scale(1.06); }
.orbit-link:hover .orbit-link__label { color: var(--orb); }
.orbit-link:focus-visible { outline: 3px solid var(--orb); outline-offset: 4px; }
.orbit-link.is-pending { opacity: .5; pointer-events: none; }

/* UGEL.GOB: el color de cada ícono es el que se elige en Panel > Accesos. */
.orbit--gob .orbit-link { --orb: var(--acc-bg, #3F4C5A); }
.orbit--gob .orbit-link__icon { color: var(--acc-fg, #fff); }
.orbit--gob .orbit-link__label { font-size: 1.02rem; letter-spacing: .04em; }

@media (max-width: 560px) {
  .orbit__track { gap: 30px; }
  .orbit-link__logo { height: 50px; max-width: 220px; }
  .orbit-link__logo.is-tall { height: 70px; }
  .orbit-link__icon { width: 52px; height: 52px; }
  .orbit-link__icon svg { width: 24px; height: 24px; }
  .orbit-link__label { font-size: 1rem; }
  .orbit--gob .orbit-link__label { font-size: .9rem; }
}
@media (prefers-reduced-motion: reduce) {
  .orbit-link__logo, .orbit-link__icon, .orbit-link__label { transition: none; }
  .orbit-link:hover .orbit-link__logo, .orbit-link:hover .orbit-link__icon { transform: none; }
}

/* ---------- Logos y botones de la página .GOB (antes, barra UGEL.GOB) ----------
   Sobre fondo blanco y sin tarjeta: cada logo con sus colores reales; los que no tienen logo, su ícono con el color del panel. */
.acc-gob { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px clamp(10px, 2.4vw, 34px); margin: 0; padding: 0; list-style: none; }
.acc-gob__li { display: flex; flex: 0 1 210px; }
.acc-gob__item {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 12px;
  width: 100%; padding: 14px 8px 12px; border-radius: 16px;
  background: none; color: #14432C; text-align: center; text-decoration: none;
  transition: transform .25s cubic-bezier(.22, .7, .2, 1), background-color .25s;
}
.acc-gob__media { display: flex; align-items: center; justify-content: center; width: 100%; height: 88px; }
.acc-gob__logo { display: block; width: auto; height: auto; max-width: 100%; max-height: 84px; object-fit: contain; transition: transform .3s cubic-bezier(.22, .7, .2, 1); }
.acc-gob__ico {
  display: grid; place-items: center; width: 76px; height: 76px; border-radius: 50%;
  background: radial-gradient(circle at 32% 26%, rgba(255, 255, 255, .3), transparent 55%), var(--acc-bg, #3F4C5A); color: var(--acc-fg, #fff);
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--acc-bg, #3F4C5A) 12%, #fff), 0 12px 22px -12px var(--acc-bg, #3F4C5A);
  transition: transform .3s cubic-bezier(.22, .7, .2, 1), box-shadow .3s;
}
.acc-gob__ico svg { width: 34px; height: 34px; }
.acc-gob__label { position: relative; padding-bottom: 6px; color: #14432C; font-size: .8rem; font-weight: 700; letter-spacing: .08em; line-height: 1.3; text-transform: uppercase; }
/* línea dorada bajo el nombre que crece al pasar el mouse */
.acc-gob__label::after { content: ""; position: absolute; left: 50%; bottom: 0; width: 22px; height: 2px; border-radius: 2px; background: #B8913A; transform: translateX(-50%); opacity: .55; transition: width .3s cubic-bezier(.22, .7, .2, 1), opacity .3s; }
.acc-gob__item:hover, .acc-gob__item:focus-visible { transform: translateY(-5px); background: rgba(20, 67, 44, .04); color: #14432C; text-decoration: none; }
.acc-gob__item:hover .acc-gob__logo, .acc-gob__item:focus-visible .acc-gob__logo { transform: scale(1.06); }
.acc-gob__item:hover .acc-gob__ico, .acc-gob__item:focus-visible .acc-gob__ico { transform: scale(1.08) rotate(-5deg); }
.acc-gob__item:hover .acc-gob__label::after, .acc-gob__item:focus-visible .acc-gob__label::after { width: 70%; opacity: 1; }
.acc-gob__item.is-pending { opacity: .5; pointer-events: none; }
.acc-gob__vacio { margin: 0; padding: 18px; border: 1px dashed #C9D3CE; border-radius: 14px; color: #5A646C; text-align: center; }
@media (max-width: 640px) {
  .acc-gob { gap: 4px 6px; }
  .acc-gob__li { flex-basis: calc(50% - 3px); }
  .acc-gob__item { gap: 10px; padding: 12px 6px 10px; }
  .acc-gob__media { height: 70px; }
  .acc-gob__logo { max-height: 66px; }
  .acc-gob__ico { width: 62px; height: 62px; }
  .acc-gob__ico svg { width: 28px; height: 28px; }
  .acc-gob__label { font-size: .72rem; }
}
@media (prefers-reduced-motion: reduce) {
  .acc-gob__item, .acc-gob__logo, .acc-gob__ico, .acc-gob__label::after { transition: none; }
  .acc-gob__item:hover, .acc-gob__item:focus-visible, .acc-gob__item:hover .acc-gob__ico, .acc-gob__item:hover .acc-gob__logo { transform: none; }
}
