/* =========================================================
   Cordial Prevención y Salud — Sistema de diseño
   Paleta basada en el logotipo corporativo
   ========================================================= */

:root {
  /* Marca */
  --burgundy:        #8a1c4c;
  --burgundy-dark:   #6a1339;
  --burgundy-light:  #c0486c;
  --green:           #557a48;
  --green-dark:      #3c5a34;
  --green-sage:      #608460;
  --green-light:     #c0d8c0;

  /* Neutros */
  --ink:        #1d2318;
  --ink-soft:   #414a3a;
  --muted:      #6b7365;
  --line:       #e4e7de;
  --bg:         #ffffff;
  --bg-alt:     #f4f1ea;
  --bg-soft:    #eef1e7;
  --white:      #ffffff;

  /* Acentos */
  --accent:     var(--burgundy);
  --accent-2:   var(--green);

  /* Tipografía fluida */
  --fs-xs:   clamp(0.78rem, 0.75rem + 0.2vw, 0.85rem);
  --fs-sm:   clamp(0.88rem, 0.85rem + 0.2vw, 0.95rem);
  --fs-base: clamp(1rem, 0.96rem + 0.25vw, 1.08rem);
  --fs-lg:   clamp(1.15rem, 1.05rem + 0.5vw, 1.3rem);
  --fs-xl:   clamp(1.4rem, 1.2rem + 1vw, 1.8rem);
  --fs-2xl:  clamp(1.8rem, 1.4rem + 1.8vw, 2.6rem);
  --fs-3xl:  clamp(2.3rem, 1.7rem + 2.8vw, 3.6rem);

  /* Espaciado y formas */
  --radius:    14px;
  --radius-lg: 24px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(29,35,24,.06), 0 2px 6px rgba(29,35,24,.05);
  --shadow:    0 6px 18px rgba(29,35,24,.08), 0 2px 6px rgba(29,35,24,.05);
  --shadow-lg: 0 24px 60px rgba(29,35,24,.14), 0 8px 20px rgba(29,35,24,.08);
  --container:  1180px;
  --gutter:     clamp(1.1rem, 4vw, 2.5rem);
  --header-h:   92px;

  --font-sans: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --ease: cubic-bezier(.22, 1, .36, 1);
}

/* ------------------ Reset ------------------ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: 1.65;
  color: var(--ink);
  overflow-wrap: break-word;
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip; /* evita scroll horizontal sin romper position: sticky */
}
img, svg { max-width: 100%; display: block; height: auto; }
a { color: var(--burgundy); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.15; font-weight: 800; color: var(--ink); margin: 0 0 .5em; letter-spacing: -.02em; }
h1 { font-size: var(--fs-3xl); }
h2 { font-size: var(--fs-2xl); }
h3 { font-size: var(--fs-lg); }
p  { margin: 0 0 1rem; }
ul { margin: 0 0 1rem; padding-left: 1.2rem; }
:focus-visible { outline: 3px solid var(--burgundy-light); outline-offset: 2px; border-radius: 4px; }

/* ------------------ Utilidades ------------------ */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(3.5rem, 8vw, 6.5rem); }
.section--alt { background: var(--bg-alt); }
.section--soft { background: var(--bg-soft); }
.eyebrow {
  display: inline-flex; align-items: center; gap: .55rem;
  font-size: var(--fs-xs); font-weight: 800; letter-spacing: .14em;
  text-transform: uppercase; color: var(--green-dark);
  margin-bottom: 1rem;
}
.eyebrow::before { content: ""; width: 26px; height: 2px; background: var(--burgundy-light); border-radius: 2px; }
.section-head { max-width: 720px; margin-bottom: clamp(2rem, 5vw, 3.2rem); }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head.center .eyebrow { justify-content: center; }
.lead { font-size: var(--fs-lg); color: var(--ink-soft); }
.text-muted { color: var(--muted); }

/* ------------------ Botones ------------------ */
.btn {
  --btn-bg: var(--burgundy);
  --btn-fg: #fff;
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  font-family: inherit; font-weight: 700; font-size: var(--fs-sm);
  line-height: 1; padding: .95em 1.5em; border: 2px solid transparent;
  border-radius: 100px; background: var(--btn-bg); color: var(--btn-fg);
  cursor: pointer; text-decoration: none; transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .2s, color .2s, border-color .2s;
  box-shadow: 0 6px 16px rgba(138,28,76,.24);
}
.btn:hover { transform: translateY(-2px); text-decoration: none; box-shadow: 0 12px 26px rgba(138,28,76,.30); }
.btn:active { transform: translateY(0); }
.btn--green { --btn-bg: var(--green); box-shadow: 0 6px 16px rgba(85,122,72,.26); }
.btn--green:hover { box-shadow: 0 12px 26px rgba(85,122,72,.32); }
.btn--ghost { --btn-bg: transparent; --btn-fg: var(--ink); border-color: var(--line); box-shadow: none; }
.btn--ghost:hover { border-color: var(--burgundy); color: var(--burgundy); box-shadow: none; }
.btn--light { --btn-bg: #fff; --btn-fg: var(--burgundy); box-shadow: 0 8px 22px rgba(0,0,0,.16); }
.btn--sm { padding: .7em 1.1em; font-size: var(--fs-xs); }
.btn--block { width: 100%; }

/* ------------------ Header ------------------ */
.site-header {
  position: relative; z-index: 100;
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.site-header.scrolled { box-shadow: var(--shadow-sm); }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; height: var(--header-h); }
.brand { display: flex; align-items: center; gap: .6rem; flex-shrink: 1; min-width: 0; }
.brand img { height: 52px; width: auto; max-width: 100%; }
@media (max-width: 560px) { .brand img { height: 40px; } }
@media (max-width: 360px) { .brand img { height: 34px; } }
.brand:hover { text-decoration: none; }
.nav-links { display: flex; align-items: center; gap: .35rem; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  display: block; padding: .55rem .85rem; border-radius: 8px;
  color: var(--ink-soft); font-weight: 600; font-size: var(--fs-sm);
  transition: color .18s, background .18s;
}
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--burgundy); background: var(--bg-soft); text-decoration: none; }
/* Botón "Área de Clientes" dentro del menú móvil: mantener texto blanco sobre fondo burdeos */
.nav-links .nav-cta-mobile .btn,
.nav-links .nav-cta-mobile .btn:hover,
.nav-links .nav-cta-mobile .btn:focus { color: #fff; background: var(--burgundy); }
.nav-cta { display: flex; align-items: center; gap: .6rem; }
.nav-toggle {
  display: none; width: 46px; height: 46px; border: 1px solid var(--line);
  background: #fff; border-radius: 12px; cursor: pointer; padding: 0;
  align-items: center; justify-content: center;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  content: ""; display: block; width: 20px; height: 2px; background: var(--ink);
  border-radius: 2px; transition: transform .3s var(--ease), opacity .2s;
}
.nav-toggle span::before { transform: translateY(-6px); }
.nav-toggle span::after  { transform: translateY(4px); }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after  { transform: rotate(-45deg); }

@media (max-width: 940px) {
  .nav-toggle { display: inline-flex; }
  .nav-links {
    position: fixed; inset: var(--header-h) 0 auto 0;
    flex-direction: column; align-items: stretch; gap: .15rem;
    background: #fff; padding: 1rem var(--gutter) 1.5rem;
    border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
    transform: translateY(-120%); transition: transform .35s var(--ease);
    max-height: calc(100vh - var(--header-h)); overflow-y: auto;
  }
  .nav[data-open="true"] .nav-links { transform: translateY(0); }
  .nav-links a { padding: .85rem .9rem; font-size: var(--fs-base); }
  .nav-cta .btn { display: none; }
  .nav-links .nav-cta-mobile { display: block; margin-top: .6rem; }
}
.nav-cta-mobile { display: none; }

/* ------------------ Hero ------------------ */
.hero { position: relative; overflow: hidden; aspect-ratio: 32 / 15; min-height: 480px; display: flex; align-items: stretch; background: var(--ink); }
.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; z-index: 0; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(103deg, rgba(106,19,57,.96) 0%, rgba(138,28,76,.86) 34%, rgba(60,90,52,.5) 72%, rgba(96,132,96,.2) 100%);
}
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    radial-gradient(58rem 34rem at 14% -18%, rgba(255,255,255,.14), transparent 60%),
    linear-gradient(to top, rgba(20,24,16,.4), transparent 32%);
}
.hero .container { position: relative; z-index: 2; width: 100%; display: flex; flex-direction: column; justify-content: center; gap: clamp(2rem, 5vw, 3rem); padding-block: clamp(3rem, 7vw, 4.5rem); }
.hero-inner { max-width: 660px; }
.hero-deco { position: absolute; z-index: 2; top: clamp(24px, 8vh, 70px); right: clamp(24px, 6vw, 90px); width: 150px; height: 96px; display: none; pointer-events: none; }
@media (min-width: 980px) { .hero-deco { display: block; } }
.hero-deco i { position: absolute; display: block; border-radius: 9px; box-shadow: 0 8px 24px rgba(0,0,0,.25); }
.hero-deco i:nth-child(1) { width: 56px; height: 56px; left: 0; top: 14px; background: var(--burgundy-light); }
.hero-deco i:nth-child(2) { width: 30px; height: 30px; left: 66px; top: 0; background: #84b478; }
.hero-deco i:nth-child(3) { width: 30px; height: 30px; left: 102px; top: 0; background: var(--green-light); }
.hero-deco i:nth-child(4) { width: 66px; height: 30px; left: 66px; top: 40px; background: var(--green-sage); }
.hero-badge {
  display: inline-flex; align-items: center; gap: .5rem;
  background: #fff; border: 1px solid var(--line); border-radius: 100px;
  padding: .45rem .9rem; font-size: var(--fs-xs); font-weight: 700;
  color: var(--green-dark); box-shadow: var(--shadow-sm); margin-bottom: 1.4rem;
}
.hero-badge .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(96,132,96,.2); }
.hero h1 { margin-bottom: 1.1rem; color: #fff; font-size: clamp(2.5rem, 1.6rem + 3.6vw, 4rem); }
.hero h1 .hl { color: var(--green-light); }
.hero p.lead { margin-bottom: 1.9rem; max-width: 44ch; color: rgba(255,255,255,.92); }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-bottom: 2rem; }
.hero .btn--ghost { color: #fff; border-color: rgba(255,255,255,.55); }
.hero .btn--ghost:hover { background: rgba(255,255,255,.14); border-color: #fff; color: #fff; }
.hero-trust { display: flex; flex-wrap: wrap; gap: 1.4rem; font-size: var(--fs-xs); color: rgba(255,255,255,.85); }
.hero-trust span { display: inline-flex; align-items: center; gap: .45rem; font-weight: 600; }
.hero-trust svg { width: 18px; height: 18px; color: var(--green-light); }

/* Barra de datos glass del hero */
.hero-stats { display: flex; flex-wrap: wrap; gap: 1px; max-width: 860px; border-radius: var(--radius-lg); overflow: hidden; background: rgba(255,255,255,.2); border: 1px solid rgba(255,255,255,.24); box-shadow: 0 18px 50px rgba(0,0,0,.22); }
.hero-stats > div { flex: 1 1 150px; padding: 1.05rem 1.3rem; background: rgba(255,255,255,.09); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.hero-stats b { display: block; font-size: var(--fs-lg); color: #fff; line-height: 1.15; letter-spacing: -.01em; }
.hero-stats span { font-size: var(--fs-xs); color: rgba(255,255,255,.82); font-weight: 600; }

.hero-visual { position: relative; }
.hero-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); padding: clamp(1.4rem, 3vw, 2rem);
}
.hero-card h3 { font-size: var(--fs-base); display: flex; align-items: center; gap: .6rem; }
.hero-card .kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: .8rem; margin-top: 1.2rem; }
.kpi { background: var(--bg-alt); border-radius: var(--radius-sm); padding: .9rem .8rem; text-align: center; }
.kpi b { display: block; font-size: var(--fs-xl); color: var(--burgundy); line-height: 1; }
.kpi small { color: var(--muted); font-size: .72rem; font-weight: 600; }
.hero-chips { list-style: none; margin: 1.2rem 0 0; padding: 0; display: grid; gap: .55rem; }
.hero-chips li { display: flex; gap: .6rem; align-items: flex-start; font-size: var(--fs-sm); color: var(--ink-soft); }
.hero-chips svg { width: 20px; height: 20px; flex-shrink: 0; color: var(--green); margin-top: 1px; }
.hero-blob { position: absolute; inset: -18px -18px auto auto; width: 120px; height: 120px; background: var(--burgundy-light); opacity: .12; border-radius: 40% 60% 55% 45%; z-index: -1; }

@media (max-width: 860px) {
  .hero { aspect-ratio: auto; height: auto; min-height: clamp(520px, 86vh, 680px); }
  .hero-bg { object-fit: cover; object-position: 62% center; }
  .hero p.lead { max-width: none; }
  .hero::before { background: linear-gradient(125deg, rgba(106,19,57,.96) 0%, rgba(138,28,76,.9) 45%, rgba(60,90,52,.72) 100%); }
  .hero-stats > div { flex-basis: 45%; }
}

/* ------------------ Motivo de marca (bloques del logo) ------------------ */
/* Se muestra POR ENCIMA de la imagen, en la esquina superior derecha. */
.brand-squares { position: absolute; z-index: 3; display: block; width: 96px; height: 60px; pointer-events: none; filter: drop-shadow(0 4px 10px rgba(29,35,24,.18)); }
.brand-squares i { position: absolute; display: block; border-radius: 5px; }
.brand-squares i:nth-child(1) { width: 34px; height: 34px; left: 0; top: 8px; background: var(--burgundy); }
.brand-squares i:nth-child(2) { width: 18px; height: 18px; left: 40px; top: 0; background: var(--green-dark); }
.brand-squares i:nth-child(3) { width: 18px; height: 18px; left: 62px; top: 0; background: var(--green-light); }
.brand-squares i:nth-child(4) { width: 44px; height: 18px; left: 40px; top: 24px; background: var(--green-sage); }

/* ------------------ Marco de imagen editorial ------------------ */
.media-frame { position: relative; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); }
.media-frame > img {
  position: relative; z-index: 1; width: 100%; display: block; object-fit: cover;
}
.media-frame .brand-squares { top: 14px; right: 14px; }

/* Hero con fotografía */
.hero-media { position: relative; margin-inline: auto; max-width: 520px; }
.hero-media > img { position: relative; z-index: 1; width: 100%; aspect-ratio: 3/2.5; object-fit: cover; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); }
.hero-media .brand-squares { top: 14px; right: 14px; }
.hero-float {
  position: absolute; z-index: 3; left: -16px; bottom: -26px;
  background: rgba(255,255,255,.92); backdrop-filter: blur(8px);
  border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); padding: .9rem 1rem;
}
.hero-float .kpis { display: flex; gap: 1.1rem; }
.hero-float .kpi { background: transparent; padding: 0; text-align: left; }
.hero-float .kpi b { font-size: var(--fs-lg); }
.hero-pill {
  position: absolute; z-index: 3; right: -14px; top: 22px;
  background: var(--green-dark); color: #fff; font-size: var(--fs-xs); font-weight: 800;
  padding: .5rem .85rem; border-radius: 100px; box-shadow: var(--shadow);
  display: inline-flex; align-items: center; gap: .4rem;
}
.hero-pill svg { width: 15px; height: 15px; }
@media (max-width: 860px) {
  .hero-media { max-width: 460px; }
  .hero-float { left: 6px; }
  .hero-pill { right: 6px; }
}

/* ------------------ Banda editorial (imagen + texto) ------------------ */
.feature { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.feature.reverse .feature-media { order: 2; }
.feature-actions { margin-top: 1.6rem; }
.feature-media { position: relative; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); }
.feature-media > img { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; position: relative; z-index: 1; }
/* Encuadre de personas para no cortarles la cara (Servicios e Inicio) */
.feature-media > img[src*="feature-formacion"],
.svc-card__img[src*="feature-formacion"] { object-position: center 26%; }
.feature-media > img[src*="feature-maquinaria"],
.svc-card__img[src*="feature-maquinaria"] { object-position: center 20%; }
.feature-media > img[src*="feature-salud"],
.svc-card__img[src*="feature-salud"] { object-position: 32% center; }
.feature-media .brand-squares { top: 14px; right: 14px; left: auto; }
.feature-media .tag {
  position: absolute; z-index: 2; left: 16px; bottom: 16px;
  background: rgba(255,255,255,.94); backdrop-filter: blur(6px);
  border-radius: 100px; padding: .5rem .9rem; font-size: var(--fs-xs); font-weight: 800;
  color: var(--burgundy); box-shadow: var(--shadow); display: inline-flex; align-items: center; gap: .45rem;
}
.feature-media .tag svg { width: 16px; height: 16px; color: var(--green); }
@media (max-width: 780px) {
  .feature { grid-template-columns: 1fr; }
  .feature.reverse .feature-media { order: 0; }
}

.stack-lg > * + * { margin-top: clamp(3rem, 7vw, 5.5rem); }
.feature-body .eyebrow { margin-bottom: .7rem; }
.feature-body h2 { font-size: var(--fs-2xl); }

/* ------------------ Banda a pantalla completa con imagen ------------------ */
.showcase { position: relative; overflow: hidden; color: #fff; }
.showcase::before {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background: linear-gradient(115deg, rgba(58,90,52,.92), rgba(106,19,57,.82) 70%);
}
.showcase-bg { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; object-fit: cover; }
.showcase .container { position: relative; z-index: 1; }
.showcase h2, .showcase p { color: #fff; }
.showcase .lead { color: rgba(255,255,255,.9); }
.showcase-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px,1fr)); gap: 1rem; margin-top: 2rem; }
.showcase-stats .s { display: flex; flex-direction: column; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18); border-radius: var(--radius); padding: 1.2rem 1.3rem; backdrop-filter: blur(4px); }
.showcase-stats .s b { display: block; font-size: var(--fs-xl); line-height: 1.15; color: #fff; white-space: nowrap; margin-bottom: .55rem; }
.showcase-stats .s small { color: rgba(255,255,255,.82); font-weight: 600; font-size: var(--fs-xs); line-height: 1.4; }

/* CTA con imagen de fondo */
.cta-band--photo { background: none; }
.cta-band--photo .cta-bg { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.cta-band--photo .cta-bg[src*="banner"] { object-position: center 28%; }
.cta-band--photo::after {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background: linear-gradient(120deg, rgba(106,19,57,.94), rgba(138,28,76,.82) 60%, rgba(60,90,52,.7));
}
.cta-band--photo > * { position: relative; z-index: 1; }
.cta-band.cta-band--photo p { max-width: none; }
.cta-band--photo .hero-actions { justify-content: center; }

/* Page-hero con fotografía */
.page-hero--photo { color: #fff; }
.page-hero--photo::before { display: none; }
.page-hero--photo .page-hero-bg { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; object-fit: cover; }
.page-hero--photo .page-hero-bg[src*="contacto"],
.page-hero--photo .page-hero-bg[src*="servicios"],
.page-hero--photo .page-hero-bg[src*="nosotros"] { object-position: center top; }
.page-hero--photo::after {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background: linear-gradient(110deg, rgba(29,35,24,.86), rgba(106,19,57,.7));
}
.page-hero--photo .container { position: relative; z-index: 1; }
.page-hero--photo h1, .page-hero--photo .lead { color: #fff; }
.page-hero--photo .breadcrumb, .page-hero--photo .breadcrumb a { color: rgba(255,255,255,.75); }
.page-hero--photo .eyebrow { color: #f4c7d8; }
.page-hero--photo .eyebrow::before { background: var(--green-light); }

/* Tarjeta con fotografía */
.card--photo { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.card-media { height: 180px; overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.card--photo:hover .card-media img { transform: scale(1.05); }
.card--photo .card-body { padding: clamp(1.4rem, 3vw, 1.8rem); }
.card--photo::after { top: auto; bottom: 0; }

/* ------------------ Franja de acreditaciones ------------------ */
.marquee-band { background: var(--green-dark); color: #fff; padding-block: 1.15rem; }
.marquee-band .container { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .8rem 2rem; text-align: center; }
.marquee-band strong { color: #fff; }
.marquee-band span { font-size: var(--fs-sm); opacity: .92; display: inline-flex; align-items: center; gap: .5rem; }
.marquee-band span::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--green-light); }

/* ------------------ Grid de servicios ------------------ */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: clamp(1rem, 2.5vw, 1.6rem); }
.card {
  position: relative; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: clamp(1.5rem, 3vw, 2rem);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s;
  overflow: hidden;
}
.card::after { content: ""; position: absolute; left: 0; top: 0; height: 4px; width: 100%; background: linear-gradient(90deg, var(--burgundy), var(--burgundy-light)); transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease); }
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: transparent; }
.card:hover::after { transform: scaleX(1); }
.card .ico {
  width: 54px; height: 54px; border-radius: 14px; display: grid; place-items: center;
  background: var(--bg-soft); color: var(--green-dark); margin-bottom: 1.1rem;
}
.card:nth-child(3n+2) .ico { background: #f6e5ec; color: var(--burgundy); }
.card .ico svg { width: 28px; height: 28px; }
.card h3 { margin-bottom: .5rem; }
.card p { font-size: var(--fs-sm); color: var(--muted); margin-bottom: 0; }
.card .card-link { display: inline-flex; align-items: center; gap: .35rem; margin-top: 1rem; font-weight: 700; font-size: var(--fs-sm); color: var(--burgundy); }
.card .card-link svg { width: 16px; height: 16px; transition: transform .25s var(--ease); }
.card:hover .card-link svg { transform: translateX(3px); }

/* ------------------ Tarjetas de servicio con imagen de fondo ------------------ */
.svc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: clamp(1rem, 2vw, 1.5rem); }
.svc-card {
  position: relative; display: block; overflow: hidden; isolation: isolate;
  min-height: 360px; border-radius: var(--radius-lg); color: #fff; text-decoration: none;
  box-shadow: var(--shadow); transition: transform .45s var(--ease), box-shadow .45s var(--ease);
}
.svc-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-lg); text-decoration: none; }
.svc-card:focus-visible { outline: 3px solid var(--burgundy-light); outline-offset: 3px; }
.svc-card__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform .7s var(--ease); }
.svc-card:hover .svc-card__img { transform: scale(1.08); }
.svc-card::after {
  content: ""; position: absolute; inset: 0; z-index: -1; transition: opacity .45s;
  background: linear-gradient(to top, rgba(20,24,16,.94) 0%, rgba(20,24,16,.78) 26%, rgba(20,24,16,.32) 60%, rgba(20,24,16,.12) 100%);
}
.svc-card::before {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity .45s;
  background: linear-gradient(to top, rgba(106,19,57,.92) 0%, rgba(138,28,76,.55) 45%, rgba(60,90,52,.15) 100%);
}
.svc-card:hover::before { opacity: 1; }
.svc-card__body { position: relative; z-index: 1; height: 100%; min-height: inherit; display: flex; flex-direction: column; justify-content: flex-end; padding: clamp(1.3rem, 3vw, 1.7rem); }
.svc-card__ico {
  width: 54px; height: 54px; border-radius: 14px; display: grid; place-items: center; margin-bottom: auto;
  background: linear-gradient(135deg, rgba(138,28,76,.62) 0%, rgba(96,132,96,.62) 100%);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,.28); color: #fff;
  box-shadow: 0 6px 16px rgba(0,0,0,.22);
  transition: transform .4s var(--ease), background .3s;
}
.svc-card:hover .svc-card__ico { transform: translateY(-3px) scale(1.05); background: linear-gradient(135deg, rgba(138,28,76,.8) 0%, rgba(96,132,96,.8) 100%); }
.svc-card__ico svg { width: 28px; height: 28px; }
.svc-card h3 {
  color: #fff; font-size: var(--fs-lg); margin: 1rem 0 .5rem; letter-spacing: -.01em; line-height: 1.2;
  min-height: 2.4em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.svc-card p {
  color: rgba(255,255,255,.86); font-size: var(--fs-sm); line-height: 1.5; margin: 0;
  min-height: 3em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.svc-card__more { display: flex; align-items: center; justify-content: space-between; gap: .5rem; width: 100%; margin-top: 1rem; padding-top: .9rem; border-top: 1px solid rgba(255,255,255,.22); font-weight: 700; font-size: var(--fs-sm); color: #fff; }
.svc-card__arrow { flex-shrink: 0; width: 32px; height: 32px; border-radius: 50%; border: 1px solid rgba(255,255,255,.45); display: grid; place-items: center; transition: background .3s, color .3s, border-color .3s, transform .3s var(--ease); }
.svc-card__arrow svg { width: 16px; height: 16px; }
.svc-card:hover .svc-card__arrow { background: #fff; color: var(--burgundy); border-color: #fff; transform: translateX(3px); }

/* ------------------ Servicio detallado ------------------ */
.service-block {
  scroll-margin-top: calc(var(--header-h) + 20px);
  display: grid; grid-template-columns: 64px 1fr; gap: 1.4rem;
  padding: clamp(1.6rem, 3vw, 2.2rem); background: #fff;
  border: 1px solid var(--line); border-radius: var(--radius-lg);
}
.service-block .ico { width: 64px; height: 64px; border-radius: 16px; display: grid; place-items: center; background: var(--bg-soft); color: var(--green-dark); }
.service-block:nth-child(even) .ico { background: #f6e5ec; color: var(--burgundy); }
.service-block .ico svg { width: 32px; height: 32px; }
.service-block h3 { font-size: var(--fs-xl); }
.service-block p:last-child { margin-bottom: 0; }
.service-list { list-style: none; padding: 0; margin: .6rem 0 0; display: grid; gap: .5rem; }
.service-list li { display: flex; gap: .6rem; align-items: flex-start; font-size: var(--fs-sm); }
.service-list svg { width: 19px; height: 19px; color: var(--green); flex-shrink: 0; margin-top: 3px; }
@media (max-width: 620px) {
  .service-block { grid-template-columns: 1fr; gap: 1rem; }
}

/* Índice de servicios (anclas) */
/* Módulo de salto rápido a cada servicio */
.service-jump {
  background: linear-gradient(120deg, #f7edf1, #eef1e7);
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: clamp(1.25rem, 3vw, 1.85rem); margin-bottom: 2.75rem;
}
.service-jump__label {
  display: flex; align-items: center; justify-content: center; gap: .6rem; margin: 0 0 1.1rem;
  font-size: var(--fs-base); font-weight: 800; color: var(--burgundy); letter-spacing: -.01em; text-align: center;
}
.service-jump__label svg { width: 1.5rem; height: 1.5rem; flex: none; }
.service-index { display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem; }
.service-index a {
  display: inline-flex; align-items: center; gap: .45rem;
  font-size: var(--fs-sm); font-weight: 700; color: var(--ink);
  background: #fff; border: 1.5px solid var(--line); border-radius: 100px;
  padding: .6rem 1.15rem; transition: all .2s; box-shadow: 0 1px 2px rgba(29,35,24,.05);
}
.service-index a::after {
  content: ""; width: .62rem; height: .62rem; flex: none;
  background: var(--burgundy-light); transition: transform .2s, background .2s;
  -webkit-mask: no-repeat center / contain; mask: no-repeat center / contain;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
}
.service-index a:hover {
  border-color: var(--burgundy); color: #fff; background: var(--burgundy);
  text-decoration: none; transform: translateY(-2px); box-shadow: 0 8px 18px rgba(138,28,76,.28);
}
.service-index a:hover::after { background: #fff; transform: translateY(2px); }

/* ------------------ Sectores ------------------ */
.sector-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: .8rem; }
.sector {
  display: flex; align-items: center; gap: .7rem; padding: 1rem 1.1rem;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  font-weight: 600; font-size: var(--fs-sm); transition: transform .25s var(--ease), box-shadow .25s;
}
.sector:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.sector svg { width: 22px; height: 22px; color: var(--green); flex-shrink: 0; }

/* ------------------ Sectores (editorial) ------------------ */
#sectores { position: relative; overflow: clip; background: linear-gradient(180deg, #ffffff 0%, var(--bg-alt) 55%); }
#sectores::before { content: ""; position: absolute; z-index: 0; width: 36rem; height: 36rem; right: -12rem; top: -8rem; border-radius: 50%; background: radial-gradient(circle, rgba(96,132,96,.16), transparent 70%); pointer-events: none; }
#sectores::after { content: ""; position: absolute; z-index: 0; width: 28rem; height: 28rem; left: -11rem; bottom: -9rem; border-radius: 50%; background: radial-gradient(circle, rgba(192,72,108,.11), transparent 70%); pointer-events: none; }
#sectores > .container { position: relative; z-index: 1; }
.sectors-split { display: grid; grid-template-columns: .95fr 1.35fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: start; }
.sectors-intro { position: sticky; top: 90px; }
.sectors-note { position: relative; display: flex; align-items: center; gap: 1rem; margin: 1.7rem 0 1.9rem; }
.sectors-note::before { content: ""; position: absolute; left: -18px; top: 50%; transform: translateY(-50%); width: 94px; height: 94px; border-radius: 50%; background: radial-gradient(circle, rgba(192,72,108,.18), transparent 70%); z-index: 0; }
.sectors-note > * { position: relative; z-index: 1; }
.sectors-note__num { font-size: clamp(2.8rem, 2rem + 2.6vw, 3.8rem); font-weight: 800; line-height: .9; letter-spacing: -.03em; background: linear-gradient(135deg, var(--burgundy), var(--green)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.sectors-note span:last-child { font-size: var(--fs-sm); color: var(--muted); max-width: 20ch; font-weight: 600; }

.sectors-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; column-gap: clamp(1rem, 3vw, 2.5rem); counter-reset: sec; position: relative; }
.sectors-list::before { content: ""; position: absolute; top: -2px; left: 0; right: 0; height: 3px; border-radius: 3px; background: linear-gradient(90deg, var(--burgundy), var(--burgundy-light) 45%, var(--green)); }
.sec-item { position: relative; counter-increment: sec; display: flex; align-items: center; gap: .85rem; padding: 1.25rem 1.9rem 1.25rem .7rem; border-bottom: 1px solid var(--line); border-radius: 10px; transition: padding-left .35s var(--ease), background .35s; }
.sec-item:hover { padding-left: 1.1rem; background: rgba(138,28,76,.05); }
.sec-item::after { content: counter(sec, decimal-leading-zero); position: absolute; top: .8rem; right: .85rem; font-size: 1.05rem; font-weight: 700; letter-spacing: .04em; color: #b7bdac; font-variant-numeric: tabular-nums; line-height: 1; transition: color .3s; }
.sec-item:hover::after { color: #8f9683; }
.sec-ico { flex-shrink: 0; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, #f6e5ec, #e7f0e3); color: var(--burgundy); box-shadow: inset 0 0 0 1px rgba(0,0,0,.03); transition: transform .35s var(--ease), background .35s, color .35s, box-shadow .35s; }
.sec-ico svg { width: 22px; height: 22px; }
.sec-item:hover .sec-ico { background: linear-gradient(135deg, var(--burgundy), var(--green)); color: #fff; box-shadow: 0 8px 18px rgba(138,28,76,.28); transform: scale(1.08) rotate(-4deg); }
.sec-name { font-weight: 700; font-size: var(--fs-base); color: var(--ink); transition: color .3s; line-height: 1.25; }
.sec-item:hover .sec-name { color: var(--burgundy); }
@media (max-width: 860px) {
  .sectors-split { grid-template-columns: 1fr; gap: 1.5rem; }
  .sectors-intro { position: static; }
}
@media (max-width: 500px) { .sectors-list { grid-template-columns: 1fr; } }

/* ------------------ Valores / forma de trabajar ------------------ */
.values { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.2rem; }
.value { padding: 1.6rem; border-radius: var(--radius-lg); background: #fff; border: 1px solid var(--line); }
.value .num { font-size: var(--fs-sm); font-weight: 800; color: var(--burgundy-light); letter-spacing: .1em; }
.value h3 { margin: .5rem 0 .4rem; }
.value p { margin: 0; font-size: var(--fs-sm); color: var(--muted); }

/* ------------------ Bloque destacado / cifras ------------------ */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
@media (max-width: 820px) { .split { grid-template-columns: 1fr; } }
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px,1fr)); gap: 1rem; margin-top: 1.5rem; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem; }
.stat b { display: block; font-size: var(--fs-2xl); color: var(--green-dark); line-height: 1; }
.stat small { color: var(--muted); font-weight: 600; }

/* ------------------ CTA ------------------ */
.cta-band { position: relative; overflow: hidden; background: linear-gradient(120deg, var(--burgundy-dark), var(--burgundy) 55%, #a3305e); color: #fff; border-radius: var(--radius-lg); padding: clamp(2.5rem, 6vw, 4rem); }
.cta-band::before { content: ""; position: absolute; inset: auto -60px -80px auto; width: 320px; height: 320px; background: radial-gradient(circle, rgba(255,255,255,.16), transparent 65%); }
.cta-band h2, .cta-band p { color: #fff; position: relative; }
.cta-band p { opacity: .92; max-width: 52ch; }
.cta-band .hero-actions { margin-bottom: 0; margin-top: 1.6rem; position: relative; }

/* ------------------ Contacto ------------------ */
.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(1.6rem, 4vw, 3rem); align-items: start; }
@media (max-width: 820px) { .contact-grid { grid-template-columns: minmax(0, 1fr); } }
.info-list { list-style: none; padding: 0; margin: 1.4rem 0 0; display: grid; gap: 1rem; }
.info-list li { display: flex; gap: .9rem; align-items: flex-start; }
.info-list li > div { min-width: 0; }
.info-list .ico { width: 44px; height: 44px; border-radius: 12px; background: var(--bg-soft); color: var(--green-dark); display: grid; place-items: center; flex-shrink: 0; }
.info-list .ico svg { width: 22px; height: 22px; }
.info-list b { display: block; font-size: var(--fs-sm); }
.info-list a, .info-list span { color: var(--ink-soft); overflow-wrap: anywhere; }
.form-note, .map-card p, .map-card b, .legal a { overflow-wrap: anywhere; }
.form {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 4vw, 2.4rem); box-shadow: var(--shadow);
}
.field { margin-bottom: 1.1rem; }
.field label { display: block; font-weight: 700; font-size: var(--fs-sm); margin-bottom: .4rem; }
.field .req { color: var(--burgundy-light); }
.field input, .field textarea, .field select {
  width: 100%; font-family: inherit; font-size: var(--fs-base); color: var(--ink);
  padding: .8rem 1rem; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--bg-alt); transition: border-color .2s, box-shadow .2s, background .2s;
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--burgundy); background: #fff;
  box-shadow: 0 0 0 3px rgba(192,72,108,.15);
}
.field textarea { min-height: 130px; resize: vertical; }
.check { display: flex; gap: .65rem; align-items: flex-start; font-size: var(--fs-xs); color: var(--muted); }
.check input { width: 18px; height: 18px; margin-top: 3px; flex-shrink: 0; accent-color: var(--burgundy); }
.form-note { font-size: var(--fs-xs); color: var(--muted); margin-top: 1rem; }
.form-status { margin-top: 1rem; padding: .9rem 1.1rem; border-radius: var(--radius-sm); font-size: var(--fs-sm); font-weight: 600; display: none; }
.form-status.ok { display: block; background: #eaf3e6; color: var(--green-dark); border: 1px solid #cadfc0; }
.form-status.err { display: block; background: #fbe7ee; color: var(--burgundy-dark); border: 1px solid #f3c6d5; }
.field-error { display: block; margin-top: .35rem; font-size: var(--fs-xs); font-weight: 600; color: var(--burgundy); }
.field input[aria-invalid="true"], .field textarea[aria-invalid="true"] { border-color: var(--burgundy-light); background: #fdf4f7; }

/* Mapa de localización */
.map-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 1.5rem; }
.map-label { font-size: var(--fs-sm); font-weight: 800; color: var(--burgundy); margin: 0 0 .7rem; display: flex; align-items: center; gap: .45rem; }
.map-label svg { width: 18px; height: 18px; }
.map-frame { position: relative; border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); }
.map-frame iframe { display: block; width: 100%; height: clamp(320px, 42vw, 460px); border: 0; filter: saturate(1.02); }
.map-frame .map-card {
  position: absolute; z-index: 2; left: clamp(14px, 3vw, 24px); bottom: clamp(14px, 3vw, 24px);
  max-width: min(340px, calc(100% - 28px)); background: rgba(255,255,255,.96); backdrop-filter: blur(6px);
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 1.1rem 1.2rem;
}
.map-frame .map-card b { display: flex; align-items: center; gap: .5rem; font-size: var(--fs-sm); color: var(--ink); }
.map-frame .map-card b svg { width: 18px; height: 18px; color: var(--burgundy); flex-shrink: 0; }
.map-frame .map-card p { margin: .4rem 0 .8rem; font-size: var(--fs-sm); color: var(--muted); }
.map-frame .map-card .btn { width: 100%; }
@media (max-width: 520px) { .map-frame .map-card { position: static; max-width: none; border-radius: 0; border-left: 0; border-right: 0; border-bottom: 0; box-shadow: none; } }

/* ------------------ Contenido legal ------------------ */
.legal { max-width: 820px; }
.legal h2 { font-size: var(--fs-xl); margin-top: 2.2rem; }
.legal h3 { font-size: var(--fs-lg); margin-top: 1.6rem; }
.legal p, .legal li { color: var(--ink-soft); }
/* Listas numéricas alineadas a la izquierda (número al nivel del texto) */
.legal ol { list-style: none; counter-reset: legalitem; padding-left: 0; margin: 0 0 1rem; }
.legal ol > li { counter-increment: legalitem; position: relative; padding-left: 1.7em; margin-bottom: .4rem; }
.legal ol > li::before { content: counter(legalitem) "."; position: absolute; left: 0; top: 0; font-weight: 700; color: var(--ink-soft); }
.legal .updated { color: var(--muted); font-size: var(--fs-sm); }
.legal table { width: 100%; border-collapse: collapse; margin: 1.2rem 0; font-size: var(--fs-sm); }
.legal table th, .legal table td { border: 1px solid var(--line); padding: .7rem .8rem; text-align: left; vertical-align: top; }
.legal table th { background: var(--bg-soft); font-weight: 700; }
.table-wrap { overflow-x: auto; }
.page-hero { background: var(--bg-alt); position: relative; overflow: hidden; padding-block: clamp(2.6rem, 6vw, 4rem); }
.page-hero::before { content: ""; position: absolute; inset: 0; background: radial-gradient(30rem 20rem at 90% -20%, rgba(192,72,108,.14), transparent 60%); }
.page-hero .container { position: relative; }
.breadcrumb { font-size: var(--fs-xs); color: var(--muted); margin-bottom: .8rem; }
.breadcrumb a { color: var(--muted); font-weight: 600; }
.breadcrumb a:hover { color: var(--burgundy); }

/* ------------------ Footer ------------------ */
.site-footer { background: var(--green-dark); color: #d5ddcb; padding-block: clamp(3rem, 6vw, 4.5rem) 2rem; }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1.8fr) minmax(0, 1fr); gap: clamp(1.6rem, 4vw, 3rem); }
@media (max-width: 960px) { .footer-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: minmax(0, 1fr); } }
.site-footer .brand { display: inline-flex; }
.site-footer .brand img { height: 46px; filter: drop-shadow(0 0 1.5px rgba(255,255,255,.9)) drop-shadow(0 0 4px rgba(255,255,255,.5)); }
.site-footer .brand:hover { text-decoration: none; }
.footer-about p { font-size: var(--fs-sm); color: #a9b0a0; margin-top: 1rem; max-width: 34ch; }
.footer-col h4 { color: #fff; font-size: var(--fs-sm); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 1rem; }
.footer-col ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .55rem; }
.footer-col a { color: #b7bdac; font-size: var(--fs-sm); word-break: break-word; }
/* Contacto con iconos */
.footer-contact ul { display: grid; gap: 1rem; }
.footer-contact li { display: flex; align-items: center; gap: .6rem; }
.footer-contact .fico { flex-shrink: 0; width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14); color: var(--green-light); transition: background .25s var(--ease), color .25s, border-color .25s, transform .25s var(--ease); }
.footer-contact .fico svg { width: 18px; height: 18px; }
.footer-contact li:hover .fico { background: var(--green); color: #fff; border-color: transparent; transform: translateY(-2px); }
.footer-contact a, .footer-contact li > span:not(.fico) { color: #b7bdac; font-size: var(--fs-sm); line-height: 1.35; }
.footer-contact a[href^="mailto:"] { overflow-wrap: anywhere; }
.footer-contact a:hover { color: #fff; }
.footer-col a:hover { color: #fff; text-decoration: none; }
.footer-badges { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; }
.footer-badge { font-size: .72rem; font-weight: 700; padding: .35rem .7rem; border: 1px solid rgba(255,255,255,.18); border-radius: 100px; color: #cfd4c8; }
.footer-bottom { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid rgba(255,255,255,.12); display: flex; flex-wrap: wrap; gap: .8rem 1.5rem; justify-content: center; text-align: center; align-items: center; font-size: var(--fs-xs); color: #8f968684; }
.footer-bottom p { margin: 0; color: #8f9686; }
.footer-bottom nav { display: flex; flex-wrap: wrap; gap: 1rem; }
.footer-bottom a { color: #a9b0a0; }
.footer-bottom a:hover { color: #fff; text-decoration: none; }

/* ------------------ Reveal al hacer scroll ------------------ */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } }

/* ------------------ Skip link ------------------ */
.skip-link { position: absolute; left: -999px; top: 0; z-index: 200; background: var(--burgundy); color: #fff; padding: .7rem 1.2rem; border-radius: 0 0 8px 0; font-weight: 700; }
.skip-link:focus { left: 0; }

/* =========================================================
   Banner de cookies (RGPD / LSSI-CE)
   ========================================================= */
.cc-banner {
  position: fixed; z-index: 1000; left: 50%; bottom: clamp(12px, 3vw, 28px);
  transform: translate(-50%, 140%); width: min(760px, calc(100% - 24px));
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); padding: clamp(1.3rem, 3vw, 1.8rem);
  transition: transform .5s var(--ease), opacity .4s; opacity: 0;
}
.cc-banner.show { transform: translate(-50%, 0); opacity: 1; }
.cc-banner h2 { font-size: var(--fs-lg); display: flex; align-items: center; gap: .5rem; }
.cc-banner h2 svg { width: 22px; height: 22px; color: var(--burgundy); }
.cc-banner p { font-size: var(--fs-sm); color: var(--ink-soft); margin-bottom: 1.1rem; }
.cc-banner p a { font-weight: 700; }
.cc-actions { display: flex; flex-wrap: wrap; gap: .6rem; }
.cc-actions .btn { flex: 1 1 auto; min-width: 130px; }
@media (min-width: 560px) { .cc-actions { flex-wrap: nowrap; } }

/* Panel de configuración */
.cc-modal { position: fixed; inset: 0; z-index: 1001; display: none; align-items: center; justify-content: center; padding: 16px; }
.cc-modal.show { display: flex; }
.cc-overlay { position: absolute; inset: 0; background: rgba(29,35,24,.55); backdrop-filter: blur(3px); }
.cc-dialog {
  position: relative; background: #fff; border-radius: var(--radius-lg);
  width: min(640px, 100%); max-height: 90vh; overflow-y: auto;
  box-shadow: var(--shadow-lg); padding: clamp(1.5rem, 4vw, 2.2rem);
  animation: cc-pop .35s var(--ease);
}
@keyframes cc-pop { from { opacity: 0; transform: translateY(16px) scale(.98); } to { opacity: 1; transform: none; } }
.cc-dialog h2 { font-size: var(--fs-xl); }
.cc-dialog > p { font-size: var(--fs-sm); color: var(--ink-soft); }
.cc-cat { border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.2rem; margin-top: 1rem; }
.cc-cat-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.cc-cat-head h3 { font-size: var(--fs-base); margin: 0; }
.cc-cat p { font-size: var(--fs-sm); color: var(--muted); margin: .5rem 0 0; }
.cc-fixed { font-size: var(--fs-xs); font-weight: 800; color: var(--green-dark); text-transform: uppercase; letter-spacing: .06em; }
.cc-dialog-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.6rem; }
.cc-dialog-actions .btn { flex: 1 1 auto; }
.cc-close { position: absolute; top: 12px; right: 12px; width: 40px; height: 40px; border: none; background: var(--bg-alt); border-radius: 50%; cursor: pointer; display: grid; place-items: center; }
.cc-close svg { width: 20px; height: 20px; }

/* Interruptor */
.switch { position: relative; display: inline-block; width: 46px; height: 26px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .track { position: absolute; inset: 0; background: #cdd2c4; border-radius: 100px; transition: background .25s; cursor: pointer; }
.switch .track::before { content: ""; position: absolute; height: 20px; width: 20px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: transform .25s var(--ease); box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.switch input:checked + .track { background: var(--green); }
.switch input:checked + .track::before { transform: translateX(20px); }
.switch input:disabled + .track { background: var(--green-sage); opacity: .55; cursor: not-allowed; }
.switch input:focus-visible + .track { outline: 3px solid var(--burgundy-light); outline-offset: 2px; }

/* Botón subir al principio */
.to-top {
  position: fixed; right: 16px; bottom: 16px; z-index: 900;
  width: 48px; height: 48px; border-radius: 50%; border: none;
  background: var(--burgundy); color: #fff; box-shadow: var(--shadow-lg);
  cursor: pointer; display: grid; place-items: center;
  opacity: 0; transform: translateY(14px); pointer-events: none;
  transition: opacity .3s var(--ease), transform .3s var(--ease), background .2s;
}
.to-top.show { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { background: var(--burgundy-dark); transform: translateY(-3px); }
.to-top svg { width: 22px; height: 22px; }
@media (max-width: 560px) { .to-top { bottom: 14px; right: 14px; } }

/* Botón flotante para reabrir preferencias */
.cc-reopen {
  position: fixed; left: 16px; bottom: 16px; z-index: 900;
  width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--line);
  background: #fff; box-shadow: var(--shadow); cursor: pointer;
  display: none; place-items: center; transition: transform .25s var(--ease);
}
.cc-reopen.show { display: grid; }
.cc-reopen:hover { transform: scale(1.08) rotate(-8deg); }
.cc-reopen svg { width: 24px; height: 24px; color: var(--green-dark); }

/* =========================================================
   Interactividad y movimiento visual
   ========================================================= */

/* Reveal con escalonado y variante de escala */
.reveal { transition-delay: var(--reveal-delay, 0ms); }
.reveal-scale { opacity: 0; transform: scale(.94); transition: opacity .7s var(--ease), transform .7s var(--ease); transition-delay: var(--reveal-delay, 0ms); }
.reveal-scale.in { opacity: 1; transform: none; }

/* Barra de progreso de scroll */
.scroll-progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 200; pointer-events: none; }
.scroll-progress span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--burgundy), var(--burgundy-light) 55%, var(--green)); box-shadow: 0 0 12px rgba(138,28,76,.45); }

/* Movimiento en imágenes de fondo (Ken Burns) */
.hero-bg { animation: none; }
.showcase-bg, .page-hero-bg { animation: kenburns 30s ease-in-out infinite alternate; }
@keyframes kenburns { from { transform: scale(1.05); } to { transform: scale(1.16) translate(-1.5%, -1%); } }
/* Hero: zoom muy suave para que la escena se vea desde más lejos */
@keyframes heroZoom { from { transform: scale(1); } to { transform: scale(1.04); } }

/* Decoración flotante del hero */
.hero-deco { animation: floaty 7s ease-in-out infinite alternate; }
@keyframes floaty { from { transform: translateY(-7px); } to { transform: translateY(9px); } }

/* Botones: barrido de brillo */
.btn { position: relative; overflow: hidden; isolation: isolate; }
.btn::after {
  content: ""; position: absolute; top: 0; left: -130%; width: 65%; height: 100%; z-index: -1;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.38), transparent);
  transform: skewX(-18deg); transition: left .6s var(--ease);
}
.btn:hover::after { left: 140%; }
.btn--light::after { background: linear-gradient(100deg, transparent, rgba(138,28,76,.14), transparent); }

/* Tarjetas: resplandor, icono animado */
.card .ico { transition: transform .35s var(--ease), background .3s, color .3s; }
.card:hover .ico { transform: translateY(-3px) rotate(-5deg) scale(1.07); }
.card::before {
  content: ""; position: absolute; inset: 0; z-index: 0; opacity: 0; pointer-events: none;
  background: radial-gradient(24rem 16rem at 50% -10%, rgba(192,72,108,.10), transparent 70%);
  transition: opacity .4s;
}
.card:hover::before { opacity: 1; }
.card > * { position: relative; z-index: 1; }

/* Sectores: icono con vida */
.sector svg { transition: transform .3s var(--ease), color .3s; }
.sector:hover svg { transform: scale(1.18) rotate(-6deg); color: var(--burgundy); }

/* Navegación: subrayado animado */
.nav-links a { position: relative; }
.nav-links a::after {
  content: ""; position: absolute; left: .85rem; right: .85rem; bottom: 5px; height: 2px;
  background: var(--burgundy); border-radius: 2px; transform: scaleX(0); transform-origin: left;
  transition: transform .3s var(--ease);
}
.nav-links a:hover::after, .nav-links a[aria-current="page"]::after { transform: scaleX(1); }
@media (max-width: 940px) { .nav-links a::after { display: none; } }

/* Valores: número con degradado + hover */
.value { transition: transform .35s var(--ease), box-shadow .35s var(--ease); }
.value:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.value .num {
  font-size: var(--fs-lg);
  background: linear-gradient(120deg, var(--burgundy), var(--burgundy-light));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.value::after { content: ""; position: absolute; right: -18px; top: -18px; width: 92px; height: 92px; border-radius: 50%; background: radial-gradient(circle, rgba(96,132,96,.14), transparent 70%); }

/* ------------------ Nuestra forma de trabajar (workway) ------------------ */
.workway { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(1rem, 2vw, 1.5rem); }
@media (max-width: 900px) { .workway { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 460px) { .workway { grid-template-columns: 1fr; } }
.workway-card { position: relative; overflow: hidden; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(1.5rem, 3vw, 1.9rem); transition: transform .4s var(--ease), box-shadow .4s var(--ease); }
.workway-card::after { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: linear-gradient(90deg, var(--burgundy), var(--green)); transform: scaleX(0); transform-origin: left; transition: transform .4s var(--ease); }
.workway-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.workway-card:hover::after { transform: scaleX(1); }
.workway-num { position: absolute; top: .75rem; right: 1.1rem; z-index: 0; font-size: clamp(1.5rem, 1.2rem + .8vw, 1.9rem); font-weight: 800; line-height: 1; letter-spacing: -.02em; color: var(--green-light); }
.workway-ico { position: relative; z-index: 1; width: 54px; height: 54px; border-radius: 15px; display: grid; place-items: center; background: #f6e5ec; color: var(--burgundy); margin-bottom: 1.1rem; transition: transform .4s var(--ease), background .35s, color .35s; }
.workway-card:hover .workway-ico { transform: translateY(-3px) scale(1.06); }
.workway-ico svg { width: 27px; height: 27px; }
.workway-card h3 { position: relative; z-index: 1; font-size: var(--fs-lg); margin: 0 0 .5rem; }
.workway-card p { position: relative; z-index: 1; font-size: var(--fs-sm); color: var(--muted); margin: 0; }

/* ------------------ Acreditaciones (rejilla 2x2) ------------------ */
.accred-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1rem, 2vw, 1.5rem); }
@media (max-width: 600px) { .accred-grid { grid-template-columns: 1fr; } }
.accred-card { display: flex; gap: 1.1rem; align-items: flex-start; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(1.4rem, 3vw, 1.9rem); transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s; }
.accred-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); border-color: transparent; }
.accred-ico { flex-shrink: 0; width: 58px; height: 58px; border-radius: 15px; display: grid; place-items: center; background: var(--bg-soft); color: var(--green-dark); transition: background .35s, color .35s, transform .35s var(--ease); }
.accred-card:hover .accred-ico { transform: scale(1.05) rotate(-3deg); }
.accred-ico svg { width: 28px; height: 28px; }
.accred-body h3 { font-size: var(--fs-base); margin: 0 0 .35rem; }
.accred-body p { font-size: var(--fs-sm); color: var(--muted); margin: 0 0 .7rem; }
.accred-badge { display: inline-flex; align-items: center; gap: .35rem; font-size: var(--fs-xs); font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--burgundy); }
.accred-badge svg { width: 16px; height: 16px; color: var(--burgundy-light); }

/* Marquesina animada (franja de acreditaciones) */
.marquee { overflow: hidden; }
.marquee .marquee-track { display: flex; align-items: center; gap: 0 2.4rem; width: max-content; animation: marquee 36s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee .marquee-track span { white-space: nowrap; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* Imágenes editoriales: zoom suave al pasar el ratón */
.feature-media, .media-frame { overflow: hidden; }
.feature-media > img, .media-frame > img { transition: transform .6s var(--ease); }
.feature-media:hover > img, .media-frame:hover > img { transform: scale(1.05); }

/* Índice de servicios activo (scrollspy) */
.service-index a.active { border-color: var(--burgundy); color: #fff; background: var(--burgundy); box-shadow: 0 6px 14px rgba(138,28,76,.24); }
.service-index a.active::after { background: #fff; }

/* Fondos decorativos por sección */
.section--alt {
  background:
    radial-gradient(42rem 26rem at 100% 0%, rgba(192,72,108,.06), transparent 60%),
    radial-gradient(40rem 30rem at 0% 100%, rgba(96,132,96,.07), transparent 60%),
    var(--bg-alt);
}
.section--soft { position: relative; overflow: hidden; }
.section--soft::before { content: ""; position: absolute; z-index: 0; width: 30rem; height: 30rem; right: -9rem; top: -9rem; border-radius: 50%; background: radial-gradient(circle, rgba(192,72,108,.08), transparent 70%); }
.section--soft > .container { position: relative; z-index: 1; }

/* Acento superior de marca en el pie */
.site-footer { border-top: 3px solid transparent; border-image: linear-gradient(90deg, var(--burgundy), var(--burgundy-light) 45%, var(--green)) 1; }
.info-list .ico { transition: transform .3s var(--ease); }
.info-list li:hover .ico { transform: translateY(-3px) scale(1.06); }


[data-count] { font-variant-numeric: tabular-nums; }

/* Respeto por "reducir movimiento" */
@media (prefers-reduced-motion: reduce) {
  .hero-bg, .showcase-bg, .cta-bg, .page-hero-bg, .hero-deco, .marquee .marquee-track { animation: none !important; }
  .btn::after { display: none; }
  .feature-media:hover > img, .media-frame:hover > img { transform: none; }
}
