/* ==================== WEBSITE STYLES - BUFETE M&M ==================== */

/* ==================== FUENTES ====================
   Source Sans 3 (Adobe, licencia OFL): la alternativa libre mas cercana a Myriad Pro.
   Un solo archivo variable cubre los pesos 300-700 (solo caracteres latinos). */
@font-face {
  font-family: "Brand Sans";
  src: url("../fonts/SourceSans3-VF.woff") format("woff");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Brand Sans";
  src: url("../fonts/SourceSans3-Italic.woff") format("woff");
  font-weight: 300 700;
  font-style: italic;
  font-display: swap;
}

/* ==================== ESTILOS GLOBALES ==================== */

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

body {
  font-family: "Brand Sans", "Myriad Pro", "Segoe UI", Helvetica, Arial, sans-serif;
  color: #333;
  overflow-x: hidden;
}

/* ==================== TOP NAVIGATION BAR ==================== */

.top-nav {
  background-color: transparent;
  padding: 20px 5%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
}

.logo-section {
  display: flex;
  align-items: center;
  gap: 10px;
  background-color: rgba(255, 255, 255, 0);
  padding: 8px 15px;
  border-radius: 8px;
}

.logo-img {
  height: 60px;
}

.nav-right {
  display: flex;
  gap: 12px;
  align-items: center;
}

/* Language Selector Wrapper */
.lang-selector-wrapper {
  position: relative;
}

/* Language Selector Button */
.lang-selector-btn {
  background-color: rgba(255, 255, 255, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.5);
  color: white;
  padding: 8px 18px;
  border-radius: 25px;
  cursor: pointer;
  font-size: 0.85em;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s;
  position: relative;
  backdrop-filter: blur(10px);
}

.lang-selector-btn:hover {
  background-color: rgba(255, 255, 255, 0.3);
  border-color: white;
}

.globe-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.globe-icon svg {
  width: 16px;
  height: 16px;
  stroke: white;
}

.arrow-down {
  font-size: 0.7em;
  transition: transform 0.3s;
}

.lang-selector-btn.active .arrow-down {
  transform: rotate(180deg);
}

/* Language Dropdown */
.lang-dropdown {
  position: absolute;
  top: 55px;
  right: 0;
  background-color: white;
  border-radius: 12px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
  min-width: 180px;
  display: none;
  z-index: 1000;
  overflow: hidden;
}

.lang-dropdown.active {
  display: block;
}

.lang-option {
  padding: 12px 20px;
  color: #333;
  cursor: pointer;
  transition: background-color 0.2s;
  font-size: 0.9em;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.lang-option:hover {
  background-color: #f5f5f5;
}

.lang-option.selected {
  background-color: #c39d69;
  color: white;
  font-weight: 500;
}

.lang-option .checkmark {
  font-size: 1.2em;
}

/* Log in Button */
.login-btn {
  background-color: rgba(255, 255, 255, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.5);
  color: white;
  padding: 8px 20px;
  border-radius: 25px;
  cursor: pointer;
  font-size: 0.85em;
  font-weight: 500;
  transition: all 0.3s;
  text-decoration: none;
  display: inline-block;
  backdrop-filter: blur(10px);
}

.login-btn:hover {
  background-color: rgba(255, 255, 255, 0.3);
  border-color: white;
}

/* Sign up Button */
.signup-btn {
  background-color: white;
  border: 2px solid white;
  color: #4a5a6a;
  padding: 8px 20px;
  border-radius: 25px;
  cursor: pointer;
  font-size: 0.85em;
  font-weight: 500;
  transition: all 0.3s;
  text-decoration: none;
  display: inline-block;
}

.signup-btn:hover {
  background-color: #f5f5f5;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* ==================== HERO SECTION ==================== */

.hero {
  display: grid;
  grid-template-columns: 60% 40%;
  background: linear-gradient(to right, #3a444e 0%, #56626f 100%);
  min-height: 700px;
  position: relative;
  align-items: center;
}

.hero-left {
  padding: 100px 8% 60px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  z-index: 10;
}

/* Animated Words Section */
.animated-words {
  color: #666;
  font-size: 1.67em;
  letter-spacing: 2px;
  margin-bottom: 25px;
  font-weight: 400;
  line-height: 1.8;
  max-width: 90%;
}

.word {
  display: inline-block;
  margin: 0 3px;
  transition: all 0.6s ease;
  opacity: 0.6;
}

/* COSTA RICA permanece en mayusculas */
.word.costa-rica {
  text-transform: uppercase;
}

.word.highlight {
  color: white;
  opacity: 1;
  text-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
  transform: scale(1.05);
}

.hero-title {
  color: white;
  font-size: 5.17em;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 40px;
}

.hero-title .highlight {
  color: #c39d69;
  font-weight: 700;
}

.hero-right {
  background: url("/images/portada.webp") center/cover;
  position: relative;
  border-radius: 30px 0 0 30px;
  box-shadow: -10px 10px 30px rgba(0, 0, 0, 0.2);

  margin-top: 20px;
  margin-bottom: 20px;

  min-height: 500px;
  max-height: 600px;

  align-self: center;
}

/* ==================== MISSION SECTION - NUEVA ANIMACION ==================== */

.mission-section {
  padding: 0;
  background-color: white;
  position: relative;
  min-height: 400vh;
  overflow: hidden;
}

.mission-container {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
  width: 100%;
}

/* Titulo Central - 3 LINEAS */
.mission-title-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  font-size: 8vw;
  font-weight: 700;
  color: #4a5a6a;
  line-height: 1.2;
  margin-bottom: 0;
  z-index: 10;
  transition: none;
  transform-origin: center center;
  will-change: transform, opacity;
}

.mission-title-center .line {
  display: block;
  white-space: nowrap;
}

.mission-title-center .highlight {
  color: #c39d69;
  font-weight: 700;
}

/* Grid de Cards */
.mission-cards-grid {
  position: absolute;
  width: 100%;
  height: 100%;
  z-index: 15;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

/* Cards Individuales - CUADRADAS 280x280 */
.mission-card {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 20;
  width: 200px;
  height: 200px;
  border-radius: 30px;
  padding: 40px 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  opacity: 0;
  transition: none;
  will-change: transform, opacity;
  pointer-events: all;
}

/* Variaciones de color de las cards */
.mission-card {
  background-color: #f8f4f0;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.mission-card.card-gold {
  background-color: #c39d69;
  color: white;
}

.mission-card.card-dark {
  background-color: #4a5a6a;
  color: white;
}

.mission-card.card-light {
  background-color: #d8d8d8;
  color: #4a5a6a;
}

/* Cards con imagenes */
.mission-card.card-image {
  padding: 0;
  overflow: hidden;
  background: transparent;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.card-image-content {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 30px;
}

/* Iconos en las cards */
.card-icon {
  width: 120px;
  height: 120px;
  margin-bottom: 10px;
  opacity: 1;
}

/* Titulos de las cards */
.card-title {
  font-size: 1.8em;
  font-weight: 400;
  line-height: 1.3;
  margin: 0;
}

/* Cards con texto en color dorado */
.mission-card:not(.card-gold):not(.card-dark):not(.card-light):not(.card-image)
  .card-title {
  color: #c39d69;
}

/* ==================== SERVICES SECTION - NUEVA VERSION ==================== */

.services-section {
  padding: 0;
  background-color: #f5f5f5;
  min-height: 100vh;
  position: relative;
  overflow: hidden;
}

/* Contenedor Principal */
.services-container-new {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  position: relative;
  padding: 0;
}

/* Tabs Verticales a la Izquierda */
.service-tabs-vertical {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  gap: 10px;
  z-index: 10;
}

.service-tab-vertical {
  background-color: #4a5a6a;
  color: white;
  padding: 50px 10px 550px 10px;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1.1em;
  letter-spacing: 2px;
  font-weight: 400;
  border-radius: 60px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  transform: rotate(180deg);
}

.service-tab-vertical:hover {
  background-color: #5a6a7a;
  transform: rotate(180deg) translateX(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.service-tab-vertical.active {
  background-color: #c39d69;
  transform: rotate(180deg) translateX(-5px);
  box-shadow: 0 8px 25px rgba(195, 157, 105, 0.4);
}

/* Texto Central */
.services-center-text {
  text-align: center;
  z-index: 5;
  max-width: 900px;
  width: 100%;
}

.services-center-text h2 {
  font-size: 4.5em;
  color: #c39d69;
  font-weight: 700;
  line-height: 1.3;
  margin: 0;
  padding: 0 5%;
  white-space: nowrap;
}

/* Boton Let's Talk */
.lets-talk-btn {
  position: absolute;
  bottom: auto;                /* ⬅️ CAMBIAR de bottom a auto */
  top: 90%;                    /* ⬅️ AGREGAR top con porcentaje */
  transform: translateY(-50%); /* ⬅️ AGREGAR para centrado perfecto */
  right: 0;
  background-color: #c39d69;
  color: white;
  text-decoration: none;
  padding: 18px 40px;
  border-radius: 50px 0 0 50px;
  font-size: 1.1em;
  font-weight: 500;
  transition: all 0.3s ease;
  box-shadow: -5px 5px 20px rgba(195, 157, 105, 0.3);
  z-index: 101;
}

.lets-talk-btn:hover {
  background-color: #b38a5b;
  padding-right: 50px;
  box-shadow: 0 8px 30px rgba(195, 157, 105, 0.4);
}

/* Panel Deslizante desde la Derecha */
.service-slide-panel {
  position: absolute;
  top: 5%;
  right: -100%;
  width: calc(100% - 250px);
  height: 90%;
  background-color: #d6d6d6;
  box-shadow: -5px 0 30px rgba(0, 0, 0, 0.2);
  z-index: 100;
  transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
  border-radius: 60px 0 0 60px;
}

.service-slide-panel.active {
  right: 0;
}

/* Boton Cerrar Panel */
.close-panel-btn {
  position: absolute;
  top: 30px;
  right: 30px;
  background-color: transparent;
  border: none;
  font-size: 3em;
  color: #4a5a6a;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  padding: 0;
}

.close-panel-btn:hover {
  color: #c39d69;
  transform: rotate(90deg);
}

/* Contenido del Panel */
.service-panel-content {
  padding: 80px 60px;
}

.service-panel-content h2 {
  color: #c39d69;
  font-size: 2.5em;
  margin-bottom: 30px;
  font-weight: 400;
}

.service-panel-content p {
  color: #666;
  font-size: 1.05em;
  line-height: 1.8;
  margin-bottom: 20px;
}

.service-panel-content h3 {
  color: #4a5a6a;
  font-size: 1.4em;
  margin-top: 30px;
  margin-bottom: 15px;
  font-weight: 500;
}

.service-panel-content ul {
  list-style: none;
  padding: 0;
  margin: 20px 0;
}

.service-panel-content ul li {
  padding: 12px 0;
  padding-left: 25px;
  position: relative;
  color: #666;
  line-height: 1.6;
}

.service-panel-content ul li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: #c39d69;
  font-size: 1.5em;
  line-height: 1;
}

/* ==================== STATS SECTION ==================== */

.stats-section {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background-color: white;
  padding: 0;
  gap: 180px;
  position: relative;
}

/* Lado Izquierdo */
.stats-left {
  display: flex;
  flex-direction: column;
  gap: 40px;
  align-items: center;
  position: relative;
  margin-top: 0vh;
  /* Espacio arriba para centrar visualmente */
  height: auto;
  justify-content: center;
}

/* Grid de 4 Cards (2x2) */
.stats-cards-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  justify-items: center;
  width: 460px;
  position: relative;
}

/* Cards Base */
.stat-card {
  width: 200px;
  height: 200px;
  border-radius: 30px;
  padding: 30px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
  opacity: 0;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
    box-shadow 0.4s ease, opacity 0.3s ease;
  will-change: transform, opacity;
  position: relative;
  z-index: 100;
  pointer-events: all;
}

/* Área de hover expandida invisible */
.stat-card::before {
  content: "";
  position: absolute;
  top: -10%;
  left: -10%;
  right: -10%;
  bottom: -10%;
  z-index: -1;
}

/* Contenido por defecto y hover */
.card-content-default {
  transition: opacity 0.4s ease;
}

.card-content-hover {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px;
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.card-content-hover p {
  font-size: 0.95em;
  line-height: 1.6;
  text-align: center;
  margin: 0;
  color: inherit;
}

/* Hover: Ocultar contenido default y mostrar hover */
.stat-card:hover .card-content-default {
  opacity: 0;
}

.stat-card:hover .card-content-hover {
  opacity: 1;
}

/* Expansión según posición - Top Left */
.stat-card[data-position="top-left"]:hover {
  transform: scale(1.5) !important;
  transform-origin: bottom right;
}

/* Expansión según posición - Top Right */
.stat-card[data-position="top-right"]:hover {
  transform: scale(1.5) !important;
  transform-origin: bottom left;
}

/* Expansión según posición - Bottom Left */
.stat-card[data-position="bottom-left"]:hover {
  transform: scale(1.5) !important;
  transform-origin: top right;
}

/* Expansión según posición - Bottom Right */
.stat-card[data-position="bottom-right"]:hover {
  transform: scale(1.5) !important;
  transform-origin: top left;
}

/* Sombra más pronunciada en hover */
.stat-card:hover {
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.25);
  z-index: 200;
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1),
    box-shadow 0.5s ease;
}

/* Colores de Cards */
.stat-card.card-beige {
  background-color: #f8f4f0;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
  color: #c39d69;
}

.stat-card.card-gold {
  background-color: #c39d69;
  color: white;
}

.stat-card.card-light-gray {
  background-color: #d8d8d8;
  color: #4a5a6a;
}

.stat-card.card-dark-gray {
  background-color: #4a5a6a;
  color: white;
}

/* Números grandes */
.stat-card .stat-number {
  font-size: 4em;
  font-weight: 700;
  color: #c39d69;
  line-height: 1;
  margin-bottom: 10px;
}

.stat-card.card-dark-gray .stat-number {
  color: white;
}

/* Labels pequeños */
.stat-card .stat-label {
  font-size: 0.95em;
  font-weight: 400;
  color: #666;
}

.stat-card.card-dark-gray .stat-label {
  color: white;
}

/* Títulos de cards */
.stat-card .stat-title {
  font-size: 1.4em;
  font-weight: 500;
  line-height: 1.3;
}

/* Botón "I want to know more" */
.know-more-btn {
  position: absolute;
  left: 0;
  top: 90%;
  transform: translateY(-50%);
  background-color: #c39d69;
  color: white;
  text-decoration: none;
  padding: 18px 40px;
  border-radius: 0 50px 50px 0;
  font-size: 1.1em;
  font-weight: 500;
  transition: all 0.3s ease;
  box-shadow: 5px 5px 20px rgba(195, 157, 105, 0.3);
  z-index: 50;
}

.know-more-btn:hover {
  background-color: #b38a5b;
  padding-right: 50px;
  /* ← Crece hacia la derecha */
  box-shadow: 5px 8px 30px rgba(195, 157, 105, 0.4);
}

/* Lado Derecho - Texto Fijo */
.stats-right {
  display: flex;
  flex-direction: column;
  gap: 30px;
  padding: 0 5%;
  max-width: 600px;
  /* position: sticky; */
  /* top: 50%; */
  /* transform: translateY(-50%); */
  position: relative;
  margin-top: 0vh;
  /* Mismo margen que .stats-left */
  justify-content: center;
}

.stats-right p {
  color: #3a444e;
  /* ← Cambio de color */
  font-size: 20px;
  /* ← Tamaño más grande (20pt) */
  line-height: 1.8;
  text-align: justify;
  margin: 0;
  white-space: normal;
  opacity: 0;
  transform: translateX(100px);
  transition: none;
  font-weight: 400;
  /* ← Regular */
}

/* ==================== PROCESS SECTION ==================== */

.process-section {
  padding: 50px 0;
  background-color: #f5f5f5;
  min-height: 40vh;
  display: flex;
  flex-direction: column;
  align-items: start;
  justify-content: center;
  overflow-x: hidden;
}

.process-header {
  text-align: left;
  margin-bottom: 10px;
  width: 100%;
  max-width: 1400px;
  padding-left: 5%;
}

.process-title {
  color: #d6d6d6;
  font-size: 4.3em;
  font-weight: 400;
  margin-bottom: 10px;
  letter-spacing: 1px;
}

.process-subtitle {
  color: #d6d6d6;
  font-size: 2.4em;
  font-weight: 300;
  margin-top: 0;
}

.process-grid {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  max-width: 95%;
  margin: 0 auto;
  position: relative;
  min-height: 150px;
  gap: 0;
}

.process-card {
  background-color: #eaeaea;
  padding: 30px 75px 30px 30px;
  border-radius: 40px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  position: relative;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  flex-shrink: 0;
  min-height: 100px;
  max-height: 100px;
  min-width: 250px;
  overflow: hidden;
}

.process-card:hover {
  max-height: 650px;
  /* ← Aumentado para acomodar ~10 líneas de texto */
  padding: 30px 50px 40px 50px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
  transform: translateY(-5px);
}

/* Colores y z-index */
.process-card:nth-child(1) {
  background-color: #eaeaea;
  z-index: 1;
}

.process-card:nth-child(2) {
  background-color: #e0e0e0;
  z-index: 2;
  margin-left: -3.5%;
  /* Se superpone sobre la anterior */
}

.process-card:nth-child(3) {
  background-color: #d6d6d6;
  z-index: 3;
  margin-left: -3.5%;
}

.process-card:nth-child(4) {
  background-color: #cccccc;
  z-index: 4;
  margin-left: -3.5%;
}

.process-card h4 {
  color: #c29c68;
  font-size: 4.86em;
  margin: 0;
  font-weight: 400;
  line-height: 1;
  position: absolute;
  left: 10px;
  top: 0px;
  transform: none;
  z-index: 1;
  transition: none;
}

.process-card > p:first-of-type {
  color: #3a444e;
  font-size: 1.4em;
  line-height: 1.1;
  margin: 0;
  font-weight: 400;
  max-width: 200px;
  position: relative;
  left: 0px;
  top: 0px;
  z-index: 2;
  white-space: normal;
  transition: none;
}

/* Contenido que aparece en hover */
.card-hover-content {
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transition: opacity 0.4s ease 0.1s,
    max-height 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  margin-top: 20px;
  padding-left: 20px;
  padding-right: 20px;
  display: flex;
  /* ← NUEVO: Activa flexbox */
  justify-content: center;
  /* ← NUEVO: Centra horizontalmente */
  align-items: center;
  /* ← NUEVO: Centra verticalmente (opcional) */
}

.card-hover-content p {
  color: #3a444e;
  font-size: 1.4em;
  line-height: 1.5;
  margin: 0;
  font-weight: 300;
  max-width: 240px;
  position: static;
  white-space: normal;
  text-align: center;
  /* ← NUEVO: Centra el texto */
}

.card-hover-content p strong {
  font-weight: 600;
}

.process-card:hover .card-hover-content {
  opacity: 1;
  max-height: 450px;
}

/* ==================== PROCESS SECTION RESPONSIVE ==================== */

/* Pantallas medianas (tablets horizontal) */
@media (max-width: 1200px) {
  .process-header {
    padding-left: 3%;
  }

  .process-title {
    font-size: 3.5em;
  }

  .process-subtitle {
    font-size: 2em;
  }

  .process-grid {
    max-width: 90%;
  }

  .process-card {
    padding: 25px 60px 25px 25px;
    min-width: 220px;
  }

  .process-card:nth-child(2),
  .process-card:nth-child(3),
  .process-card:nth-child(4) {
    margin-left: -4%;
  }

  .process-card:hover {
    max-height: 600px;
    padding: 25px 40px 35px 40px;
  }

  .process-card h4 {
    font-size: 4em;
    left: 8px;
  }

  .process-card > p:first-of-type {
    font-size: 1.2em;
    max-width: 180px;
  }

  .card-hover-content {
    margin-top: 15px;
  }

  .card-hover-content p {
    font-size: 1.2em;
    max-width: 200px;
  }

  .process-card:hover .card-hover-content {
    max-height: 400px;
  }
}

/* Tablets vertical */
@media (max-width: 968px) {
  .process-section {
    padding: 60px 3%;
    min-height: auto;
  }

  .process-header {
    text-align: center;
    padding-left: 0;
    margin-bottom: 40px;
  }

  .process-title {
    font-size: 3em;
  }

  .process-subtitle {
    font-size: 1.6em;
  }

  .process-grid {
    flex-direction: column;
    height: auto;
    gap: 20px;
    max-width: 500px;
    min-height: auto;
  }

  .process-card {
    width: 100%;
    margin-left: 0 !important;
    padding: 25px 40px 25px 25px;
    min-width: unset;
    max-width: 100%;
  }

  .process-card:hover {
    max-height: 550px;
    padding: 25px 35px 35px 35px;
  }

  .process-card h4 {
    font-size: 3.5em;
    left: 10px;
  }

  .process-card > p:first-of-type {
    font-size: 1.1em;
    max-width: 160px;
  }

  .card-hover-content {
    margin-top: 10px;
    padding-left: 15px;
    padding-right: 15px;
  }

  .card-hover-content p {
    font-size: 1.1em;
    max-width: 90%;
  }

  .process-card:hover .card-hover-content {
    max-height: 380px;
  }
}

/* Móviles */
@media (max-width: 600px) {
  .process-section {
    padding: 40px 2%;
  }

  .process-header {
    margin-bottom: 30px;
  }

  .process-title {
    font-size: 2.2em;
    margin-bottom: 8px;
  }

  .process-subtitle {
    font-size: 1.3em;
  }

  .process-grid {
    max-width: 95%;
    gap: 15px;
  }

  .process-card {
    padding: 20px 30px 20px 20px;
    min-height: 85px;
    max-height: 85px;
  }

  .process-card:hover {
    max-height: 500px;
    padding: 20px 25px 30px 25px;
  }

  .process-card h4 {
    font-size: 2.8em;
    left: 8px;
    top: -2px;
  }

  .process-card > p:first-of-type {
    font-size: 0.95em;
    line-height: 1.2;
    max-width: 140px;
  }

  .card-hover-content {
    margin-top: 8px;
    padding-left: 10px;
    padding-right: 10px;
  }

  .card-hover-content p {
    font-size: 0.9em;
    line-height: 1.4;
    max-width: 95%;
  }

  .card-hover-content p strong {
    font-weight: 700;
  }

  .process-card:hover .card-hover-content {
    max-height: 350px;
  }
}

/* Móviles pequeños */
@media (max-width: 400px) {
  .process-title {
    font-size: 1.8em;
  }

  .process-subtitle {
    font-size: 1.1em;
  }

  .process-card {
    padding: 18px 25px 18px 18px;
    min-height: 80px;
    max-height: 80px;
  }

  .process-card:hover {
    max-height: 450px;
    padding: 18px 20px 25px 20px;
  }

  .process-card h4 {
    font-size: 2.5em;
    left: 6px;
  }

  .process-card > p:first-of-type {
    font-size: 0.85em;
    max-width: 120px;
  }

  .card-hover-content p {
    font-size: 0.85em;
  }

  .process-card:hover .card-hover-content {
    max-height: 320px;
  }
}

/* ==================== TESTIMONIALS SECTION ==================== */

.testimonials-section {
  padding: 50px 0 50px 0;
  background-color: #c39d69;
  overflow: hidden;
  position: relative;
}

.testimonials-title {
  color: white;
  font-size: 62pt;
  font-weight: 400;
  /* Regular */
  margin-bottom: 60px;
  text-align: center;
  padding: 0 5%;
}

/* Contenedor de cada fila */
.testimonials-row {
  display: flex;
  position: relative;
  padding: 10px 0;
  /* Máscara de gradiente para el efecto de desvanecimiento en los bordes */
  -webkit-mask-image: linear-gradient(
    to right,
    transparent 0%,
    black 10%,
    black 90%,
    transparent 100%
  );
  mask-image: linear-gradient(
    to right,
    transparent 0%,
    black 10%,
    black 90%,
    transparent 100%
  );
}

/* Track que contiene las tarjetas */
.testimonials-track {
  display: flex;
  gap: 30px;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
  will-change: transform;
  padding: 20px 0;
}

/* Animaciones para cada fila - diferentes velocidades y direcciones */
.row-1 .testimonials-track {
  animation: scrollRight 60s linear infinite;
}

.row-2 .testimonials-track {
  animation: scrollLeft 70s linear infinite;
}

.row-3 .testimonials-track {
  animation: scrollRight 70s linear infinite;
}

/* Tarjetas de testimonios */
.testimonial-card {
  background-color: white;
  border-radius: 25px;
  padding: 30px 10px 10px 30px;
  min-width: 450px;
  max-width: 450px;
  height: 220px;
  /* ALTURA FIJA */
  position: relative;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
  flex-shrink: 0;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  /* Indica que es clickeable */
}

/* Hover de la card - se oscurece */
.testimonial-card:hover {
  background-color: #f0f0f0;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25);
  transform: translateY(-8px);
  z-index: 10;
}

/* Detener animación de la fila cuando se hace hover en cualquier card */
.testimonials-row:hover .testimonials-track {
  animation-play-state: paused;
}

.testimonial-text {
  color: #3a444e;
  font-size: 1.1em;
  line-height: 1.7;
  margin: 0 0 auto 0;
  /* Espacio abajo para el footer */
  font-style: italic;

  /* Limitar altura y truncar texto */
  max-height: 130px;
  /* Ajusta según necesites */
  overflow: hidden;
  position: relative;
  padding-right: 50px;

  /* Efecto de fade al final del texto */
  -webkit-mask-image: linear-gradient(180deg, black 60%, transparent 100%);
  mask-image: linear-gradient(180deg, black 60%, transparent 100%);
}

/* Footer de la tarjeta - contiene nombre y bandera */
.testimonial-footer {
  position: relative;
  /* Cambio de absolute a relative */
  bottom: auto;
  left: auto;
  right: auto;
  margin-top: auto;
  /* Empuja hacia abajo automáticamente */
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 15px;
  gap: 15px;
}

/* Nombre del cliente */
.client-name {
  color: #3a444e;
  font-size: 0.95em;
  font-weight: 500;
  font-style: normal;
  flex: 1;
  min-width: 0;
}

/* Círculo de bandera en esquina inferior derecha */
.flag-circle {
  position: absolute;
  bottom: 0px;
  right: 0px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
  border: 3px solid white;
  flex-shrink: 0;
}

.flag-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Keyframes para movimiento */
@keyframes scrollRight {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(-50%);
    /* Mover la mitad porque duplicamos el contenido */
  }
}

@keyframes scrollLeft {
  0% {
    transform: translateX(-50%);
  }

  100% {
    transform: translateX(0);
  }
}

.testimonial-card p {
  color: #333;
  font-size: 1.1em;
  line-height: 1.7;
  margin: 0;
  font-style: italic;
}

/* Tarjetas con logo del bufete */
.logo-card {
  background-color: transparent;
  min-width: 350px;
  max-width: 350px;
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 40px;
}

.logo-card img {
  max-width: 100%;
  height: auto;
  opacity: 0.3;
  filter: brightness(0) invert(1);
  /* Logo en blanco */
}

/* ==================== PANEL EXPANDIDO DE TESTIMONIO ==================== */

.testimonial-expanded-panel {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.8); /* Centrado y pequeño inicialmente */
  width: 85%; /* 70% del ancho de la pantalla */
  max-width: 1400px; /* Ancho máximo */
  height: 70vh; /* 70% de la altura de la pantalla */
  max-height: 700px; /* Altura máxima */
  background-color: white;
  box-shadow: 0 10px 50px rgba(0, 0, 0, 0.3);
  z-index: 1000;
  border-radius: 60px; /* ✅ 4 bordes redondeados */
  padding: 80px 8% 60px 8%;
  overflow-y: auto;
  display: flex;
  align-items: center;
  justify-content: center;

  /* Estados de oculto */
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.testimonial-expanded-panel.active {
  transform: translate(-50%, -50%) scale(1); /* ✅ Tamaño normal cuando está activo */
  opacity: 1;
  visibility: visible;
  pointer-events: all;
}

/* Overlay oscuro de fondo */
.testimonial-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.4s ease, visibility 0.4s;
}

.testimonial-overlay.active {
  opacity: 1;
  visibility: visible;
  pointer-events: all;
}

/* Botón cerrar */
.close-testimonial-btn {
  position: absolute;
  top: 25px;
  right: 35px;
  background-color: transparent;
  border: none;
  font-size: 2.5em;
  color: #3a444e;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 45px;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  padding: 0;
  z-index: 10;
}

.close-testimonial-btn:hover {
  color: #c39d69;
  transform: rotate(90deg);
}

/* Comillas grandes en esquina superior izquierda */
.testimonial-quote-mark {
  position: absolute;
  top: 50px;
  left: 10%;
  font-size: 200px;
  color: #3a444e;
  font-family: Arial, sans-serif;
  font-weight: 700;
  line-height: 1;
  opacity: 1;
  z-index: 1;
}

/* Contenido central */
.testimonial-expanded-content {
  max-width: 650px;
  width: 100%;
  text-align: center;
  z-index: 5;
  padding: 0 20px;
}

/* Texto completo del testimonio - tamaño adaptativo */
.testimonial-full-text {
  color: #3a444e;
  font-style: italic;
  line-height: 1.6;
  margin: 0 0 35px 0;
  font-weight: 400;
}

/* Tamaños adaptativos según longitud del texto */
.testimonial-full-text.size-small {
  font-size: 2.2em;
}

.testimonial-full-text.size-medium {
  font-size: 1.6em;
}

.testimonial-full-text.size-large {
  font-size: 1.3em;
}

/* Información del cliente */
.testimonial-client-info {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
}

.testimonial-client-name-full {
  color: #3a444e;
  font-size: 1.1em;
  font-weight: 600;
}

.testimonial-separator {
  color: #c39d69;
  font-size: 1.1em;
  font-weight: 300;
}

.testimonial-process-type {
  color: #666;
  font-size: 1em;
  font-style: italic;
  font-weight: 400;
}

/* Sección de bandera (lado derecho) */
.testimonial-flag-section {
  position: absolute;
  right: 50px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  z-index: 5;
}

/* Bandera grande */
.testimonial-flag-large {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
  border: 4px solid white;
}

.testimonial-flag-large img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* Triángulo dorado */
.testimonial-triangle {
  width: 0;
  height: 0;
  border-left: 18px solid transparent;
  border-right: 18px solid transparent;
  border-top: 30px solid #c39d69;
  margin-top: 8px;
}
/* Nombre del país vertical */
.testimonial-country-name {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  transform: rotate(180deg);
  font-size: 1em;
  color: #3a444e;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
}

/* Responsive */
@media (max-width: 1200px) {
  .testimonial-expanded-panel {
    width: 75%;
    height: 75vh;
    padding: 70px 6% 50px 6%;
  }

  .testimonial-expanded-content {
    padding: 0 60px;
  }
}

@media (max-width: 968px) {
  .testimonial-expanded-panel {
    width: 85%;
    height: 80vh;
    padding: 60px 5% 40px 5%;
    border-radius: 50px;
  }

  .testimonial-quote-mark {
    font-size: 90px;
    top: 20px;
    left: 25px;
  }

  .close-testimonial-btn {
    top: 20px;
    right: 25px;
    font-size: 2.2em;
  }

  .testimonial-expanded-content {
    padding: 0 40px;
  }

  .testimonial-full-text.size-small {
    font-size: 1.8em;
  }

  .testimonial-full-text.size-medium {
    font-size: 1.4em;
  }

  .testimonial-full-text.size-large {
    font-size: 1.1em;
  }

  .testimonial-flag-section {
    right: 35px;
  }

  .testimonial-flag-large {
    width: 80px;
    height: 80px;
  }

  .testimonial-country-name {
    font-size: 0.9em;
  }

  .testimonial-triangle {
    border-left: 15px solid transparent;
    border-right: 15px solid transparent;
    border-top: 25px solid #c39d69;
  }
}

@media (max-width: 600px) {
  .testimonial-expanded-panel {
    width: 92%;
    height: 85vh;
    padding: 50px 4% 35px 4%;
    border-radius: 40px;
  }

  .testimonial-quote-mark {
    font-size: 60px;
    top: 15px;
    left: 20px;
  }

  .close-testimonial-btn {
    top: 15px;
    right: 20px;
    font-size: 1.8em;
  }

  .testimonial-expanded-content {
    padding: 0 20px;
    max-width: 100%;
  }

  .testimonial-full-text.size-small {
    font-size: 1.4em;
  }

  .testimonial-full-text.size-medium {
    font-size: 1.1em;
  }

  .testimonial-full-text.size-large {
    font-size: 0.95em;
  }

  .testimonial-client-name-full {
    font-size: 0.95em;
  }

  .testimonial-process-type {
    font-size: 0.85em;
  }

  /* Bandera abajo en móviles */
  .testimonial-flag-section {
    position: relative;
    right: auto;
    top: auto;
    transform: none;
    flex-direction: row;
    margin-top: 25px;
    justify-content: center;
  }

  .testimonial-flag-large {
    width: 55px;
    height: 55px;
  }

  .testimonial-country-name {
    writing-mode: horizontal-tb;
    transform: none;
    font-size: 0.8em;
  }

  .testimonial-triangle {
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 18px solid #c39d69;
  }
}

/* ==================== FINAL CTA SECTION - TEXTO CON ANIMACION TRIANGULAR ==================== */

.final-cta-section {
  padding: 0;
  background-color: #3a444e;
  text-align: center;
  min-height: 100vh;
  position: relative;
  overflow: hidden;
}

.final-cta-container {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* Capa de fondo - Color original */
.final-cta-bg-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #3a444e;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}

.final-cta-bg-layer .final-cta-title {
  color: white;
}

/* Capa superior - Color nuevo con clip-path triangular */
.final-cta-top-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  clip-path: polygon(0% 100%, 50% 100%, 100% 100%);
  transition: none;
  will-change: clip-path;
}

.final-cta-top-layer .final-cta-title {
  color: #3a444e;
}

.final-cta-title {
  font-size: 8vw;
  font-weight: 700;
  margin: 0;
  line-height: 1.2;
  transition: none;
}

/* ==================== FINAL CTA SECTION - BOTON ==================== */

.final-button-section {
  padding: 60px 5% 100px;
  background-color: white;
  text-align: center;
}

.final-cta-btn {
  background-color: #c39d69;
  color: white;
  border: none;
  padding: 18px 40px;
  border-radius: 50px;
  font-size: 1.1em;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 1px;
  box-shadow: 0 5px 20px rgba(195, 157, 105, 0.3);
}

.final-cta-btn:hover {
  background-color: #b38a5b;
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(195, 157, 105, 0.4);
}

/* ==================== FLOATING BOTTOM MENU ==================== */

.floating-menu {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) scale(1);
  background-color: rgba(58, 68, 78, 0.6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 50px;
  padding: 2px 2px;
  display: flex;
  align-items: center;
  gap: 15px;
  z-index: 1000;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
  transform-origin: center center;
}

.menu-toggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  z-index: 1001;
  transition: all 0.3s ease;
  margin: auto;
}

.menu-toggle span {
  width: 25px;
  height: 3px;
  background-color: white;
  border-radius: 2px;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.floating-menu.collapsed {
  padding: 15px;
  border-radius: 50px;
  width: 60px;
  height: 60px;
  transform: translateX(-50%) scale(0.85);
  transition: all 0.7s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  display: flex;
  justify-content: center;
  align-items: center;
}

.floating-menu.collapsed .menu-toggle {
  display: flex;
}

.floating-menu.collapsed .menu-items,
.floating-menu.collapsed .submenu {
  opacity: 0;
  pointer-events: none;
  display: none;
}

.floating-menu.collapsed:hover {
  border-radius: 50px;
  width: auto;
  height: auto;
  padding: 2px 2px;
  transform: translateX(-50%) scale(1);
  transition: all 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.floating-menu.collapsed:hover .menu-toggle {
  display: none;
}

.floating-menu.collapsed:hover .menu-items {
  display: flex;
  opacity: 1;
  pointer-events: all;
  animation: menuGrow 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.floating-menu.collapsed:hover .submenu.active {
  display: flex;
  opacity: 1;
  pointer-events: all;
}

@keyframes menuGrow {
  0% {
    transform: scaleX(0.3);
    opacity: 0;
  }

  60% {
    transform: scaleX(1.05);
  }

  100% {
    transform: scaleX(1);
    opacity: 1;
  }
}

.menu-items {
  display: flex;
  gap: 15px;
  transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.menu-item {
  color: white;
  text-decoration: none;
  padding: 12px 20px;
  border-radius: 25px;
  font-size: 0.9em;
  font-weight: 500;
  cursor: pointer;
  position: relative;
  white-space: nowrap;
  border: none;
  margin: 0;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
    font-size 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  background: transparent;
  overflow: visible;
}

.menu-item::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  width: 100%;
  height: 100%;
  background: rgba(90, 103, 116, 0.5);
  border-radius: 25px;
  z-index: -1;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.menu-item.active::before {
  transform: translate(-50%, -50%) scale(1);
}

.menu-item:hover::before {
  transform: translate(-50%, -60%) scale(1);
  background: rgba(90, 103, 116, 1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: inset 0 0 20px rgba(255, 255, 255, 0.15),
    0 4px 15px rgba(0, 0, 0, 0.2);
}

.menu-item:hover {
  transform: translateY(-5px);
  font-size: 1.1em;
  padding: 5px 20px;
}

.submenu {
  position: absolute;
  bottom: calc(100% + 15px);
  left: 0;
  right: 0;
  width: 100%;
  margin: 0 auto;
  background: rgba(255, 255, 255, 1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 20px 25px;
  display: none;
  flex-direction: column;
  gap: 8px;
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.2), 0 0 0 rgba(255, 255, 255, 0);
  animation: slideUpSmooth 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  transform-origin: bottom center;
}

.submenu.active {
  display: flex;
}

@keyframes slideUpSmooth {
  0% {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }

  60% {
    transform: translateY(-5px) scale(1.02);
  }

  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.submenu-item {
  color: #3a444e;
  padding: 12px 20px;
  cursor: pointer;
  border-radius: 12px;
  font-size: 0.9em;
  background: transparent;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.submenu-item:hover {
  background: #c39d69;
  color: white;
  transform: translateX(8px) scale(1.02);
  box-shadow: inset 0 0 20px rgba(255, 255, 255, 0.1),
    0 4px 15px rgba(0, 0, 0, 0.2);
}

.submenu.active .submenu-item {
  animation: fadeInUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  opacity: 0;
}

.submenu.active .submenu-item:nth-child(1) {
  animation-delay: 0.05s;
}

.submenu.active .submenu-item:nth-child(2) {
  animation-delay: 0.1s;
}

.submenu.active .submenu-item:nth-child(3) {
  animation-delay: 0.15s;
}

.submenu.active .submenu-item:nth-child(4) {
  animation-delay: 0.2s;
}

.submenu.active .submenu-item:nth-child(5) {
  animation-delay: 0.25s;
}

@keyframes fadeInUp {
  0% {
    opacity: 0;
    transform: translateY(10px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.floating-menu.transitioning {
  animation: pulse 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes pulse {
  0%,
  100% {
    transform: translateX(-50%) scale(1);
  }

  50% {
    transform: translateX(-50%) scale(0.95);
  }
}

/* =====================================================================
   RESPONSIVE + AJUSTES (rework nov 2026)
   Breakpoints: 1280 (laptop), 1100 (tablet horizontal), 900 (tablet),
   600 (telefono), 380 (telefono pequeno). El diseno de escritorio no cambia.
   ===================================================================== */

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

button {
  font: inherit;
  color: inherit;
}

img {
  max-width: 100%;
}

section {
  overflow-x: clip;
}

:focus-visible {
  outline: 3px solid #c39d69;
  outline-offset: 3px;
}

/* ---------- Navegacion superior ---------- */
.logo-section {
  text-decoration: none;
}

.logo-img {
  height: clamp(38px, 4.2vw, 60px);
  width: auto;
}

.lang-dropdown {
  top: calc(100% + 10px);
}

.lang-option {
  width: 100%;
  border: 0;
  background: none;
  text-align: left;
  font-family: inherit;
}

.lang-option .checkmark {
  visibility: hidden;
}

.lang-option.selected .checkmark {
  visibility: visible;
}

/* ---------- Hero ---------- */
.hero-title {
  font-size: clamp(2.5rem, 5.75vw, 5.2rem);
}

.animated-words {
  font-size: clamp(1rem, 1.75vw, 1.67em);
}

/* ---------- Mission ---------- */
.mission-section {
  --mc: 200px;
}

.mission-card {
  position: absolute;
  width: var(--mc);
  height: var(--mc);
  padding: calc(var(--mc) * 0.2) calc(var(--mc) * 0.15);
  border-radius: calc(var(--mc) * 0.15);
}

.mission-card .card-icon {
  width: calc(var(--mc) * 0.6);
  height: calc(var(--mc) * 0.6);
  margin-bottom: calc(var(--mc) * 0.05);
}

.mission-card .card-title {
  font-size: calc(var(--mc) * 0.144);
}

.card-image-content {
  border-radius: inherit;
}

.mission-title-center {
  font-size: min(8vw, 10rem);
}

/* ---------- Services ---------- */
.service-tab-vertical {
  border: 0;
  height: min(82vh, 760px);
  padding: 40px 10px;
  font-family: inherit;
}

.services-center-text h2 {
  font-size: clamp(2rem, 4.4vw, 4.5em);
}

/* ---------- Stats ---------- */
.stats-section {
  gap: clamp(48px, 9vw, 180px);
  padding: 80px 5% 150px;
}

.stats-cards-grid {
  width: min(460px, 100%);
  gap: clamp(14px, 3vw, 30px);
}

.stat-card {
  width: 100%;
  max-width: 200px;
  height: auto;
  aspect-ratio: 1 / 1;
  container-type: inline-size;
  cursor: default;
}

.stat-card .stat-number {
  font-size: 32cqi;
  white-space: nowrap;
}

.stat-card .stat-number.is-long,
.stat-card [data-i18n="stat4-number"] {
  font-size: 22cqi;
}

.stat-card .stat-title {
  font-size: clamp(1rem, 11cqi, 1.4em);
}

.stat-card .stat-label {
  font-size: clamp(0.8rem, 7.5cqi, 0.95em);
}

.card-content-hover {
  padding: 12%;
}

.card-content-hover p {
  font-size: clamp(0.72rem, 7.4cqi, 0.95rem);
  line-height: 1.5;
}

.stat-card.is-flipped .card-content-default {
  opacity: 0;
}

.stat-card.is-flipped .card-content-hover {
  opacity: 1;
}

.stats-right p {
  font-size: clamp(17px, 1.4vw, 20px);
}

/* ---------- Process ---------- */
.process-card {
  cursor: pointer;
}

.process-card.is-open {
  max-height: 650px;
  padding: 30px 50px 40px 50px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

.process-card.is-open .card-hover-content {
  opacity: 1;
  max-height: 450px;
}

/* ---------- Testimonials ---------- */
.testimonials-title {
  font-size: clamp(2.2rem, 5.5vw, 62pt);
  margin-bottom: clamp(28px, 4vw, 60px);
}

.testimonial-card {
  min-width: min(450px, 82vw);
  max-width: min(450px, 82vw);
}

.logo-card {
  min-width: clamp(170px, 24vw, 350px);
  max-width: clamp(170px, 24vw, 350px);
}

/* ---------- Final CTA ---------- */
.final-cta-btn {
  display: inline-block;
  text-decoration: none;
}

.final-button-section {
  padding-bottom: 130px;
}

.site-footer-note {
  margin-top: 40px;
  color: #8a949e;
  font-size: 0.85em;
}

/* ---------- Menu flotante ---------- */
.floating-menu {
  bottom: max(20px, env(safe-area-inset-bottom));
  max-width: calc(100% - 24px);
}

.submenu-item {
  display: block;
  text-decoration: none;
}

.submenu-item.is-soon {
  opacity: 0.55;
  cursor: default;
  pointer-events: none;
}

/* ===================== Laptop (<=1280) ===================== */
@media (max-width: 1280px) {
  .hero-left {
    padding: 110px 6% 60px;
  }

  .stats-section {
    padding: 80px 4% 150px;
  }
}

/* ===================== Tablet horizontal (<=1100) ===================== */
@media (max-width: 1100px) {
  .stats-section {
    flex-direction: column;
    padding: 100px 24px 70px;
    gap: 56px;
  }

  .stats-right {
    max-width: 680px;
    padding: 0;
  }

  .know-more-btn {
    position: static;
    transform: none;
    border-radius: 50px;
    align-self: center;
  }

  .know-more-btn:hover {
    padding-right: 40px;
  }
}

/* ===================== Tablet (<=900) ===================== */
@media (max-width: 900px) {
  /* Hero */
  .hero {
    grid-template-columns: 1fr;
    min-height: 0;
    padding: 0;
  }

  .hero-left {
    padding: 120px 24px 30px;
  }

  .animated-words {
    max-width: 100%;
    line-height: 1.6;
  }

  .hero-title {
    margin-bottom: 10px;
  }

  .hero-right {
    min-height: 0;
    height: min(70vw, 460px);
    margin: 10px 0 0 24px;
    border-radius: 30px 0 0 0;
    background-image: url("/images/portada-600.webp");
    box-shadow: -10px -10px 30px rgba(0, 0, 0, 0.18);
  }

  /* Mission */
  .mission-section {
    --mc: 170px;
    min-height: 320vh;
  }

  /* Services: pestanas horizontales arriba, titulo, boton */
  .services-section {
    min-height: 0;
  }

  .services-container-new {
    flex-direction: column;
    min-height: 0;
    padding: 90px 20px 70px;
    gap: 36px;
  }

  .service-tabs-vertical {
    position: static;
    transform: none;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
  }

  .service-tab-vertical,
  .service-tab-vertical:hover,
  .service-tab-vertical.active {
    writing-mode: horizontal-tb;
    transform: none;
    height: auto;
    padding: 12px 20px;
    border-radius: 999px;
    font-size: 0.95em;
    letter-spacing: 0.5px;
  }

  .services-center-text h2 {
    font-size: clamp(2rem, 6.5vw, 3.2rem);
    white-space: normal;
    padding: 0;
  }

  .lets-talk-btn {
    position: static;
    transform: none;
    border-radius: 50px;
  }

  .lets-talk-btn:hover {
    padding-right: 40px;
  }

  .service-slide-panel {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100%;
    border-radius: 0;
    z-index: 1100;
    overscroll-behavior: contain;
  }

  .service-slide-panel.active {
    right: 0;
  }

  .service-panel-content {
    padding: 80px 28px 60px;
  }

  .close-panel-btn {
    top: 16px;
    right: 16px;
  }

  /* Testimonials */
  .testimonial-expanded-panel {
    width: 92%;
    height: auto;
    max-height: 86vh;
  }

  /* Final CTA */
  .final-cta-title {
    font-size: 8.5vw;
  }

  /* Menu flotante */
  .menu-items {
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px;
  }

  .menu-item {
    padding: 10px 14px;
    font-size: 0.85em;
  }

  .floating-menu {
    border-radius: 28px;
  }

  .floating-menu.collapsed {
    width: 54px;
    height: 54px;
  }
}

/* ===================== Telefono (<=600) ===================== */
@media (max-width: 600px) {
  .top-nav {
    padding: 14px 16px;
  }

  .logo-section {
    padding: 0;
  }

  .nav-right {
    gap: 6px;
  }

  .lang-selector-btn,
  .login-btn,
  .signup-btn {
    padding: 6px 12px;
    font-size: 0.8em;
    border-width: 1.5px;
  }

  .lang-selector-btn {
    gap: 5px;
  }

  .hero-left {
    padding: 104px 16px 24px;
  }

  .hero-right {
    margin-left: 16px;
    height: 78vw;
  }

  .mission-section {
    --mc: 132px;
    min-height: 300vh;
  }

  .mission-title-center {
    font-size: 8.6vw;
  }

  .services-container-new {
    padding: 70px 16px 60px;
    gap: 28px;
  }

  .service-tab-vertical,
  .service-tab-vertical:hover,
  .service-tab-vertical.active {
    padding: 10px 16px;
    font-size: 0.88em;
  }

  .service-panel-content {
    padding: 72px 20px 48px;
  }

  .service-panel-content h2 {
    font-size: 1.9em;
  }

  .stats-section {
    padding: 80px 16px 60px;
    gap: 44px;
  }

  .stats-right {
    gap: 20px;
  }

  .stats-right p {
    text-align: left;
    line-height: 1.7;
  }

  .process-card.is-open {
    padding: 20px 25px 30px 25px;
  }

  .testimonials-section {
    padding: 50px 0 40px;
  }

  .testimonials-track {
    gap: 16px;
  }

  .testimonial-card {
    height: 210px;
    padding: 22px 10px 10px 22px;
  }

  .testimonial-text {
    font-size: 1em;
    line-height: 1.6;
    padding-right: 30px;
  }

  .flag-circle {
    width: 42px;
    height: 42px;
  }

  .logo-card {
    padding: 20px;
  }

  .testimonial-expanded-panel {
    flex-direction: column;
    justify-content: flex-start;
    padding: 64px 20px 28px;
    border-radius: 32px;
  }

  .final-cta-title {
    font-size: 9vw;
  }

  .final-cta-btn {
    padding: 15px 28px;
    font-size: 0.95em;
  }

  .floating-menu {
    bottom: max(14px, env(safe-area-inset-bottom));
  }

  .menu-item {
    padding: 8px 11px;
    font-size: 0.8em;
  }
}

/* ===================== Telefono pequeno (<=380) ===================== */
@media (max-width: 380px) {
  .globe-icon {
    display: none;
  }

  .lang-selector-btn,
  .login-btn,
  .signup-btn {
    padding: 6px 10px;
  }

  .mission-section {
    --mc: 118px;
  }
}

/* ===================== Pantallas tactiles ===================== */
/* En celulares y tablets no hay "hover": se abre con un toque (clase via JS) */
@media (hover: none) {
  .stat-card:hover,
  .stat-card[data-position]:hover {
    transform: none !important;
  }

  .stat-card:not(.is-flipped):hover .card-content-default {
    opacity: 1;
  }

  .stat-card:not(.is-flipped):hover .card-content-hover {
    opacity: 0;
  }

  .process-card:not(.is-open):hover {
    max-height: 100px;
    transform: none;
  }

  .process-card:not(.is-open):hover .card-hover-content {
    opacity: 0;
    max-height: 0;
  }

  .menu-item:hover {
    transform: none;
    font-size: inherit;
  }

  .testimonial-card:hover {
    transform: none;
  }
}

@media (hover: none) and (max-width: 600px) {
  .process-card:not(.is-open):hover {
    max-height: 85px;
  }
}

/* ===================== Menos movimiento ===================== */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .testimonials-track {
    animation: none !important;
  }

  .testimonials-row {
    overflow-x: auto;
    -webkit-mask-image: none;
    mask-image: none;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}

/* La seccion mission usa "sticky": overflow hidden lo romperia, clip no */
.mission-section,
.final-cta-section {
  overflow: clip;
}

/* Mientras vuelan, las tarjetas no llevan transicion (la hace el JS);
   ya en su lugar recuperan la transicion del zoom al pasar el mouse */
.stat-card {
  transition: box-shadow 0.4s ease;
}

.stat-card.is-settled {
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.4s ease;
}

.stats-left {
  width: min(460px, 100%);
}

.stats-cards-grid {
  justify-items: stretch;
}

.stat-card {
  margin: 0 auto;
}

.testimonials-title,
.services-center-text h2,
.final-cta-title {
  text-wrap: balance;
}

@media (min-width: 969px) and (max-width: 1280px) {
  .process-card {
    flex: 1 1 0;
    min-width: 0;
    padding-right: 40px;
  }
}

.login-btn,
.signup-btn,
.lang-selector-btn {
  white-space: nowrap;
}

/* que el menu flotante no tape el titulo del hero en pantallas bajas */
.hero-left {
  padding-bottom: 110px;
}

@media (max-width: 900px) {
  .hero-left {
    padding-bottom: 30px;
  }
}

@media (max-width: 380px) {
  .lang-selector-btn,
  .login-btn,
  .signup-btn {
    font-size: 0.76em;
    padding: 6px 9px;
  }

  .nav-right {
    gap: 5px;
  }
}

.testimonial-overlay {
  z-index: 1150;
}

.testimonial-expanded-panel {
  z-index: 1200;
}

/* Pantallas bajas (laptops 1366x768): el hero cabe completo en la primera vista */
@media (min-width: 901px) {
  .hero {
    min-height: 100vh;
    min-height: 100svh;
  }

  .hero-left {
    padding-top: 96px;
  }

  .hero-title {
    font-size: clamp(2.5rem, min(5.75vw, 8.6vh), 5.2rem);
    margin-bottom: 0;
  }

  .animated-words {
    font-size: clamp(0.95rem, min(1.75vw, 2.5vh), 1.67em);
    margin-bottom: 2.2vh;
  }
}
