/* === Estilos generales === */
@charset "utf-8";
/* ============================
   RESET GENERAL
============================ */

@import url('https://fonts.googleapis.com/css2?family=Crete+Round:ital@0;1&family=Montserrat:wght@100..900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Aleo:ital,wght@0,100..900;1,100..900&family=Montserrat:wght@100..900&display=swap');
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Montserrat", sans-serif;
  background: #f6f0bf;
  color: #111;
  margin-block-end: 50px; /* espacio inferior para el menú fijo */
}
section {
  padding: 20px;
  max-width: 100%;
  margin: 0 auto 20px auto;
}

a {
  text-decoration: none;
  color: inherit;
}

h1, h2 {
  font-family: "Crete Round", serif;
  font-weight: 400;
  color: var(--verde-oscuro);
}

h3, h4, h5 {
  font-family: "Montserrat", sans-serif;
  font-weight: 600;
  color: var(--verde-oscuro);
}

p {
  font-size: 1rem;
  line-height: 1.5;
  color: #444;
  max-width: 65ch;
  font-weight: 400;
}

/* Paleta de colores */
:root {
  --verde-oscuro: #324839;
  --verde-claro: #c9da9b;
  --naranja: #e59b32;
  --blanco: #fff;
  --gris-claro: #ddd;
  --rojo-dest: #a82622;
  --beige: #f6f0bf;
}

/* ============================
   HEADER Y MENÚ LATERAL
============================ */
header {
  background: #324839;
  border-bottom: 1px solid #ddd;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 10;
}

.contenedora {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 22px;
  position: relative;
}

/* LOGO */
#logotipo img {
  height: 15px;
}
#logo img {
  height: 30px;
}

/* BOTÓN HAMBURGUESA */
.menu-toggle-checkbox {
  display: none;
}

.menu-toggle-label {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 25px;
  height: 19px;
  cursor: pointer;
  z-index: 1001;
}

.btn-linea {
  height: 3px;
  width: 100%;
  background-color: #f9f9f9;
  border-radius: 3px;
  transition: all 0.3s ease;
}

/* Animación del ícono hamburguesa → X */
.menu-toggle-checkbox:checked ~ .menu-toggle-label .btn-linea:nth-child(1) {
transform: rotate(45deg) translate(5px, 6px);  
}
.menu-toggle-checkbox:checked ~ .menu-toggle-label .btn-linea:nth-child(2) {
 opacity: 0; 
}
.menu-toggle-checkbox:checked ~ .menu-toggle-label .btn-linea:nth-child(3) {
transform: rotate(-45deg) translate(5px, -6px);   
}

/* PANEL DEL MENÚ USUARIO (oculto por defecto) */
.nav-usuario {
  position: fixed;
  top: 0;
  right: -250px;
  width: 250px;
  height: 100vh;
  background-color: #324839;
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  transition: right 0.4s ease;
  z-index: 1000;
  padding-top: 50px;
}

/* Mostrar menú lateral */
.menu-toggle-checkbox:checked ~ .nav-usuario {
  right: 0;
}

/* DATOS DEL USUARIO */
.perfil-usuario {
  text-align: center;
  border-bottom: 1px solid #ddd;
  padding-bottom: 15px;
  margin-bottom: 15px;
}

.avatar-usuario {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 8px;
}

.nombre-usuario {
  font-size: 1.1rem;
  font-weight: 600;
  color: #f9f9f9;
}

/* LISTA DE ENLACES */
.menu {
  list-style: none;
}

.menu li {
  border-bottom: 1px solid #eee;
}

.menu li a {
  display: block;
  padding: 14px 20px;
  color: #f9f9f9;
  text-decoration: none;
  font-weight: 500;
  transition: background 0.2s ease;
}

.menu li a:hover {
  background-color: #eba148;
}


/* ============================
   FOOTER NAVEGACIÓN INFERIOR
============================ */
.bottom-nav {
  position: fixed;
  bottom: -1px;
  left: 0;
  width: 100%;
  background: #e59b32;
  display: flex;
  justify-content: space-around;
  align-items: flex-end;
  height: 50px;
  z-index: 9999;
}

/* Radios ocultos */
.nav-toggle {
  display: none;
}
/* Botones (naranja por defecto) */
.nav-item {
  color: #fff;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 50px;
  transition: all 0.3s ease;
  border-top-left-radius: 40px;
  border-top-right-radius: 40px;
}


.nav-item img {
  width: 26px;
  height: 26px;
  filter: brightness(0) invert(1);
  transition: transform 0.3s ease;
}

/* Botón activo (verde oscuro) */
.nav-toggle:checked + .nav-item {
  background: var(--verde-oscuro);
  height: 70px;
  box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.25);
  z-index: 9999;
  padding: 6px;
  position: relative;
}

/* Submenús */
.submenu-izq {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translate(-50%, 10px);
  background: #c9da9b;
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
  padding: 8px 0 30px;
  box-shadow: 0px -5px 8px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  min-width: 310px;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
}

.submenu-medio {
  position: absolute;
  bottom: 40px;
  left: 0%;
  transform: translate(-50%, 10px);
  background: #c9da9b;
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
  padding: 8px 0 30px;
  box-shadow: 0px -5px 8px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  min-width: 310px;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
}

.submenu-der {
  position: absolute;
  bottom: 40px;
  left: -50%;
  transform: translate(50%, 10px);
  background: #c9da9b;
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
  padding: 8px 0 30px;
  box-shadow: 0px -5px 8px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  min-width: 310px;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
}

.submenu-der a, .submenu-medio a, .submenu-izq a {
  color: var(--verde-oscuro);
  text-decoration: none;
  padding: 8px 16px;
  display: block;
  font-weight: 600;
}

/* Mostrar submenú activo */
.nav-toggle:checked ~ .submenu-der {
  opacity: 1;
  transform: translate(53%, -10px);
  pointer-events: auto;
} 
.nav-toggle:checked ~ .submenu-medio {
  opacity: 1;
  transform: translate(2%, -10px);
  pointer-events: auto;
}
.nav-toggle:checked ~ .submenu-izq {
  opacity: 1;
  transform: translate(-50%, -10px);
  pointer-events: auto;
}

/* === Header === */
.navbar {
  background-color: #2f4a36;
  color: #fff;
  display: flex;
  align-items: center;
  padding: 0.8rem 1rem;
  font-size: 1.1rem;
}

.navbar h1 {
  flex: 1;
  text-align: left;
  font-weight: 600;
}

.back-btn {
  background: none;
  border: none;
  color: #fff;
  font-size: 1.3rem;
  cursor: pointer;
}

/* === Barra de décadas === */
.decade-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #eaf4c8;
  padding: 0.8rem 0;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.decade-nav button {
  background: none;
  border: none;
  font-weight: 600;
  font-size: 2rem;
  color: #2f4a36;
  cursor: pointer;
  padding: 0.4rem 0.6rem;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.decade-nav button.active {
  background-color: #eea845;
  color: #fff;
}

.nav-arrows {
  font-size: 1.2rem;
  color: #2f4a36;
  margin-left: 0.8rem;
}

/* === Línea de tiempo === */
.timeline {
  position: relative;
  padding: 2rem 1.2rem 5rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  overflow-y: auto;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 0;
  left: 45px;
  width: 10px;
  height: 100%;
  background-color: #F7FDEF;
  z-index: -1;
}

/* === Elementos de la línea === */
.timeline-item {
  display: grid;
  align-items: flex-start;
  gap: 1em;
  position: relative;
}

.year {
  font-size: 2rem;
  font-weight: 700;
  width: 40px;
  color: #2f4a36;
  flex-shrink: 0;
  margin-top: 0.2rem;
}

.year.special {
  color: #b62b2b;
}

/* === Cuadro de evento === */
.event {
  background-color: #f6f6e9;
  padding: 1rem;
  border-radius: 12px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  flex: 1;
}

.event h3 {
  margin: 0;
  font-size: 1rem;
  color: #2f4a36;
}

.event p {
  margin: 0.4rem 0 0 0;
  font-size: 0.9rem;
  color: #444;
}

.highlight::before {
  background-color: #b62b2b;
}

.nav-btn {
  background: none;
  border: none;
  color: #2f4a36;
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 1.3rem;
  font-weight: 600;
  cursor: pointer;
}

.nav-btn span {
  font-size: 0.7rem;
  margin-top: 0.1rem;
}

.nav-btn.active {
  color: #fff;
}

/* === Scroll === */
.timeline {
  overflow-y: scroll;
  scroll-behavior: smooth;
}

/* === Responsive === */
@media (min-width: 768px) {
  .timeline {
    padding: 2rem 5rem;
  }
}
@media (min-width: 325px) {


  .submenu-der, .submenu-medio, .submenu-izq {
    min-width: fit-content;

  }

.nav-toggle:checked ~ .submenu-der {
    justify-self: center;
    transform: translate(0%, -10px);
    left: inherit;
    transition:none;
  }
  .nav-toggle:checked ~ .submenu-medio{
    justify-self: center;
    transform: translate(0%, -10px);
    left: inherit;
    transition:none
  }
.nav-toggle:checked ~ .submenu-izq {
    justify-self: center;
    transform: translate(0%, -10px);
    left: inherit;
    transition:none;
  }



  }