/* =========================================================
   IED Juan XXIII — estilos del sitio público
   Réplica del diseño "Lens": barra lateral azul + contenido
   ========================================================= */

@font-face { font-family: "ABeeZee"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../fonts/abeezee-latin-400-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "ABeeZee"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../fonts/abeezee-latin-ext-400-normal.woff2") format("woff2"); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "ABeeZee"; font-style: italic; font-weight: 400; font-display: swap;
  src: url("../fonts/abeezee-latin-400-italic.woff2") format("woff2"); }
@font-face { font-family: "Tinos"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../fonts/tinos-latin-400-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Tinos"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../fonts/tinos-latin-ext-400-normal.woff2") format("woff2"); unicode-range: U+0100-02AF, U+1E00-1E9F; }
@font-face { font-family: "Tinos"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("../fonts/tinos-latin-700-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Tinos"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("../fonts/tinos-latin-ext-700-normal.woff2") format("woff2"); unicode-range: U+0100-02AF, U+1E00-1E9F; }
@font-face { font-family: "Tinos"; font-style: italic; font-weight: 400; font-display: swap;
  src: url("../fonts/tinos-latin-400-italic.woff2") format("woff2"); }
@font-face { font-family: "Tinos"; font-style: italic; font-weight: 700; font-display: swap;
  src: url("../fonts/tinos-latin-700-italic.woff2") format("woff2"); }

:root {
  --c-sidebar: #1087c1;
  --c-accent: #eddd00;
  --c-link: #1087c1;
  --c-text: #595957;
  --c-heading: #000;
  --c-line: #333638;
  --sidebar-w: 250px;
  --gutter: 48px;
  --f-body: "ABeeZee", "Trebuchet MS", Arial, sans-serif;
  --f-head: "Tinos", "Times New Roman", Georgia, serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: #fff;
  color: var(--c-text);
  font: 400 18px/1.34 var(--f-body);
}
img { max-width: 100%; height: auto; border: 0; }
a { color: var(--c-link); text-decoration: none; }
a:hover, a:focus-visible { text-decoration: underline; }
:focus-visible { outline: 3px solid var(--c-accent); outline-offset: 2px; }

.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: -9999px; top: 8px; z-index: 1000;
  background: #fff; color: #000; padding: 8px 16px; font-weight: bold;
}
.skip-link:focus { left: 8px; }

/* ---------------- Barra lateral ---------------- */
.sidebar {
  position: fixed; inset: 0 auto 0 0; z-index: 50;
  width: var(--sidebar-w);
  display: flex; flex-direction: column;
  background: var(--c-sidebar);
  color: #fff;
  font-size: 13px; line-height: 24px;
  padding: 0 24px 0 24px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.35) transparent;
}
.sidebar__top { padding: 48px 0 56px 24px; }
.brand { display: block; text-align: center; }
.brand img { display: block; width: 170px; max-width: 100%; margin: 0 auto; height: auto; }
.brand__text { display: block; color: var(--c-accent); font: 700 26px/1.2 var(--f-body); text-transform: uppercase; }
.brand:hover { text-decoration: none; }
.nav-trigger { display: none; }

/* Menú principal */
.site-nav { padding: 0; }
.nav, .nav__sub { list-style: none; margin: 0; padding: 0; }
.nav { border-top: 1px solid var(--c-line); }
.nav > .nav__item { position: relative; border-bottom: 1px solid var(--c-line); }
.nav__link {
  display: block; width: 100%;
  padding: 12px 24px;
  color: #fff; text-transform: uppercase; font: 300 13px/24px var(--f-body);
  background: none; border: 0; text-align: left; cursor: pointer;
}
.nav__link:hover, .nav__link:focus-visible,
.nav__item.is-current > .nav__link,
.nav__item.is-open > .nav__link { color: var(--c-accent); text-decoration: none; }
/* Flecha del submenú */
.nav__toggle {
  position: absolute; right: 0; top: 0; width: 36px; height: 48px;
  background: none; border: 0; cursor: pointer; color: inherit;
}
.nav__toggle::after, .nav__link--group::after {
  content: ""; position: absolute; right: 12px; top: 22px;
  border: 5px solid transparent; border-top-color: rgba(51,54,56,.9);
  transition: transform .2s ease;
}
.nav__link--group { position: relative; }
.nav__item:hover > .nav__toggle::after, .nav__item:hover > .nav__link--group::after,
.nav__item.is-open > .nav__toggle::after, .nav__item.is-open > .nav__link--group::after { border-top-color: var(--c-accent); }
.nav__item.is-open > .nav__toggle::after, .nav__item.is-open > .nav__link--group::after { transform: rotate(180deg) translateY(5px); }

.nav__panel { padding: 0 0 10px; }
.nav__panel[hidden] { display: none; }
.nav__sub .nav__item { position: relative; }
.nav__sub .nav__link {
  padding: 5px 36px 5px 36px; text-transform: none; font-size: 13.5px; line-height: 20px;
  color: rgba(255,255,255,.92);
}
.nav__sub .nav__toggle { height: 30px; }
.nav__sub .nav__toggle::after, .nav__sub .nav__link--group::after { top: 13px; }
.nav__sub .nav__sub .nav__link { padding-left: 50px; font-size: 13px; }
.nav__sub .nav__link::before { content: "– "; opacity: .6; }

.sidebar__footer { margin-top: auto; padding: 36px 0 30px 24px; }
.site-info { text-align: right; color: #fff; font-size: 13px; line-height: 24px; }
.site-info p { margin: 0 0 24px; }
.site-info p:last-child { margin-bottom: 0; }
.site-info a { color: #fff; text-decoration: underline; }
.site-info code { display: none; }
.social { margin-bottom: 24px; text-align: right; }
.social__title { margin: 0 0 6px; text-transform: uppercase; font-size: 12px; letter-spacing: .04em; }
.social__list { list-style: none; margin: 0; padding: 0; display: flex; gap: 10px; justify-content: flex-end; }
.social__list a { color: #fff; display: inline-flex; padding: 4px; border-radius: 50%; }
.social__list a:hover { color: var(--c-accent); }

/* ---------------- Contenido ---------------- */
.main { margin-left: var(--sidebar-w); min-height: 100vh; padding-bottom: 24px; background: #fff; }
.banner img { display: block; width: 100%; height: auto; }
.mobile-footer { display: none; }

.entry__header { padding: 36px var(--gutter) 36px var(--gutter); }
.entry--no-title .entry__header { padding: 36px var(--gutter); min-height: 74px; }
.entry__title {
  margin: 0; color: var(--c-heading);
  font: 700 48px/1 var(--f-head);
}
.entry__meta { margin: 0 0 10px; font-size: 14px; text-transform: uppercase; letter-spacing: .05em; }
.separator {
  height: 0; margin: 0 var(--gutter) 22px 0; border: 0;
  border-bottom: 1px dotted var(--c-link);
}
.entry__content { padding: 0 var(--gutter); }
.entry__content::after { content: ""; display: table; clear: both; }

.entry__content p { margin: 0 0 24px; }
.entry__content h1, .entry__content h2, .entry__content h3,
.entry__content h4, .entry__content h5, .entry__content h6 {
  color: var(--c-heading); font-family: var(--f-head); line-height: 1.15; margin: 0 0 18px;
}
.entry__content h1 { font-size: 42px; }
.entry__content h2 { font-size: 34px; }
.entry__content h3 { font-size: 28px; }
.entry__content h4 { font-size: 22px; }
.entry__content h5 { font-size: 19px; }
.entry__content h6 { font-size: 16px; text-transform: uppercase; }
.entry__content ul, .entry__content ol { margin: 0 0 24px; padding-left: 1.4em; }
.entry__content li { margin-bottom: 6px; }
.entry__content ul li { font-family: var(--f-head); }
.entry__content table { border-collapse: collapse; margin: 0 0 24px; max-width: 100%; }
.entry__content td, .entry__content th { border: 1px solid #d6d6d6; padding: 6px 10px; vertical-align: top; }
.entry__content th { background: #f3f5f7; color: #222; }
.entry__content hr { border: 0; border-top: 1px dotted #999; margin: 24px 0; }
.entry__content iframe { max-width: 100%; border: 0; }
.entry__content figure { margin: 0 0 24px; }
.entry__content figcaption, .wp-caption-text { font-size: 14px; color: #888; margin-top: 6px; }

/* Alineaciones heredadas de WordPress */
.alignleft { float: left; margin: 6px 24px 16px 0; }
.alignright { float: right; margin: 6px 0 16px 24px; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.alignnone { margin: 0; }
img.alignleft, img.alignright, img.aligncenter { height: auto; }

/* Cita (bloque "quote") */
.entry__content blockquote {
  position: relative; margin: 0 0 36px; padding: 6px 0 0 72px;
  font-family: var(--f-head); color: #000; font-size: 20px; line-height: 1.25;
}
.entry__content blockquote::before {
  content: "\201C"; position: absolute; left: 0; top: -12px;
  color: var(--c-accent); font: 700 100px/1 var(--f-head);
}
.entry__content blockquote p { margin-bottom: 10px; }
.entry__content blockquote.quote--big { font-size: 32px; }

/* Botones */
.btn, .entry__content .btn {
  display: inline-block; padding: 10px 24px; border: 0; border-radius: 0; cursor: pointer;
  background: var(--c-accent); color: #222; font: 700 14px/1.4 var(--f-body); text-transform: uppercase;
  text-decoration: none;
}
.btn:hover { background: #222; color: #fff; text-decoration: none; }

/* Columnas (grilla de 12) */
.grid { display: flex; flex-wrap: wrap; margin: 0 -11px 12px; }
.grid > [class*="col-"] { padding: 0 11px; min-width: 0; flex: 0 0 100%; max-width: 100%; }
.grid--narrow { margin-left: -12px; margin-right: -12px; }
.grid--narrow > [class*="col-"] { padding: 0 12px; }
.grid--band { padding-top: 24px; margin-bottom: 24px; }
@media (min-width: 760px) {
  .grid > .col-1 { flex-basis: 8.333%; max-width: 8.333%; }
  .grid > .col-2 { flex-basis: 16.666%; max-width: 16.666%; }
  .grid > .col-3 { flex-basis: 25%; max-width: 25%; }
  .grid > .col-4 { flex-basis: 33.333%; max-width: 33.333%; }
  .grid > .col-5 { flex-basis: 41.666%; max-width: 41.666%; }
  .grid > .col-6 { flex-basis: 50%; max-width: 50%; }
  .grid > .col-7 { flex-basis: 58.333%; max-width: 58.333%; }
  .grid > .col-8 { flex-basis: 66.666%; max-width: 66.666%; }
  .grid > .col-9 { flex-basis: 75%; max-width: 75%; }
  .grid > .col-10 { flex-basis: 83.333%; max-width: 83.333%; }
  .grid > .col-12 { flex-basis: 100%; max-width: 100%; }
  .grid > .col-auto { flex: 1 1 0; max-width: none; }
}
.contenedor-columnas { display: flex; flex-wrap: wrap; gap: 20px; padding: 20px; justify-content: center; }
.columna { flex: 1 1 300px; max-width: 100%; }
.columna img { width: 100%; height: auto; border-radius: 12px; display: block; }

/* Pestañas */
.tabs { margin: 0 0 36px; }
.tabs__nav {
  display: flex; flex-wrap: wrap; margin: 0 0 24px; padding: 0; list-style: none;
  border-bottom: 1px dotted #333;
}
.tabs__btn {
  margin: 0 0 -1px; padding: 18px 24px 16px; background: transparent; cursor: pointer;
  border: 1px dotted transparent; border-bottom: 0;
  font: 700 15px/1.3 var(--f-head); color: #000; text-transform: uppercase;
}
.tabs__btn:hover { color: var(--c-link); }
.tabs__btn[aria-selected="true"] { border-color: #333; border-bottom: 1px solid #fff; background: #fff; }
.tabs .tab-title { display: none; }
.tabs--static .tab-title { display: block; }
.tab-panel[hidden] { display: none; }
.no-js .tab-panel[hidden] { display: block; }

/* Slider */
.slider {
  position: relative; margin: 0 0 36px; background: #0e4f72; overflow: hidden;
  box-shadow: 0 18px 12px -14px rgba(0,0,0,.45);
}
.slider__track { position: relative; aspect-ratio: 1094 / 420; }
.slider__slide {
  position: absolute; inset: 0; opacity: 0; visibility: hidden;
  transition: opacity 1s ease, visibility 0s linear 1s;
}
.slider__slide.is-active { opacity: 1; visibility: visible; transition: opacity 1s ease; z-index: 1; }
.slider__slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.slider__slide a { display: block; height: 100%; }
.slider__caption {
  position: absolute; left: 0; bottom: 28px; margin: 0; max-width: 80%;
  padding: 10px 18px; background: rgba(0,0,0,.55); color: #fff; font-size: 18px;
}
.slider__arrow {
  position: absolute; top: 50%; z-index: 3; width: 48px; height: 48px; margin-top: -24px;
  border: 0; background: rgba(255,255,255,.75); cursor: pointer; opacity: 0; transition: opacity .25s;
}
.slider:hover .slider__arrow, .slider__arrow:focus-visible { opacity: 1; }
.slider__arrow::after {
  content: ""; position: absolute; top: 50%; left: 50%; width: 12px; height: 12px; margin: -6px 0 0 -4px;
  border: solid #000; border-width: 0 0 3px 3px; transform: rotate(45deg);
}
.slider__arrow--prev { left: 0; }
.slider__arrow--next { right: 0; }
.slider__arrow--next::after { transform: rotate(-135deg); margin-left: -9px; }
.slider__dots { position: absolute; z-index: 3; left: 0; right: 0; bottom: 12px; display: flex; justify-content: center; gap: 8px; }
.slider__dot { width: 11px; height: 11px; border-radius: 50%; border: 2px solid #fff; background: transparent; padding: 0; cursor: pointer; }
.slider__dot.is-active { background: #fff; }
.slider__progress { position: absolute; z-index: 3; left: 0; right: 0; bottom: 0; height: 5px; background: rgba(0,0,0,.15); }
.slider__progress span { display: block; height: 100%; width: 0; background: #2e5fa8; }

/* Accesos rápidos */
.quick-links {
  list-style: none; margin: 12px 0 36px; padding: 0;
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 30px 20px;
}
.entry__content .quick-links__item { text-align: center; font-family: var(--f-body); margin: 0; }
.quick-links__item a, .quick-links__item > span { display: block; color: #595957; }
.quick-links__item a:hover { text-decoration: none; }
.quick-links__item img { display: block; width: 100px; height: 100px; object-fit: contain; margin: 0 auto 14px; transition: transform .2s ease; }
.quick-links__item a:hover img { transform: translateY(-4px) scale(1.04); }
.quick-links__item strong { display: block; font-weight: 400; text-transform: uppercase; line-height: 1.3; }
.quick-links__item a:hover strong { color: var(--c-link); }

/* Noticias */
.post-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 30px; margin: 0 0 36px; }
.post-card__link { display: block; color: inherit; }
.post-card__link:hover { text-decoration: none; }
.post-card__img { width: 100%; aspect-ratio: 16/10; object-fit: cover; display: block; margin-bottom: 12px; }
.post-card__date { font-size: 13px; text-transform: uppercase; color: #888; }
.post-card__title { margin: 4px 0 8px; font: 700 22px/1.2 var(--f-head); color: #000; }
.post-card__link:hover .post-card__title { color: var(--c-link); }
.post-card__excerpt { margin: 0; font-size: 16px; }
.entry__image img { width: 100%; }

/* Embebidos responsivos (Canva, YouTube…) */
.embed { position: relative; width: 100%; padding-top: 56.25%; margin: 0 0 24px; overflow: hidden; border-radius: 8px; }
.embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* Formularios */
.contact-form { max-width: 640px; margin: 0 0 36px; }
.contact-form input[type=text], .contact-form input[type=email], .contact-form input[type=tel], .contact-form textarea,
.search-form input[type=search] {
  width: 100%; padding: 10px 12px; font: 16px/1.4 var(--f-body); color: #333;
  border: 1px solid #bbb; border-radius: 0; background: #fff;
}
.contact-form input:focus, .contact-form textarea:focus, .search-form input:focus { border-color: var(--c-link); outline: 2px solid var(--c-link); outline-offset: 0; }
.search-form { display: flex; gap: 10px; max-width: 560px; margin: 0 0 24px; }
.hp { position: absolute; left: -5000px; width: 1px; height: 1px; overflow: hidden; }
.notice { padding: 12px 16px; margin: 0 0 20px; border-left: 4px solid; }
.notice--success { background: #eaf7ee; border-color: #2e8b57; color: #1d5b37; }
.notice--error { background: #fdecec; border-color: #c0392b; color: #8a2419; }
.notice--draft { background: #fff8d6; border-color: #d4b000; color: #5c4d00; font-size: 15px; margin-top: 16px; }
.search-results { list-style: none; padding: 0; }
.search-results li { margin-bottom: 18px; font-family: var(--f-body); }
.search-results a { font: 700 22px/1.2 var(--f-head); }
.search-results p { margin: 4px 0 0; font-size: 16px; }
.muted { color: #888; }
.small { font-size: 14px; }

/* ---------------- Tablet y móvil ---------------- */
@media (max-width: 1100px) {
  :root { --gutter: 32px; }
  .quick-links { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  :root { --gutter: 20px; }
  body { font-size: 17px; }
  .sidebar {
    position: sticky; top: 0; inset: auto; width: 100%; height: auto; max-height: 100vh;
    padding: 0 16px; overflow: visible;
  }
  .sidebar__top { display: flex; align-items: center; justify-content: space-between; padding: 8px 0; }
  .brand img { width: 52px; margin: 0; }
  .brand__text { font-size: 18px; }
  .nav-trigger {
    display: inline-flex; align-items: center; justify-content: center;
    width: 48px; height: 48px; background: none; border: 0; cursor: pointer; color: #fff;
  }
  .nav-trigger__bars, .nav-trigger__bars::before, .nav-trigger__bars::after {
    display: block; width: 26px; height: 3px; background: currentColor; border-radius: 2px; position: relative;
    transition: transform .2s ease, background-color .2s ease;
  }
  .nav-trigger__bars::before, .nav-trigger__bars::after { content: ""; position: absolute; left: 0; }
  .nav-trigger__bars::before { top: -8px; }
  .nav-trigger__bars::after { top: 8px; }
  .nav-open .nav-trigger__bars { background: transparent; }
  .nav-open .nav-trigger__bars::before { transform: translateY(8px) rotate(45deg); }
  .nav-open .nav-trigger__bars::after { transform: translateY(-8px) rotate(-45deg); }

  .site-nav {
    display: none; max-height: calc(100vh - 64px); overflow-y: auto; overscroll-behavior: contain;
    margin: 0 -16px; padding: 0 16px 16px;
  }
  .nav-open .site-nav { display: block; }
  .nav__link { padding: 13px 48px 13px 8px; font-size: 14px; }
  .nav__toggle { width: 52px; }
  .nav__sub .nav__link { padding: 9px 48px 9px 22px; font-size: 15px; }
  .nav__sub .nav__sub .nav__link { padding-left: 38px; }
  .nav__sub .nav__toggle { height: 38px; }
  .nav__sub .nav__toggle::after { top: 17px; }
  .sidebar__footer { display: none; }

  .main { margin-left: 0; min-height: 0; }
  .mobile-footer { display: block; margin-top: 36px; padding: 28px 20px; background: var(--c-sidebar); color: #fff; }
  .mobile-footer .site-info, .mobile-footer .social, .mobile-footer .site-info p { text-align: center !important; }
  .mobile-footer .site-info p { margin-bottom: 8px; }
  .mobile-footer .social__list { justify-content: center; }

  .entry__header { padding: 24px var(--gutter); }
  .entry--no-title .entry__header { min-height: 0; padding: 12px var(--gutter); }
  .entry__title { font-size: 34px; }
  .entry__content blockquote { padding-left: 52px; font-size: 19px; }
  .entry__content blockquote::before { font-size: 76px; }
  .entry__content blockquote.quote--big { font-size: 24px; }
  .alignleft, .alignright { float: none; display: block; margin: 0 auto 16px; }
  .quick-links { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 12px; }
  .quick-links__item img { width: 84px; height: 84px; }
  .quick-links__item strong { font-size: 15px; }
  .tabs__nav { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: thin; -webkit-overflow-scrolling: touch; }
  .tabs__btn { flex: 0 0 auto; padding: 12px 16px; font-size: 14px; }
  .slider__track { aspect-ratio: 16 / 9; }
  .slider__arrow { opacity: 1; width: 38px; height: 38px; margin-top: -19px; }
  .entry__content iframe:not(.embed iframe) { width: 100% !important; }
  .entry__content table { display: block; overflow-x: auto; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

@media print {
  .sidebar, .banner, .slider, .mobile-footer { display: none !important; }
  .main { margin: 0; }
}
