/* =========================================================
   GRUPO ABAN — Design System Tokens
   Generado a partir del sistema de diseño en Figma
   ========================================================= */
:root {
  /* Color: Primary (Navy) */
  --primary-900: #0F172A;
  --primary-700: #1E293B;
  --primary-050: #EFF3FB;

  /* Color: Secondary (Blue) */
  --secondary-600: #2563EB;
  --secondary-700: #1D4ED8;
  --secondary-100: #DBE7FE;
  --secondary-050: #EAF0FF;

  /* Color: Tertiary (Orange) */
  --tertiary-500: #F97316;

  /* Color: Neutral (Slate) */
  --neutral-600: #64748B;
  --neutral-300: #CBD5E1;
  --neutral-200: #E2E8F0;
  --neutral-100: #F1F5F9;

  --white: #FFFFFF;
  --page-bg: #E7EEFC;

  /* Typography */
  --font-base: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Layout */
  --container-w: 1200px;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --shadow-card: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.08);
}

/* =========================================================
   RESET / BASE
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
/* Que el header fijo no tape el título al saltar a un ancla (#catalogo, #politicas...) */
section[id] { scroll-margin-top: 76px; }
body {
  margin: 0;
  font-family: var(--font-base);
  color: var(--primary-900);
  background: var(--page-bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: -0.01em; }
p { margin: 0; }
ul { list-style: none; margin: 0; padding: 0; }
:focus-visible { outline: 2px solid var(--secondary-600); outline-offset: 2px; }

.container {
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 0 24px;
}

/* =========================================================
   BUTTONS (del design system: Primary / Secondary / Inverted / Outlined)
   ========================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  font-family: var(--font-base);
  font-size: 15px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease, transform .1s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }

.btn-secondary {
  background: var(--secondary-600);
  color: var(--white);
}
.btn-secondary:hover { background: var(--secondary-700); }

.btn-primary {
  background: var(--primary-900);
  color: var(--white);
}
.btn-primary:hover { background: var(--primary-700); }

/* Outlined: borde azul, para usarse sobre fondo claro */
.btn-outlined {
  background: transparent;
  color: var(--secondary-600);
  border-color: var(--secondary-600);
}
.btn-outlined:hover { background: var(--secondary-050); }

/* Outlined-inverse: borde blanco, para usarse sobre fondo oscuro (header) */
.btn-outlined-inverse {
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,0.35);
}
.btn-outlined-inverse:hover { border-color: var(--white); background: rgba(255,255,255,0.06); }

.btn-lg { padding: 14px 28px; font-size: 16px; }
.btn-block { width: 100%; }

/* =========================================================
   HEADER
   ========================================================= */
.site-header {
  background: var(--primary-900);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
  gap: 24px;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 20px;
  font-weight: 800;
  color: var(--white);
  flex-shrink: 0;
}
/* El emblema tiene alas negras: va sobre su fondo claro original como placa */
.logo img {
  width: auto;
  height: 46px;
  border-radius: var(--radius-sm);
  transition: transform .3s var(--ease-out, ease);
}
.logo:hover img { transform: translateY(-1px) scale(1.03); }
.main-nav {
  display: flex;
  gap: 32px;
  margin: 0 auto;
}
.nav-link {
  position: relative;
  color: var(--neutral-300);
  font-size: 15px;
  font-weight: 500;
  padding: 8px 2px 10px;
  transition: color .15s ease;
}
/* Subrayado que se desliza desde el centro */
.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--secondary-600);
  border-radius: 2px;
  transform: scaleX(0);
  transition: transform .25s ease;
}
.nav-link:hover { color: var(--white); }
.nav-link:hover::after { transform: scaleX(0.6); }
.nav-link.active { color: var(--white); }
.nav-link.active::after { transform: scaleX(1); }
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  width: 22px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
}

/* =========================================================
   HERO
   ========================================================= */
.hero { background: var(--white); padding: 72px 0; }
.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}
.hero-copy h1 {
  font-size: 44px;
  line-height: 1.15;
  margin-bottom: 20px;
}
.hero-copy .lead {
  font-size: 17px;
  line-height: 1.6;
  color: var(--neutral-600);
  margin-bottom: 32px;
  max-width: 46ch;
}
.hero-media img {
  border-radius: var(--radius-md);
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  background: var(--neutral-100);
}

.divider { border: none; border-top: 1px solid var(--neutral-200); margin: 0; }

/* =========================================================
   FEATURES
   ========================================================= */
.features { background: var(--white); padding: 56px 0 72px; }
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.feature-card {
  background: var(--white);
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius-md);
  padding: 28px;
}
.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin-bottom: 16px;
  color: var(--secondary-600);
}
.feature-icon svg { width: 26px; height: 26px; }
.feature-card h3 { font-size: 18px; margin-bottom: 8px; }
.feature-card p { color: var(--neutral-600); font-size: 15px; line-height: 1.55; }

/* =========================================================
   CURSOS DESTACADOS
   ========================================================= */
.courses { padding: 72px 0; }
.section-title {
  text-align: center;
  font-size: 30px;
  margin-bottom: 40px;
}
.courses-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.course-card {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.course-media { position: relative; }
.course-media img {
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
  background: var(--neutral-100);
}
.badge {
  position: absolute;
  top: 12px;
  left: 12px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
}
.badge-blue { background: var(--secondary-600); color: var(--white); }
.course-body { display: flex; flex-direction: column; flex: 1; padding: 22px; }
.course-body .btn { margin-top: auto; }
.course-body h3 {
  font-size: 17px;
  text-transform: uppercase;
  margin-bottom: 10px;
  line-height: 1.3;
}
.course-body p {
  color: var(--neutral-600);
  font-size: 14.5px;
  line-height: 1.6;
  margin-bottom: 20px;
  min-height: 66px;
}

/* =========================================================
   CTA
   ========================================================= */
.cta { background: var(--secondary-050); padding: 72px 0; }
.cta-content { max-width: 640px; margin: 0 auto; text-align: center; }
.cta-content h2 { font-size: 28px; margin-bottom: 12px; }
.cta-content p { color: var(--neutral-600); font-size: 16px; margin-bottom: 28px; }

/* =========================================================
   FOOTER
   ========================================================= */
.site-footer { background: var(--primary-900); color: var(--neutral-300); padding: 56px 0 32px; }
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
}
.footer-brand p { margin-bottom: 8px; font-size: 14.5px; }
.footer-logo { color: var(--white); font-size: 19px; font-weight: 800; }
.footer-copy { color: var(--neutral-600); font-size: 13px; margin-top: 16px; }
.footer-col h4 { color: var(--white); font-size: 15px; margin-bottom: 14px; }
.footer-col a, .footer-icon-link {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--neutral-300);
  font-size: 14.5px;
  margin-bottom: 10px;
  transition: color .15s ease;
}
.footer-col a:hover, .footer-icon-link:hover { color: var(--white); }
.footer-icon-link svg { width: 16px; height: 16px; flex-shrink: 0; }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-media { order: -1; }
  .features-grid, .courses-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  .main-nav, .header-actions { display: none; }
  .nav-toggle { display: flex; }
  .hero-copy h1 { font-size: 32px; }
  .footer-grid { grid-template-columns: 1fr; }
  .logo { font-size: 18px; gap: 10px; }
  .logo img { height: 40px; }

  .main-nav.is-open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 76px;
    left: 0;
    right: 0;
    background: var(--primary-900);
    padding: 16px 24px 24px;
    gap: 16px;
    border-top: 1px solid var(--primary-700);
  }
}

/* =========================================================
   PAGE HERO (páginas internas: Agendar, Nosotros, Contacto)
   ========================================================= */
.page-hero {
  background: var(--primary-900);
  color: var(--white);
  padding: 64px 0;
}
.page-hero h1 { font-size: 34px; margin-bottom: 12px; max-width: 700px; }
.page-hero p { color: var(--neutral-300); font-size: 16px; max-width: 620px; line-height: 1.6; }

.section-subtitle {
  text-align: center;
  color: var(--neutral-600);
  max-width: 560px;
  margin: -20px auto 40px;
  font-size: 15px;
  line-height: 1.6;
}

/* =========================================================
   FORMULARIOS (Agendar Sesión / Contacto)
   ========================================================= */
.form-section { background: var(--white); padding: 64px 0; }
.form-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 40px;
  align-items: start;
}
.card-form {
  background: var(--white);
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius-md);
  padding: 32px;
  box-shadow: var(--shadow-card);
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.field { margin-bottom: 20px; }
.field label {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--primary-900);
  margin-bottom: 6px;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  font-family: var(--font-base);
  font-size: 15px;
  color: var(--primary-900);
  padding: 11px 14px;
  border: 1.5px solid var(--neutral-200);
  border-radius: var(--radius-sm);
  background: var(--white);
  transition: border-color .15s ease;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--secondary-600);
  outline: none;
}
.field textarea { resize: vertical; }

.form-status {
  margin: 14px 0 0;
  font-size: 14px;
  min-height: 20px;
}
.form-status.success { color: #15803D; }
.form-status.error { color: #DC2626; }

/* Campo trampa para robots: fuera de la vista, no lo ve el usuario */
.campo-trampa { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.side-info { display: flex; flex-direction: column; gap: 16px; }
.info-card {
  background: var(--secondary-050);
  border-radius: var(--radius-md);
  padding: 22px;
}
.info-card h3 { font-size: 16px; margin-bottom: 10px; }
.info-card p { color: var(--neutral-600); font-size: 14.5px; line-height: 1.6; }
.footer-icon-link.dark { color: var(--secondary-600); font-weight: 600; }
.footer-icon-link.dark:hover { color: var(--secondary-700); }
.steps-list { padding-left: 18px; margin: 0; color: var(--neutral-600); font-size: 14.5px; line-height: 1.7; }
.steps-list li { margin-bottom: 6px; }

.map-embed {
  margin-top: 32px;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.map-embed iframe { display: block; }

/* =========================================================
   NOSOTROS
   ========================================================= */
.about-grid-section { background: var(--white); padding: 64px 0; }
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}
.about-image { border-radius: var(--radius-md); width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.about-copy h2 { font-size: 26px; margin-bottom: 16px; }
.about-copy p { color: var(--neutral-600); font-size: 15.5px; line-height: 1.7; margin-bottom: 16px; }

.services { padding: 64px 0 72px; }
.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.service-card {
  background: var(--white);
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius-md);
  padding: 28px;
}
.service-card h3 { font-size: 18px; margin-bottom: 8px; }
.service-card p { color: var(--neutral-600); font-size: 14.5px; line-height: 1.6; }

.cta-buttons { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* =========================================================
   CATÁLOGO COMPLETO (index)
   ========================================================= */
.catalog { background: var(--white); padding: 72px 0; }
.catalog-block + .catalog-block { margin-top: 48px; }
.catalog-block-title {
  display: flex;
  align-items: baseline;
  gap: 12px;
  font-size: 20px;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--neutral-200);
}
.catalog-block-title span {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--secondary-600);
}
.catalog-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.catalog-card {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.catalog-card img {
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
  background: var(--neutral-100);
}
.catalog-card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 14px;
  padding: 16px;
}
.catalog-card h4 {
  flex: 1;
  font-size: 14.5px;
  line-height: 1.35;
  text-transform: uppercase;
}
.btn-sm { padding: 8px 14px; font-size: 14px; }

/* =========================================================
   GALERÍA (nosotros)
   ========================================================= */
.gallery { background: var(--white); padding: 64px 0 72px; }
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.gallery-grid figure { margin: 0; }
.gallery-grid img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: var(--radius-md);
  background: var(--neutral-100);
}
.gallery-grid figcaption {
  margin-top: 8px;
  font-size: 13.5px;
  color: var(--neutral-600);
}

/* =========================================================
   POLÍTICAS DE CURSO (agendar sesión)
   ========================================================= */
.policies { padding: 64px 0 72px; }
.policies-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.policies-grid .service-card .btn { margin-top: 18px; }
.policy-wide { grid-column: 1 / -1; }
.policy-table {
  width: 100%;
  margin-top: 16px;
  border-collapse: collapse;
  font-size: 14.5px;
}
.policy-table th,
.policy-table td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--neutral-200);
}
.policy-table th {
  background: var(--secondary-050);
  font-size: 13.5px;
  font-weight: 600;
}
.policy-table td { color: var(--neutral-600); }
.policy-table td:last-child { font-weight: 700; color: var(--primary-900); white-space: nowrap; }
.policy-note { margin-top: 12px; font-size: 13px; color: var(--neutral-600); }

/* =========================================================
   FICHA DE CURSO (pop-up de cursos destacados)
   ========================================================= */
body:has(.course-modal[open]) { overflow: hidden; }
.course-modal {
  width: min(980px, calc(100% - 32px));
  max-height: calc(100vh - 48px);
  padding: 0;
  border: none;
  border-radius: var(--radius-lg);
  background: var(--white);
  color: var(--primary-900);
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.35);
  overflow: auto;
}
.course-modal::backdrop { background: rgba(15, 23, 42, 0.65); backdrop-filter: blur(3px); }
.course-modal[open] { animation: modal-in .2s ease-out; }
@keyframes modal-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

.modal-hero { position: relative; height: 210px; }
.modal-hero img { width: 100%; height: 100%; object-fit: cover; }
.modal-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15, 23, 42, 0.95) 10%, rgba(15, 23, 42, 0.25));
}
.modal-hero-copy { position: absolute; left: 32px; right: 80px; bottom: 24px; z-index: 1; }
.modal-hero-copy .badge { position: static; display: inline-block; margin-bottom: 10px; }
.modal-hero-copy h2 { color: var(--white); font-size: 28px; line-height: 1.2; }
.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  color: var(--white);
  cursor: pointer;
  transition: background-color .15s ease;
}
.modal-close:hover { background: rgba(255, 255, 255, 0.3); }
.modal-close svg { width: 20px; height: 20px; }

.modal-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: 32px;
  padding: 28px 32px;
}
.modal-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--secondary-600);
  margin-bottom: 10px;
}
.modal-body > div > .modal-label + * { margin-bottom: 24px; }
.modal-desc { color: var(--neutral-600); font-size: 15.5px; line-height: 1.65; }

.topic-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: topic;
}
.topic-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--neutral-100);
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.35;
}
.topic-list li::before {
  counter-increment: topic;
  content: counter(topic);
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--secondary-600);
  color: var(--white);
  font-size: 12px;
}

.modal-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.modal-fact {
  display: flex;
  gap: 10px;
  padding: 14px;
  background: var(--secondary-050);
  border-radius: var(--radius-md);
}
.modal-fact svg { width: 22px; height: 22px; flex-shrink: 0; color: var(--secondary-600); }
.modal-fact strong { display: block; font-size: 13.5px; margin-bottom: 2px; }
.modal-fact span { font-size: 13px; color: var(--neutral-600); line-height: 1.45; }

.modal-temario { margin: 0; }
.modal-temario a { display: block; }
.modal-temario img {
  width: 100%;
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius-md);
  transition: box-shadow .15s ease;
}
.modal-temario a:hover img { box-shadow: 0 8px 24px rgba(15, 23, 42, 0.15); }
.modal-temario figcaption { margin-top: 8px; font-size: 13px; color: var(--neutral-600); }
.modal-temario figcaption a { display: inline; color: var(--secondary-600); font-weight: 600; }

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 20px 32px;
  border-top: 1px solid var(--neutral-200);
  background: var(--secondary-050);
}
.modal-footer p { font-size: 15px; font-weight: 600; }

/* =========================================================
   RESPONSIVE (adiciones)
   ========================================================= */
@media (max-width: 760px) {
  .modal-body { grid-template-columns: minmax(0, 1fr); padding: 24px 20px; }
  .modal-hero { height: 170px; }
  .modal-hero-copy { left: 20px; right: 64px; bottom: 18px; }
  .modal-hero-copy h2 { font-size: 22px; }
  .modal-footer { padding: 18px 20px; }
  .modal-footer .btn { width: 100%; }
}
@media (max-width: 520px) {
  .topic-list, .modal-facts { grid-template-columns: 1fr; }
}
@media (max-width: 1100px) {
  .catalog-grid { grid-template-columns: repeat(3, 1fr); }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .form-grid { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; }
  .services-grid { grid-template-columns: 1fr; }
  .catalog-grid, .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .policies-grid { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .catalog-grid, .gallery-grid { grid-template-columns: 1fr; }
}

/* =========================================================
   ANIMACIONES
   Sutiles a propósito: duraciones cortas, desplazamientos
   pequeños y una sola curva de easing en todo el sitio.
   ========================================================= */
:root {
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

/* --- Transición entre páginas (View Transitions API) ---
   Navegadores sin soporte simplemente navegan sin animación. */
@view-transition { navigation: auto; }
.site-header { view-transition-name: site-header; }
::view-transition-old(root) { animation: page-out .18s ease-in both; }
::view-transition-new(root) { animation: page-in .38s var(--ease-out) both; }
@keyframes page-out { to { opacity: 0; } }
@keyframes page-in { from { opacity: 0; transform: translateY(10px); } }

/* --- Entrada del hero al cargar --- */
@keyframes slide-in-left  { from { opacity: 0; transform: translateX(-28px); } }
@keyframes slide-in-right { from { opacity: 0; transform: translateX(28px); } }
@keyframes slide-in-up    { from { opacity: 0; transform: translateY(18px); } }
.hero-copy  { animation: slide-in-left .8s var(--ease-out) both; }
.hero-media { animation: slide-in-right .8s var(--ease-out) .12s both; }
.page-hero .container > * { animation: slide-in-up .7s var(--ease-out) both; }
.page-hero .container > p { animation-delay: .1s; }

/* --- Aparición al hacer scroll ---
   app.js agrega .reveal a los bloques y .is-visible al entrar
   en pantalla. Sin JS, todo se muestra normal. */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .7s var(--ease-out), transform .7s var(--ease-out);
  transition-delay: var(--reveal-delay, 0s);
}
.reveal.is-visible { opacity: 1; transform: none; }

/* --- Microinteracciones en tarjetas --- */
.feature-card, .service-card, .catalog-card, .course-card {
  transition: transform .3s var(--ease-out), box-shadow .3s var(--ease-out), border-color .3s ease;
}
.feature-card:hover, .service-card:hover, .catalog-card:hover {
  transform: translateY(-4px);
  border-color: var(--secondary-100);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}
.course-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.12);
}
/* Mientras la tarjeta está revelándose, su transición de entrada manda */
.reveal.feature-card, .reveal.service-card, .reveal.catalog-card, .reveal.course-card {
  transition: opacity .7s var(--ease-out), transform .7s var(--ease-out), box-shadow .3s var(--ease-out), border-color .3s ease;
}
.reveal.is-visible.feature-card:hover, .reveal.is-visible.service-card:hover,
.reveal.is-visible.catalog-card:hover, .reveal.is-visible.course-card:hover {
  transform: translateY(-4px);
  transition-delay: 0s;
}

/* Zoom lento de la imagen dentro de la tarjeta */
.course-media { overflow: hidden; }
.course-media img, .catalog-card img { transition: transform .6s var(--ease-out); }
.course-card:hover .course-media img,
.catalog-card:hover img { transform: scale(1.05); }
.gallery-grid img { transition: transform .4s var(--ease-out), box-shadow .4s var(--ease-out); }
.gallery-grid figure:hover img { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(15, 23, 42, 0.14); }
.gallery-grid figcaption { transition: color .2s ease; }
.gallery-grid figure:hover figcaption { color: var(--primary-900); }

/* Botones: leve elevación del CTA principal */
.btn-secondary { transition: background-color .15s ease, transform .2s var(--ease-out), box-shadow .2s ease; }
.btn-secondary:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(37, 99, 235, 0.28); }
.btn-secondary:active { transform: translateY(1px); box-shadow: none; }

/* Íconos de servicios / features: pequeño rebote al hover */
.feature-icon { transition: transform .3s var(--ease-out); }
.feature-card:hover .feature-icon,
.service-card:hover .feature-icon { transform: translateY(-2px) scale(1.08); }

/* --- Menú móvil: se despliega deslizándose --- */
@keyframes menu-down { from { opacity: 0; transform: translateY(-8px); } }
.main-nav.is-open { animation: menu-down .25s var(--ease-out); }
.nav-toggle span { transition: transform .25s var(--ease-out), opacity .2s ease; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* --- Ficha de curso: entrada escalonada del contenido --- */
.course-modal::backdrop { animation: fade-in .25s ease both; }
@keyframes fade-in { from { opacity: 0; } }
.course-modal[open] .modal-body > *,
.course-modal[open] .modal-footer { animation: slide-in-up .5s var(--ease-out) both; }
.course-modal[open] .modal-body > :nth-child(2) { animation-delay: .08s; }
.course-modal[open] .modal-footer { animation-delay: .14s; }
.course-modal.is-closing { animation: modal-out .18s ease-in both; }
.course-modal.is-closing::backdrop { animation: fade-out .18s ease-in both; }
@keyframes modal-out { to { opacity: 0; transform: translateY(8px) scale(.98); } }
@keyframes fade-out { to { opacity: 0; } }

/* --- Formularios: foco con halo suave --- */
.field input, .field select, .field textarea { transition: border-color .15s ease, box-shadow .2s ease; }
.field input:focus, .field select:focus, .field textarea:focus { box-shadow: 0 0 0 4px var(--secondary-050); }
.form-status.success, .form-status.error { animation: slide-in-up .4s var(--ease-out); }

/* --- Accesibilidad: sin movimiento si el usuario lo pide --- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after, ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) {
    animation-duration: .01ms !important;
    animation-delay: 0s !important;
    transition-duration: .01ms !important;
    transition-delay: 0s !important;
  }
  .reveal { opacity: 1; transform: none; }
}
@media (max-width: 600px) {
  .form-row { grid-template-columns: 1fr; }
  .page-hero h1 { font-size: 26px; }
}
