/* =========================
   PÁGINA SERVICIOS
========================= */
.services-page {
  padding: 24px 0 42px;
}

.services-section {
  padding-bottom: 56px;
}

.services-layout {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 42px;
}

/* =========================
   CARRUSEL
========================= */
.services-carousel-wrap {
  width: 100%;
  overflow: hidden;
}

.services-carousel {
  display: flex;
  gap: 34px;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding: 20px 10px 14px;
  cursor: grab;
  scrollbar-width: none;
}

.services-carousel::-webkit-scrollbar {
  display: none;
}

.services-carousel.is-dragging {
  cursor: grabbing;
}

/* =========================
   CARD
========================= */
.service-card {
  flex: 0 0 360px;
  width: 360px;
  height: 560px;
  perspective: 1400px;
  position: relative;
  -webkit-tap-highlight-color: transparent;
}

.service-card-inner {
  width: 100%;
  height: 100%;
  position: relative;
  transition: transform 0.75s ease;
  transform-style: preserve-3d;
}

.service-card.is-flipped .service-card-inner {
  transform: rotateY(180deg);
}

.service-face {
  position: absolute;
  inset: 0;
  border-radius: 40px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 16px 18px 28px rgba(85, 92, 140, 0.20);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  overflow: hidden;
}

.service-front {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 34px 24px 30px;
}

.service-back {
  transform: rotateY(180deg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px 26px;
}

/* =========================
   CONTENIDO FRONTAL
========================= */
.service-figure {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 340px;
  position: relative;
}

.service-figure::after {
  content: "";
  position: absolute;
  bottom: 12px;
  width: 120px;
  height: 18px;
  background: radial-gradient(circle, rgba(0,0,0,0.14) 0%, rgba(0,0,0,0.04) 55%, transparent 100%);
  filter: blur(2px);
  border-radius: 999px;
}

.service-figure img {
  max-width: 78%;
  max-height: 280px;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  animation: floatingService 3.4s ease-in-out infinite;
  filter: drop-shadow(0 18px 22px rgba(84, 95, 145, 0.16));
}

.service-title {
  margin: 12px 0 0;
  text-align: center;
  font-size: 2.15rem;
  line-height: 1.05;
  font-weight: 800;
  color: var(--blue, #1f62e8);
}

/* =========================
   REVERSO
========================= */
.service-back-content {
  text-align: center;
  max-width: 250px;
}

.service-back-content h3 {
  margin: 0 0 16px;
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--blue, #1f62e8);
}

.service-back-content p {
  margin: 0;
  color: #515456;
  font-size: 1rem;
  line-height: 1.55;
  font-weight: 500;
}

/* =========================
   HINT
========================= */
.flip-hint {
  display: none;
}

/* =========================
   ACTIVA
========================= */
.service-card--active .service-face {
  box-shadow: 18px 22px 30px rgba(47, 103, 232, 0.24);
  transform: translateY(-2px);
}

/* =========================
   CTA
========================= */
.services-cta-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
}

.services-cta {
  min-width: 440px;
  min-height: 88px;
  border-radius: 999px;
  background: linear-gradient(180deg, #2f67e8 0%, #2a60dd 100%);
  color: #ffffff;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 18px 34px;
  text-align: center;
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 1.1;
  box-shadow: 0 14px 24px rgba(47, 103, 232, 0.28);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.services-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 28px rgba(47, 103, 232, 0.32);
}

/* =========================
   HUELLA
========================= */
.paw-badge--service {
  width: 88px;
  height: 88px;
  background: transparent;
  box-shadow: none;
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.paw-badge--service img {
  width: 78px;
  height: auto;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 10px 16px rgba(85, 92, 140, 0.22));
}

/* =========================
   ANIMACIONES
========================= */
@keyframes floatingService {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-9px); }
  100% { transform: translateY(0px); }
}

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* =========================
   TABLET
========================= */
@media (max-width: 900px) {
  .service-card {
    flex: 0 0 300px;
    width: 300px;
    height: 480px;
  }

  .service-front {
    padding: 28px 20px 24px;
  }

  .service-figure {
    min-height: 280px;
  }

  .service-figure img {
    max-height: 220px;
  }

  .service-title {
    font-size: 1.75rem;
  }

  .services-cta {
    min-width: 360px;
    min-height: 78px;
    font-size: 1.35rem;
  }
}

/* =========================
   MÓVIL
========================= */
@media (max-width: 768px) {
  .services-page {
    padding: 12px 0 34px;
  }

  .services-layout {
    gap: 28px;
  }

  .services-carousel {
    gap: 20px;
    padding: 10px 4px 10px;
    scroll-snap-type: x mandatory;
  }

  .service-card {
    flex: 0 0 82%;
    width: 82%;
    max-width: 320px;
    height: 460px;
    scroll-snap-align: center;
  }

  .service-face {
    border-radius: 32px;
  }

  .service-front,
  .service-back {
    padding: 24px 18px;
  }

  .service-figure {
    min-height: 250px;
  }

  .service-figure img {
    max-width: 82%;
    max-height: 205px;
  }

  .service-title {
    font-size: 1.65rem;
  }

  .service-back-content h3 {
    font-size: 1.45rem;
  }

  .service-back-content p {
    font-size: 0.96rem;
    line-height: 1.45;
  }

  .flip-hint {
    display: block;
    position: absolute;
    left: 50%;
    bottom: 16px;
    transform: translateX(-50%);
    z-index: 4;
    color: rgba(31, 98, 232, 0.72);
    font-size: 0.88rem;
    font-weight: 600;
    white-space: nowrap;
    pointer-events: none;
  }

  .services-cta {
    min-width: 100%;
    min-height: 74px;
    padding: 16px 22px;
    font-size: 1.2rem;
  }

  .paw-badge--service {
    width: 68px;
    height: 68px;
  }

  .paw-badge--service img {
    width: 58px;
  }
}

/* =========================
   EXTRA SMALL
========================= */
@media (max-width: 420px) {
  .service-card {
    height: 430px;
  }

  .service-figure {
    min-height: 220px;
  }

  .service-title {
    font-size: 1.45rem;
  }

  .services-cta {
    font-size: 1.06rem;
  }
}