/* ---------- VARIABLES ---------- */
:root {
  --text: #22221c;
  --accent: #bf930d;
  --bg: #ffffff;
}

/* ---------- GENERAL ---------- */
body {
  margin: 0;
  background: var(--bg);
  font-family: Poppins, sans-serif;
  overflow-x: hidden;
  overscroll-behavior-x: none;
}

.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: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 35px 0 20px;
}

.hero-inner {
  max-width: 1200px;
  width: 100%;
  text-align: center;
  padding: 20px;
}

/* Title grande */
.hero-title {
  font-size: clamp(30px, 8vw, 100px);
  margin: 0;
  font-weight: 900;
  color: #00224e;
  line-height: 1.05;
  opacity: 0;
  letter-spacing: -1px;
  padding: 20px;
  transform-origin: center;
  position: relative;
  top: 25px;
}

/* Intro grande */
.hero-intro p {
  font-size: clamp(20px, 3vw, 34px);
  max-width: 900px;
  margin: 25px auto 35px;
  color: #00224e;
  line-height: 1.35;
  opacity: 0;
  margin-top: 100px;
}

.portfolio-title {
  text-align: center;
  font-size: clamp(36px, 10vw, 110px); /* 🔥 Igual que hero-title */
  color: #00224e;
  margin-top: 30px;
  margin-bottom: 20px;
  font-family: Poppins, sans-serif;
  font-weight: 900;
  letter-spacing: -1px;
}

/***** PORTFOLIO ******/

/* ---------- PORTFOLIO SECTIONS (stacked) ---------- */
.portfolio-sections {
  position: relative;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}
/* Cada sección crea su panel con header sticky */
.portfolio-section {
  position: relative;
  z-index: 1;
  border-radius: 10px;
  margin-bottom: 120px; /* espacio entre secciones mientras suben */
  overflow: hidden;
}

.portfolio-section:not(:first-child) {
  margin-top: -120px; /* se meten debajo ligeramente */
}

/* Panel que contiene el header y el contenido */
.portfolio-panel {
  position: relative;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 0 10px rgba(34, 34, 28, 0.06);
  overflow: visible;
  padding: 20px;
}

/* Header sticky: se queda visible en top mientras el panel esta en viewport */
.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 10000;
  padding: 8px 12px;
  margin-bottom: 18px;
  backdrop-filter: blur(4px);
}

/* Título del subtítulo (arriba izquierda) */
.panel-title {
  font-size: 20px;
  margin: 0;
  color: #00224e;
  font-weight: 700;
}

/* Botón WhatsApp (arriba derecha) */
.wa-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 22px;
  font-size: 0.95rem;
  font-weight: 600;
  color: #00224e;
  text-decoration: none;
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: 18px;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.24);
  transition: all 0.35s ease;
}
.wa-btn i {
  color: #4e84a7;
  font-size: 18px;
}

.panel-content {
  position: relative;
  z-index: 1;
}

/* GRID de mockups: 4 columnas responsive */
.mockup-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  align-items: start;
  margin-bottom: 8px;
}

/* Cada mockup (device) */
.mockup {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Phone frame (visual) */
.phone-frame {
  width: 100%;
  max-width: 220px;
  aspect-ratio: 9 / 18;
  position: relative;
  background: #0e0e0e;
  border-radius: 18px;
  padding: 6px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08),
    0 4px 15px rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* pantalla interna */
.phone-frame::before {
  content: "";
  position: absolute;
  inset: 12px;
  border-radius: 14px;
  box-shadow: inset 0 0 0 1px rgba(250, 3, 3, 0.08);
  z-index: 1;
  pointer-events: none;
}

/* parlante superior */
.phone-frame::after {
  content: "";
  position: absolute;
  top: 9px;
  left: 50%;
  transform: translateX(-50%);
  width: 46px;
  height: 4px;
  border: 0.1px solid #22221c4f;
  border-radius: 4px;
  background: rgb(94, 94, 94);
  z-index: 3;
}

/* media dentro del phone */
.mockup-media,
.mockup-video {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  border-radius: 14px;
  display: block;
}

/* Stories (9:16) */
.mockup-media.is-story {
  object-fit: cover; /* llena */
}

/* Posts (1:1 / 4:5) */
.mockup-media.is-post {
  object-fit: contain; /* entra completo */
}

/* Controles custom sobre videos */
.video-controls {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
}

/* PLAY CENTRAL */
.vc-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(2px);
  color: #fff;
  font-size: 20px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.6);
  cursor: pointer;
  pointer-events: auto;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.vc-play:hover {
  transform: translate(-50%, -50%) scale(1.08);
}

/* CONTROLES INFERIORES */
.vc-actions {
  position: absolute;
  bottom: 10px;
  right: 10px;
  display: flex;
  gap: 10px;
  pointer-events: auto;
}

.vc-actions button {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.25s ease;
}

.vc-actions button:hover {
  background: rgba(0, 0, 0, 0.7);
}
.portfolio-panel {
  position: relative;
  z-index: 10; /* GSAP lo irá modificando */
}

/* Espacio de salida para portfolio pinned */
.portfolio-end-spacer {
  height: 160px; /* ajustable */
}

/***** SERVICIOS COMPLEMENTARIOS *****/
.extra-services {
  padding: 140px 20px 160px;
  background: #fff;
  text-align: center;
}

.extra-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.extra-title {
  font-size: clamp(32px, 8vw, 90px);
  font-weight: 900;
  color: #00224e;
  letter-spacing: -1px;
  margin-bottom: 10px;
}

.extra-subtitle {
  font-size: 20px;
  max-width: 720px;
  margin: 0 auto 60px;
  color: #00224e;
}

.extra-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}

.extra-card {
  background: #f6f6f6;
  border-radius: 16px;
  padding: 40px 30px;
  cursor: pointer;
  transition: all 0.35s ease;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

.extra-card i {
  font-size: 32px;
  color: #4e84a7;
  margin-bottom: 20px;
}

.extra-card h3 {
  font-size: 22px;
  margin-bottom: 12px;
  color: #00224e;
}

.extra-card p {
  color: #00224e;
  font-size: 16px;
}

.extra-card:hover {
  transform: translateY(-6px);
  background: #fff;
}

.extra-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: none;
  padding: 0;
  margin-top: 14px;
  font-size: 0.95rem;
  font-weight: 600;
  color: #00224e;
  cursor: pointer;
  text-decoration: none;
}

/* Flecha */
.extra-btn i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  font-size: 0.9em;
  color: #00224e;
  position: relative;
  top: 10px;
  transition: transform 0.35s ease;
}

/* Underline animado */
.extra-btn::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -4px;
  width: 0;
  height: 2px;
  background-color: currentColor;
  transform: translateX(-50%);
  transition: width 0.35s ease;
}

/* Hover */
.extra-btn:hover::after {
  width: 100%;
}

.extra-btn:hover i {
  transform: translateX(4px);
}

/***** MODAL *****/
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.modal-overlay.active {
  display: flex;
}

.modal-box {
  background: #fff;
  border-radius: 16px;
  padding: 40px 35px;
  max-width: 520px;
  width: 90%;
  position: relative;
  text-align: center;
}

.modal-box h3 {
  color: #00224e;
  font-size: 26px;
  margin-bottom: 18px;
}

.modal-box p {
  font-size: 16px;
  color: #22221c;
  line-height: 1.6;
  margin-bottom: 30px;
}

.modal-wa {
  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;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.24);
  border-radius: 18px;
  transition: all 0.35s ease;
}

.modal-wa:hover {
  background: #00224e;
  color: #fff;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 18px;
  background: none;
  border: none;
  font-size: 28px;
  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 (max-width: 1024px) {
  /* ---------- HERO ---------- */
  .hero-title {
    font-size: clamp(56px, 7vw, 86px);
  }

  .hero-intro p {
    font-size: 22px;
    max-width: 800px;
  }

  /* ---------- PORTFOLIO GRID ---------- */
  .mockup-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .phone-frame {
    max-width: 240px;
  }

  .portfolio-end-spacer {
    height: 65vh;
  }

  /* ---------- EXTRA SERVICES ---------- */
  .extra-cards {
    grid-template-columns: repeat(2, 1fr);
  }

  .extra-title {
    font-size: 64px;
  }
}

/** MOVIL GRANDE **/

@media (max-width: 768px) {
  html,
  body {
    width: 100%;
    overflow-x: hidden;
    position: relative;
  }
  /* ---------- HERO ---------- */
  .serv-hero {
    min-height: auto;
    padding: 60px 0 30px;
  }

  .hero-title {
    font-size: clamp(40px, 9vw, 72px);
    top: 0;
  }

  .hero-intro p {
    font-size: 18px;
    margin-top: 40px;
    max-width: 90%;
  }

  /* ---------- PORTFOLIO PANEL ---------- */
  .portfolio-panel {
    padding: 18px;
  }

  /* ---------- MOCKUPS → CARRUSEL ---------- */
  .mockup-grid {
    display: flex;
    gap: 18px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: 10px 0 20px;
    -webkit-overflow-scrolling: touch;
  }

  .mockup-grid::-webkit-scrollbar {
    display: none;
  }

  .mockup {
    flex: 0 0 auto;
    scroll-snap-align: start;
  }

  .phone-frame {
    width: 75vw; /* 🔥 clave */
    max-width: 280px;
    aspect-ratio: 9 / 18;
  }

  .portfolio-end-spacer {
    height: 32vh;
  }
  /* ---------- EXTRA SERVICES ---------- */
  .extra-cards {
    grid-template-columns: 1fr;
  }

  .extra-title {
    font-size: 48px;
  }
}

/** MOVIL CHICO **/

@media (max-width: 480px) {
  html,
  body {
    width: 100%;
    overflow-x: hidden;
    position: relative;
  }
  /* ---------- LOGO ---------- */
  .page-logo {
    padding: 24px 0 12px;
  }

  .page-logo img {
    height: 44px;
  }

  /* ---------- HERO ---------- */
  .serv-hero {
    min-height: auto;
    padding: 40px 0 20px;
    align-items: flex-start;
  }

  .hero-title {
    font-size: clamp(32px, 10vw, 56px);
    top: 0;
    padding: 0 12px;
  }

  .hero-intro p {
    font-size: 16px;
    margin-top: 24px;
    margin-bottom: 0;
    line-height: 1.45;
  }

  /* ---------- PORTFOLIO TITLE ---------- */
  .portfolio-title {
    font-size: clamp(34px, 12vw, 64px);
    margin-top: 20px;
  }

  /* ---------- PORTFOLIO PANEL ---------- */

  .portfolio-section {
    margin-bottom: 0;
  }

  .portfolio-section:not(:first-child) {
    margin-top: 0;
  }
  .portfolio-panel {
    padding-left: 12px;
    padding-right: 12px;
  }

  .panel-header {
    padding: 6px 8px;
  }

  .panel-title {
    font-size: 16px;
  }

  .wa-btn {
    font-size: 14px;
    padding: 6px 10px;
  }

  /* ---------- MOCKUPS → CARRUSEL ---------- */
  .mockup-grid {
    max-width: 100vw;
    box-sizing: border-box;
    display: flex;
    gap: 14px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
  }

  .mockup-grid::-webkit-scrollbar {
    display: none;
  }

  .mockup {
    flex: 0 0 auto;
    scroll-snap-align: start;
  }

  .phone-frame {
    width: 82vw;
    max-width: 260px;
    aspect-ratio: 9 / 18;
    border-radius: 22px;
  }

  .portfolio-end-spacer {
    height: 2vh;
  }

  /* ---------- EXTRA SERVICES ---------- */
  .extra-services {
    padding: 80px 16px 100px;
  }

  .extra-title {
    font-size: 36px;
  }

  .extra-subtitle {
    font-size: 16px;
    margin-bottom: 40px;
  }

  .extra-cards {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  /* ---------- MODAL ---------- */
  .modal-box {
    padding: 28px 22px;
  }

  .modal-box h3 {
    font-size: 22px;
  }
}
