/* ===========================
   RESET & BASE
=========================== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', system-ui, sans-serif;
  background-color: var(--color-bg);
  color: var(--color-text);
  overflow-x: hidden;
}

/* ===========================
   SECTION BASE + ANIMATION
=========================== */
.section {
  padding: 80px 1.5rem;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.section.visible {
  opacity: 1;
  transform: translateY(0);
}

.content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
  text-align: center;
}

/* ===========================
   TYPOGRAPHY
=========================== */
h1, h2, h3 {
  font-weight: 800;
  letter-spacing: 0.5px;
  margin-bottom: 12px;       /* antes 20px, mucho más compacto */
  text-transform: uppercase;
  color: var(--color-brand);
}

p {
  line-height: 1.4;          /* antes 1.65, mucho más cerrado */
  margin-bottom: 14px;       /* antes 20px, más justo y parejo */
  font-size: 1.05rem;
  color: var(--color-muted);
}

/* Ajuste solo para el botón en tema claro */
body:not(.dark-mode) .cta-button {
  color: #000;
}

/* ❌ Remove mobile tap highlight*/
a, button {
  -webkit-tap-highlight-color: transparent;
  tap-highlight-color: transparent; /* estándar, por si acaso */
}

/* ===========================
   HERO & PROBLEMA
=========================== */
.hero,
.problema-creador {
  background-color: var(--color-hero-bg);
  color: var(--color-hero-text);
  border-bottom: none;
  position: relative;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(255,0,51,0.08), rgba(255,0,51,0));
  pointer-events: none;
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: 15px;
  color: var(--color-brand);
}

.hero p {
  font-size: 1.25rem;
  max-width: 700px;
  margin: 0 auto;
  color: var(--color-hero-text);
}

.problema-creador h2 {
  color: var(--color-brand);
}

.problema-creador p,
.problema-creador strong {
  color: var(--color-hero-text);
}

.problema-creador .content p {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
  line-height: 1.6;
}

/* ===========================
   CTA BUTTON
=========================== */
.cta-button {
  display: inline-block;
  margin-top: 30px;
  padding: 12px 30px;
  background-color: var(--color-brand);
  text-transform: uppercase;
  letter-spacing: 1px;
  text-decoration: none;
  border-radius: 6px;
  font-weight: 700;
  cursor: pointer;

  /* Transiciones suaves, incluido color del texto */
  transition: background-color 0.3s, box-shadow 0.3s, color 0.8s;
  text-align: center;
}

/* Hover efecto */
.cta-button:hover {
  background-color: #cc0029;
  box-shadow: 0 4px 12px rgba(255,0,51,0.2);
}

/* Color de texto según tema */
body.dark-mode .cta-button {
  color: #fff;
}

body:not(.dark-mode) .cta-button {
  color: #000;
}

/* ===========================
   DIVISIONES ROJAS FACHERAS
=========================== */
.nuestra-solucion,
.beneficios,
.servicios,
.como-trabajamos,
.cta-final {
  background-color: var(--color-bg);
  border-top: 4px solid var(--color-brand);
}

/* ===========================
   SOLUCIÓN, BENEFICIOS
=========================== */
.nuestra-solucion .content p,
.beneficios .content p,
.como-trabajamos .content p {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
  line-height: 1.6;
}

/* BENEFIT LIST */
.benefit-list {
  list-style: none;
  max-width: 800px;
  margin: 0 auto;
  padding: 0;
  text-align: left;
}

.benefit-list li {
  margin-bottom: 20px;
  font-size: 1.05rem;
  color: var(--color-text);
  padding-left: 28px;
  position: relative;
}

/* ===========================
   SERVICIOS
=========================== */
.service-list {
  list-style: none;
  padding: 0;
  margin: 50px auto;
  max-width: 1200px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.service-list li {
  background-color: var(--color-card);
  border: 1.5px solid rgba(255, 0, 51, 0.15); /* borde más definido */
  padding: 20px 22px;
  border-radius: 16px; /* esquinas más suaves */
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06); /* sombra más amplia */
  background-image: radial-gradient(circle at top, rgba(255,0,51,0.02), transparent 80%); /* sutil luz interior */
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  text-align: left;
}

.service-list li:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12); /* sombra más elevada */
  border-color: rgba(255, 0, 51, 0.3); /* borde más vivo en hover */
}

.service-list h3 {
  margin-top: 0;
  font-size: 1.3rem;
  color: var(--color-brand);
  margin-bottom: 12px;
  line-height: 1.2;
}

.service-list p {
  font-size: 1rem;
  color: var(--color-muted);
  line-height: 1.6;
}

.service-cta {
  margin-top: 40px;
  text-align: center;
}

/* ===========================
   COMO TRABAJAMOS
=========================== */
.como-trabajamos .content {
  max-width: 800px;
  margin: 0 auto;
  text-align: left;
}

.como-trabajamos h2 {
  text-align: center;
  margin-bottom: 40px;
  font-size: 1.9rem;
  color: var(--color-brand);
}

.como-trabajamos ol {
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: paso;
}

.como-trabajamos li {
  counter-increment: paso;
  margin-bottom: 24px;
  padding-left: 36px;
  position: relative;
  line-height: 1.6;
  font-size: 1.05rem;
  color: var(--color-text);
}

.como-trabajamos li::before {
  content: counter(paso) ".";
  position: absolute;
  left: 0;
  top: 0;
  font-weight: bold;
  color: var(--color-brand);
  font-size: 1.2rem;
}

.como-trabajamos li strong {
  display: block;
  margin-bottom: 5px;
  color: var(--color-brand);
  font-size: 1.15rem;
}

/* ===========================
   CTA FINAL
=========================== */
.cta-final {
  background-color: var(--color-bg);
  border-top: 4px solid var(--color-brand);
}

.cta-final p {
  font-size: 1.2rem;
  color: var(--color-muted);
}

/* ===========================
   FOOTER
=========================== */
.footer {
  position: relative; /* Necesario para que el ::before funcione */
  background-color: var(--color-bg-light);
  text-align: center;
  padding: 20px;
  font-size: 0.9rem;
  color: var(--color-muted);
  border-top: 4px solid var(--color-brand);
  overflow: hidden; /* Previene desbordes del efecto */
}

.footer::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(255,0,51,0.08), rgba(255,0,51,0));
  pointer-events: none;
  z-index: 0;
}

.footer p {
  position: relative; /* Asegura que el texto esté sobre la luz */
  z-index: 1;
}

/* ===========================
   RESPONSIVE
=========================== */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 2.2rem;
  }

  .hero p {
    font-size: 1rem;
  }

  .section {
    padding: 64px 1rem;
  }

  .service-list {
    grid-template-columns: 1fr;
  }
}
