/* ═══════════════════════════════════════════════════════════════
   ALLÔ SERVEIS — Hoja de estilos principal
   Paleta: #2EBCC4 (turquesa) · #3A3A3A (gris) · #fff · #111
═══════════════════════════════════════════════════════════════ */

/* ─── RESET & BASE ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Montserrat', sans-serif;
  font-weight: 400;
  color: #3A3A3A;
  background-color: #ffffff;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a  { text-decoration: none; color: inherit; }
ul { list-style: none; }
address { font-style: normal; }

/* ─── TOKENS ────────────────────────────────────────────────── */
:root {
  --teal:       #2EBCC4;
  --teal-dark:  #229299;
  --teal-light: #e8f8f9;
  --gray:       #3A3A3A;
  --gray-mid:   #6b6b6b;
  --gray-light: #f5f5f3;
  --black:      #111111;
  --white:      #ffffff;

  --ff-title: 'Playfair Display', serif;
  --ff-body:  'Montserrat', sans-serif;

  --radius-sm:  6px;
  --radius-md:  12px;
  --radius-lg:  20px;

  --shadow-sm: 0 2px 8px rgba(0,0,0,.06);
  --shadow-md: 0 8px 32px rgba(0,0,0,.09);
  --shadow-lg: 0 20px 60px rgba(0,0,0,.10);

  --transition: 0.28s ease;
  --section-gap: 96px;
}

/* ─── CONTAINER ─────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: 1140px;
  margin-inline: auto;
  padding-inline: 24px;
}

/* ─── TYPOGRAPHY ────────────────────────────────────────────── */
h1, h2, h3, h4 { font-family: var(--ff-title); line-height: 1.2; color: var(--black); }
h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); font-weight: 700; }
h2 { font-size: clamp(1.7rem, 3.5vw, 2.4rem); font-weight: 600; }
h3 { font-size: 1.15rem; font-weight: 600; }
p  { color: var(--gray-mid); }

/* ─── UTILITY ───────────────────────────────────────────────── */
.mt-md { margin-top: 28px; display: inline-block; }
.bg-light { background-color: var(--gray-light); }

/* ─── BUTTONS ───────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 28px;
  border-radius: var(--radius-sm);
  font-family: var(--ff-body);
  font-size: .875rem;
  font-weight: 600;
  letter-spacing: .04em;
  transition: all var(--transition);
  cursor: pointer;
  border: 2px solid transparent;
  white-space: nowrap;
}

.btn-primary {
  background-color: var(--teal);
  color: var(--white);
  border-color: var(--teal);
}
.btn-primary:hover {
  background-color: var(--teal-dark);
  border-color: var(--teal-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(46,188,196,.35);
}

.btn-outline {
  background-color: transparent;
  color: var(--black);
  border-color: var(--gray);
}
.btn-outline:hover {
  border-color: var(--teal);
  color: var(--teal);
  transform: translateY(-2px);
}

.btn-white {
  background-color: var(--white);
  color: var(--black);
}
.btn-white:hover {
  background-color: var(--teal);
  color: var(--white);
  transform: translateY(-2px);
}

.btn-outline-white {
  background-color: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,.6);
}
.btn-outline-white:hover {
  border-color: var(--white);
  background-color: rgba(255,255,255,.1);
  transform: translateY(-2px);
}

/* ═══════════════════════════════════════════════════════════════
   HEADER
═══════════════════════════════════════════════════════════════ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: rgba(255,255,255,.96);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(0,0,0,.07);
  transition: box-shadow var(--transition), background-color .35s ease, border-color .35s ease;
}
.site-header.scrolled {
  box-shadow: var(--shadow-md);
  background-color: rgba(255,255,255,.99);
  border-bottom-color: rgba(0,0,0,.1);
}

.service-news-bar {
  background: linear-gradient(90deg, #0f151b 0%, #16212b 45%, #0f151b 100%);
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.service-news-inner {
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  overflow: hidden;
}

.service-news-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 6px rgba(46,188,196,.12);
  flex-shrink: 0;
}

.service-news-text {
  color: #e6f4f6;
  font-size: .76rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  border-right: 2px solid rgba(46,188,196,.9);
  width: 0;
  animation: typewriter 4.1s steps(56, end) .3s forwards, caret .8s step-end infinite;
}

.service-news-text.typewriter-restart {
  animation: none;
}

@keyframes typewriter {
  from { width: 0; }
  to { width: min(92vw, 720px); }
}

@keyframes caret {
  0%, 100% { border-right-color: rgba(46,188,196,.9); }
  50%      { border-right-color: transparent; }
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 76px;
}

.logo-link { flex-shrink: 0; }
.logo { height: 48px; width: auto; object-fit: contain; }

/* Nav */
.main-nav { flex: 1; }
.nav-list {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
}

.nav-link {
  padding: 8px 14px;
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--gray);
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
  white-space: nowrap;
}
.nav-link:hover,
.nav-link.active { color: var(--teal); background-color: var(--teal-light); }

.nav-link-cta {
  background-color: var(--teal);
  color: var(--white);
  border-radius: 999px;
  padding-inline: 18px;
  box-shadow: 0 8px 18px rgba(14, 163, 163, .25);
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
}
.nav-link-cta:hover,
.nav-link-cta.active {
  color: var(--white);
  background-color: #0b8f8f;
  transform: translateY(-1px);
  box-shadow: 0 12px 22px rgba(14, 163, 163, .3);
}

/* Dropdown navigation */
.nav-item-dropdown { position: relative; }
.nav-link-dropdown-toggle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.nav-link-dropdown-toggle::after {
  content: '';
  display: inline-block;
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  margin-top: 1px;
  flex-shrink: 0;
  transition: transform var(--transition);
}
.nav-item-dropdown:hover .nav-link-dropdown-toggle::after,
.nav-item-dropdown:focus-within .nav-link-dropdown-toggle::after {
  transform: rotate(180deg);
}
.nav-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%) translateY(-6px);
  min-width: 230px;
  background: var(--white);
  border-radius: var(--radius-md);
  box-shadow: 0 8px 32px rgba(0,0,0,.12);
  border: 1px solid rgba(0,0,0,.08);
  padding: 6px;
  list-style: none;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease, visibility .18s;
  z-index: 1001;
}
.nav-item-dropdown:hover .nav-dropdown,
.nav-item-dropdown:focus-within .nav-dropdown {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}
.nav-dropdown-link {
  display: block;
  padding: 9px 14px;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .03em;
  color: var(--gray);
  border-radius: var(--radius-sm);
  white-space: nowrap;
  transition: color var(--transition), background var(--transition);
}
.nav-dropdown-link:hover,
.nav-dropdown-link.active {
  color: var(--teal);
  background-color: var(--teal-light);
}

/* Header actions */
.header-actions { display: flex; align-items: center; gap: 16px; flex-shrink: 0; }

/* Language switcher */
.lang-switcher { display: flex; align-items: center; gap: 4px; }
.lang-btn {
  background: none;
  border: none;
  font-family: var(--ff-body);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .06em;
  color: var(--gray-mid);
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 4px;
  transition: color var(--transition);
}
.lang-btn.active,
.lang-btn:hover { color: var(--teal); }
.lang-sep { color: #ccc; font-size: .75rem; }

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--gray);
  border-radius: 2px;
  transition: all var(--transition);
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ═══════════════════════════════════════════════════════════════
   HERO
═══════════════════════════════════════════════════════════════ */
.hero {
  padding-block: 100px 80px;
  overflow: hidden;
  position: relative;
}

.home-page {
  background-color: #ffffff;
}

/* Dark sections: Secretaria Virtual */
.home-page #secretaria-virtual h2,
.home-page #secretaria-virtual h3,
.home-page #secretaria-virtual .section-title,
.home-page #secretaria-virtual .card-title {
  color: #f2f5f8;
}

.home-page #secretaria-virtual p,
.home-page #secretaria-virtual .section-body,
.home-page #secretaria-virtual .section-subtitle,
.home-page #secretaria-virtual .card-text {
  color: rgba(226, 235, 242, .8);
}

.home-page .hero {
  background: radial-gradient(72% 90% at 80% 8%, rgba(46,188,196,.2) 0%, rgba(46,188,196,0) 52%),
              linear-gradient(180deg, #020304 0%, #070a0f 58%, #0f151b 100%);
}

.home-page .hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 140px;
  background: linear-gradient(180deg, rgba(0,0,0,.35) 0%, rgba(0,0,0,0) 100%);
  pointer-events: none;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 48px;
}

.hero-eyebrow {
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 16px;
}

.hero-title {
  color: var(--black);
  margin-bottom: 20px;
}

.home-page .hero-title { color: #ffffff; }

.hero-title em {
  font-style: italic;
  color: var(--teal);
}

.hero-subtitle {
  font-size: .95rem;
  font-weight: 500;
  color: var(--gray-mid);
  margin-bottom: 14px;
  letter-spacing: .02em;
}

.hero-subtitle-services {
  font-size: .84rem;
  font-weight: 600;
  letter-spacing: .05em;
  margin-bottom: 36px;
}

.home-page .hero-eyebrow { color: #8ee0e5; }
.home-page .hero-subtitle { color: rgba(235,241,247,.82); }
.home-page .hero .btn-outline {
  border-color: rgba(255,255,255,.85);
  color: #ffffff;
}
.home-page .hero .btn-outline:hover {
  border-color: #ffffff;
  color: #ffffff;
  background-color: rgba(255,255,255,.15);
}

.home-page .hero .btn-primary {
  box-shadow: 0 8px 22px rgba(46,188,196,.35);
}

.home-page .hero .btn-primary:hover {
  box-shadow: 0 10px 26px rgba(46,188,196,.45);
}

.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }

/* Hero visual */
.hero-visual {
  position: relative;
  display: flex;
  justify-content: flex-end;
  align-items: stretch;
}

/* ─── HERO IMAGE (desktop only — oculto en tablet/mobile via media query) ── */
.hero-image-wrap {
  position: relative;
  width: 100%;
  height: 460px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  align-self: center;
}

.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  display: block;
}

/* Overlay: funde el borde izquierdo con el fondo negro del hero,
   añade oscurecimiento sutil superior e inferior para integración fina */
.hero-img-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to right,  #070a0f 0%,  rgba(7,10,15,.78) 22%,  rgba(7,10,15,.18) 55%,  transparent 100%),
    linear-gradient(to top,    rgba(7,10,15,.55) 0%,  transparent 42%),
    linear-gradient(to bottom, rgba(7,10,15,.35) 0%,  transparent 28%);
}

.marketing-section {
  background: linear-gradient(180deg, #101821 0%, #0f151b 100%);
  border-top: 1px solid rgba(255,255,255,.05);
  border-bottom: 1px solid rgba(255,255,255,.05);
}

.marketing-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, .8fr);
  gap: 32px;
  align-items: center;
}

.marketing-copy {
  max-width: 680px;
}

.marketing-list {
  margin-top: 28px;
}

.marketing-panel {
  position: relative;
  background: rgba(8, 14, 20, .78);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: var(--radius-md);
  padding: 32px;
  box-shadow: 0 20px 50px rgba(0,0,0,.32);
}

.marketing-panel-tag {
  display: inline-block;
  font-size: .66rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #0d2526;
  background-color: #8ee0e5;
  border-radius: 999px;
  padding: 4px 10px;
  margin-bottom: 12px;
}

.marketing-panel-title {
  font-size: 1.45rem;
  color: #ffffff;
  margin-bottom: 10px;
}

.marketing-panel-text {
  font-size: .9rem;
  color: rgba(237,243,248,.78);
  margin-bottom: 20px;
}

.marketing-cards .card {
  background-color: #131a22;
  border: 1px solid rgba(255,255,255,.1);
}

.marketing-cards .card:hover {
  border-color: rgba(46,188,196,.65);
}

.marketing-cards .card-title {
  color: var(--teal);
}

.marketing-cards .card-text {
  color: rgba(226, 235, 242, .88);
}

/* Section backgrounds: alternating light/dark */
.home-page #quienes-somos {
  background-color: #0f151b;
}

.home-page #secretaria-virtual {
  background-color: #0f151b;
}

.home-page #formacion-consultoria {
  background-color: #ffffff;
}

.home-page #servicios-ia {
  background-color: var(--gray-light);
}

.home-page #quienes-somos h2,
.home-page #quienes-somos .section-title {
  color: #f2f5f8;
}

.home-page #quienes-somos p,
.home-page #quienes-somos .section-body {
  color: rgba(226, 235, 242, .82);
}

.home-page #quienes-somos .section-tag {
  color: #aef1f4;
  background-color: rgba(46,188,196,.15);
}

.home-page #quienes-somos .about-accent {
  border-color: rgba(46,188,196,.42);
}

/* Section tag, cards and list markers in dark sections */
.home-page #secretaria-virtual .section-tag {
  color: #aef1f4;
  background-color: rgba(46,188,196,.15);
}

.home-page #secretaria-virtual .card {
  background-color: #131a22;
  border-color: rgba(255,255,255,.08);
}

.home-page #secretaria-virtual .card:hover {
  border-color: rgba(46,188,196,.6);
}

.home-page #secretaria-virtual .feature-list li::before {
  box-shadow: 0 0 0 2px rgba(8,12,16,.55);
}

.home-page .stats-bar {
  background-color: #ffffff;
}

.home-page .stat-number {
  color: #111111;
}

.home-page .stat-label {
  color: rgba(17,17,17,.72);
}

.home-page .stat-divider {
  background-color: rgba(0,0,0,.14);
}

.home-page .marketing-section {
  background: linear-gradient(180deg, #101821 0%, #0f151b 100%);
  border-top: 1px solid rgba(255,255,255,.05);
  border-bottom: 1px solid rgba(255,255,255,.05);
}

.home-page #marketing .section-tag {
  color: #aef1f4;
  background-color: rgba(46,188,196,.15);
}

.home-page #marketing .section-title {
  color: #f2f5f8;
}

.home-page #marketing .section-subtitle {
  color: rgba(226, 235, 242, .82);
}

/* ═══════════════════════════════════════════════════════════════
   STATS BAR
═══════════════════════════════════════════════════════════════ */
.stats-bar {
  background-color: var(--black);
  padding-block: 40px;
}

.stats-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  flex: 1;
  padding-inline: 24px;
}

.stat-number {
  font-family: var(--ff-title);
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--teal);
  line-height: 1;
  margin-bottom: 6px;
}

.stat-label {
  font-size: .8rem;
  font-weight: 500;
  letter-spacing: .04em;
  color: rgba(255,255,255,.65);
  text-transform: uppercase;
}

.stat-divider {
  width: 1px;
  height: 48px;
  background-color: rgba(255,255,255,.15);
  flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════════════════
   SECTIONS – SHARED
═══════════════════════════════════════════════════════════════ */
.section { padding-block: var(--section-gap); }

.section-tag {
  display: inline-block;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--teal);
  background-color: var(--teal-light);
  padding: 5px 12px;
  border-radius: 100px;
  margin-bottom: 16px;
}

.section-title {
  margin-bottom: 20px;
}

.section-title.centered { text-align: center; }

.section-body {
  color: var(--gray-mid);
  line-height: 1.8;
  margin-bottom: 16px;
  font-size: .95rem;
}

/* Section grid layout */
.section-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 72px;
}
.section-grid.reverse { direction: rtl; }
.section-grid.reverse > * { direction: ltr; }

/* Section header (centered) */
.section-header {
  text-align: center;
  max-width: 680px;
  margin-inline: auto;
  margin-bottom: 64px;
}
.section-subtitle {
  font-size: .95rem;
  color: var(--gray-mid);
  line-height: 1.8;
}

/* Feature list */
.feature-list {
  margin-block: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.feature-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: .9rem;
  font-weight: 500;
  color: var(--gray);
}
.feature-list li::before {
  content: '';
  display: inline-block;
  width: 20px;
  height: 20px;
  background-color: var(--teal);
  border-radius: 50%;
  flex-shrink: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 20 20' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M5 10l3.5 3.5L15 7' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.section-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* ─── ABOUT VISUAL ────────────────────────────────────────── */
.about-visual { position: relative; display: flex; justify-content: center; align-items: center; min-height: 320px; }

.about-card {
  width: 220px;
  height: 220px;
  background-color: var(--teal);
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 1;
  box-shadow: var(--shadow-lg);
}

.about-year {
  font-family: var(--ff-title);
  font-size: 3rem;
  font-weight: 700;
  color: var(--white);
  line-height: 1;
}

.about-year-label {
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(255,255,255,.75);
  margin-top: 6px;
}

.about-accent {
  position: absolute;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  border: 2px dashed rgba(46,188,196,.3);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

/* ─── CARDS GRID (Secretaria Virtual) ─────────────────────── */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}

.card {
  background-color: var(--white);
  border-radius: var(--radius-md);
  padding: 32px 28px;
  border: 1px solid rgba(0,0,0,.07);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: var(--teal);
}

.card-icon {
  width: 48px;
  height: 48px;
  color: var(--teal);
  margin-bottom: 20px;
}
.card-icon svg { width: 100%; height: 100%; }

.card-title { margin-bottom: 10px; }
.card-text { font-size: .88rem; line-height: 1.7; }

/* ─── TRAINING VISUAL ─────────────────────────────────────── */
.training-visual {
  position: relative;
  display: flex;
  align-items: stretch;
}

.training-image-wrap {
  position: relative;
  width: 100%;
  height: 460px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  align-self: center;
}

.training-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  display: block;
}

/* Overlay: funde el borde derecho con el fondo oscuro de la sección
   (visual está a la izquierda, texto a la derecha) */
.training-img-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to left,  #11181f 0%,  rgba(17,24,31,.72) 20%,  rgba(17,24,31,.12) 52%,  transparent 100%),
    linear-gradient(to top,   rgba(17,24,31,.50) 0%,  transparent 40%),
    linear-gradient(to bottom, rgba(17,24,31,.30) 0%,  transparent 28%);
}

/* ─── TRAINING PROGRAMS GRID ───────────────────────────── */
.training-layout-top {
  margin-bottom: 28px;
}

.training-programs-intro {
  margin-bottom: 26px;
  max-width: 920px;
}

.training-programs-heading {
  font-family: var(--ff-title);
  font-size: clamp(1.2rem, 2vw, 1.45rem);
  line-height: 1.3;
  margin-bottom: 8px;
  color: var(--black);
}

.training-programs-description {
  font-size: .9rem;
  line-height: 1.72;
  color: var(--gray-mid);
  margin: 0;
}

.training-programs-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.training-program-card {
  background-color: #ffffff;
  border: 1px solid rgba(0,0,0,.08);
  border-radius: var(--radius-md);
  padding: 18px 18px 16px;
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}

.training-program-card:hover {
  border-color: var(--teal);
  transform: translateY(-3px);
  box-shadow: var(--shadow-sm);
}

.training-program-title {
  font-size: .95rem;
  line-height: 1.45;
  margin-bottom: 8px;
  color: var(--black);
}

.training-program-text {
  font-size: .84rem;
  line-height: 1.68;
  margin: 0;
  color: var(--gray-mid);
}

.training-custom-block {
  margin-top: 34px;
  padding: 26px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(46,188,196,.25);
  background: linear-gradient(180deg, #eef9fa 0%, #ffffff 100%);
}

.training-custom-title {
  margin-bottom: 10px;
  color: var(--black);
}

.training-custom-text {
  margin: 0 0 18px;
  max-width: 900px;
  color: var(--gray-mid);
  line-height: 1.72;
}

.training-custom-cta {
  display: inline-flex;
}

/* ─── IA GRID ─────────────────────────────────────────────── */
.ia-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.ia-card {
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid rgba(0,0,0,.08);
  transition: transform var(--transition), box-shadow var(--transition);
}
.ia-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }

.ia-card-teal { background-color: var(--teal); }
.ia-card-light { background-color: var(--white); }

.ia-card-inner { padding: 32px; height: 100%; }

.ia-card-teal .ia-card-tag { background-color: rgba(255,255,255,.2); color: var(--white); }
.ia-card-teal .ia-card-title { color: var(--white); }
.ia-card-teal .ia-card-text { color: rgba(255,255,255,.82); }

.ia-card-tag {
  display: inline-block;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  background-color: var(--teal-light);
  color: var(--teal);
  padding: 4px 10px;
  border-radius: 100px;
  margin-bottom: 12px;
}

.ia-card-title { margin-bottom: 10px; }
.ia-card-text { font-size: .88rem; line-height: 1.7; }

.ia-card-link {
  display: block;
  cursor: pointer;
}

@media (hover: hover) and (pointer: fine) {
  .ia-card-link:hover {
    transform: translateY(-7px);
    box-shadow: 0 14px 34px rgba(0,0,0,.14);
  }
}

.ia-card-link:active {
  transform: translateY(-1px);
}

.ia-card-link.ia-card-teal:active {
  background-color: var(--white);
  border-color: rgba(0,0,0,.12);
}

.ia-card-link.ia-card-teal:active .ia-card-tag {
  background-color: var(--teal-light);
  color: var(--teal);
}

.ia-card-link.ia-card-teal:active .ia-card-title,
.ia-card-link.ia-card-teal:active .ia-card-text {
  color: var(--black);
}

.ia-card-link.ia-card-light:active {
  background-color: var(--teal);
  border-color: var(--teal);
}

.ia-card-link.ia-card-light:active .ia-card-tag {
  background-color: rgba(255,255,255,.2);
  color: var(--white);
}

.ia-card-link.ia-card-light:active .ia-card-title,
.ia-card-link.ia-card-light:active .ia-card-text {
  color: var(--white);
}

/* Tablet and desktop: alternate IA card colors between columns */
@media (min-width: 769px) {
  #servicios-ia .ia-grid .ia-card:nth-child(3) { order: 4; }
  #servicios-ia .ia-grid .ia-card:nth-child(4) { order: 3; }
}

/* Mobile: restore correct teal/light alternation (classes are set for desktop layout) */
@media (max-width: 768px) {
  /* Concertación → teal en mobile */
  #ia-concertacion {
    background-color: var(--teal);
    border-color: transparent;
  }
  #ia-concertacion .ia-card-tag { background-color: rgba(255,255,255,.2); color: var(--white); }
  #ia-concertacion .ia-card-title { color: var(--white); }
  #ia-concertacion .ia-card-text { color: rgba(255,255,255,.82); }
  /* Campañas → blanco en mobile */
  #ia-campanas-comerciales {
    background-color: var(--white);
    border-color: rgba(0,0,0,.08);
  }
  #ia-campanas-comerciales .ia-card-tag { background-color: var(--teal-light); color: var(--teal); }
  #ia-campanas-comerciales .ia-card-title { color: var(--dark); }
  #ia-campanas-comerciales .ia-card-text { color: var(--gray); }
  /* Asistentes → teal en mobile (3º en DOM) */
  #ia-asistentes-chatbots {
    background-color: var(--teal);
    border-color: transparent;
  }
  #ia-asistentes-chatbots .ia-card-tag { background-color: rgba(255,255,255,.2); color: var(--white); }
  #ia-asistentes-chatbots .ia-card-title { color: var(--white); }
  #ia-asistentes-chatbots .ia-card-text { color: rgba(255,255,255,.82); }
  /* Formación → blanco en mobile (4º en DOM) */
  #ia-formacion-practica {
    background-color: var(--white);
    border-color: rgba(0,0,0,.08);
  }
  #ia-formacion-practica .ia-card-tag { background-color: var(--teal-light); color: var(--teal); }
  #ia-formacion-practica .ia-card-title { color: var(--dark); }
  #ia-formacion-practica .ia-card-text { color: var(--gray); }
}

/* ═══════════════════════════════════════════════════════════════
   CTA SECTION
═══════════════════════════════════════════════════════════════ */
.section-cta {
  background-color: var(--black);
  padding-block: 80px;
}

.cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
}

.cta-title {
  font-family: var(--ff-title);
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  color: var(--white);
  margin-bottom: 10px;
}

.cta-subtitle { color: rgba(255,255,255,.6); font-size: .95rem; }

.cta-actions { display: flex; flex-wrap: wrap; gap: 12px; flex-shrink: 0; }

/* ═══════════════════════════════════════════════════════════════
   FOOTER
═══════════════════════════════════════════════════════════════ */
.site-footer {
  background-color: #ffffff;
  color: #2f3740;
  padding-top: 72px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1.5fr;
  gap: 48px;
  padding-bottom: 56px;
  border-bottom: 1px solid rgba(0,0,0,.08);
}

/* Brand col */
.footer-brand { display: flex; flex-direction: column; gap: 20px; }
.footer-logo { height: 56px; width: auto; object-fit: contain; }
.footer-tagline { font-size: .85rem; color: #5f6873; line-height: 1.7; max-width: 280px; }

.footer-social {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #5f6873;
  transition: color var(--transition);
}
.footer-social:hover { color: var(--teal); }
.social-icon { width: 20px; height: 20px; }

/* Nav cols */
.footer-heading {
  font-family: var(--ff-body);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: #76818d;
  margin-bottom: 20px;
}

.footer-list { display: flex; flex-direction: column; gap: 12px; }
.footer-link {
  font-size: .88rem;
  color: #44505d;
  transition: color var(--transition);
}
.footer-link:hover { color: var(--teal); }

/* Contact col */
.footer-address {
  font-size: .88rem;
  color: #55616d;
  line-height: 1.8;
  margin-bottom: 16px;
}

.footer-contact-link {
  display: block;
  font-size: .88rem;
  color: #44505d;
  margin-bottom: 6px;
  transition: color var(--transition);
}
.footer-contact-link:hover { color: var(--teal); }

/* Bottom bar */
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-block: 24px;
}

.footer-copy {
  font-size: .8rem;
  color: #73808e;
}

.footer-legal { display: flex; flex-wrap: wrap; gap: 16px; }
.footer-legal-link {
  font-size: .78rem;
  color: #73808e;
  transition: color var(--transition);
}
.footer-legal-link:hover { color: var(--teal); }

/* ═══════════════════════════════════════════════════════════════
   QUIÉNES SOMOS / QUI SOM — Dark/light scheme (.qs-page)
═══════════════════════════════════════════════════════════════ */

/* Page base */
.qs-page { background-color: #0b0d10; }

/* — Breadcrumb: continuation of dark hero — */
.qs-page .breadcrumb {
  background: #141c24;
  border-bottom-color: rgba(255,255,255,.06);
}
.qs-page .breadcrumb-inner,
.qs-page .breadcrumb-current { color: rgba(200,215,228,.65); }
.qs-page .breadcrumb-sep { color: rgba(255,255,255,.2); }
.qs-page .breadcrumb-link { color: var(--teal); }

/* — Page hero: dark gradient — */
.qs-page .page-hero {
  background:
    radial-gradient(72% 90% at 80% 8%, rgba(46,188,196,.16) 0%, rgba(46,188,196,0) 52%),
    linear-gradient(180deg, #020304 0%, #0f151b 100%);
}
.qs-page .page-hero-eyebrow  { color: #8ee0e5; }
.qs-page .page-hero-title    { color: #ffffff; }
.qs-page .page-hero-subtitle { color: rgba(235,241,247,.82); }

/* — Origen section: light gray — */
.qs-page #qs-origen { background-color: #f3f5f7; }

/* — Stats bar: white, inverted — */
.qs-page .qs-stats-bar    { background-color: #ffffff; }
.qs-page .qs-stat-number  { color: #111111; }
.qs-page .qs-stat-label   { color: rgba(17,17,17,.72); }
.qs-page .qs-stat-divider { background: rgba(0,0,0,.14); }

/* — Evolución / Evolució: dark (overrides .bg-light) — */
.qs-page #qs-evolucion { background-color: #0f151b; }

.qs-page #qs-evolucion .section-tag {
  color: #aef1f4;
  background-color: rgba(46,188,196,.15);
}
.qs-page #qs-evolucion h2,
.qs-page #qs-evolucion .section-title { color: #f2f5f8; }

.qs-page #qs-evolucion p,
.qs-page #qs-evolucion .section-body  { color: rgba(226,235,242,.8); }

.qs-page #qs-evolucion .discipline-tag {
  background-color: rgba(255,255,255,.07);
  color: rgba(226,235,242,.82);
  border-color: rgba(255,255,255,.12);
}
.qs-page #qs-evolucion .discipline-tag::before { background-color: var(--teal); }
.qs-page #qs-evolucion .discipline-tag:hover {
  border-color: var(--teal);
  color: var(--teal);
  background-color: rgba(46,188,196,.1);
}
.qs-page #qs-evolucion .evolucion-quote {
  background: rgba(255,255,255,.05);
  box-shadow: none;
}
.qs-page #qs-evolucion .evolucion-quote p { color: rgba(235,241,247,.9); }

/* — Valores / Diferenciadors: light gray — */
.qs-page #qs-valores { background-color: #f3f5f7; }

/* — IA Services / Serveis IA: light gray (overrides dark body) — */
.qs-page #qs-ia-services { background-color: #f3f5f7; }

/* ia-banner and closing-section remain dark via their own inline CSS */

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE
   Breakpoints:
   · ≤1100px  Laptop ajustado (nav comprimido)
   · ≤1024px  Tablet landscape / laptop pequeño
   · ≤768px   Tablet portrait / móvil grande
   · ≤480px   Móvil estándar
   · ≤360px   Móvil pequeño
═══════════════════════════════════════════════════════════════ */

/* ── Laptop ajustado: nav con texto largo ────────────────── */
@media (max-width: 1100px) {
  .nav-link {
    padding: 8px 10px;
    font-size: .78rem;
    letter-spacing: .02em;
  }
}

/* ── Tablet landscape / laptop pequeño ──────────────────── */
@media (max-width: 1024px) {
  :root { --section-gap: 72px; }

  /* Hero: columna única, centrado */
  .hero-inner { grid-template-columns: 1fr; }
  .hero-visual { display: none; }
  .hero-content { max-width: 640px; }

  /* Secciones: columna única, texto siempre primero */
  .section-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .marketing-grid {
    grid-template-columns: 1fr;
  }
  /* Eliminar rtl para que el orden DOM prevalezca */
  .section-grid.reverse { direction: ltr; }
  /* En sección reverse (Formación): text es 2º en DOM — lo subimos */
  .section-grid.reverse .section-text  { order: 1; }
  .section-grid.reverse .section-visual { order: 2; }

  /* IA grid: 2 columnas en tablet */
  .ia-grid { grid-template-columns: 1fr 1fr; }

  /* Marketing cards: forzar 2×2 para evitar layout 3+1 */
  .marketing-cards { grid-template-columns: repeat(2, 1fr); }

  .training-programs-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .training-layout-top {
    margin-bottom: 20px;
  }

  .training-programs-intro {
    margin-bottom: 18px;
  }

  .training-custom-block {
    margin-top: 26px;
    padding: 22px;
  }

  /* Footer: 2 columnas */
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: span 2; }
}

@media (max-width: 768px) {
  .service-news-inner {
    min-height: 34px;
    justify-content: flex-start;
  }

  .service-news-text {
    font-size: .67rem;
    letter-spacing: .05em;
    animation: typewriter-mobile 4.1s steps(48, end) .2s forwards, caret .8s step-end infinite;
  }

  .training-program-card {
    padding: 16px 16px 14px;
  }

  .training-program-title {
    font-size: .92rem;
  }

  @keyframes typewriter-mobile {
    from { width: 0; }
    to { width: min(88vw, 560px); }
  }
}

/* ── Tablet portrait / móvil grande ─────────────────────── */
@media (max-width: 768px) {
  :root { --section-gap: 56px; }

  /* ─ Header ─ */
  .nav-toggle { display: flex; }

  .main-nav {
    position: absolute;
    top: 76px;
    left: 0;
    right: 0;
    background-color: var(--white);
    border-bottom: 1px solid rgba(0,0,0,.08);
    padding: 16px 24px 24px;
    display: none;
    box-shadow: var(--shadow-md);
    z-index: 999;
  }
  .main-nav.open { display: block; }
  .nav-list {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
  .nav-link { width: 100%; }
  .nav-link-cta {
    border-radius: var(--radius-sm);
    padding-inline: 14px;
    box-shadow: none;
  }

  /* ─ Dropdown mobile ─ */
  .nav-dropdown {
    position: static;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none;
    box-shadow: none;
    border: none;
    border-left: 3px solid var(--teal-light);
    border-radius: 0;
    padding: 4px 0 4px 8px;
    background: transparent;
    margin-top: 2px;
    width: 100%;
  }
  .nav-item-dropdown:hover .nav-link-dropdown-toggle::after,
  .nav-item-dropdown:focus-within .nav-link-dropdown-toggle::after {
    transform: none;
  }

  /* ─ Hero ─ */
  .hero { padding-block: 64px 48px; }
  .hero-cta { flex-direction: column; }
  .hero-cta .btn { width: 100%; justify-content: center; }
  .marketing-panel { padding: 24px; }

  /* ─ Stats ─ */
  .stats-inner { flex-direction: column; gap: 24px; }
  .stat-divider { width: 48px; height: 1px; }

  /* ─ Cards: 1 columna ─ */
  .cards-grid { grid-template-columns: 1fr; }

  /* ─ IA grid: 1 columna ─ */
  .ia-grid { grid-template-columns: 1fr; }

  /* ─ Sección header ─ */
  .section-header { margin-bottom: 40px; }

  /* ─ CTA ─ */
  .cta-inner { flex-direction: column; align-items: flex-start; }
  .cta-actions { width: 100%; }
  .cta-actions .btn { flex: 1; justify-content: center; }

  /* ─ Footer ─ */
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-brand { grid-column: span 1; }
  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
  .footer-legal { flex-wrap: wrap; gap: 12px 16px; }
}

/* ── Móvil estándar ──────────────────────────────────────── */
@media (max-width: 480px) {
  .header-inner { height: 64px; }
  .main-nav { top: 64px; }
  .logo { height: 40px; }
  .footer-logo { height: 44px; }

  /* Hero más compacto */
  .hero { padding-block: 48px 40px; }
  .hero-subtitle { font-size: .875rem; }

  /* Secciones */
  .section { padding-block: 48px; }
  .section-cta { padding-block: 56px; }

  /* Stats verticales compactos */
  .stats-bar { padding-block: 32px; }
  .stat-number { font-size: 2rem; }

  /* Cards padding reducido */
  .card { padding: 24px 20px; }
  .ia-card-inner { padding: 24px; }

  /* Footer */
  .site-footer { padding-top: 48px; }

  /* CTA botones apilados */
  .cta-actions { flex-direction: column; }
  .cta-actions .btn { width: 100%; }
}

/* ── Móvil pequeño ───────────────────────────────────────── */
@media (max-width: 360px) {
  .container { padding-inline: 16px; }
  .logo { height: 36px; }
  .btn { padding: 12px 20px; font-size: .82rem; }
  .stat-number { font-size: 1.75rem; }
  h2 { font-size: 1.5rem; }
}

/* ─── SCROLL ANIMATION ───────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible {
  opacity: 1;
  transform: none;
}
