/* ---------- VARIABLES ---------- */
:root {
  --text: #22221c;
  --accent: #bf930d;
  --bg: #ffffff;
}

/* ---------- GENERAL ---------- */
body {
  margin: 0;
  background: var(--bg);
  font-family: Poppins, sans-serif;
  overflow-x: hidden;
}

.page-logo {
  width: 100%;
  display: flex;
  justify-content: center;
  padding: 40px 0 20px;
}

.page-logo img {
  height: 60px;
  width: auto;
}

/* ---------- HERO ---------- */
.serv-hero {
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 0 20px;
}

.hero-inner {
  max-width: 1200px;
  width: 100%;
  text-align: center;
  padding: 20px;
}

/* Title grande */
.hero-title {
  font-size: clamp(36px, 10vw, 110px);
  margin: 0;
  font-weight: 900;
  color: #00224e;
  line-height: 1.05;
  opacity: 0;
  letter-spacing: -1px;
  padding: 20px; /* separación con bordes laterales */
  transform-origin: center;
  position: relative;
}

/* Intro grande */
.hero-intro p {
  font-size: clamp(20px, 3vw, 34px);
  max-width: 900px;
  margin: 25px auto 35px;
  color: #00224e;
  line-height: 1;
  opacity: 0;
}

/* ===========================
   SEO PERFORMANCE SECTION
=========================== */

.seo-performance {
  padding: 6rem 1.5rem;
}

.seo-wrapper {
  max-width: 1200px;
  margin: 0 auto;

  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

/* TEXTO */

.seo-text h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: #00224e;
}

.seo-text p {
  font-family: "Poppins", sans-serif;
  font-size: 1.2rem;
  line-height: 1.3;
  color: #00224e;
  margin-bottom: 1rem;
}

/* CONTENEDOR CARDS */

.seo-cards {
  position: relative;
  width: 100%;
  height: 320px;
}

/* CARD BASE */

.seo-card {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 280px;
  height: 280px;
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15),
    inset 0 0 0 1px rgba(0, 0, 0, 0.05);
  transition: transform 0.6s ease, box-shadow 0.6s ease;
  opacity: 0;
}

.seo-card img {
  width: 100%;
  height: 90%;
  object-fit: cover;
}

/* POSICIONES */

.seo-card.center {
  transform: translate(-50%, -50%) scale(1);
  z-index: 3;
}

.seo-card.left {
  transform: translate(-85%, -50%) rotate(-12deg) scale(0.9);
  z-index: 1;
  opacity: 0.9;
}

.seo-card.right {
  transform: translate(-15%, -50%) rotate(12deg) scale(0.9);
  z-index: 1;
  opacity: 0.9;
}

/* HOVER SUAVE */

.seo-cards:hover .seo-card.left {
  transform: translate(-118%, -52%) rotate(-16deg) scale(0.88);
}

.seo-cards:hover .seo-card.right {
  transform: translate(16%, -60%) rotate(16deg) scale(0.88);
}

.seo-cards:hover .seo-card.center {
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.25),
    inset 0 0 0 1px rgba(0, 0, 0, 0.08);
}

.ads-cta {
  margin-top: 2.5rem;
  display: flex;
  justify-content: center;
}

.ads-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 22px;
  font-size: 0.95rem;
  font-weight: 600;
  color: #4e84a7;
  text-decoration: none;
  border: 1px solid #4e84a7;
  border-radius: 999px;
  transition: all 0.35s ease;
}

.ads-btn i {
  font-size: 14px;
  transition: transform 0.35s ease;
}

.ads-btn:hover {
  background: #00224e;
  color: #fff;
  border-color: var(--accent);
}

.ads-btn:hover i {
  transform: translateX(4px);
}

/* ==== LAPTOP CARDS (nuevo formato) ==== */

.carousel-container {
  width: 100%;
  max-width: 1200px;
  margin: 10px auto 6px;
  padding: 40px 0 20px;
  margin-bottom: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  position: relative;
}

.carousel {
  position: relative;
  width: 600px;
  height: 330px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible; /* Las cards pueden sobresalir */
}

.card-wrapper {
  position: relative;
  width: 100%;
  height: 480px;
}

.laptop-card {
  position: absolute;
  top: 0;
  left: 50%;
  width: 450px;
  height: 280px;
  opacity: 0.7;
  transform: translateX(-50%) translateY(80px) scale(0.3);
  transition: opacity 0.25s ease;
  will-change: transform;
  z-index: 1;
}

.laptop-card.active {
  opacity: 1;
}

.portfolio-title {
  text-align: center;
  font-size: clamp(36px, 10vw, 110px);
  color: #00224e;
  margin-top: 30px;
  font-family: Poppins, sans-serif;
  font-weight: 900;
  letter-spacing: 1px;
}

/* Título arriba de la notebook */
.card-top-title {
  position: absolute;
  width: 100%;
  text-align: center;
  font-size: 20px;
  font-weight: 600;
  color: #22221c;
  letter-spacing: 1.2px;
  opacity: 0;
  transition: 0.3s;
}

/* Recuadro inferior */
.card-info-box {
  position: absolute;
  width: 100%;
  background: none;
  border: 1px solid #4e84a7;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  padding: 18px 16px 20px;
  text-align: center;
  border-radius: 14px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12),
    inset 0 0 0 1px rgba(255, 255, 255, 0.4);
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 0.35s ease, transform 0.35s ease;
  background-size: 200% 200%;
  animation: none;
}

.card-info-box p {
  margin: 6px 0;
  font-size: 14px;
  color: #22221c;
  line-height: 1.4;
}

/* Botón */
.info-btn {
  display: inline-block;
  margin-top: 12px;
  padding: 12px 22px;
  color: #00224e;
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: 18px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.3px;
  text-decoration: none;
  box-shadow: 0 0px 5px rgba(83, 83, 83, 0.35);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.info-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 0px 12px #00224e79;
}

/* Solo visible cuando la card está en el centro */
.laptop-card.active .card-top-title,
.laptop-card.active .card-info-box {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.card-info-box::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 40px;
  height: 2px;
  background: #00224e;
  transform: translateX(-50%);
  border-radius: 2px;
}

.nav-btn {
  color: #050505;
  font-size: 18px;
  width: 25px;
  height: 25px;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff8e;
  box-shadow: 0 0 15px rgba(252, 251, 251, 0.774);
  transition: 0.25s;
  z-index: 9999;
}

.nav-btn:hover {
  background: #ffffff;
  color: #22221c;
  border-radius: 50%;
  transform: scale(1.08);
}

.laptop-img {
  width: 100%;
  height: auto;
  display: block;
  pointer-events: none;
  position: relative;
  z-index: 3;
}

/* ZONA DE PANTALLA */
.screen-area {
  position: absolute;
  top: 26%; /* AJUSTADO A TU IMAGEN */
  left: 12%; /* AJUSTADO A TU IMAGEN */
  width: 75.7%; /* AJUSTADO A TU IMAGEN */
  height: 77.5%; /* AJUSTADO A TU IMAGEN */
  background: #000000;
  overflow: hidden;
  border-radius: 6px;
  z-index: 1;
}

.screen-area video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/*** SERVICIOS EXTRAS ***/

.extra-services {
  padding: 6rem 0 0 2rem;
}

.extra-wrapper {
  max-width: 1200px;
  margin: auto;
  text-align: center;
}

.extra-title {
  font-size: 2.2rem;
  margin-bottom: 0.8rem;
  color: #00224e;
}

.extra-subtitle {
  font-size: 1rem;
  color: #00224e;
  margin-bottom: 4rem;
}

.extra-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.extra-card {
  border: 1px solid rgba(0, 0, 0, 0.08);
  padding: 2.5rem 2rem;
  border-radius: 16px;
  background: #fff;
  transition: all 0.4s ease;
  opacity: 1;
}

.extra-card i {
  font-size: 2.5rem;
  color: #4e84a7;
  margin-bottom: 1.2rem;
}

.extra-card h3 {
  font-size: 1.1rem;
  color: #00224e;
  margin-bottom: 0.5rem;
}

.extra-card p {
  font-size: 0.9rem;
  color: #00224e;
  margin-bottom: 1.5rem;
}

.extra-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
}

.extra-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid #4e84a7;
  color: #4e84a7;
  padding: 0.6rem 1.4rem;
  border-radius: 18px;
  cursor: pointer;
  transition: all 0.3s ease;
}


.extra-btn:hover {
  background: #00224e;
  color: #fff;
}

/*** MODAL ***/

.service-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  z-index: 999;
}

.service-modal.active {
  opacity: 1;
  pointer-events: all;
}

.modal-box {
  background: #fff;
  padding: 2.5rem;
  border-radius: 20px;
  width: 90%;
  max-width: 420px;
  text-align: center;
  position: relative;
}

.modal-box h3 {
  color: #00224e;
  margin-bottom: 1rem;
}

.modal-box p {
  font-size: 0.95rem;
  color: #22221c;
}

.modal-box ul {
  list-style: none;
  padding-left: 0;
  text-align: left;
  margin: 1.5rem 0;
}

.modal-box ul li {
  text-decoration: none;
  margin-bottom: 0.4rem;
}

.modal-whatsapp {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 1rem;
  background: none;
  color: #4e84a7;
  border: 0.5px solid #4e84a7;
  padding: 0.4rem 1rem;
  border-radius: 18px;
  text-decoration: none;
}

.modal-whatsapp:hover {
  background: #00224e;
  color: #fff;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: none;
  font-size: 1.6rem;
  cursor: pointer;
}

/** WHATSAPP FLOTANTE **/

.floating-wpp {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 42px;
  height: 42px;
  background-color: none;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.3rem;
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
  transform: scale(0.85);
  text-decoration: none;
}

/* Ícono centrado perfecto */
.floating-wpp i {
  color: var(--text);
  text-decoration: none;
  line-height: 1;
}

/* Latido */
@keyframes pulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.6);
  }
  70% {
    transform: scale(1.08);
    box-shadow: 0 0 0 14px rgba(37, 211, 102, 0);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
  }
}

.floating-wpp.is-visible {
  opacity: 1;
  pointer-events: auto;
  animation: pulse 2.2s infinite;
}

/***** RESPONSIVE *****/

/** TABLETS **/

@media (min-width: 768px) and (max-width: 1024px) {
  /* HERO */
  .serv-hero {
    min-height: auto;
    padding: 80px 24px;
  }

  .hero-title {
    font-size: clamp(48px, 7vw, 78px);
    transform-origin: center;
  }

  .hero-intro p {
    font-size: 22px;
    line-height: 1.2;
  }

  /* SEO */
  .seo-wrapper {
    grid-template-columns: 1fr;
    gap: 3rem;
    text-align: center;
  }

  .seo-cards {
    height: 300px;
  }

  .seo-card {
    width: 250px;
    height: 250px;
  }

  /* CAROUSEL */
  .carousel {
    width: 100%;
    height: 300px;
  }

  .laptop-card {
    width: 380px;
    height: 240px;
    left: 50%;
    transform: translateX(-50%) scale(0.9);
  }

  /* EXTRAS */
  .extra-cards {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.6rem;
  }
}

/** MOVIL GRANDE **/

@media (min-width: 481px) and (max-width: 767px) {
  .hero-title {
    font-size: 44px;
  }

  .hero-intro p {
    font-size: 20px;
  }

  /* SEO */
  .seo-wrapper {
    grid-template-columns: 1fr;
  }

  .seo-cards {
    height: 260px;
  }

  .seo-card {
    width: 220px;
    height: 220px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
    transition: transform 0.4s ease;
  }

  .seo-cards:hover .seo-card {
    box-shadow: none;
  }

  /* CAROUSEL */
  .carousel {
    height: 260px;
  }

  .laptop-card {
    width: 320px;
    height: 200px;
  }

  /* EXTRAS */
  .extra-cards {
    grid-template-columns: 1fr;
  }
}

/** MOVIL CHICO **/

@media (max-width: 480px) {
  /* LOGO */
  .page-logo {
    padding: 24px 0 12px;
  }

  .page-logo img {
    height: 3rem;
    width: auto;
  }

  /* HERO */
  .serv-hero {
    min-height: auto;
    align-items: flex-start;
    padding-top: 16px;
    padding-bottom: 32px;
  }

  .hero-inner {
    padding: 10px 16px;
    text-align: center;
  }

  /* TITLE */
  .hero-title {
    font-size: 36px;
    padding: 0;
    margin-bottom: 2rem;
  }

  /* TEXTO */
  .hero-intro p {
    font-size: 18px;
    margin: 0;
    line-height: 1.45;
  }

  /* SEO  */

  .seo-performance {
    padding: 2.5rem 1rem;
    margin-top: -20px;
  }

  .seo-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
  }

  .seo-text {
    display: contents;
  }

  .seo-text h2 {
    width: 100%;
    text-align: center;
    font-size: 1.6rem;
    line-height: 1.2;
    margin-bottom: 6px;
  }

  .seo-cards {
    display: block;
    margin-left: auto;
    margin-right: auto;
  }

  .seo-card {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 200px;
    height: 200px;
    border-radius: 16px;
    transform: translate(-50%, -50%) !important;
    opacity: 1;
  }

  .seo-card.center {
    z-index: 3;
    transform: translate(-50%, -50%) scale(0.9) !important;
  }

  .seo-card.left {
    z-index: 1;
    transform: translate(-50%, -50%) translateX(-80px) rotate(-12deg) scale(0.8) !important;
  }

  .seo-card.right {
    z-index: 1;
    transform: translate(-50%, -50%) translateX(80px) rotate(12deg) scale(0.8) !important;
  }

  .seo-text p {
    width: 100%;
    text-align: center;
    font-size: 1rem;
    line-height: 1.45;
    margin-bottom: 12px;
  }

  .ads-cta {
    margin-top: 1rem;
    margin-bottom: 2rem;
    display: flex;
    justify-content: center;
  }

  /* PORTFOLIO */

  .portfolio-title {
    font-size: 44px;
    margin-bottom: 10px;
  }

  .carousel-container {
    padding: 30px 0 10px;
    margin-bottom: 80px;
    gap: 12px;
    overflow: visible;
  }

  .carousel {
    max-width: 100vw;
    overflow: visible;
  }

  .card-wrapper {
    height: 420px;
  }

  .laptop-card {
    width: 280px;
    height: 180px;
    top: 0;
    left: 50%;
    transform: translateX(-50%) translateY(80px) scale(0.3);
  }

  .screen-area {
    top: 26%;
    left: 12%;
    width: 75.7%;
    height: 77.5%;
    border-radius: 4px;
  }

  .card-info-box {
    padding: 14px 22px 16px;
    border-radius: 12px;
  }

  .card-info-box p {
    font-size: 13px;
  }

  .info-btn {
    font-size: 12px;
    border-radius: 18px;
    padding: 14px 20px;
  }

  .nav-btn {
    color: #000000;
    font-size: 15px;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    padding: 8px;
    background: none;
    box-shadow: 0 0 15px rgba(17, 17, 17, 0.692);
    margin: 0 10px;
  }

  .nav-btn:hover {
    background: none;
  }

  /* Sección general */
  .extra-services {
    padding: 60px 16px;
  }

  .extra-wrapper {
    max-width: 100%;
  }

  /* Títulos */
  .extra-title {
    font-size: 28px;
    line-height: 1.2;
    margin-bottom: 12px;
    text-align: center;
  }

  .extra-subtitle {
    font-size: 14px;
    line-height: 1.5;
    text-align: center;
    margin-bottom: 40px;
  }

  /* Cards en columna */
  .extra-cards {
    display: flex;
    flex-direction: column;
    gap: 20px;
  }

  /* Card individual */
  .extra-card {
    width: 100%;
    padding: 28px 22px;
    border-radius: 16px;

    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }

  /* Ícono */
  .extra-card i {
    font-size: 28px;
  }

  /* Título card */
  .extra-card h3 {
    font-size: 18px;
    line-height: 1.3;
  }

  /* Texto */
  .extra-card p {
    font-size: 14px;
    line-height: 1.5;
  }

  /* Botón */
  .extra-btn {
    margin-top: 10px;
    align-self: flex-start;
    font-size: 13px;
    padding: 10px 20px;
    border-radius: 999px;
  }
}

/** META **/

@media (max-width: 600px) and (hover: none) and (pointer: coarse) {
  html,
  body {
    overflow-x: hidden;
    overscroll-behavior: none;
  }

  /* Neutralizar hover y brillo */
  .seo-card,
  .laptop-card,
  .extra-card {
    filter: none !important;
  }

  .seo-cards:hover .seo-card,
  .extra-card:hover {
    box-shadow: none;
  }

  /* Touch friendly */
  .info-btn,
  .extra-btn,
  .modal-whatsapp {
    min-height: 48px;
  }

  /* Modales seguros */
  .modal-box {
    max-height: 90vh;
    overflow-y: auto;
  }
}
