/* ==========================================================================
 C3 — Estilos propios de la portada (views/index.ejs)
 Se carga después de c3-layout.css. Convive con el CSS de Elementor, por
 eso las reglas van acotadas por id de sección o con prefijo .c3-*.
 NO incluye nada del formulario de contacto (#contacto / conector Sheets).
 ========================================================================== */

/* ---------- Estilos heredados de la vista (antes en <style> inline) ---------- */
.text-clients {
  font-style: normal !important;
  color: var(--e-global-color-primary) !important;
  font-family:
    var(--e-global-typography-text-font-family), Sans-serif !important;
  font-size: var(--e-global-typography-text-font-size) !important;
  font-weight: var(--e-global-typography-text-font-weight) !important;
  line-height: var(--e-global-typography-text-line-height) !important;
}

.testimonial-name {
  color: var(--e-global-color-secondary) !important;
  font-family:
    var(--e-global-typography-3c22f95-font-family), Sans-serif !important;
  font-size: var(--e-global-typography-3c22f95-font-size) !important;
  font-weight: var(--e-global-typography-3c22f95-font-weight) !important;
  line-height: var(--e-global-typography-3c22f95-line-height) !important;
  letter-spacing: var(--e-global-typography-3c22f95-letter-spacing) !important;
  word-spacing: var(--e-global-typography-3c22f95-word-spacing) !important;
}

.testimonial-title {
  color: var(--e-global-color-secondary) !important;
  font-family:
    var(--e-global-typography-3c22f95-font-family), Sans-serif !important;
  font-size: var(--e-global-typography-3c22f95-font-size) !important;
  font-weight: var(--e-global-typography-3c22f95-font-weight) !important;
  line-height: var(--e-global-typography-3c22f95-line-height) !important;
  letter-spacing: var(--e-global-typography-3c22f95-letter-spacing) !important;
  word-spacing: var(--e-global-typography-3c22f95-word-spacing) !important;
}

.label-form-custom {
  color: var(--e-global-color-secondary) !important;
}

.accordion-button:not(.collapsed) {
  color: #fff !important;
  background-color: var(--e-global-color-secondary) !important;
}

.carousel-container {
  max-width: 1200px;
  margin: 50px auto;
  padding: 0 20px;
  position: relative;
  overflow: hidden;
}

.carousel-track {
  display: flex;
  transition: transform 0.5s ease-in-out;
}

.card-wrapper {
  flex: 0 0 25%;
  padding: 10px;
  transition:
    opacity 0.5s ease-in-out,
    transform 0.5s ease-in-out;
}

.card-wrapper > .card {
  background: #ffffff;
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Flechas de los carruseles propios (#section_client y #c3_section) */
.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: var(--color-primary);
  color: #ffffff;
  font-size: 14px;
  line-height: 1;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  z-index: 10;
  box-shadow: 0 4px 12px rgba(7, 54, 82, 0.25);
  transition:
    background-color 0.2s ease,
    transform 0.2s ease;
}

.carousel-btn:hover {
  background: var(--color-secondary);
  transform: translateY(-50%) scale(1.06);
}

.carousel-btn:focus-visible {
  outline: 3px solid rgba(51, 202, 51, 0.5);
  outline-offset: 2px;
}

.prev-btn {
  left: 12px;
}

.next-btn {
  right: 12px;
}

@media (max-width: 768px) {
  .card-wrapper {
    flex: 0 0 50%;
  }
}

@media (max-width: 480px) {
  .card-wrapper {
    flex: 0 0 100%;
  }
}

/* Homogenización y diseño de cards blancas con tooltip para sección de clientes */
#section_client .carousel-container {
  padding: 35px 15px 15px 15px;
  margin: 15px auto 40px auto;
}

#section_client .card-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
}

#section_client .card {
  position: relative;
  width: 100%;
  height: 115px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  background: #ffffff !important;
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08) !important;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

/* Tooltip flotante con nombre de empresa */
#section_client .card[data-tooltip]::before {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(6px);
  background: #073652;
  color: #ffffff;
  font-family: var(--font-heading, "Montserrat", sans-serif);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.3px;
  padding: 6px 12px;
  border-radius: 6px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.25s cubic-bezier(0.16, 1, 0.3, 1),
    visibility 0.25s ease;
  box-shadow: 0 6px 18px rgba(7, 54, 82, 0.25);
  z-index: 100;
}

/* Flechita del tooltip */
#section_client .card[data-tooltip]::after {
  content: "";
  position: absolute;
  bottom: calc(100% + 4px);
  left: 50%;
  transform: translateX(-50%) translateY(6px);
  border-width: 6px 6px 0 6px;
  border-style: solid;
  border-color: #073652 transparent transparent transparent;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.25s cubic-bezier(0.16, 1, 0.3, 1),
    visibility 0.25s ease;
  z-index: 100;
}

#section_client .card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.12) !important;
  z-index: 50;
}

#section_client .card:hover[data-tooltip]::before,
#section_client .card:hover[data-tooltip]::after {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

#section_client .elementor-widget-container {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

#section_client .card img {
  max-height: 75px;
  max-width: 90%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  transition: transform 0.3s ease;
}

#section_client .card:hover img {
  transform: scale(1.04);
}

/* ---------- Cinta superior: texto con brillo verde WhatsApp ---------- */
@keyframes textShimmer {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.whatsapp-api-shimmer {
  display: inline-block;
  background: linear-gradient(
    90deg,
    #128c7e 0%,
    #25d366 25%,
    #00f076 50%,
    #25d366 75%,
    #128c7e 100%
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: textShimmer 3s ease-in-out infinite;
  font-weight: 800;
  text-shadow: 0 0 12px rgba(37, 211, 102, 0.25);
}

/* ==========================================================================
   Pulido de marca
   ========================================================================== */

/* ---------- Cinta superior ---------- */
#topBannerCarousel.c3-top-banner {
  border-bottom: 3px solid #25d366 !important; /* verde WhatsApp, a propósito */
  z-index: 2000;
  transition: transform 0.3s ease-in-out;
}

.c3-top-banner .c3-top-banner-text {
  font-size: 1.1rem;
}

.c3-top-banner .btn-close {
  background-color: #ffffff !important;
  font-size: 0.8rem !important;
}

/* ---------- Flechas de los carruseles Bootstrap (hero y testimonios) ---------- */
.carousel .c3-carousel-ctrl {
  width: 44px;
  height: 44px;
  margin: auto 8px;
  top: 0;
  bottom: 0;
  border-radius: 50%;
  background-color: rgba(7, 54, 82, 0.75);
  opacity: 1;
  transition: background-color 0.2s ease;
}

.carousel .c3-carousel-ctrl:hover,
.carousel .c3-carousel-ctrl:focus-visible {
  background-color: var(--color-secondary);
}

.carousel .c3-carousel-ctrl .carousel-control-prev-icon,
.carousel .c3-carousel-ctrl .carousel-control-next-icon {
  width: 18px;
  height: 18px;
}

/* ---------- Testimonios ---------- */
.c3-testimonial-photo {
  width: 270px;
  height: 270px;
}

@media (max-width: 767.98px) {
  .c3-testimonial-photo {
    width: 180px;
    height: 180px;
    padding: 2rem !important;
  }
}

/* ---------- Ventajas (#c3_section): tarjetas blancas de igual altura ---------- */
#c3_section .card-wrapper {
  display: flex;
}

#c3_section .card {
  width: 100%;
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 6px 18px rgba(7, 54, 82, 0.08) !important;
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease;
}

#c3_section .card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(7, 54, 82, 0.14) !important;
}

#c3_section .card .elementor-widget-image-box {
  min-height: 300px;
  height: 100%;
}

/* ---------- Título de sección propio (FAQ) ---------- */
.c3-section-title {
  color: var(--color-primary);
  text-align: center;
  margin: 1.5rem 0;
}

/* ---------- Preguntas frecuentes ---------- */
#faq .accordion-item {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 12px;
}

#faq .accordion-item:not(:first-of-type) {
  border-top: 1px solid #e2e8f0;
}

#faq .accordion-button {
  font-family: var(--font-body);
  font-weight: 500;
  color: var(--color-primary);
  background-color: #ffffff;
}

#faq .accordion-button:focus {
  box-shadow: 0 0 0 0.2rem rgba(51, 202, 51, 0.3);
  border-color: transparent;
}

#faq .accordion-button:not(.collapsed)::after {
  filter: brightness(0) invert(1);
}

/* ---------- Soluciones en móvil: texto primero, video después ---------- */
@media (max-width: 767px) {
  .elementor-element-d4c170c > .elementor-container,
  .elementor-element-4ef497e > .elementor-container {
    flex-direction: column-reverse;
  }

  #soluciones .elementor-video-iframe,
  .elementor-element-d4c170c .elementor-video-iframe,
  .elementor-element-8e6466a .elementor-video-iframe,
  .elementor-element-4ef497e .elementor-video-iframe,
  .elementor-element-34ad10a .elementor-video-iframe {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
  }
}
