/* ========================================
   777ABOGADOS - STYLES.CSS
   Brandbook Colors & Typography Applied
   ======================================== */

/* ==================== ROOT VARIABLES ==================== */
:root {
  /* Brandbook Colors */
  --color-gunmetal: #2f323a;
  --color-ecru: #e2c189;
  --color-khaki: #c9b499;
  --color-snow: #fff9fe;
  --color-navy-ink: #0c223d;
  --color-navy-deep: #081529;
  /* RGB helpers for translucent effects that respect the brand palette */
  --color-gunmetal-rgb: 47, 50, 58;
  --color-ecru-rgb: 226, 193, 137;
  --color-khaki-rgb: 201, 180, 153;
  --color-snow-rgb: 255, 249, 254;
  --color-navy-ink-rgb: 12, 34, 61;
  --color-navy-deep-rgb: 8, 21, 41;

  /* Surface blends (still derived from brandbook colors) */
  --surface-gunmetal-deep: rgba(var(--color-gunmetal-rgb), 0.96);
  --surface-gunmetal-soft: rgba(var(--color-gunmetal-rgb), 0.82);
  --surface-gunmetal-light: rgba(var(--color-gunmetal-rgb), 0.65);
  --surface-ecru-soft: rgba(var(--color-ecru-rgb), 0.18);
  --surface-ecru-glow: rgba(var(--color-ecru-rgb), 0.3);
  --surface-snow-muted: rgba(var(--color-snow-rgb), 0.4);

  /* Layout */
  --header-height: 56px;

  /* Typography */
  --font-primary: "Lora", serif;
  --font-display: "Oswald", sans-serif; /* Fuente para títulos (similar a DISTANCIA) */
  --font-secondary: "Lora", serif;

  /* Spacing */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 2rem;
  --spacing-lg: 3rem;
  --spacing-xl: 4rem;
  --spacing-xxl: 6rem;

  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;
  --transition-preloader: 0.8s cubic-bezier(0.76, 0, 0.24, 1);

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(var(--color-gunmetal-rgb), 0.08);
  --shadow-md: 0 4px 16px rgba(var(--color-gunmetal-rgb), 0.12);
  --shadow-lg: 0 8px 32px rgba(var(--color-gunmetal-rgb), 0.16);
  --shadow-xl: 0 16px 48px rgba(var(--color-gunmetal-rgb), 0.2);
}

@media (max-width: 1024px) {
  :root {
    --header-height: 52px;
  }
}

@media (max-width: 600px) {
  :root {
    --header-height: 48px;
  }
}

/* ==================== RESET & BASE STYLES ==================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-primary);
  color: var(--color-gunmetal);
  background: linear-gradient(
    180deg,
    rgba(var(--color-gunmetal-rgb), 0.18) 0%,
    rgba(var(--color-snow-rgb), 0.85) 40%,
    rgba(var(--color-snow-rgb), 1) 100%
  );
  line-height: 1.7;
  overflow-x: hidden;
  min-height: 100vh;
  position: relative;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--color-gunmetal);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(
      circle at 20% 15%,
      rgba(var(--color-ecru-rgb), 0.14),
      transparent 55%
    ),
    radial-gradient(
      circle at 80% 35%,
      rgba(var(--color-khaki-rgb), 0.12),
      transparent 65%
    ),
    url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="160" height="160" viewBox="0 0 160 160"><g fill="none" stroke="%23E2C189" stroke-opacity="0.08" stroke-width="1"><path d="M0 0h160v160H0z"/><path d="M80 0v160M0 80h160"/></g></svg>');
  background-size:
    100% 100%,
    100% 100%,
    160px 160px;
  opacity: 0.55;
  pointer-events: none;
  mix-blend-mode: soft-light;
  animation: bodyAurora 24s ease-in-out infinite alternate;
  z-index: -1;
  /* Optimize animation performance */
  will-change: transform;
}

@media (prefers-reduced-motion: reduce) {
  body::before,
  .hero::before {
    animation: none;
  }

  .hero-logo-group,
  .hero-logo-trace,
  .hero-logo-fill,
  .hero-logo-outline,
  .hero-wordmark {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }

  .hero-logo-trace,
  .hero-logo-outline {
    stroke-dashoffset: 0 !important;
  }
}

/* ==================== ADVANCED SCROLL ANIMATIONS ==================== */
[data-animate] {
  opacity: 0;
  transform: translate3d(0, 38px, 0) scale(0.98);
  filter: blur(12px);
  will-change: opacity, transform, filter;
}

[data-animate].animated {
  opacity: 1;
  filter: blur(0);
}

[data-animate].animated-rise {
  animation: animateRise 0.9s cubic-bezier(0.22, 0.9, 0.3, 1) forwards;
}

[data-animate].animated-fade-up {
  animation: animateFadeUp 0.95s cubic-bezier(0.18, 0.87, 0.4, 1) forwards;
}

[data-animate].animated-scale-up {
  transform-origin: center;
  animation: animateScaleUp 1.1s cubic-bezier(0.16, 0.84, 0.44, 1.01) forwards;
}

[data-animate].animated-sketch {
  position: relative;
  animation: animateSketch 1.1s cubic-bezier(0.2, 0.9, 0.32, 1) forwards;
}

[data-animate].animated-sketch::after {
  content: "";
  position: absolute;
  inset: clamp(-8px, -1.1vw, -12px);
  border: 1.5px dashed rgba(var(--color-ecru-rgb), 0.45);
  border-radius: clamp(12px, 2vw, 18px);
  opacity: 0;
  transform: scale(0.85);
  filter: drop-shadow(0 0 12px rgba(var(--color-ecru-rgb), 0.25));
  animation: sketchOutline 1.4s ease forwards 0.25s;
  pointer-events: none;
}

[data-animate].animated-pulse {
  animation: animatePulse 1.1s cubic-bezier(0.21, 0.84, 0.32, 1.08) forwards;
}

[data-animate].animated-flare {
  animation: animateFlare 1.2s cubic-bezier(0.26, 0.86, 0.36, 1) forwards;
}

[data-animate].animated-counter {
  animation: animateCounter 1.05s cubic-bezier(0.18, 0.92, 0.42, 1) forwards;
}

[data-animate].animated-framework {
  position: relative;
  animation: animateFramework 1.15s cubic-bezier(0.2, 0.9, 0.28, 1) forwards;
}

[data-animate].animated-framework::before,
[data-animate].animated-framework::after {
  content: "";
  position: absolute;
  inset: clamp(-12px, -1.6vw, -20px);
  border-radius: clamp(18px, 3vw, 28px);
  border: 1px solid rgba(var(--color-ecru-rgb), 0.32);
  opacity: 0;
  pointer-events: none;
  transform: scale(0.88);
  filter: drop-shadow(0 0 18px rgba(var(--color-ecru-rgb), 0.25));
  animation: frameworkTrace 1.45s ease forwards;
  animation-delay: 0.28s;
}

[data-animate].animated-framework::after {
  inset: clamp(-20px, -2.4vw, -28px);
  border: 1px dashed rgba(var(--color-ecru-rgb), 0.2);
  filter: drop-shadow(0 0 28px rgba(var(--color-ecru-rgb), 0.28));
  animation-delay: 0.48s;
}

@keyframes animateRise {
  0% {
    opacity: 0;
    transform: translate3d(0, 48px, 0) scale(0.95);
    filter: blur(16px);
  }
  48% {
    filter: blur(4px);
  }
  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
    filter: blur(0);
  }
}

@keyframes animateFadeUp {
  0% {
    opacity: 0;
    transform: translate3d(0, 36px, 0) scale(0.96);
    filter: blur(18px);
  }
  40% {
    opacity: 0.55;
    transform: translate3d(0, 12px, 0) scale(0.99);
  }
  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
    filter: blur(0);
  }
}

@keyframes animateScaleUp {
  0% {
    opacity: 0;
    transform: scale(0.72) rotate(-4deg);
    filter: drop-shadow(0 0 0 rgba(var(--color-ecru-rgb), 0));
  }
  45% {
    opacity: 0.75;
    transform: scale(1.03) rotate(1deg);
    filter: drop-shadow(0 12px 28px rgba(var(--color-ecru-rgb), 0.25));
  }
  100% {
    opacity: 1;
    transform: scale(1) rotate(0deg);
    filter: drop-shadow(0 14px 32px rgba(var(--color-ecru-rgb), 0.3));
  }
}

@keyframes animateSketch {
  0% {
    opacity: 0;
    transform: translate3d(0, 34px, 0) scale(0.94) rotate(-2deg);
  }
  40% {
    opacity: 0.8;
    transform: translate3d(0, -6px, 0) scale(1.02) rotate(1deg);
  }
  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1) rotate(0deg);
  }
}

@keyframes sketchOutline {
  0% {
    opacity: 0;
    transform: scale(0.8) rotate(-4deg);
    box-shadow: 0 0 0 rgba(var(--color-ecru-rgb), 0);
  }
  55% {
    opacity: 1;
    transform: scale(1.02) rotate(1deg);
    box-shadow: 0 0 22px rgba(var(--color-ecru-rgb), 0.35);
  }
  100% {
    opacity: 0.7;
    transform: scale(1) rotate(0deg);
    box-shadow: 0 0 16px rgba(var(--color-ecru-rgb), 0.25);
  }
}

@keyframes animatePulse {
  0% {
    opacity: 0;
    transform: translate3d(0, 32px, 0) scale(0.92);
    box-shadow: 0 0 0 rgba(var(--color-ecru-rgb), 0);
  }
  45% {
    opacity: 0.9;
    transform: translate3d(0, -6px, 0) scale(1.02);
    box-shadow: 0 18px 36px rgba(var(--color-ecru-rgb), 0.25);
  }
  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
    box-shadow: 0 12px 28px rgba(var(--color-ecru-rgb), 0.2);
  }
}

@keyframes animateFlare {
  0% {
    opacity: 0;
    transform: translate3d(0, 48px, 0) scale(0.94);
    box-shadow: 0 0 0 rgba(var(--color-ecru-rgb), 0);
  }
  50% {
    opacity: 0.95;
    transform: translate3d(0, -8px, 0) scale(1.02);
    box-shadow: 0 32px 64px rgba(var(--color-ecru-rgb), 0.28);
  }
  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
    box-shadow: 0 22px 44px rgba(var(--color-ecru-rgb), 0.22);
  }
}

@keyframes animateCounter {
  0% {
    opacity: 0;
    transform: translate3d(0, 32px, 0) scale(0.9);
  }
  40% {
    opacity: 0.75;
    transform: translate3d(0, -6px, 0) scale(1.04);
  }
  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
  }
}

@keyframes animateFramework {
  0% {
    opacity: 0;
    transform: translate3d(0, 42px, 0) scale(0.9);
    filter: blur(14px);
  }
  45% {
    opacity: 0.95;
    transform: translate3d(0, -8px, 0) scale(1.03);
    filter: blur(0);
  }
  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
    filter: blur(0);
  }
}

@keyframes frameworkTrace {
  0% {
    opacity: 0;
    transform: scale(0.75);
  }
  40% {
    opacity: 0.65;
    transform: scale(1);
  }
  70% {
    opacity: 0.35;
    transform: scale(0.96);
  }
  100% {
    opacity: 0;
    transform: scale(0.9);
  }
}

@media (prefers-reduced-motion: reduce) {
  [data-animate] {
    opacity: 1;
    transform: none !important;
    filter: none !important;
  }
}

/* Disable animations for users who prefer reduced motion */
@keyframes bodyAurora {
  0% {
    transform: translate3d(-1%, 0, 0) scale(1);
    opacity: 0.5;
  }
  50% {
    transform: translate3d(1%, -1%, 0) scale(1.03);
    opacity: 0.65;
  }
  100% {
    transform: translate3d(-1%, 1%, 0) scale(1.02);
    opacity: 0.55;
  }
}

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

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition-normal);
}

ul {
  list-style: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ==================== PRELOADER ANIMATION ==================== */
#preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--surface-gunmetal-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  transition:
    transform var(--transition-preloader),
    opacity var(--transition-preloader);
  opacity: 1;
}

.monogram-preloader {
  width: clamp(112px, 18vw, 180px);
  height: auto;
  animation: preloaderPulse 2.2s ease-in-out infinite;
  shape-rendering: geometricPrecision;
  text-rendering: optimizeLegibility;
}

.preloader-fill {
  opacity: 0.85;
  animation: preloaderGlow 2.4s ease-in-out infinite;
}

.preloader-outline {
  stroke-dasharray: 4800;
  stroke-dashoffset: 4800;
  animation: preloaderTrace 2.4s ease-in-out infinite;
}

@keyframes preloaderPulse {
  0% {
    transform: scale(1);
    opacity: 0.75;
  }
  50% {
    transform: scale(1.05);
    opacity: 1;
  }
  100% {
    transform: scale(1);
    opacity: 0.75;
  }
}

@keyframes preloaderTrace {
  0% {
    stroke-dashoffset: 4800;
    opacity: 0;
  }
  40% {
    opacity: 1;
  }
  100% {
    stroke-dashoffset: 0;
    opacity: 1;
  }
}

@keyframes preloaderGlow {
  0%,
  100% {
    filter: drop-shadow(0 0 0 rgba(var(--color-ecru-rgb), 0.18));
  }
  50% {
    filter: drop-shadow(0 0 24px rgba(var(--color-ecru-rgb), 0.45));
  }
}

/* When page is loaded, hide preloader by sliding up */
body.loaded #preloader,
#preloader.is-hiding {
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
}

/* Hide header and hero initially to prevent FOUC */
body:not(.loaded) .header,
body:not(.loaded) .hero {
  opacity: 0;
}

/* Transition for header/hero fade-in after load */
body.loaded .header,
body.loaded .hero {
  opacity: 1;
  transition: opacity 0.5s ease 0.3s; /* Delay fade-in until preloader is gone */
}

/* ==================== UTILITY CLASSES ==================== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

.section-padding {
  padding: var(--spacing-xxl) 0;
}

/* ==================== IMMERSIVE SECTION CANVAS ==================== */
.immersive-section {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  --glow-one: 25% 20%;
  --glow-two: 75% 80%;
  --glow-one-alpha: 0.18;
  --glow-two-alpha: 0.12;
  --pattern-opacity: 0.28;
  --pattern-size: 200px;
  --immersive-depth: 0;
}

.immersive-section::before,
.immersive-section::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  transition:
    opacity 1.2s ease,
    transform 1.2s ease;
}

.immersive-section::before {
  inset: -12%;
  background:
    radial-gradient(
      circle at var(--glow-one),
      rgba(var(--color-ecru-rgb), var(--glow-one-alpha)),
      transparent 62%
    ),
    radial-gradient(
      circle at var(--glow-two),
      rgba(var(--color-khaki-rgb), var(--glow-two-alpha)),
      transparent 64%
    );
  opacity: 0;
  transform: scale(1.12);
  z-index: 0;
}

.immersive-section::after {
  background:
    linear-gradient(
      120deg,
      rgba(var(--color-gunmetal-rgb), 0.08),
      rgba(var(--color-snow-rgb), 0.06)
    ),
    url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="160" height="160" viewBox="0 0 160 160"><g fill="none" stroke="%23C9B499" stroke-opacity="0.08" stroke-width="1"><path d="M0 0h160v160H0z"/><path d="M0 80h160"/><path d="M80 0v160"/></g></svg>');
  background-size:
    100% 100%,
    var(--pattern-size) var(--pattern-size);
  opacity: var(--pattern-opacity);
  mix-blend-mode: soft-light;
  z-index: 0;
}

.immersive-section > * {
  position: relative;
  z-index: 1;
  transform: translate3d(0, calc(var(--immersive-depth, 0) * -28px), 0);
  transition:
    transform 1s cubic-bezier(0.33, 1, 0.68, 1),
    filter 1s cubic-bezier(0.33, 1, 0.68, 1);
  filter: drop-shadow(
    0 24px 46px
      rgba(var(--color-gunmetal-rgb), calc(var(--immersive-depth, 0) * 0.35))
  );
}

/* Excluir el carrusel de áreas de práctica del efecto immersive para mantener el fondo estático */
.practice-areas-section > .carousel-3d-fullscreen {
  transform: none !important;
  filter: none !important;
}

.immersive-section.is-immersive-active::before {
  opacity: 1;
  transform: scale(1.02) translate3d(0, 0, 0);
  animation: sectionGlow 18s ease-in-out infinite alternate;
  /* Optimize performance - only animate when needed */
  will-change: transform;
}

.immersive-section.is-immersive-active::after {
  opacity: calc(var(--pattern-opacity) + 0.15);
}

@keyframes sectionGlow {
  0% {
    transform: scale(1.02) translate3d(-1%, -1%, 0);
  }
  50% {
    transform: scale(1.05) translate3d(1%, 1%, 0);
  }
  100% {
    transform: scale(1.02) translate3d(-0.5%, 0.5%, 0);
  }
}

/* Disable immersive section animations for reduced motion */
@media (prefers-reduced-motion: reduce) {
  .immersive-section.is-immersive-active::before {
    animation: none;
    transform: scale(1) translate3d(0, 0, 0);
  }

  .immersive-section > * {
    transform: none;
    filter: none;
  }
}

/* ==================== HEADER ==================== */

.header {
  background: var(--color-gunmetal);
  padding: 0.18rem 0;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  box-shadow: 0 4px 14px rgba(var(--color-gunmetal-rgb), 0.18);
  transition:
    transform var(--transition-fast),
    background-color var(--transition-normal),
    padding var(--transition-fast);
  will-change: transform, background-color;
}

.header.scrolled {
  padding: 0.12rem 0;
  background: var(--color-gunmetal);
}


.header-container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 clamp(0.85rem, 2.6vw, 1.75rem);
  display: flex;
  align-items: center;
  gap: clamp(0.6rem, 1.2vw, 1.5rem);
}

.logo-container {
  display: flex;
  align-items: center;
  gap: clamp(0.4rem, 1vw, 0.75rem);
  cursor: pointer;
  transition: var(--transition-normal);
  margin-right: clamp(0.5rem, 1.8vw, 2rem);
}

.logo-container:hover {
  transform: translateY(-2px);
}

.brand-logo {
  width: clamp(54px, 6vw, 84px);
  height: auto;
  display: block;
  transition: var(--transition-normal);
  shape-rendering: geometricPrecision;
  text-rendering: optimizeLegibility;
  filter: drop-shadow(0 0 10px rgba(var(--color-ecru-rgb), 0.5));
}

.logo-container:hover .brand-logo {
  transform: scale(1.05);
}

.brand-text {
  color: var(--color-ecru);
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.brand-name {
  font-family: var(--font-display);
  font-size: clamp(1.18rem, 2.5vw, 1.6rem);
  font-weight: 600;
  letter-spacing: 0.16em;
  line-height: 1.05;
  text-shadow: 0 0 12px rgba(var(--color-ecru-rgb), 0.55);
}

.brand-tagline {
  font-family: var(--font-display);
  font-size: clamp(0.6rem, 0.98vw, 0.82rem);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0.9;
  text-shadow: 0 0 10px rgba(var(--color-ecru-rgb), 0.48);
}

/* Navigation */
.nav-menu {
  display: flex;
  align-items: center;
  margin-left: auto;
}

.nav-list {
  display: flex;
  gap: clamp(0.38rem, 0.95vw, 1.05rem);
  align-items: center;
}

.nav-link {
  color: #ffe3b0;
  font-family: var(--font-display);
  font-size: clamp(0.58rem, 0.88vw, 0.72rem);
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0.12rem 0;
  position: relative;
  transition: var(--transition-normal);
  text-shadow: 0 0 8px rgba(var(--color-ecru-rgb), 0.48);
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1.25px;
  background-color: #ffeec6;
  transition: width var(--transition-normal);
  box-shadow: 0 0 8px rgba(var(--color-ecru-rgb), 0.42);
}

.nav-link:hover,
.nav-link.active {
  color: #fff2c9;
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.btn-contact {
  background-color: #ffd69b;
  color: #181a20;
  padding: 0.22rem 0.9rem;
  border-radius: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  transition: var(--transition-normal);
  box-shadow:
    0 2px 10px rgba(var(--color-gunmetal-rgb), 0.18),
    0 0 12px rgba(var(--color-ecru-rgb), 0.45);
}

.btn-contact:hover {
  background-color: #ffe0ad;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(var(--color-gunmetal-rgb), 0.2);
}

.btn-contact::after {
  display: none;
}

.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  gap: 0.25rem;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.mobile-menu-toggle span {
  width: 25px;
  height: 3px;
  background-color: var(--color-ecru);
  transition: var(--transition-normal);
}

/* ==================== HERO SECTION ==================== */
.hero {
  position: relative;
  margin-top: var(--header-height);
  min-height: clamp(88vh, 102vh, 122vh);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: linear-gradient(
      180deg,
      rgba(var(--color-gunmetal-rgb), 0.94) 0%,
      rgba(var(--color-gunmetal-rgb), 0.96) 38%,
      rgba(var(--color-gunmetal-rgb), 0.98) 68%,
      rgba(var(--color-gunmetal-rgb), 0.92) 100%
    ),
    radial-gradient(
      circle at 50% 20%,
      rgba(var(--color-ecru-rgb), 0.12) 0%,
      transparent 58%
    );
  padding: clamp(2.65rem, 7.5vw, 4.85rem) clamp(1.75rem, 5vw, 3.25rem)
    clamp(5.6rem, 11vw, 7.8rem);
  overflow: hidden;
  color: var(--color-ecru);
}

.hero::before {
  content: "";
  position: absolute;
  inset: -12% -8% -6%;
  background:
    radial-gradient(
      circle at 38% 12%,
      rgba(var(--color-ecru-rgb), 0.18),
      transparent 58%
    ),
    radial-gradient(
      circle at 72% 68%,
      rgba(var(--color-khaki-rgb), 0.14),
      transparent 66%
    );
  mix-blend-mode: screen;
  opacity: 0.5;
  animation: heroGlow 24s ease-in-out infinite alternate;
  pointer-events: none;
}

.hero::after {
  content: "";
  position: absolute;
  inset: -8% -8% -28% -8%;
  background: linear-gradient(
    184deg,
    rgba(var(--color-gunmetal-rgb), 0.88) 0%,
    rgba(var(--color-gunmetal-rgb), 0.94) 42%,
    rgba(var(--color-gunmetal-rgb), 0.98) 78%,
    rgba(var(--color-gunmetal-rgb), 0.9) 100%
  );
  pointer-events: none;
}

@keyframes heroGlow {
  0% {
    transform: rotate(0deg) scale(1);
    opacity: 0.48;
  }
  50% {
    transform: rotate(2deg) scale(1.05);
    opacity: 0.6;
  }
  100% {
    transform: rotate(-2deg) scale(1.03);
    opacity: 0.5;
  }
}


.hero-inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(0.9rem, 2.6vw, 1.75rem);
  width: min(560px, 94%);
}

.hero-logo-wrapper {
  width: clamp(220px, 34vw, 420px);
  filter: drop-shadow(0 14px 24px rgba(var(--color-ecru-rgb), 0.18));
}

.hero-logo {
  width: 100%;
  height: auto;
  display: block;
  shape-rendering: geometricPrecision;
  text-rendering: optimizeLegibility;
}

.hero-logo-group {
  transform-origin: center;
  animation: heroGroupEntrance 1.15s ease-out forwards;
}

/* Animación de construcción pieza por pieza */
.hero-logo-piece {
  opacity: 0;
  transform: translateY(20px) scale(0.95);
}

.hero-logo-piece.piece-1 {
  animation: heroPieceBuild 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) 0.2s forwards;
}

.hero-logo-piece.piece-2 {
  animation: heroPieceBuild 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) 0.6s forwards;
}

.hero-logo-piece.piece-3 {
  animation: heroPieceBuild 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) 1.0s forwards;
}

.hero-logo-piece.piece-4 {
  animation: heroPieceBuild 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) 1.4s forwards;
}

.hero-logo-trace {
  stroke-dasharray: var(--hero-stroke-length, 4200);
  stroke-dashoffset: var(--hero-stroke-length, 4200);
  opacity: 0;
  animation: heroTraceDraw 2.6s cubic-bezier(0.77, 0, 0.23, 1) forwards;
}

.hero-logo-fill {
  opacity: 0;
  transform: scale(0.985);
  animation: heroFillSolid 1.8s ease-out 1.2s forwards;
}

.hero-logo-outline {
  stroke-dasharray: var(--hero-stroke-length, 4200);
  stroke-dashoffset: var(--hero-stroke-length, 4200);
  opacity: 0;
  animation: heroOutlinePulse 1.9s ease-out 1.35s forwards;
  transform-origin: center;
}

.hero-wordmark {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(0.32rem, 1vw, 0.75rem);
  margin-top: clamp(0.65rem, 1.5vw, 1.1rem);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  opacity: 0;
  animation: heroWordmarkReveal 1s ease-out 1.4s forwards;
}

.hero-wordmark-name {
  font-family: var(--font-display);
  font-size: clamp(2.45rem, 5.8vw, 4.15rem);
  font-weight: 600;
  letter-spacing: 0.18em;
}

.hero-wordmark-tagline {
  font-family: var(--font-display);
  font-size: clamp(1.12rem, 2.8vw, 1.68rem);
  opacity: 0.88;
  letter-spacing: 0.22em;
  white-space: nowrap;
}

@keyframes heroGroupEntrance {
  0% {
    opacity: 0;
    transform: scale(0.94);
  }
  55% {
    opacity: 1;
    transform: scale(1.02);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes heroPieceBuild {
  0% {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }
  60% {
    opacity: 1;
    transform: translateY(-3px) scale(1.02);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes iconBounce {
  0% {
    transform: scale(0.5) rotate(-180deg);
    opacity: 0;
  }
  50% {
    transform: scale(1.15) rotate(10deg);
  }
  75% {
    transform: scale(0.95) rotate(-5deg);
  }
  100% {
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }
}

@keyframes heroTraceDraw {
  0% {
    stroke-dashoffset: var(--hero-stroke-length, 4200);
    opacity: 0;
  }
  25% {
    opacity: 0.45;
  }
  100% {
    stroke-dashoffset: 0;
    opacity: 1;
  }
}

@keyframes heroFillSolid {
  0% {
    opacity: 0;
    transform: scale(0.975);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes heroOutlinePulse {
  0% {
    stroke-dashoffset: var(--hero-stroke-length, 4200);
    opacity: 0;
  }
  45% {
    opacity: 0.45;
  }
  100% {
    stroke-dashoffset: 0;
    opacity: 0.85;
  }
}

@keyframes heroWordmarkReveal {
  0% {
    opacity: 0;
    transform: translateY(18px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 600px) {
  .hero-logo-wrapper {
    width: min(88vw, 340px);
  }

  .hero-wordmark {
    letter-spacing: 0.16em;
    gap: 0.4rem;
  }

  .hero-wordmark-name {
    font-size: clamp(2.1rem, 12vw, 2.9rem);
  }

  .hero-wordmark-tagline {
    font-size: clamp(1rem, 6.5vw, 1.48rem);
    letter-spacing: 0.2em;
  }
}

@keyframes bodyAurora {
  0% {
    transform: translate3d(-1%, 0, 0) scale(1);
    opacity: 0.5;
  }
  50% {
    transform: translate3d(1%, -1%, 0) scale(1.03);
    opacity: 0.65;
  }
  100% {
    transform: translate3d(-1%, 1%, 0) scale(1.02);
    opacity: 0.55;
  }
}

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

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition-normal);
}

ul {
  list-style: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ==================== PRELOADER ANIMATION ==================== */
#preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--surface-gunmetal-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  transition:
    transform var(--transition-preloader),
    opacity var(--transition-preloader);
  opacity: 1;
}

.monogram-preloader {
  width: 100px;
  height: 120px;
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 0.8;
  }
  50% {
    transform: scale(1.1);
    opacity: 1;
  }
  100% {
    transform: scale(1);
    opacity: 0.8;
  }
}

/* When page is loaded, hide preloader by sliding up */
body.loaded #preloader,
#preloader.is-hiding {
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
}

/* Hide header and hero initially to prevent FOUC */
body:not(.loaded) .header,
body:not(.loaded) .hero {
  opacity: 0;
}

/* Transition for header/hero fade-in after load */
body.loaded .header,
body.loaded .hero {
  opacity: 1;
  transition: opacity 0.5s ease 0.3s; /* Delay fade-in until preloader is gone */
}

/* ==================== UTILITY CLASSES ==================== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

.section-padding {
  padding: var(--spacing-xxl) 0;
}

/* ==================== IMMERSIVE SECTION CANVAS ==================== */
.immersive-section {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  --glow-one: 25% 20%;
  --glow-two: 75% 80%;
  --glow-one-alpha: 0.18;
  --glow-two-alpha: 0.12;
  --pattern-opacity: 0.28;
  --pattern-size: 200px;
  --immersive-depth: 0;
}

.immersive-section::before,
.immersive-section::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  transition:
    opacity 1.2s ease,
    transform 1.2s ease;
}

.immersive-section::before {
  inset: -12%;
  background:
    radial-gradient(
      circle at var(--glow-one),
      rgba(var(--color-ecru-rgb), var(--glow-one-alpha)),
      transparent 62%
    ),
    radial-gradient(
      circle at var(--glow-two),
      rgba(var(--color-khaki-rgb), var(--glow-two-alpha)),
      transparent 64%
    );
  opacity: 0;
  transform: scale(1.12);
  z-index: 0;
}

.immersive-section::after {
  background:
    linear-gradient(
      120deg,
      rgba(var(--color-gunmetal-rgb), 0.08),
      rgba(var(--color-snow-rgb), 0.06)
    ),
    url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="160" height="160" viewBox="0 0 160 160"><g fill="none" stroke="%23C9B499" stroke-opacity="0.08" stroke-width="1"><path d="M0 0h160v160H0z"/><path d="M0 80h160"/><path d="M80 0v160"/></g></svg>');
  background-size:
    100% 100%,
    var(--pattern-size) var(--pattern-size);
  opacity: var(--pattern-opacity);
  mix-blend-mode: soft-light;
  z-index: 0;
}

.immersive-section > * {
  position: relative;
  z-index: 1;
  transform: translate3d(0, calc(var(--immersive-depth, 0) * -28px), 0);
  transition:
    transform 1s cubic-bezier(0.33, 1, 0.68, 1),
    filter 1s cubic-bezier(0.33, 1, 0.68, 1);
  filter: drop-shadow(
    0 24px 46px
      rgba(var(--color-gunmetal-rgb), calc(var(--immersive-depth, 0) * 0.35))
  );
}

/* Excluir el carrusel de áreas de práctica del efecto immersive para mantener el fondo estático */
.practice-areas-section > .carousel-3d-fullscreen {
  transform: none !important;
  filter: none !important;
}

.immersive-section.is-immersive-active::before {
  opacity: 1;
  transform: scale(1.02) translate3d(0, 0, 0);
  animation: sectionGlow 18s ease-in-out infinite alternate;
  /* Optimize performance - only animate when needed */
  will-change: transform;
}

.immersive-section.is-immersive-active::after {
  opacity: calc(var(--pattern-opacity) + 0.15);
}

@keyframes sectionGlow {
  0% {
    transform: scale(1.02) translate3d(-1%, -1%, 0);
  }
  50% {
    transform: scale(1.05) translate3d(1%, 1%, 0);
  }
  100% {
    transform: scale(1.02) translate3d(-0.5%, 0.5%, 0);
  }
}

/* Disable immersive section animations for reduced motion */
@media (prefers-reduced-motion: reduce) {
  .immersive-section.is-immersive-active::before {
    animation: none;
    transform: scale(1) translate3d(0, 0, 0);
  }

  .immersive-section > * {
    transform: none;
    filter: none;
  }
}

/* ==================== HEADER ==================== */

.header {
  background: var(--color-gunmetal);
  padding: 0.18rem 0;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  box-shadow: 0 4px 14px rgba(var(--color-gunmetal-rgb), 0.18);
  transition: all var(--transition-normal);
  overflow: visible;
}

.header::after {
  content: none;
}

.header.scrolled {
  padding: 0.12rem 0;
  background: var(--color-gunmetal);
}


.header-container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 clamp(0.85rem, 2.6vw, 1.75rem);
  display: flex;
  align-items: center;
  gap: clamp(0.6rem, 1.2vw, 1.5rem);
}

/* logo-container / brand text declarations repeated for cascade consistency */
.logo-container {
  display: flex;
  align-items: center;
  gap: clamp(0.4rem, 1vw, 0.75rem);
  cursor: pointer;
  transition: var(--transition-normal);
  margin-right: clamp(0.5rem, 1.8vw, 2rem);
}

.logo-container:hover {
  transform: translateY(-2px);
}

.brand-logo {
  width: clamp(54px, 6vw, 84px);
  height: auto;
  display: block;
  transition: var(--transition-normal);
  filter: drop-shadow(0 0 10px rgba(var(--color-ecru-rgb), 0.5));
}

.logo-container:hover .brand-logo {
  transform: scale(1.05);
}

.brand-text {
  color: var(--color-ecru);
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.brand-name {
  font-family: var(--font-display);
  font-size: clamp(1.18rem, 2.5vw, 1.6rem);
  font-weight: 600;
  letter-spacing: 0.16em;
  line-height: 1.05;
  text-shadow: 0 0 12px rgba(var(--color-ecru-rgb), 0.55);
}

.brand-tagline {
  font-family: var(--font-display);
  font-size: clamp(0.6rem, 0.98vw, 0.82rem);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0.9;
  text-shadow: 0 0 10px rgba(var(--color-ecru-rgb), 0.48);
}

/* Navigation */
.nav-menu {
  display: flex;
  align-items: center;
  margin-left: auto;
}


.nav-list {
  display: flex;
  gap: clamp(0.38rem, 0.95vw, 1.05rem);
  align-items: center;
}

.nav-link {
  color: #ffe3b0;
  font-family: var(--font-display);
  font-size: clamp(0.58rem, 0.88vw, 0.72rem);
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0.12rem 0;
  position: relative;
  transition: var(--transition-normal);
  text-shadow: 0 0 8px rgba(var(--color-ecru-rgb), 0.48);
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1.25px;
  background-color: #ffeec6;
  transition: width var(--transition-normal);
  box-shadow: 0 0 8px rgba(var(--color-ecru-rgb), 0.42);
}

.nav-link:hover,
.nav-link.active {
  color: #fff2c9;
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.btn-contact {
  background-color: #ffd69b;
  color: #0a1c32;
  padding: 0.22rem 0.9rem;
  border-radius: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  transition: var(--transition-normal);
  box-shadow:
    0 2px 10px rgba(var(--color-gunmetal-rgb), 0.18),
    0 0 12px rgba(var(--color-ecru-rgb), 0.45);
}

.btn-contact:hover {
  background-color: #ffe0ad;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(var(--color-gunmetal-rgb), 0.2);
}

.btn-contact::after {
  display: none;
}

.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  gap: 0.25rem;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.mobile-menu-toggle span {
  width: 25px;
  height: 3px;
  background-color: var(--color-ecru);
  transition: var(--transition-normal);
}

/* ==================== HERO SECTION ==================== */
.hero {
  position: relative;
  margin-top: var(--header-height);
  min-height: clamp(88vh, 102vh, 122vh);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: linear-gradient(
      180deg,
      rgba(var(--color-gunmetal-rgb), 0.94) 0%,
      rgba(var(--color-gunmetal-rgb), 0.96) 38%,
      rgba(var(--color-gunmetal-rgb), 0.98) 68%,
      rgba(var(--color-gunmetal-rgb), 0.92) 100%
    ),
    radial-gradient(
      circle at 50% 20%,
      rgba(var(--color-ecru-rgb), 0.12) 0%,
      transparent 58%
    );
  padding: clamp(2.65rem, 7.5vw, 4.85rem) clamp(1.75rem, 5vw, 3.25rem)
    clamp(5.6rem, 11vw, 7.8rem);
  overflow: hidden;
  color: var(--color-ecru);
}

.hero::before {
  content: "";
  position: absolute;
  inset: -12% -8% -6%;
  background:
    radial-gradient(
      circle at 38% 12%,
      rgba(var(--color-ecru-rgb), 0.18),
      transparent 58%
    ),
    radial-gradient(
      circle at 72% 68%,
      rgba(var(--color-khaki-rgb), 0.14),
      transparent 66%
    );
  mix-blend-mode: screen;
  opacity: 0.5;
  animation: heroGlow 24s ease-in-out infinite alternate;
  pointer-events: none;
}

.hero::after {
  content: "";
  position: absolute;
  inset: -8% -8% -28% -8%;
  background: linear-gradient(
    184deg,
    rgba(var(--color-gunmetal-rgb), 0.88) 0%,
    rgba(var(--color-gunmetal-rgb), 0.94) 42%,
    rgba(var(--color-gunmetal-rgb), 0.98) 78%,
    rgba(var(--color-gunmetal-rgb), 0.9) 100%
  );
  pointer-events: none;
}

@keyframes heroGlow {
  0% {
    transform: rotate(0deg) scale(1);
    opacity: 0.48;
  }
  50% {
    transform: rotate(2deg) scale(1.05);
    opacity: 0.6;
  }
  100% {
    transform: rotate(-2deg) scale(1.03);
    opacity: 0.5;
  }
}

.hero-inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(0.75rem, 2.2vw, 1.4rem);
  width: min(400px, 90%);
}

/* hero call-to-action removed for minimalist intro layout */

.btn {
  display: inline-block;
  padding: 1rem 2rem;
  border-radius: 4px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: var(--transition-normal);
  border: 2px solid transparent;
}

.btn-primary {
  background-color: var(--color-ecru);
  color: var(--color-gunmetal);
}

.btn-primary:hover {
  background-color: rgba(var(--color-ecru-rgb), 0.85);
  transform: translateY(-3px);
  box-shadow: var(--shadow-xl);
}

.btn-secondary {
  background-color: transparent;
  color: var(--color-ecru);
  border-color: var(--color-ecru);
}

.btn-secondary:hover {
  background-color: var(--color-ecru);
  color: var(--color-gunmetal);
  transform: translateY(-3px);
  box-shadow: var(--shadow-xl);
}

.btn-large {
  padding: 1.25rem 2.5rem;
  font-size: 1.1rem;
}

/* Scroll indicator removed to mirror brand hero reference */

/* ==================== FADE IN ANIMATIONS ==================== */
.fade-in-up {
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 1s forwards;
  /* Animation is triggered by JS */
  animation-play-state: paused;
}

/* Trigger animation via JS */
body.loaded .fade-in-up {
  animation-play-state: running;
}

.fade-in-up.delay-1 {
  animation-delay: 0.2s;
}

.fade-in-up.delay-2 {
  animation-delay: 0.4s;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==================== SECTION HEADERS ==================== */
.section-header {
  text-align: center;
  margin-bottom: var(--spacing-xl);
  /* Animación de slide con desenfoque */
  animation: slideBlur 0.8s cubic-bezier(0.4, 0, 0.2, 1) backwards;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--color-gunmetal);
  margin-bottom: var(--spacing-sm);
  line-height: 1.2;
  /* Animación de aparición */
  animation: fadeInDown 0.6s ease-out backwards;
  animation-delay: 0.2s;
}

.section-title.light {
  color: var(--color-ecru);
}

.title-underline {
  width: 80px;
  height: 4px;
  background: linear-gradient(
    90deg,
    var(--color-ecru) 0%,
    var(--color-khaki) 100%
  );
  margin: 0 auto var(--spacing-md);
  border-radius: 2px;
  /* Animación de dibujo de línea - aparece de izquierda a derecha */
  animation: typeWriter 0.8s cubic-bezier(0.4, 0, 0.2, 1) backwards;
  animation-delay: 0.4s;
  transform-origin: left center;
}

.title-underline.light {
  background: linear-gradient(
    90deg,
    var(--color-snow) 0%,
    var(--color-khaki) 100%
  );
}

.section-description {
  font-size: 1.125rem;
  color: var(--color-gunmetal);
  max-width: 800px;
  margin: 0 auto;
  line-height: 1.8;
}

.section-description.light {
  color: var(--color-khaki);
}

/* ==================== INTRO SECTION ==================== */
.intro-section {
  position: relative;
  background:
    radial-gradient(
      circle at 18% 20%,
      rgba(var(--color-ecru-rgb), 0.16),
      transparent 58%
    ),
    radial-gradient(
      circle at 82% 22%,
      rgba(var(--color-khaki-rgb), 0.12),
      transparent 60%
    ),
    linear-gradient(
      180deg,
      rgba(var(--color-gunmetal-rgb), 0.82) 0%,
      rgba(var(--color-gunmetal-rgb), 0.72) 18%,
      rgba(var(--color-gunmetal-rgb), 0.56) 32%,
      rgba(var(--color-snow-rgb), 0.95) 64%,
      rgba(var(--color-ecru-rgb), 0.24) 100%
    );
  --glow-one: 18% 28%;
  --glow-two: 82% 72%;
  --glow-one-alpha: 0.22;
  --glow-two-alpha: 0.14;
  --pattern-opacity: 0.25;
}

.intro-section::before {
  background:
    radial-gradient(
      circle at 22% 18%,
      rgba(var(--color-snow-rgb), 0.18),
      transparent 60%
    ),
    radial-gradient(
      circle at 78% 24%,
      rgba(var(--color-ecru-rgb), 0.15),
      transparent 58%
    );
}

.intro-section .section-title {
  color: rgba(var(--color-snow-rgb), 0.96);
  text-shadow: 0 6px 18px rgba(var(--color-gunmetal-rgb), 0.45);
}

.intro-section .title-underline {
  background: linear-gradient(
    90deg,
    rgba(var(--color-snow-rgb), 0.88) 0%,
    rgba(var(--color-ecru-rgb), 0.92) 100%
  );
}

.intro-section .lead-text {
  color: rgba(var(--color-snow-rgb), 0.92);
  text-shadow: 0 4px 12px rgba(var(--color-gunmetal-rgb), 0.5);
}

.lead-text {
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--color-gunmetal);
  margin-bottom: var(--spacing-lg);
  line-height: 1.8;
  text-align: center;
}

.intro-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: var(--spacing-xl);
  align-items: center;
}

.intro-text {
  background: rgba(var(--color-snow-rgb), 0.88);
  padding: var(--spacing-lg);
  border-radius: 24px;
  box-shadow: 0 20px 45px rgba(var(--color-gunmetal-rgb), 0.12);
  backdrop-filter: blur(8px);
}

.intro-text p {
  margin-bottom: var(--spacing-md);
  font-size: 1.0625rem;
  line-height: 1.8;
}

.intro-image {
  display: flex;
  align-items: center;
  justify-content: center;
}

.image-placeholder {
  width: 250px;
  height: 250px;
  background: linear-gradient(
    135deg,
    var(--color-ecru) 0%,
    var(--color-khaki) 100%
  );
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 6rem;
  color: var(--color-gunmetal);
  box-shadow: var(--shadow-xl);
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-20px);
  }
}

/* ==================== STATS SECTION ==================== */
.stats-section {
  background: linear-gradient(
      140deg,
      rgba(var(--color-ecru-rgb), 0.32) 0%,
      rgba(var(--color-khaki-rgb), 0.28) 100%
    )
    fixed;
  padding: var(--spacing-xl) 0;
  --glow-one: 20% 30%;
  --glow-two: 78% 62%;
  --glow-one-alpha: 0.26;
  --glow-two-alpha: 0.18;
  --pattern-size: 180px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--spacing-lg);
}

.stat-card {
  text-align: center;
  padding: var(--spacing-md);
  /* Transiciones más fluidas */
  transition:
    transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
    box-shadow 0.3s ease,
    background-color 0.3s ease;
  border-radius: 18px;
  background: rgba(var(--color-snow-rgb), 0.18);
  box-shadow: 0 18px 38px rgba(var(--color-gunmetal-rgb), 0.18);
  backdrop-filter: blur(8px);
  /* Animación de aparición elástica */
  animation: elasticAppear 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) backwards;
  /* Optimización GPU */
  will-change: transform;
}

.stat-card:hover {
  transform: translateY(-12px) scale(1.02);
  box-shadow: 0 28px 55px rgba(var(--color-gunmetal-rgb), 0.25);
  background: rgba(var(--color-snow-rgb), 0.25);
}

/* Delays escalonados para efecto de construcción progresiva */
.stat-card:nth-child(1) { animation-delay: 0.1s; }
.stat-card:nth-child(2) { animation-delay: 0.2s; }
.stat-card:nth-child(3) { animation-delay: 0.3s; }
.stat-card:nth-child(4) { animation-delay: 0.4s; }

.stat-icon {
  font-size: 3rem;
  color: var(--color-gunmetal);
  margin-bottom: var(--spacing-sm);
  opacity: 0.8;
}

.stat-number {
  font-size: 3.5rem;
  font-weight: 700;
  color: var(--color-gunmetal);
  margin-bottom: var(--spacing-xs);
  line-height: 1;
}

.stat-label {
  font-size: 1.125rem;
  color: var(--color-gunmetal);
  font-weight: 500;
}

/* ==================== PRACTICE AREAS SECTION ==================== */
.practice-areas-section {
  /* Offset anchor scrolling to account for the fixed header. This ensures
       that when navigating via hash links, the top of the section is not
       hidden underneath the sticky header. */
  /* Provide a larger offset when scrolling to the practice areas section.
       This prevents the sticky header and carousel title from overlapping
       the first row of thumbnails. */
  scroll-margin-top: 180px;
  background: radial-gradient(
    circle at top,
    rgba(var(--color-gunmetal-rgb), 0.9) 0%,
    rgba(var(--color-gunmetal-rgb), 0.95) 52%,
    rgba(var(--color-gunmetal-rgb), 0.98) 100%
  );
  color: var(--color-snow);
  --glow-one: 30% 30%;
  --glow-two: 68% 78%;
  --glow-one-alpha: 0.28;
  --glow-two-alpha: 0.18;
  --pattern-opacity: 0.28;
}

.practice-areas-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--spacing-lg);
}

.practice-area-card {
  background: white;
  border: 2px solid var(--color-ecru);
  border-radius: 8px;
  padding: var(--spacing-lg);
  position: relative;
  overflow: hidden;
  /* Transiciones más suaves y fluidas */
  transition:
    transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
    background-color 0.3s ease,
    border-color 0.3s ease,
    box-shadow 0.3s ease;
  cursor: pointer;
  /* Animación de construcción en aparición */
  animation: buildIn 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) backwards;
  /* Optimización GPU */
  will-change: transform;
}

.practice-area-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(var(--color-ecru-rgb), 0.3),
    transparent
  );
  transition: left 0.5s;
}

.practice-area-card:hover::before {
  left: 100%;
}

.practice-area-card:hover {
  background: var(--color-gunmetal);
  border-color: var(--color-gunmetal);
  transform: translateY(-10px);
  box-shadow: var(--shadow-xl);
}

.card-icon {
  font-size: 3rem;
  color: var(--color-ecru);
  margin-bottom: var(--spacing-md);
  transition: var(--transition-normal);
}

.practice-area-card:hover .card-icon {
  transform: scale(1.1) rotate(5deg);
}

.practice-area-card h3 {
  font-size: 1.5rem;
  color: var(--color-gunmetal);
  margin-bottom: var(--spacing-md);
  font-weight: 700;
  transition: var(--transition-normal);
}

.practice-area-card:hover h3 {
  color: var(--color-ecru);
}

.practice-area-card ul {
  list-style: none;
  padding: 0;
}

.practice-area-card li {
  padding: 0.5rem 0;
  color: var(--color-gunmetal);
  font-size: 0.9375rem;
  position: relative;
  padding-left: 1.75rem;
  transition: var(--transition-normal);
}

.practice-area-card li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--color-ecru);
  font-weight: bold;
  font-size: 1.125rem;
}

.practice-area-card:hover li {
  color: var(--color-snow);
}

/* Delays escalonados para práctica legal - efecto de construcción */
.practice-area-card:nth-child(1) { animation-delay: 0.1s; }
.practice-area-card:nth-child(2) { animation-delay: 0.2s; }
.practice-area-card:nth-child(3) { animation-delay: 0.3s; }
.practice-area-card:nth-child(4) { animation-delay: 0.4s; }
.practice-area-card:nth-child(5) { animation-delay: 0.5s; }
.practice-area-card:nth-child(6) { animation-delay: 0.6s; }
.practice-area-card:nth-child(7) { animation-delay: 0.7s; }
.practice-area-card:nth-child(8) { animation-delay: 0.8s; }
.practice-area-card:nth-child(9) { animation-delay: 0.9s; }

.card-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    135deg,
    transparent 0%,
    rgba(var(--color-gunmetal-rgb), 0.05) 100%
  );
  opacity: 0;
  transition: var(--transition-normal);
  pointer-events: none;
}

.practice-area-card:hover .card-overlay {
  opacity: 1;
}

/* ==================== COMMITMENT SECTION ==================== */
.commitment-section {
  background: linear-gradient(
    135deg,
    var(--color-ecru) 0%,
    var(--color-khaki) 100%
  );
}

.commitment-content {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

.commitment-text p {
  font-size: 1.0625rem;
  line-height: 1.8;
  margin-bottom: var(--spacing-md);
  color: var(--color-gunmetal);
}

.commitment-highlight {
  background: rgba(var(--color-snow-rgb), 0.5);
  padding: var(--spacing-lg);
  border-radius: 8px;
  border-left: 4px solid var(--color-gunmetal);
  margin-top: var(--spacing-lg);
  position: relative;
}

.commitment-highlight i {
  font-size: 2rem;
  color: var(--color-gunmetal);
  margin-bottom: var(--spacing-sm);
  opacity: 0.5;
}

.commitment-highlight p {
  font-size: 1.25rem;
  font-weight: 600;
  font-style: italic;
  margin: 0;
}

/* ==================== PROCESS SECTION ==================== */
.process-section {
  background: linear-gradient(
    135deg,
    rgba(var(--color-gunmetal-rgb), 0.95) 0%,
    rgba(var(--color-gunmetal-rgb), 0.86) 100%
  );
  position: relative;
  overflow: hidden;
  --glow-one: 24% 24%;
  --glow-two: 70% 76%;
  --glow-one-alpha: 0.3;
  --glow-two-alpha: 0.18;
  --pattern-opacity: 0.32;
  --pattern-size: 160px;
}

.process-layout {
  display: grid;
  grid-template-columns: minmax(260px, 340px) 1fr;
  gap: clamp(1.25rem, 3vw, 2.5rem);
  align-items: center;
}

.process-section:not(.folder-opened) .process-layout {
  grid-template-columns: 1fr;
  justify-items: center;
}

.process-section.folder-opened .process-layout {
  grid-template-columns: 1fr;
}

.process-visual {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.process-section.folder-vanishing .process-visual {
  animation: folderFadeOut 0.38s ease forwards;
}

.process-section.folder-opened .process-visual {
  display: none;
}

.folder-visual {
  --folder-color: #d6a22a;
  --folder-back-color: #b8881f;
  --paper-1: #f3e8c8;
  --paper-2: #fbf3dc;
  --paper-3: #ffffff;
  --accent-glow: rgba(230, 186, 92, 0.6);
  --tilt-x: 0deg;
  --tilt-y: 0deg;
  --lift: 0px;
  --paper-offset-x: 0px;
  --paper-offset-y: 0px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-md);
  padding: var(--spacing-md) var(--spacing-lg);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 14px;
  position: relative;
  overflow: visible;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
  isolation: isolate;
  transition: transform 0.5s ease, box-shadow 0.5s ease;
  cursor: pointer;
}

.folder-visual::before,
.folder-visual::after {
  content: "";
  position: absolute;
  inset: -15% -10%;
  background: radial-gradient(circle at 30% 30%, var(--accent-glow), transparent 55%);
  filter: blur(34px);
  opacity: 0.7;
  z-index: -1;
  transform: rotate(-6deg);
  animation: folderGlowPulse 4.5s ease-in-out infinite alternate;
}

.folder-visual::after {
  inset: -10% -8%;
  background: radial-gradient(circle at 70% 70%, rgba(214, 162, 42, 0.4), transparent 55%);
  filter: blur(36px);
  animation-delay: 0.8s;
}

.folder-visual:focus-visible {
  outline: 2px solid var(--color-gold);
  outline-offset: 6px;
}

.folder-shell {
  width: clamp(140px, 26vw, 190px);
  height: clamp(110px, 18vw, 150px);
  position: relative;
  transform-style: preserve-3d;
  transform: perspective(1200px) rotateX(var(--tilt-x)) rotateY(var(--tilt-y)) translateY(var(--lift));
  transition: transform 0.45s ease, filter 0.45s ease;
  filter: drop-shadow(0 16px 25px rgba(0, 0, 0, 0.28));
}

.folder__back {
  position: relative;
  width: 100%;
  height: 100%;
  background: var(--folder-back-color);
  border-radius: 0 12px 12px 12px;
  box-shadow: inset 0 4px 10px rgba(0, 0, 0, 0.18);
}

.folder__back::after {
  position: absolute;
  z-index: 0;
  bottom: 98%;
  left: 0;
  content: "";
  width: 36px;
  height: 14px;
  background: var(--folder-back-color);
  border-radius: 6px 6px 0 0;
}

.folder-logo {
  position: absolute;
  z-index: 5;
  top: 46%;
  left: 52%;
  width: 50%;
  aspect-ratio: 347 / 313;
  transform: translate(-50%, -50%) translateZ(28px);
  display: grid;
  place-items: center;
  filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.35));
}

.folder-logo::after {
  content: "";
  position: absolute;
  inset: -10% -18%;
  background: radial-gradient(circle at 55% 55%, rgba(255, 236, 191, 0.6), transparent 65%);
  filter: blur(18px);
  opacity: 0.8;
  z-index: -1;
  transform: translateZ(-2px);
}

.folder-logo-mark {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.24));
}

.folder-visual.folder-active .folder-logo {
  transform: translate(-50%, -56%) translateZ(32px) scale(1.05);
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.32));
}

.paper {
  position: absolute;
  z-index: 2;
  bottom: 12%;
  left: 50%;
  width: 74%;
  height: 80%;
  background: var(--paper-1);
  border-radius: 10px;
  transform: translate(calc(-50% + var(--paper-offset-x)), calc(8% + var(--paper-offset-y)))
    rotateZ(-2deg);
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.16);
  transition: transform 0.6s ease, box-shadow 0.6s ease;
}

.paper::after {
  content: "";
  position: absolute;
  inset: 14% 18%;
  border-radius: 6px;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.08) 0%, transparent 70%);
  opacity: 0.35;
}

.paper-2 {
  background: var(--paper-2);
  width: 82%;
  height: 72%;
  transform: translate(calc(-50% + var(--paper-offset-x)), calc(14% + var(--paper-offset-y))) rotateZ(1deg);
}

.paper-3 {
  background: var(--paper-3);
  width: 90%;
  height: 64%;
  transform: translate(calc(-50% + var(--paper-offset-x)), calc(20% + var(--paper-offset-y))) rotateZ(-1deg);
}

.folder__front {
  position: absolute;
  z-index: 3;
  width: 100%;
  height: 100%;
  background: var(--folder-color);
  border-radius: 6px 12px 12px 12px;
  transform-origin: bottom;
  transition: transform 0.55s ease, box-shadow 0.55s ease;
  box-shadow: inset 0 2px 8px rgba(255, 255, 255, 0.12);
}

.folder__front.right {
  position: absolute;
  inset: 0;
  clip-path: polygon(50% 0, 100% 0, 100% 100%, 18% 100%);
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0));
}

.folder-visual.folder-active {
  transform: translateY(-4px);
  box-shadow: 0 28px 58px rgba(0, 0, 0, 0.35);
}

.folder-visual.folder-active .folder-shell {
  --lift: -6px;
  filter: drop-shadow(0 22px 30px rgba(0, 0, 0, 0.32));
}

.folder-visual.folder-active .folder__front {
  transform: skew(12deg) scaleY(0.64) translateZ(18px);
}

.folder-visual.folder-active .folder__front.right {
  transform: skew(-12deg) scaleY(0.64) translateZ(18px);
}

.folder-visual.folder-active .paper-1 {
  transform: translate(calc(-120% + var(--paper-offset-x)), -74%) rotateZ(-14deg);
}

.folder-visual.folder-active .paper-2 {
  transform: translate(calc(8% + var(--paper-offset-x)), -76%) rotateZ(13deg);
  height: 78%;
}

.folder-visual.folder-active .paper-3 {
  transform: translate(calc(-50% + var(--paper-offset-x)), -102%) rotateZ(6deg);
  height: 78%;
}

.folder-visual.folder-active .paper {
  animation: paperDrift 6s ease-in-out infinite alternate;
}

.folder-visual.folder-active .paper-2 {
  animation-delay: 0.8s;
}

.folder-visual.folder-active .paper-3 {
  animation-delay: 1.4s;
}

.folder-note {
  color: var(--color-snow);
  font-size: 0.95rem;
  line-height: 1.5;
  text-align: center;
  opacity: 0.9;
  max-width: 320px;
}

.folder-pill {
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  color: #0c0c0f;
  background: linear-gradient(135deg, #f4e7c9, #d6b774);
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  font-weight: 700;
  text-transform: uppercase;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.2);
  transform: translateY(0);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.folder-visual:hover .folder-pill,
.folder-visual:focus-visible .folder-pill {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.28);
}

.process-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--spacing-xl);
  position: relative;
  z-index: 1;
  opacity: 0;
  transform: translateY(16px);
  pointer-events: none;
  transition: opacity 0.45s ease, transform 0.45s ease;
}

.process-section.folder-opened .process-steps {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.process-section:not(.folder-opened) .process-steps {
  display: none;
}

@keyframes folderFadeOut {
  to {
    opacity: 0;
    transform: translateY(-12px) scale(0.94);
  }
}

.process-step {
  text-align: center;
  padding: var(--spacing-lg);
  background: rgba(var(--color-snow-rgb), 0.05);
  border-radius: 12px;
  transition: var(--transition-normal);
  position: relative;
  opacity: 0;
  transform: translateY(28px);
}

.process-step:hover {
  background: rgba(var(--color-ecru-rgb), 0.1);
  transform: translateY(-10px);
}

.step-number {
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 60px;
  background: linear-gradient(
    135deg,
    var(--color-ecru) 0%,
    var(--color-khaki) 100%
  );
  color: var(--color-gunmetal);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  font-weight: 700;
  box-shadow: var(--shadow-lg);
  transition: var(--transition-normal);
}

.process-step:hover .step-number {
  transform: translateX(-50%) scale(1.1);
}

.step-icon {
  font-size: 3.5rem;
  color: var(--color-ecru);
  margin: var(--spacing-lg) 0 var(--spacing-md);
  transition: var(--transition-normal);
}

.process-step:hover .step-icon {
  transform: scale(1.1) rotate(5deg);
}

.process-step.timeline-visible {
  opacity: 1;
  transform: translateY(0);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.22);
}

.process-step .step-icon i {
  display: inline-block;
}

.process-step.timeline-visible .step-icon {
  animation: floatIn 0.65s ease;
}

.process-step.timeline-visible[data-step="consulta"] .step-icon i {
  animation: calendarSwing 0.95s ease;
}

.process-step.timeline-visible[data-step="evaluacion"] .step-icon i {
  animation: lensSweep 1s ease;
}

.process-step.timeline-visible[data-step="representacion"] .step-icon i {
  animation: gavelStrike 0.85s ease;
}

.pulse-once {
  animation: pulseGlow 1s ease;
}

.process-step h3 {
  font-size: 1.5rem;
  color: var(--color-ecru);
  margin-bottom: var(--spacing-md);
  font-weight: 700;
}

.process-step p {
  font-size: 1rem;
  color: var(--color-snow);
  line-height: 1.7;
}

@keyframes folderGlowPulse {
  0% {
    opacity: 0.5;
    transform: rotate(-8deg) scale(0.98);
  }
  100% {
    opacity: 0.75;
    transform: rotate(-2deg) scale(1.05);
  }
}

@keyframes paperDrift {
  0% {
    transform: translate(calc(-50% + var(--paper-offset-x)), calc(8% + var(--paper-offset-y))) rotateZ(-2deg);
  }
  50% {
    transform: translate(calc(-50% + var(--paper-offset-x)), calc(4% + var(--paper-offset-y))) rotateZ(1deg);
  }
  100% {
    transform: translate(calc(-50% + var(--paper-offset-x)), calc(10% + var(--paper-offset-y))) rotateZ(-1deg);
  }
}

@keyframes floatIn {
  0% {
    opacity: 0;
    transform: translateY(24px) scale(0.95);
  }
  60% {
    opacity: 1;
    transform: translateY(-6px) scale(1.02);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes calendarSwing {
  0% {
    transform: translateY(-12px) rotate(-8deg);
  }
  40% {
    transform: translateY(2px) rotate(6deg) scale(1.08);
  }
  70% {
    transform: translateY(-4px) rotate(-3deg) scale(1.02);
  }
  100% {
    transform: translateY(0) rotate(0deg) scale(1);
  }
}

@keyframes lensSweep {
  0% {
    transform: translateY(14px) rotate(-12deg) scale(0.9);
  }
  40% {
    transform: translateY(-4px) rotate(4deg) scale(1.05);
    filter: drop-shadow(0 6px 10px rgba(226, 193, 137, 0.35));
  }
  100% {
    transform: translateY(0) rotate(0deg) scale(1);
    filter: none;
  }
}

@keyframes gavelStrike {
  0% {
    transform: rotate(-18deg) translateY(-10px) scale(0.92);
  }
  45% {
    transform: rotate(8deg) translateY(6px) scale(1.08);
  }
  70% {
    transform: rotate(-4deg) translateY(0) scale(1.02);
  }
  100% {
    transform: rotate(0deg) translateY(0) scale(1);
  }
}

@keyframes pulseGlow {
  0% {
    filter: drop-shadow(0 0 0 rgba(226, 193, 137, 0));
    transform: scale(1);
  }
  45% {
    filter: drop-shadow(0 0 18px rgba(226, 193, 137, 0.65));
    transform: scale(1.08);
  }
  100% {
    filter: drop-shadow(0 0 0 rgba(226, 193, 137, 0));
    transform: scale(1);
  }
}

/* ==================== LOCATIONS SECTION ==================== */

.locations-section {
  position: relative;
  overflow: hidden;
  background: linear-gradient(
    150deg,
    rgba(var(--color-gunmetal-rgb), 0.96) 0%,
    rgba(var(--color-gunmetal-rgb), 0.9) 52%,
    rgba(var(--color-gunmetal-rgb), 0.86) 100%
  );
  color: var(--color-snow);
}

.locations-section::before {
  content: "";
  position: absolute;
  inset: -35% -20% 0;
  background: radial-gradient(
      circle at 25% 15%,
      rgba(var(--color-ecru-rgb), 0.28),
      transparent 58%
    ),
    radial-gradient(
      circle at 80% 10%,
      rgba(var(--color-khaki-rgb), 0.22),
      transparent 65%
    );
  opacity: 0.45;
  filter: blur(80px);
  pointer-events: none;
  animation: locationGlow 22s ease-in-out infinite alternate;
}

@keyframes locationGlow {
  0% {
    transform: scale(1) translateY(0);
    opacity: 0.38;
  }
  50% {
    transform: scale(1.08) translateY(12px);
    opacity: 0.56;
  }
  100% {
    transform: scale(1.02) translateY(-6px);
    opacity: 0.45;
  }
}

.locations-experience {
  position: relative;
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(1.5rem, 3vw, 3.5rem);
  align-items: stretch;
  z-index: 1;
}

.location-views-panel {
  display: flex;
  flex-direction: column;
}

.location-view-card {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  background: rgba(var(--color-snow-rgb), 0.03);
  border-radius: 28px;
  border: 1px solid rgba(var(--color-snow-rgb), 0.08);
  padding: clamp(1.25rem, 2.5vw, 2.15rem);
  box-shadow: 0 30px 55px rgba(4, 6, 15, 0.55);
  backdrop-filter: blur(12px);
}

.location-view-card--integrated {
  gap: clamp(1.25rem, 2vw, 1.75rem);
}

.view-toggle-header {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.view-toggle-header p {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--color-ecru);
}

.view-toggle-header span {
  color: rgba(var(--color-snow-rgb), 0.75);
  font-size: 0.95rem;
}

.view-toggle-buttons {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.85rem;
}

.view-mode-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  padding: 0.85rem 1.25rem;
  border-radius: 18px;
  border: 1px solid rgba(var(--color-snow-rgb), 0.12);
  background: rgba(var(--color-snow-rgb), 0.04);
  color: var(--color-snow);
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.3s ease;
  cursor: pointer;
}

.view-mode-button i {
  font-size: 1.15rem;
  color: var(--color-khaki);
}

.view-mode-button.is-active,
.view-mode-button:focus-visible {
  outline: none;
  border-color: rgba(var(--color-ecru-rgb), 0.65);
  background: rgba(var(--color-ecru-rgb), 0.14);
  box-shadow: 0 0 0 2px rgba(var(--color-ecru-rgb), 0.18);
}

.location-embed-stack {
  position: relative;
}

.location-embed {
  background: rgba(var(--color-snow-rgb), 0.03);
  border-radius: 22px;
  border: 1px solid rgba(var(--color-snow-rgb), 0.06);
  padding: 0.75rem;
  min-height: clamp(260px, 32vw, 420px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.location-embed[data-active="false"] {
  display: none;
}

.location-details-panel {
  background: rgba(12, 16, 33, 0.92);
  border-radius: 28px;
  padding: clamp(1.5rem, 2.8vw, 2.5rem);
  border: 1px solid rgba(var(--color-ecru-rgb), 0.2);
  box-shadow: 0 24px 50px rgba(var(--color-gunmetal-rgb), 0.55);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.location-panel-header p {
  color: rgba(var(--color-snow-rgb), 0.82);
  margin-bottom: 1rem;
}

.location-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.location-pill {
  border: 1px solid rgba(var(--color-snow-rgb), 0.25);
  background: rgba(var(--color-snow-rgb), 0.08);
  color: rgba(var(--color-snow-rgb), 0.85);
  border-radius: 999px;
  padding: 0.55rem 1.25rem;
  font-size: 0.9rem;
  transition: all 0.25s ease;
  cursor: pointer;
}

.location-pill:hover,
.location-pill:focus-visible {
  border-color: rgba(var(--color-ecru-rgb), 0.7);
  color: rgba(var(--color-snow-rgb), 1);
}

.location-pill.is-active {
  background: linear-gradient(120deg, rgba(var(--color-ecru-rgb), 0.95), rgba(var(--color-khaki-rgb), 0.9));
  color: var(--color-gunmetal);
  border-color: transparent;
}

.location-panel-body {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.location-info-label {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.78rem;
  color: rgba(var(--color-snow-rgb), 0.6);
}

.location-info-city {
  font-size: clamp(1.5rem, 2.8vw, 2rem);
  margin: 0.35rem 0;
  color: var(--color-snow);
}

.location-info-address {
  margin: 0;
  color: rgba(var(--color-snow-rgb), 0.8);
}

.location-info-phone {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--color-ecru);
  text-decoration: none;
  font-weight: 600;
}

.location-info-phone[aria-disabled="true"] {
  opacity: 0.5;
  pointer-events: none;
}

.location-open-external {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: rgba(var(--color-snow-rgb), 0.82);
  text-decoration: none;
  font-weight: 600;
}

.location-open-external[aria-disabled="true"] {
  opacity: 0.45;
  pointer-events: none;
}

.location-embed iframe {
  width: 100%;
  height: 100%;
  min-height: inherit;
  border: none;
  border-radius: 18px;
  box-shadow: inset 0 0 0 1px rgba(var(--color-snow-rgb), 0.12);
}

.location-embed-placeholder {
  margin: 0;
  text-align: center;
  color: rgba(var(--color-snow-rgb), 0.65);
  font-size: 0.95rem;
  line-height: 1.6;
  padding: 0 1.5rem;
}

@media (max-width: 1024px) {
  .locations-experience {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .location-details-panel {
    padding: 1.25rem;
  }

  .location-view-card {
    padding: 1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .location-pill,
  .location-view-card {
    transition: none !important;
    animation: none !important;
  }
}

/* ==================== CTA SECTION ==================== */
.cta-section {
  background: linear-gradient(
    130deg,
    rgba(var(--color-gunmetal-rgb), 0.94) 0%,
    rgba(var(--color-gunmetal-rgb), 0.82) 100%
  );
  padding: var(--spacing-xxl) var(--spacing-md);
  text-align: center;
  color: var(--color-snow);
  --glow-one: 28% 22%;
  --glow-two: 76% 78%;
  --glow-one-alpha: 0.32;
  --glow-two-alpha: 0.18;
  --pattern-opacity: 0.3;
  --pattern-size: 180px;
}

/* ==================== SECTION TRANSITIONS ==================== */
/*
 * Animaciones para la transición entre secciones cuando se navega
 * mediante el menú principal. La clase fade-in-section anima
 * la opacidad y la posición vertical para que la sección aparezca
 * suavemente desde abajo. La clase fade-out-section hace lo contrario
 * y es utilizada antes de ocultar una sección.
 */

@keyframes fadeInSection {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeOutSection {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(-20px);
  }
}

.fade-in-section {
  animation: fadeInSection 0.6s forwards ease-out;
}

.fade-out-section {
  animation: fadeOutSection 0.6s forwards ease-out;
}

.cta-content h2 {
  font-size: 2.5rem;
  color: var(--color-ecru);
  margin-bottom: var(--spacing-md);
  font-weight: 700;
}

.cta-content p {
  font-size: 1.25rem;
  color: var(--color-khaki);
  margin-bottom: var(--spacing-lg);
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

/* ==================== CONTACT SECTION ==================== */
/*
 * Estilos para la nueva sección de contacto. Se utiliza una
 * paleta basada en los colores corporativos para mantener
 * coherencia con el resto del sitio. Los campos de entrada
 * se estilan de forma sencilla para asegurar accesibilidad y
 * claridad visual.
 */
.contact-section {
  background: linear-gradient(
    135deg,
    rgba(var(--color-gunmetal-rgb), 0.94) 0%,
    rgba(var(--color-gunmetal-rgb), 0.84) 100%
  );
  color: var(--color-snow);
  --glow-one: 32% 24%;
  --glow-two: 78% 76%;
  --glow-one-alpha: 0.34;
  --glow-two-alpha: 0.2;
  --pattern-opacity: 0.34;
  --pattern-size: 170px;
}

.contact-section .section-header .section-title {
  color: var(--color-ecru);
}

.contact-section .section-header .section-description {
  color: var(--color-khaki);
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  margin-top: var(--spacing-sm);
  margin-bottom: var(--spacing-lg);
  font-size: 1.1rem;
}

.contact-form {
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xs);
}

.form-group label {
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.form-group input,
.form-group textarea {
  padding: 0.75rem;
  border: 1px solid rgba(var(--color-snow-rgb), 0.5);
  border-radius: 10px;
  font-size: 1rem;
  font-family: var(--font-primary);
  resize: vertical;
  background: rgba(var(--color-snow-rgb), 0.92);
  color: var(--color-gunmetal);
  box-shadow: 0 12px 28px rgba(var(--color-gunmetal-rgb), 0.12);
  transition:
    box-shadow var(--transition-normal),
    border-color var(--transition-normal);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-ecru);
  box-shadow:
    0 0 0 2px rgba(var(--color-ecru-rgb), 0.3),
    0 16px 32px rgba(var(--color-gunmetal-rgb), 0.2);
}

.contact-form button[type="submit"] {
  align-self: start;
}

.whatsapp-contact {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  flex-wrap: wrap;
  color: var(--color-khaki);
}

.whatsapp-contact .btn-outline {
  border-color: var(--color-ecru);
  color: var(--color-ecru);
  background: transparent;
  padding: 0.85rem 1.5rem;
  letter-spacing: 0.05em;
}

.whatsapp-contact .btn-outline:hover,
.whatsapp-contact .btn-outline:focus-visible {
  background: rgba(var(--color-ecru-rgb), 0.12);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

/* ==================== CHATBOT WIDGET ==================== */
.chatbot-widget {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1100;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: var(--spacing-sm);
}

.chatbot-window[hidden] {
  display: none !important;
}

.chatbot-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  background: linear-gradient(135deg, var(--color-ecru), var(--color-khaki));
  color: var(--color-gunmetal);
  border: none;
  border-radius: 999px;
  padding: 0.85rem 1.4rem;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  box-shadow: var(--shadow-lg);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.chatbot-toggle:hover,
.chatbot-toggle:focus {
  transform: translateY(-3px);
  box-shadow: var(--shadow-xl);
}

.chatbot-toggle:focus {
  outline: 3px solid rgba(var(--color-ecru-rgb), 0.4);
  outline-offset: 2px;
}

.chatbot-toggle-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(var(--color-gunmetal-rgb), 0.1);
  font-size: 1.2rem;
}

.chatbot-window {
  width: min(360px, calc(100vw - 40px));
  background: rgba(var(--color-snow-rgb), 0.98);
  border-radius: 18px;
  box-shadow: 0 28px 60px rgba(var(--color-gunmetal-rgb), 0.35);
  border: 1px solid rgba(var(--color-ecru-rgb), 0.35);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  backdrop-filter: blur(12px);
}

.chatbot-header {
  background: linear-gradient(160deg, rgba(var(--color-gunmetal-rgb), 0.92), rgba(var(--color-gunmetal-rgb), 0.75));
  color: var(--color-ecru);
  padding: 1.1rem 1.35rem;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.chatbot-header-text h2 {
  font-size: 1.1rem;
  margin-bottom: 0.35rem;
}

.chatbot-subtitle {
  font-size: 0.85rem;
  line-height: 1.4;
  color: rgba(var(--color-snow-rgb), 0.85);
}

.chatbot-close {
  background: none;
  border: none;
  color: inherit;
  font-size: 1.15rem;
  cursor: pointer;
  transition: color var(--transition-fast);
}

.chatbot-close:hover,
.chatbot-close:focus {
  color: var(--color-snow);
}

.chatbot-body {
  padding: 1.2rem 1.35rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-height: 320px;
  overflow-y: auto;
  background: rgba(var(--color-snow-rgb), 0.96);
}

.chatbot-body::-webkit-scrollbar {
  width: 6px;
}

.chatbot-body::-webkit-scrollbar-thumb {
  background: rgba(var(--color-gunmetal-rgb), 0.25);
  border-radius: 20px;
}

.chatbot-messages {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  list-style: none;
}

.chatbot-message {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
}

.chatbot-message.assistant {
  flex-direction: row;
}

.chatbot-message.user {
  flex-direction: row-reverse;
}

.chatbot-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(var(--color-ecru-rgb), 0.85), rgba(var(--color-khaki-rgb), 0.85));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-gunmetal);
  font-size: 1.1rem;
  flex-shrink: 0;
  box-shadow: var(--shadow-md);
}

.chatbot-bubble {
  max-width: 80%;
  padding: 0.75rem 0.95rem;
  border-radius: 16px;
  line-height: 1.5;
  font-size: 0.93rem;
  box-shadow: 0 10px 28px rgba(var(--color-gunmetal-rgb), 0.12);
}

.chatbot-message.assistant .chatbot-bubble {
  background: rgba(var(--color-ecru-rgb), 0.18);
  color: var(--color-gunmetal);
  border: 1px solid rgba(var(--color-ecru-rgb), 0.35);
}

.chatbot-message.user .chatbot-bubble {
  background: linear-gradient(135deg, rgba(var(--color-gunmetal-rgb), 0.92), rgba(var(--color-gunmetal-rgb), 0.78));
  color: var(--color-snow);
  border-top-right-radius: 4px;
}

.chatbot-bubble strong {
  font-weight: 700;
}

.chatbot-typing {
  display: inline-flex;
  gap: 0.35rem;
  align-items: center;
  padding: 0.5rem 0.8rem;
  border-radius: 14px;
  background: rgba(var(--color-ecru-rgb), 0.18);
  width: fit-content;
}

.typing-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-ecru);
  animation: typingBlink 1.2s infinite ease-in-out;
}

.typing-dot:nth-child(2) {
  animation-delay: 0.2s;
}

.typing-dot:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes typingBlink {
  0%,
  80%,
  100% {
    transform: translateY(0);
    opacity: 0.4;
  }
  40% {
    transform: translateY(-3px);
    opacity: 1;
  }
}

.chatbot-footer {
  border-top: 1px solid rgba(var(--color-ecru-rgb), 0.25);
  padding: 1rem 1.35rem 1.2rem;
  background: rgba(var(--color-snow-rgb), 0.98);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.chatbot-form {
  display: flex;
  align-items: flex-end;
  gap: 0.75rem;
}

.chatbot-form textarea {
  flex: 1;
  min-height: 44px;
  max-height: 130px;
  resize: none;
  padding: 0.65rem 0.85rem;
  border-radius: 12px;
  border: 1px solid rgba(var(--color-gunmetal-rgb), 0.18);
  font-family: var(--font-primary);
  font-size: 0.95rem;
  line-height: 1.4;
  background: rgba(var(--color-snow-rgb), 0.96);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.chatbot-form textarea:focus {
  outline: none;
  border-color: rgba(var(--color-ecru-rgb), 0.6);
  box-shadow: 0 0 0 3px rgba(var(--color-ecru-rgb), 0.25);
}

.chatbot-send {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, var(--color-gunmetal), rgba(var(--color-gunmetal-rgb), 0.9));
  color: var(--color-ecru);
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.chatbot-send:hover,
.chatbot-send:focus {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.chatbot-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.chatbot-suggestion-btn {
  border: none;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  background: rgba(var(--color-gunmetal-rgb), 0.08);
  color: var(--color-gunmetal);
  font-size: 0.82rem;
  cursor: pointer;
  transition: background var(--transition-fast), transform var(--transition-fast);
}

.chatbot-suggestion-btn:hover,
.chatbot-suggestion-btn:focus {
  background: rgba(var(--color-ecru-rgb), 0.3);
  transform: translateY(-1px);
}

@media (max-width: 768px) {
  .chatbot-widget {
    right: 16px;
    bottom: 16px;
  }

  .chatbot-toggle {
    padding: 0.75rem 1.1rem;
  }

  .chatbot-window {
    width: min(100%, 320px);
  }
}

@media (max-width: 480px) {
  .chatbot-widget {
    right: 12px;
    bottom: 12px;
  }

  .chatbot-toggle-label {
    display: none;
  }

  .chatbot-toggle {
    border-radius: 50%;
    width: 56px;
    height: 56px;
    justify-content: center;
  }
}

/* ==================== FOOTER ==================== */
.footer {
  background-color: var(--surface-gunmetal-deep);
  color: var(--color-khaki);
  padding: var(--spacing-xl) 0 var(--spacing-md);
}

.footer-content {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--spacing-xl);
  margin-bottom: var(--spacing-xl);
  padding-bottom: var(--spacing-xl);
  border-bottom: 1px solid rgba(var(--color-ecru-rgb), 0.2);
}

.footer-brand .logo-container {
  margin-bottom: var(--spacing-md);
}

.footer-brand .brand-logo {
  width: 52px;
  height: auto;
}

.footer-brand .brand-name {
  font-size: 1.5rem;
}

.footer-brand .brand-tagline {
  font-size: 0.625rem;
}

.footer-description {
  font-size: 0.9375rem;
  line-height: 1.7;
}

.footer-column h4 {
  font-size: 1.125rem;
  color: var(--color-ecru);
  margin-bottom: var(--spacing-md);
  font-weight: 700;
}

.footer-column ul li {
  margin-bottom: var(--spacing-sm);
  font-size: 0.9375rem;
}

.footer-column ul li i {
  margin-right: var(--spacing-xs);
  color: var(--color-ecru);
}

.footer-column a:hover {
  color: var(--color-ecru);
}

.social-links {
  display: flex;
  gap: var(--spacing-sm);
}

.social-links a {
  width: 40px;
  height: 40px;
  background-color: rgba(var(--color-ecru-rgb), 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-ecru);
  transition: var(--transition-normal);
}

.social-links a:hover {
  background-color: var(--color-ecru);
  color: var(--color-gunmetal);
  transform: translateY(-3px);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--spacing-md);
  font-size: 0.875rem;
}

.footer-legal {
  display: flex;
  gap: var(--spacing-md);
}

.footer-legal a:hover {
  color: var(--color-ecru);
}

/* ==================== SCROLL TO TOP BUTTON ==================== */
.scroll-top-btn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: linear-gradient(
    135deg,
    var(--color-ecru) 0%,
    var(--color-khaki) 100%
  );
  color: var(--color-gunmetal);
  border: none;
  border-radius: 50%;
  font-size: 1.25rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transition: var(--transition-normal);
  z-index: 999;
}

.scroll-top-btn.visible {
  opacity: 1;
  visibility: visible;
}

.scroll-top-btn:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-xl);
}

/* ==================== REVEAL ANIMATION ==================== */
.reveal {
  opacity: 0;
  transform: translateY(50px);
  transition:
    opacity var(--transition-slow),
    transform var(--transition-slow);
  will-change: opacity, transform;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

.process-step.reveal.active:not(.timeline-visible) {
  opacity: 0;
  transform: translateY(28px);
}

/* ==================== RESPONSIVE DESIGN ==================== */
@media (max-width: 1024px) {
  .intro-grid {
    grid-template-columns: 1fr;
  }

  .image-placeholder {
    width: 200px;
    height: 200px;
    font-size: 5rem;
  }

  .footer-content {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .mobile-menu-toggle {
    display: flex;
  }

  .nav-list {
    position: fixed;
    top: var(--header-height);
    left: -100%;
    width: 100%;
    height: calc(100vh - var(--header-height));
    background-color: var(--surface-gunmetal-deep);
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: var(--spacing-xl) 0;
    transition: left var(--transition-normal);
  }

  .nav-list.active {
    left: 0;
  }

  .hero-title {
    font-size: 2.5rem;
  }

  .hero-subtitle {
    font-size: 1.125rem;
  }

  .section-title {
    font-size: 2rem;
  }

  .practice-areas-grid,
  .locations-grid {
    grid-template-columns: 1fr;
  }

  .process-layout {
    grid-template-columns: 1fr;
  }

  .process-steps {
    grid-template-columns: 1fr;
  }

  .footer-content {
    grid-template-columns: 1fr;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .area-detail-dialog {
    width: min(92vw, 640px);
    height: min(88vh, 720px);
    padding: clamp(var(--spacing-sm), 6vh, var(--spacing-lg));
  }

  .overlay-header {
    grid-template-columns: 1fr;
    text-align: center;
    gap: var(--spacing-sm);
  }

  .overlay-icon {
    margin: 0 auto;
  }

  .overlay-body {
    padding-right: 0;
  }
}

@media (max-width: 480px) {
  :root {
    font-size: 14px;
  }

  .hero-title {
    font-size: 2rem;
  }

  .brand-name {
    font-size: 1.68rem;
  }

  .btn {
    padding: 0.875rem 1.5rem;
    font-size: 0.9375rem;
  }

  .stat-number {
    font-size: 2.5rem;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .area-detail-dialog {
    width: 90vw;
    height: min(86vh, 640px);
    border-radius: 24px;
    padding: clamp(var(--spacing-sm), 5vh, var(--spacing-lg));
  }

  .overlay-detail-list li {
    padding-left: var(--spacing-sm);
  }
}

/* ==================== CARRUSEL 3D FULLSCREEN STYLES ==================== */
.practice-areas-section {
  padding: clamp(var(--spacing-md), 6vh, var(--spacing-lg)) 0;
  background-color: var(--surface-gunmetal-deep);
  min-height: auto;
  position: relative;
}

/*
 * Carousel container with reduced size for better user experience.
 * The carousel is now more compact and doesn't dominate the viewport.
 */
.carousel-3d-fullscreen {
  width: min(1000px, 92vw);
  min-height: auto;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: clamp(var(--spacing-xs), 1.5vh, var(--spacing-sm));
  position: relative;
  overflow: hidden;
  padding: 0 clamp(var(--spacing-xs), 1.5vw, var(--spacing-sm));
}

.carousel-header {
  text-align: center;
  padding: var(--spacing-sm) var(--spacing-md);
  background: linear-gradient(
    135deg,
    var(--color-gunmetal) 0%,
    var(--surface-gunmetal-soft) 100%
  );
  position: relative;
  z-index: 25;
}

.carousel-section-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-ecru);
  margin-bottom: 0.5rem;
  letter-spacing: -0.5px;
  animation: fadeInDown 1s ease-out;
}

.carousel-subtitle {
  font-size: 0.95rem;
  color: var(--color-snow);
  opacity: 0.9;
  animation: fadeInUp 1s ease-out 0.3s both;
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==================== ANIMACIONES DE CONSTRUCCIÓN EN TIEMPO REAL ==================== */

/* Animación de dibujo de bordes (como si se estuviera trazando) */
@keyframes drawBorder {
  0% {
    clip-path: polygon(0 0, 0 0, 0 100%, 0 100%);
  }
  25% {
    clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
  }
  50% {
    clip-path: polygon(0 0, 100% 0, 100% 100%, 100% 100%);
  }
  75% {
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
  }
  100% {
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
  }
}

/* Efecto de construcción progresiva de elementos */
@keyframes buildIn {
  0% {
    opacity: 0;
    transform: scale(0.8) translateY(30px);
    filter: blur(10px);
  }
  50% {
    filter: blur(5px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
    filter: blur(0);
  }
}

/* Animación de aparición con rebote elástico */
@keyframes elasticAppear {
  0% {
    opacity: 0;
    transform: scale(0) rotate(-12deg);
  }
  50% {
    opacity: 1;
    transform: scale(1.1) rotate(2deg);
  }
  70% {
    transform: scale(0.95) rotate(-1deg);
  }
  85% {
    transform: scale(1.02) rotate(0.5deg);
  }
  100% {
    opacity: 1;
    transform: scale(1) rotate(0deg);
  }
}

/* Efecto de escritura progresiva */
@keyframes typeWriter {
  from {
    width: 0;
    opacity: 0;
  }
  to {
    width: 100%;
    opacity: 1;
  }
}

/* Animación de slide con desenfoque (aparición dinámica) */
@keyframes slideBlur {
  0% {
    opacity: 0;
    transform: translateX(-50px);
    filter: blur(15px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
    filter: blur(0);
  }
}

/* Efecto de parpadeo de activación (como componente cargando) */
@keyframes activationBlink {
  0%, 100% {
    opacity: 1;
    border-color: var(--color-khaki);
  }
  50% {
    opacity: 0.7;
    border-color: var(--color-ecru);
  }
}

/* ==================== RIPPLE EFFECT ==================== */
.ripple {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(var(--color-ecru-rgb), 0.6) 0%, rgba(var(--color-ecru-rgb), 0) 70%);
  transform: scale(0);
  animation: ripple-animation 0.6s ease-out;
  pointer-events: none;
  z-index: 10;
}

@keyframes ripple-animation {
  to {
    transform: scale(2.5);
    opacity: 0;
  }
}

.carousel-3d-container {
  position: relative;
  width: 100%;
  flex: 1 1 auto;
  /*
     * Reduced carousel height for better proportions and user experience.
     * The carousel is now more compact and less overwhelming.
     */
  min-height: clamp(260px, 38vh, 420px);
  background: linear-gradient(
    135deg,
    var(--color-gunmetal) 0%,
    var(--surface-gunmetal-soft) 100%
  );
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: var(--color-snow);
  overflow: visible;
  padding: clamp(var(--spacing-xs), 1.5vh, var(--spacing-sm)) 0
    clamp(var(--spacing-sm), 2.5vh, var(--spacing-md));
  margin-top: 0;
}

/*
 * Permitimos que el contenido del carrusel use todo el alto disponible en vez
 * de forzarlo con una altura fija. Así se adapta tanto a ventanas bajas como
 * altas sin dar la sensación de estar sobredimensionado.
 */
.carousel-3d-container .carousel-content {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  align-items: stretch;
  gap: clamp(var(--spacing-xs), 2.5vw, var(--spacing-md));
  padding: clamp(calc(var(--spacing-xs) * 0.5), 2vh, calc(var(--spacing-sm) * 0.85))
    clamp(calc(var(--spacing-xs) * 1.5), 2.5vw, calc(var(--spacing-lg) * 0.85));
}

.carousel-content .carousel-introduce {
  position: relative;
  width: 100%;
  height: clamp(400px, 50vh, 600px);
  min-height: clamp(400px, 50vh, 600px);
  z-index: 20;
  display: flex;
  flex-direction: column;
  overflow: visible;
  margin-bottom: 0;
}

.carousel-introduce .carousel-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  padding: clamp(calc(var(--spacing-xs) * 1.25), 2vh, calc(var(--spacing-sm) * 0.85))
    clamp(calc(var(--spacing-sm) * 0.85), 3.5vw, calc(var(--spacing-lg) * 0.75));
  display: none;
  flex-direction: column;
  gap: clamp(calc(var(--spacing-xs) * 0.5), 1.25vh, var(--spacing-xs));
  align-items: flex-start;
  opacity: 0;
  pointer-events: none;
}

.carousel-introduce .carousel-wrapper span {
  display: block;
}

.carousel-introduce .carousel-wrapper span > * {
  transition:
    transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1),
    opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 0;
  transform: translateY(60px) scale(0.9);
  will-change: transform, opacity;
}

.carousel-introduce .carousel-wrapper.active {
  display: flex;
  pointer-events: all;
  opacity: 1;
}

.carousel-introduce .carousel-wrapper.active span > * {
  opacity: 1;
  transform: translateY(0) scale(1);
  transition-delay: calc(var(--idx) * 0.15s + 0.1s);
}

.carousel-introduce .area-icon {
  font-size: 3rem;
  color: var(--color-ecru);
  margin-bottom: var(--spacing-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.carousel-introduce .carousel-wrapper.active .area-icon {
  animation: iconBounce 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) 0.1s;
}

.carousel-introduce .area-icon svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}

.carousel-introduce .area-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 10px 20px rgba(var(--color-gunmetal-rgb), 0.35));
}

.carousel-introduce .area-title {
  font-family: var(--font-primary);
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-ecru);
  line-height: 1.1;
  margin-bottom: clamp(var(--spacing-xs), 1.25vh, var(--spacing-sm));
}

.carousel-introduce .area-list {
  font-size: 0.98rem;
  margin-top: clamp(calc(var(--spacing-xs) * 0.75), 1.5vh, var(--spacing-sm));
  font-weight: 400;
  list-style: none;
  padding: 0;
}

.carousel-introduce .area-list li {
  padding: 0.4rem 0;
  position: relative;
  padding-left: 2rem;
  color: var(--color-snow);
  line-height: 1.6;
  opacity: 0;
  transform: translateX(-20px);
  transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.carousel-introduce .carousel-wrapper.active .area-list li {
  opacity: 0.95;
  transform: translateX(0);
}

.carousel-introduce .carousel-wrapper.active .area-list li:nth-child(1) {
  transition-delay: 0.3s;
}

.carousel-introduce .carousel-wrapper.active .area-list li:nth-child(2) {
  transition-delay: 0.4s;
}

.carousel-introduce .carousel-wrapper.active .area-list li:nth-child(3) {
  transition-delay: 0.5s;
}

.carousel-introduce .area-list li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--color-ecru);
  font-weight: bold;
  font-size: 1.25rem;
}

.carousel-introduce .discover-button {
  width: 220px;
  height: 46px;
  border: 2px solid var(--color-ecru);
  color: var(--color-ecru);
  background-color: transparent;
  border-radius: 50px;
  margin-top: var(--spacing-md);
  font-family: var(--font-primary);
  font-size: 1.125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  transition: all var(--transition-normal);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.carousel-introduce .discover-button::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: var(--color-ecru);
  transform: translate(-50%, -50%);
  transition: width 0.6s ease, height 0.6s ease;
}

.carousel-introduce .discover-button:hover::before {
  width: 300px;
  height: 300px;
}

.carousel-introduce .discover-button:hover {
  color: var(--color-gunmetal);
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 10px 30px rgba(var(--color-ecru-rgb), 0.4);
}

.carousel-introduce .discover-button span {
  position: relative;
  z-index: 1;
}

.carousel-static-fallback {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xs);
  padding: clamp(var(--spacing-sm), 4vh, var(--spacing-lg));
  border-radius: 18px;
  border: 1px dashed rgba(var(--color-ecru-rgb), 0.35);
  background: rgba(var(--color-gunmetal-rgb), 0.38);
  color: var(--color-snow);
  text-align: left;
  box-shadow: var(--shadow-md);
  transition: opacity 0.4s ease;
}

.carousel-static-brand {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: var(--spacing-sm);
  padding: var(--spacing-xs) var(--spacing-sm);
  background: rgba(var(--color-ecru-rgb), 0.08);
  border-radius: 14px;
  border: 1px solid rgba(var(--color-ecru-rgb), 0.15);
}

.carousel-brand-logo {
  width: clamp(72px, 7vw, 96px);
  height: auto;
  display: block;
  filter: drop-shadow(0 8px 16px rgba(var(--color-khaki-rgb), 0.25));
}

.carousel-brand-text {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  color: var(--color-snow);
}

.carousel-brand-name {
  font-weight: 800;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.carousel-brand-tagline {
  font-size: 0.9rem;
  color: rgba(var(--color-snow-rgb), 0.8);
}

.carousel-static-fallback p {
  font-size: 0.95rem;
  line-height: 1.6;
  color: rgba(var(--color-snow-rgb), 0.9);
}

.carousel-static-fallback ul {
  margin-top: var(--spacing-xs);
  padding-left: 1.25rem;
  display: grid;
  gap: 0.35rem;
}

.carousel-static-fallback li {
  position: relative;
  font-size: 0.95rem;
  line-height: 1.5;
}

.carousel-static-fallback li::before {
  content: "•";
  color: var(--color-ecru);
  font-size: 1.2rem;
  position: absolute;
  left: -1.25rem;
  top: 0;
}

.carousel-static-gallery {
  margin-top: var(--spacing-sm);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--spacing-sm);
}

.carousel-gallery-card {
  background: rgba(var(--color-snow-rgb), 0.06);
  border: 1px solid rgba(var(--color-ecru-rgb), 0.15);
  border-radius: 16px;
  padding: var(--spacing-xs);
  display: grid;
  gap: 0.6rem;
  box-shadow: 0 14px 24px rgba(var(--color-gunmetal-rgb), 0.28);
}

.carousel-gallery-card img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  display: block;
  background: rgba(var(--color-snow-rgb), 0.08);
}

.carousel-gallery-card figcaption {
  font-weight: 700;
  font-size: 0.98rem;
  color: var(--color-ecru);
}

.carousel-static-thumbnails {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: clamp(0.5rem, 1.5vw, 1rem);
  padding: clamp(var(--spacing-xs), 2vh, var(--spacing-sm));
  margin: 0;
  color: var(--color-snow);
}

.carousel-static-thumbnails li {
  background: rgba(var(--color-ecru-rgb), 0.14);
  border: 1px solid rgba(var(--color-ecru-rgb), 0.25);
  border-radius: 14px;
  padding: 0.65rem 0.75rem;
  text-align: center;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.4px;
}

.carousel-static-thumbnails li:nth-child(odd) {
  background: rgba(var(--color-ecru-rgb), 0.2);
}

.carousel-error {
  margin-top: var(--spacing-sm);
  padding: clamp(var(--spacing-xs), 2vh, var(--spacing-sm));
  border-radius: 16px;
  background: rgba(var(--color-khaki-rgb), 0.12);
  color: var(--color-ecru);
  font-size: 1rem;
  line-height: 1.6;
  border: 1px solid rgba(var(--color-ecru-rgb), 0.35);
}

.carousel-fallback,
.carousel-fallback-thumbnail {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-xs);
  padding: clamp(var(--spacing-sm), 4vh, var(--spacing-lg));
  border-radius: 18px;
  border: 1px dashed rgba(var(--color-ecru-rgb), 0.4);
  background: rgba(var(--color-gunmetal-rgb), 0.45);
  color: var(--color-snow);
  text-align: center;
}

.carousel-fallback .area-icon {
  font-size: 2.5rem;
  color: var(--color-ecru);
}

.carousel-fallback h3 {
  margin: 0;
  font-size: 1.5rem;
  color: var(--color-ecru);
}

.carousel-fallback p,
.carousel-fallback-thumbnail span {
  font-size: 1rem;
  line-height: 1.6;
  color: rgba(var(--color-snow-rgb), 0.85);
}

.area-detail-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(var(--spacing-xs), 6vh, var(--spacing-xl));
  background: radial-gradient(
    circle at top,
    rgba(var(--color-gunmetal-rgb), 0.92) 0%,
    rgba(var(--color-gunmetal-rgb), 0.96) 55%
  );
  backdrop-filter: blur(12px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.45s ease;
  z-index: 2500;
}

.area-detail-overlay.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.area-detail-overlay .area-detail-backdrop {
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at top,
    rgba(var(--color-ecru-rgb), 0.25),
    transparent 70%
  );
  pointer-events: none;
  animation: overlayGlow 6s ease-in-out infinite alternate;
}

.area-detail-dialog {
  position: relative;
  width: min(1100px, 94vw);
  height: clamp(520px, 82vh, 880px);
  background: linear-gradient(
    135deg,
    rgba(var(--color-gunmetal-rgb), 0.98) 0%,
    rgba(var(--color-gunmetal-rgb), 0.94) 100%
  );
  border: 1px solid rgba(var(--color-ecru-rgb), 0.32);
  border-radius: 32px;
  box-shadow: var(--shadow-xl);
  padding: clamp(var(--spacing-md), 5vh, var(--spacing-xl));
  display: grid;
  grid-template-rows: auto 1fr;
  gap: clamp(var(--spacing-sm), 4vh, var(--spacing-lg));
  overflow: hidden;
  transform: translateY(48px) scale(0.9);
  transition:
    transform 0.55s cubic-bezier(0.16, 1, 0.3, 1),
    opacity 0.45s ease;
  opacity: 0;
  color: var(--color-snow);
}

.area-detail-overlay.is-visible .area-detail-dialog {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.overlay-close {
  position: absolute;
  top: clamp(var(--spacing-xs), 1.5vh, var(--spacing-sm));
  right: clamp(var(--spacing-xs), 1.5vh, var(--spacing-sm));
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid rgba(var(--color-ecru-rgb), 0.6);
  background: rgba(var(--color-gunmetal-rgb), 0.8);
  color: var(--color-ecru);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  cursor: pointer;
  transition:
    transform var(--transition-fast),
    background var(--transition-fast),
    box-shadow var(--transition-fast),
    rotate var(--transition-fast);
}

.overlay-close:hover,
.overlay-close:focus-visible {
  transform: scale(1.15);
  background: var(--color-ecru);
  color: var(--color-gunmetal);
  outline: none;
  box-shadow: 0 10px 30px rgba(var(--color-ecru-rgb), 0.35);
  rotate: 90deg;
}

.overlay-close:active {
  transform: scale(0.95);
  rotate: 90deg;
}

.overlay-header {
  display: grid;
  grid-template-columns: minmax(0, auto) minmax(0, 1fr);
  align-items: center;
  gap: clamp(var(--spacing-sm), 5vw, var(--spacing-md));
  margin-bottom: 0;
}

.overlay-icon {
  width: clamp(76px, 9vw, 108px);
  height: clamp(76px, 9vw, 108px);
  border-radius: 28px;
  background: linear-gradient(
    135deg,
    rgba(var(--color-ecru-rgb), 0.16) 0%,
    rgba(var(--color-ecru-rgb), 0.08) 100%
  );
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-ecru);
  box-shadow: 0 18px 38px rgba(var(--color-ecru-rgb), 0.2);
  padding: clamp(0.65rem, 1.6vw, 1.1rem);
  aspect-ratio: 1 / 1;
  overflow: hidden;
}

.overlay-icon i {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-size: clamp(2.3rem, 4.6vw, 3.2rem);
  line-height: 1;
  color: currentColor;
}

.overlay-icon i::before {
  line-height: 1;
}

.overlay-icon svg,
.overlay-icon-svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
  display: block;
}

.overlay-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 8px 14px rgba(var(--color-gunmetal-rgb), 0.32));
}

.overlay-header h3 {
  font-size: clamp(2.2rem, 4.2vw, 2.8rem);
  font-weight: 700;
  color: var(--color-ecru);
  margin: 0;
}

.overlay-body {
  display: grid;
  gap: clamp(var(--spacing-sm), 3vh, var(--spacing-md));
  overflow-y: auto;
  padding-right: clamp(var(--spacing-xs), 2vw, var(--spacing-sm));
}

.overlay-body::-webkit-scrollbar {
  width: 8px;
}

.overlay-body::-webkit-scrollbar-track {
  background: rgba(var(--color-gunmetal-rgb), 0.3);
  border-radius: 999px;
}

.overlay-body::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, var(--color-ecru), var(--color-khaki));
  border-radius: 999px;
}

.overlay-body {
  scrollbar-width: thin;
  scrollbar-color: var(--color-ecru) rgba(var(--color-gunmetal-rgb), 0.3);
}

.overlay-detail-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: clamp(0.02rem, 0.18vh, 0.18rem);
}

.overlay-detail-list.is-compact {
  gap: clamp(0.015rem, 0.12vh, 0.12rem);
}

.overlay-detail-list li {
  font-size: clamp(1rem, 2.2vw, 1.1rem);
  line-height: 1.24;
  padding-left: var(--spacing-md);
  position: relative;
}

.overlay-detail-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.18rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-ecru), var(--color-khaki));
  box-shadow: 0 0 0 4px rgba(var(--color-ecru-rgb), 0.15);
}

.overlay-detail-list strong {
  color: var(--color-ecru);
  font-weight: 600;
}

@keyframes overlayGlow {
  from {
    opacity: 0.35;
    transform: scale(0.96);
  }
  to {
    opacity: 0.55;
    transform: scale(1.02);
  }
}

body.overlay-open {
  overflow: hidden;
}

.carousel-content .carousel-thumbnail-list {
  position: relative;
  height: clamp(140px, 22vh, 170px);
  width: 100%;
  display: flex;
  align-items: center;
  padding: 0;
  overflow: hidden;
  margin-top: 0;
}

.carousel-thumbnail-list .carousel-wrapper {
  position: relative;
  z-index: 10;
  height: 100%;
  width: 100%;
  --carousel-spacing: clamp(6.25rem, 16vw, 9rem);
}

.carousel-thumbnail-list .carousel-wrapper .carousel-thumbnail {
  position: absolute;
  top: 50%;
  left: 50%;
  transition:
    transform 0.75s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.6s ease,
    box-shadow 0.4s ease,
    background 0.4s ease;
  height: 64%;
  width: clamp(160px, 16vw, 200px);
  border-radius: 18px;
  overflow: hidden;
  --scale: 0.85;
  --elevation: 0 20px 40px rgba(var(--color-gunmetal-rgb), 0.32);
  transform: translate(-50%, -50%)
    translateX(calc(var(--offset) * var(--carousel-spacing)))
    scale(var(--scale));
  box-shadow: var(--elevation);
  background: linear-gradient(
      140deg,
      rgba(var(--color-ecru-rgb), 0.96) 0%,
      rgba(var(--color-snow-rgb), 0.95) 52%,
      rgba(var(--color-khaki-rgb), 0.85) 100%
    ),
    radial-gradient(
      circle at 50% 0%,
      rgba(var(--color-snow-rgb), 0.65) 0%,
      transparent 68%
    );
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: calc(var(--spacing-md) * 0.85);
  opacity: 0;
  cursor: pointer;
}

.carousel-thumbnail-list .carousel-wrapper .carousel-thumbnail:not(.hidden) {
  opacity: 0.75;
}

.carousel-thumbnail-list .carousel-wrapper .carousel-thumbnail.near {
  --scale: 0.96;
  opacity: 0.92;
  --elevation: 0 26px 54px rgba(var(--color-gunmetal-rgb), 0.34);
  z-index: 15;
}

.carousel-thumbnail-list .carousel-wrapper .carousel-thumbnail.far {
  --scale: 0.9;
  opacity: 0.6;
  z-index: 12;
}

.carousel-thumbnail-list
  .carousel-wrapper
  .carousel-thumbnail:not(.zoom):hover {
  opacity: 1;
  --scale: 0.98;
  --elevation: 0 28px 60px rgba(var(--color-gunmetal-rgb), 0.4);
}

.carousel-thumbnail-list .carousel-wrapper .carousel-thumbnail.zoom {
  width: clamp(190px, 19vw, 230px);
  height: 88%;
  --scale: 1;
  opacity: 1;
  pointer-events: auto;
  --elevation: 0 28px 60px rgba(var(--color-gunmetal-rgb), 0.42);
  z-index: 20;
}

.carousel-thumbnail .thumbnail-icon {
  font-size: 3.5rem;
  color: var(--color-gunmetal);
  margin-bottom: var(--spacing-sm);
  filter: drop-shadow(0 6px 14px rgba(var(--color-gunmetal-rgb), 0.25));
  transform: translateY(6px);
  transition: transform 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.5rem;
  height: 3.5rem;
}

.carousel-thumbnail .thumbnail-icon svg,
.carousel-thumbnail .thumbnail-icon-svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
  display: block;
  margin: 0;
}

.carousel-thumbnail .thumbnail-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 6px 14px rgba(var(--color-gunmetal-rgb), 0.3));
}

.carousel-thumbnail:hover .thumbnail-icon {
  transform: translateY(6px) scale(1.1);
}

.carousel-thumbnail .thumbnail-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-gunmetal);
  text-align: center;
  line-height: 1.35;
  letter-spacing: 0.04em;
  text-shadow: 0 1px 2px rgba(var(--color-snow-rgb), 0.85);
  transform: translateY(-4px);
}

.carousel-thumbnail.zoom {
  background: linear-gradient(
      150deg,
      rgba(var(--color-ecru-rgb), 0.98) 0%,
      rgba(var(--color-snow-rgb), 0.97) 48%,
      rgba(var(--color-khaki-rgb), 0.88) 100%
    ),
    radial-gradient(
      circle at 50% 12%,
      rgba(var(--color-snow-rgb), 0.75) 0%,
      transparent 72%
    );
  box-shadow: 0 32px 64px rgba(var(--color-gunmetal-rgb), 0.35),
    inset 0 0 0 1px rgba(var(--color-snow-rgb), 0.6);
}

/* Ocultar tarjetas que están fuera del rango visible del carrusel */
.carousel-thumbnail.hidden {
  opacity: 0 !important;
  pointer-events: none !important;
}

.carousel-3d-container .carousel-navigation {
  grid-column: 1 / -1;
  display: flex !important;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: clamp(calc(var(--spacing-xs) * 0.75), 1.5vh, var(--spacing-sm));
  padding: clamp(var(--spacing-xs), 1.5vh, var(--spacing-sm))
    clamp(var(--spacing-sm), 3vw, var(--spacing-md));
  margin: clamp(var(--spacing-xs), 2vh, var(--spacing-sm)) auto 0;
  width: min(100%, 680px);
  border-radius: 24px;
  background: linear-gradient(
    135deg,
    rgba(var(--color-gunmetal-rgb), 0.85) 0%,
    rgba(var(--color-gunmetal-rgb), 0.75) 100%
  );
  box-shadow: 0 20px 40px rgba(var(--color-gunmetal-rgb), 0.35);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  position: relative;
  overflow: visible;
  z-index: 100;
  visibility: visible !important;
  opacity: 1 !important;
}

.carousel-navigation::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at 25% 50%,
    rgba(var(--color-ecru-rgb), 0.12),
    transparent 55%
  );
  opacity: 0.6;
  pointer-events: none;
}

.carousel-navigation .carousel-prev-button,
.carousel-navigation .carousel-next-button {
  flex: 0 0 auto;
  min-width: clamp(118px, 20vw, 148px);
  padding: clamp(0.65rem, 1.8vh, 0.85rem)
    clamp(1rem, 3vw, 1.35rem);
  border-radius: 999px;
  background: var(--color-ecru);
  color: var(--color-gunmetal);
  font-size: clamp(1.1rem, 3.5vw, 1.25rem);
  transition: all var(--transition-normal);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  display: inline-flex !important;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: clamp(0.35rem, 1.2vw, 0.6rem);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
  border: 2px solid var(--color-gunmetal);
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto;
}

.carousel-navigation .carousel-prev-button::before,
.carousel-navigation .carousel-next-button::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at 50% 20%,
    rgba(var(--color-snow-rgb), 0.68) 0%,
    rgba(var(--color-snow-rgb), 0.18) 55%,
    transparent 100%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
}

.carousel-navigation .carousel-prev-button:hover::before,
.carousel-navigation .carousel-next-button:hover::before,
.carousel-navigation .carousel-prev-button:focus-visible::before,
.carousel-navigation .carousel-next-button:focus-visible::before {
  opacity: 1;
}

.carousel-navigation .carousel-prev-button:hover,
.carousel-navigation .carousel-next-button:hover,
.carousel-navigation .carousel-prev-button:focus-visible,
.carousel-navigation .carousel-next-button:focus-visible {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 16px 32px rgba(var(--color-gunmetal-rgb), 0.4);
}

.carousel-navigation .carousel-prev-button:focus-visible,
.carousel-navigation .carousel-next-button:focus-visible {
  outline: 3px solid rgba(var(--color-khaki-rgb), 0.9);
  outline-offset: 3px;
}

.carousel-navigation .carousel-prev-button i,
.carousel-navigation .carousel-next-button i {
  position: relative;
  z-index: 1;
  color: inherit;
}

.carousel-navigation .control-label {
  position: relative;
  z-index: 1;
  font-size: clamp(0.75rem, 1.6vw, 0.9rem);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
  color: rgba(var(--color-gunmetal-rgb), 0.92);
  white-space: nowrap;
}

.carousel-navigation .carousel-prev-button:disabled,
.carousel-navigation .carousel-next-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.carousel-navigation .carousel-progress {
  flex: 1 1 220px;
  min-width: 200px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(12px, 1.5vw, 24px);
  position: relative;
}

.carousel-navigation .carousel-line {
  width: 100%;
  height: 2px;
  background: linear-gradient(
    90deg,
    rgba(var(--color-ecru-rgb), 0.8) 0%,
    rgba(var(--color-ecru-rgb), 0.12) 100%
  );
  border-radius: 1.5px;
  box-shadow: 0 0 12px rgba(var(--color-ecru-rgb), 0.35);
}

.carousel-navigation .carousel-ordinal-number {
  flex: 0 0 auto;
  position: relative;
  display: flex !important;
  justify-content: center;
  align-items: center;
  width: 58px;
  height: 58px;
  border: 3px solid var(--color-ecru);
  border-radius: 50%;
  color: var(--color-ecru);
  font-size: 1.1rem;
  font-weight: 700;
  background: rgba(var(--color-gunmetal-rgb), 0.5);
  box-shadow: inset 0 0 0 1px rgba(var(--color-ecru-rgb), 0.3);
  visibility: visible !important;
  opacity: 1 !important;
}

.carousel-ordinal-number h2 {
  position: absolute;
  font-family: var(--font-primary);
  font-size: clamp(1.8rem, 4vw, 2.25rem);
  font-weight: 700;
  color: var(--color-ecru);
  line-height: 1;
  transform: translateY(200%);
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.carousel-ordinal-number h2.active {
  transform: translateY(0);
}

/* Responsive adjustments for fullscreen carousel */
@media (max-width: 1200px) {
  .carousel-3d-container .carousel-content {
    height: auto;
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.85fr);
    gap: clamp(var(--spacing-sm), 4vw, var(--spacing-lg));
    padding: clamp(var(--spacing-xs), 3vh, var(--spacing-sm))
      clamp(var(--spacing-sm), 5vw, var(--spacing-lg));
  }

  .carousel-introduce .area-title {
    font-size: 1.9rem;
  }

  .carousel-thumbnail-list .carousel-wrapper .carousel-thumbnail {
    height: 80%;
    width: clamp(210px, 24vw, 240px);
  }

  /* Make the active card slightly wider and align it using the same
       translation step. A width of 250px provides distinction without
       overwhelming adjacent cards. */
  .carousel-thumbnail-list .carousel-wrapper .carousel-thumbnail.zoom {
    width: clamp(230px, 26vw, 260px);
  }

  .carousel-thumbnail-list .carousel-wrapper {
    --carousel-spacing: clamp(9rem, 24vw, 13rem);
  }

  .carousel-3d-container .carousel-navigation {
    width: min(100%, 620px);
    padding: clamp(calc(var(--spacing-xs) * 0.5), 1.75vh, var(--spacing-sm))
      clamp(var(--spacing-sm), 4.5vw, var(--spacing-lg));
  }
}

@media (max-width: 992px) {
  .carousel-static-thumbnails {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .carousel-static-thumbnails {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .carousel-static-fallback {
    text-align: center;
    align-items: center;
  }

  .carousel-static-fallback ul {
    padding-left: 0;
  }

  .carousel-static-fallback li::before {
    display: none;
  }

  .carousel-static-thumbnails {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1024px) {
  .carousel-section-title {
    font-size: 2.25rem;
  }

  .carousel-3d-container .carousel-content {
    height: auto;
    grid-template-columns: minmax(0, 1fr);
    padding: clamp(calc(var(--spacing-xs) * 0.6), 3vh, var(--spacing-sm))
      clamp(var(--spacing-sm), 6vw, var(--spacing-lg));
    gap: clamp(var(--spacing-sm), 5vw, var(--spacing-lg));
  }

  .carousel-introduce .area-title {
    font-size: 1.85rem;
  }

  .carousel-content .carousel-thumbnail-list {
    height: clamp(150px, 26vh, 190px);
  }

  .carousel-thumbnail-list .carousel-wrapper {
    height: 100%;
  }

  .carousel-thumbnail-list .carousel-wrapper .carousel-thumbnail {
    height: 76%;
    width: clamp(170px, 30vw, 200px);
  }

  .carousel-thumbnail-list .carousel-wrapper .carousel-thumbnail.zoom {
    width: clamp(185px, 32vw, 220px);
  }

  .carousel-thumbnail-list .carousel-wrapper {
    --carousel-spacing: clamp(7rem, 24vw, 11rem);
  }
}

@media (max-width: 768px) {
  .carousel-3d-fullscreen {
    min-height: auto;
  }

  .carousel-header {
    padding: var(--spacing-md) var(--spacing-md) var(--spacing-sm);
  }

  .carousel-section-title {
    font-size: 2rem;
  }

  .carousel-subtitle {
    font-size: 1rem;
  }

  .carousel-3d-container {
    padding: clamp(var(--spacing-xs), 4vh, var(--spacing-sm)) 0;
  }

  .carousel-3d-container .carousel-content {
    display: flex;
    flex-direction: column;
    gap: clamp(var(--spacing-sm), 5vh, var(--spacing-lg));
    height: auto;
    padding: 0 var(--spacing-sm);
  }

  .carousel-content .carousel-introduce {
    width: 100%;
    height: auto;
    min-height: 0;
  }

  .carousel-introduce .carousel-wrapper {
    padding: clamp(var(--spacing-xs), 3vh, var(--spacing-sm))
      clamp(var(--spacing-sm), 6vw, var(--spacing-md));
  }

  .carousel-introduce .area-icon {
    font-size: 3rem;
  }

  .carousel-introduce .area-title {
    font-size: 1.65rem;
  }

  .carousel-introduce .area-list {
    font-size: 1rem;
  }

  .carousel-introduce .discover-button {
    width: 100%;
    max-width: 280px;
  }

  .carousel-content .carousel-thumbnail-list {
    height: clamp(160px, 32vh, 210px);
    padding-left: 0;
    margin-top: var(--spacing-md);
  }

  .carousel-thumbnail-list .carousel-wrapper {
    height: clamp(150px, 30vh, 190px);
    --carousel-spacing: clamp(5.5rem, 52vw, 9.5rem);
  }

  .carousel-thumbnail-list .carousel-wrapper .carousel-thumbnail {
    height: 78%;
    width: clamp(150px, 66vw, 200px);
  }

  .carousel-thumbnail-list .carousel-wrapper .carousel-thumbnail.zoom {
    width: clamp(170px, 72vw, 220px);
    height: 90%;
  }

  .carousel-introduce .area-more-info {
    max-height: none;
  }

  .carousel-navigation {
    flex-direction: column;
    align-items: stretch;
    gap: clamp(var(--spacing-xs), 3vh, var(--spacing-sm));
    padding: clamp(var(--spacing-xs), 3vh, var(--spacing-sm))
      clamp(var(--spacing-sm), 6vw, var(--spacing-lg));
    width: 100%;
  }

  .carousel-navigation .carousel-progress {
    min-width: 0;
    width: 100%;
    grid-template-columns: 1fr;
    justify-items: center;
    gap: clamp(var(--spacing-xs), 1.5vh, var(--spacing-sm));
  }

  .carousel-navigation .carousel-prev-button,
  .carousel-navigation .carousel-next-button {
    width: 100%;
    min-width: 0;
    padding: clamp(0.7rem, 2.25vh, 0.95rem)
      clamp(1rem, 5vw, 1.5rem);
    justify-content: center;
    gap: clamp(0.4rem, 2vw, 0.75rem);
    margin: 0;
  }

  .carousel-navigation .carousel-ordinal-number {
    width: clamp(58px, 18vw, 72px);
    height: clamp(58px, 18vw, 72px);
    margin: 0 auto;
  }

  .carousel-ordinal-number h2 {
    font-size: clamp(1.65rem, 6vw, 1.85rem);
  }
}

@media (max-width: 640px) {
  .carousel-3d-container .carousel-content {
    display: flex;
    flex-direction: column;
    gap: clamp(var(--spacing-sm), 4vw, var(--spacing-md));
    padding: clamp(var(--spacing-sm), 4vw, var(--spacing-md))
      clamp(var(--spacing-sm), 6vw, var(--spacing-lg));
  }

  .carousel-content .carousel-introduce {
    height: auto;
    min-height: 0;
  }

  .carousel-introduce .carousel-wrapper {
    position: relative;
    height: auto;
    min-height: 0;
    padding: clamp(var(--spacing-sm), 4vw, var(--spacing-md))
      clamp(var(--spacing-sm), 5vw, var(--spacing-lg));
  }

  .carousel-introduce .area-title {
    font-size: clamp(1.45rem, 6vw, 1.75rem);
  }

  .carousel-introduce .area-list {
    font-size: clamp(0.95rem, 4vw, 1.05rem);
  }

  .carousel-introduce .discover-button {
    width: 100%;
    max-width: 320px;
    align-self: stretch;
  }

  .carousel-content .carousel-thumbnail-list {
    height: auto;
    overflow-x: auto;
    overflow-y: visible;
    padding: clamp(var(--spacing-xs), 3vh, var(--spacing-sm))
      clamp(var(--spacing-sm), 6vw, var(--spacing-md));
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    gap: 0;
  }

  .carousel-thumbnail-list .carousel-wrapper {
    display: flex;
    align-items: stretch;
    gap: clamp(var(--spacing-xs), 3vw, var(--spacing-sm));
    height: auto;
    min-height: 0;
    width: auto;
    padding: 0 0 clamp(var(--spacing-xs), 2vh, var(--spacing-sm));
    --carousel-spacing: 0;
  }

  .carousel-thumbnail-list .carousel-wrapper .carousel-thumbnail {
    position: relative;
    inset: auto;
    transform: none !important;
    flex: 0 0 clamp(78vw, 82vw, 88vw);
    width: clamp(240px, 82vw, 360px);
    height: auto;
    min-height: 170px;
    opacity: 1 !important;
    scroll-snap-align: center;
    box-shadow: 0 18px 38px rgba(var(--color-gunmetal-rgb), 0.35);
  }

  .carousel-thumbnail-list .carousel-wrapper .carousel-thumbnail .thumbnail-title {
    transform: none;
  }

  .carousel-thumbnail-list .carousel-wrapper .carousel-thumbnail.near,
  .carousel-thumbnail-list .carousel-wrapper .carousel-thumbnail.far,
  .carousel-thumbnail-list .carousel-wrapper .carousel-thumbnail.zoom,
  .carousel-thumbnail-list .carousel-wrapper .carousel-thumbnail.hidden {
    --scale: 1;
    opacity: 1 !important;
    pointer-events: auto !important;
  }

  .carousel-navigation {
    margin-top: clamp(var(--spacing-sm), 5vw, var(--spacing-md));
  }
}

/* ==================== PERFORMANCE OPTIMIZATIONS ==================== */

/*
 * Global Reduced Motion Support
 * Respects user's motion preferences for accessibility and performance
 * Disables or reduces animations for users with motion sensitivity
 */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    /* Disable all animation and transition durations */
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    /* Remove scroll behavior animations */
    scroll-behavior: auto !important;
  }

  /* Disable specific intensive animations */
  .fade-in-up,
  .reveal,
  .stat-card,
  .practice-area-card {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }

  /* Location cards handled by specific rules above (lines 2107-2123) */

  /* Keep minimal transitions for UX feedback */
  button,
  a,
  .btn {
    transition: background-color 0.15s ease, color 0.15s ease !important;
  }

  /* Disable carousel animations */
  .carousel-thumbnail {
    transition: opacity 0.2s ease !important;
    transform: translateX(calc(var(--offset) * var(--carousel-spacing))) !important;
  }
}

/* Mobile Performance Optimizations */
@media (max-width: 768px) {
  /* Reduce animation complexity on mobile devices */
  body::before {
    animation-duration: 36s; /* Slower = less resource intensive */
  }

  .hero::after {
    animation-duration: 24s;
  }

  .immersive-section.is-immersive-active::before {
    animation-duration: 24s;
  }

  /* Disable will-change on mobile to save memory */
  *[style*="will-change"] {
    will-change: auto !important;
  }
}

/* Low-end device detection (based on resolution) */
@media (max-width: 768px) and (max-height: 1024px) {
  /* Further reduce animations on smaller screens */
  body::before,
  .hero::after,
  .immersive-section.is-immersive-active::before {
    animation: none;
  }
}

/* Print styles - disable all animations */
@media print {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    box-shadow: none !important;
  }
}
