/* Archivo CSS Básico (style.css)
  Utilizado para estilos que complementan Tailwind CSS y las variables de color.
*/
:root {
  --color-primary: #7b3092; /* Rosa principal (Pink) */
  --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: "Manrope", 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%;
}

/* Estilos para tarjetas de prestadores - Tamaño uniforme y animación moderna */
.provider-slide {
  width: 16rem !important; /* w-64 = 256px */
  height: 10rem !important; /* h-40 = 160px */
  transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

.provider-slide:hover {
  transform: scale(1.12) translateY(-10px) !important;
  box-shadow: 0 30px 60px -15px rgba(123, 48, 146, 0.3) !important;
}

/* 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/parejavioleta.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 { 
    background-position: 45% top; /* mueve la imagen hacia la derecha */
    min-height: auto !important; /* Permitir que la altura se ajuste al contenido */
    max-height: none !important; /* Eliminar restricción de altura máxima */
    height: auto !important;
    padding-bottom: 2rem !important; /* Espacio al final para que no pise la siguiente sección */
    z-index: 1;
  }

  /* Ocultar título y span en móviles */
  #hero-title {
    display: none !important;
  }

  #hero-title span {
    display: none !important;
  }

  /* Formulario: neutralizar márgenes negativos y asegurar visibilidad en móviles */
  #hero-form-wrapper {
    position: relative !important;
    z-index: 99999 !important;
    pointer-events: auto !important;
    transform: translateZ(0); /* forzar compositor */
    margin-top: 26rem !important; /* Reducir margen superior */
    padding-top: 0 !important; /* Eliminar padding superior excesivo */
    margin-bottom: 0 !important; /* Asegurar que no haya margen inferior */
  }

  /* 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 la siguiente sección no cubra el formulario en móviles */
  #about,
  #about * {
    overflow: visible !important;
    margin-top: 0 !important; /* Eliminar margen superior para evitar espacios */
    padding-top: 3rem !important; /* Usar padding en lugar de margen */
  }

  /* Asegurar que todas las secciones siguientes tengan z-index menor y no recorten */
  section:not(.hero-section) {
    position: relative;
    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);
}

/* 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 negros cuando está fuera del hero */
  #main-header.scrolled nav div a {
    color: #111111 !important;
  }

  #main-header.scrolled nav div a:hover {
    color: #7b3092 !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, #7b3092 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%, #7b3092 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;
  }

  /* 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;
  }
}

/* ==========================================
   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 con estética glassmorfismo del formulario */
.modal-familiar-content {
  background: transparent;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  width: 100%;
  max-width: 450px;
  border-radius: 24px;
  box-shadow: 0 20px 60px rgb(134, 65, 145);
  border: 1px solid rgba(255, 255, 255, 0.2);
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  transform: scale(0.9);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.modal-familiar-overlay.active .modal-familiar-content {
  transform: scale(1);
  opacity: 1;
}

/* Header del modal */
.modal-familiar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 1.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.modal-familiar-header h3 {
  margin: 0;
  color: white;
  font-weight: 800;
  font-size: 1.5rem;
}

.modal-familiar-header button {
  color: rgba(255, 255, 255, 0.8);
  font-size: 2rem;
  line-height: 1;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: color 0.3s ease;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-familiar-header button:hover {
  color: white;
}

/* Body del modal con scroll */
.modal-familiar-body {
  padding: 1.75rem;
  overflow-y: auto;
  flex: 1;
  -webkit-overflow-scrolling: touch;
}

.modal-familiar-body::-webkit-scrollbar {
  width: 6px;
}

.modal-familiar-body::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
}

.modal-familiar-body::-webkit-scrollbar-thumb {
  background-color: rgba(255, 255, 255, 0.3);
  border-radius: 10px;
}

.modal-familiar-body::-webkit-scrollbar-thumb:hover {
  background-color: rgba(255, 255, 255, 0.4);
}

/* Footer del modal */
.modal-familiar-footer {
  display: flex;
  gap: 0.75rem;
  padding: 1.5rem 1.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  background: transparent;
}

/* Inputs del modal con estilo glassmorfismo igual al formulario */
.modal-familiar-body input,
.modal-familiar-body select {
  color: white !important;
  background: rgba(255, 255, 255, 0.2) !important;
  border: 2px solid rgba(255, 255, 255, 0.3) !important;
  transition: all 0.3s ease !important;
  font-weight: 500 !important;
  letter-spacing: 0.01em !important;
}

.modal-familiar-body input:focus,
.modal-familiar-body select:focus {
  background: rgba(255, 255, 255, 0.2) !important;
  border-color: rgba(255, 255, 255, 1) !important;
  outline: none !important;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 1) !important;
}

.modal-familiar-body input::placeholder {
  color: rgba(255, 255, 255, 0.9) !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.25em !important;
  padding-right: 2.5rem !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;
}

.modal-familiar-footer button:first-child {
  background: rgba(255, 255, 255, 0.2);
  color: white;
}

.modal-familiar-footer button:first-child:hover {
  background: rgba(255, 255, 255, 0.3);
}

.modal-familiar-footer button:last-child {
  background: linear-gradient(135deg, #7b3092 0%, #9d4abb 100%);
  box-shadow: 0 4px 15px rgba(123, 48, 146, 0.4);
  color: white;
}

.modal-familiar-footer button:last-child:hover {
  background: linear-gradient(135deg, #5a1f6e 0%, #7b3092 100%);
  box-shadow: 0 6px 20px rgba(123, 48, 146, 0.5);
  transform: translateY(-2px);
}

.modal-familiar-footer button:last-child:active {
  transform: translateY(0);
  box-shadow: 0 2px 10px rgba(123, 48, 146, 0.3);
}

/* ==========================================
   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, #7b3092 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%;
  }
}
