/* ========================================
   CONTENEDOR PRINCIPAL
   ======================================== */

.section.cc-store-home-wrap.formulario-home {
  min-height: 100vh;
  padding: 0;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  position: relative;
  z-index: 1;
  margin-bottom: 0;
  display: flex;
  flex-direction: column;
  overflow-x: hidden; /* ✅ Evita scroll horizontal */
}

/* ========================================
   ÁREA DE CONTACTO (70% DEL ESPACIO)
   ======================================== */

.home-content-wrap {
  flex: 7;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 80px 3vw;
  display: flex;
  align-items: center;
  box-sizing: border-box; /* ✅ CRÍTICO para evitar overflow */
}

/* Grid del Formulario */
.contact-form-grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 60px;
  align-items: start;
  width: 100%;
  max-width: 100%; /* ✅ Asegura que no se desborde */
  box-sizing: border-box;
}

/* ========================================
   COLUMNA IZQUIERDA - INFORMACIÓN
   ======================================== */

.contact-info-wrap {
  display: flex;
  flex-direction: column;
  gap: 45px;
  width: 100%; /* ✅ Ocupa todo el ancho de su columna */
  box-sizing: border-box;
}

/* Heading principal con efecto */
.contact-main-heading {
  margin-bottom: 20px;
  position: relative;
  width: 100%; /* ✅ Control de ancho */
}

.contact-main-heading h2 {
  font-size: clamp(2.2rem, 4.5vw, 3.2rem);
  font-weight: 800;
  line-height: 1.15;
  color: #1a1b1f;
  margin: 0 0 20px 0;
  letter-spacing: -0.5px;
  position: relative;
  display: inline-block;
  max-width: 100%; /* ✅ Evita desbordamiento */
}

/* Línea decorativa bajo el título */
.contact-main-heading h2::after {
  content: '';
  position: absolute;
  bottom: -12px;
  left: 0;
  width: 80px;
  height: 4px;
  background: linear-gradient(90deg, #5957b8, #7b79d8);
  border-radius: 2px;
}

.contact-main-heading p {
  font-size: 18px;
  line-height: 1.7;
  color: #444;
  margin: 25px 0 0 0;
  font-weight: 400;
  max-width: 100%; /* ✅ Control de ancho */
}

/* ========================================
   TARJETA UNIFICADA DE CONTACTO
   ======================================== */

/* Contenedor Principal de la Tarjeta Unificada */
.details-wrap-unified {
  background: white;
  padding: 35px 35px;
  border-radius: 16px;
  border-left: 5px solid #5957b8;
  box-shadow: 
    0 4px 20px rgba(0, 0, 0, 0.08),
    0 1px 4px rgba(0, 0, 0, 0.04);
  transition: all 0.4s ease;
  width: 100%; /* ✅ Ocupa su columna completa */
  box-sizing: border-box;
  margin-top: -40px;
}

.details-wrap-unified:hover {
  transform: translateY(-5px);
  box-shadow: 
    0 10px 35px rgba(89, 87, 184, 0.2),
    0 4px 12px rgba(0, 0, 0, 0.08);
  border-left-width: 6px;
}

/* Item Individual de Contacto */
.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding: 12px 0;
  width: 100%; /* ✅ Ancho completo */
}

/* Contenedor del Icono */
.contact-icon-wrapper {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #5957b8 0%, #7b79d8 100%);
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(89, 87, 184, 0.25);
  transition: all 0.3s ease;
}

.contact-item:hover .contact-icon-wrapper {
  transform: scale(1.1) rotate(5deg);
  box-shadow: 0 6px 18px rgba(89, 87, 184, 0.35);
}

/* Icono SVG */
.contact-icon {
  width: 24px;
  height: 24px;
  color: white;
}

/* Contenedor de Detalles de Contacto */
.contact-details {
  flex: 1;
  min-width: 0; /* ✅ Permite que flex funcione correctamente */
  max-width: 100%; /* ✅ Evita overflow */
}

/* Label de Cada Sección */
.contact-details .label {
  letter-spacing: 2.5px;
  text-transform: uppercase;
  margin-bottom: 8px;
  font-size: 11px;
  font-weight: 700;
  color: #5957b8;
  display: block;
}

/* Texto de Información */
.contact-details .paragraph-light {
  font-size: 16px;
  line-height: 1.7;
  color: #333;
  margin: 0;
  font-weight: 500;
  word-break: break-word;
  overflow-wrap: break-word; /* ✅ Rompe palabras largas */
}

/* Separador Entre Secciones */
.contact-divider {
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(89, 87, 184, 0.15) 50%,
    transparent 100%
  );
  margin: 20px 0;
  position: relative;
}

/* Punto decorativo en el centro del separador */
.contact-divider::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 6px;
  height: 6px;
  background: #5957b8;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(89, 87, 184, 0.1);
}

/* Links de Email/Tel con Animación Mejorada */
.contact-email-link {
  color: #5957b8;
  text-decoration: none;
  font-size: 16px;
  line-height: 1.7;
  display: inline-block;
  margin-bottom: 3px;
  transition: all 0.3s ease;
  position: relative;
  font-weight: 600;
  word-break: break-all;
  overflow-wrap: break-word; /* ✅ Rompe emails largos */
  max-width: 100%;
}

.contact-email-link::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -2px;
  left: 0;
  background: linear-gradient(90deg, #5957b8, #7b79d8);
  transition: width 0.3s ease;
}

.contact-email-link:hover::after {
  width: 100%;
}

.contact-email-link:hover {
  color: #4745a0;
  transform: translateX(3px);
}

/* ========================================
   COLUMNA DERECHA - FORMULARIO MODERNO
   ======================================== */

.contact-form-wrap {
  background: linear-gradient(135deg, #5957b8 0%, #4745a0 100%);
  border: none;
  border-radius: 20px;
  padding: 50px 45px;
  box-shadow: 
    0 15px 50px rgba(89, 87, 184, 0.3),
    0 5px 20px rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: hidden;
  width: 100%; /* ✅ Ocupa su columna completa */
  box-sizing: border-box;
}

/* Efecto de fondo animado */
.contact-form-wrap::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
  animation: pulse 15s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-10px, -10px) scale(1.05); }
}

.contact-form {
  width: 100%; /* ✅ Cambiado de 90% a 100% */
  position: relative;
  z-index: 2;
  box-sizing: border-box;
}

.get-in-touch-form {
  display: flex;
  flex-direction: column;
  gap: 25px;
  width: 100%;
  box-sizing: border-box;
}

/* Labels del Formulario */
.field-label,
.field-label-2,
.field-label-3,
.field-label-4 {
  color: rgba(255, 255, 255, 0.95);
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 10px;
  font-weight: 700;
  line-height: 1.2;
  display: block;
}

/* Campos de Texto Mejorados */
.text-field.cc-contact-field {
  background-color: rgba(255, 255, 255, 0.95);
  color: #1a1b1f;
  border: 2px solid transparent;
  border-radius: 10px;
  margin-bottom: 0;
  padding: 18px 22px;
  font-size: 15px;
  line-height: 1.5;
  width: 100%;
  transition: all 0.3s ease;
  font-family: Montserrat, sans-serif;
  font-weight: 500;
  box-sizing: border-box;
}

.text-field.cc-contact-field:hover {
  background-color: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.text-field.cc-contact-field:focus {
  background-color: #fff;
  border-color: rgba(255, 255, 255, 0.5);
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.2);
  outline: none;
  transform: translateY(-2px);
}

.text-field.cc-contact-field::placeholder {
  color: rgba(26, 27, 31, 0.5);
  font-size: 14px;
}

/* Textarea */
.text-field.cc-textarea.cc-contact-field {
  height: 150px;
  padding: 18px 22px;
  resize: vertical;
  min-height: 120px;
  max-height: 300px;
}

/* Botón de Enviar Moderno */
.button.w-button {
  background: linear-gradient(135deg, #1a1b1f 0%, #2d2e35 100%);
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  padding: 18px 40px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 2.5px;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 10px;
  width: 100%;
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
}

.button.w-button::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  transform: translate(-50%, -50%);
  transition: width 0.6s ease, height 0.6s ease;
}

.button.w-button:hover::before {
  width: 300px;
  height: 300px;
}

.button.w-button:hover {
  background: linear-gradient(135deg, #2d2e35 0%, #3d3e45 100%);
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.button.w-button:active {
  transform: translateY(0);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* Mensajes de Estado Mejorados */
.status-message {
  color: #fff;
  text-align: center;
  padding: 16px 30px;
  font-size: 14px;
  line-height: 1.6;
  border-radius: 10px;
  margin-top: 20px;
  display: none;
  font-weight: 600;
  box-sizing: border-box;
}

.status-message.cc-success-message {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.status-message.cc-error-message {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

.w-form-done,
.w-form-fail {
  display: block;
}

/* ========================================
   ANIMACIONES ADICIONALES
   ======================================== */

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Animación del heading */
.contact-main-heading {
  animation: fadeInUp 0.6s ease-out forwards;
}

/* Animación de la tarjeta unificada */
.details-wrap-unified {
  animation: fadeInUp 0.6s ease-out 0.1s forwards;
  opacity: 0;
  animation-fill-mode: forwards;
}

/* Animación escalonada de los items dentro de la tarjeta */
.contact-item {
  opacity: 0;
  animation: fadeInUp 0.5s ease-out forwards;
}

.contact-item:nth-child(1) { animation-delay: 0.2s; }
.contact-item:nth-child(3) { animation-delay: 0.3s; }
.contact-item:nth-child(5) { animation-delay: 0.4s; }
.contact-item:nth-child(7) { animation-delay: 0.5s; }

/* ========================================
   RESPONSIVIDAD: TABLETS Y MÓVILES
   ======================================== */

/* Pantallas grandes (1200px - 1400px) */
@media (max-width: 1400px) {
  .home-content-wrap {
    padding: 80px 4vw; /* ✅ Más padding lateral */
  }
  
  .contact-form-grid {
    gap: 50px;
  }
}

/* Pantallas medianas-grandes (992px - 1199px) */
@media (max-width: 1199px) {
  .home-content-wrap {
    padding: 70px 5vw; /* ✅ Incrementamos padding */
  }
  
  .contact-form-grid {
    gap: 40px;
  }
  
  .contact-form-wrap {
    padding: 45px 35px;
  }
}

/* Tablets y pantallas medianas (≤ 991px) */
@media (max-width: 991px) {
  .home-content-wrap {
    padding: 60px 6vw; /* ✅ Más espacio lateral */
  }

  .contact-form-grid {
    grid-template-columns: 1fr;
    gap: 50px;
  }

  .contact-info-wrap {
    text-align: center;
    align-items: center;
    gap: 35px;
    width: 100%;
    max-width: 600px; /* ✅ Control de ancho máximo */
    margin: 0 auto; /* ✅ Centramos */
  }

  .contact-main-heading {
    width: 100%;
  }

  .contact-main-heading h2 {
    font-size: clamp(2rem, 5vw, 2.5rem);
  }

  .contact-main-heading h2::after {
    left: 50%;
    transform: translateX(-50%);
  }

  .contact-form-wrap {
    padding: 40px 35px;
    width: 100%;
    max-width: 600px; /* ✅ Control de ancho máximo */
    margin: 0 auto; /* ✅ Centramos */
  }
  
  .contact-form {
    width: 100%;
  }

  .details-wrap-unified {
    text-align: left;
    width: 100%;
  }
}

/* Tablets pequeñas (≤ 767px) */
@media (max-width: 767px) {
  .section.cc-store-home-wrap.formulario-home {
    min-height: auto;
  }

  .home-content-wrap {
    padding: 50px 5vw; /* ✅ Padding balanceado */
  }

  .contact-form-grid {
    gap: 40px;
  }

  .contact-main-heading h2 {
    font-size: clamp(1.75rem, 6vw, 2.2rem);
    margin-bottom: 15px;
  }

  .contact-main-heading p {
    font-size: 16px;
    line-height: 1.6;
  }

  .contact-info-wrap {
    gap: 30px;
    max-width: 100%; /* ✅ Ocupa todo el ancho disponible */
  }

  .details-wrap-unified {
    padding: 28px 25px;
  }

  .contact-form-wrap {
    padding: 35px 25px;
    border-radius: 16px;
    max-width: 100%; /* ✅ Ocupa todo el ancho disponible */
  }

  .contact-item {
    gap: 15px;
    padding: 10px 0;
  }

  .contact-icon-wrapper {
    width: 42px;
    height: 42px;
  }

  .contact-icon {
    width: 22px;
    height: 22px;
  }

  .contact-details .paragraph-light {
    font-size: 15px;
  }

  .contact-email-link {
    font-size: 15px;
  }

  .text-field.cc-contact-field {
    padding: 16px 18px;
    font-size: 14px;
  }

  .get-in-touch-form {
    gap: 20px;
  }

  .field-label,
  .field-label-2,
  .field-label-3,
  .field-label-4 {
    font-size: 11px;
    letter-spacing: 1.5px;
  }
}

/* Teléfonos pequeños (≤ 479px) */
@media (max-width: 479px) {
  .home-content-wrap {
    padding: 40px 4vw; /* ✅ Padding uniforme */
  }

  .contact-main-heading h2 {
    font-size: 1.65rem;
    letter-spacing: -0.3px;
  }

  .contact-main-heading p {
    font-size: 15px;
  }

  .details-wrap-unified {
    padding: 24px 20px;
    border-radius: 12px;
  }

  .contact-form-wrap {
    padding: 30px 20px;
    border-radius: 14px;
  }

  .contact-icon-wrapper {
    width: 38px;
    height: 38px;
  }

  .contact-icon {
    width: 20px;
    height: 20px;
  }

  .contact-details .label {
    font-size: 10px;
    letter-spacing: 2px;
  }

  .contact-details .paragraph-light {
    font-size: 14px;
  }
  
  .contact-email-link {
    font-size: 14px;
  }

  .text-field.cc-contact-field {
    padding: 14px 16px;
    font-size: 14px;
  }

  .text-field.cc-textarea.cc-contact-field {
    min-height: 100px;
  }

  .button.w-button {
    padding: 15px 30px;
    font-size: 11px;
    letter-spacing: 2px;
  }

  .get-in-touch-form {
    gap: 18px;
  }

  .contact-divider {
    margin: 16px 0;
  }
}

/* Teléfonos muy pequeños (≤ 360px) */
@media (max-width: 360px) {
  .home-content-wrap {
    padding: 35px 3vw; /* ✅ Padding mínimo pero seguro */
  }

  .contact-main-heading h2 {
    font-size: 1.5rem;
  }

  .details-wrap-unified {
    padding: 20px 16px;
  }

  .contact-form-wrap {
    padding: 25px 16px;
  }

  .contact-item {
    gap: 12px;
  }

  .button.w-button {
    padding: 14px 25px;
    font-size: 10px;
    letter-spacing: 1.5px;
  }
}

/* ========================================
   FIX PARA OVERFLOW HORIZONTAL
   ======================================== */

* {
  box-sizing: border-box; /* ✅ Aplicar globalmente a todos los elementos */
}

body {
  overflow-x: hidden; /* ✅ Evita scroll horizontal en toda la página */
  margin: 0;
  padding: 0;
}

/* Aseguramos que ningún elemento hijo se desborde */
.contact-form-grid > * {
  max-width: 100%;
  box-sizing: border-box;
}