/* Archivo CSS Básico (style.css)
  Utilizado para estilos que complementan Tailwind CSS y las variables de color.
*/

/* Navbar logo inline SVG sizing and color switch on scroll */
#navbar-logo-svg {
  height: 3rem;
  width: auto;
  display: block;
  transition: transform 180ms ease, height 180ms ease;
}

/* Distintivo: borde y sombra para la card del formulario (mejora separación del contenido) */
#hero-form-wrapper > div {
  /* Más notorio en mobile: borde más grueso y sombra más marcada */
  border: 2px solid rgba(6,78,35,0.18) !important;
  box-shadow: 0 18px 48px rgba(6,78,35,0.12) !important;
  transition: box-shadow 220ms ease, transform 220ms ease, border-color 220ms ease;
}

@media (min-width: 768px) {
  /* Desktop: mantener notable pero más contenido que en mobile */
  #hero-form-wrapper > div {
    border: 1.5px solid rgba(6,78,35,0.12) !important;
    box-shadow: 0 14px 42px rgba(6,78,35,0.08) !important;
  }
}

/* Interacción: levantar la card al pasar el cursor en desktop para enfatizar */
@media (hover: hover) and (min-width: 768px) {
  #hero-form-wrapper > div:hover {
    transform: translateY(-6px);
    box-shadow: 0 26px 68px rgba(6,78,35,0.16) !important;
    border-color: rgba(6,78,35,0.22) !important;
  }
}

/* Aplicar margen superior al logo (imagen o SVG inline) */
#navbar-logo,
#navbar-logo-svg {
  margin-top: 8px;
}

/* Footer logo: más pequeño que el navbar, responsive */
/* Footer logo: más pequeño que el navbar, responsive */
#footer-logo,
#footer-logo-svg {
  height: 2rem;
  width: auto;
  display: block;
  color: var(--color-primary); /* used by SVG when paths use currentColor */
}

/* Force paths inside SVG to use color variable (covers browsers that don't inherit currentColor) */
#footer-logo-svg * {
  fill: var(--color-primary) !important;
}

@media (min-width: 768px) {
  #footer-logo,
  #footer-logo-svg {
    height: 3rem;
  }
}

@media (min-width: 768px) {
  #navbar-logo-svg {
    height: 4rem;
  }
}

/* Default (in hero): logo blanco */
#main-header:not(.scrolled) #navbar-logo-svg * {
  fill: #ffffff !important;
  stroke: none !important;
  transition: fill 200ms ease;
}

/* Cuando se scrollea: usar color primary */
#main-header.scrolled #navbar-logo-svg * {
  fill: var(--color-primary) !important;
  stroke: none !important;
}
:root {
  --color-primary: #07682f; /* verde principal */
  --color-primary-dark: #064e23;
  --header-height: 64px;
  --color-dark: #111111;
  --color-text-secondary: #666666;
  --color-background-light: #f4f6fa;
  --color-border: #e1e7f2;
}

/* ==============================
   Estilos centrales del proyecto
   ============================== */

html {
  overflow-x: hidden !important;
  max-width: 100% !important;
  width: 100% !important;
}

body {
  font-family: "Google Sans", "Google Sans Text", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  background-color: white;
  color: var(--color-dark);
  overflow-x: hidden !important;
  max-width: 100vw !important;
  width: 100% !important;
  position: relative;
}

/* Panels para sección de planes (imagen accordion) */
.panels {
  display: flex;
  min-height: 100vh;
  overflow: hidden;
}

.panel {
  flex: 1;
  justify-content: center;
  align-items: center;
  display: flex;
  flex-direction: column;
  padding: 20px 0;
  transition: all 400ms;
  &:hover {
    flex: 2;
    & > *:first-child {
      transform: translateY(0);
    }
    & > *:last-child {
      transform: translateY(0);
    }
  }
}

.panel > *:first-child {
  transform: translateY(-100%);
}
.panel > *:last-child {
  transform: translateY(100%);
}

.panel > * {
  flex: 1 0 auto;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: all 400ms;
  color: #ffffff;
  font-size: 40px;
}

.panel1 {
  background: url(./img/Classic\ X.webp) no-repeat center center / cover;
}

.panel2 {
  background: url(./img/Taylored.webp) no-repeat center center / cover;
}

.panel3 {
  background: url(./img/Wagon.webp) no-repeat center center / cover;
}


/* Asegurar que el contenedor principal no se desborde */
#main-content {
  overflow-x: hidden !important;
  max-width: 100vw !important;
  width: 100% !important;
}

/* Prevenir desbordamiento en todas las secciones */
section {
  overflow-x: hidden;
  max-width: 100%;
}

/* Prevenir desbordamiento en filas y contenedores flex */
.flex,
.grid {
  max-width: 100%;
}

/* Asegurar que todos los contenedores no se desborden */
* {
  box-sizing: border-box;
}

section {
  overflow-x: hidden;
}

/* Carrusel de prestadores - Prevenir overflow */

/* === ELIMINADO: .framer--carousel no utilizado ===
   (antiguamente reset para JS nativo carousel)
=== */

.sub-faq-content {
  opacity: 0;
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
}

.sub-faq-content.sub-faq-open {
  opacity: 1;
  max-height: 500px;
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

.sub-faq-content.sub-faq-closed {
  opacity: 0;
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
}

.faq-content p,
.sub-faq-content p {
  margin: 0;
}

/* === ELIMINADO: .framer-logo no utilizado === */

.hero-section-gracias {
  background-image: url("./img/fondovioleta.webp");
  background-size: cover;
  /*img anterior background-image: url('https://framerusercontent.com/images/sxzz9LLQXOlkRCFmzHDZgjLwY.jpg'); */
  background-position: center 70%;
}
@media (max-width: 767px) {
  .hero-section-gracias {
    background-position: 45% top; /* mueve la imagen hacia la derecha */
    min-height: 130vh;
    max-height: 135vh;
    z-index: 1;
  } }

/* Hero section ocupa toda la pantalla en desktop */
@media (min-width: 768px) {
  .hero-section-gracias {
    height: 106vh;
    min-height: 1007vh;
    background-position: center 1%;
  }
}


.hero-section {
  background-image: url("./img/pareja2.webp");
  background-size: cover;
  /*img anterior background-image: url('https://framerusercontent.com/images/sxzz9LLQXOlkRCFmzHDZgjLwY.jpg'); */
  background-position: center 70%;
}

/* Hero section ocupa toda la pantalla en desktop */
@media (min-width: 768px) {
  .hero-section {
    height: 106vh;
    min-height: 1007vh;
    background-position: center 1%;
  }
}


/*  GSAP del hero */
#hero-section {
  opacity: 0;
  transform: scale(1.1);
}

#hero-title,
#hero-subtitle,
#hero-button {
  opacity: 0;
  transform: translateY(50px);
}

#hero-overlay {
  opacity: 0;
}

@media (max-width: 767px) {
  .hero-section {
    /* Mostrar la imagen completa sin zoom en móviles */
    background-position: center top !important; /* mostrar imagen completa desde lejos */
    background-size: 160% !important; /* mostrar toda la imagen sin recortar */
    background-repeat: no-repeat !important;
    /* No reservar altura extra: dejar que la imagen marque la altura real */
    min-height: 0 !important;
    max-height: none !important; /* Eliminar restricción de altura máxima */
    height: auto !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important; /* Eliminar espacio extra entre imagen y formulario */
    z-index: 1;
  }

  /* Ocultar título y span en móviles */
  #hero-title {
    display: none !important;
  }

  #hero-title span {
    display: none !important;
  }

  /* Formulario: se desplaza para solapar visualmente la sección #about en móviles */
  #hero-section {
    overflow: visible !important; /* permitir que el form sobresalga del hero */
  }
  #hero-form-wrapper {
    position: relative !important;
    z-index: 99999 !important;
    pointer-events: auto !important;
    margin-top: 20vh !important;
    padding-top: 0 !important;
    margin-bottom: 0 !important;
    transform: translateY(80px) !important; /* desplaza el form 80px hacia abajo para solapar #about */
  }

  /* Interno del formulario: permitir overflow visible (no recortar) */
  #hero-form-wrapper > div {
    position: relative !important;
    z-index: 99999 !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3) !important;
    overflow: visible !important;
    max-height: none !important;
  }

  /* Asegurar que todas las secciones siguientes tengan z-index menor y no recorten */
  section:not(.hero-section) {
    position: relative;
    margin-top: 2rem !important;
    overflow: visible !important;
  }
  
  /* Fullscreen panel (blanco) en móviles: al agregar la clase .mobile-fullscreen
     el panel ocupa 100vw x 100vh y se fija sobre el contenido. */
  #content-panel-white,
  #content-panel {
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    max-width: 100vw !important;
    transform: translateY(100%) !important; /* start hidden below viewport */
    transition: transform 0.45s cubic-bezier(.22,.9,.12,1) !important;
    z-index: 60 !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    box-shadow: none !important;
    background: white !important;
  }

  /* Cuando está abierto en mobile, lo mostramos desde abajo hacia arriba */
  #content-panel-white.mobile-fullscreen,
  #content-panel.mobile-fullscreen {
    transform: translateY(0) !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
  }
}
.text-primary {
  color: var(--color-primary);
}
.bg-primary {
  background-color: var(--color-primary);
}
.text-dark {
  color: var(--color-dark);
}

/* Checkbox WhatsApp: usar color primario en controles de formulario */
#whatsapp-check {
  accent-color: var(--color-primary);
  border-color: rgba(7,104,47,0.15);
}

#whatsapp-check:focus {
  outline: none;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--color-primary) 12%, transparent);
}

/* Estilos para el navbar en desktop */
@media (min-width: 768px) {
  /* Posicionar los enlaces del nav más a la derecha */
  header nav > div {
    margin-left: auto;
    margin-right: 4rem;
  }

  /* Fondo transparente igual al formulario cuando está en hero-section */
  #main-header:not(.scrolled) {
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
  }

  /* Mantener enlaces en blanco cuando está en hero */
  #main-header:not(.scrolled) nav div a {
    color: white !important;
  }

  #main-header:not(.scrolled) nav div a:hover {
    color: rgba(255, 255, 255, 0.8) !important;
  }

  /* Fondo blanco con glassmorfismo cuando hace scroll (fuera del hero) */
  #main-header.scrolled {
    background: rgba(255, 255, 255, 0.4) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  }

  /* Enlaces en color principal (verde) cuando está fuera del hero */
  #main-header.scrolled nav div a {
    color: var(--color-primary) !important;
  }

  #main-header.scrolled nav div a:hover {
    color: color-mix(in srgb, var(--color-primary) 80%, black 20%) !important;
  }
}

/* Forzar color primario para textos dentro del header cuando está scrolleado */
#main-header.scrolled :is(a, span, p, h1, h2, h3, h4, h5, label) {
  color: var(--color-primary) !important;
}

/* Estilos para el botón CTA cuando el header está scrolleado */
#main-header.scrolled #navbar-button {
  background-color: var(--color-primary-dark) !important;
  color: #ffffff !important;
  box-shadow: 0 6px 18px rgba(6,78,35,0.18) !important;
}

/* Efecto glassmorfismo para navbar en móviles cuando hace scroll */
@media (max-width: 767px) {
  #main-header.scrolled {
    background: rgba(128, 128, 128, 0.15) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  }
}

/* Bento cards: gradient backgrounds (original styles preserved below) */
/* Use images for bento card backgrounds with a subtle overlay for legibility */
.bento-card-1 {
  background: linear-gradient(135deg, #a04abb 0%, #b475c7 100%);
  border: 5px solid #a360b8;
}
.bento-card-2 {
  background: linear-gradient(135deg, #dc84ba 0%, #f0a8d6 100%);
  border: 5px solid #e8a5d1;
}
.bento-card-3 {
  background: linear-gradient(135deg, #b1a1e3 0%, #d4c9f2 100%);
  border: 5px solid #cbbff0;
}
.bento-card-4 {
  background: linear-gradient(135deg, #98b1fa 0%, #c3d7fc 100%);
  border: 5px solid #b8cffb;
}

/* === ELIMINADO: .star-filled no utilizado === */

/* Sección de imagen a pantalla completa con efecto pin */
#fullscreen-image {
  position: relative;
}

/* ===================================
           Carrusel de Prestadores (GSAP animado)
           =================================== */
/* === NOTA: .prestador-slide se usa en script.js para animación GSAP === */
.prestador-slide {
  width: 16rem !important; /* 256px en mobile */
  height: 12rem !important; /* 192px en mobile */
  transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  border: none !important;
  padding: 1.5rem !important;
}

/* Tamaño más grande en desktop */
@media (min-width: 768px) {
  .prestador-slide {
    width: 20rem !important; /* 320px en desktop */
    height: 14rem !important; /* 224px en desktop */
  }
}

.prestador-slide:hover {
  transform: scale(1.08) translateY(-6px);
}

/* === ELIMINADO: referencias duplicadas o no usadas de prestadores === */

/* Estilos para el Hero Title */
#hero-title {
  line-height: 85%;
}

/* Estilos para el acordeón FAQ */

.faq-content {
  overflow: hidden;
  transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.4s ease-in-out, padding 0.4s ease-in-out;
  opacity: 0;
  padding-top: 0;
  padding-bottom: 0;
}

.faq-content.faq-open {
  max-height: 1000px !important;
  opacity: 1;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

.faq-content.faq-closed {
  max-height: 0 !important;
  opacity: 0;
  padding-top: 0;
  padding-bottom: 0;
}

/* Animaciones suaves para iconos del FAQ */
.faq-toggle svg,
.sub-faq-toggle svg {
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
    color 0.3s ease-in-out;
}

/* Transición suave para los botones del FAQ */
.faq-toggle,
.sub-faq-toggle {
  transition: background-color 0.3s ease-in-out;
}

/* Hacer que las preguntas del FAQ queden en una sola línea */
.faq-toggle,
.sub-faq-toggle {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* En pantallas pequeñas, permitir que se ajuste si es muy largo */
@media (max-width: 640px) {
  .faq-toggle,
  .sub-faq-toggle {
    white-space: normal;
    line-height: 1.3;
  }
}

/* Mobile: make FAQ take full width and reduce gaps between accordion items */
@media (max-width: 767px) {
  /* Remove extra horizontal padding from the FAQ wrapper */
  #faq-accordion {
    margin-left: 0 !important;
    margin-right: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    text-align: left;
    align-items: flex-start;
  }

  /* Make each FAQ block edge-to-edge and reduce vertical spacing */
  #faq-accordion > div,
  #faq-accordion .bg-white.p-6.rounded-2xl {
    border-radius: 14px !important;
    text-align: left;
    align-items: flex-start;
  }

  /* Reduce space between FAQ items */
  #faq-accordion .bg-white.p-6.rounded-2xl + .bg-white.p-6.rounded-2xl {
    margin-top: 0.5rem !important;
    text-align: left;
    align-items: flex-start;
  }

  /* Reduce top/bottom padding inside accordion content */
  #faq-accordion .faq-content,
  #faq-accordion .sub-faq-content {
    padding-bottom: 0.5rem !important;
    text-align: left;
    align-items: flex-start;
  }
}

/* Ensure FAQ background image sits flush against the wrapper (no floating/margin bottom) */
.faq-wrapper {
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
}

/* Make the inner image container fill and not leave gaps (fix 'floating' image) */
.faq-bg-image,
.faq-bg-image img {
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  object-fit: cover;
}

/* For larger screens, ensure no gap below the image */
@media (min-width: 1024px) {
  .faq-wrapper {
    margin-bottom: 0 !important;
  }
}

/* Estilos para flechas del carrusel de reseñas en móviles */
@media (max-width: 768px) {
  .swiper-nav-custom {
    top: auto !important;
    bottom: -60px !important;
    transform: translateY(0) !important;
  }

  .swiper-button-next.swiper-nav-custom {
    right: 35% !important;
  }

  .swiper-button-prev.swiper-nav-custom {
    left: 35% !important;
  }
}

/* Estilos para el botón de chat flotante */
#chat-toggle {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

#chat-toggle.rotate-90 {
  transform: rotate(90deg);
}

#chat-panel {
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

/* Animación de pulso para el botón de chat */
@keyframes pulse-chat {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(123, 48, 146, 0.7);
  }
  50% {
    box-shadow: 0 0 0 10px rgba(123, 48, 146, 0);
  }
}

#chat-toggle {
  animation: pulse-chat 2s infinite;
}

#chat-toggle:hover {
  animation: none;
}

/* ============================================
   Estilos mejorados para el formulario
   ============================================ */

/* Inputs de texto, email, tel, number */
form input[type="text"],
form input[type="email"],
form input[type="tel"],
form input[type="number"] {
  background: rgba(255, 255, 255, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.3);
  transition: all 0.3s ease;
  font-weight: 500;
  letter-spacing: 0.01em;
}

form input[type="text"]:focus,
form input[type="email"]:focus,
form input[type="tel"]:focus,
form input[type="number"]:focus {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 1);
  outline: none;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 1);
}

form input[type="text"]::placeholder,
form input[type="email"]::placeholder,
form input[type="tel"]::placeholder,
form input[type="number"]::placeholder {
  color: rgba(255, 255, 255, 0.9);
  font-weight: 500;
}

/* Estilos para selects - igual que inputs */
form select {
  background: rgba(255, 255, 255, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.3);
  transition: all 0.3s ease;
  font-weight: 500;
  letter-spacing: 0.01em;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23ffffff'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 1.25em;
  padding-right: 2.5rem;
}

form select:focus {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 1);
  outline: none;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 1);
}

/* Estilo para options del select - solo cuando el dropdown está abierto */
select option {
  color: #111111 !important;
  background-color: white !important;
  padding: 0.75rem;
}

/* Color de texto para inputs y selects - blanco */
form input,
form select {
  color: white !important;
}

/* Botón de submit mejorado */
form button[type="submit"] {
  background: linear-gradient(135deg, #07682f 0%, #9d4abb 100%);
  box-shadow: 0 4px 15px rgba(123, 48, 146, 0.4);
  transition: all 0.3s ease;
  font-weight: 700;
  letter-spacing: 0.02em;
}

form button[type="submit"]:hover {
  background: linear-gradient(135deg, #5a1f6e 0%, #07682f 100%);
  box-shadow: 0 6px 20px rgba(123, 48, 146, 0.5);
  transform: translateY(-2px);
}

form button[type="submit"]:active {
  transform: translateY(0);
  box-shadow: 0 2px 10px rgba(123, 48, 146, 0.3);
}

/* === ELIMINADO: @keyframes input-glow no utilizado === */

/* Estado hover en inputs - COMENTADO PARA MANTENER UNIFORMIDAD
form input:hover,
form select:hover {
    border-color: #b794c4;
}
*/

/* Layout de formulario: en desktop mostramos los campos en 2 columnas */
@media (min-width: 768px) {
  /* Contenedor del formulario con z-index alto y posicionamiento relativo */
  #hero-form-wrapper {
    position: relative;
    z-index: 9999;
  }

  /* Wrapper interno con scroll si el contenido crece mucho */
  #hero-form-wrapper > div {
    position: relative;
    z-index: 9999;
    max-height: 90vh;
    overflow-y: auto;
    overflow-x: hidden;
  }
  
  /* Ocultar scrollbar en desktop pero mantener funcionalidad de scroll */
  #hero-form-wrapper > div::-webkit-scrollbar {
    width: 0px;
    background: transparent;
  }
  
  #hero-form-wrapper > div {
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE y Edge */
  }

  #leadForm {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem; /* reducido para disminuir margen inferior */
    column-gap: 0.75rem; /* espaciado horizontal entre columnas */
    align-items: start;
  }

  /* El wrapper que contiene nombre y apellido debe dejar pasar sus hijos al grid */
  #leadForm .flex.space-x-3 {
    display: contents; /* los inputs se convierten en items del grid */
  }
  
  /* Eliminar el margen izquierdo del apellido que viene del space-x-3 */
  #leadForm .flex.space-x-3 > *:not(:first-child) {
    margin-left: 0 !important;
  }

/* Mobile overrides: mejorar legibilidad y armonía de colores dentro del formulario */
@media (max-width: 767px) {
  /* Forzar texto oscuro dentro de la tarjeta de formulario (fondo blanco) */
  #hero-form-wrapper > div {
    color: var(--color-dark) !important;
    /* Fondo igual al de la sección FAQ para distinguirlo del blanco */
    background: #e9ebf0 !important;
    border: 1px solid rgba(6,78,35,0.10) !important;
  }

  /* Título principal: más bold y contraste en mobile */
  #hero-form-wrapper h1,
  #hero-form-wrapper h3 {
    color: var(--color-dark) !important;
    font-weight: 800 !important;
    font-size: 1.25rem !important;
    line-height: 1.05 !important;
    margin-bottom: 0.25rem !important;
  }

  /* Subtexto y demás: sin bold y color secundario */
  #hero-form-wrapper p,
  #hero-form-wrapper .text-sm {
    color: var(--color-text-secondary) !important;
    font-weight: 400 !important;
  }

  /* Inputs, selects y textareas: fondo claro, texto oscuro, bordes suaves */
  #hero-form-wrapper input,
  #hero-form-wrapper select,
  #hero-form-wrapper textarea {
    background: #fbfdfe !important;
    color: var(--color-dark) !important;
    border: 1px solid rgba(6,78,35,0.08) !important;
    font-weight: 500 !important;
    box-shadow: none !important;
  }

  /* Placeholder menos contrastado y sin bold */
  #hero-form-wrapper input::placeholder,
  #hero-form-wrapper select::placeholder,
  #hero-form-wrapper textarea::placeholder {
    color: rgba(17,17,17,0.45) !important;
    font-weight: 400 !important;
  }

  /* Botón "Agregar familiar": texto oscuro y borde para legibilidad sobre fondo blanco */
  #btn_abrir_modal_familiar {
    background: transparent !important;
    color: var(--color-dark) !important;
    border: 1px solid rgba(17,17,17,0.06) !important;
    font-weight: 600 !important;
  }

  /* Asegurar que el texto interno del botón también herede el color oscuro */
  #btn_abrir_modal_familiar span {
    color: var(--color-dark) !important;
  }

  /* Botón de envío: mantener contraste con color primario */
  #hero-form-wrapper button[type="submit"],
  #hero-form-wrapper #btn-desktop {
    background: var(--color-primary) !important;
    color: #ffffff !important;
    border: none !important;
  }

  /* Chevron del select en oscuro para que se vea sobre fondo claro */
  #hero-form-wrapper form select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23000000'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E") !important;
  }
}
  /* Fuerza a inputs/selects a ocupar el 100% de su columna en el grid */
  #leadForm input,
  #leadForm select,
  #leadForm textarea {
    width: 100% !important;
    box-sizing: border-box;
  }

  /* Sobrescribir clases de ancho tipo Tailwind que puedan interferir */
  #leadForm input.w-1\/2 {
    width: 100% !important;
  }

  /* Elementos que deben ocupar todo el ancho (span 2 columnas) */
  #leadForm #sueldo_container,
  #leadForm #categoria_container,
  #leadForm #localidad_container,
  #leadForm #familiar_form,
  #leadForm #familiares_agregados,
  #leadForm #agregar_familiar_container,
  #leadForm button[type="submit"],
  #leadForm button[type="button"],
  #leadForm #btn-desktop,
  #leadForm #btn_cotizar {
    grid-column: 1 / -1;
  }

  /* Asegurar que el select localidad ocupe todo el ancho (no tiene input a la derecha) */
  #leadForm #localidad {
    grid-column: 1 / -1;
  }

  /* Asegurar que el familiar_form se muestre correctamente en fixed/overlay si se usara */
  #leadForm #familiar_form {
    max-width: 100%;
  }
}

/* En dispositivos móviles, el texto de los familiares agregados debe ser negro */
@media (max-width: 767px) {
  #familiares_agregados h6 {
      font-weight: bold !important;
    font-size: large;
  }
  
  #lista_familiares,
  #lista_familiares li,
  #lista_familiares li span {
    font-weight: bold !important;
    font-size: large;
  }
}

/* En móvil, usar color sólido primario para botones de submit (evitar gradientes) */
@media (max-width: 767px) {
  form button[type="submit"],
  #leadForm button[type="submit"] {
    background: var(--color-primary) !important;
    background-image: none !important;
    box-shadow: 0 4px 10px rgba(7,104,47,0.18) !important;
    color: white !important;
  }

  form button[type="submit"]:hover,
  #leadForm button[type="submit"]:hover {
    background: var(--color-primary-dark) !important;
    box-shadow: 0 6px 18px rgba(7,104,47,0.2) !important;
  }
}

/* Mobile: apariencia final del formulario (panel claro, inputs pill, sombras sutiles) */
@media (max-width: 767px) {
  /* Panel del formulario: tono más oscuro para mobile para despegar del fondo blanco */
  #hero-form-wrapper > div {
    background: #e9ebf0 !important;
    border: 1px solid rgba(6,78,35,0.10) !important;
    box-shadow: 0 8px 24px rgba(6,78,35,0.06) !important;
    padding: 1.25rem !important;
  }

  /* Encabezado y subtítulo: texto oscuro y peso adecuado (aplica a h1 del formulario también) */
  #hero-form-wrapper h1,
  #hero-form-wrapper h3 {
    color: var(--color-dark) !important;
    font-weight: 800 !important;
    font-size: 1.25rem !important;
    margin-bottom: 0.25rem !important;
  }

  #hero-form-wrapper p.text-sm,
  #hero-form-wrapper .text-sm {
    color: var(--color-text-secondary) !important;
    font-weight: 400 !important;
  }

  /* Inputs: fondo blanco, borde y radio tipo pill, sombra sutil */
  #hero-form-wrapper input,
  #hero-form-wrapper select,
  #hero-form-wrapper textarea {
    background: #ffffff !important;
    color: var(--color-dark) !important;
    font-weight: 600 !important;
    font-size: 16px !important;
    border: 1px solid rgba(6,78,35,0.06) !important;
    box-shadow: 0 6px 18px rgba(6,78,35,0.06) !important;
    padding-top: 0.9rem !important;
    padding-bottom: 0.9rem !important;
    padding-left: 1.1rem !important;
    padding-right: 1.1rem !important;
    height: auto !important;
  }

  /* Alinear y dar altura consistente a inputs en la misma fila */
  #hero-form-wrapper .flex.space-x-3 > input {
    height: 52px !important;
  }

  /* Placeholders más suaves */
  #hero-form-wrapper input::placeholder,
  #hero-form-wrapper select::placeholder,
  #hero-form-wrapper textarea::placeholder {
    color: rgba(17,17,17,0.65) !important;
    font-weight: 600 !important;
  }

  /* Compatibilidad para prefijos y select options */
  #hero-form-wrapper input::-webkit-input-placeholder,
  #hero-form-wrapper textarea::-webkit-input-placeholder {
    color: rgba(17,17,17,0.65) !important;
    font-weight: 600 !important;
  }

  #hero-form-wrapper select option {
    font-weight: 600 !important;
    color: var(--color-dark) !important;
  }

  /* Focus: outline sutil con color primario */
  #hero-form-wrapper input:focus,
  #hero-form-wrapper select:focus,
  #hero-form-wrapper textarea:focus {
    box-shadow: 0 0 0 3px rgba(7,104,47,0.08) !important;
    border-color: var(--color-primary) !important;
    outline: none !important;
  }

  /* Botón + Agregar familiar: pill claro, más visible en mobile */
  #btn_abrir_modal_familiar {
    background: #eef6ee !important;
    color: var(--color-dark) !important;
    padding-top: 0.95rem !important;
    padding-bottom: 0.95rem !important;
    padding-left: 1.25rem !important;
    padding-right: 1.25rem !important;
    border: 1.5px solid rgba(6,78,35,0.08) !important;
    box-shadow: 0 8px 20px rgba(6,78,35,0.08) !important;
    text-align: left !important;
    font-weight: 700 !important;
    font-size: 15px !important;
    letter-spacing: 0.01em !important;
  }

  /* Botón Cotizar: pill destacado */
  #hero-form-wrapper button[type="submit"],
  #hero-form-wrapper #btn-desktop {
    border-radius: 9999px !important;
    padding-top: 0.95rem !important;
    padding-bottom: 0.95rem !important;
    font-weight: 700 !important;
    box-shadow: 0 8px 24px rgba(6,78,35,0.18) !important;
    border: none !important;
  }
}

/* ==========================================
   ESTILOS PARA CARRUSEL CON EFECTO FLIP
   ========================================== */

/* Contenedor de flip con perspectiva 3D */
.card-flip-container,
.bento-flip-container {
  transform-style: preserve-3d;
  transition: transform 0.6s ease-in-out;
}

/* Caras de la card (frente y reverso) */
.card-face {
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transform-style: preserve-3d;
}

/* Frente de la card */
.card-front {
  transform: rotateY(0deg);
}

/* Reverso de la card (volteado 180 grados) */
.card-back {
  transform: rotateY(180deg);
}

/* Cuando la card está volteada */
.card-flip-container.flipped {
  transform: rotateY(180deg);
}

/* Asegurar transiciones suaves */
.carousel-stack-card {
  transition: all 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Scroll personalizado para el contenido del reverso */
.card-back .overflow-y-auto {
  scrollbar-width: thin;
  scrollbar-color: rgba(123, 48, 146, 0.3) transparent;
}

.card-back .overflow-y-auto::-webkit-scrollbar {
  width: 6px;
}

.card-back .overflow-y-auto::-webkit-scrollbar-track {
  background: transparent;
}

.card-back .overflow-y-auto::-webkit-scrollbar-thumb {
  background-color: rgba(123, 48, 146, 0.3);
  border-radius: 10px;
}

.card-back .overflow-y-auto::-webkit-scrollbar-thumb:hover {
  background-color: rgba(123, 48, 146, 0.5);
}

/* Animación del botón flip */
.flip-btn,
.flip-btn-back,
.flip-btn-bento,
.flip-btn-back-bento {
  transition: all 0.3s ease;
}

.flip-btn:hover,
.flip-btn-back:hover,
.flip-btn-bento:hover,
.flip-btn-back-bento:hover {
  transform: scale(1.1);
}

.flip-btn:active,
.flip-btn-back:active,
.flip-btn-bento:active,
.flip-btn-back-bento:active {
  transform: scale(0.95);
}

/* Efecto de sombra mejorado para cards más grandes */
.carousel-stack-card .shadow-2xl {
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.carousel-stack-card .shadow-xl {
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1),
    0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.carousel-stack-card .shadow-lg {
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1),
    0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Media query para dispositivos móviles */
@media (max-width: 768px) {
  .card-flip-container {
    height: 550px !important;
  }

  .card-back {
    padding: 1.5rem !important;
  }

  .card-back h3 {
    font-size: 1.5rem !important;
  }
}

/* ==========================================
   ESTILOS PARA MODAL DE FAMILIAR (MÓVIL)
   ========================================== */

/* Overlay del modal */
.modal-familiar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-familiar-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

/* Contenido del modal: estilo coherente con la landing (fondo blanco, header primario) */
.modal-familiar-content {
  background: #ffffff;
  width: 100%;
  max-width: 450px;
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(7, 104, 47, 0.12);
  border: 1px solid rgba(7, 104, 47, 0.08);
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  transform: translateY(6px);
  opacity: 0;
  transition: transform 0.26s ease, opacity 0.26s ease;
}

.modal-familiar-overlay.active .modal-familiar-content {
  transform: translateY(0);
  opacity: 1;
}

/* Header del modal */
.modal-familiar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 1.25rem;
  border-radius: 20px 20px 0 0;
  background: linear-gradient(135deg, #07682f 0%, #1aaf57 100%);
}

.modal-familiar-header h3 {
  margin: 0;
  color: #ffffff;
  font-weight: 800;
  font-size: 1.25rem;
}

.modal-familiar-header button {
  color: rgba(255, 255, 255, 0.95);
  font-size: 1.6rem;
  line-height: 1;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: color 0.2s ease;
  padding: 0.15rem;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-familiar-header button:hover {
  color: #e6fff0;
}

/* Body del modal con scroll */
.modal-familiar-body {
  padding: 1.25rem 1.5rem;
  overflow-y: auto;
  flex: 1;
  -webkit-overflow-scrolling: touch;
  color: #0f1720;
}

.modal-familiar-body::-webkit-scrollbar {
  width: 6px;
}

.modal-familiar-body::-webkit-scrollbar-track {
  background: #f3f6f4;
  border-radius: 10px;
}

.modal-familiar-body::-webkit-scrollbar-thumb {
  background-color: rgba(7, 104, 47, 0.16);
  border-radius: 10px;
}

.modal-familiar-body::-webkit-scrollbar-thumb:hover {
  background-color: rgba(7, 104, 47, 0.24);
}

/* Footer del modal */
.modal-familiar-footer {
  display: flex;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-top: 1px solid rgba(15, 23, 32, 0.06);
  background: transparent;
}

/* Inputs del modal con estilo glassmorfismo igual al formulario */
.modal-familiar-body input,
.modal-familiar-body select {
  color: #0f1720 !important;
  background: #ffffff !important;
  border: 1px solid rgba(15, 23, 32, 0.08) !important;
  transition: all 0.18s ease !important;
  font-weight: 600 !important;
  letter-spacing: 0.01em !important;
  padding: 0.9rem 0.95rem !important;
  border-radius: 12px !important;
}

.modal-familiar-body input:focus,
.modal-familiar-body select:focus {
  background: #ffffff !important;
  border-color: #07682f !important;
  outline: none !important;
  box-shadow: 0 4px 18px rgba(7, 104, 47, 0.08) !important;
}

.modal-familiar-body input::placeholder {
  color: rgba(15, 23, 32, 0.45) !important;
  font-weight: 500 !important;
}

.modal-familiar-body select {
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23ffffff'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 1rem center !important;
  background-size: 1.2em !important;
  padding-right: 2.4rem !important;
}

/* Botones del modal con estilos del formulario */
.modal-familiar-footer button {
  flex: 1;
  font-weight: 700;
  letter-spacing: 0.02em;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  padding: 0.9rem 1rem;
  border-radius: 10px;
}

/* Botón secundario: blanco tipo 'pill' con texto en color primario (ej. "Cotizar") */
.modal-familiar-footer button:first-child {
  background: #ffffff;
  color: var(--color-primary);
  border: 1px solid rgba(7,104,47,0.08);
  box-shadow: 0 6px 22px rgba(7,104,47,0.06);
  border-radius: 9999px; /* pill */
  padding: 0.9rem 1.25rem;
  font-weight: 700;
}

.modal-familiar-footer button:first-child:hover {
  background: #ffffff;
  filter: brightness(0.98);
}

/* Botón principal: fondo primario y texto blanco */
.modal-familiar-footer button:last-child {
  background: var(--color-primary);
  color: #ffffff;
  box-shadow: 0 8px 24px rgba(7,104,47,0.16);
  border-radius: 9999px; /* pill */
  padding: 0.9rem 1.25rem;
  font-weight: 800;
  border: none;
}

.modal-familiar-footer button:last-child:hover {
  background: color-mix(in srgb, var(--color-primary) 85%, black 15%);
  transform: translateY(-2px);
}

.modal-familiar-footer button:last-child:active {
  transform: translateY(0);
  box-shadow: 0 4px 12px rgba(7,104,47,0.12);
}

/* En móvil mantener el botón principal con color sólido y texto blanco */
@media (max-width: 767px) {
  .modal-familiar-footer button:first-child {
    background: #ffffff;
    color: var(--color-primary);
    box-shadow: 0 4px 12px rgba(7,104,47,0.06);
  }

  .modal-familiar-footer button:last-child {
    background: var(--color-primary) !important;
    color: #ffffff !important;
    box-shadow: 0 8px 20px rgba(7,104,47,0.18) !important;
  }
}

/* ==========================================
   ESTILOS PARA NOTIFICACIÓN TOAST
   ========================================== */

/* Contenedor de notificaciones toast */
.toast-container {
  position: fixed;
  top: 2rem;
  right: 2rem;
  z-index: 9999999;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  pointer-events: none;
}

/* Notificación toast individual */
.toast {
  background: linear-gradient(135deg, #07682f 0%, #9d4abb 100%);
  color: white;
  padding: 1rem 1.5rem;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(123, 48, 146, 0.4);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 300px;
  max-width: 400px;
  opacity: 0;
  transform: translateX(400px);
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  pointer-events: auto;
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.toast.show {
  opacity: 1;
  transform: translateX(0);
}

.toast.hide {
  opacity: 0;
  transform: translateX(400px);
}

/* Icono del toast */
.toast-icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Contenido del toast */
.toast-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.toast-title {
  font-weight: 700;
  font-size: 0.95rem;
}

.toast-message {
  font-size: 0.85rem;
  opacity: 0.9;
}

/* Botón de cerrar toast */
.toast-close {
  flex-shrink: 0;
  background: transparent;
  border: none;
  color: white;
  cursor: pointer;
  padding: 0;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.7;
  transition: opacity 0.3s ease;
}

.toast-close:hover {
  opacity: 1;
}

/* Responsive para móviles */
@media (max-width: 640px) {
  .toast-container {
    top: 1rem;
    right: 1rem;
    left: 1rem;
  }

  .toast {
    min-width: auto;
    max-width: 100%;
  }
}

/* Botones del carrusel en la sección 'tecnologia' (posicionados junto al contenedor) */
.carousel-stack-container .carousel-nav-left,
.carousel-stack-container .carousel-nav-right {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: center;
  background: white;
  border-radius: 9999px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}
.carousel-stack-container .carousel-nav-left {
  left: -56px;
}
.carousel-stack-container .carousel-nav-right {
  right: -56px;
}
@media (max-width: 767px) {
  /* En móviles los botones quedan dentro del viewport, pegados al borde del contenedor */
  .carousel-stack-container .carousel-nav-left {
    left: 8px;
  }
  .carousel-stack-container .carousel-nav-right {
    right: 8px;
  }
}

/* Mobile: aumentar espacio entre hero y about */
@media (max-width: 767px) {
  /* Aumenta el margen superior de la sección #about para separar del hero en móviles */
  #about {
    margin-top: 6rem !important;
  }
}

/* Hover del plan Taylored (reemplaza onmouseenter/onmouseleave inline) */
.price-card[data-featured="true"]:hover {
  border-color: #07682f;
}

/* Reducir la oscuridad del overlay en móviles para que el formulario sea más legible */
@media (max-width: 767px) {
  #hero-overlay {
    background-color: rgba(0, 0, 0, 0.04) !important;
  }
}

/* Mobile form styles are defined above to produce the final look (panel claro, inputs pill, botones pill) */

/* Desktop: marcar visualmente el fin del formulario flotante */
@media (min-width: 768px) {
  #hero-form-wrapper > div {
    position: relative;
    z-index: 5;
    /* aumentar ligeramente la sombra para separarlo del fondo */
    box-shadow: 0 28px 70px rgba(6,78,35,0.16) !important;
  }

  /* Pseudo-elemento que crea una 'base' visible bajo la tarjeta del formulario */
  #hero-form-wrapper > div::after {
    content: "";
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: -18px;
    width: 88%;
    height: 36px;
    background: linear-gradient(180deg, rgba(255,255,255,0), rgba(255,255,255,0.06));
    border-radius: 16px;
    box-shadow: 0 18px 40px rgba(6,78,35,0.12);
    pointer-events: none;
  }

  /* Línea fina en el borde inferior para enfatizar el final del formulario */
  #hero-form-wrapper > div::before {
    content: "";
    position: absolute;
    left: 6%;
    right: 6%;
    bottom: -6px;
    height: 2px;
    background: linear-gradient(90deg, rgba(7,104,47,0.0), var(--color-primary), rgba(7,104,47,0.0));
    border-radius: 2px;
    pointer-events: none;
  }
}

/* Mobile: hacer la primera línea del h1 del formulario más grande y en mayúsculas */
#hero-form-wrapper > div h1 span:first-child {
  font-size: 1.4rem !important;
  line-height: 1 !important;
  font-weight: 800 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.03em !important;
  display: block;
}

/* Mobile: segunda línea más pequeña que la primera */
#hero-form-wrapper > div h1 span:nth-child(2) {
  font-size: 1rem !important;
  line-height: 1.15 !important;
  font-weight: 600 !important;
  text-transform: none !important;
  margin-top: 0.12rem !important;
  display: block;
}

/* Mobile: estandarizar inputs/select/textarea (misma tonalidad y apariencia) */
@media (max-width: 767px) {
  form input[type="text"],
  form input[type="email"],
  form input[type="tel"],
  form input[type="number"],
  form select,
  form textarea,
  #hero-form-wrapper input,
  #hero-form-wrapper select,
  #hero-form-wrapper textarea {
    background: #ffffff !important;
    color: #0f1720 !important;
    border: 1px solid rgba(15,23,32,0.08) !important;
    border-radius: 12px !important;
    padding: 0.85rem 0.95rem !important;
    font-size: 0.95rem !important;
    box-shadow: 0 6px 16px rgba(7,104,47,0.06) !important;
    -webkit-appearance: none !important;
    appearance: none !important;
    height: auto !important;
  }

  /* Placeholder */
  form input::placeholder,
  form select::placeholder,
  form textarea::placeholder {
    color: rgba(15,23,32,0.45) !important;
    font-weight: 500 !important;
  }

  /* Flecha del select en color oscuro y con padding a la derecha */
  form select,
  #hero-form-wrapper select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230f1720' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 1rem center !important;
    background-size: 1.2em !important;
    padding-right: 2.4rem !important;
  }

  /* Asegurar contraste dentro de la tarjeta del formulario (hero) */
  #hero-form-wrapper > div input,
  #hero-form-wrapper > div select,
  #hero-form-wrapper > div textarea {
    background: #ffffff !important;
    color: #0f1720 !important;
  }

  /* Mejora táctil */
  form input, form select, form textarea { -webkit-tap-highlight-color: rgba(0,0,0,0); }
}
