/* ==========================================================================
   STYLES.CSS DE PEAK SITE STUDIO
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box; /* Evita que los paddings estiren las cajas hacia los lados */
}

html, body {
  max-width: 100%;
  overflow-x: clip; /* Bloquea el scroll horizontal de las animaciones sin romper el menú sticky */
}

/* ===== VARIABLES - Colores profesionales y coherentes ===== */
:root {
  --primary: #0a0f2c; /* Azul oscuro profundo */
  --accent: #00d4ff; /* Cian brillante (mismo que servicios) */
  --accent2: #0099ff; /* Azul secundario */
  --bg-light: #f8fafd; /* Fondo claro suave y moderno */
  --bg-dark: #0a0f2c; /* Fondo oscuro premium */
  --text-light: #1e2937; /* Texto oscuro en modo claro */
  --text-dark: #f1f5f9; /* Texto claro en modo oscuro */
  --text-soft-light: #64748b; /* Texto secundario claro */
  --text-soft-dark: #94a3b8; /* Texto secundario oscuro */
  --card-bg-light: #ffffff;
  --card-bg-dark: rgba(255, 255, 255, 0.06);
  --border-light: #e2e8f0;
  --border-dark: rgba(255, 255, 255, 0.12);
}

/* ===== MODO CLARO (por defecto) ===== */
body {
  font-family: "Inter", sans-serif;
  background: var(--bg-light);
  color: var(--text-light);
  line-height: 1.7;
  margin: 0; /* Ajustado a 0 para evitar que el navegador empuje la web en móviles */
  padding: 0;
}

/* ===== MODO OSCURO ===== */
body.dark {
  background: var(--bg-dark);
  color: var(--text-dark);
}

/* ===== LAYOUT ===== */
.container {
  width: 90%;
  max-width: 1100px;
  margin: auto;
}
section {
  padding: 80px 0;
}

/* ===== HEADER / NAV ===== */
.header {
  position: sticky;
  top: 0;
  z-index: 9999;
  background: rgba(255, 255, 255, 0.95);
  padding: 15px 0;
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-light);
}
body.dark .header {
  background: rgba(10, 15, 44, 0.95);
  border-bottom: 1px solid var(--border-dark);
}
.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}
nav {
  display: flex;
  align-items: center;
  gap: 10px;
}
nav a {
  text-decoration: none;
  color: var(--primary);
  font-weight: 500;
}
body.dark nav a {
  color: #fff;
}

/* LOGO + BRAND */
.logo {
  height: 28px;
  width: auto;
  flex-shrink: 0;
  transition: transform 0.3s ease;
}
.logo:hover {
  transform: scale(1.05);
}
.brand {
  display: flex;
  align-items: center;
  gap: 5px;
  text-decoration: none;
  color: inherit;
}
.brand-name {
  font-weight: 550;
  font-size: 16px;
  letter-spacing: 0px;
  line-height: 1;
  color: inherit;
}
body.dark .brand-name {
  background: linear-gradient(90deg, #ffffff, #a0b8ff);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-block;
  margin-top: 20px;
  padding: 12px 32px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #0a0f2c;
  text-decoration: none;
  border-radius: 50px;
  font-weight: 600;
  transition: all 0.3s;
}
.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(0, 212, 255, 0.35);
}

/* ===== HERO ===== */
.hero {
  background: linear-gradient(135deg, #0a0f2c, #1a2540);
  color: white;
  text-align: center;
  padding: 140px 20px 100px;
}
.hero h1 {
  font-size: 3.2rem;
  line-height: 1.1;
}

/* ===== SPLIT ===== */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}
.image {
  width: 100%;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}
body.dark .image {
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

/* ===== TEXT ===== */
p {
  color: var(--text-soft-light);
}
body.dark p {
  color: var(--text-soft-dark);
}
section:not(.hero):not(.about-hero) h1,
section:not(.hero):not(.about-hero) h2,
section:not(.hero):not(.about-hero) h3,
section:not(.hero):not(.about-hero) h4 {
  color: var(--text-light);
}
body.dark section:not(.hero) h1,
body.dark section:not(.hero) h2,
body.dark section:not(.hero) h3,
body.dark section:not(.hero) h4 {
  color: var(--text-dark);
}

/* ===== BENEFICIOS ===== */
.benefits {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 25px;
  text-align: center;
}
.card {
  background: var(--card-bg-light);
  padding: 30px 20px;
  border-radius: 16px;
  border: 1px solid var(--border-light);
}
body.dark .card {
  background: var(--card-bg-dark);
  border: 1px solid var(--border-dark);
}

/* ===== RESULTS ===== */
.results-section {
  background: var(--bg-light);
}
body.dark .results-section {
  background: var(--bg-dark);
}
.results-header {
  text-align: center;
  max-width: 700px;
  margin: auto;
  margin-bottom: 60px;
}
.results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
}
.result-card {
  background: var(--card-bg-light);
  padding: 35px;
  border-radius: 20px;
  border: 1px solid var(--border-light);
}
body.dark .result-card {
  background: var(--card-bg-dark);
  border: 1px solid var(--border-dark);
}
.result-desc,
.result-metrics span {
  color: var(--text-soft-light);
}
body.dark .result-desc,
body.dark .result-metrics span {
  color: var(--text-soft-dark);
}
.result-metrics {
  display: flex;
  gap: 25px;
  margin: 20px 0;
}

/* ===== THEME BUTTON ===== */
.theme-toggle {
  height: 32px;
  width: 32px;
  border: 1px solid var(--border-light);
  border-radius: 6px;
  background: none;
  cursor: pointer;
  transition: 0.3s;
  color: var(--primary);
}
body.dark .theme-toggle {
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
}
.theme-toggle:hover {
  background: rgba(0, 212, 255, 0.08);
}

/* ===== LANG SWITCH ===== */
.lang-switch {
  position: relative;
  display: inline-block;
  margin-left: 12px;
  z-index: 100;
}
.lang-current {
  display: flex !important;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 10px;
  background: #0f1629;
  color: #ffffff;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  white-space: nowrap;
  border: 2px solid transparent !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
  transition: all 0.2s ease !important;
  outline: none !important;
}
.lang-current:hover {
  background: #1a2338 !important;
  border: 2px solid #00d4ff !important;
  box-shadow:
    0 0 0 4px rgba(0, 212, 255, 0.25),
    0 6px 20px rgba(0, 212, 255, 0.45) !important;
}
.lang-switch:hover .lang-current {
  border: 2px solid transparent !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
}
.lang-menu {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 0px;
  background: #1f252f;
  border: 1px solid #444;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  display: none;
  min-width: 180px;
  padding: 8px 0;
  z-index: 9999;
}
.lang-switch:hover .lang-menu {
  display: block;
}
.flag-wrapper {
  display: inline-flex;
  padding: 2px;
  background: transparent;
  border: none;
}
.lang-current img,
.lang-option img {
  width: 26px;
  height: 17px;
  object-fit: cover;
  border-radius: 3px;
}
.arrow {
  font-size: 19px;
  line-height: 1;
  color: #ffffff;
}
.lang-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  color: #eee;
  text-decoration: none;
  font-size: 15px;
}
.lang-option:hover {
  background: #2a323f;
}

/* ===== FOOTER ===== */
.footer-pro {
  background: #080b14;
  color: #aaa;
  padding: 80px 0px 40px;
  margin-left: 0;
  margin-right: 0;
  margin-bottom: 0; /* Limpiados los márgenes negativos antiguos que causaban desborde lateral */
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 40px;
  margin-bottom: 50px;
}
.footer-pro h4 {
  color: white;
  margin-bottom: 15px;
  font-size: 14px;
}
.footer-pro a {
  display: block;
  text-decoration: none;
  color: #888;
  font-size: 14px;
  margin-bottom: 10px;
  transition: 0.3s;
}
.footer-pro a:hover {
  color: #00d4ff;
}
.footer-bottom {
  border-top: 1px solid #222;
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
}

/* ==================== HEADER FIX + MENÚ MÓVIL ==================== */
.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  gap: 15px;
}
nav {
  display: flex;
  align-items: center;
  gap: 15px;
  flex: 1;
  justify-content: flex-end;
}
.desktop-nav {
  flex: 1;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}
.nav-right {
  display: flex;
  align-items: center;
  gap: 15px;
}
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 34px;
  color: var(--primary);
  cursor: pointer;
  padding: 5px 10px;
}
body.dark .mobile-menu-btn {
  color: #fff;
}
.mobile-menu {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  z-index: 9999999;
  display: none;
  justify-content: flex-end;
}
.mobile-menu.active {
  display: flex;
}
.mobile-menu-links {
  position: fixed !important;
  top: 0 !important;
  right: 0 !important;
  width: 82vw !important;
  max-width: 300px !important;
  height: 100vh !important;
  padding: 80px 25px 40px 30px !important;
  background: #0a0f2c !important;
  z-index: 9999999999 !important;
  overflow-y: auto !important; 
}
.close-menu-btn {
  position: fixed;
  top: 18px;
  right: 18px;
  font-size: 32px;
  color: #fff;
  background: rgba(0, 0, 0, 0.4);
  border: none;
  border-radius: 8px;
  padding: 6px 10px;
  cursor: pointer;
  z-index: 9999999999 !important;
}
.mobile-link {
  display: block;
  color: #fff;
  font-size: 1.1rem;
  padding: 16px 0;
  text-align: left;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}
.mobile-link:last-child {
  border-bottom: none;
}
.mobile-link:active {
  background: rgba(0, 212, 255, 0.12);
}

/* ====================== ANIMACIONES SCROLL REVEAL ====================== */
.fade-up,
.fade-left,
.fade-right {
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.8s cubic-bezier(0.25, 0.1, 0.25, 1);
}
.fade-up.visible,
.fade-left.visible,
.fade-right.visible {
  opacity: 1;
  transform: translateY(0);
}
.fade-left {
  transform: translateX(-60px);
}
.fade-right {
  transform: translateX(60px);
}
.fade-up.delay { transition-delay: 0.1s; }
.fade-up.delay2 { transition-delay: 0.2s; }
.fade-up.delay3 { transition-delay: 0.3s; }
.hero-animate h1,
.hero-animate p,
.hero-animate .btn {
  opacity: 1;
  transform: none;
}

/* ================= HERO ================= */
.about-hero {
  background: linear-gradient(rgba(10,15,44,0.85), rgba(10,15,44,0.9)),
              url('https://images.unsplash.com/photo-1506905925346-21bda4d32df4?q=80&w=2000') center/cover no-repeat;
  text-align: center;
  padding: 160px 20px 120px;
  color: #ffffff;
}
.about-hero h1 {
  font-size: 3.5rem;
  color: #ffffff;
}
.about-hero p {
  font-size: 1.25rem;
  color: #cbd5e1;
}
body:not(.dark) .about-hero {
  background: linear-gradient(rgba(255,255,255,0.75), rgba(255,255,255,0.85)),
              url('https://images.unsplash.com/photo-1506905925346-21bda4d32df4?q=80&w=2000') center/cover no-repeat;
  color: #0f172a;
}
body:not(.dark) .about-hero p {
  color: #475569;
}
body:not(.dark) .about-hero h1 {
  color: #0f172a;
}

/* ================= BOTÓN PRIMARY ================= */
.btn-primary {
  background: linear-gradient(90deg, #00f5ff, #0099ff);
  color: #0a0f2c;
  padding: 18px 48px;
  border-radius: 60px;
  font-size: 1.15rem;
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
  transition: all 0.3s ease;
}
.btn-primary:hover {
  transform: translateY(-6px);
  box-shadow: 0 15px 35px rgba(0,245,255,0.4);
}

/* ================= CTA ================= */
.cta {
  background: linear-gradient(135deg, #0a0f2c, #1a2540);
  color: #ffffff;
  text-align: center;
  padding: 100px 20px;
}
.cta p {
  color: #cbd5e1;
}
body:not(.dark) {
  --text: #0f172a;
  --text-soft: #475569;
}
body.dark {
  --text: #ffffff;
  --text-soft: #cbd5e1;
}

/* ====================== MEGA MENU ====================== */
.nav-item {
  position: relative;
  display: inline-block;
}
.nav-link {
  text-decoration: none;
  color: inherit;
  font-weight: 500;
  padding: 12px 14px !important;
  border-radius: 8px;
  transition: background 0.25s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 46px; 
  line-height: 1;
}
.nav-link:hover {
  background: rgba(0, 212, 255, 0.08);
}
.chevron {
  font-size: 0.68em;
  transition: transform 0.3s ease;
  position: relative;
  top: -1px;
}
.desktop-nav a {
  display: inline-flex !important;
  align-items: center !important;
  height: 46px !important;
  padding: 12px 14px !important;
}
.mega-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  padding-top: 15px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 10000;
  pointer-events: none;
  width: 100vw;
}
.nav-item:hover .mega-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.mega-menu-content {
  background: white;
  border-radius: 22px;
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.22);
  border: 1px solid #e2e8f0;
  margin: 0 auto;
  max-width: 1180px;
  width: 95%;
  padding: 50px 48px;
}
body.dark .mega-menu-content {
  background: #0f1629;
  border-color: rgba(255, 255, 255, 0.09);
}
.mega-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 52px;
}
.mega-column {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px; 
}
.mega-column h4 {
  font-size: 14.8px;
  font-weight: 700;
  color: #00d4ff;
  margin-bottom: 28px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  line-height: 1.25;
  flex-shrink: 0;
}
.mega-column a {
  display: block;
  padding: 2px 6px;     
  color: var(--text-light);
  text-decoration: none;
  font-size: 15.4px;
  line-height: 1.4;  
  flex-shrink: 0;
}
body.dark .mega-column a {
  color: var(--text-dark);
}
.mega-column a:hover {
  color: #00d4ff;
  padding-left: 12px;
}

/* ====================== MEGA MENU RESPONSIVE FIX ====================== */
@media (max-width: 991px) {
  .mega-menu {
    display: none !important;
  }
}

/* ====================== CTA FINAL CENTRADO ====================== */
.final-cta {
  background: #ffffff;
  padding: 120px 20px;
  text-align: center;
  margin: 80px 0;
}
body.dark .final-cta {
  background: #0d153a;
  border-top: 1px solid var(--border-dark);
  border-bottom: 1px solid var(--border-dark);
}
.final-cta-content {
  max-width: 780px;
  margin: 0 auto;
}
.final-cta h2 {
  font-size: 2.35rem;
  line-height: 1.2;
  margin-bottom: 24px;
  color: #0a0f2c;
}
body.dark .final-cta h2 {
  color: #ffffff;
}
.final-cta p {
  font-size: 1.28rem;
  line-height: 1.55;
  color: #475569;
  max-width: 680px;
  margin: 0 auto 40px;
}
body.dark .final-cta p {
  color: #94a3b8;
}
.btn-big {
  display: inline-block;
  padding: 18px 42px !important;
  font-size: 1.15rem !important;
  font-weight: 600;
  border-radius: 50px;
  background: linear-gradient(135deg, #00d4ff, #0099ff);
  color: #0a0f2c;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 10px 30px rgba(0, 212, 255, 0.3);
}
.btn-big:hover {
  transform: translateY(-4px);
  box-shadow: 0 15px 40px rgba(0, 212, 255, 0.45);
}

/* ====================== BOTÓN PROYECTOS ====================== */
.projects-cta {
  text-align: center;
  margin: 60px 0 20px;
  padding: 20px 0;
}
.btn-projects {
  display: inline-block;
  padding: 16px 40px !important;
  font-size: 1.08rem !important;
  font-weight: 600;
  border-radius: 50px;
  background: linear-gradient(135deg, #00d4ff, #0099ff);
  color: #0a0f2c;
  text-decoration: none;
  transition: all 0.35s ease;
  box-shadow: 0 8px 25px rgba(0, 212, 255, 0.35);
  min-width: 280px;
}
.btn-projects:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 35px rgba(0, 212, 255, 0.45);
}

/* ==========================================================================
   ===== ZONA EXCLUSIVA RESPONSIVE: SOLO COMPORTAMIENTO MÓVIL Y TABLET =====
   ========================================================================== */

/* Visibilidad de menús en Tablets / Móviles */
@media (max-width: 991px) {
  .desktop-nav,
  .nav-right,
  .header .lang-switch { /* <--- CAMBIO ACÁ: Ahora SOLO oculta el de la cabecera del PC */
    display: none !important;
  }
  .mobile-menu-btn {
    display: block;
  }
  .header {
    position: relative;
    z-index: 100;
  }
  .mobile-menu {
    z-index: 999999 !important;
  }
  .mobile-menu-links {
    z-index: 1000000 !important;
    box-shadow: -15px 0 40px rgba(0, 0, 0, 0.5);
  }
  .close-menu-btn {
    z-index: 1000001 !important;
  }
  .hero, .about-hero, .services-section, .cta, .results-section, .split, .benefits, .results-grid, .footer-pro, section, .container {
    position: relative;
    z-index: 1 !important;
  }
  body.menu-open {
    overflow: hidden;
  }
  .mobile-theme-btn {
    display: block !important;
    height: 38px;
    width: 38px;
    font-size: 1.2rem;
    margin-left: 8px;
    position: relative !important;  
    z-index: 999999 !important;     
    pointer-events: auto !important; 
  }
  .desktop-only.nav-right {
    display: none !important;
  }
  .theme-toggle.mobile-theme-btn {
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
  }
  body.light .theme-toggle.mobile-theme-btn {
    border-color: var(--border-light);
    background: rgba(0, 0, 0, 0.08);
    color: var(--primary);
  }
}

@media (min-width: 992px) {
  .mobile-menu,
  .mobile-menu-btn,
  .mobile-theme-btn {
    display: none !important;
  }
}

/* Ajustes finos de tamaño para Tablets e iPads */
@media (max-width: 1024px) and (min-width: 769px) {
  .split {
    gap: 40px;
  }
  .benefits {
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }
  .results-grid {
    grid-template-columns: 1fr 1fr;
    gap: 25px;
  }
}

/* Ajustes finos de tamaño y grillas para Móviles */
@media (max-width: 768px) {
  .container {
    width: 94%;
    max-width: 100%;
    padding: 0 15px;
    box-sizing: border-box;
  }
  section {
    padding: 55px 0 !important;
  }
  .hero {
    padding: 90px 20px 70px !important;
  }
  .hero h1 {
    font-size: 2rem !important;
    line-height: 1.2 !important;
  }
  .hero p {
    font-size: 1.08rem !important;
  }
  .about-hero {
    padding: 110px 20px 80px !important;
  }
  .about-hero h1 {
    font-size: 2.2rem !important;
  }
  .split {
    grid-template-columns: 1fr !important;
    gap: 35px !important;
  }
  .benefits {
    grid-template-columns: 1fr !important;
    gap: 18px !important;
  }
  .card {
    padding: 24px 18px !important;
    box-sizing: border-box;
  }
  .results-grid {
    grid-template-columns: 1fr !important;
    gap: 22px !important;
  }
  .result-card {
    padding: 28px 20px !important;
    box-sizing: border-box;
  }
  /* Forzado adaptativo para que los botones mantengan su diseño de píldora degradada en móvil */
  .btn, .btn-primary, .btn-big, .btn-projects {
    box-sizing: border-box;
    display: block !important;
    width: 100% !important;
    max-width: 340px !important;
    margin: 25px auto !important;
    padding: 15px 30px !important;
    font-size: 1rem !important;
    text-align: center;
  }
  h2 {
    font-size: 1.6rem !important;
    line-height: 1.25 !important;
  }
  h3 {
    font-size: 1.3rem !important;
  }
  p {
    font-size: 0.98rem !important;
    line-height: 1.6 !important;
  }
  .final-cta {
    padding: 70px 20px !important;
  }
  .final-cta h2 {
    font-size: 1.75rem !important;
  }
  .projects-cta {
    margin: 40px 0 30px !important;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 35px !important;
  }
  .footer-pro {
    padding: 60px 20px 40px !important;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }
}

/* ==========================================================================
   ARREGLO EXCLUSIVO ANTI-DESBORDAMIENTO (SOLO PARA /en/index.html)
   ========================================================================== */
.en-index-body {
  overflow-x: hidden;
}

.en-index-body .mega-menu {
  max-width: 100vw;
  box-sizing: border-box;
}

/* =================================================================
   🌐 DESPLEGABLE DE IDIOMAS EN MÓVIL (Versión Acordeón Robusta)
   ================================================================= */
@media (max-width: 991px) {
  .mobile-lang-container {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: 100% !important;
    margin-top: 15px !important;
    padding-top: 15px !important;
    border-top: 1px solid rgba(255, 255, 255, 0.15) !important;
    box-sizing: border-box !important;
  }

  .mobile-lang-switch {
    position: relative !important;
    display: block !important;
    width: 100% !important;
  }

  /* Botón principal del selector en móvil */
  .mobile-lang-switch .lang-current {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    padding: 12px 16px !important;
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 10px !important;
    color: #ffffff !important;
    font-weight: 500 !important;
    font-size: 1rem !important;
    cursor: pointer !important;
    box-sizing: border-box !important;
  }

  .mobile-lang-switch .lang-current .arrow {
    font-size: 1rem !important;
    color: #ffffff !important;
    transition: transform 0.3s ease !important;
  }

  /* Rotación de la flecha al abrir */
  .mobile-lang-switch.active .lang-current .arrow {
    transform: rotate(180deg) !important;
  }

  /* Menú desplegable móvil en flujo normal (tipo acordeón para evitar cortes de scroll) */
  .mobile-lang-switch .lang-menu {
    display: none !important;
    position: relative !important;
    top: auto !important;
    bottom: auto !important;
    left: 0 !important;
    width: 100% !important;
    margin-top: 8px !important;
    margin-bottom: 0 !important;
    background: #151d3b !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 10px !important;
    box-shadow: none !important;
    overflow: hidden !important;
    z-index: 10 !important;
  }

  /* Mostrar menú al activarse */
  .mobile-lang-switch.active .lang-menu {
    display: block !important;
  }

  .mobile-lang-switch .lang-menu .lang-option {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    padding: 12px 16px !important;
    color: #ffffff !important;
    text-decoration: none !important;
    font-size: 0.95rem !important;
  }

  .mobile-lang-switch .lang-menu .lang-option:not(:last-child) {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
  }

  .mobile-lang-switch .lang-menu .lang-option:hover {
    background: rgba(0, 212, 255, 0.2) !important;
    color: #00d4ff !important;
  }
}

  .mobile-lang-switch .flag-wrapper {
    display: inline-flex !important;
    align-items: center !important;
    width: 22px !important;
  }

  .mobile-lang-switch .flag-wrapper img {
    width: 100% !important;
    height: auto !important;
    border-radius: 3px !important;
  }

/* FOOTER en modo claro */
body:not(.dark) .footer-pro {
  background: #f8fafd !important;
  color: #475569 !important;
}

body:not(.dark) .footer-pro h4 {
  color: #1e2937 !important;
}

body:not(.dark) .footer-pro a {
  color: #64748b !important;
}

body:not(.dark) .footer-pro a:hover {
  color: #0f172a !important;
}

body:not(.dark) .footer-bottom {
  border-top-color: #e2e8f0 !important;
  color: #64748b !important;
}

/* =================================================
   🌐 CORRECCIÓN MÁSTER: IDIOMAS MODO CLARO PREMIUM 
   ================================================= */

/* --- ESTADO NORMAL --- */
body:not(.dark) .header .lang-current {
  background: #ffffff !important;
  color: #0a0f2c !important;

  border: 2px solid transparent !important; 
  box-shadow: 0 8px 25px rgba(10, 15, 44, 0.08) !important;
  transition: all 0.3s ease !important;
}

/* Color de la flecha en modo claro */
body:not(.dark) .header .lang-current .arrow {
  color: #0a0f2c !important;
}

/* --- ESTADO ACTIVE / HOVER (Como en la Imagen 2) --- */

body:not(.dark) .lang-current:hover,
body:not(.dark) .lang-switch:hover .lang-current {
  background: #ffffff !important;
  border: 2px solid #00d4ff !important; 
  box-shadow: 
    0 0 0 4px rgba(0, 212, 255, 0.2), 
    0 10px 30px rgba(0, 212, 255, 0.35) !important; 
}

/* --- MENÚ DESPLEGABLE --- */
body:not(.dark) .lang-menu {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 14px !important; 
  box-shadow: 0 15px 40px rgba(10, 15, 44, 0.1) !important;
  padding: 6px 0 !important;
}

/* Texto de las opciones de idioma */
body:not(.dark) .lang-menu .lang-option {
  color: #1e2937 !important;
  font-weight: 500 !important;
}

/* Hover de las opciones internas */
body:not(.dark) .lang-menu .lang-option:hover {
  background: #f1f5f9 !important;
  color: #0099ff !important;
}

/* Estilo profesional para el enlace "Ver caso completo" */
.ver-caso {
  display: inline-flex;
  align-items: center;
  gap: 8px; 
  color: var(--accent); 
  font-weight: 600;
  text-decoration: none;
  transition: all 0.35s ease;
  padding: 5px 0;
  border-bottom: 2px solid transparent; 
}

/* Efecto al pasar el cursor (Hover) */
.ver-caso:hover {
  color: var(--accent2); 
  border-bottom: 2px solid var(--accent);
  padding-left: 5px;
}

/* Asegurar que se vea bien en Modo Oscuro */
body.dark .ver-caso {
  color: var(--accent);
}


/* Estilo específico SOLO para la tarjeta de La Cumbre */
.card-cumbre {
  background-color: #000000 !important;
  position: relative !important;
  overflow: hidden !important;
  border: none !important;
  min-height: 300px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.card-cumbre .result-bg {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  z-index: 0 !important;
  background-image: url('/assets/img/proyectos/LaCumbre/logo-la-cumbre.png') !important;
  background-size: cover !important; /* Cambiado a cover para que llene el espacio */
  background-position: center !important;
  background-repeat: no-repeat !important;
}

/* Asegurar que el texto se lea sobre el fondo negro */
.card-cumbre .result-content {
  position: relative !important;
  z-index: 1 !important;
  background: rgba(0,0,0,0.6); /* Fondo semitransparente para leer mejor el texto */
  padding: 20px;
  border-radius: 0 0 20px 20px;
}

.card-cumbre .result-content h3, 
.card-cumbre .result-content p, 
.card-cumbre .result-content span,
.card-cumbre .result-content strong {
  color: #ffffff !important;
}



/* Clase base para TODAS las tarjetas de proyectos */
.result-card {
  background-color: #000000 !important;
  position: relative !important;
  overflow: hidden !important;
  border: none !important;
  min-height: 300px !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: flex-end !important;
  border-radius: 20px !important;
}

.result-card .result-bg {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  z-index: 0 !important;
  background-size: cover !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
}

/* El contenedor del texto ahora es universal */
.result-card .result-content {
  position: absolute !important; /* Cambiado a absolute para cubrir todo */
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  z-index: 1 !important;
  background: rgba(0,0,0,0.6); 
  display: flex !important;
  flex-direction: column !important;
  justify-content: flex-end !important; 
  padding: 30px !important; /* Si quieres que el texto no toque el borde, el padding está bien aquí */
  box-sizing: border-box !important; /* ESTO ES LO QUE TE FALTA */
  border-radius: 20px !important;
}
/* Texto siempre blanco para legibilidad total */
.result-card .result-content h3, 
.result-card .result-content p, 
.result-card .result-content span,
.result-card .result-content strong,
.result-card .result-content a {
  color: #ffffff !important;
}

/* ==========================================================================
   🔧 CORRECCIÓN FINAL: DESPLEGABLE MÓVIL Y LÍNEAS
   ========================================================================== */
@media (max-width: 991px) {
  /* Eliminar la línea inferior extra del último enlace (Contacto) */
  #mobileMenu .mobile-link:last-child {
    border-bottom: none !important;
  }

  /* Contenedor limpio con una sola línea separadora superior */
  #mobileMenu .mobile-lang-container {
    display: block !important;
    position: relative !important;
    width: 100% !important;
    margin-top: 15px !important;
    padding-top: 15px !important;
    border-top: 1px solid rgba(255, 255, 255, 0.15) !important;
    box-sizing: border-box !important;
  }

  #mobileMenu .mobile-lang-switch {
    position: relative !important;
    display: block !important;
    width: 100% !important;
  }

  /* Botón principal del selector móvil */
  #mobileMenu .mobile-lang-switch .lang-current {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    color: #ffffff !important;
    padding: 12px 16px !important;
    border-radius: 10px !important;
    font-size: 1rem !important;
    box-sizing: border-box !important;
    cursor: pointer !important;
  }

  #mobileMenu .mobile-lang-switch .lang-current span {
    color: #ffffff !important;
  }

  /* Forzar que el menú de opciones permanezca oculto por defecto */
  #mobileMenu .mobile-lang-switch .lang-menu {
    display: none !important;
  }

  /* Al estar activo (.active), se despliega flotando por encima sin que el scroll lo corte */
  #mobileMenu .mobile-lang-switch.active .lang-menu {
    display: block !important;
    position: absolute !important;
    bottom: calc(100% + 8px) !important;
    left: 0 !important;
    width: 100% !important;
    background: #151d3b !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    border-radius: 10px !important;
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.7) !important;
    padding: 6px 0 !important;
    z-index: 2147483647 !important;
  }

  #mobileMenu .mobile-lang-switch.active .lang-menu .lang-option {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    padding: 12px 16px !important;
    color: #ffffff !important;
    text-decoration: none !important;
    font-size: 0.95rem !important;
  }

  #mobileMenu .mobile-lang-switch.active .lang-menu .lang-option:hover {
    background: rgba(0, 212, 255, 0.2) !important;
    color: #00d4ff !important;
  }
}

/* Añade el borde y diseño de tarjeta al bloque de texto de la sección split */
.split .text {
  background: var(--card-bg-light);
  border: 1px solid var(--border-light);
  border-radius: 20px;
  padding: 40px;
}

body.dark .split .text {
  background: var(--card-bg-dark);
  border: 1px solid var(--border-dark);
}


/* Envuelve el contenido del CTA final con el estilo de tarjeta y borde */
.final-cta-content {
  background: var(--card-bg-light);
  border: 1px solid var(--border-light);
  border-radius: 20px;
  padding: 60px 40px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
}

body.dark .final-cta-content {
  background: var(--card-bg-dark);
  border: 1px solid var(--border-dark);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}


/* Añade el borde y diseño de tarjeta al bloque de texto de la sección split */
.split .text {
  background: var(--card-bg-light);
  border: 1px solid var(--border-light);
  border-radius: 20px;
  padding: 40px;
}

body.dark .split .text {
  background: var(--card-bg-dark);
  border: 1px solid var(--border-dark);
}


/* ==========================================================================
   ESTILOS PARA LA SECCIÓN INTRO CON BORDE Y ESPACIADO REDUCIDO
   ========================================================================== */
.intro-section {
  padding-bottom: 50px !important; /* Reduce drásticamente el espacio de abajo */
}

.intro-section .card {
  padding: 45px 40px !important; /* Espacio interior generoso y limpio dentro de la tarjeta */
}

.intro-section h2 {
  margin-top: 0;
  margin-bottom: 20px;
}


/* ==========================================================================
   LÍNEA SEPARADORA SUPERIOR PARA EL FOOTER
   ========================================================================== */
.footer-pro {
  border-top: 1px solid var(--border-light) !important;
}

body.dark .footer-pro {
  border-top: 1px solid var(--border-dark) !important;
}



/* ====================== SECCIÓN CATEGORÍAS ESTILO PORTAFOLIO ====================== */
.categories-section {
  padding: 60px 0 100px;
}

.categories-section .container {
  text-align: center;
}

.categories-portfolio-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* 2x2 en escritorio */
  gap: 35px;
  max-width: 1280px;
  margin: 0 auto;
}

/* Tarjeta base como contenedor de imagen */
.category-card-portfolio {
  position: relative;
  display: flex;
  align-items: flex-end; /* Texto abajo al estilo portafolio moderno */
  min-height: 320px;
  border-radius: 24px;
  overflow: hidden;
  text-decoration: none;
  background-color: #1e293b; /* Fondo de seguridad */
  background-image: var(--bg-image);
  background-size: cover;
  background-position: center;
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease;
  cursor: pointer;
}

/* Capa oscura interna para que el texto resalte sobre la imagen */
.category-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to top, rgba(15, 22, 41, 0.95) 10%, rgba(15, 22, 41, 0.4) 100%);
  transition: background 0.3s ease;
  z-index: 1;
}

/* Contenido de la tarjeta */
.category-content-portfolio {
  position: relative;
  z-index: 2;
  padding: 40px;
  text-align: left;
  width: 100%;
}

.category-icon-portfolio {
  font-size: 2.2rem;
  display: block;
  margin-bottom: 15px;
  transition: transform 0.3s ease;
}

.category-card-portfolio h3 {
  font-family: 'Inter', sans-serif;
  color: #ffffff !important; /* Siempre blanco para contrastar con la foto */
  font-size: 1.6rem;
  font-weight: 600;
  margin: 0 0 12px 0;
  line-height: 1.3;
}

.category-btn-portfolio {
  color: #00d4ff;
  font-size: 1rem;
  font-weight: 500;
  display: inline-block;
  transition: padding 0.3s ease;
}

/* ====================== EFECTOS HOVER (PREMIUM) ====================== */
.category-card-portfolio:hover {
  transform: translateY(-10px);
  box-shadow: 0 22px 45px rgba(0, 212, 255, 0.15);
}

/* El fondo oscurece un pelín más al pasar el ratón */
.category-card-portfolio:hover .category-overlay {
  background: linear-gradient(to top, rgba(15, 22, 41, 0.98) 20%, rgba(15, 22, 41, 0.5) 100%);
}

.category-card-portfolio:hover .category-icon-portfolio {
  transform: scale(1.15) rotate(-5deg);
}

.category-card-portfolio:hover .category-btn-portfolio {
  padding-left: 8px;
}

/* ====================== ADAPTACIÓN MODO CLARO DEFINITIVA ====================== */

/* 1. Fondo blanco para las tarjetas, borde gris claro y sombra suave */
body:not(.dark) .category-card-portfolio {
  background-color: #ffffff !important;
  border: 2px solid #e2e8f0 !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06) !important;
}

/* 2. Cambiamos la capa oscura por un degradado sutil de blanco a transparente */
body:not(.dark) .category-card-portfolio .category-overlay {
  background: linear-gradient(to top, rgba(255, 255, 255, 0.95) 20%, rgba(255, 255, 255, 0.1) 100%) !important;
}

/* 3. Textos en gris oscuro para que contrasten perfectamente sobre el blanco */
body:not(.dark) .category-card-portfolio h3 {
  color: #0f172a !important;
}

/* 4. Comportamiento en Hover (Modo Claro) */
body:not(.dark) .category-card-portfolio:hover {
  border-color: #00d4ff !important;
  box-shadow: 0 20px 45px rgba(0, 212, 255, 0.15) !important;
}

/* Al hacer hover, la capa blanca se vuelve ligeramente más sólida */
body:not(.dark) .category-card-portfolio:hover .category-overlay {
  background: linear-gradient(to top, rgba(255, 255, 255, 0.98) 30%, rgba(255, 255, 255, 0.3) 100%) !important;
}

/* ====================== RESPONSIVE ====================== */
@media (max-width: 992px) {
  .categories-portfolio-grid {
    grid-template-columns: 1fr; /* Una columna en móvil */
    gap: 25px;
  }
  .category-card-portfolio {
    min-height: 260px;
  }
  .category-content-portfolio {
    padding: 30px;
  }
}

/* ====================== TÍTULO DE SECCIÓN (ESTILO PILULA) ====================== */
.section-title {
  display: inline-block;
  padding: 14px 28px;
  border-radius: 14px;
  font-size: 2.2rem;
  margin: 0 auto 60px;
  text-align: center;
}

/* Modo oscuro */
body.dark .section-title,
body:not(.light) .section-title {
  background: #1e2937;
  color: #f8fafc;
  border: 1px solid #334155;
  box-shadow: 0 10px 25px rgba(0,0,0,0.4);
}

/* Modo claro (el que se ve en la primera imagen) */
body:not(.dark) .section-title,
body:not(.dark) .categories-section .section-title,
body:not(.dark) h2.section-title {
  background: #ffffff !important;
  color: #0f172a !important;
  border: 2px solid #e2e8f0 !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08) !important;
}

/* ==========================================================================
   🔧 CORRECCIÓN PARA LA SECCIÓN DE RESULTADOS / PROYECTOS
   ========================================================================== */
.results-section .container {
  max-width: 1280px; /* Alineado con el ancho máximo de otras secciones */
}

.results-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* 3 columnas limpias en escritorio */
  gap: 35px;
  max-width: 1280px;
  margin: 0 auto;
}

/* Ajuste responsivo para tablets y móviles */
@media (max-width: 1024px) {
  .results-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
  }
}

@media (max-width: 768px) {
  .results-grid {
    grid-template-columns: 1fr !important;
    gap: 22px !important;
  }
}

/* ==========================================================================
   🔧 CORRECCIÓN EXCLUSIVA PARA EL LOGO DE NORDICWEAR STORE
   ========================================================================== */

/* Opción A: Si la imagen está aplicada como fondo en .result-bg dentro de la tarjeta de NordicWear */
.result-card:nth-child(2) .result-bg,
.result-card.card-nordic .result-bg {
  background-size: 85% auto !important; /* Reduce el tamaño horizontal para que se vea completo con margen */
  background-position: center !important;
  background-repeat: no-repeat !important;
}