/* =========================================================
   VARIABLES
========================================================= */
:root {
  --blue-dark: #1E2A38;
  --blue-light: #E5EEF8;
  --blue-hover: #0F1927;

  --orange: #FF6A30;
  --orange-hover: #CC4F1F;

  --gray-text: #47505C;
  --white: #ffffff;

  --radius: 12px;
  --transition: .3s ease;

  /* layout */
  --container-max: 1100px;
  --container-pad: clamp(16px, 2vw, 28px);
}

/* =========================================================
   RESET + TIPOGRAFÍA
========================================================= */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0
}

body {
  font-family: Inter, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--gray-text);
  background: var(--white);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: Lato, sans-serif;
  font-weight: 700;
  line-height: 1.2;
  color: var(--blue-dark);
}

h1 {
  font-size: 2rem;
  margin: .5rem 0
}

h2 {
  font-size: 1.5rem;
  margin: .5rem 0
}

h3 {
  font-size: 1.2rem;
  margin: .5rem 0
}

#hero h1 {
  font-size: 2.5rem;
  color: #fff
}

a {
  color: var(--orange);
  text-decoration: none;
  transition: color var(--transition)
}

a:hover {
  color: var(--orange-hover)
}

/* =========================================================
   SECCIONES
========================================================= */
section {
  padding: 3.5rem 1rem;
  animation: fadeInUp .8s ease;
  scroll-margin-top: 80px;
}

section>h2 {
  text-align: center;
  margin: 0 0 2.5rem;
}

/* =========================================================
   BOTONES
========================================================= */
.btn-primary {
  display: inline-block;
  padding: 1rem 2rem;
  margin: 1rem auto;
  border-radius: var(--radius);
  background: var(--orange);
  color: #fff;
  font-weight: 600;
  transition: background var(--transition);
  border: 0;
}

.btn-primary:hover {
  background: var(--orange-hover);
  color: #fff;
}

.btn-pack {
  display: inline-block;
  margin-top: 1rem;
  background: var(--orange);
  color: #fff;
  padding: .75rem 1.5rem;
  border-radius: var(--radius);
  transition: background var(--transition);
  box-shadow: 0 4px 12px rgba(0, 0, 0, .1);
}

.btn-pack:hover {
  background: var(--orange-hover)
}

.btn-ghost {
  margin: .4rem auto 0;
  border: 2px solid var(--orange);
  color: var(--orange);
  padding: .45rem 1.2rem;
  border-radius: var(--radius);
  font-weight: 600;
  line-height: 1;
  background: transparent;
  transition: background .25s, color .25s;
  box-sizing: border-box;
  text-decoration: none;
  display: inline-block;
}

.btn-ghost:hover {
  background: var(--orange);
  color: #fff;
}

/* =========================================================
   HEADER & NAVEGACIÓN
========================================================= */
header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(30, 42, 56, .5);
  backdrop-filter: blur(5px);
}

nav {
  min-height: 64px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--blue-dark);
  padding: .7rem 1rem;
  isolation: isolate;
}

nav a.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff
}

nav ul.menu {
  list-style: none;
  display: flex;
  gap: 2rem;
}

nav ul.menu a {
  color: #fff;
  padding: .5rem;
  border-radius: var(--radius);
}

nav ul.menu a:hover {
  background: var(--blue-hover);
}

nav ul.menu a[aria-current="page"] {
  background: var(--orange);
  color: #fff;
}

.menu-toggle {
  display: none;
  width: 32px;
  height: 26px;
  background: none;
  border: none;
  cursor: pointer;
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 999;
}

.menu-toggle .bar {
  display: block;
  width: 100%;
  height: 3px;
  margin: 4px 0;
  background: #fff;
  transition: all .3s;
}

.menu-toggle.active .bar:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

.menu-toggle.active .bar:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active .bar:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -7px);
}

@media(max-width:768px) {
  .menu-toggle {
    display: block
  }

  nav ul.menu {
    flex-direction: column;
    position: absolute;
    top: 60px;
    right: 0;
    width: 220px;
    background: rgba(30, 42, 56, .95);
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    pointer-events: none;
    will-change: max-height, opacity;
    transition: max-height .45s, opacity .45s;
    z-index: 998;
  }

  nav ul.menu.active {
    max-height: 600px;
    opacity: 1;
    pointer-events: auto;
  }

  nav ul.menu a {
    display: block;
    padding: 1rem;
  }
}

/* =========================================================
   HERO (varios)
========================================================= */
#hero {
  background:
    linear-gradient(rgba(30, 42, 56, .3), rgba(30, 42, 56, .3)),
    url('../img/chica.webp') center/cover no-repeat;
  color: #fff;
  text-align: center;
  padding: 10rem 2rem 6rem;
}

#hero p {
  max-width: 600px;
  margin: auto
}

#hero h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: #FFF;
}

#hero2 {
  background:
    linear-gradient(rgba(30, 42, 56, .3), rgba(30, 42, 56, .3)),
    url('../img/banner.jpg') top/cover no-repeat;
  color: #fff;
  text-align: center;
  padding: 10rem 2rem;
}

#hero2 p {
  max-width: 600px;
  margin: auto
}

#hero2 h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: var(--blue-dark);
}

#hero3 {
  background:
    linear-gradient(rgba(30, 42, 56, .3), rgba(30, 42, 56, .3)),
    url('../img/hero.webp') center/cover no-repeat;
  color: #fff;
  text-align: center;
  padding: 4rem 2rem;
}

#hero3 p {
  max-width: 600px;
  margin: auto
}

#hero3 h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: #FF6A30;
}

#hero4 {
  background:
    linear-gradient(rgba(30, 42, 56, .3), rgba(30, 42, 56, .3)),
    url('../img/Cohete.webp') center/cover no-repeat;
  color: #fff;
  text-align: center;
  padding: 4rem 2rem;
}

#hero4 p {
  max-width: 600px;
  margin: auto
}

#hero4 h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: var(--white);
}

#hero5 {
  background: linear-gradient(rgba(30, 42, 56, .3), rgba(30, 42, 56, .3)), url('../img/scan-can-producto.webp') center/cover no-repeat;
  color: #fff;
  text-align: center;
  padding: 4rem 2rem;
}

#hero5 p {
  max-width: 600px;
  margin: auto
}

#hero5 h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: var(--orange);
}

#hero6 {
  background: linear-gradient(rgba(30, 42, 56, .3), rgba(30, 42, 56, .3)), url('../img/vaca-iot.webp') center/cover no-repeat;
  color: #fff;
  text-align: center;
  padding: 6rem 2rem;
}

#hero6 p {
  max-width: 600px;
  margin: auto
}

#hero6 h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: var(--orange);
}

/* =========================================================
   SERVICIOS (cards de la home)
========================================================= */
#servicios {
  padding: 3rem 1rem;
}

#servicios .cards {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
  align-items: center;
}

@media(min-width:768px) {
  #servicios .cards {
    flex-direction: row;
    justify-content: center;
    align-items: stretch;
  }
}

#servicios article {
  flex: 1 1 300px;
  max-width: 350px;
  background: var(--blue-light);
  padding: 2rem;
  border-radius: var(--radius);
  box-shadow: 0 4px 12px rgba(0, 0, 0, .1);
  text-align: center;
  transition: transform .3s, border .3s;
}

#servicios article:hover {
  transform: translateY(-5px);
  border: 4px solid var(--orange);
}

#servicios article i,
#servicios article .lucide {
  width: 48px;
  height: 48px;
  margin-bottom: 1rem;
  color: var(--orange);
  transition: transform .3s;
}

#servicios article:hover i,
#servicios article:hover .lucide {
  transform: scale(1.2)
}

#servicios article a {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  margin-top: 1rem;
  font-weight: 700;
}

/* =========================================================
   TESTIMONIOS (slider)
========================================================= */
.testi {
  padding: 4rem 1rem;
  background: var(--blue-light);
  text-align: center;
}

.testi-slider {
  max-width: 640px;
  margin: auto;
  position: relative;
}

.testi-item {
  display: none;
  flex-direction: column;
  align-items: center;
  background: linear-gradient(145deg, #ffffff 0%, #f8faff 60%);
  border-radius: var(--radius);
  padding: 2.5rem 2rem;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .06);
  position: relative;
}

.testi-item.active {
  display: flex;
  animation: fadeInUp .8s ease
}

.testi-item::before {
  content: '\f10d';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  position: absolute;
  top: -14px;
  left: -14px;
  font-size: 2.8rem;
  color: var(--orange);
  opacity: .2;
}

.testi-item img {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--orange);
  margin-bottom: 1.2rem;
}

.testi-item blockquote {
  font-size: 1.15rem;
  font-style: italic;
  margin-bottom: 1.2rem;
}

.testi-item cite {
  font-weight: 700;
  color: var(--blue-dark)
}

.testi-item cite span {
  display: block;
  font-weight: 400;
  font-size: .9rem;
  color: var(--gray-text);
}

.testi-dots {
  margin-top: 1.8rem;
  display: flex;
  justify-content: center;
  gap: .6rem;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: none;
  background: var(--blue-hover);
  opacity: .35;
  cursor: pointer;
  transition: opacity .3s, transform .3s;
  position: relative;
}

.dot:hover {
  transform: scale(1.15)
}

.dot.active {
  opacity: 1;
  background: var(--orange)
}

.dot::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--orange);
  opacity: 0;
  transform: scale(.4);
  transition: transform .35s, opacity .35s;
}

.dot:hover::after {
  opacity: .25;
  transform: scale(1.9)
}

.dot.active::after {
  opacity: .45;
  animation: pulse 2s infinite
}

.dot:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
}

/* =========================================================
   PACKS
========================================================= */
#packs {
  background: var(--blue-light);
  padding: 3rem 1rem
}

.pack-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: center;
  max-width: 1200px;
  margin: auto;
}

.pack {
  flex: 1 1 300px;
  max-width: 350px;
  background: #fff;
  padding: 2.5rem 2rem;
  border-radius: 16px;
  border: 1px solid rgba(0, 0, 0, 0.05);
  /* Sutil borde */
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, .08);
  /* Sombra suave */
  opacity: 0;
  transform: translateY(30px);
  transition: all .4s ease;
  position: relative;
  overflow: hidden;
  /* Para el badge */
}

.pack.visible {
  opacity: 1;
  transform: translateY(0);
}

.pack:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, .12);
  border-color: rgba(255, 106, 48, 0.3);
}

.pack h3 {
  font-size: 1.4rem;
  margin-bottom: 0.5rem;
  color: var(--blue-dark);
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.pack h3 i {
  color: var(--orange);
  width: 24px;
}

.pack-desc {
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
  color: #666;
  line-height: 1.5;
}

.pack ul {
  list-style: none;
  margin: 1.5rem 0;
  padding: 0;
  text-align: left;
}

.pack ul li {
  margin-bottom: 0.8rem;
  position: relative;
  padding-left: 1.5rem;
  font-size: 0.95rem;
}

.pack ul li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--orange);
  font-weight: bold;
}

#packs .pack-price {
  font-weight: 800;
  font-size: 1.8rem;
  color: var(--blue-dark);
  margin-top: auto;
  margin-bottom: 1rem;
}

/* Pack Destacado (Top Ventas) */
.pack.destacado {
  border: 2px solid var(--orange);
  background: #fff;
  transform: scale(1.05);
  z-index: 2;
  box-shadow: 0 20px 50px rgba(255, 106, 48, 0.15);
}

.pack.destacado:hover {
  transform: scale(1.08) translateY(-5px);
}

.badgetop {
  position: absolute;
  top: 0;
  right: 0;
  background: var(--orange);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 0.4rem 1rem;
  border-bottom-left-radius: 12px;
}

/* =========================================================
   CTA FINAL
========================================================= */
#cta {
  background: var(--orange);
  color: #fff;
  text-align: center;
  padding: 2rem;
}

#cta a {
  display: inline-block;
  background: #fff;
  color: var(--orange);
  padding: .75rem 1.5rem;
  border-radius: var(--radius);
  transition: background var(--transition);
}

#cta a:hover {
  background: var(--blue-dark);
  color: #fff;
}

/* =========================================================
   FOOTER
========================================================= */
footer {
  background: var(--blue-dark);
  color: #fff;
  text-align: center;
  padding: 2rem 1rem;
}

footer nav a {
  color: #fff
}

footer nav a:hover {
  text-decoration: underline
}

/* =========================================================
   BOTÓN WHATSAPP
========================================================= */
#wa-floating {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #25D366;
  color: #fff;
  font-size: 32px;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, .25);
  transition: transform .3s;
  z-index: 1200;
}

#wa-floating:hover {
  transform: scale(1.1)
}

/* =========================================================
   COOKIE BANNER (UNIFICADO) + MODAL
   — LIMPIEZA: reglas unificadas/renombradas —
========================================================= */
#cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1200;
  background: var(--blue-dark);
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .75rem;
  padding: 1rem;
  transform: translateY(100%);
  opacity: 0;
  transition: all .4s ease;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, .3);
}

#cookie-banner.visible {
  transform: translateY(0);
  opacity: 1
}

#cookie-banner .btn-group {
  display: flex;
  gap: .5rem
}

#acceptCookies {
  background: var(--orange);
  color: #fff
}

#customizeCookies {
  background: #fff;
  color: var(--blue-dark)
}

.btn-secondary {
  background: #fff;
  color: var(--blue-dark);
  border: 1px solid var(--blue-dark);
  padding: .6rem 1rem;
  border-radius: var(--radius);
  cursor: pointer;
}

.btn-link {
  background: none;
  border: none;
  color: var(--orange);
  cursor: pointer
}

#cookie-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .55);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1300;
}

#cookie-modal[hidden] {
  display: none;
}

.modal-box {
  background: #fff;
  padding: 2rem;
  max-width: 420px;
  width: 90%;
  border-radius: var(--radius);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .15);
}

.switch {
  display: flex;
  align-items: center;
  gap: .6rem;
  margin: 1rem 0;
  font-size: .95rem;
}

.switch input {
  display: none;
}

.slider {
  width: 44px;
  height: 24px;
  border-radius: 34px;
  background: #c6c6c6;
  position: relative;
  flex-shrink: 0;
  transition: .3s;
}

.slider::before {
  content: '';
  position: absolute;
  left: 3px;
  top: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  transition: .3s;
}

.switch input:checked+.slider {
  background: var(--orange);
}

.switch input:checked+.slider::before {
  transform: translateX(20px);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  margin-top: 1.2rem;
}

/* ===== RGPD checkbox ===== */
.rgpd {
  display: flex;
  align-items: flex-start;
  gap: .55rem;
  font-size: .9rem;
  flex-wrap: wrap;
}

.rgpd input {
  margin-top: .25rem;
  accent-color: var(--orange);
}

.rgpd a {
  color: var(--orange);
  text-decoration: none;
}

.rgpd a:hover {
  text-decoration: underline;
}

/* =========================================================
   CASE STUDY (foto + overlay + KPI)
========================================================= */
.case-lite {
  text-align: center;
  padding: 4rem 1rem
}

.case-photo {
  position: relative;
  max-width: 960px;
  margin: auto;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .15);
}

.case-photo>img {
  width: 100%;
  display: block
}

.case-overlay {
  position: absolute;
  inset: auto 0 0 0;
  background: rgba(30, 0, 0, .85);
  color: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  padding: 1.6rem;
}

.case-overlay blockquote {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.5;
  font-style: italic;
  max-width: 600px;
}

.case-overlay cite {
  display: block;
  margin-top: .45rem;
  font-weight: 700
}

.case-logo {
  flex: 0 0 160px;
  max-width: 30vw;
  height: auto;
  border: 3px solid #fff;
  border-radius: 6px;
}

@media(max-width:600px) {
  .case-overlay {
    flex-direction: column;
    align-items: flex-start;
    text-align: left
  }

  .case-logo {
    display: none
  }
}

.case-metrics {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  margin: 3rem 0;
}

.metric {
  position: relative;
  background: #fff;
  border-radius: var(--radius);
  padding: 1.6rem 2.2rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .06);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.metric .counter {
  font-size: 2.8rem;
  font-weight: 700;
  color: var(--orange);
  line-height: .85
}

.metric small {
  margin-top: .3rem;
  font-size: .85rem;
  color: var(--gray-text)
}

.metric::before {
  content: '\f062';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  font-size: 1rem;
  position: absolute;
  top: 18px;
  right: 18px;
  color: #25D366;
}

.metric.negative::before {
  content: '\f063';
  color: var(--orange-hover)
}

.case-cards {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  max-width: 900px;
  margin: 2rem auto;
}

@media(min-width:992px) {
  .case-cards {
    flex-direction: row
  }
}

.case-cards article {
  flex: 1;
  background: #fff;
  border-radius: var(--radius);
  padding: 2.3rem 1.6rem 1.6rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .08);
  position: relative;
}

.case-label,
.case-label-ok {
  position: absolute;
  top: -6px;
  left: 1.3rem;
  color: #fff;
  padding: .25rem .9rem;
  border-radius: 0 0 var(--radius) var(--radius);
  font-weight: 700;
  font-size: .8rem;
  letter-spacing: .4px;
}

.case-label {
  background: #f02b15;
}

.case-label-ok {
  background: #25D366;
}

.case-cards ul {
  list-style: none;
  margin-top: 1rem;
  padding-left: 0
}

.case-cards li {
  position: relative;
  padding-left: 1.4rem;
  margin-bottom: .55rem;
}

.case-cards article.acierto li::before {
  content: '\f00c';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  color: #25D366;
  position: absolute;
  left: 0;
  top: 0;
}

.case-cards article.reto li::before {
  content: '\f00d';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  color: #f02b15;
  position: absolute;
  left: 0;
  top: 0;
}

/* =========================================================
   TIMELINE "Cómo trabajamos"
   — LIMPIEZA: scoping de .step para no romper el wizard —
========================================================= */
.process {
  text-align: center;
  padding: 4rem 1rem
}

.process-steps {
  display: flex;
  flex-direction: column;
  gap: 3rem;
  max-width: 1000px;
  margin: 3rem auto;
  position: relative;
}

.process-steps::before {
  content: '';
  position: absolute;
  left: calc(50% - 2px);
  top: 0;
  width: 4px;
  height: 100%;
  background: var(--blue-light);
  z-index: -1;
}

/* antes era .step (global) */
.process .step {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .7s, transform .7s;
  background: #fff;
  border-radius: var(--radius);
  padding: 2rem 1.5rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .08);
}

.process .step.visible {
  opacity: 1;
  transform: translateY(0)
}

.process .step-icon {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--orange);
  color: #fff;
  font-size: 1.4rem;
  margin-bottom: 1rem;
}

.process .step h3 {
  margin: .5rem 0 1rem;
  font-size: 1.25rem;
  color: var(--blue-dark)
}

@media(min-width:768px) {
  .process-steps {
    flex-direction: row;
    justify-content: space-between
  }

  .process-steps::before {
    top: 50%;
    left: 0;
    width: 100%;
    height: 4px
  }

  .process .step {
    width: 220px;
    text-align: left
  }

  .process .step:nth-child(even) {
    transform: translateY(30px)
  }

  .process .step-icon {
    margin-bottom: .5rem
  }
}

/* =========================================================
   ANIMACIONES (únicas, sin duplicados)
========================================================= */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px)
  }

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

@keyframes pulse {

  0%,
  100% {
    transform: scale(1.2)
  }

  50% {
    transform: scale(1.6);
    opacity: .15
  }
}

/* ----------  PORTFOLIO  -----------*/
#portfolio {
  padding: 4rem 1rem;
  background: var(--blue-light);
}

.section-title {
  text-align: center;
  margin-bottom: 2.5rem;
}


/* ===== FILTROS PORTFOLIO ===== */
.filters {
  display: flex;
  justify-content: center;
  gap: .5rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.filter-btn {
  background: none;
  border: 2px solid var(--blue-light);
  color: var(--gray-text);
  padding: .5rem 1.2rem;
  border-radius: 30px;
  cursor: pointer;
  font-weight: 600;
  font-family: inherit;
  transition: all .3s ease;
}

.filter-btn:hover {
  border-color: var(--orange);
  color: var(--orange);
}

.filter-btn.active {
  background: var(--orange);
  border-color: var(--orange);
  color: #fff;
}

/* ===== GRID PORTFOLIO ===== */
.proj-track {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: auto;
  scroll-snap-type: x mandatory;
  overflow-x: auto;
  padding-bottom: 1rem;
}

@media(min-width:768px) {
  .proj-track {
    overflow: visible;
    scroll-snap-type: none;
  }
}

.proj-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 4px 18px rgba(0, 0, 0, .12);
  transform: translateY(30px);
  opacity: 0;
  transition: transform .7s ease, opacity .7s ease;
  scroll-snap-align: start;
  display: block;
  /* Para el filtro */
}

/* Ocultar tarjetas filtradas */
.proj-card.filtered-out {
  display: none;
}

.proj-card.visible {
  opacity: 1;
  transform: none;
}

.proj-card picture,
.proj-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Badge de Caso de Éxito */
.case-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  background: rgba(255, 106, 48, 0.9);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 4px 10px;
  border-radius: 20px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(4px);
}


.proj-info {
  position: absolute;
  inset: auto 0 0 0;
  padding: 1.4rem 1.6rem;
  background: linear-gradient(0deg, rgba(0, 0, 0, .7) 0%, rgba(0, 0, 0, .25) 80%, transparent);
  color: #fff;
  display: flex;
  flex-direction: column;
  gap: .6rem;
}

.proj-info h3 {
  font-size: 1.1rem;
  line-height: 1.3;
  max-height: 2.6rem;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #fff;
}

.proj-info .tagline {
  font-size: .9rem;
  opacity: .85;
}

/* ===== SECCIÓN SERVICIOS (limpia) ===== */
.serv-block {
  position: relative;
  padding: 5rem 1rem;
}

.serv-track {
  display: flex;
  gap: 1.5rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-inline: 1rem;
  scroll-behavior: smooth;
}

.serv-card {
  position: relative;
  min-width: 280px;
  scroll-snap-align: start;
  background: var(--blue-light);
  color: var(--blue-dark);
  border-radius: var(--radius);
  padding: 2rem 1.5rem;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .18);
  transition: transform .35s ease, box-shadow .35s ease, border .35s ease;
  flex-shrink: 0;
}

.serv-card a {
  color: inherit;
}

.serv-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 26px rgba(0, 0, 0, .26);
  border: 2px solid var(--orange);
}

.serv-card h3 {
  font-size: 1.25rem;
  margin-bottom: .35rem;
  color: var(--blue-dark);
}

.serv-card .pack-desc {
  color: var(--gray-text);
  margin-bottom: 1rem;
}

.serv-card ul {
  margin: .8rem 0;
  font-size: .88rem;
  line-height: 1.35rem;
  list-style: none;
  padding-left: 0;
}

.serv-card ul li {
  color: var(--gray-text);
  margin-bottom: .3rem;
}

.serv-card .pack-price {
  font-weight: 700;
  color: var(--orange);
  font-size: 1.3rem;
  text-align: center;
  margin-top: 1rem;
}

.serv-card .btn-ghost {
  align-self: center;
  margin: .6rem auto 0;
  display: block;
  text-align: center;
  width: fit-content;
}

.serv-card:hover .btn-ghost {
  border-color: var(--orange);
  color: var(--orange);
  background: transparent;
}

.serv-card:hover .btn-ghost:hover {
  background: var(--orange);
  color: #fff;
}

.track-btn {
  display: none;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, .9);
  color: var(--orange);
  font-size: 1.1rem;
  cursor: pointer;
  z-index: 2;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .1);
}

.track-btn.prev {
  left: .5rem;
}

.track-btn.next {
  right: .5rem;
}

@media (max-width: 991px) {
  .track-btn {
    display: flex;
    align-items: center;
    justify-content: center;
  }
}

@media (min-width: 992px) {
  .serv-track {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
    overflow: visible;
    padding-inline: 0;
    max-width: 1200px;
    margin: 0 auto;
  }

  .serv-card {
    min-width: initial;
    max-width: 350px;
    flex: 0 1 350px;
  }
}

.section-title {
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  text-align: center;
  margin-bottom: 2.5rem;
  position: relative;
}

.section-title::after {
  content: "";
  display: block;
  width: 60px;
  height: 3px;
  background: var(--orange);
  margin: .6rem auto 0;
  transform: scaleX(.3);
  transition: transform .4s cubic-bezier(.22, 1, .36, 1);
}

.serv-block:hover .section-title::after {
  transform: scaleX(1);
}

.serv-block:nth-of-type(odd) {
  background: #fafafa;
}

/* FAQ */
.faq {
  padding-block: 5rem;
  max-width: 780px;
  margin: auto;
}

.faq-item {
  border-bottom: 1px solid #e1e4e8;
}

.faq-q {
  width: 100%;
  text-align: left;
  padding: 1rem 0;
  background: none;
  border: none;
  font: inherit;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}

.faq-q i {
  transition: transform .3s ease;
}

.faq-q[aria-expanded="true"] i {
  transform: rotate(180deg);
}

.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height .35s ease;
}

.faq-a p {
  padding: 0 0 1rem;
}

@media (prefers-reduced-motion: reduce) {

  .faq-a,
  .faq-q i {
    transition: none;
  }
}

.legal {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem;
  line-height: 1.7;
}

/* ===== Carrusel de portfolio ===== */
.carrusel {
  position: relative;
  padding: 3rem 1rem 4rem;
  max-width: 1200px;
  margin: 0 auto;
}

.carrusel .section-title {
  margin-bottom: 1.4rem;
}

.car-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(260px, 80vw);
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding: .5rem 3rem;
}

@media (min-width:992px) {
  .car-track {
    grid-auto-columns: minmax(360px, 1fr);
  }
}

.car-item {
  scroll-snap-align: center;
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .12);
  transition: transform .35s ease, box-shadow .35s ease;
  display: grid;
  grid-template-rows: auto 48px;
}

.car-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, .16);
}

.car-item img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
}

.car-item figcaption {
  display: grid;
  place-items: center;
  padding: .5rem .8rem;
  font-size: .95rem;
  color: var(--blue-dark);
  background: linear-gradient(145deg, #ffffff 0%, #f8faff 60%);
}

.car-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, .95);
  color: var(--orange);
  box-shadow: 0 2px 10px rgba(0, 0, 0, .15);
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 26px;
  line-height: 1;
  z-index: 2;
}

.car-btn:hover {
  background: #fff;
}

.car-btn.prev {
  left: .5rem;
}

.car-btn.next {
  right: .5rem;
}

@media (max-width:600px) {
  .car-btn {
    width: 38px;
    height: 38px;
    font-size: 22px;
  }
}

.car-dots {
  display: flex;
  justify-content: center;
  gap: .5rem;
  margin-top: 1rem;
}

.car-dots button {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: none;
  background: var(--blue-hover);
  opacity: .35;
  cursor: pointer;
  transition: transform .25s, opacity .25s, background .25s;
}

.car-dots button[aria-selected="true"] {
  background: var(--orange);
  opacity: 1;
  transform: scale(1.2);
}

.car-dots button:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
}

/* Imágenes responsivas dentro del post */
.blog-content img,
article.legal img {
  display: block;
  max-width: 100%;
  width: 100%;
  height: auto;
  margin: 1.5rem auto;
  border-radius: 8px;
}

/* ===== Herramientas (SEO / Paletas / Convert / Favtool) ===== */
#seogen,
#palettegen,
#convert,
#favtool {
  padding-inline: clamp(12px, 3vw, 28px);
}

#seogen .tool-card,
#palettegen .tool-card,
#convert .tool-card,
#favtool .tool-card {
  box-sizing: border-box;
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding: var(--container-pad);
  background: #fff;
  border: 1px solid #eef2f7;
  border-radius: var(--radius, 14px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .06);
}

#seogen .grid-2,
#palettegen .grid-2,
#convert .grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width:900px) {

  #seogen .grid-2,
  #palettegen .grid-2,
  #convert .grid-2 {
    grid-template-columns: 1fr 1fr;
  }
}

#seogen .field.right,
#palettegen .field.right,
#convert .field.right {
  justify-self: start;
}

@media (min-width:900px) {

  #seogen .field.right,
  #palettegen .field.right,
  #convert .field.right {
    justify-self: end;
  }
}

#convert input[type="file"],
#convert input[type="number"],
#convert input[type="text"],
#convert select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
}

#convert .pill {
  display: inline-block;
  font-variant-numeric: tabular-nums;
  background: #fff;
  border: 1px solid #e2e8f0;
  padding: .25rem .5rem;
  border-radius: 8px;
}

#favtool .fv-grid {
  display: grid;
  gap: 1.4rem;
}

@media (min-width:992px) {
  #favtool .fv-grid {
    grid-template-columns: 1fr 1fr;
  }
}

#favtool .bt-head.split {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .8rem;
}

#favtool .uploader {
  transition: border-color .2s ease, background .2s ease;
}

#favtool .uploader.dragover {
  border-color: var(--orange, #f59e0b);
  background: #fff7ed;
}

/* ===== Destacado blog en home ===== */
#blog-destacado {
  padding: 4rem 1rem;
  background: #fafafa;
  text-align: center;
}

.blog-card {
  max-width: 900px;
  margin: auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .1);
}

.blog-card img {
  width: 100%;
  height: auto;
  object-fit: cover;
}

.blog-info {
  padding: 1.5rem;
  text-align: left;
}

.blog-info h3 {
  margin-bottom: .6rem;
  font-size: 1.4rem;
}

.blog-info p {
  margin-bottom: 1rem;
  color: var(--gray-text);
}

/* =========================================================
   CARDS DE BLOG (Harmonizado)
   ========================================================= */
.card-blog {
  background: var(--white);
  border: 1px solid var(--blue-light);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.card-blog:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  border-color: var(--orange);
}

.card-blog img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
}

.card-blog .card-content {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card-blog .card-content h3 {
  font-size: 1.15rem;
  margin: 0.5rem 0;
  line-height: 1.4;
}

.card-blog .card-content p {
  font-size: 0.95rem;
  color: var(--gray-text);
  margin-bottom: 0;
}

/* =========================================================
   CARDS DE BLOG (Harmonizado)
   ========================================================= */
.card-blog {
  background: var(--white);
  border: 1px solid var(--blue-light);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.card-blog:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  border-color: var(--orange);
}

.card-blog img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
}

.card-blog .card-content {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card-blog .card-content h3 {
  font-size: 1.15rem;
  margin: 0.5rem 0;
  line-height: 1.4;
}

.card-blog .card-content p {
  font-size: 0.95rem;
  color: var(--gray-text);
  margin-bottom: 0;
}