/*
Theme Name: VJC Victor Dev
Theme URI: https://vjcvictor.dev/
Author: Victor Javier Cuero
Description: Tema WordPress a medida para portafolio profesional, preparado para ACF PRO.
Version: 1.4.0
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 8.0
Text Domain: vjc-victor
*/
/* ==========================================================================
   VARIABLES GLOBALES Y RESET
   ========================================================================== */
:root {
  --bg-main: #0b0f19;
  --bg-card: rgba(22, 31, 48, 0.7);
  --accent: #00f2fe;
  --text-main: #f9fafb;
  --text-muted: #94a3b8;
  --window-bar: #161f30;
  
  --font-titles: 'Plus Jakarta Sans', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-code: 'JetBrains Mono', monospace;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: var(--bg-main);
  color: var(--text-muted);
  font-family: var(--font-body);
  overflow-x: hidden;
}

/* ==========================================================================
   1. ESTILO HEADER FLOTANTE (GLASSMORPHISM)
   ========================================================================== */
.main-header {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 1100px;
  z-index: 1000;
  
  /* El secreto del efecto cristal */
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 50px;
  padding: 12px 24px;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* ==========================================================================
   ESTILOS ESPECÍFICOS DEL LOGO (vjcvictor.dev)
   ========================================================================== */
.logo-container {
  display: flex;
  align-items: center;
  text-decoration: none; /* Elimina el subrayado de enlace */
  font-family: var(--font-titles); /* Plus Jakarta Sans / Poppins */
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: -0.5px;
  transition: transform 0.2s ease;
}

/* Efecto sutil al pasar el mouse sobre el logo */
.logo-container:hover {
  transform: scale(1.02);
}

/* Los símbolos < y > estilo código */
.logo-bracket {
  font-family: var(--font-code); /* JetBrains Mono */
  color: var(--text-muted);      /* Gris sutil */
  font-weight: 400;
  opacity: 0.6;
}

/* El acrónimo vjc en un tono verde/grisáceo plano */
.logo-vjc {
  color: #879a8a; /* Verde oliva minimalista y plano */
  margin: 0 2px;
}

/* Tu nombre principal en blanco puro */
.logo-name {
  color: var(--text-main); /* #f9fafb */
  margin-left: 5px;
}

/* La extensión .dev en tu azul/celeste de acento */
.logo-dev {
  color: var(--accent); /* #00f2fe */
}

/* Ajuste responsivo para pantallas pequeñas */
@media (max-width: 480px) {
  .logo-container {
    font-size: 1.1rem; /* Se encoge un poco en móviles para no empujar los botones */
  }
}
.logo {
  font-family: var(--font-titles);
  color: var(--text-main);
  font-size: 1.3rem;
  font-weight: 700;
}

.logo span {
  color: var(--accent);
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 32px;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.3s ease;
}

.nav-links a:hover {
  color: var(--accent);
}

.btn-talk {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
  padding: 8px 20px;
  border-radius: 30px;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.3s ease;
}

.btn-talk:hover {
  background: var(--accent);
  color: var(--bg-main);
  box-shadow: 0 0 15px rgba(0, 242, 254, 0.4);
}

/* ==========================================================================
   2. VENTANA DE CÓDIGO SIMULADA (HERO RIGHT)
   ========================================================================== */
.hero-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 120px 10% 60px 10%;
  gap: 40px;
}

.hero-code-window {
  flex: 1;
  max-width: 550px;
  background: rgba(14, 22, 37, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  font-family: var(--font-code);
}

.window-header {
  background: var(--window-bar);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  margin-right: 8px;
}
.red { background: #ff5f56; }
.yellow { background: #ffbd2e; }
.green { background: #27c93f; }

.window-title {
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-left: auto;
  margin-right: auto;
}

.window-body {
  padding: 24px;
  font-size: 0.9rem;
  line-height: 1.6;
  overflow-x: auto;
}

/* Resaltado de sintaxis (colores de código dev) */
.token-keyword { color: #ff79c6; }
.token-variable { color: #f1fa8c; }
.token-string { color: #50fa7b; }
.token-function { color: #8be9fd; }
.token-comment { color: #6272a4; font-style: italic; }

/* Animación de Escritura (Typing Effect) */
.typing-text {
  display: inline-block;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  width: 0;
  animation: typing 3.5s steps(35) 1s forwards;
}

.cursor {
  color: var(--accent);
  animation: blink 1s infinite;
}

@keyframes typing {
  from { width: 0; }
  to { width: 100%; }
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* Responsivo básico */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .hero-section { flex-direction: column; text-align: center; padding-top: 140px; }
}



/* ==========================================================================
   ESTILOS COMPARTIDOS DE SECCIONES
   ========================================================================== */
.services-section, .portfolio-section {
  padding: 100px 10%;
  max-width: 1200px;
  margin: 0 auto;
}

.section-title-wrapper {
  text-align: center;
  margin-bottom: 60px;
}

.section-title {
  font-family: var(--font-titles);
  color: var(--text-main);
  font-size: 2.5rem;
  margin-bottom: 15px;
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto;
}

/* ==========================================================================
   3. GRID DE SERVICIOS (GLASS + GLOW EFFECT)
   ========================================================================== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.service-card {
  background: var(--bg-card);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  padding: 40px 30px;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.service-icon {
  font-size: 2.5rem;
  margin-bottom: 20px;
}

.service-card h3 {
  font-family: var(--font-titles);
  color: var(--text-main);
  font-size: 1.4rem;
  margin-bottom: 15px;
}

.service-card p {
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Efecto Hover Inteligente */
.service-card:hover {
  transform: translateY(-8px);
  border-color: var(--accent);
  box-shadow: 0 15px 35px rgba(0, 242, 254, 0.15);
}

/* ==========================================================================
   4. SECCIÓN PORTAFOLIO (MOCKUPS CON SCROLL)
   ========================================================================== */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
  gap: 40px;
}

@media (max-width: 500px) {
  .portfolio-grid { grid-template-columns: 1fr; }
}

.project-card {
  background: rgba(14, 22, 37, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.03);
  border-radius: 20px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Maqueta del Navegador */
.mockup-browser {
  background: #161f30;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.browser-dots {
  padding: 10px 16px;
  display: flex;
  gap: 6px;
  background: #0e1625;
}

.browser-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
}

.browser-screen {
  height: 280px;
  overflow: hidden;
  position: relative;
}

/* Animación de scroll en la imagen */
.scroll-image {
  width: 100%;
  height: auto;
  position: absolute;
  top: 0;
  left: 0;
  transition: transform 4s ease-in-out; /* Controla la velocidad del recorrido */
}

/* Al pasar el mouse por la tarjeta, la web simula un scroll hacia abajo */
.project-card:hover .scroll-image {
  transform: translateY(calc(-100% + 280px));
}

/* Datos del proyecto */
.project-info {
  padding: 0 10px;
}

.project-tag {
  font-family: var(--font-code);
  color: var(--accent);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.project-info h3 {
  font-family: var(--font-titles);
  color: var(--text-main);
  margin: 10px 0;
  font-size: 1.5rem;
}

.project-info p {
  font-size: 0.95rem;
  line-height: 1.5;
  margin-bottom: 20px;
}

.project-link {
  color: var(--text-main);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.3s;
}

.project-card:hover .project-link {
  color: var(--accent);
}



/* ==========================================================================
   5. SECCIÓN CONTACTO Y FORMULARIO
   ========================================================================== */
.contact-section {
  padding: 100px 10%;
  background: radial-gradient(circle at 80% 20%, rgba(0, 242, 254, 0.03) 0%, transparent 50%);
}

.contact-container {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 60px;
  align-items: center;
}

@media (max-width: 900px) {
  .contact-container { grid-template-columns: 1fr; gap: 40px; }
}

.contact-tag {
  font-family: var(--font-code);
  color: var(--accent);
  font-size: 0.9rem;
}

.contact-title {
  font-family: var(--font-titles);
  color: var(--text-main);
  font-size: 2.3rem;
  margin: 15px 0 20px 0;
  line-height: 1.3;
}

.contact-description {
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 40px;
}

/* Canales directos */
.direct-channels {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.channel-item {
  display: flex;
  align-items: center;
  gap: 15px;
}

.channel-icon {
  font-size: 1.8rem;
  background: rgba(255, 255, 255, 0.03);
  padding: 10px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.channel-item h4 {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.channel-item a {
  color: var(--text-main);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s;
}

.channel-item a:hover {
  color: var(--accent);
}

/* El Formulario */
.contact-form-wrapper {
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 20px;
  padding: 40px;
  backdrop-filter: blur(10px);
}

.form-row {
  display: flex;
  gap: 20px;
}

@media (max-width: 600px) {
  .form-row { flex-direction: column; gap: 0; }
}

.form-group {
  display: flex;
  flex-direction: column;
  margin-bottom: 20px;
  flex: 1;
}

.form-group label {
  color: var(--text-main);
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 8px;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  background: rgba(11, 15, 25, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 14px;
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: all 0.3s ease;
}

/* Efecto Focus Inteligente */
.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 10px rgba(0, 242, 254, 0.2);
}

/* Botón de Enviar animado */
.btn-submit {
  width: 100%;
  background: var(--accent);
  color: var(--bg-main);
  border: none;
  padding: 16px;
  border-radius: 8px;
  font-weight: bold;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  transition: all 0.3s ease;
}

.btn-submit:hover {
  box-shadow: 0 5px 20px rgba(0, 242, 254, 0.4);
  transform: translateY(-2px);
}

.btn-submit:hover .arrow {
  transform: translateX(5px);
}

.arrow {
  transition: transform 0.3s ease;
}

/* ==========================================================================
   6. ESTILOS DEL FOOTER
   ========================================================================== */
.main-footer {
  text-align: center;
  padding: 40px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.03);
  font-size: 0.85rem;
}

/* ==========================================================================
   AJUSTES ESPECÍFICOS PARA TU VENTANA DE CÓDIGO
   ========================================================================== */

/* Tu contenedor de código con el ancho ideal */
.hero-code-window {
  flex: 1;
  width: 100%;
  max-width: 580px; /* Un poco más ancho para que tu código PHP no haga saltos de línea raros */
  background: rgba(14, 22, 37, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  overflow: hidden;
  font-family: var(--font-code);
}

.window-body pre {
  margin: 0;
  white-space: pre; /* Mantiene tus sangrías y saltos de línea tal cual los escribiste */
}

/* Animación ajustada para el largo de tu cadena de texto */
.typing-text {
  display: inline-block;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  width: 0;
  /* Ajustado a 38 pasos (characters) para tu string exacto */
  animation: typing 4s steps(38) 1.5s forwards; 
}

/* Mantenemos el parpadeo del cursor de consola */
.cursor {
  color: var(--accent);
  font-weight: bold;
  animation: blink 1s infinite;
  margin-left: 2px;
}

@keyframes typing {
  from { width: 0; }
  to { width: 100%; }
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}


/* ==========================================================================
   2. HERO SECTION MEJORADO - ESTILOS
   ========================================================================= */
.hero-section {
  position: relative; /* Para el posicionamiento del backdrop */
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr; /* Equilibrio visual */
  align-items: center;
  padding: 140px 10% 80px 10%;
  gap: 60px;
  overflow: hidden; /* Mantiene el skill cloud dentro */
}

/* Columna Izquierda: Texto */
.hero-text-block {
  z-index: 10; /* Por encima del backdrop */
}

.developer-tag {
  font-family: var(--font-code);
  color: var(--accent); /* Celeste neón */
  font-size: 1.1rem;
  font-weight: 500;
  display: block;
  margin-bottom: 15px;
}

.hero-title {
  font-family: var(--font-titles);
  color: var(--text-main);
  font-size: 3.2rem;
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -2px;
  margin-bottom: 25px;
}

.hero-subtitle {
  color: var(--text-muted);
  font-size: 1.15rem;
  line-height: 1.6;
  max-width: 550px;
  margin-bottom: 45px;
}

/* Nuevos Botones */
.hero-btns-wrapper {
  display: flex;
  gap: 20px;
}

.btn-primary {
  background: var(--accent);
  color: var(--bg-main);
  padding: 14px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  font-size: 1rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 242, 254, 0.3);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 242, 254, 0.5);
}

.btn-secondary {
  background: transparent;
  color: var(--accent);
  border: 2px solid var(--accent);
  padding: 12px 28px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.btn-secondary:hover {
  background: rgba(0, 242, 254, 0.1);
}

/* Skill Cloud Backdrop (Glassmorphism) */
.skill-cloud-backdrop {
  position: absolute;
  top: 20%;
  left: 0;
  width: 100%;
  height: 80%;
  opacity: 0.15; /* Sutil, de fondo */
  pointer-events: none; /* No interfiere */
  z-index: 1;
}

.glass-icon {
  position: absolute;
  font-family: var(--font-code);
  font-weight: bold;
  color: var(--accent);
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  display: flex;
  justify-content: center;
  align-items: center;
  animation: floatSkill 10s infinite ease-in-out;
}

/* Posicionamiento y animación de cada icono */
.icon-php { width: 60px; height: 60px; top: 10%; left: 15%; animation-delay: 0s; }
.icon-js { width: 50px; height: 50px; top: 30%; left: 35%; animation-delay: 2s; color: #f7df1e; border-color: #f7df1e; }
.icon-shopify { width: 70px; height: 70px; top: 50%; left: 10%; animation-delay: 4s; color: #96bf48; border-color: #96bf48; font-size: 1.5rem;}
.icon-wp { width: 55px; height: 55px; top: 70%; left: 25%; animation-delay: 6s; color: #21759b; border-color: #21759b; font-size: 1.2rem;}
.icon-html { width: 45px; height: 45px; top: 20%; left: 55%; animation-delay: 1s; color: #e34f26; border-color: #e34f26; }

@keyframes floatSkill {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-20px); }
}

/* Ajustes Responsivos */
@media (max-width: 1024px) {
  .hero-title { font-size: 2.5rem; }
  .hero-section { grid-template-columns: 1fr; text-align: center; gap: 40px;}
  .hero-subtitle { margin: 0 auto 40px auto; }
  .hero-btns-wrapper { justify-content: center; }
  .skill-cloud-backdrop { top: 50%; height: 50%; }
}


/* ==========================================================================
   4. COMPONENTES DEL SLIDER DE PORTAFOLIO
   ========================================================================== */
.slider-wrapper {
  position: relative;
  width: 100%;
  overflow-x: auto; /* Esto permite que el script aplique el scroll horizontal */
  scroll-behavior: smooth;
  scrollbar-width: none; 
}

.slider-wrapper::-webkit-scrollbar {
  display: none; /* Oculta barra en Chrome/Safari */
}

.portfolio-slider {
  display: flex;
  gap: 25px; 
  padding: 10px 5px 30px 5px;
  width: max-content; /* 🔥 OBLIGATORIO: Fuerza al contenedor a estirarse a lo ancho con sus hijos */
}

/* CARDS MÁS PEQUEÑAS Y COMPACTAS */
.project-card.compact {
  flex: 0 0 330px; /* Tamaño fijo para que no se deformen en el slider */
  background: rgba(14, 22, 37, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  transition: border-color 0.3s, transform 0.3s;
}

.project-card.compact:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
}

.project-card.compact .browser-screen {
  height: 190px; /* Pantalla de preview reducida */
  border-radius: 0 0 8px 8px;
}

.project-card.compact .project-info h3 {
  font-size: 1.25rem;
  margin: 8px 0;
}

.project-card.compact .project-info p {
  font-size: 0.88rem;
  line-height: 1.4;
  margin-bottom: 15px;
  height: 40px; /* Forzar misma altura en descripción */
  overflow: hidden;
}

/* Botones de Control (Arriba a la derecha) */
.slider-controls {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-bottom: 20px;
}

.slider-btn {
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-main);
  font-size: 1.2rem;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.slider-btn:hover {
  background: var(--accent);
  color: var(--bg-main);
  border-color: var(--accent);
  box-shadow: 0 0 15px rgba(0, 242, 254, 0.3);
}




/* ==========================================================================
   MÓVIL Y TABLETS (PANTALLAS MENORES A 768px)
   ========================================================================== */
@media (max-width: 768px) {
  
  /* 1. SECCIONES Y TEXTOS GENERALES */
  .services-section, .portfolio-section, .contact-section {
    padding: 60px 5%; /* Menos padding a los lados para ganar espacio en pantalla */
  }

  .section-title {
    font-size: 1.8rem; /* Títulos más legibles en pantallas chicas */
    line-height: 1.2;
  }

  .section-subtitle {
    font-size: 0.95rem;
  }

  /* 2. HEADER FLOTANTE REINVENTADO PARA MÓVIL */
  .main-header {
    top: 12px;
    width: 94%;
    padding: 8px 16px;
    border-radius: 20px; /* Bordes más sutiles en móvil */
  }

  /* Ocultamos los links de texto para evitar amontonamiento */
  .nav-links {
    display: none; 
  }

  /* El botón "¿Hablamos?" se vuelve el protagonista a la derecha */
  .btn-talk {
    padding: 6px 14px;
    font-size: 0.8rem;
  }

  /* 3. HERO SECTION (APILADO VERTICAL) */
  .hero-section {
    grid-template-columns: 1fr; /* Una sola columna */
    padding-top: 110px; /* Evita que el header tape el título */
    gap: 30px;
    text-align: center; /* Centramos el texto para mejor estética móvil */
  }

  .hero-title {
    font-size: 2.2rem;
    letter-spacing: -1px;
  }

  .hero-subtitle {
    font-size: 1rem;
    margin: 0 auto 30px auto;
  }

  .hero-btns-wrapper {
    flex-direction: column; /* Botones uno arriba del otro para que sea fácil clickear con el pulgar */
    gap: 12px;
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
  }

  .btn-primary, .btn-secondary {
    width: 100%;
    text-align: center;
    padding: 12px;
  }

  /* Nube de iconos flotantes en móvil */
  .skill-cloud-backdrop {
    top: 40%;
    opacity: 0.08; /* Menos opacidad para que no distraiga al leer en pantallas chicas */
  }

  /* Ajustamos el tamaño máximo de la ventana de código */
  .hero-code-window {
    max-width: 100%;
  }

  .window-body {
    padding: 14px;
    font-size: 0.75rem; /* Achicamos la fuente del código para evitar que rompa o haga scroll interno excesivo */
  }

  /* 4. GRID DE SERVICIOS (1 COLUMNA) */
  .services-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .service-card {
    padding: 30px 20px;
  }

  /* 5. SLIDER DE PORTAFOLIO TÁCTIL NATIVO */
  .slider-controls {
    display: none; /* 🔥 Ocultamos las flechas en celular. Los usuarios prefieren arrastrar con el dedo (Swipe) */
  }

  .slider-wrapper {
    /* Activamos el "Magnetic Scroll" táctil */
    scroll-snap-type: x mandatory; 
    padding-bottom: 15px;
  }

  .project-card.compact {
    flex: 0 0 85vw; /* Cada tarjeta ocupa el 85% del ancho de la pantalla móvil, dejando ver que hay otra al lado */
    scroll-snap-align: center; /* La tarjeta se magnetiza al centro al deslizar */
  }

  .project-card.compact .browser-screen {
    height: 170px; /* Reducimos la altura del preview */
  }

  /* Desactivamos el efecto hover-scroll en móvil (ya que no hay puntero de mouse) */
  .project-card:hover .scroll-image {
    transform: none; 
  }
}

html {
  scroll-behavior: smooth; /* 🔥 Hace que todo desplazamiento interno sea ultra suave */
}

/* Ajuste extra para que el header flotante no tape los títulos al llegar */
section {
  scroll-margin-top: 95px; /* Le da un aire de espacio al frenar el scroll */
}


/* Estado Inicial: Oculto y un poquito desplazado hacia abajo */
.js .reveal-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), 
              transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform, opacity; /* Optimiza el rendimiento de la GPU */
}

/* Estado Activo: Cuando el JS detecta que el usuario llegó a la sección */
.js .reveal-on-scroll.active {
  opacity: 1;
  transform: translateY(0);
}

/* Opcional: Si quieres que las tarjetas de servicios aparezcan escalonadas (en cascada) */
.services-grid .service-card:nth-child(2) { transition-delay: 0.1s; }
.services-grid .service-card:nth-child(3) { transition-delay: 0.2s; }
.services-grid .service-card:nth-child(4) { transition-delay: 0.3s; }



/* ==========================================================================
   CORRECCIÓN DEL EFECTO SCROLL EN PORTAFOLIO
   ========================================================================== */
.browser-screen {
  height: 190px; /* Altura fija del contenedor de la pantalla */
  overflow: hidden;
  position: relative;
  background-color: #0e1625; /* Fondo oscuro por si la imagen tarda en cargar */
  border-radius: 0 0 8px 8px;
}

.scroll-image {
  width: 100%;
  height: auto;
  position: absolute;
  
  /* 🔥 CLAVE 1: Forzamos a que la imagen siempre empiece pegada arriba */
  top: 0; 
  left: 0;
  
  /* Animación fluida de 4 segundos */
  transition: transform 4s cubic-bezier(0.43, 0.13, 0.23, 0.96); 
  
  /* Evita el parpadeo de hardware en algunos navegadores */
  transform: translateY(0); 
}

/* 🔥 CLAVE 2: Al pasar el mouse por CUALQUIER tarjeta, la imagen se desplaza 
   hacia ARRIBA de forma exacta, deteniéndose justo donde termina la foto */
.project-card.compact:hover .scroll-image {
  transform: translateY(calc(-100% + 190px)); 
}



/* ==========================================================================
   7. BOTÓN FLOTANTE DE WHATSAPP CON EFECTO PULSO
   ========================================================================== */
.whatsapp-floating {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 60px;
  height: 60px;
  background-color: #25d366;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  text-decoration: none;
  z-index: 9999; /* Siempre por encima de todo */
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.4);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* El icono interno */
.whatsapp-floating .wp-icon {
  font-size: 1.8rem;
  line-height: 1;
}

/* Animación de pulso neón a los lados */
.whatsapp-floating::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  background-color: #25d366;
  border-radius: 50%;
  z-index: -1;
  animation: wpPulse 2s infinite;
}

/* Hover interactivo (se agranda un poco al pasar el cursor) */
.whatsapp-floating:hover {
  transform: scale(1.1);
  box-shadow: 0 12px 30px rgba(37, 211, 102, 0.6);
}

@keyframes wpPulse {
  0% {
    transform: scale(0.95);
    opacity: 0.8;
  }
  70% {
    transform: scale(1.4);
    opacity: 0;
  }
  100% {
    transform: scale(0.95);
    opacity: 0;
  }
}

/* Enlace de texto verde en la sección de contacto */
.wp-link-text {
  color: #25d366 !important;
  font-weight: 600;
}
.wp-link-text:hover {
  text-shadow: 0 0 10px rgba(37, 211, 102, 0.4);
}

/* Ajuste móvil para que no estorbe al pulsar con el dedo */
@media (max-width: 768px) {
  .whatsapp-floating {
    bottom: 20px;
    right: 20px;
    width: 54px;
    height: 54px;
  }
  .whatsapp-floating .wp-icon {
    font-size: 1.6rem;
  }
}


/* ==========================================================================
   8. CONTROL DE LOGOS OFICIALES DE WHATSAPP (SVG)
   ========================================================================== */

/* Estilo para el SVG del botón flotante */
.wp-svg-icon {
  width: 30px;
  height: 30px;
  fill: #ffffff; /* El icono oficial de WhatsApp se dibuja en blanco */
  transition: transform 0.3s ease;
}

.whatsapp-floating:hover .wp-svg-icon {
  transform: rotate(8px) scale(1.05); /* Divertido micro-efecto de giro al pasar el cursor */
}

/* Estilo para el contenedor del icono en la sección de contacto */
.channel-icon-wp-wrapper {
  background: rgba(37, 211, 102, 0.1); /* Fondo verde traslúcido */
  border: 1px solid rgba(37, 211, 102, 0.25);
  padding: 10px;
  border-radius: 12px;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 48px;
  height: 48px;
}

/* El SVG interno de la lista */
.wp-svg-inline {
  width: 24px;
  height: 24px;
  fill: #25d366; /* En la sección de contacto el logo es de color verde plano */
}

/* Reafirmamos el color verde oficial de la tipografía de acción */
.wp-link-text {
  color: #25d366 !important;
  font-weight: 600;
  text-decoration: none;
  transition: opacity 0.3s;
}

.wp-link-text:hover {
  opacity: 0.9;
  text-shadow: 0 0 12px rgba(37, 211, 102, 0.3);
}
/* WordPress theme integration */
.logo-container { max-width: 245px; min-width: 180px; }
.logo-image { display:block; width:100%; height:auto; max-height:48px; object-fit:contain; }
.form-status { margin-bottom:18px; padding:12px 14px; border-radius:8px; font-size:.9rem; }
.form-status.is-success { background:rgba(39,201,63,.12); border:1px solid rgba(39,201,63,.35); color:#8bf59b; }
.form-status.is-error { background:rgba(255,95,86,.12); border:1px solid rgba(255,95,86,.35); color:#ff928c; }
.admin-bar .main-header { top:56px; }
@media (min-width:783px){ .admin-bar .main-header { top:56px; } }
@media (max-width:782px){ .admin-bar .main-header { top:70px; } }
@media (max-width:768px){ .logo-container{min-width:140px;max-width:185px;} }


/* ========================================================================== 
   9. APARICIÓN LIVIANA DE SECCIONES
   Solo usa opacity + transform (propiedades aceleradas por GPU) y respeta
   prefers-reduced-motion para no penalizar accesibilidad ni rendimiento.
   ========================================================================== */
.js .reveal-section:not(.is-hero) {
  opacity: 0;
  transform: translate3d(0, 18px, 0);
  transition: opacity .55s ease, transform .55s cubic-bezier(.2,.7,.2,1);
  will-change: opacity, transform;
}

.js .reveal-section:not(.is-hero).active {
  opacity: 1;
  transform: translate3d(0, 0, 0);
  will-change: auto;
}

/* El hero entra de inmediato, sin esperar al observer. */
.js .reveal-section.is-hero .hero-text-block,
.js .reveal-section.is-hero .hero-code-window {
  opacity: 0;
  transform: translate3d(0, 14px, 0);
  animation: vjcHeroIn .55s ease forwards;
}
.js .reveal-section.is-hero .hero-code-window { animation-delay: .10s; }

@keyframes vjcHeroIn {
  to { opacity: 1; transform: translate3d(0,0,0); }
}

/* Micro stagger interno cuando la sección ya está visible. */
.js .services-section.reveal-section .service-card,
.js .portfolio-section.reveal-section .project-card,
.js .contact-section.reveal-section .contact-info,
.js .contact-section.reveal-section .contact-form-wrapper {
  opacity: 0;
  transform: translate3d(0, 10px, 0);
  transition: opacity .42s ease, transform .42s ease;
}
.js .reveal-section.active .service-card,
.js .reveal-section.active .project-card,
.js .reveal-section.active .contact-info,
.js .reveal-section.active .contact-form-wrapper {
  opacity: 1;
  transform: translate3d(0,0,0);
}
.js .services-section.active .service-card:nth-child(2),
.js .portfolio-section.active .project-card:nth-child(2),
.js .contact-section.active .contact-form-wrapper { transition-delay: .06s; }
.js .services-section.active .service-card:nth-child(3),
.js .portfolio-section.active .project-card:nth-child(3) { transition-delay: .12s; }
.js .services-section.active .service-card:nth-child(4),
.js .portfolio-section.active .project-card:nth-child(4) { transition-delay: .18s; }

/* WhatsApp: SVG completo, centrado y estable. */
.whatsapp-floating .wp-svg-icon {
  display: block;
  width: 31px;
  height: 31px;
  fill: #fff;
}
.channel-icon-wp-wrapper .wp-svg-inline {
  display: block;
  width: 25px;
  height: 25px;
  fill: #25d366;
}

@media (prefers-reduced-motion: reduce) {
  .js .reveal-section,
  .js .reveal-on-scroll,
  .js .reveal-section .service-card,
  .js .reveal-section .project-card,
  .js .reveal-section .contact-info,
  .js .reveal-section .contact-form-wrapper,
  .js .reveal-section.is-hero .hero-text-block,
  .js .reveal-section.is-hero .hero-code-window {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
    transition: none !important;
  }
  .whatsapp-floating::before { animation: none; }
}
