/* ==========================================================================
   Extras — botón flotante de WhatsApp y popup de diagnóstico
   Portados desde el sitio anterior (Web Actual) al nuevo diseño Mobirise.
   Reglas genéricas (sin cid), para poder reutilizarse en varias páginas.
   ========================================================================== */

/* -- Botón flotante de WhatsApp ------------------------------------------- */

.whatsapp-wrapper {
  position: fixed;
  bottom: 250px;
  right: 23px;
  z-index: 9999;
}

.whatsapp-button {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  padding: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  position: relative;
  text-decoration: none;
  transition: transform 0.2s ease;
  width: auto;
  height: auto;
  min-width: 58px;
  min-height: 58px;
}

.whatsapp-button:hover {
  transform: scale(1.1);
}

.whatsapp-button::after {
  content: attr(data-tooltip);
  position: absolute;
  background-color: rgba(0, 0, 0, 0.85);
  color: white;
  padding: 6px 10px;
  border-radius: 4px;
  white-space: nowrap;
  font-family: 'Roboto-Thin', sans-serif;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: normal;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease-in-out, transform 0.2s ease-in-out;
}

.whatsapp-button:hover::after {
  opacity: 1;
}

.tooltip-top::after {
  bottom: 120%;
  left: 50%;
  transform: translateX(-50%);
}

.tooltip-bottom::after {
  top: 120%;
  left: 50%;
  transform: translateX(-50%);
}

.tooltip-left::after {
  top: 50%;
  right: 120%;
  transform: translateY(-50%);
}

.tooltip-right::after {
  top: 50%;
  left: 120%;
  transform: translateY(-50%);
}

@media (max-width: 768px) {
  .whatsapp-button::after {
    display: none;
  }
}

/* -- Popup de diagnóstico (encuesta) --------------------------------------- */

#dr-popup-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 99999;
  justify-content: center;
  align-items: center;
  padding: 16px;
}

#dr-popup-overlay.dr-show {
  display: flex;
  animation: drFadeIn 0.3s ease;
}

@keyframes drFadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.dr-popup-card {
  background: #ffffff;
  border-radius: 20px;
  max-width: 460px;
  width: 100%;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.2);
  animation: drSlideUp 0.35s ease;
  position: relative;
  font-family: 'Roboto-Thin', sans-serif;
  color: #232323;
}

@keyframes drSlideUp {
  from {
    transform: translateY(40px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.dr-popup-header {
  background: linear-gradient(135deg, #000000 0%, #002411 100%);
  padding: 30px 28px 22px;
  text-align: center;
  color: #fff;
}

.dr-popup-header .dr-badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 99px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 4px 14px;
  margin-bottom: 12px;
}

.dr-popup-header h2 {
  font-family: 'SaansCollectionVF-TRIAL', sans-serif;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.3;
  margin: 0 0 8px;
  color: #fff;
}

.dr-popup-header p {
  font-size: 13px;
  opacity: 0.85;
  line-height: 1.5;
  margin: 0;
}

.dr-popup-body {
  padding: 22px 28px 26px;
  background: #ffffff;
}

.dr-benefit-list {
  list-style: none;
  margin: 0 0 20px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dr-benefit-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-family: 'SaansCollectionVF-TRIAL', sans-serif;
  font-weight: 600;
  font-size: 14px;
  color: #232323;
  line-height: 1.4;
}

.dr-benefit-list li .dr-check {
  color: #9fe870;
  font-size: 15px;
  flex-shrink: 0;
  margin-top: 1px;
}

.dr-btn-primary {
  display: block;
  width: 100%;
  background: #9fe870 !important;
  color: #264d0c !important;
  border: none;
  border-radius: 999px;
  padding: 13px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  font-family: 'Roboto-Thin', sans-serif;
  transition: background 0.2s, transform 0.1s;
  text-align: center;
  text-decoration: none !important;
}

.dr-btn-primary:hover {
  background: #bcef9c !important;
  transform: translateY(-1px);
}

.dr-btn-skip {
  display: block;
  text-align: center;
  margin-top: 10px;
  font-size: 12px;
  color: #9a9a9a;
  cursor: pointer;
  background: none;
  border: none;
  font-family: 'Roboto-Thin', sans-serif;
  width: 100%;
}

.dr-btn-skip:hover {
  color: #6b7280;
}

.dr-popup-close {
  position: absolute;
  top: 12px;
  right: 14px;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  line-height: 1;
}

.dr-popup-close:hover {
  background: rgba(255, 255, 255, 0.35);
}

/* -- Footer: contraste de los links sociales ------------------------------ */
/* El footer nuevo (cid-vud3N6XY5U) tiene fondo negro, pero sus links de
   LinkedIn/Instagram/Política de privacidad heredan .text-primary, que en
   este tema es negro (#000 !important) — texto invisible sobre fondo negro.
   Se fuerza blanco con hover en el verde de marca, sin tocar la clase
   .text-primary (usada en otras partes del sitio sobre fondos claros). */

.cid-vud3N6XY5U .row-links-soc a {
  color: #ffffff !important;
}

.cid-vud3N6XY5U .row-links-soc a:hover {
  color: #9fe870 !important;
}

/* -- Banner de cookies ------------------------------------------------------ */
/* Reemplaza el plugin de terceros (cookies-alert-plugin), que guardaba el
   consentimiento en una cookie de document.cookie: poco confiable si el
   sitio se abre desde archivo local o el navegador restringe cookies.
   Se guarda en localStorage en su lugar, igual que el popup de diagnóstico. */

#dr-cookie-banner {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 99998;
  background: #ffffff;
  color: #424a4d;
  padding: 16px 24px;
  font-family: 'Roboto-Thin', sans-serif;
  font-size: 13px;
  line-height: 1.5;
  align-items: center;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.15);
}

#dr-cookie-banner.dr-show {
  display: flex;
}

#dr-cookie-banner a {
  color: #424a4d;
  text-decoration: underline;
}

#dr-cookie-banner p {
  margin: 0;
  max-width: 640px;
}

.dr-cookie-btn {
  background: #9fe870;
  color: #264d0c;
  border: none;
  border-radius: 999px;
  padding: 9px 24px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  font-family: 'Roboto-Thin', sans-serif;
  transition: background 0.2s;
  flex-shrink: 0;
}

.dr-cookie-btn:hover {
  background: #bcef9c;
}

/* ==========================================================================
   Interacciones — glow en botones, hover en tarjetas, texto progresivo
   ========================================================================== */

/* -- Botones: glow al pasar el mouse -------------------------------------- */
/* .btn ya trae "transition: all .2s ease-in-out" del tema, así que el
   box-shadow anima solo. Se repiten los selectores de variante con
   !important porque mbr-additional.css fija "box-shadow: none" en sus
   propios estados :hover con la misma especificidad. */

.btn-primary:hover,
.btn-primary:focus,
.btn-secondary:hover,
.btn-secondary:focus,
.btn-secondary-outline:hover,
.btn-secondary-outline:focus,
.btn-primary-outline:hover,
.btn-primary-outline:focus,
.btn-info-outline:hover,
.btn-info-outline:focus,
.btn-black-outline:hover,
.btn-black-outline:focus,
.btn-white-outline:hover,
.btn-white-outline:focus,
.dr-cookie-btn:hover,
.dr-btn-primary:hover {
  box-shadow: 0 0 16px 2px rgba(159, 232, 112, 0.55), 0 0 40px 10px rgba(159, 232, 112, 0.25) !important;
}

/* -- Tarjetas: "Lo que recibes" y "Proyectos" (index) ---------------------- */

.features036 .item-wrapper,
.clients04 .item-wrapper {
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  will-change: transform;
}

.features036 .item-wrapper:hover,
.clients04 .item-wrapper:hover {
  transform: scale(1.04);
  box-shadow: 0 10px 34px rgba(159, 232, 112, 0.22), 0 6px 18px rgba(0, 0, 0, 0.35);
  position: relative;
  z-index: 2;
}

/* -- Lista de servicios (acordeón, servicios.html) -------------------------- */

.accordionStyles .card {
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  will-change: transform;
}

.accordionStyles .card:hover {
  transform: scale(1.015);
  box-shadow: 0 10px 30px rgba(159, 232, 112, 0.18), 0 6px 16px rgba(0, 0, 0, 0.12);
  position: relative;
  z-index: 2;
}

/* -- Texto progresivo (Sobre mí) -------------------------------------------- */
/* .dr-reveal-line arranca invisible y se revela renglón por renglón cuando
   el contenedor .dr-reveal recibe la clase .dr-in (ver script en sobremi.html) */

.dr-reveal-line {
  display: block;
  margin-bottom: 1em;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.dr-reveal-line:last-child {
  margin-bottom: 0;
}

.dr-reveal.dr-in .dr-reveal-line:nth-child(1) { transition-delay: 0.05s; }
.dr-reveal.dr-in .dr-reveal-line:nth-child(2) { transition-delay: 0.35s; }
.dr-reveal.dr-in .dr-reveal-line:nth-child(3) { transition-delay: 0.65s; }
.dr-reveal.dr-in .dr-reveal-line:nth-child(4) { transition-delay: 0.95s; }
.dr-reveal.dr-in .dr-reveal-line:nth-child(5) { transition-delay: 1.25s; }
.dr-reveal.dr-in .dr-reveal-line:nth-child(6) { transition-delay: 1.55s; }

.dr-reveal.dr-in .dr-reveal-line {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .dr-reveal-line {
    transition: none;
    opacity: 1;
    transform: none;
  }
}

/* -- Hero (index): entrada animada por tiempo, no por scroll --------------- */
/* Corre sola al cargar la página (animation, no IntersectionObserver): el
   título, el texto y el botón aparecen en cascada con fade + escala. */

@keyframes dr-hero-in {
  from {
    opacity: 0;
    transform: translateY(22px) scale(0.96);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Arranca invisible y en espera: la anima el loader (ver script en
   index.html) agregando .dr-hero-play a <html> justo cuando el overlay
   empieza a desvanecerse, para que el hero se revele animado en vez de
   aparecer ya completo debajo del loader. */
.header19 .content-wrap > h1,
.header19 .content-wrap > p,
.header19 .content-wrap > .mbr-section-btn {
  opacity: 0;
}

html.dr-hero-play .header19 .content-wrap > h1,
html.dr-hero-play .header19 .content-wrap > p,
html.dr-hero-play .header19 .content-wrap > .mbr-section-btn {
  animation: dr-hero-in 1s cubic-bezier(0.16, 1, 0.3, 1) both;
}

html.dr-hero-play .header19 .content-wrap > h1 {
  animation-delay: 0.15s;
}

html.dr-hero-play .header19 .content-wrap > p {
  animation-delay: 0.4s;
}

html.dr-hero-play .header19 .content-wrap > .mbr-section-btn {
  animation-delay: 0.65s;
}

@media (prefers-reduced-motion: reduce) {
  .header19 .content-wrap > h1,
  .header19 .content-wrap > p,
  .header19 .content-wrap > .mbr-section-btn {
    animation: none;
    opacity: 1;
  }
}

/* -- Pantalla de carga inicial ---------------------------------------------- */
/* Aparece una sola vez por sesión de navegación (sessionStorage, ver script
   al inicio del <body>): overlay a pantalla completa con el degradado de
   marca, el isotipo "Nombre y Cargo" entra con fade + escala y luego todo
   el overlay se desvanece revelando la página real. Tiempo total ~1.8s. */

html.dr-loading,
html.dr-loading body {
  overflow: hidden;
}

#dr-loader {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  transition: opacity 1s ease;
}

#dr-loader.dr-loader-hide {
  opacity: 0;
  pointer-events: none;
}

.dr-loader-mark {
  width: min(78vw, 460px);
  opacity: 0;
  transform: translateY(14px) scale(0.96);
  animation:
    dr-loader-in 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both,
    dr-loader-pulse 1.8s ease-in-out 1s infinite;
}

.dr-loader-mark svg {
  width: 100%;
  height: auto;
  display: block;
}

@keyframes dr-loader-in {
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes dr-loader-pulse {
  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.035);
  }
}

@media (prefers-reduced-motion: reduce) {
  .dr-loader-mark {
    animation: none;
    opacity: 1;
    transform: none;
  }

  #dr-loader {
    transition: none;
  }
}

/* -- Navbar: más compacta en desktop + fondo semitransparente al scrollear */
/* Todo escopado a min-width:992px (el breakpoint donde este tema pasa de
   hamburguesa a menú horizontal) para no tocar el diseño de la hamburguesa
   en responsive. .dr-scrolled lo agrega assets/js/navbar-scroll.js al
   hacer scroll; solo cambia el fondo del pill (rgba con alpha 0.8), el
   logo y los links del menú conservan su propia opacidad. */

.cid-vucJpCJtcQ .container {
  transition: background-color 0.3s ease;
}

.cid-vucJpCJtcQ .navbar.dr-scrolled .container {
  background-color: rgba(255, 255, 255, 0.8) !important;
}

@media (min-width: 992px) {
  .cid-vucJpCJtcQ .navbar {
    min-height: 58px;
  }

  .cid-vucJpCJtcQ .container {
    height: 58px;
    padding: 5px 8px;
  }

  .cid-vucJpCJtcQ .navbar-brand img {
    height: 2rem !important;
  }

  .cid-vucJpCJtcQ .navbar-nav .nav-item .nav-link {
    padding: 10px !important;
    font-size: 1.25rem;
  }
}
