/* ==========================================================================
   ESTUDIO WEB DESIGN - ESTILOS PRINCIPALES
   Tipografía: 'Sora' (Google Fonts)
   Modo Claro / Modo Oscuro con variables CSS
   ========================================================================== */

:root {
  /* Tipografía */
  --font-family: 'Sora', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Paleta de la Marca (Inspirada en el isotipo) */
  --brand-orange: #f15a24;
  --brand-orange-light: #ff7e47;
  --brand-pink: #e02475;
  --brand-magenta: #a81977;
  --brand-gradient: linear-gradient(135deg, #f15a24 0%, #e02475 50%, #871580 100%);
  --brand-gradient-glow: linear-gradient(135deg, rgba(241, 90, 36, 0.4) 0%, rgba(224, 36, 117, 0.3) 100%);
  --brand-gradient-hover: linear-gradient(135deg, #ff7038 0%, #f03383 100%);

  /* Modo Oscuro (Por defecto para temática tecnológica futurista) */
  --bg-primary: #0a0b10;
  --bg-secondary: #12131c;
  --bg-card: rgba(22, 24, 38, 0.7);
  --bg-card-hover: rgba(30, 33, 52, 0.85);
  --bg-glass: rgba(10, 11, 16, 0.85);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(241, 90, 36, 0.5);

  --text-main: #f3f4f6;
  --text-muted: #9ca3af;
  --text-heading: #ffffff;

  --badge-bg: rgba(241, 90, 36, 0.12);
  --badge-text: #ff7e47;
  --badge-border: rgba(241, 90, 36, 0.25);

  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 16px 36px rgba(0, 0, 0, 0.4);
  --shadow-neon: 0 8px 30px rgba(241, 90, 36, 0.25);

  --carousel-filter: brightness(0.8) contrast(1.1);
  --carousel-filter-hover: brightness(1.1) contrast(1.2);

  /* Fondos traseros (Backside) 3D con cambio de color */
  --back-card-1: radial-gradient(circle at 10% 10%, rgba(241, 90, 36, 0.22) 0%, rgba(18, 16, 28, 0.95) 100%);
  --back-card-2: radial-gradient(circle at 90% 10%, rgba(168, 25, 119, 0.28) 0%, rgba(15, 17, 32, 0.95) 100%);
  --back-card-3: radial-gradient(circle at 50% 0%, rgba(0, 210, 255, 0.20) 0%, rgba(13, 22, 35, 0.95) 100%);
  --back-border-1: rgba(241, 90, 36, 0.4);
  --back-border-2: rgba(224, 36, 117, 0.4);
  --back-border-3: rgba(0, 210, 255, 0.4);
}

/* Modo Claro */
[data-theme="light"] {
  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --bg-card: rgba(255, 255, 255, 0.85);
  --bg-card-hover: rgba(255, 255, 255, 0.98);
  --bg-glass: rgba(248, 250, 252, 0.88);
  --border-color: rgba(0, 0, 0, 0.08);
  --border-focus: rgba(241, 90, 36, 0.6);

  --text-main: #334155;
  --text-muted: #64748b;
  --text-heading: #0f172a;

  --badge-bg: rgba(241, 90, 36, 0.08);
  --badge-text: #e02475;
  --badge-border: rgba(241, 90, 36, 0.2);

  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 16px 36px rgba(0, 0, 0, 0.08);
  --shadow-neon: 0 8px 30px rgba(241, 90, 36, 0.15);

  --carousel-filter: brightness(0.3) grayscale(100%);
  --carousel-filter-hover: brightness(1) grayscale(0%);

  /* Fondos traseros (Backside) 3D en Modo Claro */
  --back-card-1: radial-gradient(circle at 10% 10%, #fff3ed 0%, #ffffff 100%);
  --back-card-2: radial-gradient(circle at 90% 10%, #fdf2f8 0%, #ffffff 100%);
  --back-card-3: radial-gradient(circle at 50% 0%, #ecf9ff 0%, #ffffff 100%);
  --back-border-1: rgba(241, 90, 36, 0.35);
  --back-border-2: rgba(224, 36, 117, 0.35);
  --back-border-3: rgba(0, 180, 220, 0.35);
}

/* Reset y Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: var(--font-family);
  font-size: 16px;
  scroll-behavior: smooth;
  scroll-padding-top: 85px;
  background-color: var(--bg-primary);
  color: var(--text-main);
  transition: background-color 0.3s ease, color 0.3s ease;
  overflow-x: hidden;
  max-width: 100%;
}

body {
  overflow-x: hidden;
  max-width: 100%;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
  text-decoration: none;
  transition: all 0.25s ease;
}

button, input, select, textarea {
  font-family: inherit;
}

.container {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 2rem;
}

@media (max-width: 768px) {
  .container {
    padding: 0 1.25rem;
  }
}

@media (max-width: 576px) {
  .container {
    padding: 0 1rem;
  }
}

/* ==========================================================================
   PRELOADER
   ========================================================================== */
#preloader {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background-color: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

#preloader.loaded {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.preloader-content {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.preloader-logo {
  width: 220px;
  max-width: 75vw;
  animation: pulseLogo 2s infinite ease-in-out;
}

@keyframes pulseLogo {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 15px rgba(241, 90, 36, 0.3)); }
  50% { transform: scale(1.04); filter: drop-shadow(0 0 30px rgba(224, 36, 117, 0.5)); }
}

.preloader-progress-wrap {
  width: 200px;
  height: 4px;
  background: var(--border-color);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}

.preloader-bar {
  height: 100%;
  width: 0%;
  background: var(--brand-gradient);
  border-radius: 999px;
  transition: width 0.15s ease-out;
}

.preloader-number {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--text-heading);
}

.preloader-status {
  font-size: clamp(0.72rem, 2.8vw, 0.85rem);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  max-width: 90vw;
  text-align: center;
  padding: 0 0.5rem;
}

/* ==========================================================================
   STICKY HEADER / NAVBAR
   ========================================================================== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.site-header.scrolled {
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.35);
  border-bottom-color: rgba(255, 255, 255, 0.12);
}

[data-theme="light"] .site-header.scrolled {
  box-shadow: 0 8px 24px -8px rgba(0, 0, 0, 0.08);
  border-bottom-color: rgba(0, 0, 0, 0.1);
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
  transition: height 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.site-header.scrolled .navbar {
  height: 68px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.nav-logo {
  height: 44px;
  width: auto;
  object-fit: contain;
  transition: height 0.3s ease;
}

.site-header.scrolled .nav-logo {
  height: 38px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.nav-link {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-main);
  position: relative;
  padding: 0.5rem 0;
  text-decoration: none;
  transition: color 0.25s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--brand-orange);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0%;
  height: 2px;
  background: var(--brand-gradient);
  transition: width 0.3s ease;
  border-radius: 2px;
}

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

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Theme Toggle Button */
.theme-toggle {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-heading);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.25s ease;
  outline: none;
}

.theme-toggle:hover {
  border-color: var(--brand-orange);
  transform: rotate(15deg);
  box-shadow: 0 0 15px rgba(241, 90, 36, 0.2);
}

.theme-toggle svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

/* Admin Header Button */
.admin-header-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-heading);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.25s ease;
  outline: none;
  text-decoration: none;
  position: relative;
}

.admin-header-btn:hover {
  border-color: var(--brand-orange);
  color: var(--brand-orange);
  transform: translateY(-2px);
  box-shadow: 0 0 15px rgba(241, 90, 36, 0.25);
}

.admin-header-btn svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

.admin-header-btn.is-logged-in::after {
  content: '';
  position: absolute;
  top: 3px;
  right: 3px;
  width: 9px;
  height: 9px;
  background-color: #10b981;
  border-radius: 50%;
  border: 2px solid var(--bg-card);
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.6);
}

.nav-mobile-admin-btn {
  margin-top: 0.65rem;
  font-size: 0.88rem;
  gap: 0.5rem;
  text-decoration: none;
}

.icon-sun { display: none; }
.icon-moon { display: block; }
[data-theme="light"] .icon-sun { display: block; }
[data-theme="light"] .icon-moon { display: none; }

/* Botones */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  border: none;
}

.btn-primary {
  background: var(--brand-gradient);
  color: #ffffff;
  box-shadow: var(--shadow-neon);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(241, 90, 36, 0.4);
  color: #ffffff;
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-heading);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: var(--brand-orange);
  transform: translateY(-2px);
}

.btn-sm {
  padding: 0.5rem 1.25rem;
  font-size: 0.88rem;
}

/* Mobile Menu Defaults - Invisible on Desktop */
.nav-mobile-menu {
  display: none;
}

.mobile-menu-overlay {
  display: none;
}

.btn-block {
  width: 100%;
  display: flex;
  justify-content: center;
}

/* Mobile Toggle */
.mobile-toggle {
  display: none;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-heading);
  cursor: pointer;
  padding: 0;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  transition: all 0.25s ease;
  outline: none;
}

.mobile-toggle:hover {
  border-color: var(--brand-orange);
  background: var(--bg-card-hover);
}

.hamburger-bar {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text-heading);
  border-radius: 2px;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease;
  transform-origin: center;
}

.mobile-toggle.is-active .hamburger-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.mobile-toggle.is-active .hamburger-bar:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.mobile-toggle.is-active .hamburger-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ==========================================================================
   HERO SECTION & 3D INTERACTIVE CANVAS (FULL-WIDTH CENTRADO)
   ========================================================================== */
.hero-section.hero-fullscreen {
  position: relative;
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow: hidden;
  padding-top: clamp(340px, 48vh, 520px);
  padding-bottom: 5rem;
  background: transparent;
}

/* Canvas 3D Full-Width de Fondo */
#hero-3d-canvas.hero-3d-canvas-full {
  position: absolute;
  top: 0;
  left: 0;
  width: 100% !important;
  height: 100% !important;
  z-index: 1;
  outline: none;
  cursor: crosshair;
  touch-action: pan-y;
}

/* Viñeta ambiental para garantizar lectura óptima del texto sobre el 3D */
.hero-vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 50%, transparent 20%, rgba(10, 11, 16, 0.75) 85%);
  pointer-events: none;
  z-index: 2;
}

[data-theme="light"] .hero-vignette {
  background: radial-gradient(circle at 50% 50%, transparent 25%, rgba(248, 250, 252, 0.8) 85%);
}

/* Contenedor Centrado - Con margen lateral reducido */
.hero-centered-container {
  position: relative;
  z-index: 3;
  display: flex;
  justify-content: center;
  pointer-events: none; /* Permite interactuar con el canvas 3D con el mouse */
  width: 100%;
  max-width: 1440px;
  padding: 0 1rem;
}

.hero-centered-content {
  max-width: 1120px;
  width: 100%;
  margin: 0 auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 0.5rem;
}

/* Reactivar eventos de clic en botones y enlaces */
.hero-centered-content a,
.hero-centered-content button {
  pointer-events: auto;
}

/* Título Hero Centrado */
.hero-title {
  font-size: clamp(2rem, 4.2vw, 4.2rem);
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-heading);
  margin-bottom: 1.5rem;
  max-width: 100%;
  text-wrap: balance;
  word-break: normal;
  overflow-wrap: break-word;
}

@media (max-width: 768px) {
  .hero-title {
    font-size: clamp(1.5rem, 6.2vw, 2.2rem);
    line-height: 1.2;
    margin-bottom: 1.25rem;
  }
}

@media (max-width: 360px) {
  .hero-title {
    font-size: 1.38rem;
  }
}

.text-gradient {
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

/* Subtítulo Hero Conciso */
.hero-subtitle {
  font-size: clamp(1.15rem, 2.2vw, 1.35rem);
  line-height: 1.6;
  color: var(--text-muted);
  margin: 0 auto 2.75rem;
  max-width: 800px;
  font-weight: 400;
  text-wrap: balance;
}

/* Botones de Acción Centrados */
.hero-buttons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  flex-wrap: wrap;
  margin-bottom: 0;
}

/* ==========================================================================
   SECCIONES GLOBALES
   ========================================================================== */
section {
  padding: 6.5rem 0;
  position: relative;
}

.section-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 4.5rem;
}

.section-tag {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--brand-orange);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 0.75rem;
}

.section-title {
  font-size: clamp(1.8rem, 3.8vw, 2.6rem);
  line-height: 1.2;
  font-weight: 800;
  color: var(--text-heading);
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
  text-wrap: balance;
  word-break: normal;
  overflow-wrap: break-word;
}

.section-subtitle {
  font-size: 1.05rem;
  color: var(--text-muted);
}

/* ==========================================================================
   SERVICIOS (3 PRINCIPALES) - 3D FLIP CARDS
   ========================================================================== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.2rem;
  perspective: 1400px;
}

/* Contenedor con perspectiva 3D */
.service-card-wrapper {
  position: relative;
  perspective: 1400px;
  min-height: 610px;
  cursor: pointer;
}

/* Tarjeta interior que rota en 3D */
.service-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 610px;
  transition: transform 0.8s cubic-bezier(0.34, 1.3, 0.64, 1);
  transform-style: preserve-3d;
  border-radius: 22px;
}

/* Rotación activada en Hover o por clase interactiva (clic/touch) */
.service-card-wrapper:hover .service-card-inner,
.service-card-wrapper.is-flipped .service-card-inner {
  transform: rotateY(180deg);
}

/* Caras común: frontal y trasera */
.card-face {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: 22px;
  padding: 2.4rem 2rem;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: background 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}

/* --------------------------------------------------------------------------
   CARA FRONTAL
   -------------------------------------------------------------------------- */
.card-face-front {
  background: var(--bg-card);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border-color);
  z-index: 2;
  transform: rotateY(0deg);
}

.service-card-wrapper:hover .card-face-front {
  border-color: rgba(241, 90, 36, 0.35);
  box-shadow: var(--shadow-neon);
}

.card-face-front::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--brand-gradient);
  opacity: 0.9;
}

.front-badge-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.front-badge {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.3rem 0.75rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
  border: 1px solid var(--border-color);
}

.flip-indicator-hint {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.76rem;
  color: var(--brand-orange-light);
  font-weight: 600;
  opacity: 0.85;
  transition: opacity 0.2s, transform 0.2s;
}

.service-card-wrapper:hover .flip-indicator-hint {
  opacity: 1;
  transform: translateX(3px);
}

.service-icon-wrap {
  width: 66px;
  height: 66px;
  border-radius: 18px;
  background: var(--brand-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  margin-bottom: 1.75rem;
  box-shadow: 0 10px 22px rgba(241, 90, 36, 0.28);
  transition: transform 0.4s ease;
}

.service-card-wrapper:hover .service-icon-wrap {
  transform: scale(1.08) rotate(3deg);
}

.service-icon-wrap svg {
  width: 32px;
  height: 32px;
}

.card-face-front h3 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-heading);
  margin-bottom: 1rem;
  line-height: 1.3;
}

.card-face-front p {
  color: var(--text-muted);
  font-size: 0.93rem;
  line-height: 1.6;
  margin-bottom: 1.25rem;
}

/* Foto en la parte inferior de la tarjeta de servicio */
.service-card-photo-wrap {
  position: relative;
  width: 100%;
  height: 175px;
  margin-top: auto;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.4);
  background: #090a0f;
  flex-shrink: 0;
}

.service-card-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.65s cubic-bezier(0.2, 0.8, 0.2, 1), filter 0.4s ease;
}

.service-card-wrapper:hover .service-card-photo {
  transform: scale(1.08);
}

.service-photo-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(10, 11, 16, 0.02) 20%, rgba(10, 11, 16, 0.5) 100%);
  border-radius: 14px;
  transition: opacity 0.3s ease;
}

.service-card-wrapper:hover .service-photo-glow {
  opacity: 0.7;
}

.admin-service-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(18, 19, 28, 0.85);
  backdrop-filter: blur(8px);
  color: #ff7e47;
  border: 1px solid rgba(241, 90, 36, 0.4);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 6px;
  z-index: 5;
  text-decoration: none;
  transition: all 0.2s ease;
}

.admin-service-badge:hover {
  background: var(--brand-orange);
  color: #fff;
}

.btn-flip-prompt {
  margin-top: auto;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.2rem;
  background: rgba(241, 90, 36, 0.08);
  border: 1px solid rgba(241, 90, 36, 0.25);
  border-radius: 12px;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
  font-family: inherit;
}

.btn-flip-prompt span {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-heading);
}

.btn-flip-prompt .icon-arrow {
  width: 18px;
  height: 18px;
  color: var(--brand-orange);
  transition: transform 0.25s ease;
}

.service-card-wrapper:hover .btn-flip-prompt {
  background: var(--brand-gradient);
  border-color: transparent;
  box-shadow: 0 6px 18px rgba(241, 90, 36, 0.35);
}

.service-card-wrapper:hover .btn-flip-prompt span {
  color: #ffffff;
}

.service-card-wrapper:hover .btn-flip-prompt .icon-arrow {
  color: #ffffff;
  transform: translateX(4px);
}

/* --------------------------------------------------------------------------
   CARA TRASERA - CAMBIO DE COLOR DE FONDO Y CARACTERÍSTICAS
   -------------------------------------------------------------------------- */
.card-face-back {
  transform: rotateY(180deg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* Fondos diferenciados por servicio (adaptables cíclicamente) */
.service-card-wrapper:nth-child(3n+1) .card-face-back {
  background: var(--back-card-1);
  border: 1.5px solid var(--back-border-1);
  box-shadow: 0 20px 45px rgba(241, 90, 36, 0.22);
}

.service-card-wrapper:nth-child(3n+2) .card-face-back {
  background: var(--back-card-2);
  border: 1.5px solid var(--back-border-2);
  box-shadow: 0 20px 45px rgba(224, 36, 117, 0.22);
}

.service-card-wrapper:nth-child(3n) .card-face-back {
  background: var(--back-card-3);
  border: 1.5px solid var(--back-border-3);
  box-shadow: 0 20px 45px rgba(0, 210, 255, 0.22);
}

/* Gradientes frontales diferenciados por servicio */
.service-card-wrapper:nth-child(3n+1) .service-icon-wrap {
  background: var(--brand-gradient);
  box-shadow: 0 10px 22px rgba(241, 90, 36, 0.28);
}

.service-card-wrapper:nth-child(3n+2) .service-icon-wrap {
  background: linear-gradient(135deg, #e02475 0%, #871580 100%);
  box-shadow: 0 10px 22px rgba(224, 36, 117, 0.28);
}

.service-card-wrapper:nth-child(3n) .service-icon-wrap {
  background: linear-gradient(135deg, #00d2ff 0%, #0072ff 100%);
  box-shadow: 0 10px 22px rgba(0, 210, 255, 0.28);
}

.back-header {
  margin-bottom: 1.3rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.back-title-group h4 {
  font-size: 1.12rem;
  font-weight: 700;
  color: var(--text-heading);
}

.back-title-group span {
  font-size: 0.78rem;
  color: var(--text-muted);
  display: block;
  margin-top: 0.15rem;
}

.back-icon-mini {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-shrink: 0;
}

.service-card-wrapper:nth-child(3n+1) .back-icon-mini {
  background: linear-gradient(135deg, #f15a24, #ff8452);
}
.service-card-wrapper:nth-child(3n+2) .back-icon-mini {
  background: linear-gradient(135deg, #e02475, #871580);
}
.service-card-wrapper:nth-child(3n) .back-icon-mini {
  background: linear-gradient(135deg, #00d2ff, #0077b6);
}

.back-icon-mini svg {
  width: 18px;
  height: 18px;
}

/* Lista de características en la cara posterior */
.service-features-back {
  list-style: none;
  margin-bottom: 1.6rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  justify-content: center;
}

.service-features-back li {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  font-size: 0.88rem;
  color: var(--text-main);
  line-height: 1.45;
  padding: 0.35rem 0.5rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.04);
  transition: all 0.2s ease;
}

.service-features-back li:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: translateX(4px);
}

.service-features-back li svg {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  flex-shrink: 0;
}

.service-card-wrapper:nth-child(1) .service-features-back li svg {
  color: #f15a24;
}
.service-card-wrapper:nth-child(2) .service-features-back li svg {
  color: #e02475;
}
.service-card-wrapper:nth-child(3) .service-features-back li svg {
  color: #00d2ff;
}

/* Acciones en la cara posterior */
.back-actions {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-top: auto;
}

.btn-action-primary {
  width: 100%;
  padding: 0.85rem 1.25rem;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.92rem;
  color: #ffffff;
  background: var(--brand-gradient);
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  box-shadow: 0 6px 18px rgba(241, 90, 36, 0.3);
  text-decoration: none;
}

.btn-action-primary:hover {
  background: var(--brand-gradient-hover);
  box-shadow: 0 10px 24px rgba(241, 90, 36, 0.45);
  transform: translateY(-2px);
  color: #ffffff;
}

/* Botón de Cotizar Servicio vía WhatsApp */
.btn-whatsapp-quote {
  background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
  color: #ffffff !important;
  text-decoration: none;
  box-shadow: 0 8px 20px rgba(37, 211, 102, 0.32);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  width: 100%;
  padding: 0.95rem 1.4rem;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  font-family: inherit;
  border: none;
}

.btn-whatsapp-quote:hover {
  background: linear-gradient(135deg, #2ae670 0%, #17a090 100%);
  box-shadow: 0 12px 28px rgba(37, 211, 102, 0.48);
  transform: translateY(-2px);
  color: #ffffff !important;
}

.btn-whatsapp-quote .whatsapp-icon {
  width: 20px;
  height: 20px;
  fill: currentColor;
  flex-shrink: 0;
}

/* ==========================================================================
   SOBRE NOSOTROS
   ========================================================================== */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 4rem;
}

.about-image-wrap {
  position: relative;
}

.about-image {
  border-radius: 24px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-color);
  width: 100%;
  object-fit: cover;
}

.about-floating-card {
  position: absolute;
  bottom: -25px;
  right: -25px;
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  padding: 1.5rem;
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 1rem;
  max-width: 90%;
  box-sizing: border-box;
}

@media (max-width: 1024px) {
  .about-floating-card {
    position: relative;
    bottom: auto;
    right: auto;
    margin: -35px auto 0;
    max-width: 360px;
    width: fit-content;
  }
}

@media (max-width: 480px) {
  .about-floating-card {
    margin: -25px 0.5rem 0;
    padding: 1rem;
    gap: 0.75rem;
    max-width: calc(100% - 1rem);
    width: auto;
  }
  .about-floating-card strong {
    font-size: 0.95rem !important;
  }
  .about-floating-card span {
    font-size: 0.78rem !important;
  }
}

.floating-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--brand-gradient);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.about-content h2 {
  font-size: clamp(1.7rem, 3.5vw, 2.4rem);
  font-weight: 800;
  color: var(--text-heading);
  margin-bottom: 1.25rem;
  line-height: 1.25;
  text-wrap: balance;
}

.about-content p {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-bottom: 1.5rem;
  line-height: 1.7;
}

.about-check-list {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 2rem 0;
}

@media (max-width: 580px) {
  .about-check-list {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
}

.about-check-list li {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-heading);
}

.about-check-list li svg {
  width: 20px;
  height: 20px;
  color: var(--brand-orange);
}

/* ==========================================================================
   CARRUSEL DE CLIENTES (5 COLUMNAS - FONDO OSCURO)
   ========================================================================== */
.clients-section {
  padding: 5.5rem 0 5rem;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  position: relative;
  overflow: hidden;
}

.clients-section .section-header {
  margin-bottom: 3.5rem;
}

.clients-carousel-wrap {
  width: 100%;
  position: relative;
  container-type: inline-size;
  container-name: carousel;
}

.marquee-container {
  width: 100%;
  overflow: hidden;
  position: relative;
  padding: 0.85rem 0;
  mask-image: linear-gradient(to right, transparent 0%, black 4%, black 96%, transparent 100%);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 4%, black 96%, transparent 100%);
}

.marquee-track {
  display: flex;
  width: max-content;
  gap: 1.5rem;
}

.marquee-track:hover .marquee-group {
  animation-play-state: paused;
}

.marquee-group {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-shrink: 0;
  animation: marqueeContinuous 30s linear infinite;
  will-change: transform;
}

@keyframes marqueeContinuous {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(calc(-100% - 1.5rem));
  }
}

/* Tarjeta de cada Logo con FONDO OSCURO */
.client-logo-item {
  display: flex;
  align-items: center;
  justify-content: center;
  /* 5 columnas visibles en desktop: ancho = (ancho total - 4 espacios) / 5 */
  width: calc((100cqw - (4 * 1.5rem)) / 5);
  min-width: 220px;
  flex: 0 0 calc((100cqw - (4 * 1.5rem)) / 5);
  height: 115px;
  min-height: 115px;
  padding: 1.25rem 1.5rem;
  background: linear-gradient(145deg, #151724 0%, #0d0e17 100%);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 18px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
}

.client-logo-item::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(241, 90, 36, 0.16) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}

.client-logo-item:hover {
  background: linear-gradient(145deg, #1d2033 0%, #111320 100%);
  border-color: rgba(241, 90, 36, 0.55);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.5), 0 0 25px rgba(241, 90, 36, 0.22);
  transform: translateY(-5px);
}

.client-logo-item:hover::before {
  opacity: 1;
}

/* Tamaño de los logos aumentado y ajustado */
.client-logo-item img {
  max-height: 65px;
  max-width: 170px;
  width: auto;
  height: auto;
  object-fit: contain;
  transition: all 0.35s ease;
  filter: brightness(1.08) contrast(1.05);
}

.client-logo-item:hover img {
  transform: scale(1.08);
  filter: brightness(1.2) contrast(1.1);
}

/* Logos adaptados según el tema */
.logo-only-light {
  display: none !important;
}
.logo-only-dark {
  display: block !important;
}

.client-logo-item img[src*="soma"] {
  filter: brightness(0) invert(1);
}
.client-logo-item:hover img[src*="soma"] {
  filter: brightness(0) invert(1) drop-shadow(0 0 10px rgba(255, 255, 255, 0.45));
}

.client-logo-item img[src*="picadent"] {
  filter: brightness(1.3) contrast(1.1);
}

/* ==========================================================================
   MODO CLARO: Fondo transparente de cada logo
   ========================================================================== */
[data-theme="light"] .client-logo-item {
  background: transparent !important;
  border-color: rgba(0, 0, 0, 0.08) !important;
  box-shadow: none !important;
}

[data-theme="light"] .client-logo-item::before {
  display: none !important;
}

[data-theme="light"] .client-logo-item:hover {
  background: rgba(0, 0, 0, 0.03) !important;
  border-color: rgba(241, 90, 36, 0.4) !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06) !important;
}

[data-theme="light"] .client-logo-item img {
  filter: none !important;
}

[data-theme="light"] .client-logo-item img[src*="soma"] {
  filter: none !important;
}

[data-theme="light"] .logo-only-dark {
  display: none !important;
}

[data-theme="light"] .logo-only-light {
  display: block !important;
}

/* Adaptabilidad Responsive mediante Container Queries y Media Queries */
@container carousel (max-width: 1200px) {
  .client-logo-item {
    width: calc((100cqw - (3 * 1.25rem)) / 4);
    flex: 0 0 calc((100cqw - (3 * 1.25rem)) / 4);
    min-width: 190px;
    height: 105px;
  }
}

@container carousel (max-width: 900px) {
  .client-logo-item {
    width: calc((100cqw - (2 * 1rem)) / 3);
    flex: 0 0 calc((100cqw - (2 * 1rem)) / 3);
    min-width: 160px;
    height: 100px;
    padding: 1rem 1.25rem;
  }
  .client-logo-item img {
    max-height: 54px;
    max-width: 140px;
  }
}

@container carousel (max-width: 600px) {
  .client-logo-item {
    width: calc((100cqw - 0.75rem) / 2);
    flex: 0 0 calc((100cqw - 0.75rem) / 2);
    min-width: 140px;
    height: 90px;
    padding: 0.85rem 1rem;
    border-radius: 14px;
  }
  .client-logo-item img {
    max-height: 46px;
    max-width: 125px;
  }
}

@media (max-width: 768px) {
  .clients-section {
    padding: 4rem 0 3rem;
  }
  .clients-section .section-header {
    margin-bottom: 2.5rem;
  }
  .marquee-track {
    gap: 1rem;
  }
  .marquee-group {
    gap: 1rem;
  }
}

@media (max-width: 480px) {
  .clients-section {
    padding: 3rem 0 2.5rem;
  }
  .clients-section .section-header {
    margin-bottom: 2rem;
  }
}

/* ==========================================================================
   PREGUNTAS FRECUENTES (FAQ)
   ========================================================================== */
.faq-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  align-items: center;
  gap: 4rem;
}

.faq-image {
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-color);
  width: 100%;
}

.accordion-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.accordion-item {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  overflow: hidden;
  transition: all 0.25s ease;
}

.accordion-item.active {
  border-color: rgba(241, 90, 36, 0.4);
  background: var(--bg-card-hover);
}

.accordion-header {
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
}

.accordion-header h4 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-heading);
}

.accordion-icon {
  width: 22px;
  height: 22px;
  color: var(--brand-orange);
  transition: transform 0.3s ease;
}

.accordion-item.active .accordion-icon {
  transform: rotate(180deg);
}

.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, padding 0.35s ease;
  padding: 0 1.5rem;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.65;
}

.accordion-item.active .accordion-content {
  max-height: 200px;
  padding-bottom: 1.25rem;
}

/* ==========================================================================
   FORMULARIO DE CAPTURA RÁPIDA (CONTACTO)
   ========================================================================== */
.contact-section {
  background: radial-gradient(circle at 50% 50%, rgba(241, 90, 36, 0.08) 0%, transparent 70%);
}

.contact-card-wrap {
  max-width: 820px;
  width: 100%;
  margin: 0 auto;
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  border-radius: 28px;
  padding: 3.5rem 3rem;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
}

.contact-card-wrap::after {
  content: '';
  position: absolute;
  top: -100px;
  right: -100px;
  width: 200px;
  height: 200px;
  background: var(--brand-gradient);
  filter: blur(100px);
  opacity: 0.3;
  pointer-events: none;
}

.lead-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group.full-width {
  grid-column: 1 / -1;
}

.form-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-heading);
}

.form-input, .form-select {
  width: 100%;
  box-sizing: border-box;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-heading);
  padding: 0.9rem 1.2rem;
  border-radius: 12px;
  font-size: 16px; /* 16px evita auto-zoom en iOS Safari */
  outline: none;
  transition: all 0.25s ease;
  max-width: 100%;
}

.form-input:focus, .form-select:focus {
  border-color: var(--brand-orange);
  box-shadow: 0 0 0 3px rgba(241, 90, 36, 0.15);
}

.lead-submit-btn {
  width: 100%;
  padding: 1.1rem;
  font-size: 1.05rem;
  font-weight: 700;
}

/* Estado de Éxito / Feedback */
.form-feedback {
  margin-top: 1.5rem;
  display: none;
}

.feedback-success-card {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 1.75rem;
  border-radius: 16px;
  text-align: center;
}

.feedback-success-card h4 {
  color: #10b981;
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.feedback-success-card p {
  color: var(--text-main);
  margin-bottom: 1.25rem;
  font-size: 0.95rem;
}

.btn-whatsapp-chat {
  background: #25d366;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.75rem 1.5rem;
  border-radius: 10px;
  font-weight: 700;
  box-shadow: 0 8px 20px rgba(37, 211, 102, 0.3);
}

.btn-whatsapp-chat:hover {
  background: #20ba5a;
  transform: translateY(-2px);
  color: #ffffff;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 4.5rem 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.9fr 0.9fr 1fr;
  gap: 3rem;
  margin-bottom: 3.5rem;
}

.footer-logo {
  height: 44px;
  margin-bottom: 1.25rem;
}

.footer-desc {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.footer-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-heading);
  margin-bottom: 1.25rem;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-links a:hover {
  color: var(--brand-orange);
  padding-left: 4px;
}

.footer-contact-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-main);
  font-size: 0.92rem;
  margin-bottom: 1rem;
}

.footer-contact-item svg {
  width: 20px;
  height: 20px;
  color: var(--brand-orange);
  flex-shrink: 0;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
  font-size: 0.88rem;
  color: var(--text-muted);
}

.admin-link-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.admin-link-pill:hover {
  border-color: var(--brand-orange);
  color: var(--brand-orange);
}

.footer-social-links {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.social-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.social-icon-btn svg {
  width: 18px;
  height: 18px;
  transition: transform 0.25s ease;
}

.social-icon-btn:hover {
  color: #ffffff;
  border-color: var(--brand-orange);
  background: var(--brand-gradient);
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(241, 90, 36, 0.35);
}

.social-icon-btn:hover svg {
  transform: scale(1.1);
}

/* ==========================================================================
   RESPONSIVE DESIGN (SOPORTE COMPLETO PARA TODO TIPO DE TAMAÑO)
   - Pantallas Ultrawide & Grandes (> 1440px)
   - Laptops & Tablets Landscape (1025px - 1440px)
   - Tablets Portrait (769px - 1024px)
   - Smartphones Grandes & Phablets (481px - 768px)
   - Smartphones Estándar & Compactos (320px - 480px)
   ========================================================================== */

/* Tablets y Laptops Pequeñas (<= 1024px) */
@media (max-width: 1024px) {
  .nav-links {
    gap: 1.25rem;
  }
  .nav-link {
    font-size: 0.9rem;
  }
  .services-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
  }
  .about-grid, .faq-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  .faq-image-col {
    text-align: center;
  }
  .faq-image {
    max-width: 480px;
    margin: 0 auto;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
  }
}

/* Tablets Portrait y Móviles (<= 768px) */
@media (max-width: 768px) {
  html {
    scroll-padding-top: 75px;
  }

  section {
    padding: 4rem 0;
  }

  .section-header {
    margin: 0 auto 3rem;
  }

  .navbar {
    height: 72px;
  }
  .site-header.scrolled .navbar {
    height: 62px;
  }
  .nav-logo {
    height: 38px;
  }
  .site-header.scrolled .nav-logo {
    height: 32px;
  }

  .nav-links, 
  .nav-actions .btn {
    display: none;
  }
  .mobile-toggle {
    display: inline-flex;
  }

  /* Menú desplegable móvil */
  .nav-mobile-menu {
    display: block;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    width: 100%;
    background: var(--bg-glass);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    max-height: 0;
    opacity: 0;
    overflow-y: auto;
    pointer-events: none;
    transition: max-height 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
  }
  .nav-mobile-menu.open {
    max-height: calc(100vh - 72px);
    opacity: 1;
    pointer-events: auto;
  }
  .nav-mobile-inner {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 1.25rem 0 1.5rem;
  }
  .nav-mobile-link {
    font-size: 1.05rem;
    font-weight: 500;
    color: var(--text-main);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    text-decoration: none;
  }
  .nav-mobile-link:hover,
  .nav-mobile-link.active {
    color: var(--brand-orange);
    background: var(--badge-bg);
  }
  .nav-mobile-cta {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-color);
  }
  .mobile-menu-overlay {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
  }
  .mobile-menu-overlay.open {
    opacity: 1;
    pointer-events: auto;
  }

  /* Hero Section en móvil y tablet: Cubre pantalla completa con texto despejado debajo del orbe */
  .hero-section.hero-fullscreen {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    padding-top: clamp(280px, 46vh, 440px);
    padding-bottom: clamp(2.25rem, 6vh, 4rem);
    box-sizing: border-box;
  }
  .hero-centered-container {
    margin-top: auto;
  }
  .hero-title {
    font-size: clamp(1.45rem, 5.8vw, 2rem);
    line-height: 1.2;
    margin-bottom: 0.85rem;
  }
  .hero-subtitle {
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    line-height: 1.5;
  }

  /* Servicios a 1 columna en móvil */
  .services-grid {
    grid-template-columns: 1fr;
    max-width: 520px;
    margin: 0 auto;
  }
  .service-card-wrapper,
  .service-card-inner {
    min-height: 580px;
  }
  .card-face {
    padding: 2rem 1.6rem;
  }

  /* Formulario de contacto */
  .lead-form-grid {
    grid-template-columns: 1fr;
  }
  .contact-card-wrap {
    padding: 2.5rem 1.5rem;
    border-radius: 22px;
  }

  /* Footer */
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
}

/* Smartphones y Pantallas Pequeñas (<= 480px) */
@media (max-width: 480px) {
  html {
    scroll-padding-top: 68px;
  }

  section {
    padding: 3rem 0;
  }

  .section-header {
    margin: 0 auto 2.25rem;
  }

  .navbar {
    height: 66px;
  }
  .site-header.scrolled .navbar {
    height: 58px;
  }
  .nav-logo {
    height: 34px;
  }
  .site-header.scrolled .nav-logo {
    height: 28px;
  }

  .theme-toggle, .mobile-toggle, .admin-header-btn {
    width: 38px;
    height: 38px;
  }

  .hero-section.hero-fullscreen {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    padding-top: clamp(260px, 42vh, 380px);
    padding-bottom: clamp(1.75rem, 5vh, 3.25rem);
    box-sizing: border-box;
  }

  .hero-centered-container {
    margin-top: auto;
  }

  .hero-title {
    font-size: clamp(1.35rem, 5.6vw, 1.8rem);
    line-height: 1.2;
    margin-bottom: 0.75rem;
  }

  .hero-subtitle {
    font-size: 0.9rem;
    margin-bottom: 1.35rem;
    padding: 0 0.5rem;
    line-height: 1.48;
  }

  .hero-buttons .btn {
    width: 100%;
    max-width: 290px;
  }

  .service-card {
    padding: 1.75rem 1.25rem;
    border-radius: 16px;
  }
  .service-icon-wrap {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    margin-bottom: 1.25rem;
  }
  .service-icon-wrap svg {
    width: 26px;
    height: 26px;
  }
  .service-card h3 {
    font-size: 1.25rem;
  }

  .accordion-header {
    padding: 1rem 1.25rem;
  }
  .accordion-header h4 {
    font-size: 0.95rem;
  }
  .accordion-content {
    padding: 0 1.25rem;
    font-size: 0.9rem;
  }
  .accordion-item.active .accordion-content {
    padding-bottom: 1.1rem;
  }

  .contact-card-wrap {
    padding: 2rem 1.1rem;
    border-radius: 18px;
  }

  .lead-submit-btn {
    font-size: 0.98rem;
    padding: 0.95rem 1rem;
  }

  .site-footer {
    padding: 3rem 0 1.5rem;
  }
  .footer-logo {
    height: 38px;
  }
  .footer-desc {
    font-size: 0.88rem;
  }
}

/* Pantallas Extra Pequeñas (<= 360px - ej. Galaxy Fold o iPhone SE 1st gen) */
@media (max-width: 360px) {
  .hero-section.hero-fullscreen {
    min-height: 100vh;
    min-height: 100dvh;
    padding-top: clamp(240px, 40vh, 320px);
    padding-bottom: 1.5rem;
  }
  .hero-title {
    font-size: 1.25rem;
    margin-bottom: 0.65rem;
  }
  .hero-subtitle {
    font-size: 0.85rem;
    margin-bottom: 1.15rem;
  }
  .btn {
    padding: 0.65rem 1.2rem;
    font-size: 0.88rem;
  }
  .nav-brand {
    gap: 0.5rem;
  }
  .nav-logo {
    height: 30px;
  }
  .nav-actions {
    gap: 0.5rem;
  }
  .hero-buttons .btn {
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
  }
  .contact-card-wrap {
    padding: 1.5rem 0.85rem;
  }
}

/* ==========================================================================
   BOTÓN FLOTANTE DE WHATSAPP (MODERNO & RESPONSIVE)
   ========================================================================== */
.whatsapp-float-container {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  pointer-events: none; /* El contenedor no bloquea clics exteriores */
  animation: waFloatEntrance 0.8s 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes waFloatEntrance {
  0% {
    opacity: 0;
    transform: translateY(24px) scale(0.85);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.whatsapp-float-btn {
  pointer-events: auto;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 62px;
  height: 62px;
  min-width: 62px;
  min-height: 62px;
  border-radius: 50%;
  background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
  color: #ffffff !important;
  text-decoration: none !important;
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.45), 0 4px 10px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
  user-select: none;
  flex-shrink: 0;
}

.whatsapp-float-btn:hover {
  transform: scale(1.1) translateY(-2px);
  box-shadow: 0 14px 32px rgba(37, 211, 102, 0.6), 0 6px 14px rgba(0, 0, 0, 0.4);
}

.whatsapp-float-pulse {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: #25d366;
  opacity: 0.6;
  z-index: 1;
  animation: waPulseRing 2.4s cubic-bezier(0.24, 0, 0.38, 1) infinite;
  pointer-events: none;
}

@keyframes waPulseRing {
  0% {
    transform: scale(0.9);
    opacity: 0.7;
  }
  60% {
    transform: scale(1.55);
    opacity: 0;
  }
  100% {
    transform: scale(1.55);
    opacity: 0;
  }
}

.whatsapp-float-svg {
  width: 34px !important;
  height: 34px !important;
  min-width: 34px !important;
  min-height: 34px !important;
  display: block !important;
  fill: #ffffff !important;
  color: #ffffff !important;
  position: relative;
  z-index: 2;
  transition: transform 0.3s ease;
}

.whatsapp-float-btn:hover .whatsapp-float-svg {
  transform: rotate(-8deg) scale(1.05);
}

.whatsapp-float-status-dot {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 14px;
  height: 14px;
  background-color: #00ff88;
  border: 2.5px solid #050811;
  border-radius: 50%;
  box-shadow: 0 0 8px #00ff88;
  z-index: 3;
  animation: waDotPulse 2s infinite;
}

[data-theme="light"] .whatsapp-float-status-dot {
  border-color: #ffffff;
}

@keyframes waDotPulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.6;
    transform: scale(0.85);
  }
}

/* Tooltip / Mensaje flotante con flecha indicadora */
.whatsapp-float-tooltip {
  pointer-events: none;
  position: absolute;
  right: calc(100% + 14px);
  top: 50%;
  transform: translateY(-50%) translateX(8px);
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: rgba(8, 14, 26, 0.95);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(0, 240, 255, 0.35);
  padding: 10px 16px;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5), 0 0 15px rgba(0, 240, 255, 0.15);
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), visibility 0.25s;
  z-index: 9998;
  text-decoration: none !important;
  cursor: pointer;
}

/* Flechita orientada hacia el botón */
.whatsapp-float-tooltip::after {
  content: '';
  position: absolute;
  top: 50%;
  right: -6px;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-left: 6px solid rgba(8, 14, 26, 0.95);
}

.whatsapp-float-title {
  font-size: 0.84rem;
  font-weight: 700;
  color: #ffffff !important;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.whatsapp-float-sub {
  font-size: 0.75rem;
  color: #25d366 !important;
  font-weight: 600;
  line-height: 1.2;
}

/* Mostrar tooltip al pasar el mouse por el contenedor o botón */
.whatsapp-float-container:hover .whatsapp-float-tooltip {
  pointer-events: auto;
  opacity: 1;
  visibility: visible;
  transform: translateY(-50%) translateX(0);
}

/* Modo claro */
[data-theme="light"] .whatsapp-float-tooltip {
  background: rgba(255, 255, 255, 0.96);
  border-color: rgba(37, 211, 102, 0.35);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12), 0 0 15px rgba(37, 211, 102, 0.15);
}

[data-theme="light"] .whatsapp-float-tooltip::after {
  border-left-color: rgba(255, 255, 255, 0.96);
}

[data-theme="light"] .whatsapp-float-title {
  color: #0f172a !important;
}

/* Ajustes Responsive */
@media (max-width: 768px) {
  .whatsapp-float-container {
    bottom: 20px;
    right: 20px;
  }
  .whatsapp-float-btn {
    width: 56px;
    height: 56px;
    min-width: 56px;
    min-height: 56px;
  }
  .whatsapp-float-svg {
    width: 30px !important;
    height: 30px !important;
    min-width: 30px !important;
    min-height: 30px !important;
  }
  /* En móviles ocultamos el tooltip flotante para no obstruir navegación táctil */
  .whatsapp-float-tooltip {
    display: none !important;
  }
}

/* ==========================================================================
   EFECTO DE DESINTEGRACIÓN Y REINTEGRACIÓN EN POLVO Y CHISPAS (BOTÓN CONTACTO)
   ========================================================================== */
.contact-dust-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 45;
}

.lead-submit-btn.dust-disintegrating {
  opacity: 0 !important;
  filter: blur(10px) !important;
  transform: scale(0.92) translateY(-6px) !important;
  pointer-events: none !important;
  transition: opacity 1.3s cubic-bezier(0.4, 0, 0.2, 1),
              filter 1.3s cubic-bezier(0.4, 0, 0.2, 1),
              transform 1.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.lead-submit-btn.dust-reintegrating {
  opacity: 1 !important;
  filter: blur(0px) !important;
  transform: scale(1) translateY(0) !important;
  transition: opacity 0.7s ease-out,
              filter 0.7s ease-out,
              transform 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
  animation: dust-reform-glow 0.85s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes dust-reform-glow {
  0% {
    filter: brightness(2.2) drop-shadow(0 0 25px rgba(241, 90, 36, 0.9)) drop-shadow(0 0 40px rgba(224, 36, 117, 0.7));
    transform: scale(0.94);
  }
  50% {
    filter: brightness(1.4) drop-shadow(0 0 18px rgba(241, 90, 36, 0.6));
    transform: scale(1.03);
  }
  100% {
    filter: brightness(1) drop-shadow(0 0 0 transparent);
    transform: scale(1);
  }
}

.input-error-shake {
  animation: input-shake 0.4s ease-in-out;
  border-color: #ef4444 !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.25) !important;
}

@keyframes input-shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-6px); }
  40%, 80% { transform: translateX(6px); }
}



