/* ═══════════════════════════════════════════════════════════════
   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);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(0,0,0,.07);
  transition: box-shadow var(--transition);
}
.site-header.scrolled { box-shadow: var(--shadow-md); }

.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); }

/* 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;
}

.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;
}

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

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

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

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

.hero-shape {
  width: 420px;
  height: 420px;
  border-radius: 60% 40% 55% 45% / 45% 55% 45% 55%;
  background: linear-gradient(135deg, var(--teal-light) 0%, rgba(46,188,196,.12) 100%);
  position: relative;
}

.hero-shape::before {
  content: '';
  position: absolute;
  inset: 20px;
  border-radius: 60% 40% 55% 45% / 45% 55% 45% 55%;
  border: 2px solid rgba(46,188,196,.3);
}

/* ═══════════════════════════════════════════════════════════════
   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");
}

/* ─── 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; justify-content: center; align-items: center; min-height: 320px; }

.training-card {
  width: 200px;
  height: 200px;
  background-color: var(--black);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
  box-shadow: var(--shadow-lg);
}

.training-icon { width: 80px; height: 80px; color: var(--teal); }
.training-icon svg { width: 100%; height: 100%; }

.training-accent {
  position: absolute;
  width: 260px;
  height: 260px;
  background: linear-gradient(135deg, var(--teal-light), transparent);
  border-radius: var(--radius-lg);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(10deg);
  z-index: 0;
}

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

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

.ia-card-featured {
  grid-column: span 5;
  grid-row: span 2;
  background-color: var(--teal);
}
.ia-card:not(.ia-card-featured) {
  grid-column: span 7;
  background-color: var(--white);
  border: 1px solid rgba(0,0,0,.08);
}

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

.ia-card-featured .ia-card-inner { padding: 40px; display: flex; flex-direction: column; justify-content: flex-end; min-height: 320px; }
.ia-card-featured .ia-card-tag { background-color: rgba(255,255,255,.2); color: var(--white); }
.ia-card-featured .ia-card-title { color: var(--white); font-size: 1.5rem; }
.ia-card-featured .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; }

/* ═══════════════════════════════════════════════════════════════
   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: #111111;
  color: rgba(255,255,255,.75);
  padding-top: 72px;
}

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

/* 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: rgba(255,255,255,.55); 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: rgba(255,255,255,.6);
  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: rgba(255,255,255,.4);
  margin-bottom: 20px;
}

.footer-list { display: flex; flex-direction: column; gap: 12px; }
.footer-link {
  font-size: .88rem;
  color: rgba(255,255,255,.65);
  transition: color var(--transition);
}
.footer-link:hover { color: var(--teal); }

/* Contact col */
.footer-address {
  font-size: .88rem;
  color: rgba(255,255,255,.55);
  line-height: 1.8;
  margin-bottom: 16px;
}

.footer-contact-link {
  display: block;
  font-size: .88rem;
  color: rgba(255,255,255,.65);
  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: rgba(255,255,255,.35);
}

.footer-legal { display: flex; flex-wrap: wrap; gap: 16px; }
.footer-legal-link {
  font-size: .78rem;
  color: rgba(255,255,255,.4);
  transition: color var(--transition);
}
.footer-legal-link:hover { color: var(--teal); }

/* ═══════════════════════════════════════════════════════════════
   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;
  }
  /* 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; }
  .ia-card-featured {
    grid-column: span 2;
    grid-row: span 1;
  }
  .ia-card:not(.ia-card-featured) { grid-column: span 1; }
  .ia-card-featured .ia-card-inner { min-height: 240px; }

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

/* ── 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%; }

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

  /* ─ 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; }
  .ia-card-featured,
  .ia-card:not(.ia-card-featured) { grid-column: span 1; }

  /* ─ 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;
}
