/* ==========================================================================
   Morales Consulting Group
   ========================================================================== */

:root {
  /* Gama de azules tomada del logo y del brochure */
  --blue: #015092;        /* azul del logo */
  --blue-600: #0a4479;
  --navy: #0d3358;        /* azul marino */
  --navy-900: #061a2e;    /* azul noche (footer) */
  --sky: #0aa3da;         /* celeste / cian de acento */
  --sky-600: #5fb4ec;     /* celeste claro (hover) */
  --ice: #eef5fb;         /* azul hielo para fondos claros */
  --ink: #1d2226;
  --text: #4a5158;
  --muted: #6b7279;       /* gris del logo */
  --line: #e4e7eb;
  --white: #ffffff;

  --font-serif: "DM Serif Display", Georgia, serif;
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --radius: 4px;
  --shadow: 0 18px 40px rgba(11, 44, 79, .12);
  --container: 1200px;
  --header-h: 84px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

img, video { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0; color: var(--ink); font-weight: 400; line-height: 1.2; }
p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; list-style: none; }
button { font: inherit; cursor: pointer; }

svg { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
svg.fill { fill: currentColor; stroke: none; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }

.section { padding: 110px 0; }
.section--ice { background: var(--ice); }
.section--navy { background: var(--navy); color: rgba(255, 255, 255, .78); }

/* ---------- Tipografía ---------- */
.eyebrow {
  margin: 0 0 14px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--blue);
}
.eyebrow--light { color: var(--sky); }
.eyebrow--sky { color: var(--sky); }

.title {
  font-family: var(--font-serif);
  font-size: clamp(32px, 4vw, 46px);
  margin-bottom: 22px;
}
.title--light { color: var(--white); }

.section-head { max-width: 720px; margin: 0 auto 60px; text-align: center; }
.section-head .title { margin-bottom: 16px; }
.section-head__text { margin: 0; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 15px 30px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  transition: background .25s, color .25s, border-color .25s, transform .25s;
}
.btn:hover { transform: translateY(-2px); }
/* Celeste profundo → azul del logo: ambos extremos mantienen buen contraste con texto blanco */
.btn--sky {
  background: linear-gradient(135deg, #0779b0 0%, var(--blue) 50%, #0779b0 100%) 0 0 / 200% 100%;
  color: var(--white);
  transition: background-position .4s, transform .25s;
}
.btn--sky:hover { background-position: 100% 0; }
.btn--blue { background: var(--blue); color: var(--white); }
.btn--blue:hover { background: var(--navy); }
.btn--ghost { border-color: rgba(255, 255, 255, .6); color: var(--white); }
.btn--ghost:hover { background: var(--white); color: var(--navy); }
.btn--block { width: 100%; }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--blue);
}
.link-arrow::after { content: "→"; transition: transform .25s; }
.link-arrow:hover::after { transform: translateX(4px); }

/* ---------- Topbar ---------- */
.topbar { background: var(--navy-900); color: rgba(255, 255, 255, .75); font-size: 13px; }
.topbar__inner { display: flex; justify-content: space-between; align-items: center; min-height: 42px; gap: 16px; }
.topbar__contact { display: flex; gap: 28px; }
.topbar__contact a { display: inline-flex; align-items: center; gap: 8px; transition: color .2s; }
.topbar__contact a:hover { color: var(--sky); }
.topbar__contact svg { font-size: 15px; color: var(--sky); }
.topbar__right { display: flex; align-items: center; gap: 22px; }
.topbar__social { display: inline-flex; font-size: 15px; transition: color .2s; }
.topbar__social:hover { color: var(--sky); }

.lang { display: inline-flex; align-items: center; gap: 6px; }
.lang span { opacity: .4; }
.lang button {
  background: none;
  border: 0;
  padding: 2px 4px;
  color: inherit;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .06em;
  opacity: .65;
  transition: opacity .2s, color .2s;
}
.lang button:hover { opacity: 1; }
.lang button.is-active { opacity: 1; color: var(--sky); }

/* ---------- Header ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--white);
  transition: box-shadow .3s;
}
.header.is-scrolled { box-shadow: 0 6px 24px rgba(11, 44, 79, .1); }
.header__inner { display: flex; align-items: center; gap: 32px; height: var(--header-h); }
.header__logo img { width: 190px; height: auto; }

.nav { display: flex; align-items: center; gap: 30px; margin-left: auto; }
.nav a {
  position: relative;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--navy);
  padding: 6px 0;
}
.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: var(--blue);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .3s;
}
.nav a:hover::after,
.nav a.is-active::after { transform: scaleX(1); }
.nav__lang { display: none; }

.header__cta { padding: 13px 22px; }

.burger { display: none; background: none; border: 0; padding: 8px; margin-left: auto; }
.burger span { display: block; width: 26px; height: 2px; margin: 6px 0; background: var(--navy); transition: transform .3s, opacity .3s; }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: calc(100vh - var(--header-h) - 42px);
  min-height: calc(100svh - var(--header-h) - 42px);
  display: flex;
  align-items: center;
  padding: 120px 0 200px;
  overflow: hidden;
  color: rgba(255, 255, 255, .85);
}
.hero__bg {
  position: absolute;
  inset: 0;
  background: var(--navy-900) url("../img/hero-poster.jpg") center / cover no-repeat;
}
.hero__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* Overlay azul encima del video para que el texto se lea siempre */
.hero__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(6, 26, 46, .92) 0%, rgba(1, 80, 146, .72) 55%, rgba(10, 163, 218, .35) 100%);
}

.hero__inner { position: relative; }
.hero__title {
  max-width: 820px;
  font-family: var(--font-serif);
  font-size: clamp(38px, 5.4vw, 66px);
  line-height: 1.1;
  color: var(--white);
  margin-bottom: 24px;
}
.hero__text { max-width: 560px; font-size: 18px; margin-bottom: 38px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; }

/* ---------- Tarjetas destacadas ---------- */
.highlights {
  position: relative;
  z-index: 2;
  margin-top: -120px;
  /* la parte superior se superpone al hero; el resto continúa el crema de "Nosotros" */
  background: linear-gradient(to bottom, transparent 120px, var(--ice) 120px);
}
.highlights__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.hl-card {
  position: relative;
  background: var(--white);
  padding: 40px 34px 36px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border-bottom: 3px solid transparent;
  transition: transform .3s, border-color .3s;
}
.hl-card:hover { transform: translateY(-6px); border-color: var(--blue); }
.hl-card__icon {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  margin-bottom: 22px;
  border-radius: 50%;
  background: var(--ice);
  color: var(--blue);
  font-size: 28px;
}
.hl-card h3 { font-family: var(--font-serif); font-size: 24px; margin-bottom: 10px; }
.hl-card p { margin: 0; font-size: 15px; }

/* ---------- Nosotros ---------- */
.about { padding-top: 100px; }
.about__grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 70px; align-items: center; }

.about__media { display: grid; grid-template-columns: 180px 1fr; gap: 18px; margin: 34px 0 30px; }
.stat-box {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 26px;
  background: var(--navy);
  color: rgba(255, 255, 255, .8);
  border-radius: var(--radius);
}
.stat-box strong { font-family: var(--font-serif); font-size: 46px; font-weight: 400; line-height: 1; color: var(--white); margin-bottom: 8px; }
.stat-box > span { font-size: 14px; line-height: 1.4; }

.video-thumb {
  position: relative;
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  overflow: hidden;
  min-height: 150px;
  background: var(--navy);
}
.video-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .7; transition: transform .5s, opacity .3s; }
.video-thumb:hover img { transform: scale(1.06); opacity: .55; }
.video-thumb__play {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  margin: -31px 0 0 -31px;
  border-radius: 50%;
  background: var(--white);
  color: var(--blue);
  font-size: 22px;
  box-shadow: 0 0 0 0 rgba(255, 255, 255, .6);
  animation: pulse 2.2s infinite;
}
.video-thumb__label {
  position: absolute;
  left: 16px;
  bottom: 12px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--white);
}
@keyframes pulse {
  70% { box-shadow: 0 0 0 16px rgba(255, 255, 255, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); }
}

.checklist { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 24px; }
.checklist li { position: relative; padding-left: 28px; font-size: 15px; color: var(--ink); }
.checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--blue) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 10px no-repeat;
}

.about__figure { position: relative; padding: 0 0 60px 60px; }
.about__figure img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--radius); }
.quote-box {
  position: absolute;
  left: 0;
  bottom: 0;
  max-width: 330px;
  margin: 0;
  padding: 30px 30px 26px;
  background: var(--navy);
  color: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.quote-box p { font-style: italic; font-size: 16px; line-height: 1.6; margin-bottom: 18px; }
.quote-box footer strong { display: block; font-size: 14px; letter-spacing: .08em; text-transform: uppercase; }
.quote-box footer span { font-size: 13px; color: var(--sky); }

/* ---------- Propósito ---------- */
.purpose__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
.purpose-card {
  display: grid;
  grid-template-columns: 70px 1fr;
  grid-template-rows: auto 1fr;
  column-gap: 24px;
  padding: 44px 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: box-shadow .3s, border-color .3s;
}
.purpose-card:hover { box-shadow: var(--shadow); border-color: transparent; }
.purpose-card__icon {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: var(--blue);
  color: var(--white);
  font-size: 32px;
}
.purpose-card h3 { font-family: var(--font-serif); font-size: 28px; margin-bottom: 10px; }
.purpose-card p { margin: 0; }

/* ---------- Áreas ---------- */
.areas__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.area-card {
  padding: 44px 36px;
  background: var(--white);
  text-align: center;
  transition: background .3s, color .3s;
}
.area-card__icon { display: inline-grid; place-items: center; font-size: 44px; color: var(--blue); margin-bottom: 20px; transition: color .3s; }
.area-card h3 { font-family: var(--font-serif); font-size: 23px; margin-bottom: 12px; transition: color .3s; }
.area-card p { margin: 0; font-size: 15px; }
.area-card:hover { background: var(--navy); color: rgba(255, 255, 255, .8); }
.area-card:hover h3 { color: var(--white); }
.area-card:hover .area-card__icon { color: var(--sky); }

.areas__more { margin-top: 56px; text-align: center; }
.areas__more h3 { font-family: var(--font-serif); font-size: 26px; margin-bottom: 22px; }
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.chips li {
  padding: 9px 18px;
  border: 1px solid var(--sky-600);
  border-radius: 40px;
  background: var(--white);
  font-size: 14px;
  color: var(--navy);
}

/* ---------- Sectores (pestañas interactivas) ---------- */
.sectors__grid { display: grid; grid-template-columns: 380px 1fr; gap: 30px; align-items: stretch; }
.sectors__tabs { display: flex; flex-direction: column; gap: 10px; }
.sector-tab {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 18px;
  width: 100%;
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-left: 4px solid transparent;
  border-radius: var(--radius);
  background: var(--white);
  text-align: left;
  color: var(--navy);
  transition: background .3s, border-color .3s, color .3s, transform .3s;
}
.sector-tab:hover { border-left-color: var(--sky); transform: translateX(4px); }
.sector-tab__num { font-family: var(--font-serif); font-size: 26px; line-height: 1; color: var(--sky); transition: color .3s; }
.sector-tab__label { font-weight: 600; font-size: 15px; line-height: 1.35; }
.sector-tab.is-active { background: var(--navy); border-color: var(--navy); border-left-color: var(--sky); color: var(--white); }
.sector-tab:focus-visible { outline: 3px solid var(--sky); outline-offset: 2px; }

.sectors__stage { position: relative; min-height: 460px; border-radius: 6px; overflow: hidden; background: var(--navy-900); }
.sector-panel { position: absolute; inset: 0; opacity: 0; transition: opacity .7s ease; }
.sector-panel[hidden] { display: block; visibility: hidden; }
.sector-panel.is-active { opacity: 1; visibility: visible; }
.sector-panel img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.08); transition: transform 7s ease-out; }
.sector-panel.is-active img { transform: scale(1); }
.sector-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(6, 26, 46, 0) 35%, rgba(6, 26, 46, .88) 100%);
}
.sector-panel__card {
  position: absolute;
  left: 34px;
  right: 34px;
  bottom: 34px;
  z-index: 1;
  max-width: 560px;
  color: rgba(255, 255, 255, .88);
  transform: translateY(16px);
  opacity: 0;
  transition: transform .6s .25s, opacity .6s .25s;
}
.sector-panel.is-active .sector-panel__card { transform: none; opacity: 1; }
.sector-panel__card h3 { font-family: var(--font-serif); font-size: 32px; color: var(--white); margin-bottom: 10px; }
.sector-panel__card p { margin: 0; font-size: 16px; }
.sectors__progress { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; height: 4px; background: rgba(255, 255, 255, .15); }
.sectors__progress span { display: block; height: 100%; width: 0; background: var(--sky); }
.sectors__progress.is-running span { animation: sectorProgress var(--sector-time, 6s) linear forwards; }
@keyframes sectorProgress { to { width: 100%; } }

/* ---------- Por qué elegirnos ---------- */
.why {
  position: relative;
  padding: 100px 0;
  overflow: hidden;
  color: rgba(255, 255, 255, .8);
}
.why__bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(6, 26, 46, .95) 0%, rgba(13, 51, 88, .88) 50%, rgba(1, 80, 146, .75) 100%),
    url("../img/why-bg.jpg") center / cover no-repeat;
}
.why__inner { position: relative; }
.why__head { max-width: 760px; margin: 0 auto 56px; text-align: center; }
.why__head .title { margin-bottom: 18px; }
.why__line { display: block; width: 60px; height: 3px; margin: 0 auto 22px; background: var(--sky); border-radius: 3px; }
.why__text { margin: 0; font-size: 17px; }

.why__stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.why-stat {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  column-gap: 16px;
  align-items: center;
  padding: 28px 24px;
  background: linear-gradient(160deg, rgba(13, 51, 88, .92) 0%, rgba(6, 26, 46, .92) 100%);
  border: 1px solid rgba(95, 180, 236, .35);
  border-top: 4px solid var(--sky);
  border-radius: 6px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .06);
  -webkit-backdrop-filter: blur(8px);
          backdrop-filter: blur(8px);
  transition: border-color .3s, box-shadow .3s, transform .3s;
}
.why-stat:hover {
  transform: translateY(-6px);
  border-color: rgba(95, 180, 236, .7);
  box-shadow: 0 24px 50px rgba(0, 0, 0, .4), 0 0 0 1px rgba(10, 163, 218, .4);
}
.why-stat svg {
  grid-row: span 2;
  box-sizing: content-box;
  padding: 15px;
  font-size: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--sky), var(--blue));
  color: var(--white);
}
.why-stat strong { font-family: var(--font-serif); font-weight: 400; font-size: 44px; line-height: 1; color: var(--white); }
.why-stat strong:not(:has(span)) { font-size: 20px; line-height: 1.2; white-space: nowrap; }
.why-stat > span { margin-top: 6px; font-size: 14px; line-height: 1.35; color: rgba(255, 255, 255, .85); }

/* ---------- Equipo: tres tarjetas iguales ---------- */
.team__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; align-items: stretch; }
.member {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--line);
  border-top: 4px solid var(--sky);
  border-radius: 6px;
  overflow: hidden;
  transition: box-shadow .3s, transform .3s;
}
.member:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.member__photo { position: relative; overflow: hidden; background: var(--ice); }
.member__photo img { width: 100%; aspect-ratio: 4 / 4.4; object-fit: cover; object-position: center top; transition: transform .6s; }
.member:hover .member__photo img { transform: scale(1.04); }
.member__body { display: flex; flex-direction: column; flex: 1; padding: 28px 28px 30px; }
.member__role { margin: 0 0 6px; font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--blue); }
/* Nombre en una sola línea; descripción con altura fija de 4 líneas para que las tres tarjetas queden alineadas */
.member__body h3 { font-family: var(--font-serif); font-size: clamp(19px, 1.75vw, 23px); margin-bottom: 14px; white-space: nowrap; }
.member__body > p:not(.member__role) {
  font-size: 14.5px;
  line-height: 1.65;
  min-height: calc(1.65em * 4);
  margin-bottom: 18px;
}
.member__list { margin: 6px 0 24px; display: grid; gap: 8px; }
.member__list li {
  position: relative;
  padding: 9px 12px 9px 36px;
  background: var(--ice);
  border-left: 3px solid var(--blue);
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.member__list li::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 50%;
  width: 14px;
  height: 14px;
  margin-top: -7px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23015092' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8' r='6'/%3E%3Cpath d='M15.5 12.9 17 22l-5-3-5 3 1.5-9.1'/%3E%3C/svg%3E") center / contain no-repeat;
}
.member__body .link-arrow { margin-top: auto; }
@media (max-width: 1200px) {
  .member__body { padding: 24px 22px 26px; }
  .member__body > p:not(.member__role) { min-height: calc(1.65em * 5); }
  .member__list li { font-size: 12.5px; padding-left: 32px; }
  .member__list li::before { left: 10px; }
}

/* ---------- CTA ---------- */
.cta {
  position: relative;
  padding: 80px 0;
  overflow: hidden;
  color: rgba(255, 255, 255, .85);
  background: var(--navy-900);
}
.cta__bg {
  position: absolute;
  inset: -20px;
  background: url("../img/sectors/logistica.jpg") center / cover no-repeat;
  animation: ctaPan 26s ease-in-out infinite alternate;
}
/* Overlay oscuro a la izquierda (texto) que se abre hacia la derecha (botones) */
.cta__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(6, 26, 46, .96) 0%, rgba(6, 26, 46, .88) 45%, rgba(1, 80, 146, .78) 100%);
}
@keyframes ctaPan { from { transform: scale(1.05) translateX(-10px); } to { transform: scale(1.12) translateX(10px); } }

.cta__inner { position: relative; display: grid; grid-template-columns: 1.1fr 1fr; gap: 60px; align-items: center; }
.cta__text .title { margin-bottom: 14px; }
.cta__text > p { margin: 0 0 26px; font-size: 17px; max-width: 520px; }
.cta__badges { display: flex; flex-wrap: wrap; gap: 10px; }
.cta__badges li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 40px;
  background: rgba(255, 255, 255, .06);
  font-size: 13.5px;
  color: var(--white);
}
.cta__badges svg { font-size: 16px; color: var(--sky); }

.cta__actions { display: grid; gap: 14px; }
.cta-action {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 18px 22px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 8px;
  background: rgba(255, 255, 255, .08);
  -webkit-backdrop-filter: blur(8px);
          backdrop-filter: blur(8px);
  color: var(--white);
  transition: background .3s, border-color .3s, transform .3s;
}
.cta-action:hover { background: var(--white); border-color: var(--white); color: var(--navy); transform: translateX(6px); }
.cta-action__icon {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--sky), var(--blue));
  color: var(--white);
  font-size: 22px;
}
.cta-action--wa .cta-action__icon { background: #25d366; }
.cta-action__text { display: flex; flex-direction: column; line-height: 1.35; }
.cta-action__text strong { font-size: 16px; font-weight: 600; }
.cta-action__text span { font-size: 14px; opacity: .75; }
.cta-action__arrow { margin-left: auto; font-size: 20px; color: var(--sky); transition: transform .3s; }
.cta-action:hover .cta-action__arrow { transform: translateX(4px); color: var(--blue); }

/* ---------- Clientes ---------- */
.clients { padding-bottom: 120px; }
.clients .section-head { margin-bottom: 50px; }
.marquee {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.marquee__track { display: flex; align-items: center; gap: 80px; width: max-content; animation: marquee 40s linear infinite; }
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee__track img { height: 64px; width: auto; max-width: 200px; object-fit: contain; filter: grayscale(1); opacity: .7; transition: filter .3s, opacity .3s; }
.marquee__track img:hover { filter: none; opacity: 1; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Contacto (FAQ + form) ---------- */
.contact { display: grid; grid-template-columns: 1fr 1fr; }
.contact__faq {
  display: flex;
  justify-content: flex-end;
  padding: 100px 70px 100px 24px;
  color: rgba(255, 255, 255, .78);
  background:
    linear-gradient(rgba(8, 31, 56, .93), rgba(8, 31, 56, .93)),
    url("../img/justice.jpg") center / cover no-repeat;
}
.contact__form {
  display: flex;
  padding: 100px 24px 100px 70px;
  background: var(--ice);
}
.contact__faq-inner,
.contact__form-inner { width: 100%; max-width: 520px; }

.faq { margin-top: 10px; border-top: 1px solid rgba(255, 255, 255, .15); }
.faq details { border-bottom: 1px solid rgba(255, 255, 255, .15); }
.faq summary {
  position: relative;
  padding: 20px 40px 20px 0;
  list-style: none;
  cursor: pointer;
  font-family: var(--font-serif);
  font-size: 19px;
  color: var(--white);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-sans);
  font-size: 24px;
  color: var(--sky);
  transition: transform .3s;
}
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq details p { margin: 0 0 22px; font-size: 15px; }

.form { display: grid; gap: 16px; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form label span { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 600; color: var(--navy); }
.form input,
.form select,
.form textarea {
  width: 100%;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  font: inherit;
  font-size: 15px;
  color: var(--ink);
  transition: border-color .2s, box-shadow .2s;
}
.form textarea { resize: vertical; min-height: 120px; }
.form input:focus,
.form select:focus,
.form textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(1, 80, 146, .12); }
.form .is-invalid { border-color: #c0392b; }
.form button { margin-top: 6px; }
.form__status { margin: 0; font-size: 14px; min-height: 1.5em; }
.form__status.is-ok { color: #1e7e46; }
.form__status.is-error { color: #c0392b; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* ---------- Footer ---------- */
.footer { background: var(--navy-900); color: rgba(255, 255, 255, .7); font-size: 15px; }
.footer__grid { display: grid; grid-template-columns: 1.4fr .8fr 1fr 1.4fr; gap: 50px; padding-top: 80px; padding-bottom: 60px; }
.footer__brand img { width: 210px; height: auto; margin-bottom: 22px; }
.footer__brand p { max-width: 300px; }
.footer__social {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, .25);
  border-radius: 50%;
  font-size: 16px;
  transition: background .2s, color .2s, border-color .2s;
}
.footer__social:hover { background: var(--sky); color: var(--navy); border-color: var(--sky); }
.footer h4 { margin-bottom: 22px; font-family: var(--font-serif); font-size: 21px; color: var(--white); }
.footer__links { display: grid; gap: 10px; }
.footer__links a { transition: color .2s; }
.footer__links a:hover { color: var(--sky); }
.footer__contact { display: grid; gap: 16px; }
.footer__contact li { display: flex; gap: 12px; line-height: 1.55; }
.footer__contact svg { font-size: 18px; margin-top: 3px; color: var(--sky); }
.footer__contact a:hover { color: var(--sky); }
.footer__bottom { border-top: 1px solid rgba(255, 255, 255, .1); padding: 22px 0; font-size: 13px; text-align: center; }
.footer__bottom p { margin: 0; }

/* ---------- WhatsApp ---------- */
.whatsapp {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 60;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #25d366;
  color: var(--white);
  font-size: 30px;
  box-shadow: 0 10px 25px rgba(37, 211, 102, .4);
  transition: transform .25s;
}
.whatsapp:hover { transform: scale(1.08); }
/* Ondas que salen del botón para llamar la atención */
.whatsapp::before,
.whatsapp::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid #25d366;
  animation: waRipple 2.4s ease-out infinite;
  pointer-events: none;
}
.whatsapp::after { animation-delay: 1.2s; }
@keyframes waRipple {
  from { transform: scale(1); opacity: .7; }
  to { transform: scale(1.7); opacity: 0; }
}
/* Pequeño "saludo" (sacudida) cada pocos segundos */
.whatsapp svg { animation: waWiggle 6s ease-in-out 3s infinite; }
@keyframes waWiggle {
  0%, 88%, 100% { transform: rotate(0); }
  90% { transform: rotate(-14deg); }
  92% { transform: rotate(12deg); }
  94% { transform: rotate(-8deg); }
  96% { transform: rotate(6deg); }
}
/* Punto de notificación */
.whatsapp .wa-dot {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 14px;
  height: 14px;
  border: 2px solid var(--white);
  border-radius: 50%;
  background: #ff3b30;
}

.wa-bubble {
  position: fixed;
  right: 24px;
  bottom: 96px;
  z-index: 61;
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 300px;
  padding: 14px 34px 14px 14px;
  border-radius: 14px 14px 4px 14px;
  background: var(--white);
  box-shadow: 0 16px 40px rgba(6, 26, 46, .22);
  cursor: pointer;
  opacity: 0;
  transform: translateY(10px) scale(.96);
  transform-origin: bottom right;
  transition: opacity .35s, transform .35s;
}
.wa-bubble[hidden] { display: flex; visibility: hidden; }
.wa-bubble.is-visible { opacity: 1; transform: none; visibility: visible; }
.wa-bubble__avatar { flex-shrink: 0; width: 44px; height: 44px; border-radius: 50%; object-fit: cover; object-position: top; border: 2px solid #25d366; }
.wa-bubble__text { display: flex; flex-direction: column; line-height: 1.35; }
.wa-bubble__text strong { font-size: 14px; color: var(--navy); }
.wa-bubble__text span { font-size: 13px; color: var(--text); }
.wa-bubble__close {
  position: absolute;
  top: 4px;
  right: 6px;
  width: 26px;
  height: 26px;
  border: 0;
  background: none;
  font-size: 20px;
  line-height: 1;
  color: var(--muted);
}
.wa-bubble__close:hover { color: var(--navy); }

/* ---------- Volver arriba (izquierda) ---------- */
.to-top {
  position: fixed;
  left: 24px;
  bottom: 24px;
  z-index: 60;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--navy);
  color: var(--white);
  box-shadow: 0 8px 20px rgba(6, 26, 46, .3);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity .3s, visibility .3s, transform .3s, background .3s;
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { background: var(--blue); }
.to-top:focus-visible { outline: 3px solid var(--sky); outline-offset: 3px; }
.to-top__arrow { position: relative; font-size: 22px; stroke-width: 2; transition: transform .25s; }
.to-top:hover .to-top__arrow { transform: translateY(-3px); }
.to-top__ring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.to-top__ring circle {
  fill: none;
  stroke: var(--sky);
  stroke-width: 3;
  stroke-dasharray: 150.8;   /* 2πr con r = 24 */
  stroke-dashoffset: var(--progress-offset, 150.8);
}

/* ---------- Modal de video ---------- */
.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 24px; }
.modal[hidden] { display: none; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(8, 31, 56, .88); }
.modal__dialog { position: relative; width: min(420px, 100%); }
.modal__dialog video { width: 100%; max-height: 82vh; border-radius: var(--radius); background: #000; }
.modal__close {
  position: absolute;
  top: -46px;
  right: 0;
  width: 40px;
  height: 40px;
  border: 0;
  background: none;
  color: var(--white);
  font-size: 36px;
  line-height: 1;
}

/* ---------- Animaciones de entrada ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s ease, transform .8s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .marquee__track, .video-thumb__play, .cta__bg,
  .whatsapp::before, .whatsapp::after, .whatsapp svg { animation: none; }
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1100px) {
  .header__cta { display: none; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 991px) {
  :root { --header-h: 72px; }
  .section { padding: 80px 0; }

  .burger { display: block; }
  .header__logo img { width: 160px; }
  .nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 10px 24px 26px;
    background: var(--white);
    box-shadow: 0 20px 30px rgba(11, 44, 79, .12);
    transform: translateY(-12px);
    opacity: 0;
    visibility: hidden;
    transition: opacity .25s, transform .25s, visibility .25s;
  }
  .nav.is-open { transform: none; opacity: 1; visibility: visible; }
  .nav a { padding: 14px 0; border-bottom: 1px solid var(--line); }
  .nav a::after { display: none; }
  .nav__lang { display: inline-flex; padding-top: 16px; color: var(--navy); }
  .nav__lang button.is-active { color: var(--blue); }

  .hero { padding: 80px 0 160px; }
  .hero__bg::after { background: linear-gradient(180deg, rgba(6, 26, 46, .9) 0%, rgba(1, 80, 146, .78) 100%); }
  .highlights__grid { grid-template-columns: 1fr; }
  .highlights { margin-top: -110px; background: linear-gradient(to bottom, transparent 110px, var(--ice) 110px); }
  .about { padding-top: 70px; }

  .about__grid,
  .cta__inner,
  .contact { grid-template-columns: 1fr; }
  .cta { padding: 70px 0; }
  .cta__inner { gap: 36px; }
  .cta__bg::after { background: linear-gradient(180deg, rgba(6, 26, 46, .94) 0%, rgba(6, 26, 46, .85) 100%); }
  .about__grid { gap: 50px; }
  .about__figure { max-width: 560px; }
  .why { padding: 80px 0; }
  .sectors__grid { grid-template-columns: 1fr; }
  .sectors__tabs { flex-direction: row; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; }
  .sectors__tabs::-webkit-scrollbar { display: none; }
  .sector-tab { flex: 0 0 auto; width: auto; max-width: 240px; padding: 14px 16px; }
  .sector-tab:hover { transform: none; }
  .sectors__stage { min-height: 380px; }
  .why__stats { grid-template-columns: 1fr 1fr; }

  .purpose__grid { grid-template-columns: 1fr; }
  .team__grid { grid-template-columns: 1fr; max-width: 520px; margin: 0 auto; }
  .areas__grid { grid-template-columns: 1fr 1fr; }

  .contact__faq,
  .contact__form { justify-content: center; padding: 80px 24px; }
}

@media (max-width: 640px) {
  .topbar__contact a:first-child { display: none; }
  .topbar__right .lang { display: none; }

  .about__media { grid-template-columns: 1fr; }
  .checklist { grid-template-columns: 1fr; }
  .about__figure { padding: 0 0 120px 0; }
  .quote-box { left: 16px; right: 16px; max-width: none; }

  .purpose-card { grid-template-columns: 1fr; padding: 34px 28px; }
  .purpose-card__icon { grid-row: auto; margin-bottom: 18px; }

  .areas__grid,
  .why__stats { grid-template-columns: 1fr; }
  .sectors__stage { min-height: 420px; }
  .sector-panel__card { left: 20px; right: 20px; bottom: 24px; }
  .sector-panel__card h3 { font-size: 26px; }
  .sector-panel__card p { font-size: 15px; }


  .form__row { grid-template-columns: 1fr; }
  .wa-bubble { left: 16px; right: 16px; max-width: none; bottom: 92px; }
  .to-top { left: 16px; bottom: 20px; }
  .whatsapp { right: 16px; bottom: 20px; }
  .footer__grid { grid-template-columns: 1fr; gap: 36px; }
  .marquee__track { gap: 50px; }
  .marquee__track img { height: 48px; }
}
