/* =========================================================
   MiOposición — PREMIUM SaaS UI v2
   - Paleta de colores azul + cyan degradada premium
   - Efectos visuales sofisticados (sombras, blur, gradientes)
   - Dark mode automático optimizado
   - Componentes interactivos mejorados con micro-animaciones
   - Tipografía profesional optimizada
   ========================================================= */

/* ---------- THEME TOKENS (PALETA PREMIUM MEJORADA) ---------- */
:root{
  color-scheme: light;

  /* Colores primarios - Azul degradado premium */
  --primary: #1e63ff;
  --primary-2: #1f7db5;
  --primary-dark: #0d47a1;
  --primary-light: #5d9cff;
  --color-primary: var(--primary);
  --color-primary-soft: rgba(30,99,255,.1);
  
  /* Colores secundarios - Cyan y acentos */
  --secondary: #00d4ff;
  --secondary-light: #3de8ff;
  --accent: #7c3aed;
  --accent-light: #a855f7;
  --color-purple: var(--accent);
  
  /* Estados */
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --color-success: var(--success);
  --color-warning: var(--warning);
  --color-danger: var(--danger);
  
  /* Escala neutral - Grises profesionales */
  --text: #0f172a;
  --text-secondary: #3b4356;
  --muted: #64748b;
  --muted-light: #94a3b8;

  --bg: #f8fafd;
  --surface: rgba(255,255,255,.94);
  --surface-soft: #f8fafd;
  --card: #ffffff;
  --color-muted: var(--muted);
  
  --border: rgba(15,23,42,.08);
  --border-light: rgba(15,23,42,.05);
  --input-border: rgba(15,23,42,.2);
  --input-bg: #f1f5f9;
  --shadow: 0 10px 30px rgba(30,99,255,.12);
  --shadow-lg: 0 20px 50px rgba(30,99,255,.15);
  --shadow-sm: 0 2px 8px rgba(15,23,42,.06);

  --radius: 16px;
  /* Escala de H1 del dominio organismos/territorios. xl = ficha de entidad
     (CADASA, Principado, Avilés); lg = directorios, hubs y el índice: misma
     familia (peso 700, interlineado 1.08, tracking -.025em), un escalón
     menos de tamaño. */
  --mo-title-xl: clamp(34px, 4.6vw, 52px);
  --mo-title-lg: clamp(30px, 1.2rem + 2.2vw, 46px);
  --radius-lg: 24px;
  --radius-md: 12px;
  --max: 1180px;

  --header-height: 70px;
  --page-top-spacing: 24px;
  --page-top-spacing-mobile: 16px;
  --brand-logo-height: 38px;
  --brand-logo-width: auto;
  --brand-logo-max-width: 210px;
  --brand-mark-size: 38px;
  --footer-logo-height: 34px;
  --footer-logo-max-width: 155px;
  --nav-item-height: 42px;
  --nav-item-padding-x: 16px;
  --surface-card: #ffffff;
  --border-soft: rgba(15,23,42,.08);
  --shadow-dropdown: 0 24px 70px rgba(15,23,42,.16);
  --radius-xl: 22px;
  --header-h: var(--header-height);
  --logo-h: var(--brand-logo-height);
  --home-section-gap: 60px;
  --home-section-gap-compact: 44px;
  --home-title-gap: 24px;
  --home-card-gap: 22px;
  --home-card-padding: 22px;
  --home-card-padding-compact: 18px;
  
  /* Transiciones suave */
  --transition: all .24s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: all .15s cubic-bezier(0.4, 0, 0.2, 1);
}

.long-form-text {
  text-align: justify;
  text-justify: inter-word;
  hyphens: auto;
  line-height: 1.7;
}

.modern-card,
.summary-card {
  min-width: 0;
}

.modern-card {
  border: 1px solid rgba(30, 99, 255, 0.12);
}

.staff-actions a {
  overflow-wrap: anywhere;
}

.organism-hero__card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  gap: 24px;
  padding: 28px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 18px 42px rgba(2, 17, 48, 0.07);
}

.organism-section,
.organism-side-card {
  min-width: 0;
  padding: 22px;
  border-radius: 18px;
}

.organism-section h2,
.organism-side-card h2 {
  margin: 0;
  color: var(--text);
  font-size: 20px;
  line-height: 1.25;
}

.organism-about__copy {
  color: var(--text);
}

.organism-about__copy p:first-child {
  margin-top: 0;
}

.organism-about__copy p:last-child {
  margin-bottom: 0;
}

.organism-process-empty {
  margin-top: 18px;
  border: 1px dashed rgba(30, 99, 255, .28);
  background: linear-gradient(135deg, rgba(30, 99, 255, .06), rgba(20, 184, 166, .04));
}

.organism-process-empty p {
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
}

@media (max-width: 1100px) {
  

  .organism-hero__card {
    grid-template-columns: 1fr;
  }

  
}

@media (max-width: 760px) {
  

  

  

  

  

  

  .organism-hero__card,
  .organism-section,
  .organism-side-card {
    padding: 18px;
    border-radius: 16px;
  }

  

  

  

  

  

  

  

  .long-form-text {
    text-align: left;
    hyphens: none;
  }

  

  

  

  

  

  

  

  
}

/* Dark mode stays disabled until every shared and feature surface has a complete theme. */
@media (prefers-color-scheme: dark) and (min-width: 99999px){
  :root{
    --text: #f0f4f8;
    --text-secondary: #c5d4e8;
    --muted: #8fa3b8;
    --muted-light: #6b7985;

    --bg: #0a0e1a;
    --surface: rgba(20,30,58,.85);
    --card: rgba(20,30,58,.65);
    --surface-card: #111a31;
    --border-soft: rgba(230,238,255,.1);
    --shadow-dropdown: 0 24px 80px rgba(0,0,0,.36);
    
    --border: rgba(230,238,255,.08);
    --border-light: rgba(230,238,255,.04);
    --input-border: rgba(230,238,255,.2);
    --input-bg: rgba(255,255,255,.08);
    --shadow: 0 10px 40px rgba(30,99,255,.2);
    --shadow-lg: 0 20px 60px rgba(30,99,255,.25);
    --shadow-sm: 0 2px 12px rgba(0,0,0,.3);
  }
}

/* ---------- BASE ---------- */
*{ box-sizing:border-box; }
html{ height: 100%; }
body{ min-height: 100%; }

body{
  margin:0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: "kern" 1, "liga" 1;
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 25% -5%, rgba(30,99,255,.15), transparent 65%),
    radial-gradient(1000px 600px at 90% 5%, rgba(31,125,181,.12), transparent 62%),
    var(--bg);
  background-attachment: fixed;
  line-height: 1.6;
}

a{ color: inherit; text-decoration: none; transition: var(--transition); }
a:hover{ text-decoration: none; }

/* Tipografía mejorada */
h1, h2, h3, h4, h5, h6 { 
  line-height: 1.2; 
  letter-spacing: -0.02em;
  margin-top: 0;
  font-weight: 700;
}

p { margin: 1em 0; }
strong { font-weight: 700; }

.container{
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}

@media (min-width: 1024px){
  .container{ padding-inline: 32px; }
}

@media (max-width: 640px){
  .container{ padding-inline: 20px; }
}

.no-scroll{ overflow: hidden; }

/* ---------- HEADER PREMIUM ---------- */
.topbar{
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--surface);
  backdrop-filter: blur(25px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow .3s ease, background .3s ease;
}

.topbar.is-scrolled{
  box-shadow: 0 8px 28px rgba(30,99,255,.1);
  background: rgba(255,255,255,.98);
}

@media (prefers-color-scheme: dark) and (min-width: 99999px){
  .topbar.is-scrolled{
    background: rgba(20,30,58,.98);
    box-shadow: 0 8px 28px rgba(30,99,255,.2);
  }
}

.topbar__inner{
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

/* Línea de acento premium con animación suave */
.topbar__accent{
  height: 4px;
  background: linear-gradient(90deg, var(--primary) 0%, var(--secondary) 50%, var(--primary-2) 100%);
  opacity: .95;
  animation: shimmer 4s ease-in-out infinite;
}

@keyframes shimmer {
  0%, 100% { opacity: 0.95; filter: brightness(1); }
  50% { opacity: 1; filter: brightness(1.05); }
}

/* ---------- LOGO PREMIUM ---------- */
.brand{
  display:flex;
  align-items:center;
  flex: 0 0 auto;
  min-width: 0;
  border-radius: 14px;
}

.brand--header{
  min-height: var(--header-height);
}

.brand-picture{
  display: flex;
  align-items: center;
  height: var(--logo-h);
  max-width: var(--brand-logo-max-width);
}

.brand-logo,
.brand__logo{
  height: var(--logo-h);
  width: var(--brand-logo-width);
  max-width: var(--brand-logo-max-width);
  display: block;
  object-fit: contain;
  transition: var(--transition);
}

.brand-logo:hover,
.brand__logo:hover{
  transform: translateY(-1px);
}

.brand:focus-visible,
.nav__link:focus-visible,
.nav__dropdown-trigger:focus-visible,
.nav__dropdown-item:focus-visible,
.nav__cta:focus-visible,
.iconbtn:focus-visible{
  outline: 3px solid rgba(30,99,255,.24);
  outline-offset: 3px;
}

/* ---------- NAV (DESKTOP) ---------- */
.nav{
  display:flex;
  align-items:center;
  gap: 14px;
}

.nav--desktop{
  justify-content: flex-end;
  flex: 1;
}

.nav__link{
  position: relative;
  min-height: var(--nav-item-height);
  display: inline-flex;
  align-items: center;
  font-weight: 600;
  font-size: 15px;
  color: var(--text);
  padding: 10px var(--nav-item-padding-x);
  border-radius: 12px;
  transition: var(--transition-fast);
  white-space: nowrap;
}

.nav__link::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(30,99,255,.05);
  border-radius: 12px;
  opacity: 0;
  transition: var(--transition-fast);
  z-index: -1;
}

.nav__link:hover{
  color: var(--primary);
}

.nav__link:hover::before {
  opacity: 1;
}

.nav__link.is-active{
  background: linear-gradient(135deg, rgba(30,99,255,.12), rgba(30,99,255,.08));
  color: var(--primary);
  font-weight: 700;
  box-shadow: 0 0 0 3px rgba(30,99,255,.08);
}

/* Resaltado azul del menú actual cuando el usuario está logueado */
body.user-authenticated .nav__link.is-active,
body.user-authenticated .nav__dropdown-trigger.is-active{
  background: linear-gradient(135deg, rgba(30,99,255,.18), rgba(30,99,255,.12));
  color: var(--primary);
  font-weight: 700;
  box-shadow: 0 0 0 2px rgba(30,99,255,.2);
}
body.user-authenticated .nav__dropdown-item.is-active{
  background: rgba(30,99,255,.15);
  color: var(--primary);
  font-weight: 700;
  border-left: 3px solid var(--primary);
  padding-left: 13px;
}

/* CTA Button Premium */
.nav__cta{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap: 8px;

  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color:#fff;
  padding: 10px 18px;
  border-radius: 12px;
  font-weight: 800;
  font-size: 14px;
  border: none;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(30,99,255,.25);
  transition: var(--transition);
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}

.nav__cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,.2), transparent);
  opacity: 0;
  transition: opacity .3s ease;
}

.nav__cta:hover{
  transform: translateY(-2px);
  box-shadow: 0 12px 36px rgba(30,99,255,.32);
  filter: brightness(1.05);
}

.nav__cta:hover::before {
  opacity: 1;
}

/* Secondary to "Crear cuenta": a quiet outline instead of a filled pill with
   its own box-shadow ring, so the two header CTAs no longer read as two
   buttons of near-equal weight (still a real, visible button -- not
   hidden). */
.nav__cta--ghost{
  background: transparent;
  color: var(--text-secondary);
  box-shadow: none;
  border: 1px solid var(--border);
  font-weight: 650;
}
.nav__cta--ghost:hover{
  background: rgba(30,99,255,.06);
  color: var(--primary);
  border-color: rgba(30,99,255,.3);
  box-shadow: none;
  transform: translateY(-2px);
}

.nav__logout{ margin: 0; }

/* ---------- DROPDOWN ---------- */
.nav__dropdown{
  position: relative;
}

.nav__dropdown-trigger{
  display: flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  padding: 10px 14px;
  font-weight: 600;
  font-size: 15px;
  color: var(--text);
  border-radius: 12px;
  cursor: pointer;
  transition: var(--transition-fast);
  white-space: nowrap;
}

.nav__dropdown-trigger:hover{
  color: var(--primary);
  background: rgba(30,99,255,.05);
}

.nav__dropdown-trigger.is-active{
  background: linear-gradient(135deg, rgba(30,99,255,.12), rgba(30,99,255,.08));
  color: var(--primary);
  font-weight: 700;
}

.nav__dropdown-icon{
  transition: transform .3s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-block;
}

.nav__dropdown-trigger.is-open .nav__dropdown-icon{
  transform: rotate(180deg);
}

.nav__dropdown-menu{
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right:auto;
  background: var(--surface-card);
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  box-shadow: var(--shadow-dropdown);
  min-width: 220px;
  max-width: min(280px, calc(100vw - 24px));
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity .2s ease, visibility .2s ease, transform .2s ease;
  z-index: 110;
  overflow: hidden;
  backdrop-filter: blur(10px);
}

.nav__dropdown[data-dropdown="cuenta"] .nav__dropdown-menu,
.nav__dropdown[data-dropdown="staff"] .nav__dropdown-menu{
  left:auto;
  right:0;
}

.nav__dropdown.is-open .nav__dropdown-menu{
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav__dropdown-section-label{
  margin: 0 0 4px;
  padding: 0 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.nav__dropdown-item{
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 10px 16px;
  text-align: left;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  background: transparent;
  border: none;
  cursor: pointer;
  /* Solo color/fondo/sombra transicionan: nada que afecte al ancho o alto
     del propio item (ver .nav__dropdown-item:hover). */
  transition: background-color .15s ease, color .15s ease, box-shadow .15s ease;
  white-space: nowrap;
  text-decoration: none;
}

.nav__mega-item{
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  padding: 9px 10px;
  border-radius: 10px;
  white-space: normal;
}

/* Sin cambios de padding/transform en hover: el ancho de la columna de
   texto (minmax(0,1fr)) depende del padding del propio item, así que
   alterarlo en :hover reflowaba el subtítulo (p.ej. "Organismos"). El
   estado hover unificado vive en .nav__dropdown-item:hover, más abajo. */

.nav__mega-item span:last-child{
  display: grid;
  gap: 2px;
  min-width: 0;
}

.nav__mega-item strong{
  color: var(--text);
  font-size: 14px;
  line-height: 1.2;
  transition: color .15s ease;
}

.nav__mega-item small{
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
}

.nav__mega-item:hover strong,
.nav__mega-item.is-active strong{
  color: var(--primary);
}

.nav__item-icon{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: rgba(30,99,255,.08);
  color: var(--primary);
  font-size: 0;
  line-height: 1;
  position: relative;
}

.nav__item-icon::before {
  content: "";
  width: 18px;
  height: 18px;
  background: currentColor;
  -webkit-mask: var(--nav-icon-mask) center / contain no-repeat;
  mask: var(--nav-icon-mask) center / contain no-repeat;
}

.nav__item-icon--oposiciones { --nav-icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round' d='M12 21a9 9 0 1 1 9-9M12 16a4 4 0 1 1 4-4m-4 0 9-9m-3 0h3v3'/%3E%3C/svg%3E"); }
.nav__item-icon--bolsas { --nav-icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round' d='M10 6V5a2 2 0 0 1 2-2h0a2 2 0 0 1 2 2v1m-9 0h14a1 1 0 0 1 1 1v11a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V7a1 1 0 0 1 1-1Zm4 6h6'/%3E%3C/svg%3E"); }
.nav__item-icon--plazo { --nav-icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round' d='M7 3v3m10-3v3M4 9h16M5 5h14a1 1 0 0 1 1 1v13a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a1 1 0 0 1 1-1Zm7 7v4l3 2'/%3E%3C/svg%3E"); }
.nav__item-icon--calendar { --nav-icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round' d='M7 3v3m10-3v3M4 9h16M5 5h14a1 1 0 0 1 1 1v13a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a1 1 0 0 1 1-1Zm3 8h3v3H8z'/%3E%3C/svg%3E"); }
.nav__item-icon--oep { --nav-icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round' d='M7 3h7l5 5v13H7a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2Zm7 0v6h5M9 13h6M9 17h6'/%3E%3C/svg%3E"); }
.nav__item-icon--organismos { --nav-icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round' d='M3 21h18M5 21V9l7-5 7 5v12M9 21v-6h6v6M9 10h.01M15 10h.01'/%3E%3C/svg%3E"); }
.nav__item-icon--tipos { --nav-icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round' d='M4 7h16M4 12h10M4 17h7m7-1 2 2 3-4'/%3E%3C/svg%3E"); }
.nav__item-icon--novedades { --nav-icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round' d='M18 8a6 6 0 0 0-12 0c0 7-3 7-3 9h18c0-2-3-2-3-9ZM10 21h4'/%3E%3C/svg%3E"); }
.nav__item-icon--territorio { --nav-icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round' d='M12 21s7-5.2 7-11a7 7 0 1 0-14 0c0 5.8 7 11 7 11Zm0-8a3 3 0 1 0 0-6 3 3 0 0 0 0 6Z'/%3E%3C/svg%3E"); }

.nav__dropdown-item:hover,
.nav__dropdown-item:focus-visible{
  background: rgba(30,99,255,.08);
  color: var(--primary);
  /* Barra de acento pintada dentro del propio borde: no reserva espacio ni
     cambia el ancho de contenido, así que no puede reflowar el subtítulo. */
  box-shadow: inset 3px 0 0 var(--primary);
}

.nav__dropdown-item.is-active{
  background: rgba(30,99,255,.12);
  color: var(--primary);
  font-weight: 700;
}

.nav__dropdown-form{
  margin: 0;
  display: block;
}

.nav__dropdown-form .nav__dropdown-item{
  width: 100%;
}

/* ---------- MOBILE NAV ---------- */
.nav__toggle{
  display:none;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.6);
  cursor: pointer;
  align-items:center;
  justify-content:center;
  transition: var(--transition-fast);
}

.nav__toggle:hover {
  background: rgba(255,255,255,.8);
  border-color: rgba(30,99,255,.2);
}

@media (prefers-color-scheme: dark) and (min-width: 99999px){
  .nav__toggle { background: rgba(16,24,42,.6); }
  .nav__toggle:hover { background: rgba(16,24,42,.8); }
}

.hamburger{
  width: 18px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  position: relative;
  transition: var(--transition-fast);
}

.hamburger:before,
.hamburger:after{
  content:"";
  position:absolute;
  left:0;
  width: 18px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: var(--transition-fast);
}

.hamburger:before{ top:-6px; }
.hamburger:after{ top: 6px; }

/* Drawer menú móvil (solo visible ≤980px) */
.navdrawer{
  display: none;
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(2, 6, 23, 0.42);
  backdrop-filter: blur(5px);
}
.navdrawer.is-open { display: block; }

.navdrawer__panel{
  position: absolute;
  top: calc(var(--header-h) + 3px);
  right: 16px;
  left: 16px;
  max-height: calc(100vh - var(--header-h) - 24px);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  background: var(--card);
  display: flex;
  flex-direction: column;
}
.navdrawer__head{
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.navdrawer__panel .nav--mobile{
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* Móvil: fondo opaco para legibilidad (no afecta a PC) */
@media (max-width: 1080px) {
  .navdrawer {
    top: var(--header-h);
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(2, 6, 23, 0.78);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }
  .navdrawer.is-open .navdrawer__panel,
  .navdrawer.is-open .nav--mobile { background: #fff; }
  .navdrawer.is-open .navdrawer__head { background: #f8fafc; }
}
@media (max-width: 1080px) and (prefers-color-scheme: dark) and (min-width: 99999px) {
  .navdrawer.is-open .navdrawer__panel,
  .navdrawer.is-open .nav--mobile { background: #141e3a; }
  .navdrawer.is-open .navdrawer__head { background: #1a2442; }
}

.navdrawer__title{
  font-weight: 800;
  letter-spacing: -.2px;
}

.iconbtn{
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: transparent;
  cursor: pointer;
  color: var(--text);
  transition: var(--transition-fast);
}

.iconbtn:hover {
  background: rgba(30,99,255,.08);
  border-color: rgba(30,99,255,.2);
}

.nav--mobile{
  display:flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px;
}

.nav__subsection{
  padding: 6px 10px 0;
  color: var(--primary);
  font-size: 12px;
  font-weight: 850;
}

.navdrawer__hr{
  height: 1px;
  background: var(--border);
  margin: 10px 0;
}

.nav__cta--full{
  width: 100%;
}

/* responsive */
@media (max-width: 1080px){
  .nav--desktop{ display:none; }
  .nav__toggle{ display:flex; }
  
  :root{
    --header-height: 68px;
    --brand-logo-height: 38px;
    --brand-logo-max-width: 190px;
    --brand-mark-size: 38px;
    --nav-item-height: 40px;
  }
}

@media (max-width: 640px){
  :root{
    --header-height: 66px;
    --page-top-spacing: var(--page-top-spacing-mobile);
    --brand-logo-height: 36px;
    --brand-logo-max-width: 176px;
    --brand-mark-size: 36px;
  }
}

/* ---------- NAV: separadores de sección dentro de un dropdown ---------- */
.nav__dropdown-separator{
  height: 1px;
  margin: 4px 12px;
  background: var(--border-soft, rgba(15,23,42,.08));
}

/* Dropdowns con items descriptivos (icono + texto + subtítulo) en una sola
   columna: mismo ancho que ya usaban las columnas del mega menú (~220-280px),
   sin necesidad de la rejilla de 3 columnas. */
.nav__dropdown-menu--wide{
  min-width: 260px;
  max-width: min(300px, calc(100vw - 24px));
}

/* Dropdowns en 2 columnas (Mi espacio, Explorar): más anchos que una
   columna simple pero mucho más bajos que apilar todo verticalmente. El
   ancho es independiente del ancho de la barra de navegación (el menú es
   position:absolute), así que cabe sin problema en cualquier viewport de
   escritorio (el corte a menú móvil ya ocurre antes, a 1080px). */
.nav__dropdown-menu--split{
  min-width: 440px;
  max-width: min(480px, calc(100vw - 24px));
  padding: 10px;
}

.nav__dropdown-item--top{
  font-weight: 700;
}

.nav__dropdown-cols{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 16px;
  align-items: start;
}

.nav__dropdown-col{
  display: grid;
  align-content: start;
  gap: 2px;
  min-width: 0;
}

/* Etiquetas largas ("Mis exámenes y simulacros") pueden no caber en el
   ancho de una columna a 2 columnas: mejor una segunda línea estable
   (el ajuste no depende de hover) que recortar el texto. */
.nav__dropdown-col .nav__dropdown-item{
  white-space: normal;
  line-height: 1.3;
}

.nav__dropdown-col + .nav__dropdown-col{
  border-left: 1px solid rgba(15,23,42,.07);
  padding-left: 16px;
}

/* Explorar: columna de items (más ancha) + columna de destacados (más
   compacta), en vez de dos columnas iguales. */
.nav__dropdown-cols--explorar{
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
}

.nav__dropdown-col--featured{
  gap: 6px;
}

.nav__dropdown-featured{
  display: block;
  box-sizing: border-box;
  padding: 9px 10px;
  border-radius: 10px;
  background: rgba(30,99,255,.06);
  text-decoration: none;
  transition: background-color .15s ease;
}

.nav__dropdown-featured:hover,
.nav__dropdown-featured:focus-visible{
  background: rgba(30,99,255,.12);
}

.nav__dropdown-featured__title{
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  transition: color .15s ease;
}

.nav__dropdown-featured:hover .nav__dropdown-featured__title,
.nav__dropdown-featured.is-active .nav__dropdown-featured__title{
  color: var(--primary);
}

.nav__dropdown-featured__desc{
  display: block;
  margin-top: 2px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  line-height: 1.3;
}

/* Enlace "ver todo / ver más" al final de un dropdown */
.nav__dropdown-item--cta{
  color: var(--primary);
  font-weight: 700;
  /* En la columna estrecha de "destacados" este texto puede no caber en
     una sola línea; el ajuste es estático (no depende de hover), así que
     no genera inestabilidad, solo una segunda línea si hace falta. */
  white-space: normal;
}

/* "Ayuda" queda cerca del borde derecho del header; se abre hacia la
   izquierda igual que "Mi cuenta" y "Staff" para no salirse del viewport. */
.nav__dropdown[data-dropdown="ayuda"] .nav__dropdown-menu{
  left: auto;
  right: 0;
}

/* CTA "Crear cuenta" visible en la cabecera móvil, fuera del drawer */
.nav__cta--mobile-header{ display: none; }

@media (max-width: 1080px){
  .nav__cta--mobile-header{
    display: inline-flex;
    padding: 8px 14px;
    font-size: 13px;
  }
}

/* En viewports muy estrechos, el logo + "Crear cuenta" + el botón de menú no
   caben con su tamaño habitual y el CTA (el único elemento flexible del
   grupo) se comprime hasta solaparse visualmente con el icono de menú.
   Se libera espacio reduciendo logo/gap/CTA; el botón de menú no se toca
   (prioridad: logo -> acceso al menú -> CTA). */
@media (max-width: 340px){
  .topbar__inner{ gap: 8px; }
  :root{
    --brand-logo-height: 30px;
    --brand-logo-max-width: 128px;
  }
  .nav__cta--mobile-header{
    padding: 6px 9px;
    font-size: 11.5px;
  }
}

/* ---------- DRAWER MÓVIL: acordeones por sección ---------- */
.navdrawer__group{
  border-radius: 12px;
}

.navdrawer__group-summary{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 44px;
  padding: 10px 12px;
  font-weight: 700;
  font-size: 15px;
  color: var(--text);
  cursor: pointer;
  border-radius: 12px;
  list-style: none;
}

.navdrawer__group-summary::-webkit-details-marker{ display: none; }
.navdrawer__group-summary::marker{ content: ""; }

.navdrawer__group-summary:hover,
.navdrawer__group-summary:focus-visible{
  background: rgba(30,99,255,.06);
  color: var(--primary);
}

.navdrawer__group-icon{
  flex: 0 0 auto;
  transition: transform .2s ease;
}

.navdrawer__group[open] > .navdrawer__group-summary .navdrawer__group-icon{
  transform: rotate(180deg);
}

/* Ocultamos explícitamente en vez de depender solo de la regla nativa
   details:not([open]) > *:not(summary){display:none}: si un author style
   como display:flex se aplicara siempre, ganaría por cascada a esa regla de
   user-agent y el acordeón no podría cerrarse. */
.navdrawer__group-body{
  display: none;
}
.navdrawer__group[open] > .navdrawer__group-body{
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 2px 0 8px 10px;
}

.nav__link--cta{
  color: var(--primary);
  font-weight: 700;
}

.nav__link--logout{
  width: 100%;
  background: transparent;
  border: none;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
}

/* ---------- PAGE HEADER ---------- */
.pagehead{
  padding: var(--page-top-spacing) 0 12px;
}

.pagehead__row{
  display:flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}

.pagetitle{
  margin: 0;
  font-size: 28px;
  font-weight: 900;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, var(--text), var(--text-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.pagesubtitle{
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 16px;
  font-weight: 500;
}
.pagesubtitle:empty{
  display: none;
}

.pageactions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

/* ---------- BREADCRUMBS ---------- */
.breadcrumbs {
  margin-bottom: 10px;
}

.breadcrumbs__list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 0;
  margin: 0;
  font-size: 13px;
}

.breadcrumbs__item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.breadcrumbs__item:not(:last-child)::after {
  content: "›";
  color: var(--muted);
  font-weight: 700;
  font-size: 14px;
  opacity: 0.7;
}

.breadcrumbs__link {
  color: var(--muted);
  text-decoration: none;
  transition: var(--transition-fast);
  padding: 4px 8px;
  border-radius: 8px;
}

.breadcrumbs__link:hover {
  color: var(--primary);
  background: rgba(30, 99, 255, 0.08);
}

.breadcrumbs__current {
  font-weight: 700;
  color: var(--text);
  padding: 4px 10px;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(30, 99, 255, 0.08), rgba(31, 125, 181, 0.06));
  border: 1px solid rgba(30, 99, 255, 0.15);
}

/* ---------- MAIN ---------- */
.main{
  padding-top: 14px;
  padding-bottom: 28px;
}

/* ---------- CARDS PREMIUM ---------- */
.card{
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  padding: 24px;
  transition: var(--transition-fast);
}

.card:hover {
  border-color: rgba(30,99,255,.12);
  box-shadow: 0 4px 16px rgba(30,99,255,.08);
}

/* ---------- BUTTONS PREMIUM ---------- */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.8);
  color: var(--text);
  font-weight: 700;
  font-size: 14px;
  cursor:pointer;
  transition: var(--transition-fast);
  white-space: nowrap;
}

.btn:hover{ 
  background: rgba(255,255,255,.95);
  border-color: rgba(30,99,255,.2);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(30,99,255,.12);
}

.btn-primary{
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  border-color: transparent;
  color: #fff;
  box-shadow: 0 8px 20px rgba(30,99,255,.22);
}

.btn-primary:hover{
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #fff;
  box-shadow: 0 12px 32px rgba(30,99,255,.28);
  transform: translateY(-2px);
}

.btn-secondary{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: rgba(30,99,255,.08);
  color: var(--primary);
  border: 1px solid rgba(30,99,255,.18);
  padding: 10px 16px;
  border-radius: 12px;
  font-weight: 650;
  font-size: 14px;
  cursor: pointer;
  transition: var(--transition-fast);
  text-decoration: none;
}

/* Danger variant for destructive actions */
.btn-danger{
  background: linear-gradient(135deg, #ef4444, #f97316);
  color: #fff;
  border: none;
  box-shadow: 0 8px 20px rgba(239,68,68,.18);
}

.btn-danger:hover{
  background: linear-gradient(135deg, #ef4444, #f97316);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(239,68,68,.22);
}

.btn-secondary:hover{
  background: rgba(30,99,255,.12);
  border-color: rgba(30,99,255,.3);
  transform: translateY(-1px);
}

/* ---------- FORMS ---------- */
.filters{
  display:flex;
  gap: 12px;
  flex-wrap:wrap;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.filters > div{
  flex:1;
  min-width: 160px;
  display:flex;
  flex-direction:column;
  gap:6px;
}

.filters label{
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--muted);
  font-weight: 700;
}

input, select, button{
  width:100%;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--input-border);
  font-size: 14px;
  font-weight: 500;
  box-sizing:border-box;
  background: var(--input-bg);
  color: var(--text);
  font-family: inherit;
  transition: var(--transition-fast);
}

input:hover, select:hover {
  border-color: rgba(30,99,255,.25);
}

input:focus, select:focus{
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(30,99,255,.12);
}

button{
  cursor:pointer;
  border:none;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color:#fff;
  font-weight: 700;
  box-shadow: 0 8px 16px rgba(30,99,255,.2);
}

button:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(30,99,255,.28);
  filter: brightness(1.05);
}

button:disabled{ 
  opacity: .6; 
  cursor: not-allowed;
  transform: none;
}

/* ---------- FILTER MULTI (dropdowns con checkboxes) ---------- */
.filter-multi { position: relative; }
.filter-multi__wrap { position: relative; }
.filter-multi__trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-width: 160px;
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 500;
  text-align: left;
  background: var(--input-bg, #fff);
  border: 1px solid var(--input-border, #e2e8f0);
  border-radius: 12px;
  cursor: pointer;
  color: var(--text, #1e293b);
  font-family: inherit;
  appearance: none;
  box-sizing: border-box;
}
.filter-multi__trigger:hover { border-color: rgba(30,99,255,.25); }
.filter-multi__trigger[aria-expanded="true"] { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(30,99,255,.12); }
.filter-multi__trigger .filter-multi__arrow { margin-left: 8px; font-size: 10px; color: var(--muted); transition: transform .2s; }
.filter-multi__trigger[aria-expanded="true"] .filter-multi__arrow { transform: rotate(180deg); }
.filter-multi__panel {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 50;
  margin-top: 6px;
  min-width: 260px;
  background: var(--card, #fff);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 12px;
  box-shadow: 0 12px 28px rgba(0,0,0,.12);
  overflow: hidden;
  display: none;
  flex-direction: column;
}
.filter-multi__panel:not([hidden]) {
  display: flex;
}
.filter-multi__list {
  max-height: 280px;
  overflow-y: auto;
  padding: 8px 0;
}
.filter-multi__option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  cursor: pointer;
  font-size: 14px;
  color: var(--text);
  transition: background .15s;
}
.filter-multi__option:hover { background: rgba(0,0,0,.05); }
.filter-multi__option input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 0;
  flex-shrink: 0;
  cursor: pointer;
  accent-color: var(--primary);
}
.filter-multi__footer {
  display: flex;
  gap: 10px;
  padding: 12px 14px;
  border-top: 1px solid var(--border);
  background: var(--surface, #f8fafc);
}
.filter-multi__footer .btn { flex: 1; padding: 8px 12px; font-size: 13px; }
.filter-multi__footer .btn--ghost { background: #fff; border: 1px solid var(--border); color: var(--text); }
.filter-multi__footer .btn--ghost:hover { background: var(--surface); }

/* ---------- TABLES PREMIUM ---------- */
.table{
  width:100%;
  border-collapse: collapse;
  background: transparent;
}

.table th,
.table td{
  text-align:left;
  padding: 14px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.table th{
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--muted);
  font-weight: 700;
  background: rgba(30,99,255,.02);
}

.table td{
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
}

.table tbody tr {
  transition: var(--transition-fast);
}

.table tbody tr:hover {
  background: rgba(30,99,255,.04);
}

/* Contenedor de tablas: scroll horizontal en móvil/tablet */
.tablewrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.tablewrap .table { min-width: 400px; }

.pagination{
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 18px;
  flex-wrap: wrap;
}

.pagination__status{
  color: var(--muted, #64748b);
  font-size: 14px;
}

.btn.disabled,
.btn[aria-disabled="true"]{
  opacity: .55;
  pointer-events: none;
}

.pill{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(30,99,255,.1), rgba(31,125,181,.08));
  border: 1px solid rgba(30,99,255,.2);
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
  transition: var(--transition-fast);
  white-space: nowrap;
}

.pill:hover {
  background: linear-gradient(135deg, rgba(30,99,255,.15), rgba(31,125,181,.12));
  border-color: rgba(30,99,255,.3);
  transform: translateY(-1px);
}

.muted{ 
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}

/* ---------- EXAM BUTTON PREMIUM ---------- */
.btn-exam{
  padding: 9px 14px;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #fff;
  border: none;
  border-radius: 10px;
  font-weight: 700;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition-fast);
  box-shadow: 0 6px 16px rgba(30,99,255,.16);
  position: relative;
  overflow: hidden;
}

.btn-exam::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,.2), transparent);
  opacity: 0;
  transition: opacity .3s ease;
}

.btn-exam:hover{
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(30,99,255,.24);
  filter: brightness(1.05);
}

.btn-exam:hover::before {
  opacity: 1;
}

.btn-exam:disabled{
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* ---------- TOAST PREMIUM ---------- */
.toast{
  margin-top: 16px;
  padding: 14px 18px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(30,99,255,.08), rgba(31,125,181,.06));
  border: 1px solid rgba(30,99,255,.2);
  color: var(--primary);
  display: none;
  font-size: 14px;
  font-weight: 600;
  animation: slideIn .24s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 16px rgba(30,99,255,.1);
}

.toast.bad{
  background: linear-gradient(135deg, rgba(239,68,68,.08), rgba(239,68,68,.06));
  border-color: rgba(239,68,68,.3);
  color: #dc2626;
}

@keyframes slideIn{
  from{
    opacity: 0;
    transform: translateY(-12px);
  }
  to{
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---------- FOOTER ---------- */
.footer{
  border-top: 1px solid var(--border);
  background: var(--surface);
  backdrop-filter: blur(14px);
  margin-top: 0;
}

.footer__inner{
  display:grid;
  grid-template-columns: minmax(240px, 1.4fr) repeat(4, minmax(150px, 1fr));
  align-items: flex-start;
  padding: 36px 0 28px;
  gap: 32px;
}

@media (min-width: 769px) and (max-width: 1024px){
  .footer__inner{
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1fr);
  }
}

.footer-brand,
.footer__brand{
  display:grid;
  gap: 14px;
  align-items: flex-start;
  min-width: 0;
  max-width: 340px;
}

.brand--footer{
  flex: 0 0 auto;
}

.brand--footer .brand-picture{
  height: var(--footer-logo-height);
  max-width: var(--footer-logo-max-width);
}

.footer-brand__logo,
.footer__logo{
  width: auto;
  max-width: var(--footer-logo-max-width);
  height: var(--footer-logo-height);
  border-radius: 0;
  object-fit: contain;
  border: 0;
  transition: var(--transition-fast);
}

.footer-brand__logo:hover,
.footer__logo:hover {
  transform: scale(1.05);
}

.footer__email{
  display: inline-block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  margin-top: 12px;
  overflow-wrap: anywhere;
  text-decoration: none;
  transition: var(--transition-fast);
}
.footer__email:hover{
  color: var(--primary);
}

.footer__small{
  color: var(--muted);
  font-size: 13px;
  margin: 0;
  font-weight: 500;
  line-height: 1.55;
  max-width: 310px;
}

.footer__bottom{
  padding-top: 16px;
  padding-bottom: 24px;
  border-top: 1px solid var(--border);
  margin-top: 8px;
  text-align: center;
}
.footer__copyright{
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
}
.footer__aviso {
  margin-top: 8px;
  font-size: 12px;
  color: var(--muted);
  font-weight: 400;
  line-height: 1.4;
}
.footer__tagline {
  margin-top: 10px;
  font-size: 11px;
  color: var(--muted);
  opacity: 0.9;
  font-weight: 400;
}

.footer__social{
  display: flex;
  gap: 12px;
  margin-top: 14px;
  align-items: center;
}

.footer__social-link{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(248, 250, 253, 0.72);
  color: var(--muted);
  transition: var(--transition-fast);
}

.footer__social-link:hover{
  border-color: rgba(30, 99, 255, 0.28);
  background: rgba(30, 99, 255, 0.06);
  color: var(--primary);
  transform: translateY(-2px);
}

.footer__social-icon{
  width: 16px;
  height: 16px;
}

.footer__col{
  display:flex;
  flex-direction: column;
  gap: 9px;
  min-width: 0;
}

.footer__title{
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
  font-weight: 800;
  margin: 0 0 8px 0;
}

.footer__link{
  color: var(--muted);
  font-weight: 600;
  font-size: 14px;
  line-height: 1.45;
  transition: var(--transition-fast);
}

.footer__link:hover{
  color: var(--primary);
  transform: translateX(2px);
}

/* Shared media query for small screens */
@media (max-width: 900px){
  .pagetitle{ 
    font-size: 24px; 
    -webkit-text-fill-color: var(--text);
    background: none;
  }
  
  .pagesubtitle {
    font-size: 15px;
  }
  
  .filters {
    flex-direction: column;
  }
  
  .filters > div {
    min-width: 100%;
  }
}

/* /organismos/: filtros siempre por encima del grid (stacking) y menos “jank” al cargar logos */
.organismos-filters-card {
  position: relative;
  z-index: 30;
  isolation: isolate;
}
.organismos-grid-card {
  position: relative;
  z-index: 1;
}
.organismos-filters-card .filter-multi__panel {
  z-index: 60;
}

/* ---- Search autocomplete (progressive enhancement) -----------------
   Generic dropdown for every public ?q= search: organismos, oposiciones,
   bolsas, exámenes, OEP, home. Driven by static/js/search-autocomplete.js. */
.search-autocomplete-anchor{
  position: relative;
}

.search-autocomplete-form--loading input[name="q"]{
  background-image: linear-gradient(90deg, transparent, var(--color-primary-soft, rgba(30,99,255,.12)), transparent);
  background-size: 240% 100%;
  background-repeat: no-repeat;
  animation: search-autocomplete-sheen 1.1s linear infinite;
}
@keyframes search-autocomplete-pulse{
  50%{ opacity: .45; }
}
@keyframes search-autocomplete-sheen{
  from{ background-position: 140% 0; }
  to{ background-position: -140% 0; }
}
.search-autocomplete{
  position: absolute;
  z-index: 40;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  max-width: 100%;
  max-height: min(60vh, 420px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--card, #fff);
  box-shadow: var(--shadow-dropdown, 0 24px 70px rgba(15,23,42,.16));
}
.search-autocomplete__list{
  margin: 0;
  padding: 0;
  list-style: none;
}
.search-autocomplete__option + .search-autocomplete__option{
  border-top: 1px solid var(--border-light, rgba(15,23,42,.05));
}
.search-autocomplete__link{
  display: flex;
  gap: 12px;
  align-items: center;
  min-height: 44px;
  padding: 10px 10px;
  border-radius: 10px;
  color: var(--text);
  text-decoration: none;
}
.search-autocomplete__option.is-active .search-autocomplete__link,
.search-autocomplete__link:hover{
  background: var(--color-primary-soft, rgba(30,99,255,.1));
}
.search-autocomplete__media{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid var(--border);
  overflow: hidden;
}
.search-autocomplete__img{
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.search-autocomplete__media--fallback{
  background: var(--color-primary-soft, rgba(30,99,255,.1));
}
.search-autocomplete__media--fallback::after{
  content: "";
  width: 14px;
  height: 14px;
  border-radius: 4px;
  background: var(--primary);
  opacity: .55;
}
.search-autocomplete__body{
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.search-autocomplete__name{
  font-weight: 800;
  font-size: 14px;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.search-autocomplete__meta{
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.search-autocomplete__link--all{
  min-height: 44px;
  justify-content: space-between;
  font-weight: 800;
  font-size: 13px;
  color: var(--primary);
}
.search-autocomplete__option--all{
  border-top: 1px solid var(--border);
  margin-top: 2px;
}
.search-autocomplete__all-count{
  flex: 0 0 auto;
  min-width: 20px;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--color-primary-soft, rgba(30,99,255,.1));
  color: var(--primary);
  font-size: 12px;
  text-align: center;
}
.search-autocomplete__empty{
  padding: 12px 12px 6px;
}
.search-autocomplete__empty-text{
  margin: 0 0 2px;
  color: var(--text-secondary);
  font-size: 13px;
}
.search-autocomplete__empty-link{
  display: flex;
  align-items: center;
  min-height: 44px;
  color: var(--primary);
  font-weight: 800;
  font-size: 13px;
  text-decoration: none;
}
.search-autocomplete__empty-link:hover{ text-decoration: underline; }

/* On wider screens a search box that sits in one column of a multi-column
   filter form is narrow; let its dropdown grow past the field so titles
   stay readable. On mobile the field is already ~full width, so the panel
   just tracks it (left:0/right:0) and never overflows the viewport. A
   dropdown anchored to a full-width search form just spans the form. */
@media (min-width: 700px){
  .search-autocomplete-anchor--field > .search-autocomplete{
    min-width: 340px;
    max-width: min(560px, 60vw);
  }
}

@media (prefers-reduced-motion: reduce){
  .search-autocomplete-form--loading input[name="q"] { animation: none; }
}

.organismos-extra-filters{
  display: grid;
  gap: 10px;
  margin: 4px 0 0;
  padding: 16px 0 0;
  border: 0;
  border-top: 1px solid var(--border);
}

.organismos-extra-filters legend{
  width: 100%;
  margin-bottom: 8px;
  color: var(--text);
  font-size: 13px;
  font-weight: 850;
}

.organismos-extra-filters .organismos-filter-check{
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
  text-align: left;
  text-transform: none;
}

.organismos-filter-check input[type="checkbox"]{
  width: 18px;
  height: 18px;
  margin: 0;
  justify-self: start;
  accent-color: var(--primary);
}

.organismos-filter-check__label{
  min-width: 0;
  color: var(--text-secondary);
}

.organismos-filter-check .organismos-filter-check__count{
  margin: 0;
  justify-self: end;
  color: var(--muted);
  font-size: 12px;
}

.organismos-pagination{
  margin-top: 18px;
}

@media (max-width: 600px) {
  .pagetitle {
    font-size: 22px;
  }
  
  .card {
    padding: 18px;
  }
  
  .table th,
  .table td {
    padding: 10px 8px;
    font-size: 13px;
  }
}

/* ---------- RESPONSIVE: MÓVIL Y TABLET ---------- */
/* Tablet (768px): márgenes y espaciado */
@media (max-width: 768px) {
  .container { padding-left: 20px; padding-right: 20px; }
  .pagehead { padding-top: 20px; }
  .pagehead__row { gap: 12px; }
  .pageactions { gap: 10px; }
  .section-heading { font-size: 18px; }
  .footer__inner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 28px 0;
    gap: 28px;
  }
  
  .footer__brand {
    min-width: 0;
    max-width: none;
  }
}

/* Móvil (640px): touch targets y contenido */
@media (max-width: 640px) {
  .container { padding-left: 16px; padding-right: 16px; }
  .main { padding-top: 12px; padding-bottom: 24px; }
  .btn {
    min-height: 44px;
    padding: 12px 18px;
  }
  .nav--mobile .nav__link {
    min-height: 44px;
    padding: 10px 12px;
    display: flex;
    align-items: center;
  }
  .pagehead__row { flex-direction: column; align-items: stretch; gap: 14px; }
  .pageactions { width: 100%; }
  .pageactions .btn { flex: 1; min-width: 0; }
  
  .footer__inner { grid-template-columns: 1fr; text-align: left; padding: 28px 0; }
  .footer__brand { align-items: flex-start; }
  .footer__small { max-width: none; }
  .footer__social { justify-content: flex-start; }
  
  .footer__col { min-width: 0; align-items: flex-start; }
}

@media (max-width: 480px) {
  .container { padding-left: 14px; padding-right: 14px; }
  .pagetitle { font-size: 20px; }
  .card { padding: 16px; }
  .navdrawer__panel { left: 12px; right: 12px; }
}

/* ---------- UTILITIES ---------- */
.inline-form{ display: inline; }
.text-center{ text-align: center; }

/* small spacing and display utilities */
.d-none{ display:none !important; }

.mb-sm{ margin-bottom:10px !important; }
.narrow-container{ max-width:520px; margin: 0 auto; padding: 1rem 0; }

.stack{ display:flex; flex-direction:column; gap:12px; }

.empty-state{ padding: 40px 20px; }
.lead{ font-size:16px; margin-bottom:20px; color:var(--muted); }
.mb-lg{ margin-bottom:24px !important; }
.mt-lg{ margin-top:24px !important; }

.section-heading{ margin: 0 0 20px 0; font-size:20px; font-weight:700; }

.pt-md{ padding-top: 1rem; }
.mb-xxsmall{ margin-bottom: .75rem; }

.label-strong{ font-size:14px; font-weight:700; color:var(--text); }
.alert--danger{ padding: 14px 16px; background: linear-gradient(135deg, rgba(239,68,68,.08), rgba(239,68,68,.06)); border: 1px solid rgba(239,68,68,.2); border-radius:12px; color:#dc2626; font-weight:600; font-size:14px; }

.calendar-wide-shell{
  width:min(1540px,calc(100vw - clamp(32px,6vw,112px)));
  margin-left:50%;
  margin-top:0;
  transform:translateX(-50%);
}
.calendar-filters{ margin-top:18px; margin-bottom:0; padding:0; overflow:hidden; }
.calendar-filters__summary{ display:flex; align-items:center; justify-content:space-between; gap:16px; padding:16px 18px; cursor:pointer; list-style:none; }
.calendar-filters__summary::-webkit-details-marker{ display:none; }
.calendar-filters__summary strong,.calendar-filters__summary small{ display:block; }
.calendar-filters__summary strong{ color:var(--text); font-size:17px; }
.calendar-filters__summary small{ margin-top:3px; color:var(--text-secondary); font-size:13px; font-weight:700; }
.calendar-filters .public-section-heading,.calendar-filters .calendar-filter-form{ padding:0 18px 18px; }
.calendar-filter-form{ grid-template-columns:minmax(220px,1.2fr) repeat(4,minmax(140px,1fr)) minmax(132px,.8fr) minmax(132px,.8fr); }
.calendar-check{ display:flex; align-items:center; gap:8px; min-height:44px; padding:0 12px; border:1px solid var(--border); border-radius:12px; color:var(--text-secondary); font-size:13px; font-weight:800; }
.calendar-check input{ width:16px; height:16px; }

.calendar-layout{ display:block; }
.calendar-main { min-width:0; }

.calendar-card{ padding:18px; overflow:hidden; border-radius:18px; box-shadow:0 18px 46px rgba(15,23,42,.08); }
.calendar-toolbar,.calendar-side-card__head{ display:flex; align-items:flex-start; justify-content:space-between; gap:12px; margin-bottom:12px; }
.calendar-toolbar__title{ display:flex; align-items:flex-start; gap:10px; min-width:0; }
.calendar-toolbar__icon{ display:inline-flex; align-items:center; justify-content:center; width:34px; height:34px; flex:0 0 34px; border-radius:11px; background:rgba(30,99,255,.1); color:var(--primary); }
.calendar-toolbar__icon svg{ width:21px; height:21px; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }
.calendar-toolbar h2,.calendar-side-card h2,.calendar-private-cta h2{ margin:0; color:var(--text); font-size:20px; letter-spacing:0; }
.calendar-toolbar p,.calendar-muted,.calendar-private-cta p{ margin:4px 0 0; color:var(--text-secondary); font-size:13px; line-height:1.4; }
.calendar-toolbar__actions{ display:grid; justify-items:end; gap:6px; }
.calendar-legend{ display:flex; flex-wrap:wrap; gap:6px; margin:-2px 0 10px; }
.calendar-legend__item{ display:inline-flex; align-items:center; gap:5px; padding:4px 7px; border:1px solid var(--border); border-radius:999px; background:rgba(255,255,255,.88); color:var(--text-secondary); font-size:10px; font-weight:850; line-height:1; }
.calendar-legend__item span{ width:8px; height:8px; border-radius:999px; background:var(--primary); }
.calendar-legend__item--green span{ background:#10b981; }
.calendar-legend__item--orange span{ background:#f97316; }
.calendar-legend__item--purple span{ background:#7c3aed; }
.calendar-legend__item--teal span{ background:#14b8a6; }
.calendar-legend__item--indigo span{ background:#4f46e5; }
.calendar-view-switch{ display:inline-flex; gap:3px; padding:3px; border:1px solid var(--border); border-radius:999px; background:rgba(248,250,253,.9); }
.calendar-view-switch a{ padding:7px 12px; border-radius:999px; color:var(--text-secondary); font-size:12px; font-weight:900; text-decoration:none; }
.calendar-view-switch a.is-active{ background:#fff; color:var(--primary); box-shadow:0 8px 20px rgba(15,23,42,.08); }
.calendar-month-nav{ display:flex; flex-wrap:wrap; justify-content:flex-end; gap:6px; }
.calendar-grid{ display:grid; gap:6px; }
.calendar-weekdays,.calendar-week{ display:grid; grid-template-columns:repeat(5,minmax(0,1fr)) minmax(112px,.36fr); gap:6px; }
.calendar-grid:not(.calendar-grid--compact-weekends) .calendar-weekdays,
.calendar-grid:not(.calendar-grid--compact-weekends) .calendar-week{ grid-template-columns:repeat(7,minmax(0,1fr)); }
.calendar-weekdays span{ color:var(--muted); font-size:12px; font-weight:900; text-align:center; text-transform:uppercase; }
.calendar-day{ min-width:0; min-height:176px; padding:8px; border:1px solid var(--border); border-radius:12px; background:rgba(255,255,255,.92); }
.calendar-day.is-muted{ opacity:.58; background:rgba(248,250,253,.68); }
.calendar-day.is-weekend:not(.has-events){ min-height:74px; opacity:.38; background:rgba(248,250,253,.48); }
.calendar-grid--compact-weekends .calendar-day.is-weekend:not(.has-events) .calendar-day__events{ display:none; }
.calendar-grid--compact-weekends .calendar-day.is-weekend:not(.has-events){ border-style:dashed; }
.calendar-day.is-today{ border-color:rgba(30,99,255,.42); box-shadow:inset 0 0 0 1px rgba(30,99,255,.18); }
.calendar-day.is-selected{ border-color:rgba(30,99,255,.62); box-shadow:0 0 0 2px rgba(30,99,255,.12),0 14px 30px rgba(15,23,42,.08); }
.calendar-day__head{ display:flex; align-items:center; justify-content:space-between; gap:8px; margin-bottom:6px; }
.calendar-day__head time{ color:var(--text); font-size:14px; font-weight:900; }
.calendar-day__date{ display:inline-flex; align-items:center; justify-content:center; min-width:26px; min-height:26px; border-radius:9px; color:var(--text); text-decoration:none; }
.calendar-day__date:hover,.calendar-day__date:focus-visible{ background:rgba(30,99,255,.08); color:var(--primary); outline:none; }
.calendar-day__events{ display:grid; gap:5px; }
.calendar-event{ display:grid; grid-template-columns:34px minmax(0,1fr); gap:7px; min-width:0; min-height:54px; padding:6px; border:1px solid rgba(30,99,255,.12); border-radius:10px; background:rgba(30,99,255,.06); color:var(--text); text-decoration:none; }
.calendar-event--green{ border-color:rgba(16,185,129,.18); background:rgba(16,185,129,.08); }
.calendar-event--orange{ border-color:rgba(249,115,22,.2); background:rgba(249,115,22,.08); }
.calendar-event--purple{ border-color:rgba(124,58,237,.18); background:rgba(124,58,237,.08); }
.calendar-event--teal{ border-color:rgba(20,184,166,.2); background:rgba(20,184,166,.08); }
.calendar-event--indigo{ border-color:rgba(79,70,229,.18); background:rgba(79,70,229,.08); }
.calendar-event--slate{ border-color:rgba(100,116,139,.18); background:rgba(100,116,139,.08); }
.calendar-event.is-deadline,
.calendar-week-event.is-deadline{ border-color:rgba(249,115,22,.5); background:rgba(255,247,237,.96); }
.calendar-event.is-deadline-today,
.calendar-week-event.is-deadline-today{
  border-color:#dc2626;
  background:linear-gradient(135deg,#fff1f2,#fff);
  box-shadow:0 0 0 1px rgba(220,38,38,.16),0 10px 24px rgba(220,38,38,.12);
  animation:calendarDeadlinePulse 1.55s ease-in-out infinite;
}
.calendar-week-event.is-deadline-today{ box-shadow:0 0 0 1px rgba(220,38,38,.16),0 12px 28px rgba(220,38,38,.13); }
.calendar-event:hover,.calendar-event:focus-visible{ border-color:rgba(30,99,255,.36); box-shadow:0 10px 24px rgba(15,23,42,.08); }
.calendar-event.is-deadline-today:hover,
.calendar-event.is-deadline-today:focus-visible,
.calendar-week-event.is-deadline-today:hover,
.calendar-week-event.is-deadline-today:focus-visible{
  border-color:#dc2626;
  box-shadow:0 0 0 2px rgba(220,38,38,.18),0 14px 30px rgba(220,38,38,.2);
}
.calendar-event__logo,.calendar-list-card__fallback{ display:inline-flex; align-items:center; justify-content:center; width:30px; height:30px; border:1px solid rgba(30,99,255,.08); border-radius:9px; background:#fff; color:var(--primary); font-size:9px; font-weight:900; }
.calendar-event__logo img,.calendar-list-card__logo{ width:100%; height:100%; object-fit:contain; }
.calendar-event__text{ display:grid; gap:1px; min-width:0; align-content:start; }
.calendar-event__text strong,.calendar-event__text small{ display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.calendar-event__text strong{ display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; white-space:normal; color:var(--text); font-size:11.5px; font-weight:850; line-height:1.18; }
.calendar-event.is-deadline-today .calendar-event__text strong,
.calendar-week-event.is-deadline-today strong{ color:#991b1b; }
.calendar-event__text small{ color:var(--text-secondary); font-size:9.5px; font-weight:650; line-height:1.18; }
.calendar-event__badge{
  display:inline-flex;
  width:max-content;
  max-width:100%;
  margin-top:0;
  padding:2px 5px;
  border-radius:999px;
  background:rgba(30,99,255,.1);
  color:var(--primary);
  font-size:8.5px;
  font-weight:850;
  line-height:1.2;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.calendar-event__badge--green{ background:rgba(16,185,129,.12); color:#047857; }
.calendar-event__badge--orange{ background:rgba(249,115,22,.14); color:#c2410c; }
.calendar-event__badge--purple{ background:rgba(124,58,237,.12); color:#6d28d9; }
.calendar-event__badge--teal{ background:rgba(20,184,166,.14); color:#0f766e; }
.calendar-event__badge--indigo{ background:rgba(79,70,229,.12); color:#4338ca; }
.calendar-event__badge--slate{ background:rgba(100,116,139,.14); color:#475569; }
.calendar-deadline-alert{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:max-content;
  margin:3px 0 2px;
  padding:2px 6px;
  border-radius:999px;
  background:#dc2626;
  color:#fff;
  font-size:9px;
  font-style:normal;
  font-weight:950;
  letter-spacing:.02em;
  line-height:1.2;
  text-transform:uppercase;
  box-shadow:0 6px 16px rgba(220,38,38,.22);
}
.calendar-more{ display:inline-flex; justify-self:start; color:var(--primary); font-size:12px; font-weight:900; text-decoration:none; }
.calendar-more:hover,.calendar-more:focus-visible{ color:var(--primary-dark); text-decoration:underline; }
.calendar-weekend-compact{ display:grid; align-content:start; justify-items:center; gap:8px; min-width:0; min-height:176px; padding:12px 6px; border:1px dashed rgba(148,163,184,.36); border-radius:12px; background:rgba(248,250,253,.54); text-align:center; }
.calendar-weekend-compact strong{ color:var(--text-secondary); font-size:14px; font-weight:850; line-height:1; }
.calendar-weekend-compact span{ color:var(--muted); font-size:10px; font-weight:750; }
.calendar-weekend-compact a{ margin-top:auto; color:var(--primary); font-size:11px; font-weight:850; line-height:1.2; text-decoration:none; }
.calendar-weekend-compact a:hover,.calendar-weekend-compact a:focus-visible{ text-decoration:underline; }
.calendar-weekend-compact.has-events{ background:linear-gradient(180deg, rgba(30,99,255,.055), rgba(16,185,129,.045)); border-style:solid; border-color:rgba(30,99,255,.24); box-shadow:inset 0 0 0 1px rgba(30,99,255,.05); }
.calendar-weekend-compact.has-events span{ color:var(--text); font-weight:900; }
.calendar-weekend-compact.has-events a{ display:inline-flex; align-items:center; justify-content:center; min-height:28px; padding:5px 8px; border-radius:999px; background:rgba(30,99,255,.1); }
.calendar-week-view{ display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); gap:10px; }
.calendar-week-day{ min-width:0; min-height:260px; padding:12px; border:1px solid var(--border); border-radius:14px; background:rgba(255,255,255,.94); }
.calendar-week-day.is-today{ border-color:rgba(30,99,255,.42); box-shadow:inset 0 0 0 1px rgba(30,99,255,.16); }
.calendar-week-day.is-weekend:not(:has(.calendar-week-event)){ opacity:.48; background:rgba(248,250,253,.68); }
.calendar-week-day header{ display:flex; align-items:center; justify-content:space-between; gap:8px; margin-bottom:12px; color:var(--text); font-weight:900; }
.calendar-week-day header span{ color:var(--text-secondary); font-size:12px; text-transform:uppercase; }
.calendar-week-day p{ margin:0; color:var(--muted); font-size:13px; font-weight:750; }
.calendar-week-day__events{ display:grid; gap:8px; }
.calendar-week-event{ display:grid; grid-template-columns:28px minmax(0,1fr); gap:9px; min-width:0; padding:10px; border:1px solid rgba(30,99,255,.14); border-radius:12px; background:rgba(30,99,255,.06); color:var(--text); text-decoration:none; }
.calendar-week-event .calendar-event__logo{ width:28px; height:28px; border-radius:9px; font-size:10px; }
.calendar-week-event span:last-child{ min-width:0; }
.calendar-week-event strong,.calendar-week-event small{ display:block; overflow:hidden; text-overflow:ellipsis; }
.calendar-week-event strong{ color:var(--text); font-size:13px; font-weight:950; line-height:1.25; }
.calendar-week-event small{ color:var(--text-secondary); font-size:11px; font-weight:650; line-height:1.3; }
.calendar-empty{ display:grid; gap:14px; margin-top:18px; padding:18px; border:1px dashed rgba(30,99,255,.24); border-radius:14px; background:rgba(30,99,255,.04); }
.calendar-empty p{ margin:0; color:var(--text-secondary); font-weight:750; }
.calendar-empty__actions{ display:flex; flex-wrap:wrap; gap:10px; }
.calendar-list-note { display:flex; align-items:center; justify-content:space-between; gap:14px; margin-top:14px; padding:14px 16px; border:1px solid rgba(30,99,255,.14); border-radius:14px; background:rgba(30,99,255,.05); color:var(--text-secondary); font-size:14px; font-weight:800; }
.calendar-list-note span { margin:0; }
.calendar-list-note a{ color:var(--primary); font-weight:900; text-decoration:none; }
.calendar-day-panel{ margin-top:18px; padding:22px; }
.calendar-day-panel__head{ display:flex; align-items:flex-start; justify-content:space-between; gap:16px; margin-bottom:16px; }
.calendar-day-panel__head h2{ margin:0; color:var(--text); font-size:22px; letter-spacing:0; }
.calendar-day-panel__head p:not(.public-eyebrow){ margin:6px 0 0; color:var(--text-secondary); font-size:14px; font-weight:700; }
.calendar-day-panel__list{ display:grid; gap:10px; }
.calendar-day-panel__event{ display:grid; grid-template-columns:42px minmax(0,1fr) auto; gap:14px; align-items:center; padding:14px; border:1px solid var(--border); border-left:4px solid var(--primary); border-radius:14px; background:rgba(255,255,255,.95); box-shadow:var(--shadow-sm); }
.calendar-day-panel__event--green{ border-left-color:#10b981; }
.calendar-day-panel__event--orange{ border-left-color:#f97316; }
.calendar-day-panel__event--purple{ border-left-color:#7c3aed; }
.calendar-day-panel__event--teal{ border-left-color:#14b8a6; }
.calendar-day-panel__event--indigo{ border-left-color:#4f46e5; }
.calendar-day-panel__event.is-deadline-today{ border-color:rgba(220,38,38,.28); border-left-color:#dc2626; background:linear-gradient(135deg,#fff1f2,#fff); }
.calendar-day-panel__logo{ display:inline-flex; align-items:center; justify-content:center; width:42px; height:42px; border:1px solid var(--border); border-radius:12px; background:#fff; color:var(--primary); font-size:12px; font-weight:950; }
.calendar-day-panel__logo img{ width:100%; height:100%; object-fit:contain; }
.calendar-day-panel__body{ min-width:0; }
.calendar-day-panel__body h3{ margin:7px 0 5px; color:var(--text); font-size:16px; letter-spacing:0; line-height:1.25; }
.calendar-day-panel__body h3 a{ color:inherit; text-decoration:none; }
.calendar-day-panel__body h3 a:hover{ color:var(--primary); }
.calendar-day-panel__body p{ margin:0; color:var(--text-secondary); font-size:13px; font-weight:750; }
.calendar-day-panel__actions{ display:flex; flex-wrap:wrap; justify-content:flex-end; gap:8px; }
.calendar-side-card,.calendar-private-cta{ padding:22px; }
.calendar-side-card__head a{ color:var(--primary); font-size:13px; font-weight:900; }
.calendar-upcoming-strip{ margin-top:22px; }
.calendar-upcoming-strip .calendar-upcoming-list{ display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:0 18px; }
.calendar-upcoming-list{ display:grid; }
.calendar-upcoming{ display:grid; grid-template-columns:54px minmax(0,1fr); gap:12px; padding:14px 0; border-bottom:1px solid var(--border); color:var(--text); text-decoration:none; }
.calendar-upcoming:last-child{ border-bottom:0; padding-bottom:0; }
.calendar-upcoming time{ display:grid; justify-items:center; align-content:center; min-height:48px; border-radius:12px; background:rgba(30,99,255,.08); color:var(--primary); text-transform:uppercase; }
.calendar-upcoming time strong{ font-size:18px; line-height:1; }
.calendar-upcoming time span{ font-size:11px; font-weight:900; }
.calendar-upcoming > span{ min-width:0; }
.calendar-upcoming > span strong,.calendar-upcoming > span small{ display:block; }
.calendar-upcoming > span strong{ color:var(--text); font-size:14px; font-weight:900; line-height:1.35; }
.calendar-upcoming > span small{ margin-top:4px; color:var(--text-secondary); font-size:12px; font-weight:700; line-height:1.35; }
.calendar-private-cta{ margin-top:28px; background:linear-gradient(135deg,rgba(30,99,255,.08),rgba(255,255,255,.96)); border-color:rgba(30,99,255,.14); }
.calendar-private-cta__actions{ display:flex; flex-wrap:wrap; gap:10px; margin-top:16px; }
.calendar-private-cta ul{ display:grid; gap:7px; margin:16px 0 0; padding:0; list-style:none; color:var(--text-secondary); font-size:13px; font-weight:750; }
.calendar-private-cta li::before{ content:""; display:inline-block; width:7px; height:7px; margin-right:8px; border-radius:999px; background:var(--success); }
.calendar-event-list{ display:grid; gap:12px; }
.calendar-list-card{ display:grid; grid-template-columns:86px minmax(0,1fr) auto; gap:16px; align-items:center; padding:18px; border:1px solid var(--border); border-left:4px solid var(--primary); border-radius:16px; background:rgba(255,255,255,.96); box-shadow:var(--shadow-sm); }
.calendar-list-card--green{ border-left-color:#10b981; }
.calendar-list-card--orange{ border-left-color:#f97316; }
.calendar-list-card--purple{ border-left-color:#7c3aed; }
.calendar-list-card--teal{ border-left-color:#14b8a6; }
.calendar-list-card--indigo{ border-left-color:#4f46e5; }
.calendar-list-card--slate{ border-left-color:#64748b; }
.calendar-list-card--deadline{ border-left-color:#f97316; }
.calendar-list-card--deadline-today{
  border-color:rgba(220,38,38,.32);
  border-left-color:#dc2626;
  background:linear-gradient(135deg,#fff1f2,#fff);
  box-shadow:0 18px 42px rgba(220,38,38,.12);
}
.calendar-list-card--deadline-today .calendar-list-card__date time{ background:#dc2626; color:#fff; }
.calendar-list-card__date time{ display:grid; justify-items:center; gap:3px; padding:12px 8px; border-radius:12px; background:rgba(30,99,255,.08); color:var(--primary); text-transform:uppercase; }
.calendar-list-card__date strong{ font-size:24px; line-height:1; }
.calendar-list-card__date span{ font-size:11px; font-weight:900; }
.calendar-list-card__body{ min-width:0; }
.calendar-list-card h3{ margin:8px 0 6px; color:var(--text); font-size:17px; letter-spacing:0; }
.calendar-list-card h3 a{ color:inherit; text-decoration:none; }
.calendar-list-card h3 a:hover{ color:var(--primary); }
.calendar-list-card p{ display:flex; align-items:center; gap:8px; margin:0; color:var(--text-secondary); font-size:13px; font-weight:750; }
.calendar-list-card__logo,.calendar-list-card__fallback{ width:28px; height:28px; flex:0 0 28px; border:1px solid var(--border); border-radius:9px; background:#fff; }
.calendar-list-card__meta{ display:flex; flex-wrap:wrap; gap:8px; margin-top:10px; }
.calendar-list-card__meta span{ padding:4px 8px; border:1px solid var(--border); border-radius:999px; color:var(--text-secondary); font-size:12px; font-weight:800; }
.calendar-list-card__actions{ display:flex; flex-wrap:wrap; justify-content:flex-end; gap:8px; }
.calendar-badge{ display:inline-flex; padding:5px 9px; border-radius:999px; background:rgba(30,99,255,.08); color:var(--primary); font-size:12px; font-weight:900; }
.calendar-badge--green{ background:rgba(16,185,129,.1); color:#047857; }
.calendar-badge--orange{ background:rgba(249,115,22,.12); color:#c2410c; }
.calendar-badge--purple{ background:rgba(124,58,237,.1); color:#6d28d9; }
.calendar-badge--teal{ background:rgba(20,184,166,.12); color:#0f766e; }
.calendar-badge--indigo{ background:rgba(79,70,229,.1); color:#4338ca; }
.calendar-badge--slate{ background:rgba(100,116,139,.12); color:#475569; }
.calendar-deadline-alert--list{ margin-left:8px; vertical-align:middle; animation:calendarDeadlinePulse 1.25s ease-in-out infinite; }
.calendar-seo,.calendar-faq{ margin-top:44px; }
.calendar-seo-links{ display:flex; flex-wrap:wrap; gap:10px; margin-top:18px; }
.calendar-seo-links a{ padding:8px 12px; border:1px solid rgba(30,99,255,.16); border-radius:999px; color:var(--primary); font-size:13px; font-weight:850; text-decoration:none; }

@keyframes calendarDeadlinePulse{
  0%,100%{ transform:scale(1); filter:saturate(1); }
  50%{ transform:scale(1.018); filter:saturate(1.35); }
}

@media (max-width:1100px){
  .calendar-wide-shell{ width:calc(100vw - 32px); }
  
  
  
  
  .calendar-filter-form{ grid-template-columns:repeat(3,minmax(0,1fr)); }
  
  .calendar-week-view{ grid-template-columns:repeat(2,minmax(0,1fr)); }
  .calendar-upcoming-strip .calendar-upcoming-list{ grid-template-columns:repeat(2,minmax(0,1fr)); }
}

@media (max-width:820px){
  .calendar-wide-shell{ width:100%; transform:none; margin-left:0; margin-top:6px; }
  
  
  
  
  
  
  
  
  
  
  
  
  
  .calendar-filter-form{ grid-template-columns:1fr; }
  .calendar-card{ padding:14px; }
  .calendar-toolbar{ flex-direction:column; }
  .calendar-toolbar__title{ width:100%; }
  .calendar-toolbar__actions{ justify-items:start; width:100%; }
  .calendar-legend{ margin-top:0; }
  .calendar-view-switch{ width:100%; }
  .calendar-view-switch a{ flex:1; text-align:center; }
  .calendar-month-nav{ justify-content:flex-start; }
  .calendar-grid{ gap:6px; }
  .calendar-weekdays{ display:none; }
  .calendar-week{ grid-template-columns:1fr; }
  .calendar-grid:not(.calendar-grid--compact-weekends) .calendar-week{ grid-template-columns:1fr; }
  .calendar-day{ min-height:auto; }
  .calendar-weekend-compact{ min-height:auto; justify-items:start; text-align:left; }
  .calendar-weekend-compact a{ margin-top:0; }
  .calendar-day.is-muted:not(.has-events){ display:none; }
  .calendar-event__text strong,.calendar-event__text small{ white-space:normal; }
  .calendar-week-view{ grid-template-columns:1fr; }
  .calendar-week-day{ min-height:auto; }
  
  .calendar-upcoming-strip .calendar-upcoming-list{ grid-template-columns:1fr; }
  .calendar-list-card{ grid-template-columns:1fr; align-items:start; }
  .calendar-day-panel{ padding:18px; }
  .calendar-day-panel__head{ flex-direction:column; }
  .calendar-day-panel__event{ grid-template-columns:1fr; align-items:start; }
  .calendar-day-panel__actions{ justify-content:flex-start; }
  .calendar-list-card__date time{ justify-items:start; display:inline-grid; min-width:92px; }
  .calendar-list-card__actions{ justify-content:flex-start; }
}

@media (max-width:480px){
  .calendar-side-card, .calendar-private-cta { padding:18px; }
  
  
  
  .calendar-month-nav .btn{ flex:1 1 auto; }
  .calendar-empty__actions .btn,.calendar-private-cta__actions .btn,.calendar-list-card__actions .btn{ width:100%; }
  .calendar-list-note { align-items:flex-start; flex-direction:column; }
}

@media (prefers-reduced-motion:reduce){
  .calendar-event.is-deadline-today,
  .calendar-week-event.is-deadline-today,
  .calendar-deadline-alert--list{ animation:none; }
}

.public-eyebrow {
  display: block;
  margin: 0 0 10px;
  color: var(--primary);
  font-size: 13px;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

/* Los mini-KPI del hero son enlaces a su listado (oposiciones/bolsas/
   organismos): mismo aspecto que antes, solo se añade feedback al pasar
   el ratón/foco -- ver auditoría "elementos clicables" 2026-09-20. */

.section-tabs{
  display: inline-flex;
  gap: 4px;
  padding: 5px;
  margin-bottom: 18px;
  border: 1px solid rgba(30,99,255,.18);
  border-radius: 8px;
  background: rgba(255,255,255,.84);
  box-shadow: var(--shadow-sm);
}

.section-tabs__item{
  padding: 10px 16px;
  border-radius: 6px;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 800;
}

.section-tabs__item:hover,
.section-tabs__item.is-active{
  color: var(--primary);
  background: rgba(30,99,255,.1);
}

.quick-links{
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.quick-link{
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 13px;
  border: 1px solid rgba(30,99,255,.18);
  border-radius: 8px;
  background: rgba(255,255,255,.86);
  color: var(--primary);
  font-size: 13px;
  font-weight: 800;
  box-shadow: var(--shadow-sm);
}

.quick-link:hover{
  background: rgba(30,99,255,.08);
  transform: translateY(-1px);
}

/* Tipos de plaza: iconos de una sola familia y componentes reutilizables. */
.category-icon{
  --category-icon-color: #1e63ff;
  --category-icon-bg: rgba(30,99,255,.1);
  --category-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 7h6l2 2h10v10H3z'/%3E%3Cpath d='M3 7V5h6l2 2'/%3E%3C/svg%3E");
}

.category-icon__glyph{
  display: block;
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  background: var(--category-icon-color);
  -webkit-mask: var(--category-icon) center/contain no-repeat;
  mask: var(--category-icon) center/contain no-repeat;
}

.category-icon--briefcase{ --category-icon-color:#2563eb; --category-icon-bg:rgba(37,99,235,.1); --category-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='7' width='18' height='13' rx='2'/%3E%3Cpath d='M8 7V5h8v2M3 12h18M10 12v2h4v-2'/%3E%3C/svg%3E"); }
.category-icon--clipboard{ --category-icon-color:#059669; --category-icon-bg:rgba(16,185,129,.11); --category-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5' y='4' width='14' height='17' rx='2'/%3E%3Cpath d='M9 4V2h6v2M9 11l2 2 4-4M9 17h6'/%3E%3C/svg%3E"); }
.category-icon--building{ --category-icon-color:#7c3aed; --category-icon-bg:rgba(124,58,237,.1); --category-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 21h18M5 21V9h14v12M4 9l8-6 8 6M9 13v4M15 13v4'/%3E%3C/svg%3E"); }
.category-icon--shield{ --category-icon-color:#1d4ed8; --category-icon-bg:rgba(29,78,216,.1); --category-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3l8 3v5c0 5-3.4 8.5-8 10-4.6-1.5-8-5-8-10V6z'/%3E%3Cpath d='M9 12l2 2 4-5'/%3E%3C/svg%3E"); }
.category-icon--key{ --category-icon-color:#ea580c; --category-icon-bg:rgba(249,115,22,.11); --category-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='8' cy='15' r='4'/%3E%3Cpath d='M11 12l8-8M16 7l2 2M14 9l2 2'/%3E%3C/svg%3E"); }
.category-icon--code{ --category-icon-color:#2563eb; --category-icon-bg:rgba(37,99,235,.12); --category-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 9l-4 3 4 3M16 9l4 3-4 3M14 5l-4 14'/%3E%3C/svg%3E"); }
.category-icon--life-buoy{ --category-icon-color:#ef4444; --category-icon-bg:rgba(239,68,68,.1); --category-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Ccircle cx='12' cy='12' r='4'/%3E%3Cpath d='M5.6 5.6l3.6 3.6M14.8 14.8l3.6 3.6M18.4 5.6l-3.6 3.6M9.2 14.8l-3.6 3.6'/%3E%3C/svg%3E"); }
.category-icon--users{ --category-icon-color:#db2777; --category-icon-bg:rgba(219,39,119,.1); --category-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='9' cy='8' r='3'/%3E%3Cpath d='M3 20v-2a6 6 0 0 1 12 0v2M16 5a3 3 0 0 1 0 6M17 14a5 5 0 0 1 4 5v1'/%3E%3C/svg%3E"); }
.category-icon--ruler{ --category-icon-color:#7c3aed; --category-icon-bg:rgba(124,58,237,.1); --category-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 18L18 4l2 2L6 20H4zM12 10l2 2M9 13l2 2M15 7l2 2'/%3E%3C/svg%3E"); }
.category-icon--trending-up{ --category-icon-color:#059669; --category-icon-bg:rgba(16,185,129,.11); --category-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 17l6-6 4 4 7-8M15 7h5v5'/%3E%3C/svg%3E"); }
.category-icon--book,.category-icon--book-users{ --category-icon-color:#db2777; --category-icon-bg:rgba(219,39,119,.1); --category-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 5a3 3 0 0 1 3-2h5v17H7a3 3 0 0 0-3 2zM20 5a3 3 0 0 0-3-2h-5v17h5a3 3 0 0 1 3 2z'/%3E%3C/svg%3E"); }
.category-icon--sparkles{ --category-icon-color:#0ea5e9; --category-icon-bg:rgba(14,165,233,.1); --category-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3l1.5 4.5L18 9l-4.5 1.5L12 15l-1.5-4.5L6 9l4.5-1.5zM19 15l.8 2.2L22 18l-2.2.8L19 21l-.8-2.2L16 18l2.2-.8z'/%3E%3C/svg%3E"); }
.category-icon--wrench{ --category-icon-color:#ea580c; --category-icon-bg:rgba(249,115,22,.11); --category-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 6a4 4 0 0 0-5 5L3 17l4 4 6-6a4 4 0 0 0 5-5l-3 3-3-3z'/%3E%3C/svg%3E"); }
.category-icon--health{ --category-icon-color:#e11d48; --category-icon-bg:rgba(225,29,72,.1); --category-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 21S4 16 4 9a4 4 0 0 1 7-2.6A4 4 0 0 1 20 9c0 7-8 12-8 12zM8 13h2l1-3 2 6 1-3h2'/%3E%3C/svg%3E"); }
.category-icon--scale{ --category-icon-color:#475569; --category-icon-bg:rgba(71,85,105,.1); --category-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3v18M6 6h12M6 6l-3 7h6zM18 6l-3 7h6zM8 21h8'/%3E%3C/svg%3E"); }
.category-icon--calculator{ --category-icon-color:#0f766e; --category-icon-bg:rgba(15,118,110,.1); --category-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5' y='3' width='14' height='18' rx='2'/%3E%3Cpath d='M8 7h8M8 11h2M12 11h2M16 11h0M8 15h2M12 15h2M16 15h0M8 18h2M12 18h4'/%3E%3C/svg%3E"); }
.category-icon--leaf{ --category-icon-color:#16a34a; --category-icon-bg:rgba(22,163,74,.1); --category-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 21c8-1 14-7 15-17-10 1-16 7-17 15'/%3E%3Cpath d='M9 15c2-2 4-4 8-6'/%3E%3C/svg%3E"); }
.category-icon--search{ --category-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='10' cy='10' r='6'/%3E%3Cpath d='M14.5 14.5L21 21M4 21c1.2-3 3.2-4.5 6-4.5'/%3E%3C/svg%3E"); }
.category-icon--target{ --category-icon-color:#7c3aed; --category-icon-bg:rgba(124,58,237,.1); --category-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Ccircle cx='12' cy='12' r='5'/%3E%3Ccircle cx='12' cy='12' r='1'/%3E%3C/svg%3E"); }
.category-icon--map{ --category-icon-color:#059669; --category-icon-bg:rgba(16,185,129,.1); --category-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M12 21s7-5 7-12a7 7 0 1 0-14 0c0 7 7 12 7 12z'/%3E%3Ccircle cx='12' cy='9' r='2'/%3E%3C/svg%3E"); }
.category-icon--calendar{ --category-icon-color:#ef4444; --category-icon-bg:rgba(239,68,68,.1); --category-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Crect x='3' y='5' width='18' height='16' rx='2'/%3E%3Cpath d='M8 3v4M16 3v4M3 10h18M8 14h2M14 14h2M8 18h2'/%3E%3C/svg%3E"); }
.category-icon--clock{ --category-icon-color:#ea580c; --category-icon-bg:rgba(249,115,22,.1); --category-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v5l3 2'/%3E%3C/svg%3E"); }
.category-icon--megaphone{ --category-icon-color:#d97706; --category-icon-bg:rgba(217,119,6,.1); --category-icon-border:rgba(217,119,6,.22); --category-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 10v4l3 .8V16l4 2V6l-4 2-3 .8z'/%3E%3Cpath d='M13 9a4 4 0 0 1 0 6'/%3E%3Cpath d='M16 7a7 7 0 0 1 0 10'/%3E%3C/svg%3E"); }
.category-icon--hard-hat{ --category-icon-color:#ca8a04; --category-icon-bg:rgba(202,138,4,.1); --category-icon-border:rgba(202,138,4,.22); --category-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 15a8 8 0 0 1 16 0'/%3E%3Cpath d='M2 15h20'/%3E%3Cpath d='M12 7V4'/%3E%3C/svg%3E"); }
.category-icon--truck{ --category-icon-color:#0284c7; --category-icon-bg:rgba(2,132,199,.1); --category-icon-border:rgba(2,132,199,.22); --category-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 7h11v9H3z'/%3E%3Cpath d='M14 10h4l3 3v3h-7z'/%3E%3Ccircle cx='7' cy='18' r='2'/%3E%3Ccircle cx='17' cy='18' r='2'/%3E%3C/svg%3E"); }

.category-faq__list{ overflow:hidden; border:1px solid rgba(30,99,255,.12); border-radius:12px; background:#fff; }
.category-faq details+details{ border-top:1px solid var(--border); }
.category-faq summary{ position:relative; padding:14px 42px 14px 15px; cursor:pointer; color:var(--text); font-size:13px; font-weight:800; list-style:none; }
.category-faq summary::-webkit-details-marker{ display:none; }
.category-faq summary::after{ content:"+"; position:absolute; right:16px; top:12px; color:var(--primary); font-size:19px; }
.category-faq details[open] summary::after{ content:"−"; }
.category-faq details p{ margin:0; padding:0 15px 15px; color:var(--text-secondary); font-size:13px; line-height:1.55; }

.public-filters-card{
  margin-bottom: 20px;
  border-radius: 8px;
}

.public-section-heading{
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.public-section-heading h2,
.public-results-toolbar h2,
.seo-block h2,
.signup-cta h2 {
  margin: 0;
  color: var(--text);
  font-size: 21px;
  line-height: 1.25;
  letter-spacing: 0;
}

.public-section-heading p,
.public-results-toolbar p,
.seo-block p,
.signup-cta p{
  margin: 5px 0 0;
  color: var(--muted);
}

.public-filters{
  display: grid;
  grid-template-columns: minmax(220px, 1.35fr) repeat(4, minmax(160px, 1fr));
  align-items: end;
  border-bottom: 0;
  margin-bottom: 0;
  padding-bottom: 0;
}

.public-filters > div{ min-width: 0; }

.public-filters--organismos {
  grid-template-columns: repeat(3, minmax(180px, 1fr));
}

.public-filters__actions{
  grid-column: 1 / -1;
  display: flex !important;
  flex-direction: row !important;
  justify-content: flex-end;
  gap: 10px !important;
}

.public-filters__actions .btn{ width: auto; min-width: 150px; }

.public-results-section{ margin-top: 20px; }

.public-results-toolbar{
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.result-card{
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) minmax(132px, auto);
  gap: 18px;
  align-items: center;
  min-width: 0;
  width: 100%;
  max-width: 100%;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255,255,255,.94);
  box-shadow: var(--shadow-sm);
  transition: var(--transition-fast);
}

.result-card:hover{
  border-color: rgba(30,99,255,.2);
  box-shadow: 0 12px 28px rgba(30,99,255,.1);
  transform: translateY(-1px);
}

.signup-cta{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 24px 0;
  padding: 22px 24px;
  border: 1px solid rgba(30,99,255,.16);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(30,99,255,.09), rgba(255,255,255,.92));
  box-shadow: var(--shadow-sm);
}

.signup-cta__actions{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.seo-block {
  margin-top: 22px;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255,255,255,.92);
  box-shadow: var(--shadow-sm);
}

.seo-block p{
  color: var(--text-secondary);
  line-height: 1.7;
}

/* `align-items: start` (no `stretch`, el default del grid) SOLO en este
   grid: cada tarjeta ocupa su propia altura natural en vez de estirarse a
   la del vecino más largo de su fila (Asturias, con muchas más chips, ya
   no deja un hueco vacío enorme bajo Andalucía/Castilla y León). Layout
   CSS puro, sin JS de masonry. */

/* --- Chips por tipo de contenido: mismos colores que las tarjetas de
   actividad de organismos (organism-detail-2026.css --activity-color),
   nunca una paleta nueva -- oposiciones azul, bolsas verde, exámenes
   violeta, OEP naranja, organismos neutro. --- */

/* Foco de teclado explícito para todos los enlaces de cifras territoriales
   (chips, badge de plazo abierto, provincias, mini-KPI del hero, stats de
   subtarjeta) -- no depender solo del tinte de :hover. */

/* oposiciones/exámenes reutilizan los tokens globales `--primary`/`--accent`
   (idénticos a los hex que ya usaba organism-detail-2026.css para esas
   mismas dos categorías). Bolsas y OEP usan un verde/naranja que en
   organism-detail-2026.css solo existe como `--activity-color` LOCAL a
   `.organism-latest-card--pool`/`--oep` (no hay token global equivalente):
   se mantienen en hex aquí, mismos valores exactos, para no forzar un
   refactor de esas clases fuera del alcance de esta tarea. */

.private-section-tabs{
  margin-bottom: 14px;
}

.filter-multi__empty{
  display: block;
  padding: 12px;
  color: var(--text-secondary);
  font-size: 13px;
}

@media (max-width: 760px){
  

  

  .private-section-tabs{
    width: 100%;
    overflow-x: auto;
  }

  .private-section-tabs .section-tabs__item{
    flex: 0 0 auto;
    white-space: nowrap;
  }

  

  

  

  
}

.public-feature-split{
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 360px);
  gap: 24px;
  align-items: center;
  margin-bottom: 20px;
  border-radius: 8px;
}

.public-feature-split h2{
  margin: 0 0 10px;
  font-size: 22px;
  letter-spacing: 0;
}

.public-feature-split p{
  margin: 0;
  color: var(--text-secondary);
  line-height: 1.7;
}

.public-feature-split__media{
  display: block;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(30,99,255,.05);
}

.public-feature-split__media img{
  display: block;
  width: 100%;
  height: auto;
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Skip-link: off-screen until focused, then a clearly visible, high-contrast
   pill above everything else. Doesn't reserve any space in normal flow, so
   it never shifts the header layout when not focused. */
.skip-link{
  position: absolute;
  top: 0;
  left: 8px;
  transform: translateY(-140%);
  z-index: 10000;
  padding: 10px 18px;
  border-radius: 0 0 10px 10px;
  background: var(--primary);
  color: #fff;
  font-weight: 800;
  font-size: 14px;
  text-decoration: none;
  transition: transform .15s ease;
}

.skip-link:focus{
  transform: translateY(0);
  outline: 3px solid #fff;
  outline-offset: -5px;
  box-shadow: 0 6px 16px rgba(15,23,42,.25);
}

@media (max-width: 720px){
  .tablewrap .public-table--responsive{
    min-width: 0;
  }

  .public-table--responsive thead{
    display: none;
  }

  .public-table--responsive,
  .public-table--responsive tbody,
  .public-table--responsive tr,
  .public-table--responsive td{
    display: block;
    width: 100%;
  }

  .public-table--responsive tr{
    padding: 14px;
    border-bottom: 1px solid var(--border);
  }

  .public-table--responsive td{
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr);
    gap: 12px;
    padding: 8px 0;
    border: 0;
  }

  .public-table--responsive td::before{
    content: attr(data-label);
    color: var(--muted);
    font-size: 12px;
    font-weight: 850;
    text-transform: uppercase;
  }

  

  
}

@media (max-width: 980px){
  
  
  
  .public-filters{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  
  
  .public-feature-split{
    grid-template-columns: 1fr;
  }
  .result-card {
    grid-template-columns: 1fr;
  }
  .result-card{
    align-items: start;
  }
  
  
  
  
  
  
  
  
  
  
  
  
  
}

@media (max-width: 640px){
  
  
  
  .signup-cta,
.public-results-toolbar {
    align-items: stretch;
    flex-direction: column;
  }
  .signup-cta__actions,
.signup-cta__actions .btn {
    width: 100%;
  }
  .section-tabs{
    display: flex;
    width: 100%;
  }
  .section-tabs__item{
    flex: 1;
    text-align: center;
  }
  .quick-links{
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
  }
  .quick-link{ flex: 0 0 auto; }
  .public-filters{
    grid-template-columns: 1fr;
  }
  
  
  
  
  .public-filters__actions{
    flex-direction: column !important;
  }
  .public-filters__actions .btn{ width: 100%; }
  .result-card{
    padding: 15px;
  }
  
  
  
  
  
  
  
  
  
  
}

.modal-overlay{
  display:none;
  position:fixed;
  inset:0;
  z-index:1000;
  align-items:center;
  justify-content:center;
  padding:20px;
  background:rgba(0,0,0,.4);
}

.modal-overlay.show{
  display:flex;
}

.modal-box{
  width:100%;
  max-width:400px;
  padding:24px;
  border-radius:14px;
  background:#fff;
  box-shadow:0 20px 40px rgba(0,0,0,.15);
  text-align:center;
}

.modal-box p{
  margin:0 0 20px;
  color:var(--text);
  font-size:16px;
}

.modal-box .btn{
  width:auto;
  min-width:120px;
}

.form-error{
  color:var(--danger);
  font-size:13px;
  font-weight:750;
}

.btn-google{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  width:100%;
  padding:12px 16px;
  border-radius:12px;
  border:1px solid var(--border);
  background:var(--card);
  color:var(--text);
  font-size:15px;
  font-weight:750;
  text-decoration:none;
  transition:var(--transition-fast);
  box-sizing:border-box;
}

.btn-google:hover{
  border-color:rgba(30,99,255,.28);
  background:rgba(30,99,255,.045);
}

.btn-sm,
.btn.btn-sm{
  min-height:34px;
  padding:7px 12px;
  border-radius:9px;
  font-size:13px;
  line-height:1.2;
}

.field-required::after{
  content:" *";
  color:var(--danger);
}

.required-mark{
  color:var(--danger);
  font-weight:850;
}

.inline-form{
  display:inline-block;
}

.inline-form + .inline-form {
  margin-left:8px;
}

#asturias-map.leaflet-container{
  height:min(72vh, 720px);
  min-height:460px;
  width:100%;
  font:inherit;
  background:#e8eef5;
  z-index:1;
}

#asturias-map .leaflet-control-attribution{
  max-width:100%;
  font-size:11px;
}

.leaflet-popup-content ul{
  margin:6px 0 0 18px;
  padding:0;
}

.status-success{ color:var(--success); font-weight:850; }
.status-danger{ color:var(--danger); font-weight:850; }

@media (max-width: 640px){
  
  
  
  
  
  #asturias-map.leaflet-container{
    min-height:380px;
  }
}

/* (Los estilos propios de /organismos/<slug>/examenes/ -- .organism-exams-hero,
   .organism-exams-metrics, .organism-exam-filter-grid, .pagination-actions --
   se retiraron al unificar esa pagina con el lenguaje de /oposiciones/ y
   /bolsas/: hero + card de resumen + tira + filtros compactos ya viven en
   organism-detail-2026.css.) */

.exam-directory-card{
  border:0;
  border-bottom:1px solid var(--border-light);
  border-radius:0;
  box-shadow:none;
}
.exam-directory-card:last-child{border-bottom:0}

.exam-directory-card .category-icon__glyph{
  width:15px;
  height:15px;
  margin-right:5px;
}

@media (max-width:560px){
  
  
  
  
  
  
  
  
  
  
  
  .exam-directory-card{padding:16px}
  
  
  
  
}

/* Organism process directories: shared 2026 layout */
.organism-process-page{
  display:grid;
  gap:14px;
  padding-bottom:34px;
}

.organism-process-filter-panel {
  margin:0;
  padding:18px 20px;
  border-radius:8px;
}

.organism-process-filter-panel h2,
.organism-process-results h2 {
  margin:0;
  font-size:18px;
  line-height:1.25;
}
.organism-process-filter-panel p {
  margin:5px 0 0;
  color:var(--text-secondary);
  font-size:13px;
  line-height:1.5;
}

.organism-process-years{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:7px;
  margin-top:14px;
  padding-top:13px;
  border-top:1px solid var(--border);
}
.organism-process-years strong{
  margin-right:3px;
  font-size:12px;
  color:var(--text-secondary);
}
.organism-process-years a{
  display:inline-flex;
  min-height:30px;
  padding:5px 11px;
  align-items:center;
  border:1px solid var(--border);
  border-radius:7px;
  color:var(--text-secondary);
  background:#fff;
  font-size:12px;
  font-weight:800;
}
.organism-process-years a:hover,
.organism-process-years a.is-active{
  border-color:rgba(30,99,255,.28);
  color:var(--primary);
  background:rgba(30,99,255,.07);
}

.organism-process-results{scroll-margin-top:90px}

.organism-process-results .result-card{padding:14px 16px}

.organism-process-empty{
  margin:0;
  padding:32px 24px;
  border-radius:8px;
  text-align:center;
}
.organism-process-empty h3{margin:0 0 8px}

@media (max-width:760px){
  .organism-process-page{gap:12px}
  
  
  
  
  .organism-process-filter-panel {padding:16px}
  
  
  
  
  
  
  .organism-process-results .result-card{padding:14px}
}

/* Seguir/Siguiendo -- widget compartido (oposición, bolsa, organismo).
   El wrapper es "display:contents" para no alterar el layout flex/grid del
   contenedor que lo aloja; solo sirve de ámbito para follow-toggle.js. */
.follow-toggle{display:contents}
.follow-toggle__form.is-hidden{display:none}
.follow-toggle__feedback{margin:6px 0 0;font-size:13px;font-weight:600;color:var(--muted, #6b7280)}
.follow-toggle__feedback:empty{display:none}

.alerta-card{
  display:flex;
  flex-direction:column;
  gap:12px;
  padding:18px;
}
.alerta-card--pausada{
  opacity:.72;
}
.alerta-card__header{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:8px;
}
.alerta-card__title{
  margin:0;
  font-size:16px;
  line-height:1.3;
}
.alerta-card__meta{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:8px;
  margin:0;
}
.alerta-card__meta div{
  min-width:0;
  padding:10px;
  border-radius:6px;
  background:var(--surface-subtle, #f7f9fc);
}
.alerta-card__meta dt{
  color:var(--text-secondary);
  font-size:10px;
  font-weight:850;
  text-transform:uppercase;
}
.alerta-card__meta dd{
  margin:4px 0 0;
  color:var(--text);
  font-size:12px;
  font-weight:750;
  line-height:1.35;
  word-break:break-word;
}
.alerta-card__resultados{
  margin:0;
  font-size:13px;
  color:var(--text-secondary);
}
.alerta-card__actions{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}
.alerta-card__actions .inline-form{
  display:inline-flex;
}

@media (max-width:600px){
  
  .alerta-card__meta{
    grid-template-columns:1fr;
  }
}

/* CTA «Crear alerta…» de las páginas públicas (templates/core/includes/alert_cta.html).
   Reutiliza .btn .btn-secondary; solo añade el icono inline (misma familia que el
   de «Seguir») y el foco visible. */
.alert-cta{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  min-height:44px;
  max-width:100%;
  height:auto;
  white-space:normal;
  text-align:left;
}

.alert-cta svg{
  flex:none;
  width:16px;
  height:16px;
  fill:none;
  stroke:currentColor;
  stroke-width:1.8;
  stroke-linecap:round;
  stroke-linejoin:round;
}

.alert-cta:focus-visible{
  outline:3px solid rgba(30,99,255,.25);
  outline-offset:2px;
}

/* Resumen «Criterios preseleccionados» del constructor: separado de la tarjeta del formulario. */
.alerta-prefill{
  margin-bottom:16px;
}
