/* ===============================
   ESTRUCTURA GLOBAL DE PÃƒÆ’Ã‚ÂGINA
   - ConfiguraciÃƒÆ’Ã‚Â³n general de body y html
==================================*/
body,
html {
  background-color: var(--color-blanco-puro);
  font-family: var(--fuente-principal);
  padding: 0;
  margin: 0;
  height: 100%;
  overflow-x: hidden;
}

/* =======================================================
   TARJETA BASE — SIN SOMBRAS
======================================================= */

#wp-card {
  position: fixed;
  bottom: 20px;
  right: 0px;

  background: var(--color-secundario);
  color: var(--color-blanco-puro);

  padding: 14px 22px 14px 18px;
  
  /* Solo borde izquierdo redondeado */
  border-radius: var(--radio-base, 6px) 0 0 var(--radio-base, 6px);

  font-size: 15px;
  font-weight: 700;
  font-family: var(--fuente-principal);

  display: flex;
  align-items: center;
  gap: 10px;

  opacity: 0;
  transform: translateX(120%);
  cursor: pointer;
  z-index: 9999;

  transition: background 0.25s ease, border-color 0.25s ease;
}



/* =========================================
   ESTILOS DE LA TARJETA (Ajustes clave)
========================================= */

/* Asegúrate de que el texto tenga opacidad base */
#wp-card-text {
  display: inline-block;
  transition: opacity 0.2s; /* Suaviza cambios menores */
}

/* CLASE PARA LA ANIMACIÓN "POP" (Vital para que no salga doble) */
.wp-card-text-pop {
  animation: textPop 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes textPop {
  0% {
    opacity: 0;
    transform: scale(0.8) translateY(5px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* =========================================
   TU CÓDIGO MEJORADO (Hover y After)
========================================= */

/* Hover elegante */
#wp-card:hover {
  background: var(--color-secundario);
  color: var(--color-blanco-puro);
  border-color: var(--color-secundario);
  cursor: pointer;
}

/* Icono dentro de la tarjeta */
.wp-card-icon {
  font-size: 18px !important;
  line-height: 1 !important;
  flex-shrink: 0;
}

/* EXTENSIÓN DEL FONDO (El arreglo importante está aquí) */
#wp-card::after {
  content: "";
  position: absolute;
  top: 0;
  right: -20px;
  width: 20px;
  height: 100%;
  /* IMPORTANTE: Usamos inherit para que tome el color del padre automáticamente */
  background: inherit; 
  border-radius: 0; 
  box-shadow: none !important;
  z-index: -1; /* Asegura que quede detrás si es necesario */
}

/* Asegura que el after también cambie de color al hacer hover en la tarjeta */
#wp-card:hover::after {
  background: var(--color-secundario); 
}
/* ============================
   AJUSTES SOLO PARA MÓVIL
============================ */
@media (max-width: 768px) {

  #wp-card {
    max-width: 75%;          /* Reduce el ancho total */
    font-size: 14px;         /* Un poco más compacto */
    bottom: 90px;            /* Subir un poco si deseas */
  }

  #wp-card::after {
    width: 12px;             /* Extensión más corta */
    right: -12px;
  }

}


/* =======================================================
   ANIMACIONES
======================================================= */

/* Slide-in desde la derecha */
@keyframes card-slide-in {
  0%   { transform: translateX(120%); opacity: 0; }
  60%  { transform: translateX(-6%); opacity: 1; }
  100% { transform: translateX(0); opacity: 1; }
}
.wp-card-in {
  animation: card-slide-in 0.55s cubic-bezier(.25,.46,.45,.94) forwards;
}

/* Slide-out hacia la derecha */
@keyframes card-slide-out {
  0%   { transform: translateX(0); opacity: 1; }
  100% { transform: translateX(120%); opacity: 0; }
}
.wp-card-out {
  animation: card-slide-out 0.45s ease forwards;
}

/* POP del texto */
@keyframes card-text-pop {
  0%   { transform: scale(0.8); opacity: 0; }
  60%  { transform: scale(1.1); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}


/* ===============================
   OVERLAY PARA MENÃƒÆ’Ã…Â¡ LATERAL OSCURECIDO
   - Se activa con .menu-abierto
==================================*/
#overlaySidebar {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(21, 21, 98, 0.6);
  backdrop-filter: blur(2px);
  z-index: 900;
}

body.menu-abierto #overlaySidebar {
  /* display: block; */
}


/* ===============================
   SWITCHES REUTILIZABLES
   - Usados para activar/desactivar opciones
==================================*/
.fila-switch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-top: 12px;
}

.fila-switch .switch-label {
  font-size: 13px;
  color: var(--color-gris-claro);
  white-space: nowrap;
}

.fila-switch label.switch.compacto {
  width: 34px;
  height: 18px;
  display: inline-block;
  position: relative;
  margin-left: auto;
  margin-top: 10px;
  margin-right: 0;
  align-self: center;
  top: unset !important;
  left: unset !important;
}

.switch-contenedor {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  margin: 10px 0;
}

.switch-label {
  font-size: 13px;
  color: var(--color-gris-claro);
  white-space: nowrap;
}

.switch {
  position: relative;
  display: inline-block;
  width: 38px;
  height: 22px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0;
  right: 0; bottom: 0;
  background-color: #ccc;
  transition: 0.2s;
  border-radius: 34px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.2s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: var(--color-secundario);
}

input:checked + .slider:before {
  transform: translateX(16px);
}

/* ===============================
   SWITCH COMPACTO
   - VersiÃƒÆ’Ã‚Â³n mÃƒÆ’Ã‚Â¡s pequeÃƒÆ’Ã‚Â±a usada en tarjetas
==================================*/
label.switch.compacto .slider {
  width: 34px;
  height: 18px;
  background-color: #ccc;
  border-radius: 20px;
}

label.switch.compacto .slider:before {
  content: "";
  height: 12px;
  width: 12px;
  background-color: white;
  border-radius: 50%;
  position: absolute;
  transition: 0.2s;
}

label.switch.compacto input:checked + .slider {
  background-color: var(--color-primario);
}

label.switch.compacto input:checked + .slider:before {
  transform: translateX(16px);
}

/* ===============================
   ESTRELLAS DE FAVORITOS
   - Estilo visual para favoritos activos e inactivos
==================================*/
.estrella-favorito {
  color: #d9d9e9;
  cursor: pointer;
  transition: color 0.2s ease;
}

.estrella-favorito.favorito-activo {
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  color: var(--color-rating-estrella);
}

/* ===============================
   SPINNER DE CARGA
   - AnimaciÃƒÆ’Ã‚Â³n circular de carga
==================================*/
.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--color-primario);
  border-top: 4px solid transparent;
  border-radius: 50%;
  animation: girar 0.8s linear infinite;
  margin: 0 auto;
}

@keyframes girar {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
/* ===============================
   ALERTAS FLOTANTES (SNACKBARS)
   - Mensajes flotantes de ÃƒÆ’Ã‚Â©xito o error
==================================*/
#snackbar-container {
  position: fixed;
  top: 10px;
  right: 10px;
  z-index: 1000;
}

.snackbar {
  background-color: #4CAF50; /* Verde para ÃƒÆ’Ã‚Â©xito */
  color: white;
  border-radius: 4px;
  padding: 12px;
  margin: 5px;
  font-size: 14px;
  display: none;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
}

.snackbar.error {
  background-color: #f44336; /* Rojo para errores */
}

.snackbar.show {
  display: block;
  opacity: 1;
}


/* ===============================
   POPUPS ESTILO NOVUAGENCIA
   - Overlay, contenedor, header, contenido
==================================*/
.popup-overlay,
#popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(21, 21, 98, 0.65);
  backdrop-filter: blur(3px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 900;
}

.popup-content {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--color-blanco-puro);
  border-radius: var(--radio-bordes);
  padding: 24px 28px;
  z-index: 1000;
  width: 100%;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  font-family: var(--fuente-principal);
  animation: popupBounce 0.3s ease-out;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.15);
  box-sizing: border-box;
}

@keyframes popupBounce {
  0%   { transform: translate(-50%, -52%) scale(0.98); opacity: 0; }
  50%  { transform: translate(-50%, -50%) scale(1.02); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(1); }
}

.popup-inner {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  text-align: center;
}

.popup-header {
  display: flex;
  justify-content: center;
  position: relative;
  width: 100%;
}

.popup-header h2 {
  font-size: 20px;
  font-weight: 700;
  color: var(--color-primario);
  margin: 0 auto;
}

.close-popup {
  position: absolute;
  top: 0;
  right: 0;
  border: none;
  background: transparent;
  font-size: 22px;
  cursor: pointer;
  color: #888;
  transition: color 0.2s ease;
}

.close-popup:hover {
  color: var(--color-secundario);
}

.popup-acciones {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 8px;
}


/* ===============================
   FORMULARIO BASE USADO EN POPUPS
   - Layout vertical moderno
==================================*/
.formulario-base {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 500px;
  margin: 0 auto;
  width: 100%;
}

.formulario-base label {
  font-weight: 500;
  color: var(--color-primario);
  font-size: 14px;
  margin-bottom: 6px;
  transition: all 0.2s ease;
  margin-top: 10px;
}

.formulario-base input[type="text"],
.formulario-base input[type="password"],
.formulario-base select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--color-gris-claro);
  border-radius: var(--radio-bordes);
  margin-bottom: 14px;
  font-size: 14px;
  font-family: var(--fuente-principal);
  box-sizing: border-box;
  position: relative;
  z-index: 1;
}

/* Ajustes internos cuando el formulario estÃƒÆ’Ã‚Â¡ dentro de un popup */
.popup-content .formulario-base {
  width: 100%;
  margin: 0 auto;
}

.popup-content .formulario-base label {
  text-align: left;
  width: 100%;
  pointer-events: auto;
}

.popup-content .formulario-base input,
.popup-content .formulario-base select {
  max-width: 100%;
  margin: 0 auto;
}

.popup-content .formulario-base .form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* ===============================
   BOTONES GENERALES (EstÃƒÆ’Ã‚Â¡ndar Novu)
==================================*/
.btn,
button.primary {
  background-color: var(--color-secundario);
  color: white;
  font-weight: 600;
  border: none;
  padding: 14px 24px;
  border-radius: var(--radio-bordes);
  cursor: pointer;
  font-family: var(--fuente-principal);
  transition: var(--transition-general);
}

.btn:hover,
button.primary:hover {
  background-color: var(--color-primario);
}

.btn.secundario {
  background-color: var(--color-blanco-puro);
  color: var(--color-primario);
  border: 1px solid var(--color-primario);
}

.btn.secundario:hover {
  background-color: #f3f3f3;
}


/* ===============================
   NAVBAR GENERAL
   - Escritorio y mÃƒÆ’Ã‚Â³vil
==================================*/

.navbar-novu {
  background-color: #151562;
  padding: 12px 24px;
}

.navbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;

    /* NUEVO: centra el navbar */
    max-width: 1600px;
    margin: 0 auto;

    /* Mantiene aire a los lados */
    padding: 0 24px;
    width: 100%;
    box-sizing: border-box;
}

.navbar-logo img {
  height: 32px;
}

.navbar-menu {
  display: none;
  gap: 24px;
}

.navbar-menu a {
  color: white;
  text-decoration: none;
  font-weight: 500;
  font-size: 15px;
  transition: var(--transition-general);
}

.navbar-menu a:hover {
  color: var(--color-secundario);
}

.navbar-user .avatar {
  height: 32px;
  width: 32px;
  border-radius: 50%;
  object-fit: cover;
}

/* ===============================
   VISIBILIDAD POR RESPONSIVE
   - Controla lo que se muestra segÃƒÆ’Ã‚Âºn el ancho de pantalla
==================================*/

/* Escritorio: mostrar menÃƒÆ’Ã‚Âº y avatar, ocultar hamburguesa */
@media (min-width: 769px) {
  .navbar-menu {
    display: flex !important;
  }

  #menu-toggle,
  .menu-toggle {
    display: none !important;
  }

  .navbar-user .avatar {
    display: inline-block !important;
  }
}

/* MÃƒÆ’Ã‚Â³vil: ocultar menÃƒÆ’Ã‚Âº por defecto, mostrar si tiene .active */
@media (max-width: 768px) {
  .navbar-menu {
    display: none !important;
    flex-direction: column;
    position: fixed;
    top: 56px; /* ajusta segÃƒÆ’Ã‚Âºn altura del header */
    left: 0;
    width: 100%;
    background: var(--color-primario);
    padding: 16px;
    z-index: 1001;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  }

  .navbar-menu.active {
    display: flex !important;
  }

  .navbar-menu a {
    padding: 8px 0;
  }

  #menu-toggle,
  .menu-toggle {
    display: block !important;
  }

  .navbar-user .avatar {
    display: none !important;
  }
}
/* ===============================
   MENÃƒÆ’Ã…Â¡ HAMBURGUESA (PÃƒÆ’Ã‚Âºblico + Dashboard)
   UnificaciÃƒÆ’Ã‚Â³n de estilos visuales
==================================*/

.menu-hamburguesa-publico,
.menu-hamburguesa-dashboard {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  max-height: 100vh;
  background-color: var(--color-primario);
  display: none;
  flex-direction: column;
  padding: 16px;
  z-index: 9999;
  gap: 24px;
  overflow-y: auto;
  box-sizing: border-box;
}

.menu-hamburguesa-publico.abierto,
.menu-hamburguesa-dashboard.abierto {
  display: flex;
}

.menu-hamburguesa-publico .btn-cerrar-menu,
.menu-hamburguesa-dashboard .btn-cerrar-menu {
  background: none;
  border: none;
  font-size: 22px;
  color: white;
  cursor: pointer;
  padding: 4px;
  align-self: flex-end;
  line-height: 1;
  transition: color 0.2s ease;
}

.menu-hamburguesa-publico .btn-cerrar-menu:hover,
.menu-hamburguesa-dashboard .btn-cerrar-menu:hover {
  color: var(--color-secundario);
}

.menu-links-publico {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.menu-links-publico a {
  color: white;
  font-size: 18px;
  text-decoration: none;
  font-weight: 500;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1); /* opcional */
}

.menu-links-publico a:hover {
  color: var(--color-secundario);
}


/* ===============================
   BLOQUEO DE SCROLL CUANDO MENÃƒÆ’Ã…Â¡ ESTÃƒÆ’Ã‚Â ABIERTO
==================================*/
body.menu-abierto {
  overflow: hidden;
  height: 100vh;
}


/* ===============================
   FILTROS SUPERIORES
   - Contenedor y dropdown de filtros tipo, orden, etc.
==================================*/
.barra-filtros {
  position: relative;
  z-index: 1;
  overflow: visible !important;
}

.filtro-dropdown {
  position: relative;
  display: inline-block;
}

.popup-filtro {
  display: none;
  position: absolute;
  top: 110%;
  left: 0;
  background-color: var(--color-blanco-puro);
  border: 1px solid var(--color-input-border);
  border-radius: var(--radio-bordes);
  padding: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  min-width: 130px;
  z-index: 9999;
}

.popup-filtro.popup-busqueda {
  min-width: 180px;
}

#dropdown-busqueda {
  position: relative;
}

#dropdown-busqueda .popup-filtro {
  left: auto !important;
  right: 0 !important;
  transform: translateX(21%) translateY(8%) !important;
}

/* Mostrar dropdown si estÃƒÆ’Ã‚Â¡ activo */
.filtro-dropdown.activo .popup-filtro {
  display: block !important;
}


/* ===============================
   NAVBAR RESPONSIVE (VERSIÃƒÆ’Ã¢â‚¬Å“N MÃƒÆ’Ã¢â‚¬Å“VIL)
==================================*/
.menu-toggle {
  background: transparent;
  border: none;
  color: white;
  font-size: 22px;
  cursor: pointer;
  display: none;
}

@media (max-width: 768px) {
  .navbar-inner {
    justify-content: space-between;
  }

  .btn-menu-publico {
    display: block !important;
  }

  .navbar-menu,
  .menu-toggle {
    display: block;
  }

  .navbar-menu.active {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 56px; /* o altura del header */
    left: 0;
    width: 100%;
    background: var(--color-primario);
    padding: 16px;
    z-index: 1001;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  }

  .navbar-menu a {
    padding: 8px 0;
  }
}


/* ===============================
   INPUTS Y SELECTS GLOBALES
   - Estilos para formularios generales
==================================*/
input[type="text"],
input[type="password"],
input[type="email"],
input[type="whatsapp"],
input[type="search"] {
  font-size: 15px;
  padding: 6px 10px;
  border: 1px solid var(--color-input-border);
  border-radius: var(--radio-bordes);
  background-color: var(--color-blanco-puro);
  color: var(--color-primario);
  font-family: var(--fuente-principal);
  outline: none;
  box-sizing: border-box;
}

select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-color: var(--color-blanco-puro);
  color: var(--color-primario);
  font-family: var(--fuente-principal);
  font-size: 14px;
  padding: 8px 40px 8px 12px;
  border: 1px solid var(--color-input-border);
  border-radius: var(--radio-bordes);
  outline: none;
  background-image: url("data:image/svg+xml,%3Csvg fill='%23151562' height='16' viewBox='0 0 24 24' width='16' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  cursor: pointer;
}


/* ===============================
   BOTÃƒÆ’Ã¢â‚¬Å“N DE CERRAR MODAL / MENÃƒÆ’Ã…Â¡
==================================*/
.btn-cerrar-menu {
  z-index: 9999;
  background: none;
  border: none;
  color: var(--color-gris-claro);
  font-size: 22px;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
  transition: color 0.2s ease;
}

.btn-cerrar-menu:hover {
  color: var(--color-secundario);
}


/* ===============================
   SIDEBAR MÃƒÆ’Ã¢â‚¬Å“VIL (CATÃƒÆ’Ã‚ÂLOGO, USUARIOS, ETC.)
==================================*/
.sidebar-movil .sidebar-nav a {
  display: flex;
  align-items: center;
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  color: var(--color-primario);
  gap: 8px;
  padding: 12px 0;
}

.sidebar-movil {
  position: fixed;
  top: 0;
  left: -100%;
  transition: left 0.3s ease;
  width: 240px;
  height: 100vh;
  background-color: var(--color-blanco-puro);
  z-index: 2000;
}

.sidebar-movil.activo {
  left: 0;
}

body.menu-abierto .sidebar-movil {
  left: 0;
}

.sidebar-movil .sidebar-header {
  padding: 16px;
  display: flex;
  justify-content: flex-end;
}

.sidebar-movil .sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 0 16px;
}

/* Modal (confirmaciÃƒÆ’Ã‚Â³n) */
#modalGlobal,
#modalConfirmacion,
#modalCargando {
  z-index: 1100;
}


/* FOOTER GLOBAL */
.footer-global {
    background: #F2F4FF; /* como el de Jotform */
    padding: 40px 20px 30px;
    margin-top: 60px;
    border-top: 1px solid var(--color-gris-claro);
}

.footer-top,
.footer-bottom {
    max-width: 1300px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

/* Logo */
.footer-logo img {
    height: 40px;
}

/* Info */
.footer-info p {
    margin: 0;
    color: var(--color-texto-secundario);
    font-size: 14px;
}

.footer-address {
    font-size: 13px;
    opacity: 0.8;
}

/* Idioma */
.footer-lang select {
    padding: 6px 8px;
    border-radius: 6px;
    border: 1px solid var(--color-gris-claro);
    background: white;
    color: var(--color-texto-secundario);
    font-size: 14px;
}

/* Links */
.footer-links {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--color-primario);
    font-size: 14px;
    text-decoration: none;
    font-weight: 500;
}

.footer-links a:hover {
    color: var(--color-secundario);
}

/* Redes */
.footer-social {
    display: flex;
    gap: 14px;
}

.footer-social a i {
    font-size: 20px;
    color: var(--color-primario);
    transition: 0.2s;
}

.footer-social a:hover i {
    color: var(--color-secundario);
}

/* RESPONSIVE */
@media(max-width: 700px) {
    .footer-top, .footer-bottom {
        flex-direction: column;
        text-align: center;
    }

    .footer-links {
        justify-content: center;
    }

    .footer-social {
        justify-content: center;
    }

  
}
