:root {
  --gm-navy: #00167A;
  --gm-navy-deep: #000B3D;
  --gm-red: #CC1111;
  --gm-red-soft: #FF9686;
  --gm-white: #FFFFFF;
  --gm-bg: #FFFBF3;
  --gm-bg-alt: #FFFFFF;
  --gm-text: #14163A;
  --gm-text-muted: #585C7B;
  --gm-border: #E6E1D3;
  --gm-border-navy: #D6D9EE;
  --gm-radius-btn: 999px;
  --gm-radius-card: 26px;
  --gm-font-display: "DM Serif Display", serif;
  --gm-font-body: "News Cycle", sans-serif;
  --gm-font-script: "Pompiere", cursive;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-padding-top: 160px;
}
@media (min-width: 641px) {
  html { scroll-padding-top: 96px; }
}

body {
  font-family: var(--gm-font-body);
  font-weight: 400;
  color: var(--gm-text);
  background: var(--gm-bg);
  line-height: 1.55;
}

h1, h2, h3 { font-family: var(--gm-font-display); font-weight: 400; }
section:not(.hero) h2 { font-size: clamp(1.8rem, 3vw, 2.4rem); line-height: 1.2; }

.container { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

img { max-width: 100%; display: block; }

/* ---------- Header ---------- */
header.site-header {
  position: sticky;
  top: 0;
  background: color-mix(in srgb, var(--gm-bg) 90%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--gm-border);
  z-index: 50;
}

header.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  padding-bottom: 14px;
  gap: 16px;
}

.logo {
  display: flex; align-items: center; gap: 14px;
  text-decoration: none; color: var(--gm-navy);
}
footer.site-footer .logo--white { color: #fff; }
.logo-key { width: 38px; height: 38px; flex: none; fill: currentColor; }
.logo-divider { width: 1.5px; height: 34px; background: currentColor; opacity: .4; flex: none; }
.logo-text { display: flex; flex-direction: column; align-items: center; line-height: 1.15; }
.logo-wordmark {
  font-family: var(--gm-font-display); font-weight: 400;
  font-size: 1.35rem; color: currentColor; white-space: nowrap;
}
.logo-slogan {
  font-family: var(--gm-font-script); font-weight: 400;
  font-size: 0.95rem; color: currentColor; white-space: nowrap; text-align: center;
}

nav.site-nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

nav.site-nav a {
  color: var(--gm-text);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
  position: relative;
  padding-bottom: 4px;
}
.site-nav a::after {
  content: "";
  position: absolute; left: 0; right: 100%; bottom: 0; height: 2px;
  background: var(--gm-navy);
  transition: right .25s ease;
}
.site-nav a:hover::after, .site-nav a.active::after { right: 0; }
.site-nav a.active { color: var(--gm-navy); }

.lang-toggle { display: flex; gap: 4px; flex: none; }
.lang-toggle button {
  display: flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: 1px solid var(--gm-border-navy);
  color: var(--gm-text-muted);
  padding: 4px 12px 4px 6px;
  border-radius: var(--gm-radius-btn);
  cursor: pointer;
  font-family: var(--gm-font-body);
  font-weight: 700;
  font-size: 0.85rem;
  transition: border-color .15s ease, background .15s ease;
}
.lang-flag {
  width: 18px; height: 18px; border-radius: 50%;
  object-fit: cover; flex: none;
  box-shadow: 0 0 0 1px rgba(0,0,0,.08);
}
.lang-toggle button[aria-pressed="true"] {
  border-color: var(--gm-navy);
  color: var(--gm-navy);
  background: color-mix(in srgb, var(--gm-navy) 8%, transparent);
}
.lang-toggle button:not([aria-pressed="true"]) { opacity: .6; }
.lang-toggle button:hover { opacity: 1; border-color: var(--gm-navy); }

@media (max-width: 760px) {
  header.site-header .container { flex-wrap: wrap; row-gap: 10px; }
  .site-nav { order: 3; width: 100%; }
  nav.site-nav ul { flex-wrap: wrap; justify-content: center; gap: 8px 14px; }
  .lang-toggle { order: 2; }
}

/* ---------- Section rhythm ---------- */
section { padding: 84px 0; }
section.on-dark { background: var(--gm-navy); color: #EEF0FB; }
section.on-dark h2 { color: #fff; }
section.on-dark .lead { color: #C7CCEE; }
section.on-light { background: var(--gm-bg); }
section.alt-bg { background: var(--gm-bg-alt); }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--gm-font-body); font-size: 0.85rem; font-weight: 700;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--gm-navy); margin-bottom: 14px;
}
.eyebrow::before { content: ""; width: 16px; height: 2px; border-radius: 2px; background: var(--gm-navy); }
section.on-dark .eyebrow { color: var(--gm-red-soft); }
section.on-dark .eyebrow::before { background: var(--gm-red-soft); }

.lead { color: var(--gm-text-muted); max-width: 58ch; margin: 0 0 36px; font-size: 1.05rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--gm-font-body); font-weight: 700; font-size: 1rem;
  padding: 15px 30px; border-radius: var(--gm-radius-btn);
  text-decoration: none; border: none; cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease, border-color .18s ease;
}
.btn svg { width: 20px; height: 20px; flex: none; }
.btn-solid-navy {
  background: var(--gm-navy); color: #fff;
  box-shadow: 0 10px 24px -10px color-mix(in srgb, var(--gm-navy) 60%, transparent);
}
.btn-solid-navy:hover { transform: translateY(-2px); }
.btn-row { display: flex; gap: 14px; flex-wrap: wrap; }
.btn-row.center { justify-content: center; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden; isolation: isolate;
  padding: 170px 0 120px; text-align: left;
  background: radial-gradient(120% 100% at 50% 0%, var(--gm-navy) 0%, var(--gm-navy-deep) 100%);
  color: #EEF0FB;
}
.hero .container { position: relative; z-index: 1; }
.hero-bg-video {
  position: absolute; inset: 0; z-index: -3; pointer-events: none;
  width: 100%; height: 100%; object-fit: cover; opacity: .85;
}
.hero-scrim {
  position: absolute; inset: 0; z-index: -2; pointer-events: none;
  background: radial-gradient(65% 60% at 50% 30%, rgba(0,11,61,.1) 0%, rgba(0,11,61,.3) 55%, rgba(0,11,61,.58) 100%);
}
.hero-glow {
  position: absolute; left: 50%; bottom: 40px; transform: translateX(-50%);
  width: min(1000px, 92%); height: 220px; z-index: -2; pointer-events: none;
  background: radial-gradient(ellipse at center, rgba(255,120,90,.4) 0%, rgba(255,120,90,0) 72%);
  filter: blur(6px);
}
@media (prefers-reduced-motion: reduce) { .hero-bg-video { display: none; } }

.hero-sound-toggle {
  position: absolute; left: 24px; bottom: 24px; z-index: 2;
  width: 44px; height: 44px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,11,61,.45); backdrop-filter: blur(6px);
  border: 1.5px solid rgba(255,255,255,.35); color: #fff;
  cursor: pointer; transition: background .18s ease, border-color .18s ease, transform .18s ease;
  animation: hero-sound-pulse 2.4s ease-out infinite;
}
.hero-sound-toggle:hover { background: rgba(0,11,61,.65); border-color: rgba(255,255,255,.6); transform: scale(1.06); }
.hero-sound-toggle[aria-pressed="true"] { animation: none; }
@keyframes hero-sound-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(255,255,255,.55); }
  70%  { box-shadow: 0 0 0 16px rgba(255,255,255,0); }
  100% { box-shadow: 0 0 0 0 rgba(255,255,255,0); }
}
@media (prefers-reduced-motion: reduce) { .hero-sound-toggle { animation: none; } }
.hero-sound-toggle svg { width: 20px; height: 20px; flex: none; }
.hero-sound-toggle .icon-sound { display: none; }
.hero-sound-toggle[aria-pressed="true"] .icon-muted { display: none; }
.hero-sound-toggle[aria-pressed="true"] .icon-sound { display: block; }
@media (max-width: 640px) {
  .hero-sound-toggle { left: 16px; bottom: 16px; width: 40px; height: 40px; }
  .hero-sound-toggle svg { width: 18px; height: 18px; }
}

.hero-tag {
  display: block;
  font-family: var(--gm-font-body);
  font-size: 0.9rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--gm-red-soft); margin-bottom: 22px;
  text-shadow: 0 1px 10px rgba(0,0,0,.45);
}

.hero-heading { flex: 1.7 1 360px; }

.hero-title {
  font-family: var(--gm-font-display); font-weight: 400;
  font-size: clamp(2.3rem, 4.2vw, 3.5rem); line-height: 1.16;
  color: #fff; margin: 0 0 16px;
  text-shadow: 0 2px 20px rgba(0,0,0,.55);
}

.hero-subtitle {
  font-family: var(--gm-font-body); font-size: 1.3rem; color: #D6DAF4;
  margin: 0; max-width: 52ch; text-shadow: 0 1px 12px rgba(0,0,0,.5);
}

.hero-row {
  display: flex; gap: 40px; flex-wrap: wrap;
  align-items: flex-end; justify-content: space-between;
}

.hero-cta-block {
  display: flex; flex-direction: column; align-items: flex-start; gap: 12px;
  flex: 1 1 220px; max-width: 320px;
}
.hero-cta-micro { font-size: 0.82rem; color: var(--gm-red-soft); text-shadow: 0 1px 8px rgba(0,0,0,.4); }

.btn-hero-cta {
  background: transparent; color: #fff;
  border: 1.5px solid rgba(255,255,255,.55);
}
.btn-hero-cta:hover {
  background: color-mix(in srgb, var(--gm-red-soft) 18%, transparent);
  border-color: var(--gm-red-soft);
}

.btn-shine { position: relative; overflow: hidden; }
.btn-shine::after {
  content: ""; position: absolute; top: 0; left: -75%;
  width: 45%; height: 100%; pointer-events: none;
  background: linear-gradient(115deg, transparent 0%, rgba(255,255,255,.6) 50%, transparent 100%);
  transform: skewX(-20deg);
  animation: btn-shine-sweep 4.5s ease-in-out infinite;
}
@keyframes btn-shine-sweep {
  0%, 55% { left: -75%; }
  100% { left: 150%; }
}
@media (prefers-reduced-motion: reduce) {
  .btn-shine::after { animation: none; display: none; }
}

@media (max-width: 640px) {
  .hero { padding-top: 140px; }
  .hero-row { justify-content: center; }
  .hero-cta-block { flex: 0 0 auto; max-width: 100%; align-items: center; }
  .hero-cta-micro { text-align: center; }
}

/* ---------- Pillars (confianza) ---------- */
.pillars-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 30px 32px; margin-top: 16px;
}
.pillar-card {
  border-top: 2px solid var(--gm-navy); padding-top: 16px;
}
.pillar-card h4 {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--gm-font-body); font-weight: 700; font-size: 1.2rem;
  margin-bottom: 8px; color: var(--gm-text);
}
.pillar-card .title-icon { width: 18px; height: 18px; flex: none; color: var(--gm-navy); }
.pillar-card p { color: var(--gm-text-muted); }

/* ---------- NIW spotlight ---------- */
.niw-list {
  display: flex; flex-direction: column; gap: 12px; list-style: none;
  max-width: 74ch; margin: 6px 0 26px; padding-left: 0;
}
.niw-list li { position: relative; padding-left: 26px; color: #C7CCEE; line-height: 1.55; }
.niw-list li strong { color: #fff; font-weight: 700; }
.niw-list li::before {
  content: "✓"; position: absolute; left: 0; top: 0;
  color: #34D399; font-weight: 700; font-size: 1rem; line-height: 1.55;
}

.niw-cta { margin-top: 32px; padding-top: 26px; border-top: 1px solid rgba(255,255,255,.14); }
.niw-cta-tagline {
  font-family: var(--gm-font-body); font-size: 1rem; color: var(--gm-red-soft); margin: 0 0 18px;
}

/* ---------- Autopetición ---------- */
#autopeticion .lead { margin-bottom: 18px; }
.autopeticion-text { color: var(--gm-text-muted); max-width: 74ch; margin: 0 0 8px; }
.autopeticion-text strong, #autopeticion .lead strong { color: var(--gm-text); font-weight: 700; }

.autopeticion-seals { margin-top: 30px; }
.autopeticion-seals-label {
  display: block; font-weight: 700; font-size: 1rem;
  color: var(--gm-text); margin-bottom: 14px;
}
.autopeticion-seals-row { display: flex; align-items: center; gap: 32px; flex-wrap: wrap; }
.autopeticion-seal { height: 88px; width: auto; }

.autopeticion-split { display: flex; align-items: center; gap: 56px; flex-wrap: wrap; }
.autopeticion-text-col { flex: 1 1 380px; }
.autopeticion-media {
  flex: 1 1 380px; aspect-ratio: 4 / 3; border-radius: var(--gm-radius-card);
  overflow: hidden;
}
.autopeticion-media video { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---------- Services ---------- */
.services-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px; margin: 8px 0 0;
}
.service-card {
  background: var(--gm-bg-alt); border: 1px solid var(--gm-border);
  border-radius: var(--gm-radius-card); padding: 28px;
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; height: 100%;
  transition: border-color .18s ease, transform .18s ease;
}
.service-card::before {
  content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 4px;
  background: var(--gm-navy); transform: scaleX(0); transform-origin: left;
  transition: transform .25s ease;
}
.service-card:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--gm-navy) 40%, var(--gm-border)); }
.service-card:hover::before { transform: scaleX(1); }
.service-card .card-icon {
  width: 42px; height: 42px; border-radius: 14px;
  background: color-mix(in srgb, var(--gm-navy) 10%, transparent);
  display: flex; align-items: center; justify-content: center;
  color: var(--gm-navy); margin-bottom: 16px;
}
.service-card .card-icon svg { width: 22px; height: 22px; }
.service-card h4 { font-size: 1.2rem; font-weight: 400; margin-bottom: 6px; }
.service-card-subtitle {
  display: block; font-size: 0.82rem; font-weight: 700; letter-spacing: 0.04em;
  text-transform: uppercase; color: var(--gm-navy); margin-bottom: 12px;
}
.service-card p { color: var(--gm-text-muted); font-size: 0.95rem; margin-bottom: 18px; }
.service-card .btn { display: flex; width: fit-content; margin: auto auto 0; padding: 10px 20px; font-size: 0.9rem; }

.service-card--featured:hover {
  border-color: var(--gm-navy); box-shadow: 0 12px 30px -14px color-mix(in srgb, var(--gm-navy) 45%, transparent);
}

/* ---------- Testimonials (pending) ---------- */
.testimonials { padding: 72px 0 88px; }
.testimonials .container { margin-bottom: 12px; }

.testimonials-track {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.testimonials-track.is-animated { overflow: hidden; }
.testimonials-strip {
  display: flex;
  gap: 18px;
  width: max-content;
  padding: 8px 24px 12px;
}
.testimonials-strip.is-animated {
  animation: testimonials-scroll 50s linear infinite;
}
.testimonials-track.is-animated:hover .testimonials-strip { animation-play-state: paused; }
@keyframes testimonials-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .testimonials-strip.is-animated { animation: none; }
}

.testimonial-card {
  flex: 0 0 300px;
  background: var(--gm-bg-alt);
  border: 1px solid var(--gm-border);
  border-radius: var(--gm-radius-card);
  padding: 20px;
  transition: border-color .18s ease;
  display: flex;
  flex-direction: column;
}
.testimonial-card:hover { border-color: var(--gm-navy); }
.testimonial-stars { display: flex; gap: 3px; margin-bottom: 12px; }
.testimonial-stars svg { width: 14px; height: 14px; fill: var(--gm-navy); }

.testimonial-header { margin-bottom: 10px; }
.testimonial-name { font-weight: 700; font-size: 0.92rem; color: var(--gm-text); }
.testimonial-credentials { font-size: 0.78rem; color: var(--gm-text-muted); margin: 2px 0 6px; }
.testimonial-visa {
  display: inline-block;
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.02em;
  color: var(--gm-navy);
  border: 1px solid var(--gm-navy);
  border-radius: var(--gm-radius-btn);
  padding: 2px 9px;
}

.testimonial-quote {
  font-family: var(--gm-font-body);
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--gm-text-muted);
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  overflow: hidden;
}
.testimonial-quote.is-expanded {
  -webkit-line-clamp: unset;
  overflow: visible;
}
.testimonial-toggle {
  align-self: flex-start;
  margin-top: auto;
  background: none; border: none; cursor: pointer; padding: 0;
  font-family: var(--gm-font-body); font-size: 0.85rem; font-weight: 700;
  color: var(--gm-navy); text-decoration: underline;
}

/* ---------- Nosotros ---------- */
.about-body { max-width: 68ch; }
.about-body p { margin-bottom: 16px; color: var(--gm-text-muted); }
.team-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 28px; margin: 28px 0 40px; max-width: 500px;
}
.team-card { text-align: center; }
.team-photo {
  width: 100%; aspect-ratio: 3 / 4; object-fit: cover;
  border-radius: var(--gm-radius-card); margin-bottom: 14px;
}
.team-name { font-weight: 700; font-size: 1.05rem; color: var(--gm-text); margin-bottom: 2px; }
.team-role { font-size: 0.85rem; color: var(--gm-text-muted); }

/* ---------- Footer ---------- */
footer.site-footer {
  padding: 48px 0 32px;
  background: var(--gm-navy-deep);
  color: #A9AEDC;
  font-size: 0.9rem;
}
footer.site-footer .logo { margin-bottom: 18px; }
.footer-legal { max-width: 72ch; margin: 0 0 24px; font-size: 0.82rem; line-height: 1.6; color: #fff; }
.footer-contact { display: flex; flex-wrap: wrap; align-items: center; gap: 22px; margin-bottom: 24px; }
.footer-location-btn { background: none; border: none; cursor: pointer; padding: 0; }
.footer-location-text {
  margin: -10px 0 24px; font-size: 0.85rem; line-height: 1.6; color: #fff; max-width: 60ch;
}
footer.site-footer .footer-contact-link {
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; transition: color .18s ease;
}
.footer-contact-link svg { width: 30px; height: 30px; flex: none; }
footer.site-footer .footer-contact-link:hover { color: var(--gm-red-soft); }
.footer-links { display: flex; flex-wrap: wrap; gap: 18px; margin-bottom: 22px; }
footer.site-footer a { color: #fff; text-decoration: none; }
footer.site-footer a:hover { color: var(--gm-red-soft); }
.footer-bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px;
  border-top: 1px solid rgba(255,255,255,.1); padding-top: 20px; font-size: 0.78rem; color: #fff;
}

/* ---------- Responsive tweaks ---------- */
@media (max-width: 640px) {
  section { padding: 64px 0; }
  .hero { padding: 130px 0 70px; }
}

/* ---------- Floating WhatsApp ---------- */
.whatsapp-float {
  position: fixed; right: 22px; bottom: 22px; z-index: 100;
  width: 58px; height: 58px; border-radius: 50%;
  background: #25D366; color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 24px -6px rgba(0,0,0,.4);
  transition: transform .18s ease;
}
.whatsapp-float svg { width: 28px; height: 28px; }
.whatsapp-float:hover { transform: scale(1.08); }
@media (max-width: 640px) {
  .whatsapp-float { right: 16px; bottom: 16px; width: 52px; height: 52px; }
  .whatsapp-float svg { width: 25px; height: 25px; }
}
body.has-consent-banner .whatsapp-float { bottom: 128px; }
@media (max-width: 640px) {
  body.has-consent-banner .whatsapp-float { bottom: 210px; }
}

/* ---------- Consent banner ---------- */
.consent-banner {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 200;
  background: var(--gm-bg-alt);
  border-top: 3px solid var(--gm-navy);
  box-shadow: 0 -8px 24px -12px rgba(0,0,0,.25);
  padding: 18px 24px;
}
.consent-banner-inner {
  max-width: 1120px; margin: 0 auto;
  display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
}
.consent-banner-text {
  flex: 1 1 220px; font-size: 0.85rem; color: var(--gm-text); font-weight: 700; margin: 0;
}
.consent-banner-checks { display: flex; flex-direction: column; gap: 6px; flex: 2 1 340px; }
.consent-check {
  display: flex; align-items: flex-start; gap: 8px; cursor: pointer;
  font-size: 0.8rem; color: var(--gm-text-muted); line-height: 1.4;
}
.consent-check input { margin-top: 2px; width: 15px; height: 15px; flex: none; cursor: pointer; accent-color: var(--gm-navy); }
.consent-check a { color: var(--gm-navy); text-decoration: underline; }
#consent-accept {
  flex: none; padding: 11px 22px; font-size: 0.85rem;
}
#consent-accept:disabled {
  background: var(--gm-border-navy); color: var(--gm-text-muted);
  cursor: not-allowed; box-shadow: none;
}
@media (max-width: 640px) {
  .consent-banner { padding: 16px; }
  .consent-banner-inner { flex-direction: column; align-items: stretch; text-align: left; }
  .consent-banner-text, .consent-banner-checks { flex: none; }
  #consent-accept { width: 100%; }
}
