/* =========================================
   1. VARIABLES Y TEMAS
   ========================================= */
:root {
  /* TEMA POR DEFECTO (Home) */
  --primary: #8dc72e;
  --accent: #0288d1;
  --bg-gradient: linear-gradient(135deg, #e3f2fd 0%, #fffde7 100%);
  --text-main: #1d1d1f;
  --text-sec: #86868b;
  --white: #ffffff;
  --radius: 20px;
  --h2-color: #1d1d1f;
}

/* TEMA: TÉRMINOS */
body.page-terms {
  --primary: #0288d1;
  --bg-gradient: linear-gradient(135deg, #e1f5fe 0%, #ffffff 100%);
  --text-sec: #424245;
  --h2-color: #1565c0;
}

/* TEMA: PRIVACIDAD */
body.page-privacy {
  --primary: #2e7d32;
  --bg-gradient: linear-gradient(135deg, #f1f8e9 0%, #ffffff 100%);
  --text-sec: #424245;
  --h2-color: #2e7d32;
}

/* =========================================
   2. RESET Y BASES GLOBALES
   ========================================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", sans-serif;
  background: var(--bg-gradient);
  color: var(--text-main);
  line-height: 1.5;
  overflow-x: hidden;
}

/* Solución al subrayado fantasma: Reseteo global estricto */
a {
  color: var(--primary);
  text-decoration: none !important; /* Fuerza a quitar el subrayado en todo el sitio */
  font-weight: 600;
}

/* =========================================
   3. HEADER Y FOOTER (Comunes)
   ========================================= */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 5%;
  max-width: 1200px;
  margin: 0 auto;
  flex-wrap: wrap;
  gap: 15px;
}
.logo {
  display: flex;
  align-items: center;
  font-weight: 800;
  font-size: 1.5rem;
  color: var(--primary);
  gap: 10px;
}
.logo img {
  width: 40px;
  height: 40px;
  border-radius: 8px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 15px;
}
.lang-select {
  padding: 8px 12px;
  border-radius: 20px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  background: rgba(255, 255, 255, 0.8);
  font-family: "Inter", sans-serif;
  font-size: 0.9rem;
  cursor: pointer;
  outline: none;
  color: var(--text-main);
}
.cta-header {
  background: var(--text-main);
  color: var(--white) !important;
  padding: 10px 20px;
  border-radius: 30px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: transform 0.2s;
  white-space: nowrap;
}
.cta-header:hover {
  transform: scale(1.05);
}

footer {
  background: var(--white);
  padding: 60px 20px;
  margin-top: 80px;
  border-top: 1px solid #eaeaea;
}
.footer-content {
  max-width: 1000px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 40px;
}
.footer-col h4 {
  margin-bottom: 20px;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-sec);
}
.footer-col ul {
  list-style: none;
  margin-left: 0;
}
.footer-col li {
  margin-bottom: 10px;
}
.footer-col a {
  color: var(--text-main);
  font-size: 0.9rem;
  font-weight: 400;
  text-decoration: none !important;
}
.footer-col a:hover {
  color: var(--primary);
  text-decoration: underline !important;
} /* Único lugar donde permitimos subrayado */
.copyright {
  text-align: center;
  margin-top: 60px;
  color: var(--text-sec);
  font-size: 0.8rem;
}

/* =========================================
   4. PÁGINAS LEGALES (Privacy / Terms)
   ========================================= */
.content {
  max-width: 800px;
  margin: 40px auto;
  background: white;
  padding: 40px;
  border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

/* Encapsulamos los estilos de texto para que no rompan la Home */
.content h1 {
  font-size: 2rem;
  margin-bottom: 10px;
  color: var(--primary);
  background: none;
  -webkit-text-fill-color: initial;
}
.content .last-update {
  color: var(--text-sec);
  font-size: 0.9rem;
  margin-bottom: 30px;
}
.content h2 {
  font-size: 1.25rem;
  margin-top: 30px;
  margin-bottom: 15px;
  border-bottom: 2px solid #e0e0e0;
  padding-bottom: 5px;
  color: var(--h2-color);
}
.content p,
.content li {
  margin-bottom: 15px;
  font-size: 1rem;
  color: var(--text-sec);
  line-height: 1.6;
}
.content ul {
  margin-left: 20px;
}

/* =========================================
   5. HOME EXCLUSIVO
   ========================================= */
.hero {
  text-align: center;
  padding: 80px 20px 40px;
  max-width: 800px;
  margin: 0 auto;
}
.hero h1 {
  font-size: 3.5rem;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
  background: -webkit-linear-gradient(45deg, #2e7d32, #0288d1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero p {
  font-size: 1.25rem;
  color: var(--text-sec);
  margin-bottom: 40px;
}
.store-buttons {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-bottom: 60px;
  flex-wrap: wrap;
}
.play-store-btn {
  display: inline-block;
  transition:
    transform 0.3s ease,
    filter 0.3s ease;
}
.play-store-btn img {
  width: 200px;
  height: auto;
}
.play-store-btn:hover {
  transform: scale(1.05);
  filter: brightness(1.1);
}

.scroll-section {
  padding: 40px 0;
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  position: relative;
}
.scroll-container {
  display: flex;
  gap: 30px;
  overflow-x: auto;
  padding: 40px 20px;
  width: 100%;
  flex-wrap: nowrap;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  scroll-behavior: smooth;

  scroll-snap-type: x mandatory;
}
.scroll-container::-webkit-scrollbar {
  display: none;
}
.gallery-item {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;

  scroll-snap-align: center;
  scroll-snap-stop: always;
}
.gallery-item:first-child {
  margin-left: auto;
}
.gallery-item:last-child {
  margin-right: auto;
}
.mockup-label {
  font-weight: 800;
  font-size: 1.2rem;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  background: -webkit-linear-gradient(45deg, #2e7d32, #0288d1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-align: center;
}
.phone-mockup {
  width: 280px;
  height: 580px;
  background: var(--white);
  border-radius: 45px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
  border: 10px solid #1d1d1f;
  overflow: hidden;
  position: relative;
}
.phone-mockup img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.features {
  max-width: 1200px;
  margin: 80px auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  padding: 0 20px;
}
.feature-card {
  background: var(--white);
  padding: 30px;
  border-radius: var(--radius);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s;
}
.feature-card:hover {
  transform: translateY(-5px);
}
.icon {
  font-size: 2rem;
  margin-bottom: 15px;
  display: inline-block;
  padding: 10px;
  background: #f5f5f7;
  border-radius: 12px;
}
.feature-title {
  font-weight: 600;
  font-size: 1.2rem;
  margin-bottom: 10px;
}
.feature-desc {
  color: var(--text-sec);
  font-size: 0.95rem;
  line-height: 1.4;
}

/* =========================================
   BOTONES DE NAVEGACIÓN DEL CARRUSEL
   ========================================= */
.nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: white;
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--primary); /* Toma el color dinámico de la página */
  transition: all 0.3s ease;
  outline: none;
}
.nav-btn:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-50%) scale(1.1);
}
.prev-btn {
  left: 20px;
}
.next-btn {
  right: 20px;
}

@media (max-width: 600px) {
  .nav-btn {
    display: none;
  } /* En móviles se usa el dedo */
}

/* =========================================
   6. MEDIA QUERIES
   ========================================= */
@media (min-width: 1024px) {
  .phone-mockup {
    width: 320px;
    height: 660px;
    border-width: 12px;
    border-radius: 50px;
  }
  .mockup-label {
    font-size: 1.4rem;
  }
  .gallery-item {
    gap: 25px;
  }
}
@media (max-width: 768px) {
  .hero h1 {
    font-size: 2.5rem;
  }
  .hero p {
    font-size: 1.1rem;
  }
  .header-actions {
    width: 100%;
    justify-content: space-between;
    margin-top: 10px;
  }
}
@media (max-width: 600px) {
  .play-store-btn img {
    width: 170px;
  }
  .content {
    margin: 20px;
    padding: 20px;
  }
}
