:root {
  --bg: #f4f4f4;
  --text: #333;
  --primary: #014421;
  --card: white;
}

body.dark {
  --bg: #121212;
  --text: #f4f4f4;
  --primary: #76c893;
  --card: #1e1e1e;
}

body {
  font-family: 'Segoe UI', sans-serif;
  margin: 0;
  padding: 0;
  background-color: var(--bg);
  color: var(--text);
  transition: background 0.3s, color 0.3s;
}

header {
  background-color: var(--primary);
  color: white;
  padding: 20px;
  text-align: center;
}

header h1 {
  margin: 0;
  font-size: 2.5em;
}

main {
  padding: 20px;
  max-width: 1000px;
  margin: auto;
  background-color: var(--card);
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

.profile {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.profile img {
  max-width: 200px;
  border-radius: 10px;
  margin-bottom: 10px;
}

.profile ul {
  list-style: none;
  padding: 0;
}

section {
  margin-top: 30px;
}

h2 {
  color: var(--primary);
  border-bottom: 2px solid #ddd;
  padding-bottom: 5px;
}

footer {
  background-color: var(--primary);
  color: white;
  text-align: center;
  padding: 10px 0;
}

.controls {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin: 10px;
}

button {
  padding: 6px 12px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  background: var(--primary);
  color: white;
  transition: background 0.3s;
}

button:hover {
  opacity: 0.8;
}

/* NAVBAR GENERAL */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #014421; /* verde */
  padding: 10px 20px;
  color: white;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.navbar .logo {
  font-weight: bold;
  font-size: 1.2em;
}

.nav-links {
  display: flex;             /* por defecto: horizontal en PC */
  list-style: none;
  gap: 20px;
}

.nav-links a {
  color: white;
  text-decoration: none;
  font-weight: 500;
  transition: opacity 0.2s;
}

.nav-links a:hover {
  opacity: 0.7;
}

/* HAMBURGER (oculto en PC) */
.hamburger {
  display: none;
  font-size: 1.5em;
  background: none;
  border: none;
  color: white;
  cursor: pointer;
}

/* SOLO EN MÓVIL */
@media (max-width: 768px) {
  .nav-links {
    display: none;            /* oculto por defecto en móvil */
    flex-direction: column;
    align-items: center;
    background: #014421;      /* verde oscuro */
    position: absolute;
    top: 60px;
    left: 0;
    width: 100%;              /* ocupa todo el ancho */
    padding: 20px 0;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
  }

  .nav-links.show {
    display: flex;            /* aparece cuando presionas ☰ */
  }

  .nav-links a {
    padding: 12px;
    color: white;
    font-size: 1.1em;
    border-bottom: 1px solid rgba(255,255,255,0.2);
    width: 100%;
    text-align: center;
  }

  .nav-links a:last-child {
    border-bottom: none;
  }

  .hamburger {
    display: block;           /* solo visible en móvil */
  }
}
