/* ===== Resto del sitio: animaciones optimizadas ===== */
:root {
  --color-primario: #55286f;
  --color-secundario: #55286f;
  --color-acento: #55286f;
  --color-fondo: #210b2c;
  --color-tarjeta: #ffffff;
}

/* --- Sin retraso de reveal para eliminar fondo negro al hacer scroll --- */
.reveal {
  opacity: 1 !important;
  transform: none !important;
  transition: none !important;
}
.reveal.visible {
  opacity: 1 !important;
  transform: none !important;
}

/* --- Hover en tarjetas y borde fino #55286f --- */
.tarjeta {
  border: 1px solid #55286f !important;
  transition: transform .25s ease, box-shadow .25s ease !important;
}
.tarjeta:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 24px -12px rgba(85, 40, 111, 0.4);
}

/* --- Hover en botones --- */
.btn {
  transition: background .2s ease, transform .15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }


/* --- Acordeón de FAQs --- */
.faq-pregunta {
  width: 100%; text-align: left; background: none; border: none; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center;
}
.faq-pregunta .icono { transition: transform .25s ease; color: #55286f; display: inline-block; }
.faq-item.abierto .icono { transform: rotate(45deg); }
.faq-respuesta {
  max-height: 0; overflow: hidden;
  padding-top: 0 !important; padding-bottom: 0 !important;
  border-top-color: transparent !important;
  transition: max-height .35s ease, padding .35s ease, border-color .35s ease;
}
.faq-item.abierto .faq-respuesta {
  max-height: 320px;
  padding-top: 0.35rem !important; padding-bottom: 1.25rem !important;
  border-top-color: rgba(85, 40, 111, 0.25) !important;
}

/* --- Subrayado animado en menú --- */
nav > a, nav .group > a { position: relative; }
nav > a:not(.btn)::after, nav .group > a::after {
  content: ""; position: absolute; left: 0; bottom: -4px; height: 2px; width: 0;
  background: #55286f; transition: width .25s ease;
}
nav > a:not(.btn):hover::after, nav .group > a:hover::after { width: 100%; }

/* --- Barra CTA fija desactivada por instrucción --- */
.barra-cta, .barra-cta-fija {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  overflow: hidden !important;
}

/* --- Shimmer al cargar imágenes --- */
.img-wrap { position: relative; }
.img-wrap.cargando::before {
  content: ""; position: absolute; inset: 0; z-index: 2;
  background: linear-gradient(90deg, #210b2c 25%, rgba(255,255,255,.06) 50%, #210b2c 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s linear infinite;
  pointer-events: none;
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* --- Confirmación animada de formulario --- */
.confirmacion-envio {
  opacity: 0; transform: translateY(6px);
  transition: opacity .4s ease, transform .4s ease;
}
.confirmacion-envio.visible { opacity: 1; transform: translateY(0); }

/* --- Accesibilidad: respeta "reducir movimiento" --- */
@media (prefers-reduced-motion: reduce) {
  .reveal { transition: none; opacity: 1; transform: none; }
  .whatsapp-flotante::before { animation: none; display: none; }
  .tarjeta, .btn, .faq-respuesta, .faq-pregunta .icono,
  nav > a::after, nav .group > a::after,
  .barra-cta, .img-wrap.cargando::before, .confirmacion-envio {
    transition: none; animation: none;
  }
}

/* Submenú desplegable Servicios con fondo del footer (#210b2c) */
.submenu-servicios,
nav .group div.absolute,
nav .group > div {
  background-color: #210b2c !important;
  background: #210b2c !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  opacity: 1 !important;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.6), 0 8px 10px -6px rgba(0, 0, 0, 0.6) !important;
  z-index: 9999 !important;
}

/* Botón flotante de WhatsApp oficial verde #25D366 */
#floating-whatsapp,
.whatsapp-flotante,
a.whatsapp-flotante {
  position: fixed !important;
  width: 60px !important;
  height: 60px !important;
  bottom: 30px !important;
  left: 30px !important;
  border-radius: 50% !important;
  background-color: #25D366 !important;
  background: #25D366 !important;
  color: #FFFFFF !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35) !important;
  transition: transform .2s ease !important;
  z-index: 50 !important;
  text-decoration: none !important;
}
#floating-whatsapp:hover,
.whatsapp-flotante:hover {
  transform: scale(1.08) !important;
}
#floating-whatsapp svg,
.whatsapp-flotante svg {
  width: 36px !important;
  height: 36px !important;
  display: block !important;
}
#floating-whatsapp svg path,
.whatsapp-flotante svg path {
  fill: #FFFFFF !important;
}
#floating-whatsapp::before,
.whatsapp-flotante::before {
  content: "" !important;
  position: absolute !important;
  inset: -8px !important;
  border-radius: 50% !important;
  background: rgba(37, 211, 102, 0.4) !important;
  z-index: -1 !important;
  animation: pulso-wa 2.2s ease-out infinite !important;
  pointer-events: none !important;
  display: block !important;
}

/* --- Asistente Virtual Veronica Gomez y sr-only fix --- */
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border-width: 0 !important;
  display: none !important;
}

#floating-veronica {
  position: fixed !important;
  width: 60px !important;
  height: 60px !important;
  bottom: 30px !important;
  right: 30px !important;
  border-radius: 50% !important;
  background-color: #55286f !important;
  z-index: 50 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 !important;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3) !important;
  cursor: pointer !important;
  transition: transform 0.2s ease !important;
}

#floating-veronica:hover {
  transform: scale(1.1) !important;
}

#floating-veronica img {
  width: 52px !important;
  height: 52px !important;
  border-radius: 50% !important;
  object-fit: cover !important;
  border: 2px solid #ffffff !important;
  display: block !important;
  pointer-events: none !important;
}

#floating-veronica::before {
  content: "";
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  background: rgba(85, 40, 111, 0.45) !important;
  z-index: -1;
  animation: pulso-veronica 2.2s ease-out infinite;
  pointer-events: none;
}

@keyframes pulso-veronica {
  0% { transform: scale(0.9); opacity: 0.8; }
  50% { transform: scale(1.28); opacity: 0.35; }
  100% { transform: scale(1.55); opacity: 0; }
}

/* Fix para que los botones en articulos de blog siempre muestren su texto blanco */
.article-body a.btn,
.article-body .btn,
a.btn,
.btn {
  color: #ffffff !important;
  text-decoration: none !important;
}
.article-body a.btn:hover,
a.btn:hover {
  color: #ffffff !important;
  text-decoration: none !important;
}

/* Justificación de texto en páginas de servicios */
.prose p,
.prose,
.text-justify {
  text-align: justify !important;
  text-justify: inter-word !important;
}

main p,
.prose p,
.prose,
.text-justify {
  text-align: justify !important;
  text-justify: inter-word !important;
  text-align-last: left !important;
}


/* ========================================================
   Centrado de todos los títulos: hero, secciones, artículos, etc.
   ======================================================== */
h1, h2, h3,
.hero-title,
.hero-title-oneline,
.rotativo-titulo,
.rotativo-etiqueta,
.section-title,
section h1, section h2, section h3, section h4,
article h1, article h2, article h3, article h4,
.article-body h1, .article-body h2, .article-body h3, .article-body h4,
.prose h1, .prose h2, .prose h3, .prose h4,
.tarjeta h3, .tarjeta h4,
.card h3, .card h4,
[id^="slide-"] h1, [id^="slide-"] h2,
.hero-slide h1, .hero-slide h2 {
  text-align: center !important;
}

[id^="slide-"] .w-full,
[id^="slide-"] .max-w-\[850px\],
.hero-slide .relative {
  text-align: center !important;
}

[id^="slide-"] .max-w-\[850px\],
[id^="slide-"] .rotativo-etiqueta,
.hero-slide .relative p {
  margin-left: auto !important;
  margin-right: auto !important;
  text-align: center !important;
}

[id^="slide-"] .flex.flex-wrap,
.hero-slide .relative > div:last-child {
  display: flex !important;
  justify-content: center !important;
}

/* Asegurar visibilidad de títulos y textos en sección mas-informes */
#mas-informes h3,
#mas-informes p,
#mas-informes label {
  color: #111111 !important;
}


/* Centrado total de tarjetas en sección nuestros-clientes */
#nuestros-clientes .tarjeta,
#nuestros-clientes .tarjeta h4,
#nuestros-clientes .tarjeta p,
#nuestros-clientes .tarjeta span,
#nuestros-clientes .tarjeta div {
  text-align: center !important;
}

/* Justificación de tarjetas de blog en 3 líneas exactas sin elipsis */
.line-clamp-3-custom,
#nuestro-blog .tarjeta p,
.blog-card p {
  display: block !important;
  -webkit-line-clamp: none !important;
  line-clamp: none !important;
  overflow: visible !important;
  text-align: justify !important;
  text-justify: inter-word !important;
  text-align-last: left !important;
  min-height: 4.2rem;
  line-height: 1.4rem;
}


/* ==========================================================================
   REGLAS CRÍTICAS DE CENTRADO Y JUSTIFICACIÓN (ACTUALIZACIÓN INMEDIATA)
   ========================================================================== */
#nuestros-clientes .tarjeta,
#nuestros-clientes .tarjeta h4,
#nuestros-clientes .tarjeta p,
#nuestros-clientes .tarjeta span,
#nuestros-clientes .tarjeta div {
  text-align: center !important;
}

.line-clamp-3-custom,
#nuestro-blog .tarjeta p,
.blog-card p,
.tarjeta p.text-gray-700 {
  display: block !important;
  -webkit-line-clamp: none !important;
  line-clamp: none !important;
  overflow: visible !important;
  text-align: justify !important;
  text-justify: inter-word !important;
  text-align-last: left !important;
  min-height: 4.2rem;
  line-height: 1.4rem;
}

#mas-informes h3,
#mas-informes p,
#mas-informes label {
  color: #111111 !important;
}


/* Centrado estricto de tarjetas de contacto */
#contactanos .tarjeta,
#contactanos .tarjeta h4,
#contactanos .tarjeta p,
#contactanos .tarjeta a,
#contactanos .tarjeta div {
  text-align: center !important;
}


/* ========================================================
   HEADER: ESPECIFICACIONES EXACTAS
   ======================================================== */
header, #main-header {
  height: 81px !important;
  min-height: 81px !important;
  max-height: 81px !important;
}

@media (min-width: 1150px) {
  header > div:first-child,
  #main-header > div:first-child,
  .header-inner-container {
    width: 1150px !important;
    max-width: 1150px !important;
    height: 81px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
}

@media (max-width: 1149px) {
  header > div:first-child,
  #main-header > div:first-child,
  .header-inner-container {
    height: 81px !important;
  }
}

/* Logo: Icono 44x44, Bloque marca 156x44 */
header a[href="/"] img,
#main-header a[href="/"] img,
.header-logo-icon {
  width: 44px !important;
  height: 44px !important;
  min-width: 44px !important;
  min-height: 44px !important;
  max-width: 44px !important;
  max-height: 44px !important;
}

header a[href="/"] div,
#main-header a[href="/"] div,
.header-logo-brand {
  width: 156px !important;
  height: 44px !important;
  min-width: 156px !important;
  max-width: 156px !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
}

/* Menu: Tamano Tipografia 16px */
header nav > a,
header nav > div > a,
#main-header nav > a,
#main-header nav > div > a,
.header-nav-link {
  font-size: 16px !important;
}

/* Boton CTA: 130px ancho x 38px alto, tipografia 12px */
header .btn,
#main-header .btn,
header a[href*="mas-informes"],
#main-header a[href*="mas-informes"],
.header-btn-cta {
  width: 130px !important;
  height: 38px !important;
  min-width: 130px !important;
  max-width: 130px !important;
  font-size: 12px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 !important;
  text-align: center !important;
  box-sizing: border-box !important;
}


/* ========================================================
   HERO HOME: ESPECIFICACIONES EXACTAS
   ======================================================== */
#hero-slider,
section.hero-home-section {
  height: 550px !important;
  min-height: 550px !important;
  max-height: 550px !important;
}

@media (min-width: 768px) {
  .hero-home-title {
    font-size: 60px !important;
    line-height: 1.05 !important;
  }
  .hero-home-desc {
    font-size: 20px !important;
    line-height: 1.25 !important;
  }
}

.hero-home-btn {
  width: 152px !important;
  height: 44px !important;
  min-width: 152px !important;
  max-width: 152px !important;
  font-size: 15px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 !important;
  text-align: center !important;
  box-sizing: border-box !important;
}


/* ========================================================
   SECCION NUESTROS SERVICIOS: ESPECIFICACIONES EXACTAS
   ======================================================== */
#nuestros-servicios,
#servicios {
  height: 501px !important;
  min-height: 501px !important;
  max-height: 501px !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
}

#nuestros-servicios .servicios-titulo,
#servicios .servicios-titulo {
  font-size: 30px !important;
  line-height: 1.2 !important;
  text-align: center !important;
}

#nuestros-servicios .servicios-parrafo,
#servicios .servicios-parrafo {
  font-size: 16px !important;
  line-height: 1.4 !important;
  text-align: center !important;
}

#nuestros-servicios .tarjeta,
#servicios .tarjeta {
  width: 216px !important;
  height: 166px !important;
  min-width: 216px !important;
  max-width: 216px !important;
  min-height: 166px !important;
  max-height: 166px !important;
  box-sizing: border-box !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
  align-items: center !important;
  text-align: center !important;
}

#nuestros-servicios .tarjeta h4,
#servicios .tarjeta h4,
#nuestros-servicios .tarjeta-titulo,
#servicios .tarjeta-titulo {
  font-size: 16px !important;
  line-height: 1.25 !important;
  text-align: center !important;
}

#nuestros-servicios .tarjeta .btn,
#servicios .tarjeta .btn,
#nuestros-servicios .tarjeta a,
#servicios .tarjeta a {
  width: 130px !important;
  height: 44px !important;
  min-width: 130px !important;
  max-width: 130px !important;
  min-height: 44px !important;
  max-height: 44px !important;
  font-size: 12px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 !important;
  text-align: center !important;
  box-sizing: border-box !important;
}
