:root {
  --violet: #4f3ff0;
  --blue: #3f6bf0;
  --dark: #0b0b14;
  --cream: #f7f7fb;
  --gray: #5b5b6b;
  --line: #ececf5;
  --radius: 16px;
  --display: 'Plus Jakarta Sans', system-ui, sans-serif;
  --body: 'Inter', system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--body);
  background: var(--cream);
  color: var(--dark);
}

h1, h2, h3 { font-family: var(--display); margin: 0; }

/* NAVBAR */
.navbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 5%;
  background: rgba(247,247,251,0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--dark);
  text-decoration: none;
}
.brand em { font-style: normal; color: var(--violet); }
.nav-links { display: flex; gap: 28px; }
.nav-links a {
  color: var(--gray);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  transition: color 0.15s ease;
}
.nav-links a:hover { color: var(--violet); }
.nav-link-cta { display: none; }
.nav-cta {
  background: linear-gradient(90deg, var(--violet), var(--blue));
  color: #fff;
  text-decoration: none;
  padding: 10px 20px;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 600;
}
.nav-burger {
  display: none;
  background: none;
  border: none;
  font-size: 1.4rem;
  cursor: pointer;
}

/* HERO */
.hero {
  position: relative;
  width: 100%;
}
.hero-img { width: 100%; display: block; height: auto; }
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(11,11,20,0.25) 0%, rgba(11,11,20,0.55) 100%);
}
.hero-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 20px 50px;
  color: #fff;
}
.badge {
  font-size: 0.8rem;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.3);
  padding: 6px 16px;
  border-radius: 999px;
  margin-bottom: 18px;
  color: #d7deff;
}
.hero-content h1 {
  font-size: 2.6rem;
  max-width: 780px;
  line-height: 1.2;
  margin-bottom: 16px;
}
.hero-content p {
  max-width: 560px;
  font-size: 1.05rem;
  color: rgba(255,255,255,0.85);
  margin-bottom: 96px;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; }

.btn-primary {
  display: inline-block;
  background: linear-gradient(90deg, var(--violet), var(--blue));
  color: #fff;
  text-decoration: none;
  padding: 14px 28px;
  border-radius: 999px;
  font-weight: 600;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(79,63,240,0.35); }

.btn-ghost {
  display: inline-block;
  color: #fff;
  text-decoration: none;
  padding: 14px 28px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.5);
  font-weight: 600;
  transition: background 0.15s ease;
}
.btn-ghost:hover { background: rgba(255,255,255,0.12); }

.btn-outline {
  display: inline-block;
  color: var(--violet);
  text-decoration: none;
  padding: 12px 24px;
  border-radius: 999px;
  border: 1.5px solid var(--violet);
  font-weight: 600;
  font-size: 0.9rem;
  transition: background 0.15s ease, color 0.15s ease;
}
.btn-outline:hover { background: var(--violet); color: #fff; }

/* SHARED SECTION STYLES */
section { padding: 80px 5%; max-width: 1200px; margin: 0 auto; }
.eyebrow {
  display: block;
  text-align: center;
  color: var(--violet);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 10px;
}
section h2 {
  text-align: center;
  font-size: 1.9rem;
  margin-bottom: 40px;
}
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }

/* SERVICIOS */
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 26px;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.card:hover { box-shadow: 0 12px 28px rgba(79,63,240,0.12); transform: translateY(-4px); }
.card-num {
  display: inline-block;
  font-family: var(--display);
  font-weight: 700;
  color: var(--line);
  font-size: 1.6rem;
  margin-bottom: 10px;
}
.card h3 { font-size: 1.15rem; margin-bottom: 10px; }
.card p { margin: 0; color: var(--gray); font-size: 0.95rem; line-height: 1.55; }

/* PORTFOLIO */
.project-card-link {
  text-decoration: none;
  color: inherit;
  display: block;
}
.project-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.project-card:hover { box-shadow: 0 12px 28px rgba(79,63,240,0.12); transform: translateY(-4px); }
.project-visual {
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--display);
  font-weight: 700;
  font-size: 2.2rem;
  color: #fff;
  background: linear-gradient(135deg, var(--pc1), var(--pc2));
  overflow: hidden;
}
.project-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.project-body { padding: 22px 22px 26px; }
.project-body h3 { font-size: 1.1rem; margin-bottom: 6px; }
.project-tag {
  display: inline-block;
  font-size: 0.75rem;
  color: var(--violet);
  background: #f0eeff;
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 12px;
}
.project-body p { margin: 0; color: var(--gray); font-size: 0.92rem; line-height: 1.5; }

/* TECNOLOGIAS */
.tecnologias { text-align: center; }
.tech-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
}
.tech-strip span {
  background: #fff;
  border: 1px solid var(--line);
  padding: 10px 20px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--dark);
}

/* PRECIOS */
.precios { text-align: center; }
.precios-sub { color: var(--gray); max-width: 480px; margin: -20px auto 40px; }
.price-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px 26px;
  text-align: left;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.price-card.featured {
  border-color: var(--violet);
  box-shadow: 0 14px 30px rgba(79,63,240,0.16);
}
.price-badge {
  position: absolute;
  top: -12px;
  right: 22px;
  background: linear-gradient(90deg, var(--violet), var(--blue));
  color: #fff;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 999px;
}
.price-card h3 { font-size: 1.1rem; }
.price-card p { color: var(--gray); font-size: 0.92rem; margin: 0; }
.price-desc { line-height: 1.5; margin-bottom: 4px; }
.price-features {
  list-style: none;
  padding: 0;
  margin: 8px 0 16px 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex-grow: 1;
}
.price-features li {
  font-size: 0.9rem;
  color: var(--gray);
  display: flex;
  align-items: flex-start;
  gap: 8px;
  line-height: 1.4;
}
.price-features li span {
  color: var(--violet);
  font-weight: 700;
}
.price-tag { font-family: var(--display); font-weight: 700; color: var(--violet); font-size: 1.1rem; }
.price-card a { align-self: flex-start; }

/* CONTACTO */
.contacto {
  background: linear-gradient(135deg, var(--violet), var(--blue));
  color: #fff;
  text-align: center;
  border-radius: var(--radius);
  margin: 0 5% 60px;
  max-width: none;
  padding: 60px 24px;
}
.contacto h2 { margin-bottom: 10px; font-size: 1.7rem; }
.contacto p { color: rgba(255,255,255,0.85); margin-bottom: 24px; }
.btn-wsp {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  color: #1c1c28;
  text-decoration: none;
  padding: 14px 26px;
  border-radius: 999px;
  font-weight: 600;
  transition: transform 0.15s ease;
}
.btn-wsp:hover { transform: translateY(-2px); }
.secondary-contact { margin-top: 18px; font-size: 0.9rem; }
.secondary-contact a { color: #fff; text-decoration: underline; }

/* FOOTER */
footer { background: var(--dark); padding: 30px 5%; }
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}
footer .brand { color: #fff; }
footer .brand em { color: #b9c3ff; }
footer p { color: #9a9aab; font-size: 0.82rem; margin: 0; }

/* WHATSAPP Y REDES FLOTANTES */
.social-float-group {
  position: fixed;
  top: 50%;
  right: -60px; /* Oculto por defecto a la derecha */
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: right 0.3s ease, opacity 0.3s ease;
}
.social-float-group.show {
  right: 22px; /* Visible en desktop */
  opacity: 1;
  pointer-events: auto;
}
.wsp-float {
  position: fixed;
  bottom: 22px;
  right: 22px;
  z-index: 100;
  background: #25D366;
  color: #fff;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 18px rgba(0,0,0,0.18);
  transition: transform 0.15s ease;
}
.wsp-float:hover { transform: scale(1.08); }

.social-float {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  transition: transform 0.15s ease;
}
.social-float:hover { transform: scale(1.1); }
.social-float.ig {
  background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%);
}
.social-float.fb {
  background: #1877F2;
}
.social-float.ln {
  background: #0A66C2;
}

.social-toggle {
  display: none;
}
.social-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* RESPONSIVE */
@media (max-width: 860px) {
  .nav-links {
    display: none;
    position: fixed;
    top: 58px;
    left: 0;
    width: 100%;
    height: calc(100vh - 58px);
    background: rgba(247, 247, 251, 0.98);
    backdrop-filter: blur(15px);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 32px;
    z-index: 49;
    padding: 40px;
    box-sizing: border-box;
    border-top: 1px solid var(--line);
  }
  .nav-links.active {
    display: flex;
  }
  .nav-links a {
    font-size: 1.4rem;
  }
  .nav-link-cta {
    display: inline-block;
    background: linear-gradient(90deg, var(--violet), var(--blue));
    color: #fff !important;
    text-decoration: none;
    padding: 12px 28px;
    border-radius: 999px;
    font-size: 1.1rem;
    font-weight: 600;
    margin-top: 10px;
  }
  .nav-cta { display: none; }
  .nav-burger { display: block; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  section { padding: 60px 6%; }
  .contacto { margin: 0 6% 50px; }
  .hide-mobile { display: none !important; }
  
  /* HERO RESPONSIVO */
  .hero {
    min-height: 80vh;
    display: flex;
    align-items: flex-end;
    justify-content: center;
  }
  .hero-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
  .hero-content {
    position: relative;
    inset: auto;
    padding: 40px 20px 80px;
  }
  .hero-content h1 {
    font-size: 2rem;
    line-height: 1.25;
    margin-bottom: 12px;
  }
  .hero-content p {
    font-size: 0.95rem;
    margin-bottom: 24px;
    line-height: 1.5;
  }

  /* MODAL / SOLAPA DE REDES MOBILE */
  .social-float-group {
    right: -60px;
    transition: right 0.3s ease, opacity 0.3s ease;
  }
  .social-float-group.show {
    right: 0;
  }
  .social-toggle {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: var(--dark);
    color: #fff;
    border: none;
    width: auto;
    height: auto;
    padding: 14px 8px;
    border-radius: 8px 0 0 8px; /* Redondeado solo en el borde izquierdo */
    cursor: pointer;
    box-shadow: -2px 4px 12px rgba(0,0,0,0.15);
    z-index: 101;
    transition: background-color 0.2s ease;
  }
  .social-toggle-text {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    transform: rotate(180deg); /* Lectura de abajo hacia arriba */
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1px;
    font-family: var(--display);
    line-height: 1.1;
  }
  .social-toggle-arrow {
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1;
    transition: transform 0.3s ease;
  }
  
  .social-list {
    position: absolute;
    right: 100%; /* Se posiciona a la izquierda del botón de solapa */
    top: 50%;
    transform: translateY(-50%) translateX(20px); /* Inicialmente oculto/comprimido hacia la derecha */
    opacity: 0;
    pointer-events: none;
    display: flex;
    flex-direction: row; /* Diseño horizontal en mobile para ahorrar espacio vertical */
    gap: 8px;
    padding-right: 10px; /* Separación entre iconos y solapa */
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
  }
  
  .social-float-group.active .social-list {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(-50%) translateX(0); /* Deslizar hacia la izquierda a su posición visible */
  }
  
  .social-float-group.active .social-toggle-arrow {
    transform: rotate(180deg); /* Invierte la flecha cuando está activo (apunta hacia la derecha) */
  }
  
  .social-float-group.active .social-toggle {
    background: #1c1c28; /* Un tono gris oscuro/negro más suave al estar activo */
  }
}
