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

/* ==================== BASE ==================== */
body {
  font-family: 'Inter', sans-serif;
  background: #0d0d0d;
  color: #fff;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ==================== SCROLL ==================== */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

/* ==================== NAV ==================== */
.nav {
  position: fixed;
  width: 100%;
  top: 0;
  padding: 20px 8%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(13,13,13,0.6);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,0.05);
  z-index: 1000;
}

.nav .logo {
  height: 70px;
  width: auto;
  filter: invert(100%) brightness(150%) contrast(200%);
  transition: 0.3s ease;
}

.nav .logo:hover {
  filter: invert(100%) brightness(200%) contrast(250%) drop-shadow(0 0 20px rgba(255,255,255,1));
  transform: scale(1.02);
}

.nav-links a {
  margin-left: 30px;
  text-decoration: none;
  color: #aaa;
  font-weight: 500;
  transition: 0.3s;
}

.nav-links a:hover {
  color: #fff;
}

.menu-toggle {
  display: none;
  font-size: 1.5rem;
  cursor: pointer;
}

/* ==================== HERO ==================== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 120px 8%;
  overflow: hidden;
}

.hero-parallax-bg {
  position: absolute;
  top: -20%;
  left: 0;
  width: 100%;
  height: 140%;
  background: url('../images/hero-detvaxer-diseno-web-branding.webp') center/cover no-repeat;
  z-index: 0;
  will-change: transform;
}

.hero-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(13,13,13,0.5), rgba(13,13,13,0.95));
  z-index: 1;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 70% 30%, rgba(255,122,24,0.25), transparent 50%);
  z-index: 1;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
}

.hero h1 {
  font-size: clamp(3rem, 6vw, 5.5rem);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.hero p {
  margin: 20px 0;
  font-size: 1.2rem;
  color: #aaa;
}

.highlight {
  background: linear-gradient(135deg, #ff7a18, #ff3d00);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-sub {
  margin-top: 30px;
  font-size: 1rem !important;
  color: #888 !important;
}

/* ==================== BOTONES ==================== */
.btn {
  display: inline-block;
  padding: 14px 28px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  margin-right: 10px;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #ff7a18, #ff3d00);
  color: white;
  box-shadow: 0 10px 30px rgba(255,80,0,0.4);
  transition: 0.3s;
}

.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 50px rgba(255,80,0,0.6);
}

.btn::after {
  content: "";
  position: absolute;
  width: 200%;
  height: 200%;
  background: linear-gradient(120deg, transparent, rgba(255,255,255,0.3), transparent);
  transform: rotate(25deg);
  top: -150%;
  left: -50%;
  transition: 0.6s;
}

.btn:hover::after {
  top: 150%;
}

.btn-outline {
  border: 1px solid rgba(255,255,255,0.2);
  background: transparent;
  box-shadow: none;
}

/* ==================== SECCIONES ==================== */
.section {
  padding: 110px 8%;
  position: relative;
}

.section h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  text-align: center;
  margin-bottom: 60px;
}

/* ==================== PARALLAX REAL ==================== */
#porque,
#esencia {
  position: relative;
  overflow: hidden;
  background: transparent;
  padding: 0;
}

.parallax-fixed-bg {
  position: absolute;
  top: -20%;
  left: 0;
  width: 100%;
  height: 140%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  z-index: 0;
  will-change: transform;
}

.porque-bg {
  background-image: url('../images/diseno-web-profesional-optimized.png');
}

.esencia-bg {
  background-image: url('../images/branding-negocios-optimized.jpg');
}

/* Overlay oscuro */
#porque::before,
#esencia::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(17,17,17,0.85), rgba(17,17,17,0.9));
  z-index: 1;
  pointer-events: none;
}

/* Contenido de las secciones con parallax */
.section-content {
  position: relative;
  z-index: 2;
  padding: 110px 8%;
}

/* ==================== GRIDS ==================== */
.grid-3 {
  display: grid;
  gap: 40px;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.grid-4 {
  display: grid;
  gap: 40px;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

/* ==================== FEATURES ==================== */
.feature {
  background: rgba(255,255,255,0.02);
  padding: 30px;
  border-radius: 20px;
  transition: 0.3s;
}

.feature:hover {
  transform: translateY(-8px);
}

.feature img {
  width: 100%;
  height: 220px;
  border-radius: 20px;
  object-fit: cover;
  margin-top: 15px;
}

/* ==================== ICONOS ==================== */
.icon {
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 15px;
  border-radius: 12px;
  background: rgba(255,255,255,0.05);
}

.icon svg {
  width: 24px;
  height: 24px;
  stroke: #ff7a18;
}

/* ==================== CARDS ==================== */
.cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px;
  max-width: 900px;
  margin: 0 auto;
}

.card {
  position: relative;
  padding: 30px;
  border-radius: 20px;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.05);
  backdrop-filter: blur(12px);
  transition: 0.4s;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 20px;
  padding: 1px;
  background: linear-gradient(135deg, transparent, rgba(255,122,24,0.4), transparent);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.card:hover {
  transform: translateY(-10px);
  box-shadow: 0 30px 80px rgba(0,0,0,0.6);
}

.card img {
  width: 100%;
  height: 220px;
  border-radius: 20px;
  object-fit: cover;
  transition: 0.4s;
  margin-bottom: 15px;
}

.card:hover img {
  transform: scale(1.05);
}

.card h3 {
  margin: 15px 0 10px;
  font-size: 1.5rem;
}

.card p {
  color: #aaa;
  line-height: 1.5;
}

/* Estilo específico para "Por qué Detvaxer" */
#porque .cards {
  grid-template-columns: repeat(2, 1fr);
  max-width: 800px;
}

#porque .card {
  text-align: center;
  padding: 40px 20px;
}

#porque .icon {
  margin: 0 auto 20px auto;
}

/* Estilo específico para "Nuestra esencia" */
#esencia .cards {
  grid-template-columns: repeat(3, 1fr);
  max-width: 1000px;
  gap: 30px;
}

#esencia .card {
  text-align: center;
  padding: 35px 25px;
}

#esencia .icon {
  margin: 0 auto 20px auto;
}

/* ==================== SPLIT ==================== */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.split-img img {
  width: 100%;
  height: 300px;
  border-radius: 20px;
  object-fit: cover;
}

/* ==================== PROCESO ==================== */
.step {
  text-align: center;
}

.step span {
  display: inline-block;
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, #ff7a18, #ff3d00);
  border-radius: 50%;
  line-height: 50px;
  font-weight: bold;
  margin-bottom: 10px;
}

.step img {
  width: 100%;
  height: 200px;
  border-radius: 20px;
  object-fit: cover;
  margin-top: 15px;
}

/* ==================== FORMULARIO ==================== */
form {
  max-width: 600px;
  margin: auto;
}

input, textarea {
  width: 100%;
  padding: 15px;
  margin-bottom: 15px;
  border-radius: 10px;
  border: none;
  background: #1a1a1a;
  color: white;
  resize: none;
}

.form-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-top: 10px;
}

.form-group .g-recaptcha {
  flex-shrink: 0;
}

.form-group .btn-submit {
  margin: 0;
  flex-shrink: 0;
}

/* Texto del regalo (PDF) */
.gift-text {
  text-align: center;
  background: rgba(255,122,24,0.1);
  border-left: 3px solid #ff7a18;
  padding: 12px 20px;
  margin: 15px 0 20px;
  border-radius: 10px;
}

.gift-text p {
  margin: 5px 0;
}

.gift-text strong {
  color: #ff7a18;
}

/* ==================== BOTÓN SUBMIT ==================== */
.btn-submit {
  position: relative;
}

.btn-loader {
  display: none;
  width: 20px;
  height: 20px;
  border: 2px solid white;
  border-top: 2px solid transparent;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-left: 10px;
}

.btn.loading .btn-text {
  display: none;
}

.btn.loading .btn-loader {
  display: inline-block;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ==================== MENSAJES DEL FORMULARIO ==================== */
.form-message {
  margin-top: 15px;
  text-align: center;
  font-weight: 500;
  opacity: 0;
  transition: 0.3s;
}

.form-message.show {
  opacity: 1;
}

.form-message.success {
  color: #4caf50;
}

.form-message.error {
  color: #ff4d4d;
}

/* ==================== MENÚ FLOTANTE ==================== */
.floating-menu {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 1000;
}

.floating-menu .main-btn {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #ff7a18, #ff3d00);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 5px 20px rgba(255,80,0,0.4);
  transition: 0.3s;
}

.floating-menu .main-btn img {
  width: 35px;
  height: 35px;
  filter: brightness(0) invert(1);
}

.floating-menu .options {
  display: none;
  position: absolute;
  bottom: 70px;
  right: 0;
  flex-direction: column;
  gap: 15px;
}

.floating-menu .options.show {
  display: flex;
}

.floating-menu .option {
  display: block;
  transition: 0.3s;
}

.floating-menu .option:hover {
  transform: scale(1.1);
}

.floating-menu .option img {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
  background: #1a1a1a;
  padding: 8px;
}

.floating-menu .option.whatsapp:hover img {
  background: #25D366;
}

.floating-menu .option.facebook:hover img {
  background: #1877F2;
}

.floating-menu .option.instagram:hover img {
  background: linear-gradient(135deg, #833AB4, #FD1D1D, #FCAF45);
}

/* ==================== FOOTER ==================== */
footer {
  text-align: center;
  padding: 40px;
  background: #0a0a0a;
  color: #777;
}

/* ==================== SCROLL TOP ==================== */
.scroll-top {
  position: fixed;
  bottom: 100px;
  right: 40px;
  background: #ff7a18;
  color: #fff;
  width: 45px;
  height: 45px;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 1000;
  border-radius: 50%;
  font-size: 1.5rem;
  text-decoration: none;
  transition: 0.3s;
}

.scroll-top:hover {
  transform: translateY(-5px);
  background: #ff3d00;
}

.scroll-top.show {
  display: flex;
}

/* ==================== ANIMACIONES ==================== */
.fade-up {
  opacity: 0;
  transform: translateY(40px);
  transition: 0.8s ease;
}

.fade-up.show {
  opacity: 1;
  transform: translateY(0);
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 992px) {
  .split {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  
  .section {
    padding: 80px 5%;
  }
  
  .section-content {
    padding: 80px 5%;
  }
}

@media (max-width: 768px) {
  .nav .logo {
    height: 50px;
  }
  
  .menu-toggle {
    display: block;
    font-size: 1.5rem;
    cursor: pointer;
  }
  
  .nav-links {
    position: absolute;
    top: 70px;
    right: 0;
    background: #111;
    width: 100%;
    display: none;
    flex-direction: column;
    padding: 20px;
    text-align: center;
  }
  
  .nav-links.active {
    display: flex;
  }
  
  .nav-links a {
    margin: 10px 0;
  }
  
  .hero {
    padding: 100px 5%;
    text-align: center;
  }
  
  .hero-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
  }
  
  .hero-buttons .btn {
    margin-right: 0;
    width: 100%;
    max-width: 280px;
  }
  
  .cards {
    grid-template-columns: 1fr !important;
    gap: 25px;
  }
  
  #porque .cards,
  #esencia .cards {
    grid-template-columns: 1fr !important;
  }
  
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
  }
  
  .feature img,
  .card img {
    height: 180px;
  }
  
  .step img {
    height: 160px;
  }
  
  .split-img img {
    height: 200px;
  }
  
  .form-group {
    flex-direction: column;
    gap: 15px;
  }
  
  .form-group .g-recaptcha {
    transform: scale(0.85);
    transform-origin: center;
  }
  
  .scroll-top {
    right: 20px;
    bottom: 80px;
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
  }
  
  .floating-menu {
    right: 20px;
    bottom: 20px;
  }
  
  .floating-menu .main-btn {
    width: 50px;
    height: 50px;
  }
  
  .floating-menu .main-btn img {
    width: 28px;
    height: 28px;
  }
  
  .floating-menu .option img {
    width: 45px;
    height: 45px;
  }
  
  /* Desactivar parallax en móvil */
  .hero-parallax-bg,
  .parallax-fixed-bg {
    transform: none !important;
  }
}

@media (max-width: 480px) {
  .section h2 {
    font-size: 1.5rem;
  }
  
  .hero h1 {
    font-size: 2rem;
  }
  
  .hero p {
    font-size: 1rem;
  }
  
  .grid-4 {
    grid-template-columns: 1fr;
  }
  
  .step img {
    height: 140px;
  }
  
  .feature img,
  .card img {
    height: 160px;
  }
  
  .btn {
    padding: 10px 20px;
    font-size: 0.85rem;
  }
}