/* ==========================================================================
   UNLIMITED CHESS COSTA RICA — Design System
   ========================================================================== */

:root {
  /* Brand palette */
  --red: #E5312A;
  --red-light: #FF6A5E;
  --red-dark: #B81F1A;
  --ink: #171717;
  --cream: #F7F4EE;
  --white: #FFFFFF;
  --muted: #5A5550;
  --border: rgba(23, 23, 23, 0.08);
  --border-strong: rgba(23, 23, 23, 0.16);
  --red-tint: rgba(229, 49, 42, 0.08);

  /* Type */
  --font-display: "Bricolage Grotesque", "Arial Black", sans-serif;
  --font-body: "Public Sans", -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", "Courier New", monospace;

  /* Layout */
  --container-max: 1280px;
  --radius-sm: 4px;
  --radius-md: 10px;
  --ease-snap: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Base ---------- */
html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

html, body { overflow-x: hidden; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--white);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, .display {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.02;
  color: var(--ink);
  overflow-wrap: break-word;
  word-break: break-word;
}

h1 { font-size: clamp(2.2rem, 5.2vw, 5.2rem); }
h2 { font-size: clamp(2rem, 4vw, 3.2rem); }
h3 { font-size: clamp(1.3rem, 2.2vw, 1.7rem); }

p { color: var(--muted); }

a { color: var(--red); text-decoration: none; }
a:hover { color: var(--red-dark); }

::selection { background: var(--red); color: var(--white); }

:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 3px;
}

.container-wide {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1.5rem;
}

@media (min-width: 992px) {
  .container-wide { padding: 0 2.5rem; }
}

.section {
  padding: 5.5rem 0;
  position: relative;
  overflow: hidden;
}

@media (max-width: 767px) {
  .section { padding: 3.5rem 0; }
}

.bg-cream { background: var(--cream); }
.bg-ink { background: var(--ink); color: var(--white); }
.bg-ink p, .bg-ink .muted { color: rgba(255,255,255,0.65); }

/* ---------- Eyebrow / notation labels ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--red);
  font-weight: 600;
  margin-bottom: 1rem;
}

.eyebrow::before {
  content: "";
  width: 18px;
  height: 18px;
  background-image: url("../img/logo-symbol.png");
  background-size: contain;
  background-repeat: no-repeat;
  display: inline-block;
  flex-shrink: 0;
}

/* ---------- Buttons ---------- */
.btn-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--red);
  color: var(--white);
  border: 2px solid var(--red);
  padding: 0.85rem 1.9rem;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  transition: transform 0.35s var(--ease-snap), background 0.25s ease, color 0.25s ease;
}
.btn-brand:hover {
  background: var(--red-dark);
  border-color: var(--red-dark);
  color: var(--white);
  transform: translate(-2px, -2px);
}

.btn-outline-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: transparent;
  color: var(--ink);
  border: 2px solid var(--ink);
  padding: 0.85rem 1.9rem;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.95rem;
  transition: transform 0.35s var(--ease-snap), background 0.25s ease, color 0.25s ease, border-color .25s ease;
}
.btn-outline-brand:hover {
  background: var(--ink);
  color: var(--white);
  transform: translate(-2px, -2px);
}

.btn-outline-brand.on-dark {
  border-color: rgba(255,255,255,0.5);
  color: var(--white);
}
.btn-outline-brand.on-dark:hover {
  background: var(--white);
  color: var(--ink);
}

.btn-ghost-sm {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink);
  border-bottom: 1px solid var(--ink);
  padding-bottom: 2px;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.btn-ghost-sm:hover { color: var(--red); border-color: var(--red); }

/* ==========================================================================
   NAVBAR
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.navbar-brand-custom {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}
.navbar-brand-custom img { height: 38px; width: auto; }
.navbar-brand-custom .brand-word {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.15rem;
  line-height: 1.05;
  color: var(--ink);
}
.navbar-brand-custom .brand-word span {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  color: var(--red);
  font-weight: 600;
  text-transform: uppercase;
}

.nc-nav .nav-link {
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--ink);
  padding: 0.5rem 1rem !important;
  position: relative;
}
.nc-nav .nav-link::after {
  content: "";
  position: absolute;
  left: 1rem;
  right: 1rem;
  bottom: 0.25rem;
  height: 2px;
  background: var(--red);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease-snap);
}
.nc-nav .nav-link:hover::after,
.nc-nav .nav-link.active::after { transform: scaleX(1); }
.nc-nav .nav-link.active { color: var(--red); }

/* ==========================================================================
   HERO
   ========================================================================== */
.hero {
  position: relative;
  overflow: hidden;
  padding: 6rem 0 5rem;
  background: var(--white);
}

.hero-diamond-field {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.hero-diamond {
  position: absolute;
  width: 60px;
  height: 60px;
  border: 2px solid rgba(23,23,23,0.07);
  transform: rotate(45deg);
}

.hero-content { position: relative; z-index: 2; }

.hero-mark {
  position: absolute;
  right: -40px;
  top: 10%;
  width: 46vw;
  max-width: 460px;
  opacity: 0.97;
  z-index: 1;
  animation: hero-mark-float 7s ease-in-out infinite;
}
@keyframes hero-mark-float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-14px) rotate(2deg); }
}

@media (max-width: 991px) {
  .hero-mark { position: static; width: 220px; max-width: 60vw; margin: 2.5rem auto 0; display: block; }
}

.hero-kicker {
  font-family: var(--font-mono);
  color: var(--red);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.85rem;
  font-weight: 600;
}

.hero h1 { margin: 0.6rem 0 1.4rem; max-width: 12ch; }
.hero .lead-text { font-size: 1.15rem; max-width: 46ch; margin-bottom: 2.2rem; }

.hero-cta { display: flex; gap: 1rem; flex-wrap: wrap; }

/* ==========================================================================
   HERO V2 — tablero infinito
   ========================================================================== */
.hero-v2 {
  position: relative;
  background: var(--ink);
  color: var(--white);
  overflow: hidden;
  padding: 6.5rem 0 0;
  min-height: 92vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* animated diagonal board backdrop */
.hero-v2-bgboard {
  position: absolute;
  inset: -20% -20%;
  z-index: 0;
  background-image:
    repeating-linear-gradient(45deg, rgba(255,255,255,0.045) 0, rgba(255,255,255,0.045) 1px, transparent 1px, transparent 64px),
    repeating-linear-gradient(-45deg, rgba(255,255,255,0.045) 0, rgba(255,255,255,0.045) 1px, transparent 1px, transparent 64px);
  animation: board-drift 22s linear infinite;
}
@keyframes board-drift {
  0% { background-position: 0 0, 0 0; }
  100% { background-position: 640px 0, -640px 0; }
}
.hero-v2::before {
  content: "";
  position: absolute; inset: 0; z-index: 0;
  background: radial-gradient(60% 55% at 78% 30%, rgba(229,49,42,0.20), transparent 70%);
}

/* coordinate frame — real chess notation used as structural decoration */
.hero-v2-files, .hero-v2-ranks {
  position: absolute;
  z-index: 1;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.28);
  pointer-events: none;
}
.hero-v2-files {
  top: 5.6rem; left: 0; right: 0;
  display: flex;
  justify-content: space-between;
  padding: 0 1.5rem;
}
.hero-v2-ranks {
  top: 9rem; bottom: 5.5rem; left: 0.6rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
@media (min-width: 992px) {
  .hero-v2-files { padding: 0 2.5rem; }
  .hero-v2-ranks { left: 1rem; }
}
@media (max-width: 767px) {
  .hero-v2-files, .hero-v2-ranks { display: none; }
}

.hero-v2-inner {
  position: relative;
  z-index: 2;
  padding-top: 2.5rem;
  padding-bottom: 4rem;
}

.hero-v2-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 50px;
  padding: 0.4rem 1rem 0.4rem 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.75);
  margin-bottom: 1.6rem;
}
.hero-v2-badge img { width: 20px; height: 20px; }

.hero-v2-title {
  color: var(--white);
  max-width: 15ch;
  margin-bottom: 1.6rem;
}

.hero-highlight {
  position: relative;
  color: var(--red-light);
  display: inline-block;
}
.hero-highlight::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 2px;
  height: 8px;
  background: var(--red);
  transform: scaleX(0);
  transform-origin: left;
  z-index: -1;
  animation: underline-draw 0.8s var(--ease-snap) 0.5s forwards;
}
@keyframes underline-draw { to { transform: scaleX(1); } }

.hero-v2 .lead-text {
  color: rgba(255,255,255,0.68);
  font-size: 1.15rem;
  max-width: 46ch;
  margin-bottom: 2.4rem;
}

/* chess-notation ticker */
.hero-v2-ticker {
  position: relative;
  z-index: 2;
  border-top: 1px solid rgba(255,255,255,0.1);
  overflow: hidden;
  padding: 1rem 0;
  background: rgba(0,0,0,0.15);
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 48px, #000 calc(100% - 48px), transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 48px, #000 calc(100% - 48px), transparent 100%);
}
.hero-v2-ticker-track {
  display: flex;
  width: max-content;
  gap: 2.5rem;
  padding-left: 1.5rem;
  animation: ticker-scroll 26s linear infinite;
}
.hero-v2-ticker-track span {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  color: rgba(255,255,255,0.4);
  white-space: nowrap;
}
.hero-v2-ticker-track span.hl { color: var(--red-light); }
@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .hero-v2-bgboard, .hero-v2-ticker-track { animation: none; }
}

/* ==========================================================================
   AMBIENT MOTION — subtle background life for otherwise static sections
   ========================================================================== */
.amb-field {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}
.amb-diamond {
  position: absolute;
  width: 60px;
  height: 60px;
  border: 2px solid rgba(23,23,23,0.05);
  transform: rotate(45deg);
  animation: amb-drift 14s ease-in-out infinite;
}
.bg-ink .amb-diamond, .bg-ink.amb-field .amb-diamond { border-color: rgba(255,255,255,0.07); }
.amb-diamond.sz-sm { width: 30px; height: 30px; }
.amb-diamond.sz-lg { width: 100px; height: 100px; }
.amb-diamond.d1 { top: 10%; left: 4%; }
.amb-diamond.d2 { top: 70%; left: 92%; animation-delay: -4s; }
.amb-diamond.d3 { top: 20%; left: 88%; animation-delay: -8s; }
.amb-diamond.d4 { top: 78%; left: 8%; animation-delay: -11s; }
.amb-diamond.d5 { top: 45%; left: 50%; animation-delay: -6s; }

@keyframes amb-drift {
  0%, 100% { transform: rotate(45deg) translateY(0); }
  50% { transform: rotate(52deg) translateY(-16px); }
}

/* section content sits above the ambient layer */
.section > .amb-field + .container-wide,
.section > .amb-field + .section-head,
.section .container-wide { position: relative; z-index: 1; }

/* gentle continuous pulse on every eyebrow marker across the site */
.eyebrow::before {
  animation: eyebrow-pulse 3.2s ease-in-out infinite;
}
@keyframes eyebrow-pulse {
  0%, 100% { transform: scale(1) rotate(0deg); }
  50% { transform: scale(1.18) rotate(10deg); }
}

@media (prefers-reduced-motion: reduce) {
  .amb-diamond, .eyebrow::before { animation: none; }
}

/* ==========================================================================
   REVEAL ON SCROLL — "captura de casilla"
   ========================================================================== */
/* Visible by default — no dependency on JS to show content */
.reveal {
  opacity: 1;
  transform: none;
  clip-path: none;
}

/* Only once main.js confirms it's running do we hide-then-reveal */
body.js-reveal .reveal {
  opacity: 0;
  transform: translateY(28px);
  clip-path: inset(0 0 100% 0);
  transition: opacity 0.7s var(--ease-snap), transform 0.7s var(--ease-snap), clip-path 0.7s var(--ease-snap);
}
body.js-reveal .reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
  clip-path: inset(0 0 0% 0);
}
.reveal-delay-1 { transition-delay: 0.08s; }
.reveal-delay-2 { transition-delay: 0.16s; }
.reveal-delay-3 { transition-delay: 0.24s; }
.reveal-delay-4 { transition-delay: 0.32s; }

/* ==========================================================================
   SECTION HEADERS
   ========================================================================== */
.section-head { max-width: 62ch; margin-bottom: 3rem; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

/* ==========================================================================
   CARDS — general
   ========================================================================== */
.nc-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 2.2rem;
  height: 100%;
  transition: transform 0.4s var(--ease-snap), border-color 0.3s ease, box-shadow 0.4s ease;
}
.nc-card:hover {
  transform: rotate(-0.6deg) translateY(-6px);
  border-color: var(--red);
  box-shadow: 6px 10px 0 var(--red-tint);
}

.nc-card .card-index {
  font-family: var(--font-mono);
  color: var(--red);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  margin-bottom: 1.2rem;
  display: inline-block;
}

.nc-card h3 { margin-bottom: 0.8rem; }
.nc-card p { margin-bottom: 0; font-size: 0.96rem; }

/* diamond icon marker used as bullet */
.diamond-bullet {
  width: 9px;
  height: 9px;
  background: var(--red);
  transform: rotate(45deg);
  display: inline-block;
  margin-right: 0.7rem;
  flex-shrink: 0;
}

.check-list { list-style: none; padding: 0; margin: 0; }
.check-list li {
  display: flex;
  align-items: flex-start;
  gap: 0;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--border);
  color: var(--ink);
  font-weight: 500;
}
.check-list li:last-child { border-bottom: none; }

/* ==========================================================================
   ABOUT / QUIENES SOMOS
   ========================================================================== */
.about-visual {
  position: relative;
  aspect-ratio: 4/5;
  background: var(--ink);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.about-visual img { width: 100%; height: 100%; object-fit: cover; opacity: 0.85; }
.about-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(23,23,23,0.75) 100%);
}
.about-visual .about-tag {
  position: absolute;
  left: 1.5rem;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 2;
  color: var(--white);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
}

/* ==========================================================================
   METODO — real chess sequence: apertura / medio juego / final
   ========================================================================== */
.method-card {
  border-top: 3px solid var(--red);
  padding-top: 1.6rem;
  height: 100%;
}
.method-card .eyebrow { margin-bottom: 0.6rem; }

/* ==========================================================================
   LOGROS — achievement cards
   ========================================================================== */
.achieve-card {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--ink);
  aspect-ratio: 3/4;
}
.achieve-card img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.6s var(--ease-snap);
}
.achieve-card:hover img { transform: scale(1.06); }
.achieve-card::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(229,49,42,0.05) 0%, rgba(23,23,23,0.88) 78%);
  z-index: 1;
}
.achieve-card .achieve-body {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
  padding: 1.4rem;
  color: var(--white);
}
.achieve-card .achieve-tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--red-light);
  display: block;
  margin-bottom: 0.4rem;
}
.achieve-card h4 { color: var(--white); font-size: 1.15rem; margin-bottom: 0.15rem; }
.achieve-card .achieve-result { font-size: 0.88rem; color: rgba(255,255,255,0.75); }

/* ==========================================================================
   SUCURSALES banner
   ========================================================================== */
.branch-strip {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}
@media (min-width: 576px) {
  .branch-strip { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 992px) {
  .branch-strip { grid-template-columns: repeat(6, 1fr); gap: 0; border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden; }
}
.branch-item {
  padding: 1.6rem 1.2rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  position: relative;
  transition: background 0.3s ease;
}
@media (min-width: 992px) {
  .branch-item {
    border: none;
    border-right: 1px solid var(--border);
    border-radius: 0;
    padding: 1.8rem 1.4rem;
  }
  .branch-item:last-child { border-right: none; }
}
.branch-item .branch-flag { font-size: 1.6rem; display: block; margin-bottom: 0.6rem; }
.branch-item .branch-name { font-family: var(--font-display); font-weight: 800; font-size: 1.05rem; margin-bottom: 0.2rem; }
.branch-item .branch-status {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.branch-item.is-active { background: var(--red-tint); }
.branch-item.is-active .branch-status { color: var(--red); font-weight: 700; }
.branch-item.is-soon .branch-status { color: var(--muted); }
.branch-item.is-active:hover { background: rgba(229,49,42,0.13); }

/* ==========================================================================
   TESTIMONIOS
   ========================================================================== */
.testimonial-track {
  display: flex;
  gap: 1.5rem;
  overflow-x: auto;
  padding-bottom: 1rem;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.testimonial-track::-webkit-scrollbar { height: 6px; }
.testimonial-track::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 4px; }

.testimonial-card {
  scroll-snap-align: start;
  flex: 0 0 min(420px, 85vw);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 2rem;
}
.testimonial-quote-mark {
  font-family: var(--font-display);
  font-size: 3rem;
  color: var(--red);
  line-height: 1;
  display: block;
  margin-bottom: 0.5rem;
}
.testimonial-author { display: flex; align-items: center; gap: 0.8rem; margin-top: 1.4rem; }
.testimonial-author img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }
.testimonial-author .name { font-weight: 700; font-size: 0.92rem; }
.testimonial-author .role { font-family: var(--font-mono); font-size: 0.72rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }

/* ==========================================================================
   CTA FINAL
   ========================================================================== */
.cta-final {
  position: relative;
  background: var(--ink);
  color: var(--white);
  border-radius: var(--radius-md);
  padding: 4rem 2.5rem;
  overflow: hidden;
  text-align: center;
}
.cta-final h2 { color: var(--white); max-width: 20ch; margin: 0 auto 1.2rem; }
.cta-final p { max-width: 50ch; margin: 0 auto 2rem; }
.cta-final .diamond-bg {
  position: absolute;
  width: 340px; height: 340px;
  border: 2px solid rgba(255,255,255,0.06);
  transform: rotate(45deg);
  animation: amb-spin 50s linear infinite;
}
.cta-final .d1 { top: -140px; left: -100px; }
.cta-final .d2 { bottom: -160px; right: -120px; animation-direction: reverse; }

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer {
  background: var(--ink);
  color: rgba(255,255,255,0.7);
  padding: 4rem 0 2rem;
}
.site-footer a { color: rgba(255,255,255,0.7); }
.site-footer a:hover { color: var(--red-light); }
.footer-brand { display: flex; align-items: center; gap: 0.7rem; margin-bottom: 1rem; }
.footer-brand img { height: 34px; }
.footer-brand span { font-family: var(--font-display); font-weight: 800; color: var(--white); font-size: 1.1rem; }
.footer-title {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
  margin-bottom: 1.1rem;
}
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 0.6rem; font-size: 0.92rem; }
.social-row { display: flex; gap: 0.7rem; margin-top: 1.2rem; }
.social-row a {
  width: 38px; height: 38px;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.25s ease, border-color 0.25s ease, transform 0.3s var(--ease-snap);
}
.social-row a:hover { background: var(--red); border-color: var(--red); color: var(--white); transform: translateY(-3px); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  margin-top: 3rem;
  padding-top: 1.6rem;
  font-size: 0.82rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  justify-content: space-between;
}

/* ==========================================================================
   WHATSAPP FLOATING BUTTON
   ========================================================================== */
.wa-float {
  position: fixed;
  right: 1.4rem;
  bottom: 1.4rem;
  z-index: 1200;
  width: 60px; height: 60px;
  background: #25D366;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--white);
  font-size: 1.6rem;
  box-shadow: 0 10px 25px rgba(0,0,0,0.25);
  animation: wa-pulse 2.6s ease-in-out infinite;
}
.wa-float:hover { color: var(--white); }
@keyframes wa-pulse {
  0%, 100% { box-shadow: 0 10px 25px rgba(0,0,0,0.25), 0 0 0 0 rgba(37,211,102,0.5); }
  50% { box-shadow: 0 10px 25px rgba(0,0,0,0.25), 0 0 0 12px rgba(37,211,102,0); }
}

/* ==========================================================================
   PAGE HEADER (interior pages)
   ========================================================================== */
.page-header {
  background: var(--cream);
  padding: 4rem 0 3rem;
  position: relative;
  overflow: hidden;
}
.page-header .eyebrow { margin-bottom: 0.8rem; }
.page-header h1 { max-width: 18ch; }
.page-header .diamond-bg {
  position: absolute;
  width: 220px; height: 220px;
  border: 2px solid rgba(23,23,23,0.06);
  transform: rotate(45deg);
  top: -80px; right: 6%;
  animation: amb-spin 50s linear infinite;
}

@keyframes amb-spin {
  from { transform: rotate(45deg); }
  to { transform: rotate(405deg); }
}

/* ==========================================================================
   SUCURSALES HUB
   ========================================================================== */
.branch-hub-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  height: 100%;
  display: flex;
  flex-direction: column;
  transition: transform 0.4s var(--ease-snap), box-shadow 0.4s ease;
}
.branch-hub-card.is-active:hover { transform: translateY(-6px); box-shadow: 0 16px 32px rgba(23,23,23,0.1); }
.branch-hub-image {
  aspect-ratio: 16/10;
  position: relative;
  overflow: hidden;
}
.branch-hub-image img { width: 100%; height: 100%; object-fit: cover; }
.branch-hub-card.is-soon .branch-hub-image img { filter: grayscale(1); opacity: 0.5; }
.branch-hub-badge {
  position: absolute; top: 1rem; left: 1rem;
  font-family: var(--font-mono);
  font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 0.35rem 0.7rem;
  border-radius: 50px;
  background: var(--red);
  color: var(--white);
  font-weight: 700;
}
.branch-hub-card.is-soon .branch-hub-badge { background: var(--ink); }
.branch-hub-body { padding: 1.6rem; flex: 1; display: flex; flex-direction: column; }
.branch-hub-body h3 { display: flex; align-items: center; gap: 0.5rem; }
.branch-hub-body .flag { font-size: 1.3rem; }
.branch-hub-body p { flex: 1; }

/* ==========================================================================
   GALERIA
   ========================================================================== */
.gallery-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 2.5rem;
}
.gallery-filter-btn {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--ink);
  padding: 0.55rem 1.1rem;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.25s ease;
}
.gallery-filter-btn:hover { border-color: var(--red); color: var(--red); }
.gallery-filter-btn.active { background: var(--ink); border-color: var(--ink); color: var(--white); }

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}
@media (max-width: 991px) { .gallery-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 575px) { .gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 0.6rem; } }

.gallery-item {
  position: relative;
  aspect-ratio: 1/1;
  overflow: hidden;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: transform 0.45s var(--ease-snap), opacity 0.3s ease;
}
.gallery-item img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.5s var(--ease-snap);
}
.gallery-item:hover img { transform: scale(1.08); }
.gallery-item::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(23,23,23,0.7) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.gallery-item:hover::after { opacity: 1; }
.gallery-item .gi-label {
  position: absolute; left: 0.7rem; bottom: 0.6rem; z-index: 2;
  color: var(--white);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(6px);
  transition: all 0.3s ease;
}
.gallery-item:hover .gi-label { opacity: 1; transform: translateY(0); }
.gallery-item.hide { display: none; }

/* Lightbox */
.nc-lightbox {
  position: fixed; inset: 0; z-index: 1500;
  background: rgba(23,23,23,0.94);
  display: none;
  align-items: center; justify-content: center;
  padding: 2rem;
}
.nc-lightbox.open { display: flex; }
.nc-lightbox img {
  max-width: 90vw; max-height: 82vh;
  border-radius: var(--radius-sm);
  animation: lightbox-in 0.35s var(--ease-snap);
}
@keyframes lightbox-in { from { opacity: 0; transform: scale(0.94); } to { opacity: 1; transform: scale(1); } }
.nc-lightbox-close {
  position: absolute; top: 1.5rem; right: 1.5rem;
  width: 46px; height: 46px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  color: var(--white);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  border: none;
  cursor: pointer;
}
.nc-lightbox-close:hover { background: var(--red); }
.nc-lightbox-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 50px; height: 50px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  color: var(--white);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
  border: none;
  cursor: pointer;
}
.nc-lightbox-nav:hover { background: var(--red); }
.nc-lightbox-prev { left: 1.5rem; }
.nc-lightbox-next { right: 1.5rem; }

/* ==========================================================================
   EQUIPO
   ========================================================================== */
.team-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  height: 100%;
  transition: transform 0.4s var(--ease-snap), box-shadow 0.35s ease;
}
.team-card:hover { transform: translateY(-6px); box-shadow: 0 16px 30px rgba(23,23,23,0.09); }
.team-photo { aspect-ratio: 4/5; overflow: hidden; position: relative; }
.team-photo img { width: 100%; height: 100%; object-fit: cover; }
.team-country {
  position: absolute; top: 1rem; left: 1rem;
  background: rgba(255,255,255,0.92);
  border-radius: 50px;
  padding: 0.35rem 0.8rem 0.35rem 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  display: flex; align-items: center; gap: 0.4rem;
}
.team-body { padding: 1.5rem; }
.team-body .role {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--red);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  margin-bottom: 0.3rem;
  display: block;
}
.team-body h3 { font-size: 1.2rem; margin-bottom: 0.6rem; }
.team-body p { font-size: 0.9rem; margin-bottom: 0; }

/* ==========================================================================
   CONTACTO
   ========================================================================== */
.contact-info-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.6rem;
  display: flex;
  gap: 1.1rem;
  align-items: flex-start;
  height: 100%;
}
.contact-info-card .ci-icon {
  width: 46px; height: 46px;
  border-radius: 50%;
  background: var(--red-tint);
  color: var(--red);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}
.contact-info-card h4 { font-size: 1rem; margin-bottom: 0.3rem; }
.contact-info-card p { margin-bottom: 0; font-size: 0.9rem; }

.map-wrap {
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
  aspect-ratio: 16/10;
}
.map-wrap iframe { width: 100%; height: 100%; border: 0; display: block; }

.wa-big-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  background: #25D366;
  color: var(--white);
  padding: 1.1rem 2.2rem;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 1.05rem;
  transition: transform 0.3s var(--ease-snap), background 0.25s ease;
}
.wa-big-btn:hover { background: #1EBE59; color: var(--white); transform: translate(-2px,-2px); }
.wa-big-btn i { font-size: 1.5rem; }

/* ==========================================================================
   NEWS POPUP
   ========================================================================== */
.nc-popup-backdrop {
  position: fixed; inset: 0; z-index: 2000;
  background: rgba(23,23,23,0.7);
  display: none;
  align-items: center; justify-content: center;
  padding: 1.2rem;
}
.nc-popup-backdrop.open { display: flex; }
.nc-popup {
  background: var(--white);
  border-radius: var(--radius-md);
  max-width: 460px;
  width: 100%;
  overflow: hidden;
  position: relative;
  animation: popup-in 0.4s var(--ease-snap);
}
@keyframes popup-in { from { opacity: 0; transform: translateY(18px) scale(0.97); } to { opacity: 1; transform: translateY(0) scale(1); } }
.nc-popup-banner {
  position: relative;
  height: 190px;
  overflow: hidden;
}
.nc-popup-banner img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.nc-popup-banner-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(23,23,23,0.05) 0%, rgba(23,23,23,0.45) 55%, rgba(23,23,23,0.94) 100%);
}
.nc-popup-banner-text {
  position: absolute;
  left: 1.7rem; right: 1.7rem; bottom: 1.2rem;
  z-index: 2;
}
.nc-popup-banner-text .eyebrow { color: var(--red-light); margin-bottom: 0.5rem; }
.nc-popup-banner-text h3 { color: var(--white); margin-bottom: 0; font-size: 1.35rem; }
.nc-popup-body { padding: 1.6rem 1.8rem 1.8rem; }
.nc-popup-body p { font-size: 0.94rem; margin-bottom: 1.2rem; }
.nc-popup-check {
  display: flex; align-items: center; gap: 0.5rem;
  font-size: 0.82rem;
  color: var(--muted);
}
.nc-popup-close-x {
  position: absolute; top: 1rem; right: 1rem; z-index: 3;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: rgba(23,23,23,0.35);
  backdrop-filter: blur(4px);
  color: var(--white);
  border: none;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background 0.25s ease;
}
.nc-popup-close-x:hover { background: var(--red); }
