/* ============================================================
   AulaSic — CSS principal
   ============================================================ */

/* --- Brevo form embed --- */
#sib-container input:-ms-input-placeholder { font-family: Merriweather, webFonts; text-align: left; color: #c0ccda; }
#sib-container input::placeholder { font-family: Merriweather, webFonts; text-align: left; color: #c0ccda; }
#sib-container textarea::placeholder { font-family: Merriweather, webFonts; text-align: left; color: #c0ccda; }
#sib-container a { text-decoration: underline; color: #2BB2FC; }
:where(.sib-form-message-panel) { display: none; }
:where(.sib-form-message-panel .sib-notification__icon) { width: 20px; height: 20px; }

:root {
  --color-bg:           #f2ead3;
  --color-surface:      #ffffff;
  --color-border:       #d5cec4;
  --color-text:         #2D2B28;
  --color-text-muted:   #7a6f62;
  --color-accent:       #20c8ff;
  --color-accent-hover: #0fb4eb;
  --font-serif:         'EB Garamond', Georgia, serif;
  --font-text:          'Merriweather', Georgia, serif;
  --radius:             14px;
  --shadow:             0 2px 8px rgba(0,0,0,.06);
  --shadow-hover:       0 10px 28px rgba(0,0,0,.16);
  --transition:         0.2s ease;
  --page-h:             40px;
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-text);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  min-height: 100vh;
}

/* ============================================================
   ACCESSIBILITAT — Skip link + Focus visible
   ============================================================ */

/* Skip link (2.4.1) */
.skip-link {
  position: absolute;
  top: -100%;
  left: 0;
  z-index: 9999;
  padding: 12px 24px;
  background: var(--color-text);
  color: #fff;
  font-family: var(--font-text);
  font-size: 1rem;
  text-decoration: none;
}
.skip-link:focus-visible { top: 0; }

/* Focus visible global (2.4.7) */
:focus-visible {
  outline: 2px solid var(--color-text);
  outline-offset: 3px;
  border-radius: 2px;
}
:focus:not(:focus-visible) { outline: none; }

.site-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { border: none; background: none; cursor: pointer; font: inherit; }


/* ============================================================
   HEADER
   ============================================================ */

.site-header {
  background: var(--color-bg);
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Logo */
.logo-link {
  display: inline-flex;
  align-items: center;
  background: var(--color-bg);
  border-radius: 50%;
}

.logo-img {
  height: 110px;
  width: auto;
  display: block;
}

.header-left {
  display: flex;
  align-items: flex-start;
}

.header-right {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 20px;
}

.header-claim {
  font-family: var(--font-serif);
  font-size: clamp(0.9rem, calc(6vw - 2.2rem), 1.8rem);
  font-weight: 400;
  line-height: 1.2;
  text-align: right;
  color: var(--color-text);
  -webkit-font-smoothing: antialiased;
}

@media (max-width: 680px) {
  .header-claim { display: none; }
}

/* Hamburger */
.hamburger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  padding: 6px;
  cursor: pointer;
  background: none;
  border: none;
  -webkit-appearance: none;
  appearance: none;
  position: relative;
  z-index: 460;
}

.hamburger span {
  display: block;
  width: 26px;
  height: 1px;
  background: var(--color-text);
  transition: transform 0.22s ease, opacity 0.22s ease;
  transform-origin: center;
}

.hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 6px); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -6px); }

/* Nav dropdown */
.nav-dropdown {
  position: fixed;
  top: 0;
  right: 0;
  left: auto;
  width: auto;
  min-width: 220px;
  background: #ffffff;
  z-index: 400;
  padding: 8px 0;
  display: none;
  flex-direction: column;
}

.nav-dropdown.open {
  display: flex;
}

.nav-dropdown a {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 400;
  color: #000000;
  text-decoration: none;
  padding: 12px 24px;
  white-space: nowrap;
  transition: font-weight 0.1s;
}

.nav-dropdown a:hover { text-decoration: underline; }

/* Nav overlay — cobreix tota la pàgina inclòs el header */
.nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 450;
  cursor: pointer;
}

.nav-overlay.visible { display: block; }

/* Dropdown per sobre de l'overlay */
.nav-dropdown { z-index: 500; }

/* Nav */
.site-nav {
  display: flex;
  gap: 36px;
  align-items: center;
}

.site-nav a {
  font-family: var(--font-text);
  font-size: 0.88rem;
  font-weight: 300;
  color: var(--color-text);
  transition: color var(--transition);
}

.site-nav a:hover { color: var(--color-accent); }


/* ============================================================
   PAGE CLAIM
   ============================================================ */

.page-claim {
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 2.5vw, 2.4rem);
  font-weight: 400;
  line-height: 1.2;
  color: var(--color-text);
  -webkit-font-smoothing: antialiased;
  margin-bottom: 24px;
}

/* ============================================================
   HERO
   ============================================================ */

.hero {
  background-color: #888;
  background-image: url('/img/hero-bg.jpg');
  background-size: cover;
  background-position: center top;
  /* full-bleed */
  width: 100vw;
  position: relative;
  left: 50%;
  margin-left: -50vw;
  margin-bottom: 40px;
  min-height: 55vh;
  display: flex;
  align-items: center;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(60, 60, 60, 0.55);
}

.hero-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 80px 40px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 32px 48px;
  align-items: start;
}

.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(2.4rem, 5vw, 4.5rem);
  font-weight: 400;
  line-height: 1.1;
  color: #fff;
  -webkit-font-smoothing: antialiased;
  grid-column: 1 / -1;
}

.hero-sub {
  font-family: var(--font-text);
  font-size: clamp(1rem, 1.4vw, 1.15rem);
  font-weight: 300;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.85);
  max-width: 48ch;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  background: var(--color-text);
  color: var(--color-bg);
  font-family: var(--font-text);
  font-size: 1rem;
  font-weight: 400;
  padding: 14px 28px;
  border-radius: 99px;
  text-decoration: none;
  align-self: end;
  transition: background 0.2s, color 0.2s;
}

.hero-cta:hover {
  background: var(--color-accent);
  color: #fff;
}


/* ============================================================
   FILTROS
   ============================================================ */

.filters-bar {
  padding: 4px 0 20px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  flex: 1;
  min-width: 0;
}

.filter-dropdowns {
  display: flex;
  gap: 12px;
  flex-shrink: 0;
  align-items: center;
}

/* Pastillas de filtros activos */
.active-filters {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.active-filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-text);
  font-size: 0.78rem;
  font-weight: 400;
  color: var(--color-text);
  background: var(--color-accent);
  border: none;
  border-radius: 99px;
  padding: 5px 12px;
  cursor: pointer;
  transition: all var(--transition);
}
.active-filter-pill span {
  font-size: 1rem;
  line-height: 1;
  opacity: 0.7;
}
.active-filter-pill:hover {
  background: var(--color-accent-hover);
  color: #fff;
}
.active-filter-pill:hover span { opacity: 1; }

/* Buscador */
.search-box {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 10px;
  color: var(--color-text-muted);
  pointer-events: none;
}

.search-input {
  font-family: var(--font-text);
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--color-text);
  background: #f8f4e9;
  border: 1px solid transparent;
  border-radius: 99px;
  padding: 7px 4px 7px 32px;
  width: 0;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
  transition: width var(--transition), padding var(--transition), border-color var(--transition), box-shadow var(--transition);
  -webkit-appearance: none;
  appearance: none;
}

.search-input::-webkit-search-cancel-button { display: none; }

.search-input::placeholder { color: transparent; }

.search-input:focus::placeholder { color: var(--color-text-muted); }

.search-input:focus,
.search-input:not(:placeholder-shown) {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  padding-right: 30px;
  width: 240px;
  cursor: text;
}

.search-clear {
  position: absolute;
  right: 8px;
  border: none;
  background: none;
  font-size: 1.1rem;
  line-height: 1;
  color: var(--color-text-muted);
  cursor: pointer;
  padding: 2px 6px;
}

.search-clear:hover { color: var(--color-accent); }

/* Desplegable */
.filter-dropdown {
  position: relative;
}

.filter-summary {
  font-family: var(--font-text);
  font-size: 0.82rem;
  font-weight: 400;
  color: var(--color-text-muted);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border-radius: 99px;
  border: 1px solid var(--color-border);
  background: transparent;
  user-select: none;
  transition: all var(--transition);
}

.filter-summary::-webkit-details-marker { display: none; }

.filter-summary::after {
  content: '↓';
  font-size: 0.7rem;
  transition: transform var(--transition);
}

.filter-dropdown[open] .filter-summary {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.filter-dropdown[open] .filter-summary::after {
  transform: rotate(180deg);
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  left: auto;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 12px;
  box-shadow: var(--shadow-hover);
  z-index: 50;
  min-width: 280px;
}

.chip {
  font-family: var(--font-text);
  font-size: 0.76rem;
  font-weight: 300;
  padding: 4px 13px;
  border-radius: 99px;
  border: 1px solid var(--color-border);
  background: transparent;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: all var(--transition);
  line-height: 1.4;
}

.chip:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.chip.active {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: #fff;
}


/* ============================================================
   PROGRAMS GRID
   ============================================================ */

main {
  padding: 0 0 80px;
}

.programs-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}


/* ============================================================
   CARD — póster sin texto visible
   ============================================================ */

.card {
  display: block;
  border-radius: 15px;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  position: relative;
  background: transparent;
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}


/* Texto visualmente oculto, accesible para lectores de pantalla y SEO */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}


/* ============================================================
   PAGINACIÓN
   ============================================================ */

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  padding: 32px 0 0;
}

.page-btn {
  font-family: var(--font-text);
  font-size: 0.85rem;
  font-weight: 400;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid var(--color-border);
  background: transparent;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: all var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.page-btn:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.page-btn.active {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: #fff;
}

.page-btn:disabled {
  opacity: 0.3;
  cursor: default;
  pointer-events: none;
}


/* ============================================================
   LOADING / EMPTY STATES
   ============================================================ */

.spinner-wrap {
  grid-column: 1 / -1;
  display: flex;
  justify-content: center;
  padding: 80px 0;
}

.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid rgba(0, 0, 0, 0.1);
  border-top-color: var(--color-accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.empty-msg {
  grid-column: 1 / -1;
  text-align: center;
  padding: 80px 0;
  color: var(--color-text-muted);
  font-family: var(--font-text);
  font-size: 0.9rem;
}

/* ============================================================
   DOCENTES — grid de tarjetas + modal de biografía
   ============================================================ */

.docentes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 40px 28px;
  margin-top: 40px;
}

.docente-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-family: var(--font-text);
  text-align: center;
}

.docente-card-foto-wrap {
  position: relative;
  width: 190px;
  height: 190px;
  border-radius: 50%;
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
}

.docente-card:hover .docente-card-foto-wrap,
.docente-card:focus-visible .docente-card-foto-wrap {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

.docente-card-foto,
.docente-card-foto-placeholder {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.docente-card-foto {
  z-index: 1;
}

.docente-card-foto-placeholder {
  z-index: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-accent);
  color: #ffffff;
  font-family: var(--font-serif);
  font-size: 2.2rem;
}

/* Si la foto está presente (no ha fallado su carga), el placeholder azul
   se oculta: con imágenes transparentes se veía el fondo azul debajo. */
.docente-card-foto + .docente-card-foto-placeholder,
.docente-foto + .docente-foto-placeholder {
  display: none;
}

.docente-card-nombre {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--color-text);
  line-height: 1.3;
}

.modal-docente {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 400;
  width: min(640px, 92vw);
  max-height: 88vh;
  overflow-y: auto;
  background: #ffffff;
  border-radius: 25px;
  padding: 48px 40px 36px;
}

.modal-docente.visible { display: block; }

.docente-modal-foto-wrap {
  position: relative;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  margin: 0 auto 20px;
  box-shadow: var(--shadow);
}

.docente-modal-foto,
.docente-modal-foto-placeholder {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.docente-modal-foto-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-accent);
  color: #ffffff;
  font-family: var(--font-serif);
  font-size: 1.3rem;
  z-index: 0;
}

.docente-modal-foto { z-index: 1; }

.docente-modal-nombre {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  font-weight: 400;
  color: var(--color-text);
  text-align: center;
  margin-bottom: 20px;
}

.docente-modal-bio {
  font-family: var(--font-text);
  font-size: 0.95rem;
  font-weight: 300;
  color: var(--color-text-muted);
  line-height: 1.85;
}

.docente-modal-bio p + p { margin-top: 16px; }
.docente-modal-bio cite { font-style: italic; }
.docente-modal-bio em { font-style: italic; }

.docente-modal-programas {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--color-border);
}

.docente-modal-programas-label {
  display: block;
  font-family: var(--font-text);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: 10px;
}

.docente-modal-programas-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.docente-modal-programas-list a {
  font-family: var(--font-text);
  font-size: 0.92rem;
  color: var(--color-text);
  text-decoration: underline;
  text-decoration-color: var(--color-border);
  text-underline-offset: 3px;
}

.docente-modal-programas-list a:hover {
  color: var(--color-accent-hover);
  text-decoration-color: currentColor;
}

@media (max-width: 600px) {
  .modal-docente { padding: 44px 24px 28px; width: 94vw; }
  .docentes-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 28px 18px; }
  .docente-card-foto-wrap { width: 130px; height: 130px; }
}



/* ============================================================
   PÁGINA DE PROGRAMA
   ============================================================ */

body.programa-bg { background: var(--color-bg); }
body.programa-bg .site-footer { margin-top: 0; }
.cta-banner + .site-footer { margin-top: 0; }

.cta-banner--fixed {
  position: fixed !important;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 200;
  display: none;
  padding-top: 22px !important;
  padding-bottom: 22px !important;
}
.cta-banner--fixed.visible {
  display: block;
}
.cta-banner--fixed .cta-banner-btn {
  font-size: 0.8rem;
  padding: 11px 22px;
}

.cta-banner {
  position: relative;
  background-image: url('/img/cta-bg.jpg');
  background-size: cover;
  background-position: center;
  padding: 28px var(--page-h);
  cursor: pointer;
  overflow: hidden;
}

.cta-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(30,30,30,0.45);
  pointer-events: none;
}

.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 300;
}

.modal-overlay.visible { display: block; }

.modal-cta {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 400;
  width: min(540px, 92vw);
  max-height: 90vh;
  overflow-y: auto;
}

.modal-cta.visible { display: block; }

.modal-news {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 400;
  width: min(560px, 92vw);
  max-height: calc(100vh - 40px);
  overflow: hidden;
}

.modal-news.visible { display: block; }

.modal-payment {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 400;
  width: min(680px, 94vw);
  max-height: 92vh;
  overflow-y: auto;
  background: #ffffff;
  border-radius: 25px;
  padding: 44px 32px 28px;
  transition: width 0.25s ease;
}

/* Al elegir modalidad, el modal se ensancha para dar aire al checkout */
.modal-payment--checkout {
  width: min(1060px, 94vw);
  padding-bottom: 20px;
}

.modal-payment.visible { display: block; }

.payment-programa {
  font-family: var(--font-text);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin: 0 0 6px;
}

.payment-options-title {
  font-family: var(--font-text);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--color-text);
  margin: 0 0 18px;
}

.payment-options-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.payment-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
  font-family: var(--font-text);
  color: var(--color-text);
  background: #ffffff;
  border: 1.5px solid var(--color-border);
  border-radius: 16px;
  padding: 18px 44px 18px 20px;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.payment-card:hover {
  border-color: var(--color-text);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.07);
}

.payment-card.active {
  border-color: var(--color-accent);
  background: rgba(32, 200, 255, 0.07);
  box-shadow: 0 4px 16px rgba(32, 200, 255, 0.18);
}

.payment-card-label {
  font-size: 1rem;
  font-weight: 700;
}

.payment-card-importe {
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1.1;
}

.payment-card-importe small {
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--color-text-muted);
}

.payment-card-detalle {
  font-family: var(--font-text);
  font-size: 0.85rem;
  line-height: 1.45;
  color: var(--color-text-muted);
}

/* Marca de selección */
.payment-card-check {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 20px;
  height: 20px;
  border: 1.5px solid var(--color-border);
  border-radius: 50%;
  transition: border-color 0.2s, background 0.2s;
}

.payment-card.active .payment-card-check {
  border-color: var(--color-accent);
  background: var(--color-accent);
}

.payment-card.active .payment-card-check::after {
  content: '';
  position: absolute;
  top: 4px;
  left: 6.5px;
  width: 4px;
  height: 9px;
  border: solid #ffffff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

@media (max-width: 600px) {
  .modal-payment,
  .modal-payment--checkout {
    width: 96vw;
    padding: 40px 16px 16px;
  }
  .payment-options-row { grid-template-columns: 1fr; }
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 14px;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--color-text);
  z-index: 1;
  line-height: 1;
}

.cta-banner-inner {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: flex-start;
}

.cta-banner-btn {
  font-family: var(--font-text);
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-text);
  background: #ffffff;
  border-radius: 99px;
  padding: 14px 28px;
  white-space: nowrap;
  transition: background 0.2s, color 0.2s;
}

.cta-banner-btn:hover {
  background: var(--color-accent);
  color: #ffffff;
}


.programa-page {
  background: #ffffff;
}

.programa-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 48px 40px 80px;
}

/* Breadcrumbs + título oculto */
.programa-titulo {
  margin-bottom: 32px;
}


.breadcrumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 2px;
  font-family: var(--font-text);
  font-size: 0.82rem;
  font-weight: 300;
  color: var(--color-text-muted);
}

.breadcrumb-link {
  color: var(--color-text-muted);
  transition: color var(--transition);
}
.breadcrumb-link:hover { color: var(--color-accent); }

.breadcrumb-sep {
  color: var(--color-border);
  padding: 0 2px;
}

.breadcrumb-current {
  color: var(--color-text);
  font-weight: 400;
}

/* Layout dos columnas */
.programa-body {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 48px;
  align-items: start;
}

/* Columna izquierda */
.programa-sidebar {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.programa-poster {
  width: 100%;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-hover);
}

.programa-poster img {
  width: 100%;
  height: auto;
  display: block;
}

.programa-poster--color {
  aspect-ratio: 4 / 5;
  background: var(--color-accent);
}

.programa-datos {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-top: 20px;
}

.dato-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.dato-label {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
  color: var(--color-text);
}

.dato-value {
  font-family: var(--font-text);
  font-size: 0.92rem;
  font-weight: 400;
  color: var(--color-text);
}

.docente-block {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  margin-top: 4px;
}

.docente-foto-wrap {
  position: relative;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  box-shadow: var(--shadow);
}

.docente-foto,
.docente-foto-placeholder {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.docente-foto { z-index: 1; }

.docente-foto-placeholder {
  z-index: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-accent);
  color: #ffffff;
  font-family: var(--font-serif);
  font-size: 1.3rem;
}

.docente-nombre {
  font-family: var(--font-text);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-text);
}

.docente-info-link {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-family: var(--font-text);
  font-size: 0.85rem;
  color: var(--color-text-muted);
  text-decoration: underline;
  text-decoration-color: var(--color-border);
  text-underline-offset: 3px;
}

.docente-info-link:hover {
  color: var(--color-accent-hover);
  text-decoration-color: currentColor;
}

.docente-block + .docente-block {
  margin-top: 24px;
}

.ediciones-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 4px;
}

.ediciones-list .dato-value {
  line-height: 1.4;
}

.edicion-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.dato-link {
  text-decoration: none;
  transition: color var(--transition);
}
.dato-link::after {
  content: ' ➚';
  font-family: var(--font-serif);
  font-size: 1em;
  font-style: normal;
}
.dato-link:hover {
  color: var(--color-accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.dato-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 0;
}

.cat-tag {
  font-family: var(--font-text);
  font-size: 0.75rem;
  padding: 3px 10px;
  border-radius: 99px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
}

.pago-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 16px;
}

/* Mismo tamaño que el resto de datos de la barra lateral, solo en negrita */
.pago-precio {
  font-weight: 700;
}

.pago-opciones {
  font-family: var(--font-text);
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--color-text-muted);
  margin: 0;
  padding-left: 1.1em;
}

.pago-opciones li {
  margin: 0;
}

.pago-info-text {
  font-family: var(--font-text);
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--color-text-muted);
  margin: 0;
}

.btn-matricula {
  border: none;
  cursor: pointer;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px 24px;
  border-radius: 99px;
  background: var(--color-accent);
  color: #fff;
  font-family: var(--font-text);
  font-weight: 700;
  font-size: 0.95rem;
  text-align: center;
  transition: all var(--transition);
}
.btn-matricula:hover {
  background: var(--color-accent-hover);
  transform: translateY(-1px);
}

/* Columna derecha */
.programa-contenido {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.programa-contenido h1 {
  font-family: var(--font-serif);
  font-size: 2.2rem;
  font-weight: 400;
  line-height: 1.2;
  color: var(--color-text);
}

.programa-claim {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 400;
  line-height: 1.5;
  color: var(--color-text);
  -webkit-font-smoothing: antialiased;
}

.content-section h2 {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--color-text);
  margin-bottom: 16px;
  -webkit-font-smoothing: antialiased;
}

.content-section p {
  font-family: var(--font-text);
  font-size: 0.95rem;
  font-weight: 300;
  color: var(--color-text-muted);
  line-height: 1.85;
  white-space: pre-line;
  margin-left: 4px;
}

.content-section p + p,
.content-section ul + p,
.content-section ol + p,
.content-section p + ul,
.content-section p + ol,
.content-section ul + ol,
.content-section ol + ul {
  margin-top: 16px;
}

.content-section ul,
.content-section ol {
  font-family: var(--font-text);
  font-size: 0.95rem;
  font-weight: 300;
  color: var(--color-text-muted);
  line-height: 1.85;
  padding-left: 1.3em;
  list-style-position: outside;
  margin-left: 4px;
}

.content-section ul { list-style-type: disc; }
.content-section ol { list-style-type: decimal; }

.content-section h3 {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--color-text);
  margin-top: 28px;
  margin-bottom: 10px;
  -webkit-font-smoothing: antialiased;
}

.content-section ul + h3,
.content-section ol + h3,
.content-section p + h3 {
  margin-top: 24px;
}

.content-section h3:first-child {
  margin-top: 0;
}

/* Bloque destacado (p. ej. «Qué hace única nuestra formación» en Metodología) */
.content-section--destacado h2 {
  font-size: 1.8rem;
}

.content-section--destacado ul,
.content-section--destacado p {
  font-size: 1.08rem;
  font-weight: 400;
  color: var(--color-text);
  line-height: 1.75;
}

.content-section--destacado li + li {
  margin-top: 12px;
}

.content-section p a,
.content-section li a {
  color: var(--color-text);
  text-decoration: underline;
  text-decoration-color: var(--color-border);
  text-underline-offset: 3px;
  word-break: break-word;
}

.content-section p a:hover,
.content-section li a:hover {
  color: var(--color-accent-hover);
  text-decoration-color: currentColor;
}

/* FAQ — acordeón con details/summary */
.faq-item {
  border-bottom: 1px solid var(--color-border);
}

.faq-item summary {
  cursor: pointer;
  list-style: none;
  position: relative;
  padding: 14px 36px 14px 4px;
  font-family: var(--font-text);
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--color-text);
  line-height: 1.5;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
  content: '+';
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--color-text-muted);
  transition: transform var(--transition);
}

.faq-item[open] summary::after {
  content: '−';
}

.faq-item summary:hover {
  color: var(--color-accent-hover);
}

.faq-answer {
  padding: 0 4px 18px;
}

.faq-answer p {
  font-family: var(--font-text);
  font-size: 0.95rem;
  font-weight: 300;
  color: var(--color-text-muted);
  line-height: 1.85;
}

.faq-answer p + p { margin-top: 12px; }

.faq-link {
  font-family: var(--font-text);
  font-size: inherit;
  font-weight: inherit;
  color: var(--color-text);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: var(--color-border);
  text-underline-offset: 3px;
}

.faq-link:hover {
  color: var(--color-accent-hover);
  text-decoration-color: currentColor;
}

.faq-more {
  margin-top: 20px;
}

.faq-more a {
  font-family: var(--font-text);
  font-size: 0.92rem;
  color: var(--color-text);
  text-decoration: underline;
  text-decoration-color: var(--color-border);
  text-underline-offset: 3px;
}

.faq-more a:hover {
  color: var(--color-accent-hover);
  text-decoration-color: currentColor;
}

.titulacion-img {
  display: block;
  max-width: 320px;
  width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: var(--shadow);
  margin-bottom: 20px;
}

.titulacion-img--logo {
  max-width: 140px;
  box-shadow: none;
}

.titulacion-img--diploma {
  max-width: 480px;
}

/* Programas padre (grid de pósteres) */
.programas-padre-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 24px;
  margin-top: 8px;
}

.programa-padre-card {
  display: block;
  aspect-ratio: 4/5;
  border-radius: 15px;
  overflow: hidden;
  position: relative;
  text-decoration: none;
  background: transparent;
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
}

.programa-padre-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

.programa-padre-nombre {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* CTA sticky */
.sticky-cta {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: var(--color-accent);
  padding: 14px 0;
  gap: 16px;
  z-index: 50;
  transform: translateY(-100%);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.sticky-cta.visible {
  transform: translateY(0);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.25);
}

.sticky-cta-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.sticky-cta p {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--color-text);
}

.sticky-cta .btn-primary {
  background: #ffffff;
  color: var(--color-text);
}
.sticky-cta .btn-primary:hover {
  background: var(--color-bg);
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 99px;
  background: var(--color-accent);
  color: #fff;
  font-family: var(--font-text);
  font-weight: 700;
  font-size: 0.92rem;
  transition: all var(--transition);
}
.btn-primary:hover {
  background: var(--color-accent-hover);
  transform: translateY(-1px);
}

/* ============================================================
   PÁGINA LEGAL
   ============================================================ */

.legal-page {
  background: #ffffff;
}

.legal-wrap {
  max-width: 860px;
  margin: 0 auto;
  padding: 48px 40px 80px;
}

.legal-nav {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 56px;
  padding-bottom: 24px;
  font-family: var(--font-text);
  font-size: 0.9rem;
}

.legal-nav a {
  color: var(--color-text-muted);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color var(--transition);
}

.legal-nav a:hover { color: var(--color-accent); }

.legal-section {
  margin-bottom: 72px;
}

.legal-section h1 {
  font-family: var(--font-serif);
  font-size: 2.2rem;
  font-weight: 400;
  color: var(--color-text);
  margin-bottom: 32px;
  -webkit-font-smoothing: antialiased;
}

.legal-section h2 {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 400;
  color: var(--color-text);
  margin-top: 36px;
  margin-bottom: 12px;
  -webkit-font-smoothing: antialiased;
}

.legal-section h3 {
  font-family: var(--font-text);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--color-text);
  margin-top: 24px;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.legal-section p {
  font-family: var(--font-text);
  font-size: 0.88rem;
  font-weight: 300;
  color: var(--color-text);
  line-height: 1.85;
  margin-bottom: 14px;
}

.legal-section ol[type="a"] {
  font-family: var(--font-text);
  font-size: 0.88rem;
  font-weight: 300;
  color: var(--color-text);
  line-height: 1.85;
  padding-left: 1.5em;
  margin-bottom: 14px;
}

.legal-section ol[type="a"] li { margin-bottom: 6px; }

.legal-section a {
  color: var(--color-text);
  text-decoration: underline;
  text-underline-offset: 2px;
  word-break: break-all;
}

.legal-section a:hover { color: var(--color-accent); }

.legal-section code {
  font-family: 'Courier New', monospace;
  font-size: 0.82rem;
  background: rgba(0,0,0,0.05);
  padding: 1px 5px;
  border-radius: 3px;
}

.legal-update {
  margin-top: 32px;
  color: var(--color-text-muted) !important;
  font-size: 0.82rem !important;
}

.legal-table-scroll { overflow-x: auto; }

.legal-table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0 24px;
  font-family: var(--font-text);
  font-size: 0.82rem;
  font-weight: 300;
  color: var(--color-text);
  line-height: 1.6;
}

.legal-table thead th {
  background: var(--color-bg);
  font-weight: 700;
  text-align: left;
  padding: 10px 12px;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
}

.legal-table tbody td {
  padding: 10px 12px;
  vertical-align: top;
  border-bottom: 1px solid var(--color-border);
}

.legal-table tbody tr:last-child td { border-bottom: none; }

body.legal-bg .site-footer { margin-top: 0; }

.programa-spacer { height: 80px; }

/* Responsive */
@media (max-width: 768px) {
  .programa-wrap { padding: 32px 20px 60px; }
  .programa-body { grid-template-columns: 1fr; gap: 32px; }
  .sticky-cta-inner { flex-direction: column; gap: 8px; padding: 0 20px; }
}

/* ============================================================
   FOOTER
   ============================================================ */

.site-footer {
  background: #1a2533;
  border-top: none;
  margin-top: 64px;
}

.footer-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px;
}

.footer-top {
  display: flex;
  gap: 64px;
  padding: 56px 0 48px;
}

.footer-brand {
  flex-shrink: 0;
  width: 200px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: -20px;
}

.footer-logo {
  height: 72px;
  width: auto;
  object-fit: contain;
  align-self: flex-start;
}

.footer-claim {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 400;
  color: #ffffff;
  line-height: 1.3;
  max-width: 200px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Logos institucionales en negativo (Grupo DQ + Universidad CLEA) */
.footer-avales {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-top: 32px;
}

.footer-aval-logo {
  height: 64px;
  width: auto;
  opacity: 0.75;
  transition: opacity var(--transition);
}

.footer-avales a:hover .footer-aval-logo {
  opacity: 1;
}

.footer-cols {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  flex: 1;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col h4 {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  color: #ffffff;
  margin-bottom: 4px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.footer-col a {
  font-family: var(--font-text);
  font-size: 0.85rem;
  font-weight: 300;
  color: rgba(255,255,255,0.5);
  text-decoration: none;
  transition: color var(--transition);
}

.footer-col a:hover { color: #ffffff; text-decoration: underline; }

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0;
  font-family: var(--font-text);
  font-size: 0.78rem;
  font-weight: 300;
  color: rgba(255,255,255,0.35);
}

.footer-legal {
  display: flex;
  gap: 24px;
}

.footer-legal a {
  color: rgba(255,255,255,0.35);
  text-decoration: none;
  transition: color var(--transition);
}

.footer-legal a:hover { color: var(--color-accent); }

/* Footer ETE */
.footer-col--ete {
  display: flex;
  flex-direction: column;
  gap: 52px;
  justify-content: flex-end;
  padding-left: 50px;
}

.footer-ete-text {
  font-family: 'Cormorant Garamond', var(--font-serif);
  font-size: 1.15rem;
  font-weight: 300;
  color: #ffffff;
  line-height: 1.3;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.footer-col--ete a {
  align-self: center;
}

.footer-ete-logo {
  width: 100%;
  height: auto;
  max-width: 90px;
  object-fit: contain;
  opacity: 0.75;
  transition: opacity var(--transition);
}

.footer-ete-logo:hover { opacity: 1; }

/* Social icons dins la columna AulaSic del footer */
.footer-col-social {
  display: flex;
  gap: 12px;
  align-items: center;
  padding-top: 8px;
}

.footer-col-social a {
  color: rgba(255,255,255,0.45);
  transition: color var(--transition);
  display: flex;
  align-items: center;
}

.footer-col-social a:hover { color: #ffffff; }

.footer-col-social svg { display: block; }

/* Social icons al nav dropdown */
.nav-social {
  display: flex;
  gap: 4px;
  padding: 8px 16px 10px;
  border-top: 1px solid rgba(0,0,0,0.08);
  margin-top: 4px;
}

.nav-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  color: #000000;
  transition: color 0.15s;
}

.nav-social a:hover { color: var(--color-accent); }

.nav-social svg { display: block; }

@media (max-width: 800px) {
  .footer-top { flex-direction: column; gap: 32px; }
  .footer-cols { grid-template-columns: repeat(2, 1fr); }
  .footer-bottom { flex-direction: column; gap: 12px; text-align: center; }
  .footer-legal { flex-wrap: wrap; justify-content: center; gap: 14px; }
  .footer-col-social { justify-content: flex-start; }
}


/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 960px) {
  .programs-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 800px) {
  :root { --page-h: 20px; }
  .programs-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .logo-img { height: 72px; }
  .site-nav { gap: 20px; }
  .site-nav a { font-size: 0.82rem; }
  .chat-widget .chat-label { display: none; }
  .filters-bar { gap: 14px; }
  .filter-dropdowns { flex-wrap: wrap; justify-content: flex-end; }
}

@media (max-width: 600px) {
  .programs-grid { grid-template-columns: 1fr; gap: 12px; }
  .search-input:focus,
  .search-input:not(:placeholder-shown) { width: 160px; }
  .cta-banner--fixed {
    padding-top: 5px !important;
    padding-bottom: 5px !important;
  }
  .cta-banner--fixed .cta-banner-btn {
    font-size: 0.76rem;
    padding: 10px 21px;
  }
}

@media (max-width: 480px) {
  .site-nav { display: none; }
}

/* Intro de la página de docentes */
.docentes-intro {
  font-family: var(--font-serif);
  font-size: 1.45rem;
  line-height: 1.5;
  color: var(--color-text);
  max-width: 780px;
  margin: 6px 0 30px;
}
