/* DigiLivo Website — Utilidades compartidas entre componentes */

/* Page wrapper used by app-shell */
.page-wrapper {
  position: relative;
  margin: 0 auto;
  width: 100%;
  overflow: hidden;
}

/* Preloader */
.loader.loaded {
  opacity: 0;
  visibility: hidden;
  transform: scale(1.02);
  transition:
    opacity 0.5s ease,
    visibility 0.5s ease,
    transform 0.5s ease;
  pointer-events: none;
}

.loader.loaded .loader__dots span,
.loader.loaded .loader__scanline,
.loader.loaded .loader__ring {
  animation-play-state: paused;
}

/* Sticky header visible state */
.stricky-header.stricky-fixed {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 991;
  background: var(--dgl-black);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.15);
  animation: fadeInDown 0.4s ease;
}

@keyframes fadeInDown {
  from { transform: translateY(-100%); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

/* WhatsApp floating button */
.dgl-whatsapp {
  position: fixed;
  bottom: var(--dgl-fab-inset);
  right: var(--dgl-fab-inset);
  z-index: 99;
  width: var(--dgl-fab-size);
  height: var(--dgl-fab-size);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #25d366;
  color: #fff;
  font-size: 1.875rem;
  box-shadow: 0 4px 16px rgba(37, 211, 102, 0.40);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  text-decoration: none;
}

.dgl-whatsapp:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.55);
}

/* Scroll-to-top — 3-color utility FAB (green · slate · navy); WhatsApp stays hero */
.dgl-scroll-top {
  position: fixed;
  right: calc(var(--dgl-fab-inset) + (var(--dgl-fab-size) - var(--dgl-fab-scroll-size)) / 2);
  bottom: calc(var(--dgl-fab-inset) + var(--dgl-fab-size) + var(--dgl-fab-gap));
  z-index: 9999;
  width: var(--dgl-fab-scroll-size);
  height: var(--dgl-fab-scroll-size);
  padding: 0;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--dgl-fab-scroll-bg);
  color: var(--dgl-fab-scroll-icon);
  border: 2px solid var(--dgl-fab-scroll-border);
  font: inherit;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: none;
  box-shadow: var(--dgl-fab-scroll-shadow);
  transition: opacity 0.25s ease, visibility 0.25s ease, transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.dgl-scroll-top.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.dgl-scroll-top:hover {
  background: var(--dgl-fab-scroll-bg-hover);
  border-color: var(--dgl-base-light);
  transform: scale(1.08);
  box-shadow: var(--dgl-fab-scroll-shadow-hover);
}

.dgl-scroll-top:active {
  transform: scale(1.02);
}

.dgl-scroll-top:focus {
  outline: none;
}

.dgl-scroll-top:focus-visible {
  box-shadow: var(--dgl-fab-scroll-shadow), 0 0 0 3px rgba(91, 191, 53, 0.55);
}

.dgl-scroll-top svg {
  display: block;
  width: 20px;
  height: 20px;
  pointer-events: none;
}

/* Search popup */
.search-popup {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(11, 25, 44, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: var(--dgl-transition);
}

.search-popup.popup-opened {
  opacity: 1;
  visibility: visible;
}

/* Mobile nav — language switcher */
.mobile-nav__lang {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 20px;
  padding: 0 30px;
}

.mobile-nav__lang-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  border: 2px solid rgba(91, 191, 53, 0.25);
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
  transition: border-color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}

.mobile-nav__lang-flag {
  display: block;
  width: 28px;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: contain;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.12);
  background: #fff;
}

.mobile-nav__lang-btn:hover,
.mobile-nav__lang-btn.is-active {
  border-color: var(--dgl-base);
  background: rgba(91, 191, 53, 0.08);
  box-shadow: 0 0 0 1px rgba(91, 191, 53, 0.15);
}

.mobile-nav__lang-btn.is-active {
  border-color: var(--dgl-base);
  box-shadow: 0 0 12px rgba(91, 191, 53, 0.25);
}

/* Mobile nav — Contacto (acento editorial, alineado con desktop) */
.mobile-nav__container .mobile-nav__link--contact {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  color: var(--dgl-base) !important;
  box-shadow: inset 0 -2px 0 var(--dgl-base);
}

.mobile-nav__container .mobile-nav__link--contact i {
  font-size: 1rem;
  opacity: 0.85;
}

/* Section title shared styles */
.section-title__tagline {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--dgl-base);
}
