/* ================= LAYOUT GENERAL ================= */

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.layout {
  display: flex;
  flex: 1;
  
}

/* ================= SIDEBAR ================= */

.sidebar {
  width: 250px;
  background-color: var(--bg-section);
  padding: 15px;
  position: sticky;
  top: 120px; 
  overflow-y: auto;
  transition: transform 0.3s ease;
  height: 100vh;
}

.sidebar.hidden {
  display: none;
}

.sidebar h2 {
  text-align: center;
  color: var(--color-4);
  margin-bottom: 20px;
}

.sidebar a {
  display: block;
  color: var(--color-1);
  padding: 12px;
  text-decoration: none;
  margin-bottom: 5px;
  border-radius: 5px;
  transition: 0.3s;
}

.sidebar a:hover,
.sidebar a.active {
  background-color: var(--color-4);
  color: black;
  font-weight: bold;
}

/* ================= MAIN ================= */

main {
  flex: 1;
  padding: 40px;
}

/* Sections */
section {
    
  scroll-margin-top: 100px;
  margin-bottom: 60px;
  padding: 20px;
  background-color: var(--bg-section);
  border-radius: 10px;
  color: var(--color-1) ;
  line-height: 50px;
  
}


h1, h2, h4 {
  color: var(--color-4);
}

ul {
  line-height: 1.8;
}

li{
margin-left: 20px;
color: var(--color-1) ;
}

img {
  width: 100%;
  max-width: 500px;
  margin-top: 15px;
  border-radius: 8px;
}


section img {
  display: block;              /* Hace que la imagen sea tipo bloque */
  margin: 20px auto;           /* Centra horizontalmente */
  width: 100%;
  max-width: 500px;
  border: 4px solid var(--color-4);  /* Borde */
  border-radius: 10px;         /* Bordes redondeados */
  box-shadow: 0 4px 12px rgba(0,0,0,0.3); /* Opcional: sombra bonita */
}

/* ================= ANIMACIONES ================= */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease-out;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ================= RESPONSIVE ================= */
@media (max-width: 900px) {
  .sidebar {
   display: none;
  }
  main {
    margin: 4vw;
    padding: 0px;
  }
}

@media (max-width: 480px) {
  .logo img {
    width: 40px;
    height: 40px;
  }
  .titulo-principal {
    font-size: 1rem;
  }
  .titulo-secundario {
    font-size: 0.65rem;
  }
}