/* Variables globales */
:root {
  --color-primario: #007acc;
  --color-secundario: #ffdd57;
  --color-fondo: #ffffff;
  --color-texto: #222222;
  --color-footer-fondo: #f2f2f2;
  --color-footer-texto: #555555;

  --font-base: Arial, sans-serif;
  --font-titulo: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;

  --espacio-pequeno: 0.5rem;
  --espacio-medio: 1rem;
  --espacio-grande: 2rem;

  --radio-bordes: 8px;
}

/* Reset básico */
* {
  box-sizing: border-box;
}

body {
  font-family: var(--font-base);
  background: var(--color-fondo);
  color: var(--color-texto);
  margin: 0;
  padding: 0;
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* HEADER */
header {
  background: #e8f4ff;
  padding: var(--espacio-grande) var(--espacio-medio);
  text-align: center;
}

header h1 {
  font-family: var(--font-titulo);
  font-size: clamp(1.8rem, 2vw + 1rem, 2.8rem);
  margin-bottom: 0.5rem;
  color: var(--color-primario);
}

header p {
  font-size: 1.25rem;
  max-width: 700px;
  margin: 0 auto;
  font-weight: 500;
  color: #333;
}

/* FOOTER */
footer {
  background: var(--color-footer-fondo);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.5rem 1rem;
  color: var(--color-footer-texto);
  text-align: center;
  margin-top: 4rem;
}

.footer-image {
  max-width: 200px;
  height: auto;
  margin-bottom: 0.8rem;
  object-fit: contain;
  display: block;
}

@media screen and (max-width: 600px) {
  .footer-image {
    max-width: 120px;
  }
}

/* NAVIGATION */
nav {
  background: var(--color-primario);
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--espacio-pequeno) var(--espacio-medio);
  flex-wrap: wrap;
  position: relative;
  min-height: 64px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  height: 100%;
}

.nav-logo img {
  height: 32px;
  width: auto;
  object-fit: contain;
}

.nav-logo span {
  font-size: 1rem;
  font-weight: 500;
  color: white;
}

/* Menú hamburguesa */
.menu-toggle {
  display: none;
  font-size: 1.5rem;
  cursor: pointer;
  user-select: none;
  background: transparent;
  border: none;
  color: white;
}

/* Enlaces de navegación */
.nav-enlaces {
  display: none;
  list-style: none;
  flex-direction: column;
  width: 100%;
  margin-top: 0.5rem;
}

.nav-enlaces.show {
  display: flex;
  align-items: center;
}

.nav-enlaces ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  gap: 1rem;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

.nav-enlaces ul li {
  margin: 0;
}

.nav-enlaces a {
  color: white;
  text-decoration: none;
  margin: 0 0.8rem;
  font-weight: 500;
  transition: color 0.3s ease, outline 0.3s ease;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  display: inline-block;
}

.nav-enlaces a:hover,
.nav-enlaces a:focus-visible {
  color: var(--color-secundario);
  outline-offset: 3px;
  outline: 2px solid var(--color-secundario);
  background-color: rgba(255, 221, 87, 0.15);
}

/* Responsive */
@media screen and (max-width: 600px) {
  .nav-enlaces a {
    margin: 0.4rem 0;
  }

  .nav-enlaces ul {
    margin-top: 2rem;
    flex-direction: column;
    gap: 0.5rem;
  }

  .nav-logo img {
    height: 50px;
    width: 50px;
  }

  .nav-logo span {
    font-size: 1.4rem;
    font-weight: 700;
  }

  nav {
    justify-content: center;
  }

  .nav-logo {
    flex-direction: column;
    align-items: center;
  }

  .menu-toggle {
    display: block;
    position: absolute;
    right: var(--espacio-medio);
    top: 50%;
    transform: translateY(-50%);
  }
}

@media screen and (min-width: 601px) {
  .nav-enlaces {
    display: flex !important;
    flex-direction: row !important;
    width: auto !important;
    margin-top: 0 !important;
  }
}

/* ACCESIBILIDAD */
a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--color-secundario);
  outline-offset: 3px;
}

/* Transiciones suaves */
a,
.boton {
  transition: color 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease;
}
