:root {
  --bg-dark: #0a192f;
  --bg-mid: #112d4e;
  --accent: #3f72af;
  --light: #f9f7f7;
  --header: #091421; /* Header y footer */
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  font-family: "Segoe UI", sans-serif;
  background: var(--bg-dark);
  color: var(--light);
  text-align: center;
}

/* ===== LOGO ===== */
.logo {
  display: flex;
  align-items: center;
  color: var(--accent);
  font-size: 1.5rem;
  font-weight: bold;
}
.logo img {
  width: 28px;
  height: auto;
  margin-right: 8px;
}

/* ===== NAVBAR & HEADER ===== */
.home-header nav,
.header-dash {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background: var(--header);
}
.header-dash {
  flex-direction: column;
  text-align: center;
}
nav ul {
  list-style: none;
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap; /* 👈 Para que en pantallas chicas los enlaces hagan salto de línea */
}
nav a {
  color: var(--light);
  text-decoration: none;
  transition: 0.3s;
}
nav a:hover {
  color: var(--accent);
}

/* ===== HERO ===== */
.hero {
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 4rem 2rem;
  background: linear-gradient(135deg, var(--bg-mid), var(--bg-dark));
}
.hero-text {
  max-width: 500px;
  text-align: center;
}
.hero-text h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: var(--accent);
}
.hero-text p {
  font-size: 1.2rem;
  margin-bottom: 2rem;
}
.btn {
  background: var(--accent);
  padding: 0.8rem 1.5rem;
  border-radius: 6px;
  color: white;
  text-decoration: none;
  font-weight: bold;
  transition: 0.3s;
}
.btn:hover {
  background: var(--light);
  color: var(--bg-dark);
}
.hero-img img {
  max-width: 350px;
  border-radius: 12px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.6);
  transition: transform 0.3s, box-shadow 0.3s;
}
.hero-img img:hover {
  transform: scale(1.05);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.8);
}

/* ===== HIGHLIGHTS ===== */
.highlights {
  display: flex;
  justify-content: space-around;
  padding: 2rem;
  background: var(--header);
}
.highlight {
  text-align: center;
}
.highlight h2 {
  font-size: 2rem;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

/* ===== SECCIONES HOME ===== */
.section {
  padding: 3rem 2rem;
}
.section.alt1 {
  background: var(--bg-mid);
}
.section.alt2 {
  background: var(--bg-dark);
}
.section h2 {
  margin-bottom: 1rem;
  color: var(--accent);
  text-align: center;
}
.section p,
.section li {
  line-height: 1.6;
  max-width: 800px;
  margin: 0.5rem auto;
  text-align: center;
}
.method-list {
  list-style-position: inside;
  margin: 1rem auto;
  max-width: 800px;
  text-align: center;
}

/* ===== DASHBOARD ===== */
main.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 2rem;
  padding: 2rem;
  justify-items: center;
  grid-auto-rows: 1fr;
}
.card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: var(--bg-mid);
  padding: 2rem;
  border-radius: 12px;
  max-width: 400px;
  min-height: 250px;
  text-align: center;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.4);
  transition: transform 0.3s;
}
.card:hover {
  transform: translateY(-5px);
}
.card h2 {
  color: var(--accent);
  margin-bottom: 1rem;
}
.card p {
  margin-bottom: 1rem;
  line-height: 1.5;
}
.card ul {
  list-style-position: inside;
  margin: 0 auto 1rem;
  text-align: center;
  padding-left: 0;
}
.card li {
  margin-bottom: 0.5rem;
}
.img-wrapper {
  text-align: center;
  margin-top: auto;
}
.card img {
  max-width: 85%;
  border-radius: 6px;
}

/* ===== FOOTER ===== */
footer {
  text-align: center;
  padding: 1rem;
  background: var(--header);
  font-size: 0.9rem;
  color: var(--light);
}

/* ===== RESPONSIVE DESIGN ===== */

/* Tablets */
@media (max-width: 1024px) {
  .hero {
    flex-direction: column;
    text-align: center;
  }
  .hero-text {
    max-width: 90%;
    margin-bottom: 2rem;
  }
  .hero-img img {
    max-width: 80%;
  }
  nav ul {
    gap: 1rem;
  }
}

/* Celulares */
@media (max-width: 768px) {
  /* 🔥 Ahora el nav sigue horizontal */
  nav {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 1rem;
  }
  nav ul {
    flex-direction: row;
    flex-wrap: wrap; /* 👈 En pantallas chicas los links hacen salto si no caben */
    justify-content: flex-end;
    width: auto;
    margin-top: 0;
  }
  nav a {
    font-size: 0.9rem;
  }

  .hero {
    padding: 2rem 1rem;
    flex-direction: column;
    text-align: center;
  }
  .highlights {
    flex-direction: column;
    gap: 1.5rem;
  }
  .highlight h2 {
    font-size: 1.5rem;
  }
  .section p,
  .section li {
    padding: 0 1rem;
    font-size: 0.95rem;
  }
  .card {
    max-width: 100%;
    padding: 1.5rem 1rem;
  }
}

/* Celulares muy pequeños */
@media (max-width: 480px) {
  .hero-text h1 {
    font-size: 1.8rem;
  }
  .hero-text p {
    font-size: 1rem;
  }
  .btn {
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
  }
  .highlight h2 {
    font-size: 1.3rem;
  }

/* ===== BOTÓN VOLVER ===== */
.btn-back {
  display: inline-block;
  padding: 0.6rem 1rem;
  margin: 0.5rem 0;
  background: var(--accent);
  color: var(--light);
  text-decoration: none;
  border-radius: 6px;
  font-weight: bold;
  transition: 0.3s;
}

.btn-back:hover {
  background: var(--light);
  color: var(--bg-dark);
}

/* Responsivo */
@media (max-width: 768px) {
  .btn-back {
    display: block;
    text-align: center;
    width: 90%;
    margin: 0.8rem auto;
  }
}

}
