/* ==========================================================================
   AAPI 2027 — Sistema de diseño
   Asociación Argentina de Psiquiatría Infanto Juvenil y Profesiones Afines
   Lenguaje visual tomado del mock-up institucional (presidencia + diseñadora):
   navy editorial + acento verde, tipografía serif en titulares.
   ========================================================================== */

:root {
  /* Marca AAPI — navy institucional + acento teal (mock-up de escritorio) */
  --aapi-green-dark: #14304f;
  --aapi-green: #1c4a72;
  --aapi-green-mid: #0ca5b8;
  --aapi-green-light: #e9eff5;
  --aapi-green-pale: #f5f8fa;

  /* Acento teal de marca (botones, links, badges) */
  --teal: #0ca5b8;
  --teal-dark: #0b8798;
  --teal-light: #e1f4f6;
  --accent: #0ca5b8;
  --accent-dark: #0b8798;

  /* Acentos por sección (tarjetas de acceso rápido / íconos) */
  --acc-teal: #0ca5b8;
  --acc-blue: #2f6fd1;
  --acc-amber: #c98600;
  --acc-plum: #7c5cbf;
  --acc-red: #b3261e;
  --acc-slate: #45566b;

  /* Fondos pastel para íconos circulares */
  --ic-blue-bg: #dbe7fb;  --ic-blue-fg: #2f6fd1;
  --ic-green-bg: #dcf5e9; --ic-green-fg: #1f9d6b;
  --ic-purple-bg: #ece4fa; --ic-purple-fg: #7c5cbf;
  --ic-teal-bg: #d9f2f4;  --ic-teal-fg: #0b8798;

  /* Neutros */
  --ink: #16314f;
  --text: #4a5566;
  --muted: #737e8d;
  --border: #e2e6ee;
  --bg: #ffffff;
  --white: #ffffff;

  /* Azules del mock-up de escritorio */
  --blue: #0b5da8;
  --blue-dark: #094a87;
  --band: #0a4a80;

  /* Tipografía — serif editorial en titulares, sans en texto */
  --font-head: 'Lora', Georgia, 'Times New Roman', serif;
  --font-body: 'Inter', 'Roboto', 'Segoe UI', Arial, sans-serif;

  /* Otros */
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 10px 28px rgba(16, 42, 76, 0.12);
  --shadow-sm: 0 3px 12px rgba(16, 42, 76, 0.08);
  --container: 1180px;
}

/* ---------- Reset básico ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--aapi-green); text-decoration: none; }
a:hover { color: var(--aapi-green-dark); text-decoration: underline; }
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-head);
  color: var(--ink);
  font-weight: 700;
  line-height: 1.25;
  margin: 0 0 .6em;
}
p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-left: 1.3em; }
hr { border: none; border-top: 1px solid var(--border); margin: 1.5em 0; }
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap;
}

/* ---------- Botones ---------- */
.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 14px;
  padding: 11px 24px;
  border-radius: 50px;
  cursor: pointer;
  border: 2px solid transparent;
  text-decoration: none !important;
  transition: all .2s ease;
  text-align: center;
}
.btn-primary { background: var(--blue); color: #fff; box-shadow: 0 4px 14px rgba(11,93,168,.28); }
.btn-primary:hover { background: var(--blue-dark); color: #fff; transform: translateY(-1px); }
.btn-outline { background: transparent; color: var(--blue); border-color: var(--blue); }
.btn-outline:hover { background: var(--blue); color: #fff; }
.btn-teal { background: var(--teal); color: #fff; box-shadow: 0 4px 14px rgba(12,165,184,.32); }
.btn-teal:hover { background: var(--teal-dark); color: #fff; transform: translateY(-1px); }
.btn-white { background: #fff; color: var(--aapi-green-dark); }
.btn-white:hover { background: var(--aapi-green-light); color: var(--aapi-green-dark); }
.btn-sm { padding: 8px 18px; font-size: 13px; }
.btn-block { display: block; width: 100%; }
.btn .icon { width: 15px; height: 15px; margin-left: 6px; vertical-align: -2px; }
.btn .icon-lead { margin-left: 0; margin-right: 6px; }
.btn-band { border-color: #2fc7d8; background: rgba(12,165,184,.28); color: #fff; }
.btn-band:hover { background: var(--teal); color: #fff; }
.btn-teal-line { border-color: #5ddbe8; }

/* ---------- Íconos (sprite assets/icons/icons.svg) ---------- */
.icon {
  width: 1em; height: 1em; flex-shrink: 0;
  fill: none; stroke: currentColor; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round;
  vertical-align: -0.125em;
}

/* ==========================================================================
   HEADER + NAV — una sola barra blanca
   ========================================================================== */
.site-header {
  background: #fff;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 500;
}
.site-header .container {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  padding-bottom: 12px;
  gap: 20px;
}
.brand { display: flex; align-items: center; flex-shrink: 0; }
.brand img { height: 40px; width: auto; max-width: calc(100vw - 112px); object-fit: contain; object-position: left center; }
.header-actions { display: none; align-items: center; gap: 8px; flex-shrink: 0; }

/* ---------- Barra superior: contacto, redes y buscador ---------- */
.topbar { display: none; background: #f1f6fb; border-bottom: 1px solid var(--border); height: 36px; }
.site-header .topbar .container { height: 100%; padding-top: 0; padding-bottom: 0; }
.topbar-left { display: flex; align-items: center; gap: 16px; min-width: 0; }
.topbar-mail { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--ink); text-decoration: none; }
.topbar-mail .icon { width: 14px; height: 14px; color: var(--teal-dark); }
.topbar-mail:hover { color: var(--blue); text-decoration: none; }
.topbar-social { display: flex; gap: 6px; }
.topbar-social a {
  width: 22px; height: 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  color: #fff; transition: opacity .15s ease, transform .15s ease;
}
.topbar-social a:hover { opacity: .85; transform: translateY(-1px); color: #fff; }
.topbar-social .icon { width: 12px; height: 12px; }
.topbar-social .s-linkedin { background: #0a66c2; }
.topbar-social .s-instagram { background: linear-gradient(45deg, #f58529, #dd2a7b 55%, #8134af); }
.topbar-social .s-youtube { background: #ff0000; }
.topbar-social .s-facebook { background: #1877f2; }

.site-search {
  display: flex; align-items: center; background: #fff; border: 1px solid #cfdae6; border-radius: 50px;
  height: 26px; padding: 0 3px 0 12px; width: 230px; transition: border-color .15s ease, box-shadow .15s ease;
}
.site-search:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(11,93,168,.14); }
.site-search input {
  flex: 1; min-width: 0; border: none; outline: none; background: transparent;
  font-family: var(--font-body); font-size: 12.5px; color: var(--ink); height: 100%; padding: 0;
}
.site-search input::placeholder { color: var(--muted); }
.site-search button {
  width: 22px; height: 22px; border: none; border-radius: 50%; background: transparent; color: var(--ink);
  cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0;
}
.site-search button:hover { background: var(--aapi-green-pale); color: var(--blue); }
.site-search .icon { width: 14px; height: 14px; }
.nav-list > li.nav-search { display: none; }

.main-nav { flex: 1 1 auto; min-width: 0; }
.nav-list {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 2px;
}
.nav-list > li { position: relative; }
.nav-list > li > a {
  display: flex; align-items: center; gap: 5px;
  color: var(--ink); font-family: var(--font-body); font-weight: 600; font-size: 13.5px;
  padding: 10px 11px; border-radius: 50px; text-decoration: none; white-space: nowrap;
}
.nav-list > li > a:hover,
.nav-list > li.open > a { background: var(--aapi-green-pale); }
.nav-list > li.active > a { background: var(--teal-light); color: var(--teal-dark); }
.nav-list .nav-label { display: flex; align-items: center; gap: 10px; }
.nav-list .nav-ic { display: none; }
.nav-list > li.nav-cta { display: none; }
.nav-list .caret { display: inline-flex; opacity: .7; }
.nav-list .caret .icon { width: 14px; height: 14px; }

.dropdown {
  display: none; position: absolute; top: 100%; left: 0; min-width: 290px;
  background: #fff; border-radius: 12px; box-shadow: var(--shadow);
  padding: 10px; list-style: none; margin: 6px 0 0; z-index: 50;
}
.nav-list > li:last-child > .dropdown { left: auto; right: 0; }
/* puente invisible: evita que el submenú se cierre al cruzar el espacio entre el ítem y la lista */
.dropdown::before { content: ""; position: absolute; left: 0; right: 0; top: -12px; height: 12px; }
.dropdown .subdrop > .dropdown::before { left: -12px; right: auto; top: 0; bottom: 0; width: 12px; height: auto; }
.nav-list > li.open > .dropdown { display: block; }
.dropdown li a {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 14px; color: var(--ink); font-size: 14px; font-weight: 600; border-radius: var(--radius-sm);
}
.dropdown li a:hover { background: var(--aapi-green-pale); color: var(--teal-dark); text-decoration: none; }
.dropdown li a.active { background: var(--teal-light); color: var(--teal-dark); }
.dropdown .subdrop { position: relative; }
.dropdown .subdrop > a::after { content: "›"; color: var(--muted); font-weight: 700; }
.dropdown .subdrop > .dropdown { top: 0; left: 100%; border-radius: 12px; margin: 0 0 0 6px; }

.nav-toggle {
  display: none; background: none; border: none; color: var(--ink);
  font-size: 26px; padding: 8px 10px; cursor: pointer; line-height: 1;
}

/* ==========================================================================
   PORTADA
   ========================================================================== */

/* Anuncio: Plataforma Educativa (primer contenido bajo el menú) */
.announce { background: #fff; border-bottom: 1px solid var(--border); padding: 26px 0; }
.announce-row { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 24px; align-items: center; }
.announce-text {
  background: linear-gradient(180deg, #f8fbfd 0%, #f1f6fb 100%);
  border: 1px solid #dbe6f0; border-left: 3px solid var(--teal); border-radius: 6px;
  padding: 22px 22px 20px; box-shadow: 0 2px 10px rgba(16,42,76,.05);
}
.announce-text h2 { font-size: 19px; margin-bottom: 10px; }
.announce-text p { font-size: 13px; color: var(--text); margin-bottom: 8px; line-height: 1.55; }
.announce-text .announce-contact {
  display: flex; align-items: center; gap: 8px; margin: 12px 0 0; padding-top: 12px;
  border-top: 1px solid #dbe6f0; font-weight: 600; color: var(--ink);
}
.announce-contact .icon { color: var(--teal-dark); width: 17px; height: 17px; }
.announce-gallery { display: flex; gap: 16px; align-items: center; min-width: 0; }
.announce-img { display: block; line-height: 0; flex: var(--ar, 1) 1 0; min-width: 0; }
.announce-img img {
  display: block; width: 100%; height: auto;
  box-shadow: 0 4px 14px rgba(16,42,76,.14); transition: transform .2s ease, box-shadow .2s ease;
}
.announce-img:hover img { transform: translateY(-3px); box-shadow: 0 8px 20px rgba(16,42,76,.2); }

/* Hero */
.hero {
  position: relative; overflow: hidden; min-height: 400px; display: flex; align-items: center;
  background: linear-gradient(100deg, #fff 0%, #f4f8fc 55%, #eaf3fa 100%);
}
.hero .container { position: relative; z-index: 2; width: 100%; }
.hero-text { max-width: 540px; padding: 48px 0; }
.hero h1 { font-size: clamp(28px, 3.3vw, 40px); line-height: 1.18; letter-spacing: -.01em; margin-bottom: 16px; }
.hero-sub { font-size: 15.5px; color: var(--text); margin-bottom: 24px; }
.hero-cta { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.hero-photo { position: absolute; top: 0; right: 0; bottom: 0; width: 54%; z-index: 1; }
.hero-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 28%; }
.hero-photo img {
  -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 20%);
          mask-image: linear-gradient(to right, transparent 0%, #000 20%);
}

/* Encabezados de sección */
.home-section { padding: 36px 0; }
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 6px; flex-wrap: wrap; }
.sec-head h2 { font-size: clamp(20px, 2.2vw, 26px); margin: 0; }
.sec-sub { color: var(--muted); font-size: 14px; margin: 4px 0 22px; }
.see-all { font-size: 12.5px; font-weight: 700; color: var(--blue); display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.see-all .icon { width: 14px; height: 14px; }
.see-all:hover { color: var(--blue-dark); }

/* Qué hacemos */
.section-que { background: linear-gradient(180deg, #f2f7fb 0%, #fbfdfe 100%); }
.qh-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.qh-card {
  display: flex; flex-direction: column; background: #fff; border: 1px solid #e1e9f1; border-radius: 10px;
  padding: 20px 20px 16px; box-shadow: 0 2px 10px rgba(16,42,76,.05); color: inherit;
  transition: box-shadow .2s ease, transform .2s ease;
}
.qh-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); text-decoration: none; }
.qh-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.qh-icon {
  width: 42px; height: 42px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; background: #e3f0fa; color: #1672b8;
}
.qh-icon .icon { width: 21px; height: 21px; }
.qh-icon.ic-teal { background: #dcf3f2; color: #0d9a9c; }
.qh-card strong { font-family: var(--font-head); font-size: 15px; line-height: 1.3; color: var(--ink); }
.qh-card p { font-size: 13px; color: var(--muted); margin-bottom: 14px; flex: 1; }
.qh-pill {
  display: inline-block; align-self: flex-start; border: 1px solid var(--blue); color: var(--blue); background: #fff;
  border-radius: 50px; padding: 6px 14px; font-size: 12px; font-weight: 600; margin-bottom: 12px;
}
a.qh-pill:hover { background: var(--blue); color: #fff; text-decoration: none; }
.qh-more { font-size: 12.5px; font-weight: 700; color: var(--blue); display: inline-flex; align-items: center; gap: 5px; }
.qh-more .icon { width: 14px; height: 14px; }

/* Actualidad */
.act-grid { display: grid; grid-template-columns: 1fr 1fr; margin-top: 18px; }
.act-col { padding: 0 30px; }
.act-col:first-child { padding-left: 0; border-right: 1px solid var(--border); }
.act-col:last-child { padding-right: 0; }
.act-sub { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 12px; }
.act-sub h3 { font-size: 15px; margin: 0; }
.event-item {
  display: flex; align-items: center; gap: 14px; padding: 10px 14px; margin-bottom: 10px;
  background: #fff; border: 1px solid #e1e9f1; border-radius: 8px; color: inherit;
}
.event-item:hover, .news-item:hover { background: var(--aapi-green-pale); text-decoration: none; }
.event-badge {
  flex-shrink: 0; width: 50px; height: 50px; border-radius: 6px; background: #e6f1fa; color: #0f5a96;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-family: var(--font-head); font-weight: 700; line-height: 1.05;
}
.event-badge .d { font-size: 20px; }
.event-badge .m { font-size: 10px; text-transform: uppercase; letter-spacing: .05em; font-family: var(--font-body); }
.ei-title, .ni-title { display: block; color: var(--ink); font-family: var(--font-head); font-weight: 700; font-size: 14px; line-height: 1.3; margin-bottom: 4px; }
.ei-meta { display: flex; gap: 14px; flex-wrap: wrap; color: var(--muted); font-size: 12px; }
.ei-meta span { display: inline-flex; align-items: center; gap: 5px; }
.ei-meta .icon { width: 14px; height: 14px; }
.item-arrow { margin-left: auto; color: var(--muted); display: inline-flex; flex-shrink: 0; }
.item-arrow .icon { width: 18px; height: 18px; }
.news-item { display: flex; align-items: center; gap: 14px; padding: 10px 6px; border-bottom: 1px solid var(--border); color: inherit; }
.news-item:last-child { border-bottom: none; }
.news-thumb { flex-shrink: 0; width: 124px; height: 58px; object-fit: cover; }
.ni-date { display: block; color: var(--muted); font-size: 11.5px; margin-bottom: 2px; }

/* Jornadas Nacionales — banda de ancho completo */
.jornadas-band {
  position: relative; overflow: hidden; color: #fff;
  background: linear-gradient(90deg, #093a6b 0%, #0a4a82 55%, #0b5a97 100%);
}
.jornadas-photo { position: absolute; top: 0; right: 0; bottom: 0; width: 54%; }
.jornadas-photo img {
  width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 48%);
          mask-image: linear-gradient(to right, transparent 0%, #000 48%);
}
.jornadas-inner { position: relative; z-index: 2; padding-top: 36px; padding-bottom: 36px; }
.jornadas-body { max-width: 560px; }
.jornadas-eyebrow { color: #4fd3e2; font-size: 11.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 8px; }
.jornadas-body h3 { color: #fff; font-size: clamp(22px, 2.6vw, 30px); margin-bottom: 8px; }
.jornadas-lead { opacity: .95; margin-bottom: 14px; font-size: 15px; }
.jornadas-meta { display: flex; gap: 20px; flex-wrap: wrap; font-size: 13px; margin-bottom: 18px; }
.jornadas-meta span { display: inline-flex; align-items: center; gap: 7px; }
.jornadas-meta .icon { width: 16px; height: 16px; }

/* Comisiones de trabajo */
.chip-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 14px; }
.chip {
  display: flex; align-items: center; gap: 10px; background: #fff; border: 1px solid #dde6ef; border-radius: 6px;
  padding: 12px 14px; min-height: 62px; color: var(--ink); font-size: 12.5px; font-weight: 600; line-height: 1.3;
}
.chip .icon { width: 26px; height: 26px; color: #1672b8; stroke-width: 1.6; }
.chip:hover { box-shadow: var(--shadow-sm); border-color: #bcd3e6; text-decoration: none; }

/* Una sociedad científica... — mitad foto a sangre, mitad texto */
.society { display: grid; grid-template-columns: 1fr 1fr; background: #fff; }
.society-photo { position: relative; min-height: 240px; }
.society-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.society-body { align-self: center; padding: 34px 20px 34px 48px; padding-right: max(20px, calc((100vw - 1180px) / 2 + 20px)); }
.society-body h2 { font-size: clamp(20px, 2.2vw, 26px); }
.society-body p { font-size: 14.5px; color: var(--text); max-width: 540px; }
.society-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 16px; }

/* Pertenencia institucional: AAPI forma parte de ALIAMPSI */
.alliance { background: #f4f8fc; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.alliance-card {
  display: flex; align-items: center; justify-content: center; gap: 26px; flex-wrap: wrap;
  padding: 22px 0; color: inherit; text-align: left;
}
.alliance-card:hover { text-decoration: none; }
.alliance-label { font-family: var(--font-head); font-size: 16px; font-weight: 700; color: var(--ink); white-space: nowrap; }
.alliance-logo { height: 54px; width: auto; }
.alliance-name {
  font-family: var(--font-head); font-size: 15px; font-weight: 700; line-height: 1.35; color: var(--ink);
  max-width: 330px; padding-left: 26px; border-left: 1px solid #cfdbe7;
}
.alliance-go { font-size: 13px; font-weight: 700; color: var(--blue); display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.alliance-go .icon { width: 15px; height: 15px; transition: transform .15s ease; }
.alliance-card:hover .alliance-go .icon { transform: translateX(3px); }

/* Banda final "Formá parte de AAPI" — ancho completo */
.cta-full { background: var(--band); color: #fff; }
.cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-top: 22px; padding-bottom: 22px; flex-wrap: wrap; }
.cta-left { display: flex; align-items: center; gap: 16px; }
.cta-icon { width: 46px; height: 46px; border: 1.5px solid rgba(255,255,255,.55); border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.cta-icon .icon { width: 22px; height: 22px; }
.cta-full h3 { color: #fff; font-size: 20px; margin: 0 0 2px; }
.cta-full p { margin: 0; opacity: .9; font-size: 13.5px; }

/* ==========================================================================
   HERO INTERNO (páginas internas)
   ========================================================================== */
.page-hero {
  background: linear-gradient(120deg, var(--aapi-green-dark), var(--aapi-green) 75%);
  color: #fff;
  padding: 46px 0 60px;
  position: relative;
  overflow: hidden;
}
.page-hero::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: -1px; height: 40px;
  background: var(--bg);
  clip-path: polygon(0 100%, 100% 100%, 100% 40%, 75% 100%, 50% 30%, 25% 100%, 0 60%);
}
.breadcrumb { font-size: 13.5px; opacity: .85; margin-bottom: 14px; }
.breadcrumb a { color: #fff; }
.breadcrumb a:hover { color: #fff; opacity:.8; }
.page-hero h1 { color: #fff; font-size: clamp(26px, 3.6vw, 38px); margin-bottom: 10px; }
.page-hero p { max-width: 720px; opacity: .95; font-size: 16.5px; margin-bottom: 0; }

/* ==========================================================================
   SECCIONES / TÍTULOS
   ========================================================================== */
.section { padding: 56px 0; }
.section-tight { padding: 34px 0; }
.section-title { text-align: center; max-width: 760px; margin: 0 auto 34px; }
.section-title .eyebrow {
  display: inline-block;
  color: var(--aapi-green);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.section-title h2 { font-size: clamp(24px, 3vw, 32px); }
.section-title p { color: var(--muted); font-size: 16px; }
.bg-alt { background: var(--white); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.bg-green { background: var(--aapi-green-light); }
.bg-pale { background: var(--aapi-green-pale); }

/* ==========================================================================
   TARJETAS genéricas (noticias / eventos / comisiones)
   ========================================================================== */
.card-grid { display: grid; gap: 24px; }
.cols-3 { grid-template-columns: repeat(3, 1fr); }
.cols-2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}
.card img { aspect-ratio: 16/10; object-fit: cover; width: 100%; }
.card-body { padding: 20px 22px; flex: 1; display: flex; flex-direction: column; }
.card-tag {
  display: inline-block;
  background: var(--aapi-green-light);
  color: var(--aapi-green-dark);
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: 4px 10px;
  border-radius: 4px;
  margin-bottom: 10px;
  width: fit-content;
}
.card h3 { font-size: 18px; margin-bottom: 8px; }
.card p { color: var(--muted); font-size: 14.5px; flex: 1; }
.card-meta { font-size: 12.5px; color: var(--muted); margin-top: 10px; }

.event-card { display: flex; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--border); }
.event-date {
  flex-shrink: 0;
  width: 60px; height: 60px;
  background: var(--aapi-green-light);
  color: var(--aapi-green-dark);
  border-radius: var(--radius-sm);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-family: var(--font-head); font-weight: 800;
}
.event-date .d { font-size: 20px; line-height: 1; }
.event-date .m { font-size: 11px; text-transform: uppercase; }
.event-card h4 { font-size: 15.5px; margin-bottom: 4px; }
.event-card span { font-size: 13px; color: var(--muted); }

/* ==========================================================================
   CONTENIDO — bloques de texto de páginas internas
   ========================================================================== */
.content { padding: 50px 0; }
.content h2 { font-size: 26px; margin-top: 1.4em; }
.content h2:first-child { margin-top: 0; }
.content h3 { font-size: 20px; color: var(--aapi-green-dark); margin-top: 1.3em; }
.content p, .content li { font-size: 16px; color: var(--text); }
.content .lead { font-size: 19px; color: var(--ink); }
.prose-narrow { max-width: 880px; margin: 0 auto; }

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}
.two-col img { border-radius: var(--radius); box-shadow: var(--shadow-sm); }

/* Bloque de comisión */
.commission {
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: 36px;
  align-items: flex-start;
  padding: 34px 0;
  border-bottom: 1px solid var(--border);
}
.commission:last-child { border-bottom: none; }
.commission-ico {
  display: flex; align-items: center; justify-content: center; aspect-ratio: 16 / 10;
  background: var(--aapi-green-pale); border: 1px solid var(--border); border-radius: var(--radius); color: var(--teal-dark);
}
.commission-ico .icon { width: 60px; height: 60px; stroke-width: 1.3; }
.commission img { border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.commission .coord {
  margin-top: 14px;
  font-size: 14px;
  color: var(--aapi-green-dark);
  font-weight: 700;
}
.commission .meet {
  font-size: 13.5px;
  color: var(--muted);
  font-style: italic;
}

/* Tarjeta de tarifas / pasos numerados */
.step-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px,1fr)); gap: 18px; }
.step-card {
  background: #fff;
  border-left: 6px solid var(--aapi-green);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  box-shadow: var(--shadow-sm);
  padding: 20px 22px;
}
.step-card .num { font-family: var(--font-head); font-size: 26px; font-weight: 800; color: var(--aapi-green); }
.step-card h4 { font-size: 16px; margin: 6px 0 8px; }
.step-card p, .step-card li { font-size: 14px; color: var(--text); }
.step-card.accent-red { border-color: var(--acc-red); }

/* Panel de aviso (contenido dinámico no disponible en versión estática) */
.notice {
  background: var(--aapi-green-light);
  border: 1px solid #cfe3f0;
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  font-size: 14.5px;
  color: var(--aapi-green-dark);
  margin: 18px 0;
}
.notice.locked { background: #f0f8ff; border-color: #cfe3f7; color: #2a5f8a; }
.notice strong { display: block; margin-bottom: 4px; }

/* Personas / autoridades */
.person-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px,1fr)); gap: 22px; }
.person {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}
.person .role { color: var(--aapi-green); font-size: 12.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.person h4 { font-size: 16.5px; margin: 6px 0 4px; }
.person a.mail { font-size: 13px; word-break: break-word; }
.person details { margin-top: 10px; text-align: left; font-size: 13.5px; color: var(--text); }
.person summary { cursor: pointer; color: var(--aapi-green-dark); font-weight: 700; font-size: 13px; list-style: none; }
.person summary::-webkit-details-marker { display: none; }
.person summary::before { content: "Ver CV ▾"; }
.person details[open] summary::before { content: "Ocultar CV ▴"; }

/* Tablas */
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; background: #fff; border-radius: var(--radius-sm); overflow: hidden; }
table.data th, table.data td { padding: 10px 14px; border-bottom: 1px solid var(--border); font-size: 14.5px; text-align: left; }
table.data th { background: var(--aapi-green); color: #fff; font-family: var(--font-head); }
table.data tr:nth-child(even) { background: var(--aapi-green-pale); }

/* Formularios */
.form-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 34px; max-width: 520px; margin: 0 auto; }
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-weight: 700; font-size: 14px; margin-bottom: 6px; color: var(--ink); }
.form-group input {
  width: 100%; padding: 11px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-size: 15px; font-family: var(--font-body);
}
.form-group input:focus { outline: 2px solid var(--aapi-green); border-color: var(--aapi-green); }
.form-foot { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; }

/* Efemérides / galería */
.gallery-strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px,1fr)); gap: 12px; }
.gallery-strip img { border-radius: var(--radius-sm); box-shadow: var(--shadow-sm); }

/* Accordion simple */
.accordion-item { border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: 10px; overflow: hidden; background: #fff; }
.accordion-item > summary {
  cursor: pointer; padding: 16px 20px; font-family: var(--font-head); font-weight: 700; font-size: 16px;
  color: var(--aapi-green-dark); list-style: none; display: flex; justify-content: space-between; align-items: center;
}
.accordion-item > summary::-webkit-details-marker { display: none; }
.accordion-item > summary::after { content: "+"; font-size: 22px; color: var(--aapi-green); }
.accordion-item[open] > summary::after { content: "–"; }
.accordion-item .accordion-body { padding: 0 20px 20px; }

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer { background: #fff; color: var(--text); margin-top: 0; border-top: 1px solid var(--border); }
.footer-top { padding: 34px 0 26px; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: 0; }
.footer-grid > div { padding: 0 26px; border-left: 1px solid var(--border); }
.footer-grid > div:first-child { padding-left: 0; border-left: none; }
.footer-grid h5 { font-family: var(--font-body); color: var(--ink); font-size: 13px; font-weight: 700; margin-bottom: 12px; text-transform: none; letter-spacing: 0; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: 7px; }
.footer-grid a { color: var(--text); font-size: 13px; }
.footer-grid a:hover { color: var(--blue); }
.footer-about img { height: 44px; width: auto; margin-bottom: 10px; }
.footer-about p { font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.footer-contact li { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.footer-contact .icon { width: 16px; height: 16px; color: var(--teal-dark); }
.footer-social { display: flex; gap: 10px; margin-top: 14px; }
.footer-social a {
  width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  color: #fff; transition: opacity .15s ease, transform .15s ease;
}
.footer-social a:hover { opacity: .85; transform: translateY(-1px); color: #fff; }
.footer-social .icon { width: 17px; height: 17px; }
.footer-social .s-linkedin { background: #0a66c2; }
.footer-social .s-instagram { background: linear-gradient(45deg, #f58529, #dd2a7b 55%, #8134af); }
.footer-social .s-youtube { background: #ff0000; }
.footer-social .s-facebook { background: #1877f2; }
.footer-alliance { display: flex; align-items: center; gap: 12px; margin-top: 18px; color: var(--muted); font-size: 12px; font-weight: 600; }
.footer-alliance img { height: 32px; width: auto; }
.footer-alliance:hover { text-decoration: none; opacity: .85; }
.footer-bottom-bar { background: #e9eef3; }
.footer-bottom { padding: 12px 20px; font-size: 12px; color: var(--muted); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.footer-bottom .legal-links { display: flex; gap: 16px; flex-wrap: wrap; }
.footer-bottom a { color: var(--muted); }
.footer-bottom a:hover { color: var(--blue); }

.back-to-top {
  position: fixed; right: 22px; bottom: 22px;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--aapi-green); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; box-shadow: var(--shadow); opacity: 0; pointer-events: none;
  transition: opacity .2s ease; z-index: 400; text-decoration: none;
}
.back-to-top.show { opacity: 1; pointer-events: auto; }

/* ==========================================================================
   UTILIDADES
   ========================================================================== */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.small { font-size: 13px; color: var(--muted); }
.tag-list { display: flex; gap: 8px; flex-wrap: wrap; list-style: none; padding: 0; margin: 0 0 20px; }
.tag-list a {
  display: block; padding: 8px 16px; border-radius: 50px; background: #fff;
  border: 1px solid var(--border); color: var(--text); font-size: 13.5px; font-weight: 700;
}
.tag-list a:hover, .tag-list a.active { background: var(--aapi-green); border-color: var(--aapi-green); color: #fff; text-decoration: none; }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (min-width: 993px) {
  .nav-list > li:hover > .dropdown { display: block; }
  .header-actions { display: flex; }
  .topbar { display: block; }
  /* la barra superior (correo, redes y buscador) queda siempre visible junto con la barra principal */
  .site-header { top: 0; }
}
@media (max-width: 1200px) {
  .brand img { height: 40px; }
  .site-header .container { gap: 14px; }
  .nav-list > li > a { padding: 10px 8px; font-size: 13px; }
}
@media (min-width: 993px) and (max-width: 1060px) {
  .brand img { height: 34px; }
  .header-actions { gap: 6px; }
  .header-actions .btn-sm { padding: 8px 14px; }
}
@media (min-width: 993px) { .nav-list { flex-wrap: nowrap; } }
@media (max-width: 992px) {
  .chip-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 992px) {
  .two-col, .commission { grid-template-columns: 1fr; }
  .cols-3 { grid-template-columns: repeat(2, 1fr); }
  .qh-grid { grid-template-columns: repeat(2, 1fr); }
  .act-grid { grid-template-columns: 1fr; }
  .act-col, .act-col:first-child, .act-col:last-child { padding: 0; border: none; }
  .act-col + .act-col { margin-top: 28px; }
  .announce-row { grid-template-columns: 1fr; }
  .hero { display: block; min-height: 0; }
  .hero-text { max-width: none; padding: 30px 0 28px; }
  .hero-photo { position: relative; width: 100%; height: 300px; }
    .hero-photo img { -webkit-mask-image: none; mask-image: none; }
  .jornadas-band { display: flex; flex-direction: column; }
  .jornadas-photo { position: relative; width: 100%; height: 200px; order: 2; }
  .jornadas-photo img { -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 40%); mask-image: linear-gradient(to bottom, transparent 0%, #000 40%); }
  .society { grid-template-columns: 1fr; }
  .society-body { padding: 28px 20px; }
  .footer-grid { grid-template-columns: 1fr 1fr; row-gap: 22px; }
  .footer-grid > div:nth-child(3) { border-left: none; padding-left: 0; }

  .nav-toggle { display: block; }
  .site-header .container { gap: 8px; }
  .nav-list {
    display: none; flex-direction: column; flex-wrap: nowrap; justify-content: flex-start;
    position: absolute; top: 100%; left: 0; right: 0; background: #fff; box-shadow: var(--shadow);
    border-radius: 0 0 14px 14px; padding: 8px; max-height: calc(100vh - 70px); overflow-y: auto;
  }
  .nav-list.open { display: flex; }
  .nav-list > li { width: 100%; }
  .nav-list > li > a { color: var(--ink); border-radius: var(--radius-sm); justify-content: space-between; padding: 12px 14px; font-size: 15px; }
  .nav-list .nav-ic {
    display: flex; width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0;
    align-items: center; justify-content: center; background: var(--aapi-green-pale); color: var(--teal-dark);
  }
  .nav-list .nav-ic .icon { width: 15px; height: 15px; }
  .nav-list > li.open > a { background: var(--aapi-green-pale); }
  .nav-list > li.active > a { background: var(--teal-light); color: var(--teal-dark); }
  .nav-list > li.nav-search { display: block; padding: 6px 6px 10px; }
  .nav-list > li.nav-search .site-search { width: 100%; height: 40px; padding: 0 5px 0 16px; }
  .nav-list > li.nav-search .site-search input { font-size: 15px; }
  .nav-list > li.nav-search .site-search button { width: 32px; height: 32px; }
  .nav-list > li.nav-search .site-search .icon { width: 18px; height: 18px; }
  .nav-list > li.nav-cta { display: flex; gap: 10px; padding: 10px 6px 6px; }
  .nav-list > li.nav-cta > a { flex: 1; justify-content: center; padding: 11px 12px; font-size: 14px; border-radius: 50px; color: #fff; }
  .nav-list > li.nav-cta > a.btn-primary { background: var(--blue); }
  .nav-list > li.nav-cta > a.btn-teal { background: var(--teal); }
  .nav-list > li.nav-cta > a.btn-primary:hover { background: var(--blue-dark); }
  .nav-list > li.nav-cta > a.btn-teal:hover { background: var(--teal-dark); }
  .alliance-card { flex-direction: column; text-align: center; gap: 12px; padding: 24px 0; }
  .alliance-name { padding-left: 0; border-left: none; max-width: 420px; }
  .dropdown { position: static; box-shadow: none; border-radius: 8px; background: var(--aapi-green-pale); display: none; margin: 4px 0 4px 40px; padding: 6px; }
  .nav-list > li:last-child > .dropdown { left: auto; right: auto; }
  .dropdown::before, .dropdown .subdrop > .dropdown::before { display: none; }
  .nav-list > li.open > .dropdown { display: block; }
  .dropdown .subdrop > .dropdown { left: 0; margin-left: 14px; background: #fff; }
}
@media (max-width: 640px) {
  .announce-gallery { flex-direction: column; }
  .announce-img { flex: none; width: 100%; max-width: 360px; }
  .cols-3, .cols-2, .qh-grid { grid-template-columns: 1fr; }
  .chip-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr; row-gap: 0; }
  .footer-grid > div, .footer-grid > div:nth-child(3) { padding: 16px 0; border-left: none; border-top: 1px solid var(--border); }
  .footer-grid > div:first-child { border-top: none; padding-top: 0; }
  .cta-inner { justify-content: center; text-align: center; }
  .cta-left { flex-direction: column; }
}

/* ==========================================================================
   PÁGINA DE BÚSQUEDA
   ========================================================================== */
.search-box { display: flex; gap: 10px; margin-bottom: 8px; }
.search-box input {
  flex: 1; min-width: 0; height: 48px; padding: 0 20px; border: 1px solid #cfdae6; border-radius: 50px;
  font-family: var(--font-body); font-size: 16px; color: var(--ink); background: #fff; outline: none;
}
.search-box input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(11,93,168,.14); }
.search-box .btn { height: 48px; padding: 0 26px; }
.search-status { color: var(--muted); font-size: 14px; margin: 14px 0 22px; }
.search-results { list-style: none; margin: 0; padding: 0; }
.search-result { padding: 18px 0; border-top: 1px solid var(--border); }
.search-result:first-child { border-top: none; }
.search-result h3 { font-size: 18px; margin: 0 0 3px; }
.search-result h3 a { color: var(--blue); }
.search-result .sr-url { font-size: 12px; color: var(--teal-dark); margin-bottom: 6px; }
.search-result p { font-size: 14px; color: var(--text); margin: 0; line-height: 1.55; }
.search-result mark { background: #fff1b8; color: inherit; padding: 0 1px; border-radius: 2px; }

/* ==========================================================================
   CURSOS: pago, fichas de curso e inscripción
   ========================================================================== */
[hidden] { display: none !important; }

.pay-box {
  display: flex; gap: 18px; align-items: flex-start;
  background: linear-gradient(180deg, #f8fbfd 0%, #f1f6fb 100%);
  border: 1px solid #dbe6f0; border-left: 3px solid var(--blue); border-radius: 6px;
  padding: 22px 24px; box-shadow: 0 2px 10px rgba(16,42,76,.05);
}
.pay-icon {
  width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0; background: #e6f0fa; color: var(--blue);
  display: flex; align-items: center; justify-content: center;
}
.pay-icon .icon { width: 22px; height: 22px; }
.pay-main { min-width: 0; flex: 1; }
.content .pay-main h2 { font-size: 20px; margin: 0 0 2px; }
.content .pay-sub { margin: 0 0 4px; font-size: 12.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.pay-data { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px 24px; margin: 12px 0 14px; }
.pay-data dt { font-size: 11.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.pay-data dd { margin: 2px 0 0; font-size: 15px; font-weight: 700; color: var(--ink); overflow-wrap: anywhere; }
.content .pay-note { font-size: 14px; margin: 0; padding-top: 12px; border-top: 1px solid #dbe6f0; }

.courses-list { display: grid; gap: 28px; margin: 30px 0 34px; }
.course {
  --accent: #0ca5b8; --accent-soft: #e1f4f6; --accent-dark: #0b8798;
  display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 28px; align-items: start;
  background: #fff; border: 1px solid var(--border); border-top: 4px solid var(--accent);
  border-radius: 10px; padding: 26px; box-shadow: var(--shadow-sm); scroll-margin-top: 150px;
}
.course--blue { --accent: #0b5da8; --accent-soft: #e6f0fa; --accent-dark: #094a87; }
.course-flyer { display: block; line-height: 0; }
.course-flyer img { width: 100%; height: auto; border-radius: 6px; box-shadow: 0 4px 14px rgba(16,42,76,.18); transition: transform .15s ease; }
.course-flyer:hover img { transform: scale(1.02); }
.course-tag {
  display: inline-block; font-size: 11.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  color: var(--accent-dark); background: var(--accent-soft); padding: 5px 12px; border-radius: 50px; margin-bottom: 10px;
}
.content .course-body h2 { font-size: 28px; margin: 0 0 2px; color: var(--ink); }
.content .course-sub { font-size: 13.5px; font-weight: 600; color: var(--accent-dark); margin: 0 0 14px; }
.content .course-body p, .content .course-body li { font-size: 15px; }
.course-list { margin: 8px 0 14px; padding-left: 20px; }
.course-list li { margin-bottom: 6px; }
.course-facts { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; padding: 0; }
.content .course-facts li {
  display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; color: var(--ink);
  background: var(--aapi-green-pale); border: 1px solid var(--border); border-radius: 50px; padding: 6px 13px;
}
.course-facts .icon { width: 15px; height: 15px; color: var(--accent-dark); }
.content .course-dest { font-size: 14px; color: var(--muted); margin: 0 0 16px; }
.course-fee { background: var(--accent-soft); border-radius: 8px; padding: 14px 18px 16px; margin-bottom: 18px; }
.course-fee-title { font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--accent-dark); margin-bottom: 8px; }
.fee-list { display: flex; flex-wrap: wrap; gap: 10px 14px; }
.fee { flex: 1 1 150px; background: #fff; border-radius: 8px; padding: 10px 14px; border: 1px solid rgba(16,42,76,.08); }
.fee-label { display: block; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.fee-amount { display: block; font-family: var(--font-head); font-size: 22px; font-weight: 700; color: var(--accent-dark); margin-top: 2px; }
.course-btn { letter-spacing: .06em; padding-left: 28px; padding-right: 28px; background: var(--accent); border-color: var(--accent); box-shadow: 0 4px 14px rgba(16,42,76,.18); }
.course-btn:hover { background: var(--accent-dark); border-color: var(--accent-dark); }
.course--violet { --accent: #6b4fbb; --accent-soft: #efeafb; --accent-dark: #53399b; }
.course--amber { --accent: #c27a0a; --accent-soft: #fdf3e0; --accent-dark: #8f5a06; }
.course.no-flyer { grid-template-columns: 1fr; }

/* Formulario de inscripción */
.enroll-form fieldset { border: 1px solid var(--border); border-radius: 10px; padding: 18px 22px 8px; margin: 0 0 22px; background: #fff; }
.enroll-form legend { font-family: var(--font-head); font-weight: 700; font-size: 17px; color: var(--ink); padding: 0 8px; }
.enroll-form .field { margin-bottom: 16px; }
.enroll-form .row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.enroll-form label, .enroll-form .label-like { display: block; font-size: 14px; font-weight: 600; color: var(--ink); margin-bottom: 6px; }
.enroll-form .req { color: #c0392b; }
.enroll-form input[type="text"], .enroll-form input[type="email"], .enroll-form input[type="tel"], .enroll-form select {
  width: 100%; height: 44px; padding: 0 14px; border: 1px solid #cfdae6; border-radius: 8px; background: #fff;
  font-family: var(--font-body); font-size: 15px; color: var(--ink); outline: none; transition: border-color .15s ease, box-shadow .15s ease;
}
.enroll-form input:focus, .enroll-form select:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(11,93,168,.14); }
.enroll-form .is-invalid { border-color: #c0392b !important; }
.enroll-form .field-error { display: block; min-height: 0; font-size: 12.5px; color: #c0392b; margin-top: 4px; }
.enroll-form .field-hint { display: block; font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.enroll-form label.check { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; margin: 0 18px 0 0; cursor: pointer; }
.enroll-form .radio-row { display: flex; flex-wrap: wrap; gap: 6px; }
.enroll-form input[type="radio"], .enroll-form input[type="checkbox"] { width: 17px; height: 17px; accent-color: var(--blue); }
.form-note { background: #fff8e6; border: 1px solid #f1dfa9; border-radius: 8px; padding: 12px 16px; font-size: 14px; margin: 0 0 12px; }
.form-req { font-size: 13px; color: var(--muted); margin: 0 0 18px; }
.form-alert { background: #fdecea; border: 1px solid #f3b9b3; color: #8a2a20; border-radius: 8px; padding: 12px 16px; font-size: 14px; margin: 0 0 18px; }
.form-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 4px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.enroll-ok { text-align: center; }
.enroll-ok-icon { display: inline-flex; width: 64px; height: 64px; border-radius: 50%; background: #e1f4f6; color: var(--teal-dark); align-items: center; justify-content: center; margin-bottom: 8px; }
.enroll-ok-icon .icon { width: 34px; height: 34px; }
.enroll-ok .pay-box { text-align: left; margin-top: 22px; }

@media (max-width: 760px) {
  .course { grid-template-columns: 1fr; padding: 20px; gap: 18px; }
  .course-flyer { max-width: 190px; }
  .content .course-body h2 { font-size: 24px; }
  .enroll-form .row-2 { grid-template-columns: 1fr; }
  .pay-box { padding: 18px; flex-direction: column; gap: 10px; }
}

/* ==========================================================================
   SOCIOS, CONTACTO y contenidos exclusivos
   ========================================================================== */
.form-card + .form-card { margin-top: 24px; }
.form-group textarea {
  width: 100%; padding: 12px 14px; border: 1px solid #cfdae6; border-radius: 8px; background: #fff;
  font-family: var(--font-body); font-size: 15px; color: var(--ink); resize: vertical; min-height: 110px;
}
.form-group textarea:focus { outline: 2px solid var(--aapi-green); border-color: var(--aapi-green); }
.form-group .field-error { display: block; font-size: 12.5px; color: #c0392b; margin-top: 4px; }
.form-group .is-invalid { border-color: #c0392b; }
.form-ok { background: #e8f6ee; border: 1px solid #b6e0c6; color: #1d6b3d; border-radius: 8px; padding: 12px 16px; font-size: 14px; margin: 0 0 18px; }
.form-card .form-alert { margin-bottom: 16px; }
.form-card h4 { font-size: 17px; }
.form-card .text-center .icon, .form-card p .icon { width: 15px; height: 15px; vertical-align: -2px; }

.socios-gate { margin: 16px 0 4px; }
.socios-gate-locked {
  display: flex; gap: 14px; align-items: flex-start; background: #f0f8ff; border: 1px solid #cfe3f7;
  border-radius: 8px; padding: 14px 18px;
}
.socios-gate .lock { width: 38px; height: 38px; border-radius: 50%; background: #e1eefb; color: var(--blue); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.socios-gate .lock .icon { width: 19px; height: 19px; }
.socios-gate-locked strong { display: block; color: var(--blue); font-size: 15px; }
.content .socios-gate-locked p { margin: 2px 0 0; font-size: 14px; color: var(--text); }
.socios-gate.is-open { background: #f0f8ff; border: 1px solid #cfe3f7; border-radius: 8px; padding: 14px 16px 16px; }
.socios-gate-head { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; font-size: 14px; color: var(--blue); }
.socios-gate-head .lock-ok .icon { width: 16px; height: 16px; color: var(--blue); }
.socios-gate-head .gate-title { color: var(--muted); font-weight: 500; }
.video-embed { position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: 8px; overflow: hidden; background: #000; }
.video-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* Grupos de trabajo dentro de una comisión */
.commission-groups { list-style: none; margin: 8px 0 4px; padding: 0; display: grid; gap: 8px; }
.commission-groups li { background: var(--aapi-green-pale); border: 1px solid var(--border); border-left: 3px solid var(--teal); border-radius: 6px; padding: 10px 14px; }
.commission-groups strong { display: block; color: var(--ink); font-size: 15px; }
.commission-groups span { display: block; font-size: 14px; color: var(--text); }

/* Submenú anidado (Historial de Noticias): se abre al pasar el mouse o con el teclado en escritorio */
@media (min-width: 993px) {
  .dropdown .subdrop:hover > .dropdown,
  .dropdown .subdrop:focus-within > .dropdown { display: block; }
  /* en los grupos de la derecha el submenú se despliega hacia la izquierda para no salirse de la pantalla */
  .nav-list > li.nav-right .subdrop > .dropdown { left: auto; right: 100%; margin: 0 6px 0 0; }
  .nav-list > li.nav-right .subdrop > .dropdown::before { left: auto; right: -12px; width: 12px; }
}

/* Noticias y actividades editables */
.act-empty { color: var(--muted); font-size: 14px; padding: 14px 4px; }
#actividades-realizadas .act-list { display: grid; gap: 4px; max-width: 720px; margin: 18px auto 0; }
.news-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.news-card { background: #fff; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; scroll-margin-top: 150px; }
.news-card img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; background: var(--aapi-green-pale); }
.news-card-body { padding: 18px 20px 20px; display: flex; flex-direction: column; flex: 1; }
.news-card-date { font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--teal-dark); }
.content .news-card h3 { font-size: 19px; line-height: 1.3; margin: 6px 0 10px; color: var(--ink); }
.content .news-card p { font-size: 14.5px; color: var(--text); margin: 0 0 10px; }
.news-card-link { margin-top: auto; font-size: 13px; font-weight: 700; color: var(--blue); display: inline-flex; align-items: center; gap: 5px; }
.news-card-link .icon { width: 14px; height: 14px; }
.news-card-hl { outline: 3px solid var(--teal); outline-offset: 2px; }
@media (max-width: 992px) { .news-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .news-grid { grid-template-columns: 1fr; } }

/* los enlaces con ancla (#...) no quedan tapados por el encabezado fijo */
html { scroll-padding-top: 84px; }
@media (min-width: 993px) { html { scroll-padding-top: 130px; } }

/* IACAPAP: pertenencia institucional sin enlace. El logo original es para fondos oscuros, por eso va sobre un panel azul. */
.logo-dark { display: inline-flex; align-items: center; background: var(--aapi-green-dark); border-radius: 10px; padding: 8px 14px; }
.logo-dark img { display: block; height: 54px; width: auto; }
.alliance-static { border-top: 1px solid #dbe6f0; }
.alliance-static .alliance-name { max-width: 360px; }
.footer-alliance-static { cursor: default; }
.footer-alliance-static:hover { opacity: 1; }
.footer-alliance-static .logo-dark { padding: 5px 9px; border-radius: 7px; }
.footer-alliance-static .logo-dark img { height: 34px; }
@media (max-width: 992px) { .alliance-static .alliance-name { border-left: none; padding-left: 0; text-align: center; } }
