/* ==========================================================================
   EstiloGráfico Pro — 2025 theme layer
   Overrides the legacy template stylesheets with a modern dark/light,
   glassmorphism-inspired design system driven by CSS custom properties.
   Loaded last on every page so it wins the cascade without rewriting
   the underlying layout CSS.
   ========================================================================== */

:root {
  --bg: #0b0d10;
  --bg-alt: #14171c;
  --surface: rgba(255, 255, 255, 0.045);
  --surface-strong: rgba(255, 255, 255, 0.07);
  --surface-border: rgba(255, 255, 255, 0.1);
  --text: #f5f6f7;
  --text-muted: rgba(245, 246, 247, 0.68);
  --accent: #fba70b;
  --accent-2: #f4813f;
  --accent-3: #f1556a;
  --header-bg: rgba(11, 13, 16, 0.72);
  --shadow: 0 20px 45px rgba(0, 0, 0, 0.45);
  --input-bg: rgba(255, 255, 255, 0.06);
  --input-border: rgba(255, 255, 255, 0.14);
}

:root[data-theme="light"] {
  --bg: #fbf9f7;
  --bg-alt: #f2efec;
  --surface: rgba(20, 20, 20, 0.035);
  --surface-strong: rgba(20, 20, 20, 0.06);
  --surface-border: rgba(20, 20, 20, 0.09);
  --text: #17181a;
  --text-muted: rgba(23, 24, 26, 0.65);
  --accent: #e08e00;
  --accent-2: #e6672c;
  --accent-3: #d63f56;
  --header-bg: rgba(251, 249, 247, 0.78);
  --shadow: 0 20px 45px rgba(20, 20, 20, 0.12);
  --input-bg: rgba(20, 20, 20, 0.04);
  --input-border: rgba(20, 20, 20, 0.14);
}

/* ---------------------------------------------------------------------- */
/* Base */
/* ---------------------------------------------------------------------- */

html, body {
  background: var(--bg) !important;
  color: var(--text);
}

/* subtle vertical grid + top glow behind everything, fixed to viewport */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    radial-gradient(60% 40% at 50% -10%, rgba(251, 167, 11, 0.16), transparent 70%),
    linear-gradient(90deg, var(--surface-border) 1px, transparent 1px),
    linear-gradient(90deg, transparent calc(50% - 1px), var(--surface-border) 1px, transparent calc(50% + 1px));
  background-size: 100% 100%, 25% 100%, 100% 100%;
  background-repeat: no-repeat, repeat-x, no-repeat;
  opacity: 0.6;
}

@media (max-width: 768px) {
  body::before { background-image: radial-gradient(70% 30% at 50% -10%, rgba(251, 167, 11, 0.14), transparent 70%); }
}

/* Subtle film-grain texture over the whole page — a common "premium"
   finishing touch that keeps flat dark/light sections from looking
   sterile. Pure CSS (inline SVG turbulence filter), no image request. */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0.035;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

:root[data-theme="light"] body::after { opacity: 0.025; }

header, .welcome-area, section, footer, #preloader { position: relative; z-index: 1; }

::selection { background: var(--accent-3); color: #fff; }

p { color: var(--text-muted); }

a.main-button-slider,
a.main-button,
button.main-button {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  color: #0b0d10;
  border: none;
  box-shadow: 0 8px 24px rgba(251, 167, 11, 0.25);
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

a.main-button-slider:hover,
a.main-button:hover,
button.main-button:hover {
  background: linear-gradient(135deg, var(--accent-2) 0%, var(--accent-3) 100%);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(241, 85, 106, 0.3);
}

/* ---------------------------------------------------------------------- */
/* Header / nav */
/* ---------------------------------------------------------------------- */

.header-area {
  background-color: var(--header-bg) !important;
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--surface-border);
}

.background-header {
  background-color: var(--header-bg) !important;
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
}

.header-area .main-nav .logo,
.header-area .main-nav .nav li a {
  color: var(--text) !important;
}

.header-area .main-nav .nav {
  background: transparent !important;
}

/* Reclaim space from the legacy 15% left margin so the theme/language
   toggles always fit next to the nav without wrapping to a new line. */
@media (min-width: 992px) {
  .header-area .main-nav .nav {
    margin-left: 3% !important;
  }
}

.header-area .main-nav .nav li a {
  color: var(--text-muted) !important;
}

.header-area .main-nav .nav li:hover a,
.header-area .main-nav .nav li a.active,
.background-header .nav li a.active {
  color: var(--accent) !important;
}

.header-area .main-nav .nav li.submenu ul li a {
  background: var(--bg-alt) !important;
  color: var(--text-muted) !important;
  border-bottom: 1px solid var(--surface-border);
}

.header-area .main-nav .nav li.submenu ul li a:hover {
  background: var(--bg-alt) !important;
  color: var(--accent) !important;
}

.header-area .main-nav .menu-trigger span,
.header-area .main-nav .menu-trigger span:before,
.header-area .main-nav .menu-trigger span:after,
.background-header .main-nav .menu-trigger span,
.background-header .main-nav .menu-trigger span:before,
.background-header .main-nav .menu-trigger span:after {
  background-color: var(--text) !important;
}

.header-area .main-nav .nav li.submenu:after {
  font-family: inherit !important;
  content: "\25BE" !important;
  color: var(--text-muted) !important;
}

.numero-paso {
  display: block;
  font-size: 90px;
  font-weight: 700;
  color: var(--surface-strong);
  line-height: 1;
  margin-bottom: -20px;
}

@media (max-width: 991px) {
  .header-area,
  .header-area .main-nav .nav,
  .header-area .main-nav .nav li {
    background: var(--bg) !important;
  }
  .header-area .main-nav .nav li a {
    background: var(--bg) !important;
    color: var(--text) !important;
  }
  .header-area .main-nav .nav li a:hover {
    background: var(--bg-alt) !important;
    color: var(--accent) !important;
  }
  .header-area .main-nav .nav {
    position: fixed;
    left: 0;
    right: 0;
    top: 80px;
    bottom: 0;
    height: calc(100vh - 80px) !important;
    overflow-y: auto;
  }
  .header-area .main-nav .nav li {
    text-align: center;
  }
}

/* theme toggle button */
.theme-toggle {
  appearance: none;
  border: 1px solid var(--surface-border);
  background: var(--surface);
  color: var(--text);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 16px;
  z-index: 1000;
  transition: transform 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

/* Desktop: sit in normal flow after the nav (floats never overlap,
   unlike a fixed-offset absolute position that can collide with the
   nav at in-between viewport widths). */
@media (min-width: 992px) {
  .theme-toggle {
    float: right;
    margin: 20px 0 0 10px;
  }
}

@media (max-width: 991px) {
  .theme-toggle {
    position: absolute;
    top: 13px;
    right: 78px;
    width: 38px;
    height: 38px;
    font-size: 17px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
  }
}

@media (max-width: 480px) {
  .Logo-header {
    width: 7.5rem !important;
  }
}

.theme-toggle:hover {
  color: var(--accent);
  border-color: var(--accent);
  transform: rotate(15deg);
}

.theme-toggle .fa-sun { display: none; }
:root[data-theme="light"] .theme-toggle .fa-sun { display: inline-block; }
:root[data-theme="light"] .theme-toggle .fa-moon { display: none; }

/* language toggle button */
.lang-toggle {
  appearance: none;
  border: 1px solid var(--surface-border);
  background: var(--surface);
  color: var(--text);
  min-width: 40px;
  height: 40px;
  padding: 0 10px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.5px;
  z-index: 1000;
  transition: color 0.25s ease, border-color 0.25s ease;
}

@media (min-width: 992px) {
  .lang-toggle {
    float: right;
    margin: 20px 0 0 0;
  }
}

.lang-toggle:hover {
  color: var(--accent);
  border-color: var(--accent);
}

@media (max-width: 991px) {
  .lang-toggle {
    position: absolute;
    top: 13px;
    right: 128px;
    height: 38px;
    min-width: 38px;
    padding: 0 10px;
    font-size: 12px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
  }
}

/* ---------------------------------------------------------------------- */
/* Hero */
/* ---------------------------------------------------------------------- */

.welcome-area .header-text h1,
.header-text h1,
.header-texto h1 {
  color: var(--text) !important;
  font-weight: 800 !important;
}

.welcome-area .header-text h1 em,
.header-text h1 em,
.header-texto h1 em {
  color: var(--accent) !important;
  font-style: normal !important;
}

.welcome-area .header-text p {
  color: var(--text-muted) !important;
}

.center-heading h2 { color: var(--text) !important; }
.center-heading h2 em { color: var(--accent) !important; }
.center-heading p { color: var(--text-muted) !important; }

/* ---------------------------------------------------------------------- */
/* Glass cards: services, promo, pricing, portfolio, blog */
/* ---------------------------------------------------------------------- */

.features-item {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.features-item:hover {
  border-color: var(--accent);
}

.features-item h3,
.features-item h4 {
  color: var(--text) !important;
}

.features-item p { color: var(--text-muted); }

#promotion .right-text h4 { color: var(--text) !important; }
#promotion .right-text p { color: var(--text-muted) !important; }

#testimonials .item .testimonial-content {
  background: linear-gradient(145deg, rgba(244, 129, 63, 0.92) 0%, rgba(241, 85, 106, 0.92) 100%);
  backdrop-filter: blur(6px);
  position: relative;
  z-index: 1;
}

#testimonials .author {
  position: relative;
  z-index: 2;
}

.tc-container h1, .tc-container h2, .tc-container h3 { color: var(--text) !important; }

.tc-pricing-style-1 .tc-pricing-plan {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
}

.tc-pricing-style-1 .tc-pricing-plan:before,
.tc-pricing-style-1 .tc-pricing-plan:after {
  display: none;
}

.tc-pricing-style-1 .pricing-title,
.tc-pricing-style-1 .price,
.tc-pricing-style-1 .pricing-content > ul,
.tc-pricing-style-1 .pricing-content p,
.tc-pricing-style-1 .pricing-content p span {
  color: var(--text) !important;
}

.tc-pricing-style-1 .pricing-head .pricing-duration p {
  color: #fff !important;
}

.tc-pricing-style-1 .pricing-duration {
  background-image: linear-gradient(30deg, var(--accent-2) 11%, var(--accent) 83.4%);
  border-radius: 16px;
}

.tc-pricing-style-1 .tc-pricing-plan.is-featured {
  border-color: var(--accent);
  box-shadow: 0 25px 55px rgba(251, 167, 11, 0.2);
}

.tc-pricing-style-1 .pricing-footer > a {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  color: #0b0d10;
  font-weight: 600;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.tc-pricing-style-1 .pricing-footer > a:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(241, 85, 106, 0.3);
}

/* Portfolio grid + lightbox */
.grid .item-contenido {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: 12px;
  overflow: hidden;
}

.grid .item-contenido img {
  border-radius: 12px;
  transition: transform 0.4s ease;
}

.grid .item:hover .item-contenido img {
  transform: scale(1.04);
}

header .categorias a.activo { color: var(--accent) !important; }

.overlay .descripcion { background: var(--bg-alt); color: var(--text); }
.overlay .descripcion a { color: var(--accent); }

/* Blog */
.article {
  background: var(--surface) !important;
  border: 1px solid var(--surface-border) !important;
  backdrop-filter: blur(10px);
}

.article h3 { color: var(--text) !important; }
.article p { color: var(--text-muted) !important; }

#subscribe {
  background: var(--surface) !important;
  border: 1px solid var(--surface-border) !important;
}

#subscribe h2 { color: var(--text) !important; }

#subscribe input {
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  color: var(--text);
}

#category-nav button {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  color: var(--text);
}

#category-nav button:hover {
  background: var(--accent);
  color: #0b0d10;
}

/* ---------------------------------------------------------------------- */
/* Footer */
/* ---------------------------------------------------------------------- */

footer {
  background-image: none !important;
  background: linear-gradient(180deg, transparent 0%, var(--bg-alt) 100%) !important;
  border-top: 1px solid var(--surface-border);
  margin-top: 0 !important;
  padding-top: 80px !important;
}

.contact-form {
  background: var(--surface) !important;
  border: 1px solid var(--surface-border);
  backdrop-filter: blur(10px);
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  background-color: var(--input-bg) !important;
  border: 1px solid var(--input-border) !important;
  color: var(--text) !important;
}

.contact-form select {
  color: #777;
  font-size: 13px;
  border-radius: 5px;
  width: 100%;
  height: 50px;
  outline: none;
  padding-left: 20px;
  padding-right: 20px;
  margin-bottom: 30px;
  appearance: auto;
}

.contact-form select option {
  color: #1e1e1e;
}

.footer-content .right-content h2 { color: var(--text) !important; }
.footer-content .right-content h2 em { color: var(--accent) !important; }
.footer-content .right-content p,
.footer-content .right-content a { color: var(--text-muted) !important; }

footer .sub-footer { border-top-color: var(--surface-border) !important; }
footer .sub-footer p { color: var(--text-muted) !important; }

footer .redes-sociales a,
.contenedor-icono a,
footer .social li a {
  background: var(--surface) !important;
  border: 1px solid var(--surface-border) !important;
  color: var(--text) !important;
}

footer .redes-sociales a:hover,
.contenedor-icono a:hover,
footer .social li a:hover {
  color: var(--accent) !important;
  border-color: var(--accent);
}

/* ---------------------------------------------------------------------- */
/* Preloader */
/* ---------------------------------------------------------------------- */

#preloader {
  background: var(--bg);
  background-image: linear-gradient(145deg, var(--accent-2) 0%, var(--accent-3) 100%);
}

/* ---------------------------------------------------------------------- */
/* Motion */
/* ---------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* Real scroll-reveal, driven by assets/js/reveal.js (IntersectionObserver).
   The legacy ScrollReveal library never fired reliably; this replaces it
   using the same data-scroll-reveal authoring already in the markup. */
[data-scroll-reveal] {
  opacity: 0;
  transform: translate3d(var(--reveal-x, 0), var(--reveal-y, 24px), 0);
  transition: opacity var(--reveal-duration, 0.6s) ease var(--reveal-delay, 0s),
              transform var(--reveal-duration, 0.6s) ease var(--reveal-delay, 0s);
}

[data-scroll-reveal].is-revealed {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

@media (prefers-reduced-motion: reduce) {
  [data-scroll-reveal] { opacity: 1 !important; transform: none !important; transition: none !important; }
}

/* ---------------------------------------------------------------------- */
/* Floating buttons (WhatsApp + back-to-top) */
/* ---------------------------------------------------------------------- */
/* The legacy CSS positioned WhatsApp with `top: 850px`, a fixed pixel
   offset from the viewport top — on screens shorter than ~850px
   (e.g. common 1366x768 laptops) the button rendered off-screen.
   Anchor both to the bottom of the viewport instead so they always
   show up, stacked with a fixed gap, never overlapping. */
#botonFijo {
  top: auto !important;
  bottom: 20px !important;
  right: 20px !important;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #2fd66b 0%, #128c4a 100%);
  color: #fff;
  font-size: 27px;
  box-shadow: 0 10px 25px rgba(18, 140, 74, 0.4);
  transition: transform 0.25s ease;
}

#botonFijo:hover { transform: scale(1.06); }

/* Base CSS ships `.ir-arriba { display: none; }` and jQuery toggles it
   with slideUp/slideDown as the visitor scrolls. Deliberately NOT setting
   `display` here (not even without !important) so that JS-driven
   show/hide keeps working — only position/look are themed. */
.ir-arriba {
  bottom: 90px !important;
  right: 20px !important;
  margin: 0 !important;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.35);
  text-align: center;
  line-height: 56px;
  font-size: 20px;
  color: #0b0d10;
  transition: transform 0.25s ease;
}

.ir-arriba:hover { transform: scale(1.06); }

@media (max-width: 480px) {
  #botonFijo, .ir-arriba {
    width: 48px;
    height: 48px;
    right: 14px !important;
    font-size: 18px;
    line-height: 48px;
  }
  #botonFijo { bottom: 14px !important; }
  .ir-arriba { bottom: 74px !important; }
}

/* ---------------------------------------------------------------------- */
/* Chat assistant widget (rule-based FAQ bot) */
/* ---------------------------------------------------------------------- */

.chat-toggle {
  position: fixed;
  bottom: 20px;
  left: 20px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: #0b0d10;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.35);
  z-index: 1000;
  transition: transform 0.25s ease;
}

.chat-toggle:hover { transform: scale(1.06); }

.chat-panel {
  position: fixed;
  bottom: 90px;
  left: 20px;
  width: 340px;
  max-width: calc(100vw - 40px);
  max-height: 480px;
  display: flex;
  flex-direction: column;
  background: var(--bg-alt);
  border: 1px solid var(--surface-border);
  border-radius: 16px;
  box-shadow: var(--shadow);
  overflow: hidden;
  z-index: 1000;
}

.chat-panel.hidden { display: none; }

.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  color: #0b0d10;
  font-weight: 700;
  font-size: 14px;
}

.chat-close {
  background: none;
  border: none;
  color: #0b0d10;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.chat-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 200px;
}

.chat-bubble {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 13px;
  line-height: 1.45;
}

.chat-bubble.bot {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  color: var(--text);
  align-self: flex-start;
}

.chat-bubble.user {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  color: #0b0d10;
  font-weight: 600;
  align-self: flex-end;
}

.chat-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chat-chip {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  color: var(--text);
  border-radius: 20px;
  padding: 6px 12px;
  font-size: 12px;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.chat-chip:hover { color: var(--accent); border-color: var(--accent); }

.chat-more-link {
  align-self: flex-start;
  background: none;
  border: none;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
  padding: 0;
}

.chat-links { display: flex; flex-wrap: wrap; gap: 8px; }

.chat-link-btn {
  display: inline-block;
  background: var(--accent);
  color: #0b0d10 !important;
  font-weight: 700;
  font-size: 12px;
  padding: 6px 12px;
  border-radius: 16px;
  text-decoration: none !important;
}

.chat-footer {
  display: flex;
  border-top: 1px solid var(--surface-border);
  padding: 10px;
  gap: 8px;
}

.chat-footer input {
  flex: 1;
  border: 1px solid var(--input-border);
  background: var(--input-bg);
  color: var(--text);
  border-radius: 20px;
  padding: 8px 14px;
  font-size: 13px;
  outline: none;
}

.chat-footer button {
  background: var(--accent);
  border: none;
  border-radius: 20px;
  padding: 8px 16px;
  font-weight: 700;
  font-size: 12px;
  color: #0b0d10;
  cursor: pointer;
}

@media (max-width: 480px) {
  .chat-toggle { left: 14px; bottom: 14px; width: 48px; height: 48px; font-size: 19px; }
  .chat-panel { left: 12px; bottom: 72px; width: calc(100vw - 24px); max-height: 420px; }
}

/* ---------------------------------------------------------------------- */
/* Hero visual — real <img> (was a CSS background) so it can float and */
/* tilt with the mouse instead of sitting completely still.              */
/* ---------------------------------------------------------------------- */

.welcome-area { background-image: none !important; }

.hero-visual-wrap {
  pointer-events: none;
  animation: heroFloat 7s ease-in-out infinite;
}

.hero-visual {
  display: block;
  width: 100%;
  transition: transform 0.2s ease-out;
  will-change: transform;
}

@keyframes heroFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-14px) rotate(0.6deg); }
}

@media (min-width: 811px) {
  .hero-visual-wrap {
    position: absolute;
    top: 6%;
    right: 2%;
    width: min(42%, 620px);
    z-index: 0;
  }
}

@media (max-width: 810px) {
  .hero-visual-wrap {
    width: 60%;
    max-width: 300px;
    margin: 90px 0 0 auto;
    mask-image: linear-gradient(to left, black 78%, transparent 100%);
    -webkit-mask-image: linear-gradient(to left, black 78%, transparent 100%);
  }
  .header-text { padding-top: 0 !important; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-visual-wrap { animation: none; }
}

/* ---------------------------------------------------------------------- */
/* Idle float — small ambient motion on key icons/logos so the page      */
/* feels alive even before the visitor moves the mouse or scrolls.       */
/* ---------------------------------------------------------------------- */

@keyframes iconFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.features-icon img { animation: iconFloat 3.6s ease-in-out infinite; }
.features-icon img[src*="servicio-web"] { animation-delay: 0s; }
.features-icon img[src*="servicio-marketing"] { animation-delay: 0.4s; }
.features-icon img[src*="servicio-branding"] { animation-delay: 0.8s; }

#testimonials .author img { animation: iconFloat 4.2s ease-in-out infinite; }

#promotion .right-text ul img { animation: iconFloat 4s ease-in-out infinite; }
#promotion .right-text ul li:nth-child(1) img { animation-delay: 0s; }
#promotion .right-text ul li:nth-child(2) img { animation-delay: 0.3s; }
#promotion .right-text ul li:nth-child(3) img { animation-delay: 0.6s; }

@media (prefers-reduced-motion: reduce) {
  .features-icon img,
  #testimonials .author img,
  #promotion .right-text ul img {
    animation: none;
  }
}

/* ---------------------------------------------------------------------- */
/* Custom scrollbar */
/* ---------------------------------------------------------------------- */

html {
  scrollbar-width: thin;
  scrollbar-color: var(--accent) var(--bg-alt);
}

::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: var(--bg-alt); }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--accent) 0%, var(--accent-2) 100%);
  border-radius: 10px;
  border: 2px solid var(--bg-alt);
}
::-webkit-scrollbar-thumb:hover { background: var(--accent-2); }

/* The legacy CSS only guards against horizontal scroll below 992px
   (`@media max-width: 991px`). Exactly at 992px — where the desktop nav
   layout kicks in — a Bootstrap column overflows by ~15px with nothing
   to catch it. Just disable horizontal scroll everywhere; this is a
   vertical marketing site, it never needs it. */
html, body { overflow-x: hidden; }

/* Blog "Suscríbete" form used a fixed calc(100% - 150px) input width,
   which left almost no room for the placeholder text on narrow phones.
   Stack it instead below ~480px. */
@media (max-width: 480px) {
  #subscribe-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }
  #subscribe input {
    width: 100% !important;
    max-width: 100% !important;
    margin-right: 0 !important;
  }
  #subscribe button {
    width: 100%;
  }
}
