/* ─────────────────────────────────────────
   PORTAFOLIO CSS
───────────────────────────────────────── */

/* Clases utilitarias */
.hide-desktop {
  display: none;
}

/* 1. HERO PORTAFOLIO */
body, * {
  cursor: auto !important;
}

.portafolio-hero {
  background: #ffffff;
  padding: 40vh var(--gutter) 2vh; /* Separación exacta solicitada por el usuario */
  min-height: 50vh;
  display: flex;
  align-items: flex-end;
}

.ph-container {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  width: 100%;
  gap: 4rem;
}

.ph-left {
  flex: 0 0 65%; /* Permitimos un poco más de ancho para que quepa la fuente más grande */
  max-width: 65%;
}

.ph-title {
  font-family: 'Inter', sans-serif;
  font-weight: 800;
  font-size: clamp(4rem, 10vw, 11rem); /* Recuperamos tamaño (altura) sin llegar al extremo original */
  transform: scaleY(1.15); /* Estiramos sutilmente a lo alto para dar la apariencia de más altura sin extender lo horizontal */
  transform-origin: left bottom;
  line-height: 0.85; 
  letter-spacing: -0.04em;
  margin: 0;
  display: block;
  text-transform: uppercase;
  text-shadow: 0px 10px 25px rgba(0,0,0,0.08), 0px 2px 4px rgba(0,0,0,0.04); 
}

.title-black {
  color: #111;
}

.title-gray {
  color: #a3a3a3;
}

.ph-count {
  font-size: clamp(1rem, 2.5vw, 2rem);
  color: #888;
  font-weight: 600;
  vertical-align: top;
  position: relative;
  top: -1vw;
  letter-spacing: 0;
  text-shadow: none;
}

.ph-right {
  flex: 0 1 400px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.ph-label {
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  color: #888;
  font-weight: 500;
}

.ph-desc {
  font-family: 'Inter', sans-serif;
  font-size: 1.1rem;
  color: #333;
  line-height: 1.5;
  margin: 0;
}

/* 2. PROYECTOS STICKY STACK */
.portafolio-stack {
  background: #0a0a0a;
  padding: 2vh 0 15vh;
  position: relative;
  /* El wrapper externo no necesita estar pinned, las cards serán sticky */
}

.stack-container {
  width: 90%;
  max-width: 1400px;
  margin: 0 auto;
  position: relative;
}

.stack-card {
  position: sticky;
  background: #161616;
  border-radius: 20px;
  box-shadow: 0 -10px 40px rgba(0,0,0,0.5);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  /* Margen inferior para permitir el scroll si la página fuera muy larga */
  margin-bottom: 20vh; 
  border: 1px solid rgba(255,255,255,0.05);
  will-change: transform; /* Optimización GPU para evitar lag al hacer scroll */
}

/* Top offsets para el apilamiento (el height se calcula para que acaben en 95vh) */
.card-1 { top: 10vh; height: 85vh; z-index: 1; width: 94%; margin-left: 0%; }
.card-2 { top: 14vh; height: 81vh; z-index: 2; width: 94%; margin-left: 2%; }
.card-3 { top: 18vh; height: 77vh; z-index: 3; width: 94%; margin-left: 4%; }
.card-4 { top: 22vh; height: 73vh; z-index: 4; width: 94%; margin-left: 6%; }

.card-browser-bar {
  height: 48px;
  background: #1f1f1f;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.browser-info {
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  color: #aaa;
  font-weight: 500;
}

.browser-dots {
  position: absolute;
  right: 20px;
  display: flex;
  gap: 8px;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.dot-red { background: #ff5f56; }
.dot-yellow { background: #ffbd2e; }
.dot-green { background: #27c93f; }

.card-media {
  flex: 1;
  position: relative;
  overflow: hidden;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.media-bg {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0.6; /* Oscurecida para contraste */
  transition: transform 0.8s ease;
}

.media-overlay {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: linear-gradient(180deg, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.6) 100%);
}

.client-logo {
  position: relative;
  z-index: 2;
  max-width: 250px;
  max-height: 150px;
  filter: drop-shadow(0 10px 20px rgba(0,0,0,0.5));
  transition: transform 0.5s ease;
}

.stack-card:hover .media-bg {
  transform: scale(1.05);
}

.stack-card:hover .client-logo {
  transform: scale(1.05);
}

/* 3. PRICING (NUEVO DISEÑO) */
.pricing-new-section {
  background: #0a0a0a;
  padding: 10vh var(--gutter) 15vh;
  position: relative;
  z-index: 5; /* por encima del footer */
}

.pricing-new-header {
  text-align: center;
  margin-bottom: 5rem;
}

.pricing-main-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(4rem, 10vw, 8rem);
  color: #fff;
  line-height: 1;
  margin: 0;
  letter-spacing: 2px;
}

.pricing-main-subtitle {
  font-family: 'Inter', sans-serif;
  font-size: 1.1rem;
  color: #bbb;
  max-width: 600px;
  margin: 1rem auto 0;
}

.pricing-new-container {
  background: #151515;
  border-radius: 20px;
  padding: 3rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  max-width: 1200px;
  margin: 0 auto;
  border: 1px solid rgba(255,255,255,0.05);
}

.pricing-new-card {
  background: #0e0e0e;
  border-radius: 16px;
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(255,255,255,0.03);
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.pricing-new-card:hover {
  border-color: rgba(255,255,255,0.1);
  transform: translateY(-5px);
}

.pnc-title {
  font-family: 'Inter', sans-serif;
  font-size: 2rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 0.5rem 0;
}

.pnc-desc {
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  color: #888;
  line-height: 1.5;
  margin: 0 0 2rem 0;
  min-height: 45px;
}

.pnc-price {
  display: flex;
  align-items: flex-end;
  gap: 0.3rem;
  margin-bottom: 2rem;
}

.pnc-amount {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 4rem;
  color: #fff;
  line-height: 0.8;
}

.pnc-currency {
  font-family: 'Inter', sans-serif;
  font-size: 1.2rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 0.3rem;
}

.pnc-per {
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 0.3rem;
}

.pnc-divider {
  border: none;
  border-top: 1px solid rgba(255,255,255,0.1);
  margin: 0 0 2rem 0;
}

.pnc-features {
  flex: 1;
}

.pnc-features-title {
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  color: #fff;
  font-weight: 600;
  margin: 0 0 1rem 0;
}

.pnc-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.pnc-list li {
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  color: #aaa;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  line-height: 1.4;
}

.pnc-list i {
  color: #164c4a; /* Verde Tomato King */
  margin-top: 3px;
  background: rgba(22, 76, 74, 0.2);
  padding: 4px;
  border-radius: 4px;
  font-size: 0.7rem;
}

.pnc-footer {
  margin-top: 3rem;
}

.pnc-timeline {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  margin-bottom: 1.5rem;
}

.pnc-tl-label {
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  color: #666;
}

.pnc-tl-val {
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  color: #fff;
  font-weight: 500;
}

.pnc-btn {
  display: inline-block;
  width: 100%;
  text-align: center;
  background: transparent;
  color: #fff;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.5rem;
  letter-spacing: 1px;
  padding: 1rem;
  border-radius: 30px;
  text-decoration: none;
  border: 1px solid rgba(255,255,255,0.2);
  transition: all 0.3s ease;
}

.pnc-btn:hover {
  background: #fff;
  color: #000;
}

/* Responsive Portafolio */
@media (max-width: 992px) {
  .ph-container {
    flex-direction: column;
    align-items: flex-start;
    gap: 2rem;
  }
  .ph-right {
    flex: auto;
  }
  .pricing-new-container {
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    box-sizing: border-box;
    gap: 2rem;
  }
  .pricing-new-card {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    box-sizing: border-box;
    padding: 1.5rem;
  }
}

@media (max-width: 768px) {
  .hide-desktop {
    display: inline !important;
  }
  /* Fix sub-pixel white line gap on scroll */
  .pricing-new-section {
    margin-top: -2px;
    position: relative;
    z-index: 10;
  }
  .ph-title {
    font-size: clamp(2.5rem, 12vw, 4rem);
    transform: none;
  }
  .ph-left {
    max-width: 100%;
  }
  /* Stacking on mobile: smaller height and width, distinct top/left offsets */
  .card-1 { top: 15vh; height: 50vh; width: 90%; margin-left: 0%; }
  .card-2 { top: 18vh; height: 47vh; width: 90%; margin-left: 3%; }
  .card-3 { top: 21vh; height: 44vh; width: 90%; margin-left: 6%; }
  .card-4 { top: 24vh; height: 41vh; width: 90%; margin-left: 9%; }
  
  .client-logo { max-width: 140px; }
  .pnc-amount { font-size: 3rem; }
}
