/* ==========================================================================
   Az InnovationX - Centro de Contacto & Asesoría Tecnológica 3D (2026)
   Estilos dedicados: Partículas Three.js, Cards con 3D Tilt y Glare,
   Formulario Inteligente Glassmorphism, Calendario de Citas y FAQ 3D.
   ========================================================================== */

:root {
  --cnt-bg: #05050a;
  --cnt-surface: #0b0c16;
  --cnt-card-bg: rgba(13, 14, 28, 0.65);
  --cnt-card-hover: rgba(18, 20, 38, 0.85);
  --cnt-text-main: #f1f5f9;
  --cnt-text-muted: #94a3b8;
  --cnt-text-dim: rgba(255, 255, 255, 0.45);
  --cnt-accent-purple: #6366f1;
  --cnt-accent-cyan: #06b6d4;
  --cnt-accent-emerald: #10b981;
  --cnt-accent-blue: #3E92CC;
  --cnt-accent-gradient: linear-gradient(135deg, var(--cnt-accent-purple), var(--cnt-accent-cyan));
  --cnt-border: rgba(255, 255, 255, 0.08);
  --cnt-border-active: rgba(6, 182, 212, 0.5);
  --cnt-hover-glow: 0 0 32px rgba(6, 182, 212, 0.28);
  --cnt-neon-shadow: 0 0 18px rgba(99, 102, 241, 0.35);
  --cnt-trans: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  --cnt-radius-card: 22px;
  --cnt-radius-pill: 9999px;
}

/* Blindaje contra transforms residuales y desbordamiento horizontal */
html, body {
  overflow-x: hidden;
  max-width: 100%;
}

body {
  transform: none !important;
  animation: none !important;
  background-color: var(--cnt-bg);
  color: var(--cnt-text-main);
}

main {
  overflow-x: clip;
  width: 100%;
}

/* ==========================================
   1. FONDO INMERSIVO 3D Y EFECTOS AMBIENTALES
   ========================================== */
#bg-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  pointer-events: none;
}

.bg-grid-overlay {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background-size: 50px 50px;
  background-image: 
    linear-gradient(to right, rgba(255, 255, 255, 0.015) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
  pointer-events: none;
  opacity: 0.8;
}

.ambient-glow {
  position: absolute;
  width: 440px;
  height: 440px;
  max-width: 100%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.12) 0%, transparent 70%);
  filter: blur(85px);
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

/* ==========================================
   2. HERO SECTION DE CONTACTO (3D FUTURISTA)
   ========================================== */
.contact-hero {
  position: relative;
  padding: 5.5rem 0 2.5rem;
  text-align: center;
  overflow: hidden;
}

.hero-logo-container {
  max-width: 170px;
  margin: 0 auto 24px auto;
  position: relative;
  transform-style: preserve-3d;
  perspective: 800px;
}

.hero-logo-img {
  width: 100%;
  height: auto;
  border-radius: 24px;
  border: 2px solid rgba(255, 255, 255, 0.12);
  background: rgba(11, 12, 22, 0.65);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.55), 0 0 30px rgba(99, 102, 241, 0.25);
  transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275), border-color 0.3s, box-shadow 0.3s;
  transform: rotateX(10deg);
}

.hero-logo-container:hover .hero-logo-img {
  transform: translateY(-8px) rotateX(0deg) rotateY(5deg) scale(1.05);
  border-color: var(--cnt-accent-cyan);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.65), var(--cnt-hover-glow);
}

.cyber-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.35);
  color: #a5b4fc;
  padding: 6px 18px;
  border-radius: 50px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 20px;
  box-shadow: inset 0 0 12px rgba(99, 102, 241, 0.25);
  animation: cntPulseGlow 2.5s infinite alternate;
}

.cyber-badge span.blink {
  width: 7px;
  height: 7px;
  background-color: var(--cnt-accent-cyan);
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 8px var(--cnt-accent-cyan);
  animation: cntBlinker 1s linear infinite;
}

@keyframes cntPulseGlow {
  0% { box-shadow: 0 0 10px rgba(99, 102, 241, 0.2), inset 0 0 8px rgba(99, 102, 241, 0.15); }
  100% { box-shadow: 0 0 24px rgba(99, 102, 241, 0.45), inset 0 0 14px rgba(99, 102, 241, 0.3); }
}

@keyframes cntBlinker {
  50% { opacity: 0.3; }
}

h1.contact-hero-title {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 800;
  margin-bottom: 16px;
  letter-spacing: -1px;
  line-height: 1.18;
  background: var(--cnt-accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 2px 14px rgba(0, 0, 0, 0.6));
}

.contact-hero-subtitle {
  font-size: 1.12rem;
  color: var(--cnt-text-muted);
  max-width: 760px;
  margin: 0 auto;
  font-weight: 300;
  line-height: 1.7;
}

/* Trust Badges en Hero */
.trust-badges {
  display: flex;
  justify-content: center;
  gap: 1.15rem;
  margin-top: 28px;
  flex-wrap: wrap;
}

.trust-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background-color: rgba(255, 255, 255, 0.04);
  padding: 8px 18px;
  border-radius: 30px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: var(--cnt-trans);
  font-size: 0.88rem;
  color: var(--cnt-text-main);
}

.trust-badge:hover {
  border-color: rgba(6, 182, 212, 0.45);
  transform: translateY(-2px);
  box-shadow: 0 4px 18px rgba(6, 182, 212, 0.18);
}

.trust-badge i {
  color: var(--cnt-accent-cyan);
  filter: drop-shadow(0 0 6px rgba(6, 182, 212, 0.55));
}

/* ==========================================
   3. SECCIÓN PRINCIPAL: CUADRÍCULA 3D DUAL
   ========================================== */
.contact-main-section {
  padding: 30px 0 60px;
  position: relative;
}

.contact-grid-3d {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: 36px;
  align-items: start;
}

/* ==========================================
   4. COLUMNA IZQUIERDA: TARJETAS DE CONTACTO 3D
   ========================================== */
.contact-channels-stack {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.contact-card-3d-container {
  display: block;
  perspective: 1000px;
}

.contact-card-3d {
  background: linear-gradient(135deg, rgba(16, 20, 42, 0.82) 0%, rgba(10, 12, 26, 0.92) 100%);
  border: 1px solid rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  border-radius: 18px;
  padding: 20px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  position: relative;
  overflow: hidden;
  transform-style: preserve-3d;
  transition: border-color 0.3s ease, box-shadow 0.35s ease, background 0.3s ease, transform 0.35s ease;
  box-shadow: 0 6px 28px rgba(0, 0, 0, 0.42), inset 0 1px 0 rgba(255,255,255,0.05);
}


.contact-card-3d.clickable-card {
  cursor: pointer;
}

/* Indicador luminoso vertical estilizado */
.contact-card-3d::before {
  content: '';
  position: absolute;
  top: 18%;
  bottom: 18%;
  left: 0;
  width: 3px;
  border-radius: 0 4px 4px 0;
  background: transparent;
  transition: all 0.3s ease;
  opacity: 0.75;
}

.contact-card-3d.card-mail::before {
  background: var(--cnt-accent-cyan);
  box-shadow: 0 0 10px var(--cnt-accent-cyan);
}

.contact-card-3d.card-whatsapp::before {
  background: var(--cnt-accent-emerald);
  box-shadow: 0 0 10px var(--cnt-accent-emerald);
}

.contact-card-3d.card-calendar::before {
  background: var(--cnt-accent-purple);
  box-shadow: 0 0 10px var(--cnt-accent-purple);
}

.contact-card-3d.card-location::before {
  background: #f43f5e;
  box-shadow: 0 0 10px #f43f5e;
}

.contact-card-3d:hover {
  background: linear-gradient(135deg, rgba(22, 28, 55, 0.9) 0%, rgba(13, 16, 34, 0.97) 100%);
}

.contact-card-3d.card-mail:hover {
  border-color: rgba(6, 182, 212, 0.5);
  box-shadow: 0 16px 40px rgba(6, 182, 212, 0.14), 0 4px 16px rgba(0,0,0,0.5), inset 0 1px 0 rgba(6,182,212,0.08);
}

.contact-card-3d.card-whatsapp:hover {
  border-color: rgba(16, 185, 129, 0.5);
  box-shadow: 0 16px 40px rgba(16, 185, 129, 0.14), 0 4px 16px rgba(0,0,0,0.5), inset 0 1px 0 rgba(16,185,129,0.08);
}

.contact-card-3d.card-calendar:hover {
  border-color: rgba(99, 102, 241, 0.5);
  box-shadow: 0 16px 40px rgba(99, 102, 241, 0.14), 0 4px 16px rgba(0,0,0,0.5), inset 0 1px 0 rgba(99,102,241,0.08);
}

.contact-card-3d.card-location:hover {
  border-color: rgba(244, 63, 94, 0.5);
  box-shadow: 0 16px 40px rgba(244, 63, 94, 0.14), 0 4px 16px rgba(0,0,0,0.5), inset 0 1px 0 rgba(244,63,94,0.08);
}


/* Efecto especular de destello 3D */
.contact-card-3d .glare {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 5;
  border-radius: 16px;
  transition: background 0.1s;
}

/* Parallax depth layers */
.card-depth-1 { transform: translateZ(20px); }
.card-depth-2 { transform: translateZ(35px); }
.card-depth-3 { transform: translateZ(50px); }

.card-link-wrapper {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-grow: 1;
  text-decoration: none;
  color: inherit;
  z-index: 2;
  min-width: 0;
}

/* Iconos de canal compactos y modernos */
.contact-icon-wrapper {
  width: 50px;
  height: 50px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  flex-shrink: 0;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
}


.card-mail .contact-icon-wrapper {
  background: rgba(6, 182, 212, 0.1);
  color: var(--cnt-accent-cyan);
  border-color: rgba(6, 182, 212, 0.25);
  box-shadow: 0 0 14px rgba(6, 182, 212, 0.18);
}

.card-whatsapp .contact-icon-wrapper {
  background: rgba(16, 185, 129, 0.1);
  color: var(--cnt-accent-emerald);
  border-color: rgba(16, 185, 129, 0.25);
  box-shadow: 0 0 14px rgba(16, 185, 129, 0.18);
}

.card-calendar .contact-icon-wrapper {
  background: rgba(99, 102, 241, 0.1);
  color: #a5b4fc;
  border-color: rgba(99, 102, 241, 0.25);
  box-shadow: 0 0 14px rgba(99, 102, 241, 0.2);
}

.card-location .contact-icon-wrapper {
  background: rgba(244, 63, 94, 0.1);
  color: #fda4af;
  border-color: rgba(244, 63, 94, 0.25);
  box-shadow: 0 0 14px rgba(244, 63, 94, 0.18);
}

.contact-card-3d:hover .contact-icon-wrapper {
  transform: scale(1.08);
}

/* Bloque de texto con jerarquía clara y sin saturación */
.card-text-block {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  flex: 1;
}

.card-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.card-channel-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.55);
}

.card-mail .card-channel-label { color: rgba(6, 182, 212, 0.95); }
.card-whatsapp .card-channel-label { color: rgba(16, 185, 129, 0.95); }
.card-calendar .card-channel-label { color: rgba(165, 180, 252, 0.95); }
.card-location .card-channel-label { color: rgba(253, 164, 175, 0.95); }

.card-main-val {
  font-size: 1.05rem;
  font-weight: 700;
  color: #ffffff;
  margin: 2px 0 0;
  line-height: 1.3;
  letter-spacing: -0.015em;
  overflow-wrap: break-word;
  word-break: break-word;
}


/* Micro-chips de estado minimalistas */
.contact-status-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.68rem;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.75);
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.contact-status-chip.chip-cyan {
  background: rgba(6, 182, 212, 0.08);
  border-color: rgba(6, 182, 212, 0.25);
  color: #38bdf8;
}

.contact-status-chip.chip-emerald {
  background: rgba(16, 185, 129, 0.08);
  border-color: rgba(16, 185, 129, 0.25);
  color: #34d399;
}

.contact-status-chip.chip-purple {
  background: rgba(99, 102, 241, 0.08);
  border-color: rgba(99, 102, 241, 0.25);
  color: #a5b4fc;
}

.contact-status-chip.chip-rose {
  background: rgba(244, 63, 94, 0.08);
  border-color: rgba(244, 63, 94, 0.25);
  color: #fda4af;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
  background: var(--cnt-accent-emerald);
  box-shadow: 0 0 6px var(--cnt-accent-emerald);
}

.status-dot.pulse {
  animation: cntBlinker 1.5s infinite;
}

.status-dot.pulse-blue {
  background: var(--cnt-accent-cyan);
  box-shadow: 0 0 6px var(--cnt-accent-cyan);
  animation: cntBlinker 1.5s infinite;
}

/* Botones de acción unificados (Copiar y Enlace) */
.btn-copy-action,
.card-action-btn {
  width: 38px;
  height: 38px;
  min-width: 38px;
  min-height: 38px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  cursor: pointer;
  position: relative;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  flex-shrink: 0;
  z-index: 3;
}

.btn-copy-action:hover,
.card-action-btn:hover,
.contact-card-3d:hover .card-action-btn {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.22);
  color: #fff;
  transform: scale(1.05);
}

.card-mail:hover .btn-copy-action:hover {
  background: rgba(6, 182, 212, 0.15);
  border-color: var(--cnt-accent-cyan);
  color: var(--cnt-accent-cyan);
}

.card-whatsapp:hover .btn-copy-action:hover {
  background: rgba(16, 185, 129, 0.15);
  border-color: var(--cnt-accent-emerald);
  color: var(--cnt-accent-emerald);
}

.contact-card-3d:hover .card-action-btn i {
  transform: translateX(2px);
  color: #fff;
  transition: transform 0.25s ease, color 0.25s ease;
}

.btn-copy-action.copied {
  background: rgba(16, 185, 129, 0.2);
  border-color: var(--cnt-accent-emerald);
  color: var(--cnt-accent-emerald);
}

.copy-tooltip {
  position: absolute;
  top: -34px;
  right: 50%;
  transform: translateX(50%);
  background: #0d1226;
  border: 1px solid var(--cnt-border-active);
  color: white;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s, transform 0.25s;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}

.btn-copy-action:hover .copy-tooltip {
  opacity: 1;
  transform: translateX(50%) translateY(-2px);
}

/* Tarjeta SLA / Garantías Corporativas */
.contact-sla-box {
  background: rgba(11, 15, 30, 0.7);
  border: 1px solid var(--cnt-border);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-radius: var(--cnt-radius-card);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.sla-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.sla-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(6, 182, 212, 0.1);
  border: 1px solid rgba(6, 182, 212, 0.25);
  color: var(--cnt-accent-cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.sla-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sla-content strong {
  font-size: 0.92rem;
  color: var(--cnt-text-main);
}

.sla-content span {
  font-size: 0.8rem;
  color: var(--cnt-text-muted);
  line-height: 1.45;
}

/* Mapa de Google Maps estilizado */
.map-embed-wrapper {
  border-radius: var(--cnt-radius-card);
  overflow: hidden;
  border: 1px solid var(--cnt-border);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  background: rgba(11, 15, 30, 0.6);
  height: 230px;
  position: relative;
}

.map-embed-wrapper iframe {
  width: 100%;
  height: 100%;
  border: none;
  filter: invert(90%) hue-rotate(180deg) contrast(1.1) brightness(0.9);
  transition: filter 0.3s ease;
}

.map-embed-wrapper:hover iframe {
  filter: invert(85%) hue-rotate(180deg) contrast(1.15) brightness(0.95);
}

/* ==========================================
   5. COLUMNA DERECHA: CENTRO DE MENSAJES & AGENDA 3D
   ========================================== */
.contact-interactive-panel {
  background: var(--cnt-card-bg);
  border: 1px solid var(--cnt-border);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  border-radius: 28px;
  padding: 36px 32px;
  position: relative;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), 0 0 35px rgba(99, 102, 241, 0.15);
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}

/* Barra de progreso reactiva */
.form-progress-container {
  margin-bottom: 24px;
}

.form-progress-bar-bg {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 99px;
  overflow: hidden;
  position: relative;
}

.form-progress-bar-fill {
  width: 0%;
  height: 100%;
  background: var(--cnt-accent-gradient);
  border-radius: 99px;
  box-shadow: 0 0 12px var(--cnt-accent-cyan);
  transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.form-progress-labels {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  color: var(--cnt-text-muted);
  margin-top: 8px;
  font-weight: 500;
}

#formProgressPercent {
  font-weight: 700;
  color: var(--cnt-accent-cyan);
}

/* Selector de Modos (Mensaje vs Agendar Cita) */
.contact-mode-switcher {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  background: rgba(5, 7, 15, 0.8);
  border: 1px solid var(--cnt-border);
  padding: 6px;
  border-radius: 16px;
  margin-bottom: 28px;
}

.mode-tab-btn {
  background: transparent;
  border: none;
  color: var(--cnt-text-muted);
  font-size: 0.88rem;
  font-weight: 600;
  padding: 12px 14px;
  border-radius: 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: var(--cnt-trans);
  font-family: inherit;
}

.mode-tab-btn i {
  font-size: 1.15rem;
}

.mode-tab-btn:hover {
  color: var(--cnt-text-main);
  background: rgba(255, 255, 255, 0.04);
}

.mode-tab-btn.active {
  background: rgba(99, 102, 241, 0.22);
  color: var(--cnt-text-main);
  border: 1px solid rgba(99, 102, 241, 0.45);
  box-shadow: 0 4px 18px rgba(99, 102, 241, 0.25);
}

.tab-chip {
  background: var(--cnt-accent-cyan);
  color: #040914;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: var(--cnt-radius-pill);
  text-transform: uppercase;
}

/* Vistas de Pestaña */
.contact-tab-view {
  animation: cntFadeIn 0.3s ease-out;
}

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

/* Form Groups con Floating Label */
.form-group-modern {
  position: relative;
  margin-bottom: 24px;
}

.form-group-modern input,
.form-group-modern textarea,
.form-group-modern select {
  width: 100%;
  padding: 14px 0 8px 0;
  background: transparent;
  border: none;
  border-bottom: 1.5px solid rgba(255, 255, 255, 0.15);
  color: #ffffff !important;
  font-size: 1rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.3s;
  border-radius: 0;
}

.form-group-modern label {
  position: absolute;
  top: 14px;
  left: 0;
  color: var(--cnt-text-muted);
  font-size: 0.95rem;
  pointer-events: none;
  transition: all 0.25s ease;
}

.form-group-modern input:focus ~ label,
.form-group-modern input:not(:placeholder-shown) ~ label,
.form-group-modern textarea:focus ~ label,
.form-group-modern textarea:not(:placeholder-shown) ~ label,
.form-group-modern select:focus ~ label,
.form-group-modern select:valid ~ label {
  top: -10px;
  font-size: 0.78rem;
  color: var(--cnt-accent-cyan);
  font-weight: 600;
}

.form-group-modern .focus-border {
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--cnt-accent-gradient);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 0 10px var(--cnt-accent-cyan);
}

.form-group-modern input:focus ~ .focus-border,
.form-group-modern textarea:focus ~ .focus-border,
.form-group-modern select:focus ~ .focus-border {
  left: 0;
  width: 100%;
}

.form-group-modern select {
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='rgba(6,182,212,0.7)' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 4px center;
  padding-right: 24px;
}

.form-group-modern select option {
  background: #0d1226;
  color: #ffffff;
  padding: 10px;
}

/* Autofill Shield Fix W3C */
.form-group-modern input:-webkit-autofill,
.form-group-modern input:-webkit-autofill:hover,
.form-group-modern input:-webkit-autofill:focus,
.form-group-modern textarea:-webkit-autofill,
.form-group-modern select:-webkit-autofill {
  -webkit-text-fill-color: #ffffff !important;
  color: #ffffff !important;
  -webkit-box-shadow: 0 0 0 1000px #0b0c16 inset !important;
  box-shadow: 0 0 0 1000px #0b0c16 inset !important;
  caret-color: var(--cnt-accent-cyan) !important;
  transition: background-color 5000000s ease-in-out 0s !important;
}

/* Botón de Envío Principal */
.submit-btn-modern {
  width: 100%;
  padding: 16px 28px;
  background: var(--cnt-accent-gradient);
  color: #ffffff;
  border: none;
  border-radius: 16px;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
  transition: var(--cnt-trans);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
  position: relative;
  overflow: hidden;
  font-family: inherit;
  margin-top: 10px;
}

.submit-btn-modern:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(6, 182, 212, 0.45);
}

.submit-btn-modern:active {
  transform: translateY(0);
}

.submit-btn-modern:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

/* Mensajes de feedback */
.success-message,
.error-message {
  display: none;
  padding: 16px 20px;
  border-radius: 14px;
  margin-top: 18px;
  font-size: 0.92rem;
  line-height: 1.5;
  text-align: center;
}

.success-message {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #34d399;
}

.error-message {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #f87171;
}

/* ==========================================
   6. VISTA DE CALENDARIO & RESERVA DIRECTA
   ========================================== */
.booking-intro-header {
  margin-bottom: 22px;
}

.booking-badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.booking-tag {
  font-size: 0.72rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--cnt-border);
  padding: 4px 10px;
  border-radius: var(--cnt-radius-pill);
  color: var(--cnt-text-muted);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.booking-tag.tag-free {
  border-color: rgba(16, 185, 129, 0.4);
  color: #34d399;
  background: rgba(16, 185, 129, 0.1);
}

.booking-tag.tag-confirm {
  border-color: rgba(6, 182, 212, 0.4);
  color: var(--cnt-accent-cyan);
  background: rgba(6, 182, 212, 0.1);
}

.booking-intro-header h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 6px 0;
  color: var(--cnt-text-main);
}

.booking-intro-header p {
  font-size: 0.88rem;
  color: var(--cnt-text-muted);
  line-height: 1.55;
  margin: 0;
}

.booking-step-group {
  margin-bottom: 26px;
  padding-bottom: 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.booking-step-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.94rem;
  font-weight: 700;
  color: var(--cnt-text-main);
  margin-bottom: 14px;
}

.booking-step-label .step-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--cnt-accent-gradient);
  color: white;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
}

.tz-indicator {
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--cnt-text-dim);
}

/* Date Pills Swipeable Container */
.quick-dates-container {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 4px 2px 10px 2px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.quick-dates-container::-webkit-scrollbar {
  display: none;
}

.date-pill-btn {
  flex: 0 0 76px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--cnt-border);
  border-radius: 14px;
  padding: 10px 6px;
  text-align: center;
  cursor: pointer;
  transition: var(--cnt-trans);
  color: var(--cnt-text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  font-family: inherit;
}

.date-pill-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(6, 182, 212, 0.4);
  color: var(--cnt-text-main);
}

.date-pill-btn.active {
  background: rgba(6, 182, 212, 0.18);
  border-color: var(--cnt-accent-cyan);
  color: var(--cnt-text-main);
  box-shadow: 0 0 16px rgba(6, 182, 212, 0.3);
}

.pill-day-name {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.pill-day-num {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--cnt-text-main);
}

.pill-month {
  font-size: 0.68rem;
}

.custom-date-picker {
  margin-top: 12px;
}

.custom-date-label {
  font-size: 0.8rem;
  color: var(--cnt-text-dim);
  display: block;
  margin-bottom: 6px;
}

.booking-date-input {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--cnt-border);
  border-radius: 12px;
  padding: 10px 14px;
  color: white;
  font-family: inherit;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.3s;
}

.booking-date-input:focus {
  border-color: var(--cnt-accent-cyan);
}

/* Horarios Grid */
.time-slots-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.time-slot-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--cnt-border);
  border-radius: 12px;
  padding: 11px 8px;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--cnt-text-muted);
  cursor: pointer;
  transition: var(--cnt-trans);
  text-align: center;
  font-family: inherit;
}

.time-slot-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(99, 102, 241, 0.4);
  color: white;
}

.time-slot-btn.active {
  background: rgba(99, 102, 241, 0.22);
  border-color: var(--cnt-accent-purple);
  color: white;
  box-shadow: 0 0 16px rgba(99, 102, 241, 0.35);
}

.booking-field-hint {
  font-size: 0.78rem;
  color: var(--cnt-text-dim);
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.booking-feedback-msg.error {
  display: none;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #fca5a5;
  padding: 12px 16px;
  border-radius: 12px;
  margin-bottom: 16px;
  font-size: 0.88rem;
}

.booking-feedback-msg.error.visible {
  display: block;
}

/* Pantalla de Éxito de Cita */
.booking-success-screen {
  text-align: center;
  padding: 10px 0;
  animation: cntFadeIn 0.4s ease-out;
}

.success-icon-animated {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.15);
  border: 2px solid var(--cnt-accent-emerald);
  color: var(--cnt-accent-emerald);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  margin: 0 auto 16px auto;
  box-shadow: 0 0 25px rgba(16, 185, 129, 0.4);
}

.booking-success-screen h3 {
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 8px;
  color: #ffffff;
}

.booking-success-screen .success-sub {
  font-size: 0.9rem;
  color: var(--cnt-text-muted);
  line-height: 1.6;
  max-width: 500px;
  margin: 0 auto 22px auto;
}

.booking-summary-card {
  background: rgba(11, 15, 30, 0.8);
  border: 1px solid var(--cnt-border);
  border-radius: 18px;
  padding: 20px 22px;
  text-align: left;
  margin-bottom: 24px;
}

.summary-status-pill {
  font-size: 0.78rem;
  color: var(--cnt-accent-cyan);
  font-weight: 600;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.88rem;
}

.summary-row:last-child {
  border-bottom: none;
}

.summary-label {
  color: var(--cnt-text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.summary-val {
  color: white;
  font-weight: 600;
}

.booking-success-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.btn-cal-action {
  padding: 13px 20px;
  border-radius: 14px;
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: var(--cnt-trans);
}

.btn-cal-action.btn-wa {
  background: #25D366;
  color: #040914;
  box-shadow: 0 4px 18px rgba(37, 211, 102, 0.35);
}

.btn-cal-action.btn-wa:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(37, 211, 102, 0.5);
}

.btn-cal-action.btn-whereby {
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid var(--cnt-accent-purple);
  color: #c7d2fe;
}

.btn-cal-action.btn-whereby:hover {
  background: rgba(99, 102, 241, 0.25);
  transform: translateY(-2px);
}

.btn-cal-action.btn-gcal {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--cnt-border);
  color: var(--cnt-text-muted);
}

.btn-cal-action.btn-gcal:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  transform: translateY(-2px);
}

.booking-reset-btn {
  background: transparent;
  border: none;
  color: var(--cnt-text-dim);
  font-size: 0.85rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color 0.2s;
  font-family: inherit;
}

.booking-reset-btn:hover {
  color: var(--cnt-accent-cyan);
}

/* ==========================================
   7. SECCIÓN DE PREGUNTAS FRECUENTES (FAQ 3D)
   ========================================== */
.contact-faq-section {
  padding: 60px 0 20px;
}

.faq-header-center {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 36px auto;
}

.faq-header-center h2 {
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  font-weight: 800;
  margin-top: 12px;
  margin-bottom: 12px;
  background: var(--cnt-accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.faq-header-center p {
  color: var(--cnt-text-muted);
  font-size: 1rem;
  line-height: 1.6;
}

.faq-accordion-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 860px;
  margin: 0 auto;
}

.faq-accordion-item {
  background: var(--cnt-card-bg);
  border: 1px solid var(--cnt-border);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-radius: 18px;
  overflow: hidden;
  transition: var(--cnt-trans);
}

.faq-accordion-item:hover {
  border-color: rgba(6, 182, 212, 0.35);
}

.faq-accordion-item.active {
  border-color: var(--cnt-accent-cyan);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4), 0 0 20px rgba(6, 182, 212, 0.15);
}

.faq-accordion-trigger {
  width: 100%;
  padding: 20px 24px;
  background: transparent;
  border: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  color: var(--cnt-text-main);
  font-size: 1.05rem;
  font-weight: 600;
  text-align: left;
  font-family: inherit;
  gap: 16px;
  transition: color 0.2s;
}

.faq-accordion-trigger .faq-question {
  display: flex;
  align-items: center;
  gap: 12px;
}

.faq-accordion-trigger .faq-question i {
  color: var(--cnt-accent-cyan);
  font-size: 1.3rem;
  flex-shrink: 0;
}

.faq-chevron {
  font-size: 1.3rem;
  color: var(--cnt-text-muted);
  transition: transform 0.3s ease;
  flex-shrink: 0;
}

.faq-accordion-item.active .faq-chevron {
  transform: rotate(180deg);
  color: var(--cnt-accent-cyan);
}

.faq-accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.faq-accordion-content p {
  padding: 0 24px 22px 24px;
  color: var(--cnt-text-muted);
  font-size: 0.94rem;
  line-height: 1.7;
  margin: 0;
}

/* ==========================================
   8. NOTIFICACIÓN TOAST VISUAL
   ========================================== */
.contact-toast {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: rgba(11, 15, 30, 0.9);
  border: 1px solid var(--cnt-border-active);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 18px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6), var(--cnt-hover-glow);
  z-index: 9999;
  transform: translateY(120px);
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  max-width: 380px;
}

.contact-toast.show {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
}

.toast-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(6, 182, 212, 0.15);
  color: var(--cnt-accent-cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}

.toast-content {
  flex-grow: 1;
}

.toast-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: white;
  margin-bottom: 2px;
}

.toast-desc {
  font-size: 0.78rem;
  color: var(--cnt-text-muted);
  line-height: 1.4;
}

.toast-close {
  background: transparent;
  border: none;
  color: var(--cnt-text-dim);
  cursor: pointer;
  font-size: 1.2rem;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
}

.toast-close:hover {
  color: white;
}

/* ==========================================
   9. RESPONSIVE BREAKPOINTS (0px OVERFLOW)
   ========================================== */
@media (max-width: 991px) {
  .contact-hero {
    padding: 5rem 0 2rem;
  }
  
  .contact-grid-3d {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
  }

  .contact-channels-stack,
  .contact-interactive-panel {
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
  }
}

@media (max-width: 768px) {
  /* Contención de ambient glow en celulares */
  .ambient-glow {
    width: 200px;
    height: 200px;
    filter: blur(50px);
    max-width: 80vw;
  }

  .contact-hero {
    padding: 4.2rem 1rem 1.6rem;
  }

  .hero-logo-container {
    max-width: 130px;
    margin-bottom: 16px;
  }

  h1.contact-hero-title {
    font-size: clamp(1.75rem, 6.2vw, 2.2rem);
    letter-spacing: -0.5px;
    margin-bottom: 10px;
  }

  .contact-hero-subtitle {
    font-size: 0.92rem;
    line-height: 1.55;
    padding: 0 4px;
  }

  .trust-badges {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-top: 18px;
  }

  .trust-badge {
    padding: 8px 10px;
    font-size: 0.76rem;
    justify-content: center;
    border-radius: 12px;
  }

  /* Desactivar 3D tilt en móviles para evitar tirones táctiles y permitir scroll nativo fluido */
  .contact-card-3d-container {
    perspective: none !important;
  }

  .contact-card-3d {
    transform: none !important;
    transform-style: flat !important;
    padding: 14px 14px;
    border-radius: 14px;
    gap: 12px;
  }

  .card-depth-1, .card-depth-2, .card-depth-3 {
    transform: none !important;
  }

  .glare {
    display: none !important;
  }

  .contact-icon-wrapper {
    width: 42px;
    height: 42px;
    font-size: 1.35rem;
    border-radius: 10px;
  }

  .card-channel-label {
    font-size: 0.68rem;
  }

  .contact-status-chip {
    font-size: 0.62rem;
    padding: 1px 6px;
  }

  .card-main-val {
    font-size: 0.9rem;
    word-break: break-word;
    overflow-wrap: anywhere;
  }

  .btn-copy-action,
  .card-action-btn {
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
    border-radius: 10px;
    font-size: 1.05rem;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
  }

  .contact-sla-box {
    padding: 20px 18px;
    border-radius: 20px;
    gap: 14px;
  }

  .map-embed-wrapper {
    height: 200px;
    border-radius: 18px;
    touch-action: pan-x pan-y;
  }

  .contact-interactive-panel {
    padding: 24px 16px;
    border-radius: 22px;
    margin-bottom: 24px;
  }

  .booking-step-label {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px 8px;
    font-size: 0.90rem;
    margin-bottom: 12px;
  }

  .tz-indicator {
    display: block;
    width: 100%;
    margin-left: 32px;
    font-size: 0.73rem;
    color: var(--cnt-text-dim);
  }

  /* Blindaje iOS Safari contra autozoom: tamaño mínimo 16px */
  .form-group-modern input,
  .form-group-modern textarea,
  .form-group-modern select,
  .booking-date-input {
    font-size: 16px !important;
  }

  .form-group-modern {
    margin-bottom: 20px;
  }

  /* Date Pills Swipe Physics con Snap nativo */
  .quick-dates-container {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 4px 2px 12px 2px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
  }

  .date-pill-btn {
    flex: 0 0 70px;
    scroll-snap-align: start;
    padding: 8px 4px;
    border-radius: 12px;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
  }

  .pill-day-num {
    font-size: 1.2rem;
  }

  .custom-date-picker {
    margin-top: 14px;
  }

  .booking-date-input {
    width: 100%;
    min-height: 48px;
    padding: 12px 14px;
    border-radius: 12px;
    box-sizing: border-box;
    display: block;
  }

  .time-slots-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .time-slot-btn {
    min-height: 46px;
    font-size: 0.84rem;
    padding: 10px 6px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
  }

  .submit-btn-modern {
    min-height: 50px;
    padding: 14px 20px;
    font-size: 0.92rem;
    border-radius: 14px;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
  }

  /* Pantalla de éxito en celular */
  .booking-summary-card {
    padding: 16px 16px;
    border-radius: 16px;
  }

  .summary-row {
    flex-wrap: wrap;
    gap: 4px;
    padding: 8px 0;
  }

  .summary-val {
    word-break: break-word;
    max-width: 100%;
    font-size: 0.86rem;
  }

  .btn-cal-action {
    min-height: 48px;
    font-size: 0.88rem;
    padding: 12px 16px;
  }

  /* FAQ Accordion en celular */
  .contact-faq-section {
    padding: 40px 0 20px;
  }

  .faq-accordion-trigger {
    min-height: 48px;
    padding: 14px 16px;
    font-size: 0.88rem;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
  }

  .faq-accordion-content p {
    padding: 0 16px 16px 16px;
    font-size: 0.88rem;
  }

  .contact-toast {
    bottom: 20px;
    right: 12px;
    left: 12px;
    max-width: none;
    border-radius: 14px;
    padding: 12px 16px;
  }
}

@media (max-width: 480px) {
  .contact-mode-switcher {
    gap: 6px;
    padding: 4px;
    margin-bottom: 22px;
  }

  .mode-tab-btn {
    font-size: 0.82rem;
    padding: 11px 8px;
    gap: 6px;
    min-height: 44px;
    justify-content: center;
  }

  .mode-tab-btn i {
    font-size: 1.05rem;
  }

  /* Ocultar chip en móviles pequeños para asegurar texto simétrico y 0% de corte */
  .tab-chip {
    display: none !important;
  }

  .date-pill-btn {
    flex: 0 0 65px;
    padding: 7px 3px;
  }

  .pill-day-name {
    font-size: 0.68rem;
  }

  .pill-day-num {
    font-size: 1.1rem;
  }

  .pill-month {
    font-size: 0.65rem;
  }

  .trust-badges {
    grid-template-columns: 1fr 1fr;
    gap: 6px;
  }

  .trust-badge {
    padding: 6px 8px;
    font-size: 0.72rem;
  }
}

@media (max-width: 360px) {
  .mode-tab-btn {
    font-size: 0.75rem;
    padding: 8px 4px;
    gap: 4px;
  }

  .tab-chip {
    display: none !important;
  }

  .card-main-val {
    font-size: 0.86rem;
  }

  .time-slot-btn {
    font-size: 0.78rem;
    padding: 8px 4px;
  }
}

/* ==========================================
   BLUR + REVEAL — Protección de datos sensibles
   El valor real existe en el DOM pero queda
   visualmente oculto hasta que el usuario
   interactúa con la tarjeta.
   ========================================== */

/* Estado oculto: blur sobre el texto real */
.card-main-val.blur-hidden {
  filter: blur(6px);
  user-select: none;
  -webkit-user-select: none;
  cursor: pointer;
  position: relative;
  transition: filter 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  color: rgba(255, 255, 255, 0.7);
}

/* Hint "Toca para ver" visible encima del blur */
.card-main-val.blur-hidden::after {
  content: attr(data-reveal-label);
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.55);
  pointer-events: none;
  white-space: nowrap;
}

/* Estado revelado: quita el blur, oculta el hint */
.card-main-val.revealed {
  filter: blur(0px);
  user-select: text;
  -webkit-user-select: text;
  color: #ffffff;
  cursor: default;
}

.card-main-val.revealed::after {
  display: none;
}

/* En hover sobre la tarjeta se da un preview suave del blur */
.contact-card-3d:hover .card-main-val.blur-hidden {
  filter: blur(4px);
}

/* ==========================================
   BOTONES CTA — WhatsApp & Correo
   Diseño profesional: sólido + glass premium
   ========================================== */

.contact-cta-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

/* Base compartida */
.contact-cta-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  height: 58px;
  padding: 0 26px;
  border-radius: 14px;
  text-decoration: none;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.25s ease,
              filter 0.25s ease;
}

/* Shimmer al hover (efecto de brillo que cruza el botón) */
.contact-cta-btn::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.12) 50%,
    transparent 100%
  );
  transition: left 0.45s ease;
  pointer-events: none;
}

.contact-cta-btn:hover::after {
  left: 160%;
}

.contact-cta-btn:hover {
  transform: translateY(-2px) scale(1.012);
}

.contact-cta-btn:active {
  transform: translateY(0) scale(0.99);
}

/* ── WHATSAPP: sólido verde ── */
.cta-whatsapp {
  background: #25d366;
  color: #ffffff;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.35),
              0 1px 0 rgba(255,255,255,0.15) inset;
  border: none;
}

.cta-whatsapp:hover {
  box-shadow: 0 8px 32px rgba(37, 211, 102, 0.5),
              0 1px 0 rgba(255,255,255,0.15) inset;
  filter: brightness(1.06);
}

/* ── CORREO: glass oscuro con borde ── */
.cta-gmail {
  background: rgba(255, 255, 255, 0.04);
  color: #ffffff;
  border: 1.5px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3),
              0 1px 0 rgba(255,255,255,0.06) inset;
}

.cta-gmail:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.28);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.4),
              0 1px 0 rgba(255,255,255,0.1) inset;
}

/* Icono */
.cta-icon {
  font-size: 1.5rem;
  line-height: 1;
  flex-shrink: 0;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.contact-cta-btn:hover .cta-icon {
  transform: scale(1.12);
}

/* Texto */
.cta-label {
  flex: 1;
  text-align: center;
  white-space: nowrap;
}

/* Flecha */
.cta-arrow {
  font-size: 1.35rem;
  flex-shrink: 0;
  opacity: 0.65;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.contact-cta-btn:hover .cta-arrow {
  transform: translateX(5px);
  opacity: 1;
}

/* Responsive */
@media (max-width: 768px) {
  .contact-cta-btn {
    height: 54px;
    font-size: 0.96rem;
    border-radius: 12px;
    padding: 0 20px;
  }
  .cta-icon { font-size: 1.4rem; }
}

/* ==========================================
   FORM PANEL — Imagen de fondo dinámica
   Controlada desde el panel de administración.
   La clase .panel-has-bg se agrega al wrapper
   desde JS cuando hay una imagen activa.
   ========================================== */

/* Wrapper: posiciona las 3 capas */
.form-panel-wrapper {
  position: relative;
  border-radius: 28px;
  overflow: hidden;
}

/* Layer 1 — Imagen de fondo */
.form-panel-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  z-index: 0;
  opacity: 0;
  transition: opacity 0.55s ease;
}

/* Activar imagen cuando el wrapper tiene la clase */
.panel-has-bg .form-panel-bg {
  opacity: 1;
}

/* Layer 2 — Overlay oscuro para legibilidad del formulario */
.form-panel-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    160deg,
    rgba(4, 4, 12, 0.78) 0%,
    rgba(6, 8, 20, 0.68) 50%,
    rgba(4, 4, 12, 0.84) 100%
  );
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.55s ease;
}

/* Mostrar overlay cuando hay imagen activa */
.panel-has-bg .form-panel-overlay {
  opacity: 1;
}

/* Layer 3 — Panel del formulario (z-index 2, definido en inline style del HTML) */
.form-panel-wrapper .contact-interactive-panel {
  transition: background 0.55s ease, box-shadow 0.55s ease, border-color 0.55s ease;
}

/* Ajustar transparencia del panel cuando hay imagen */
.panel-has-bg .contact-interactive-panel {
  background: rgba(6, 8, 22, 0.30) !important;
  backdrop-filter: blur(24px) saturate(160%) !important;
  -webkit-backdrop-filter: blur(24px) saturate(160%) !important;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.65),
              0 0 0 1px rgba(255, 255, 255, 0.09) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
}

/* Responsive */
@media (max-width: 900px) {
  .form-panel-wrapper,
  .form-panel-overlay {
    border-radius: 20px;
  }
}
