/* ----------- RESET BÁSICO ----------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ----------- BASE ----------- */
body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  background-image: url('fondo.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.7;
  transition: all 0.3s ease;
  text-align: center;
}

/* ----------- MENÚ ----------- */
nav {
  background-color: #1e1e2f;
  text-align: center;
  padding: 12px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
}

nav ul li {
  margin: 0 20px;
}

nav ul li a {
  color: #f0f0f0;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
}

nav ul li a:hover {
  color: #ff9800;
}

.menu-texto {
  font-style: italic;
  font-weight: bold;
  color: #4caf50;
}

center {
  color: white;
  text-decoration: underline;
  font-size: large;
  font-weight: bold;
}
/* ----------- ENCABEZADOS ----------- */
h1 {
  font-size: 2.2em;
  margin: 30px 0 20px;
  padding: 12px 20px;
  border-radius: 8px;
  display: inline-block;
}

h2 {
  font-size: 1.6em;
  margin: 40px 0 15px;
  border-bottom: 2px solid;
  display: inline-block;
  padding-bottom: 5px;
  border-radius: 6px;
  padding: 8px 15px;
}

/* ----------- PÁRRAFOS ----------- */
p {
  max-width: 900px;
  margin: 0 auto 20px;
  font-size: 1em;
  padding: 15px 20px;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  text-align: justify;
  transition: all 0.3s ease;
}

/* ----------- INFO DEL EQUIPO ----------- */
.info {
  display: none;
  margin-top: 20px;
}

/* ----------- BOTONES ----------- */
button {
  background-color: #1e1e2f;
  color: white;
  border: 2px solid white;
  padding: 10px 18px;
  margin: 5px;
  cursor: pointer;
  font-weight: bold;
  border-radius: 6px;
  transition: all 0.3s ease;
}

button:hover {
  background-color: #ff9800;
  border-color: #ff9800;
  transform: scale(1.05);
}

/* ----------- IMÁGENES ----------- */
img {
  max-width: 220px;
  margin: 15px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

img:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

/* ----------- CONCLUSIÓN Y BIBLIOGRAFÍA ----------- */
.conclusion, .bibliografia {
  margin-top: 40px;
}

/* ----------- LINKS ----------- */
a {
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  text-decoration: underline;
  color: #ff9800;
}

/* ============================= */
/*          MODO CLARO           */
/* ============================= */
body.light, body {
  color: #2c3e50;
}

body.light h1, body h1 {
  background-color: rgba(255, 255, 255, 0.9);
  color: #1e1e2f;
}

body.light h2, body h2 {
  color: #2c3e50;
  border-color: #ccc;
  background-color: rgba(255,255,255,0.85);
}

body.light p, body p {
  background: rgba(255,255,255,0.9);
  color: #333;
}

body.light .conclusion p {
  background: #eaf2f8;
}

body.light .bibliografia p {
  background: #fefefe;
  color: #333;
}

body.light a {
  color: #007acc;
}

/* ============================= */
/*          MODO OSCURO          */
/* ============================= */
@media (prefers-color-scheme: dark) {
  body {
    color: #e0e0e0;
    background-color: #121212;
  }

  h1 {
    background-color: rgba(30, 30, 30, 0.9);
    color: #f5f5f5;
  }

  h2 {
    color: #f5f5f5;
    border-color: #555;
    background-color: rgba(40,40,40,0.9);
  }

  p {
    background: rgba(30,30,30,0.9);
    color: #ddd;
  }

  .conclusion p {
    background: #263238;
    color: #eee;
  }

  .bibliografia p {
    background: #1c1c1c;
    color: #bbb;
  }

  a {
    color: #4dabf7;
  }
}