/* =========================================================================
   conTIgo Soprole — Design System
   Reproduce la identidad de los mockups: paleta del logo (cian→azul→morado→
   rojo), fondos lavanda con "blobs" rosados, tarjetas redondeadas y Poppins.
   ========================================================================= */

:root {
  /* Paleta de marca */
  --cyan: #21b3f0;
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --blue-heading: #2e6fb7;
  --indigo: #3b2bb0;
  --purple: #6a23a6;
  --red: #ee3b2b;
  --red-orange: #f04a26;
  --orange: #f1592a;
  --soprole-red: #e2231a;
  --green: #16a085;
  --dark: #15152a;

  --gradient-brand: linear-gradient(90deg, var(--cyan) 0%, var(--blue) 30%, var(--purple) 65%, var(--red) 100%);
  --gradient-video: linear-gradient(120deg, #d61f6e 0%, #7b2ff7 45%, #1b2ad8 100%);

  /* Neutros */
  --ink: #2b2b38;
  --ink-soft: #5b5b6b;
  --muted: #8b8b99;
  --line: #e7e6f2;
  --bg: #ffffff;
  --bg-lav: #f4f2fc;
  --bg-lav-2: #eef0fb;
  --card: #ffffff;

  /* Sistema */
  --radius: 22px;
  --radius-sm: 14px;
  --radius-pill: 999px;
  --shadow-sm: 0 6px 18px rgba(40, 30, 90, 0.06);
  --shadow: 0 14px 40px rgba(40, 30, 90, 0.10);
  --shadow-lg: 0 24px 60px rgba(40, 30, 90, 0.16);
  --container: 1180px;
  --font: 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  /* Base suave (no blanco puro) con un leve tinte lavanda/durazno */
  background: linear-gradient(180deg, #ffffff 0%, #fbf7fb 42%, #f5f2fc 100%);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.section { padding: 72px 0; position: relative; }
.section--tight { padding: 48px 0; }
.text-center { text-align: center; }

/* Gradientes y blobs decorativos compartidos */
.bg-lav {
  background:
    radial-gradient(60% 50% at 85% 8%, rgba(241, 120, 70, .08), transparent 70%),
    linear-gradient(180deg, #ffffff 0%, var(--bg-lav) 100%);
}
.blob {
  position: absolute; z-index: 0; pointer-events: none;
  background-repeat: no-repeat; background-size: contain;
}

/* ---------- Tipografía utilitaria ---------- */
.eyebrow { font-weight: 600; letter-spacing: .04em; text-transform: uppercase; font-size: .8rem; }
.title-red { color: var(--red-orange); font-weight: 800; }
.title-blue { color: var(--blue-heading); font-weight: 800; }
.section-title { font-size: clamp(1.8rem, 3.4vw, 2.6rem); font-weight: 800; margin: 0 0 14px; }
.gradient-text {
  background: var(--gradient-brand);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
/* Marca "conTIgo" resaltada dentro de los títulos */
.brand-word {
  background: var(--gradient-brand);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  font-weight: 800;
}
.brand-ti { font-weight: 800; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  border: none; border-radius: var(--radius-pill);
  padding: 12px 26px; font-weight: 600; font-size: .95rem;
  color: #fff; transition: transform .15s ease, box-shadow .15s ease, opacity .15s;
  box-shadow: var(--shadow-sm);
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.btn .plus { font-weight: 700; }
.btn--blue { background: var(--blue-dark); }
.btn--orange { background: var(--orange); }
.btn--red { background: var(--red); }
.btn--dark { background: var(--dark); }
.btn--green { background: var(--green); }
.btn--ghost { background: #fff; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.btn--lg { padding: 14px 32px; font-size: 1rem; }

/* =========================================================================
   HEADER / NAV
   ========================================================================= */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid rgba(231, 230, 242, 0.7);
}
.nav {
  display: flex; align-items: center; gap: 22px;
  height: 74px;
}
.nav__logo img { height: 34px; width: auto; }
.nav__links { display: flex; align-items: center; gap: 26px; margin-left: 14px; }
.nav__link { font-size: .92rem; font-weight: 500; color: var(--ink-soft); position: relative; padding: 6px 0; }
.nav__link:hover { color: var(--ink); }
.nav__link.is-active { color: var(--ink); font-weight: 700; }
.nav__link.is-active::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -2px; height: 3px;
  border-radius: 3px; background: var(--gradient-brand);
}
.nav__spacer { flex: 1; }
.nav__search {
  display: flex; align-items: center; gap: 8px;
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius-pill); padding: 8px 16px; min-width: 220px;
  color: var(--muted);
}
.nav__search input { border: none; outline: none; background: transparent; font-size: .9rem; width: 100%; color: var(--ink); }
.nav__cta { background: var(--blue-dark); color: #fff; border-radius: var(--radius-pill); padding: 10px 22px; font-weight: 600; font-size: .9rem; }
.nav__logout { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 50%; color: var(--ink-soft); margin-left: 4px; transition: background .15s ease, color .15s ease; }
.nav__logout:hover { background: #f0f1fa; color: var(--blue-dark); }
.nav__burger { display: none; background: none; border: none; font-size: 1.6rem; color: var(--ink); }

/* =========================================================================
   HERO
   ========================================================================= */
/* Hero variante Home (texto izquierda, panel de imagen a sangre a la derecha) */
.hero {
  position: relative; overflow: hidden; display: flex; align-items: center;
  min-height: 720px;
  background: linear-gradient(160deg, #ffffff 0%, var(--bg-lav) 55%, #efe9fb 100%);
}
.hero .container { position: relative; z-index: 4; width: 100%; }
.hero__text { position: relative; z-index: 4; max-width: 580px; padding: 24px 0 80px; }
/* Ola divisoria al pie del hero: va POR DELANTE del equipo (lo recorta limpio) */
.hero-wave { position: absolute; left: 0; right: 0; bottom: -1px; width: 100%; height: 96px; z-index: 3; display: block; pointer-events: none; }
.hero__title { font-size: clamp(2.2rem, 4.6vw, 3.4rem); font-weight: 800; line-height: 1.08; margin: 0 0 22px; color: var(--blue-heading); }
.hero__title .accent { color: var(--green); }
.hero__list { margin: 0 0 18px; }
.hero__list p { margin: 2px 0; font-size: clamp(1rem, 1.6vw, 1.25rem); font-weight: 600; color: var(--blue); }
.hero__list b { color: var(--indigo); }
/* Línea con efecto "máquina de escribir" (una a la vez, cicla) */
.hero__typed { min-height: 1.7em; display: flex; align-items: center; }
.hero__caret {
  display: inline-block; width: 2px; height: 1.15em; margin-left: 3px;
  background: var(--blue); vertical-align: -0.16em; border-radius: 2px;
  animation: hero-caret 1s step-end infinite;
}
@keyframes hero-caret { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .hero__caret { animation: none; } }
.hero__subtitle { color: var(--ink-soft); max-width: 460px; font-size: .98rem; }
/* Bajada sobre la imagen del hero ("Somos tu socio estratégico") */
.hero__tagline {
  position: absolute; z-index: 3; bottom: 108px; right: 7%; max-width: 62%;
  text-align: right; font-style: italic; font-weight: 600; color: #fff;
  font-size: clamp(1.1rem, 1.9vw, 1.7rem); line-height: 1.25; letter-spacing: .01em;
  text-shadow: 0 2px 16px rgba(28, 20, 60, .55), 0 1px 3px rgba(0, 0, 0, .38);
  pointer-events: none;
}
/* Panel de imagen a SANGRE (derecha), grande, con borde curvo (ola) y tinte suave.
   La MISMA foto en dos capas que CALZAN PERFECTO: recorte nítido sobre su
   versión con fondo difuminada (mismo encuadre exacto). */
.hero__media {
  position: absolute; top: 0; right: 0; bottom: 0; width: 58%; z-index: 1;
  background: radial-gradient(125% 95% at 72% 32%, #eef0fb 0%, #ece8f9 52%, #f3e9f7 100%);
  -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'><path d='M20,0 C5,28 5,72 20,100 L100,100 L100,0 Z' fill='black'/></svg>");
  mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'><path d='M20,0 C5,28 5,72 20,100 L100,100 L100,0 Z' fill='black'/></svg>");
  -webkit-mask-size: 100% 100%; mask-size: 100% 100%;
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
}
.hero__media-bg, .hero__media-fg {
  position: absolute; inset: 0; width: 100%; height: 100%;
  /* cover: la foto LLENA el panel (sin huecos a los lados). Encuadre bajado para
     mostrar más cuerpo y menos fondo superior. Ambas capas con el MISMO fit y
     posición para que calcen exacto. */
  object-fit: cover; object-position: center 16%;
  transform: scale(1.04); transform-origin: center top;
}
.hero__media-bg {
  filter: blur(7px) saturate(.98) brightness(1.04);
  opacity: .9; z-index: 0;
  /* Difumina los bordes del recuadro del fondo para que no se vea el encuadre */
  -webkit-mask-image: radial-gradient(78% 80% at 52% 48%, #000 42%, transparent 80%);
  mask-image: radial-gradient(78% 80% at 52% 48%, #000 42%, transparent 80%);
}
.hero__media-fg { z-index: 1; }
/* Fundidos del color del panel sobre la foto: ocultan el encuadre (arriba/lados)
   y, sobre todo, disuelven los pies abajo para que no "floten" (como el mockup). */
.hero__media::after {
  content: ''; position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background:
    /* Fundido inferior: disuelve piernas/pies */
    linear-gradient(to top, #efe9f7 0%, #efe9f7 5%, rgba(239,233,247,0) 30%),
    /* Borde superior del encuadre */
    linear-gradient(to bottom, #f1ecf9 0%, rgba(241,236,249,0) 13%),
    /* Borde izquierdo (lado de la curva) */
    linear-gradient(to right, #f1ecf9 0%, rgba(241,236,249,0) 8%),
    /* Tinte de color suave (como el Figma) */
    radial-gradient(70% 55% at 30% 100%, rgba(150,110,255,.14), transparent 72%);
}
.hero__media--placeholder { background: linear-gradient(135deg, #c9d6ff, #e2e2f7); display: grid; place-items: center; }
.hero__dots { display: flex; gap: 8px; margin-top: 22px; }
.hero__dots span { width: 9px; height: 9px; border-radius: 50%; background: #c9c6e0; }
.hero__dots span.is-active { background: var(--blue); width: 22px; border-radius: 6px; }

/* Hero variante "banner" (imagen full con título centrado) — Proyectos */
.hero-banner {
  position: relative; min-height: 470px; display: grid; place-items: center;
  text-align: center; color: #fff; overflow: hidden;
  background: linear-gradient(180deg, #dfe7f5 0%, #ffffff 100%);
}
/* Imagen de fondo DIFUMINADA: blur + desaturada y aclarada */
.hero-banner__img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  filter: blur(3px) saturate(.8) brightness(1.06); transform: scale(1.06);
}
/* Velo que aclara y desvanece a blanco hacia abajo (para que el recorte del
   Marco se funda con la sección siguiente). */
.hero-banner::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(70,90,130,.30) 0%, rgba(255,255,255,.10) 45%, #ffffff 100%);
}
.hero-banner__inner { position: relative; z-index: 2; padding: 30px 24px 90px; }
.hero-banner__title { font-size: clamp(2.4rem, 6vw, 4rem); font-weight: 800; text-shadow: 0 4px 26px rgba(20,30,60,.45); margin: 0; }
.hero-banner__tagline { font-size: 1.05rem; font-style: italic; opacity: .95; }
.hero-banner__tagline b { font-style: normal; font-weight: 700; }
.hero-banner .hero-wave { z-index: 3; height: 100px; }

/* =========================================================================
   TARJETAS (news/destacados)
   ========================================================================= */
.cards { display: grid; gap: 26px; }
.cards--2 { grid-template-columns: repeat(2, 1fr); max-width: 880px; margin: 0 auto; }
.cards--3 { grid-template-columns: repeat(3, 1fr); }
.card {
  background: var(--card); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); display: flex; flex-direction: column;
  transition: transform .18s ease, box-shadow .18s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.card__media { aspect-ratio: 16 / 10; background: linear-gradient(135deg, #dfe6fb, #efe7fb); position: relative; overflow: hidden; }
.card__media img { width: 100%; height: 100%; object-fit: cover; }
.card__media--icon { display: grid; place-items: center; color: #aeb6e0; font-size: 2.4rem; }
.card__body { padding: 22px 22px 26px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.card__title { font-size: 1.18rem; font-weight: 800; margin: 0; line-height: 1.25; }
.card__title.accent-blue { color: var(--blue-heading); }
.card__title.accent-red { color: var(--red-orange); }
.card__title.accent-dark { color: var(--blue-heading); }
.card__text { color: var(--ink-soft); font-size: .9rem; margin: 0; flex: 1; }
.card__cta { margin-top: 6px; align-self: flex-start; }

/* ---------- Carrusel de tarjetas (news) ---------- */
.carousel { position: relative; }
.carousel__track {
  display: flex; gap: 26px; overflow-x: auto; scroll-snap-type: x mandatory;
  scroll-behavior: smooth; padding: 8px 4px 14px;
  -ms-overflow-style: none; scrollbar-width: none;
}
.carousel__track::-webkit-scrollbar { display: none; }
.carousel__track > .card {
  flex: 0 0 calc((100% - 52px) / 3); /* 3 por vista (2 separaciones de 26px) */
  scroll-snap-align: start;
}
.carousel__btn {
  position: absolute; top: 42%; transform: translateY(-50%); z-index: 6;
  width: 48px; height: 48px; border-radius: 50%; border: none;
  background: #fff; color: var(--blue-dark); box-shadow: var(--shadow);
  display: grid; place-items: center;
  transition: transform .15s ease, box-shadow .15s ease, opacity .15s ease;
}
.carousel__btn:hover { transform: translateY(-50%) scale(1.07); box-shadow: var(--shadow-lg); }
.carousel__btn:disabled { opacity: 0; pointer-events: none; }
.carousel__btn--prev { left: -12px; }
.carousel__btn--next { right: -12px; }
.carousel__dots { display: flex; justify-content: center; gap: 8px; margin-top: 22px; }
.carousel__dots button {
  width: 9px; height: 9px; padding: 0; border: none; border-radius: 50%;
  background: #c9c6e0; cursor: pointer; transition: background .15s ease, width .15s ease;
}
.carousel__dots button.is-active { background: var(--blue); width: 22px; border-radius: 6px; }

/* =========================================================================
   CTA banner ("¿Quieres solicitar una nueva iniciativa?")
   ========================================================================= */
.cta-strip { text-align: center; padding: 60px 0; }
.cta-strip__title { font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 800; color: var(--red-orange); margin: 0 0 22px; }
.cta-strip__title b { color: var(--red-orange); }

/* =========================================================================
   TESTIMONIOS
   ========================================================================= */
.testimonials { position: relative; }
/* Difuminado de fondo: glow durazno (izq) + azul (der), como en el mockup */
.testimonials::before {
  content: ""; position: absolute; left: -8%; right: -8%; top: -40px; bottom: -60px;
  z-index: 0; pointer-events: none;
  background:
    radial-gradient(46% 82% at 13% 56%, rgba(241, 120, 70, .22), transparent 70%),
    radial-gradient(46% 82% at 87% 46%, rgba(45, 110, 235, .20), transparent 72%);
}
/* La banda de testimonios se ensancha hacia los bordes (como en el mockup) */
.testimonials > .container { position: relative; z-index: 1; max-width: 1520px; padding: 0 40px; }
/* padding-top: aire para que el recorte de la foto sobresalga por arriba */
.testimonials__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 30px; padding-top: 50px; }
/* La tarjeta es una caja de color baja; la foto la "rebasa" por arriba (pop-out) */
.testimonial {
  position: relative;
  display: grid; grid-template-columns: 240px 1fr; align-items: stretch;
  border-radius: 22px; min-height: 172px;
  /* sin overflow: hidden -> la foto puede salirse del marco */
}
.testimonial--reverse { grid-template-columns: 1fr 240px; }
.testimonial--reverse .testimonial__photo { order: 2; }
.testimonial--reverse .testimonial__content { order: 1; text-align: right; }
/* Degradados suaves por acento (glow de color hacia el lado de la foto) */
.testimonial--green { background: radial-gradient(135% 135% at 6% 0%, #ffd7c4 0%, #fdece3 30%, #f3f1fb 66%); }
.testimonial--blue  { background: radial-gradient(135% 135% at 94% 0%, #d9e4fb 0%, #e9edfb 32%, #f4f0fb 68%); }
.testimonial__photo { position: relative; align-self: stretch; }
/* La foto se ancla al borde (inferior + lado exterior) y crece hacia arriba,
   saliéndose de la tarjeta como en el mockup */
.testimonial__photo img {
  position: absolute; bottom: 0; height: 290px; width: auto; max-width: 170%;
  object-fit: contain; object-position: bottom;
}
.testimonial:not(.testimonial--reverse) .testimonial__photo img { left: 0; }
.testimonial--reverse .testimonial__photo img { right: 0; }
.testimonial__photo-ph { width: 100%; height: 100%; display: grid; place-items: center; color: #aab; }
.testimonial__content { display: flex; flex-direction: column; justify-content: center; padding: 22px 26px; }
.testimonial__quote { font-style: italic; font-weight: 700; font-size: 1.08rem; line-height: 1.4; margin: 0 0 12px; }
.testimonial__quote.accent-green { color: var(--green); }
.testimonial__quote.accent-blue { color: var(--blue-heading); }
.testimonial__name { font-weight: 700; margin: 0; }
.testimonial__role { color: var(--muted); font-size: .85rem; margin: 0; }

/* =========================================================================
   VIDEO destacado
   ========================================================================= */
.video-band { background: var(--gradient-video); padding: 70px 0; }
.video {
  position: relative; max-width: 760px; margin: 0 auto; aspect-ratio: 16 / 9;
  min-height: 240px;
  border-radius: 20px; overflow: hidden; box-shadow: var(--shadow-lg);
  background: linear-gradient(135deg, #241a3d, #1c1430) center/cover no-repeat;
}
.capacita .video { margin: 0; width: 100%; }
.video img { width: 100%; height: 100%; object-fit: cover; opacity: .9; }
.video__play {
  position: absolute; inset: 0; margin: auto; width: 84px; height: 84px;
  display: grid; place-items: center; border: none; border-radius: 50%;
  background: rgba(255,255,255,.85); color: var(--blue-dark);
}
.video__play svg { width: 30px; height: 30px; margin-left: 4px; }
.video iframe, .video video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* =========================================================================
   PROYECTOS — Marco metodológico
   ========================================================================= */
.marco { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
/* Marco: misma técnica de dos capas. El fondo difuminado se fusiona con la
   imagen de leche del hero (que solapa por arriba); el recorte va nítido encima. */
.marco__media { position: relative; min-height: 360px; }
.marco__media-bg, .marco__media-fg {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: contain; object-position: center bottom;
}
.marco__media-bg {
  filter: blur(6px) saturate(.95) brightness(1.04); opacity: .8; z-index: 0;
  -webkit-mask-image: radial-gradient(ellipse at 50% 50%, #000 54%, transparent 84%);
  mask-image: radial-gradient(ellipse at 50% 50%, #000 54%, transparent 84%);
}
.marco__media-fg { z-index: 1; }
@media (min-width: 981px) {
  .marco__media { margin-top: -120px; z-index: 3; min-height: 460px; }
}
.marco__title { font-size: clamp(1.8rem, 3.4vw, 2.6rem); font-weight: 800; color: var(--blue-heading); margin: 0 0 16px; }
.marco__text { color: var(--ink-soft); margin: 0 0 22px; }

/* Capacitación (texto + video) */
.capacita { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.capacita__text { color: var(--ink-soft); }

/* Tabs de roles */
.tabs { background: linear-gradient(135deg, #ece9fb, #eef2fc); border-radius: 28px; padding: 30px; }
.tabs__nav { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-bottom: 26px; }
.tab-btn {
  border: none; border-radius: var(--radius-pill); padding: 10px 30px; font-weight: 600;
  background: #d9d7ec; color: #6a6a82; transition: all .15s;
}
.tab-btn.is-active { background: var(--blue-dark); color: #fff; box-shadow: var(--shadow-sm); }
.tab-panel { display: none; grid-template-columns: 240px 1fr 300px; gap: 28px; align-items: center; }
.tab-panel.is-active { display: grid; }
.tab-panel__media { border-radius: 18px; overflow: hidden; background: #d7d7ea; min-height: 220px; align-self: stretch; }
.tab-panel__media img { width: 100%; height: 100%; object-fit: cover; }
.tab-panel__media--right { box-shadow: var(--shadow-sm); }
.tab-panel__title { color: var(--indigo); font-weight: 800; font-size: 1.4rem; margin: 0 0 14px; }
.tab-panel__text { color: var(--ink-soft); font-size: .92rem; }
.tab-panel__tags { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 16px; }
.tab-panel__tags span { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: .85rem; }
.tab-panel__tags span:nth-child(1){ color: var(--red); }
.tab-panel__tags span:nth-child(2){ color: var(--blue); }
.tab-panel__tags span:nth-child(3){ color: var(--purple); }

/* Cápsulas conTIgo (carrusel de video) */
.capsules { background: linear-gradient(135deg, #ece9fb, #eef2fc); border-radius: 28px; padding: 30px; }
.capsules__nav { display: flex; align-items: center; justify-content: center; gap: 12px; margin-bottom: 26px; }
.capsules__nav .tabs__nav { margin-bottom: 0; }
.capsules__arrow {
  flex: none; width: 42px; height: 42px; border-radius: 50%; border: none;
  background: #fff; color: var(--blue-dark); box-shadow: var(--shadow-sm);
  display: grid; place-items: center; transition: transform .15s ease, box-shadow .15s ease;
}
.capsules__arrow:hover { transform: scale(1.07); box-shadow: var(--shadow); }
.capsule { grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.capsule__title { color: var(--indigo); font-weight: 800; font-size: clamp(1.4rem, 2.4vw, 1.9rem); margin: 0 0 14px; }
.capsule__text { color: var(--ink-soft); font-size: 1rem; margin: 0; }
.capsule__media .video { margin: 0; width: 100%; max-width: none; }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; text-align: center; }
.stat__icon { font-size: 2.4rem; margin-bottom: 8px; }
.stat__value { font-size: clamp(2.4rem, 5vw, 3.4rem); font-weight: 800; line-height: 1; }
.stat__value.accent-red { color: var(--red-orange); }
.stat__value.accent-blue { color: var(--blue); }
.stat__label { color: var(--ink-soft); font-size: .92rem; margin-top: 6px; }

/* =========================================================================
   FORMULARIO DE CONTACTO
   ========================================================================= */
.form-card { max-width: 680px; margin: 0 auto; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 34px; }
.form-row { display: grid; gap: 16px; grid-template-columns: 1fr 1fr; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field label { font-weight: 600; font-size: .88rem; }
.field input, .field textarea, .field select {
  border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; font: inherit; outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.field input:focus, .field textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(37,99,235,.12); }
.alert { padding: 14px 18px; border-radius: 12px; margin-bottom: 18px; font-size: .92rem; }
.alert--ok { background: #e6f7f0; color: #0d7a52; }
.alert--err { background: #fdecec; color: #c0392b; }

/* =========================================================================
   FOOTER
   ========================================================================= */
.site-footer {
  background:
    radial-gradient(55% 120% at 12% 0%, rgba(241, 120, 70, .16), transparent 60%),
    radial-gradient(55% 120% at 88% 10%, rgba(226, 35, 26, .10), transparent 62%),
    linear-gradient(180deg, #fff 0%, #fbf3ef 100%);
  padding: 56px 0 28px; border-top: 1px solid var(--line);
}
.footer__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; align-items: center; }
.footer__brand { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.footer__soprole { font-weight: 800; font-size: 1.9rem; color: var(--soprole-red); letter-spacing: -.02em; line-height: 1; }
.footer__soprole small { display: block; font-size: .7rem; font-weight: 600; letter-spacing: .25em; }
.footer__help h4 { color: var(--ink); margin: 0 0 12px; font-size: 1.05rem; }
.footer__help p { margin: 4px 0; color: var(--ink-soft); font-size: .92rem; display: flex; align-items: center; gap: 8px; }
.footer__bottom { display: flex; justify-content: space-between; align-items: center; margin-top: 36px; padding-top: 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: .8rem; }
.footer__bottom a { color: var(--muted); }

/* =========================================================================
   RESPONSIVE
   ========================================================================= */
@media (max-width: 980px) {
  .hero { display: block; min-height: auto; }
  .hero__media {
    position: relative; width: 100%; height: 360px;
    -webkit-mask-image: none; mask-image: none;
  }
  .hero__text { max-width: none; padding: 28px 0 60px; }
  .hero__tagline { bottom: 16px; right: 5%; max-width: 70%; font-size: 1.05rem; }
  .cards--3 { grid-template-columns: 1fr; }
  .carousel__track > .card { flex-basis: calc((100% - 26px) / 2); } /* 2 por vista en tablet */
  .capsules__arrow { display: none; } /* en móvil/tablet se navega con las pestañas */
  /* Apiladas: más separación para que el recorte saliente no toque la tarjeta de arriba */
  .testimonials__grid { grid-template-columns: 1fr; gap: 58px; }
  .marco, .capacita { grid-template-columns: 1fr; }
  .tab-panel.is-active { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr; gap: 36px; }
  .footer__grid { grid-template-columns: 1fr; }
  .nav__search { display: none; }
}
@media (max-width: 760px) {
  .nav__links { display: none; }
  .nav__burger { display: block; }
  .nav.is-open .nav__links {
    display: flex; flex-direction: column; align-items: flex-start; gap: 14px;
    position: absolute; top: 74px; left: 0; right: 0; background: #fff;
    padding: 20px 24px; box-shadow: var(--shadow); border-bottom: 1px solid var(--line);
  }
  .cards--2 { grid-template-columns: 1fr; }
  .carousel__track > .card { flex-basis: 100%; } /* 1 por vista en móvil */
  .carousel__btn--prev { left: -6px; }
  .carousel__btn--next { right: -6px; }
  .form-row { grid-template-columns: 1fr; }
  .testimonial, .testimonial--reverse { grid-template-columns: 130px 1fr; }
  .testimonial__photo img { height: 190px; }
}

/* =========================================================================
   MODAL (nota completa · "Leer más")
   ========================================================================= */
.modal[hidden] { display: none; }
.modal {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: center; padding: 24px;
}
.modal__backdrop {
  position: absolute; inset: 0; background: rgba(20, 26, 60, .55);
  -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
}
.modal__dialog {
  position: relative; z-index: 1; width: 100%; max-width: 760px;
  max-height: 86vh; overflow-y: auto; background: #fff; border-radius: 18px;
  box-shadow: 0 30px 80px rgba(20, 30, 80, .35); padding: 40px 44px;
  animation: modal-in .18s ease;
}
@keyframes modal-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.modal__close {
  position: absolute; top: 14px; right: 16px; width: 40px; height: 40px;
  border: none; background: #f0f1fa; border-radius: 50%; font-size: 1.5rem;
  line-height: 1; color: var(--ink); cursor: pointer; transition: background .15s ease;
}
.modal__close:hover { background: #e3e6f5; }
.note__title { font-size: 1.5rem; font-weight: 800; line-height: 1.22; margin: 0 0 14px; padding-right: 44px; }
.note__lead { font-size: 1.06rem; font-weight: 600; color: var(--ink); margin: 0 0 18px; }
.modal__content p { color: var(--ink-soft); line-height: 1.72; margin: 0 0 14px; }
.modal__content p:last-child { margin-bottom: 0; }
body.modal-open { overflow: hidden; }

/* Recorta el teaser de la tarjeta para igualar alturas */
.card__text {
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical;
  overflow: hidden;
}
@media (max-width: 640px) {
  .modal__dialog { padding: 32px 22px; }
  .note__title { font-size: 1.28rem; }
}
