@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600;700&display=swap');
/* Reset básico y configuración global */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
body {
  font-family: 'Montserrat', Arial, sans-serif;
  background-color: #f4f8fb;
  color: #222;
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}

/* Header */
.main-header {
  background-color: #1e3a5c;
  color: #fff;
  padding: 10px 25px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 1000;
  height: 70px;
  flex-shrink: 0;
  border-bottom: 1px solid #274472;
}
.logo-container {
  display: flex;
  align-items: center;
}
.logo {
  font-size: 1.3em;
  font-weight: bold;
  background-color: #ff9800;
  color: #fff;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 15px;
}
.header-title {
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: left;
}
.header-title .module-name {
  font-size: 0.9em;
  color: #90caf9;
}
.header-title .content-title {
  font-size: 1.1em;
  font-weight: 500;
}
.main-nav {
  display: flex;
  align-items: center;
  gap: 10px;
}
.main-nav .nav-link {
  color: #fff;
  text-decoration: none;
  margin-left: 15px;
  padding: 8px 15px;
  border-radius: 6px;
  transition: background-color 0.3s, color 0.3s;
  font-size: 0.95em;
}
.main-nav .nav-link:hover,
.main-nav .nav-link.active-nav {
  background-color: #ff9800;
  color: #fff;
}

/* Botón hamburguesa para móviles */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.5em;
  cursor: pointer;
  padding: 5px;
  border-radius: 4px;
  transition: background-color 0.3s;
  margin-left: 5px;
}
.mobile-menu-toggle:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.mobile-buttons {
  display: none;
  gap: 5px;
}

/* Layout principal */
.main-layout {
  display: flex;
  flex-grow: 1;
  overflow: hidden;
  height: calc(100vh - 70px);
}

/* Sidebars y content area */
.sidebar.left,
.sidebar.right,
.content-area {
  padding: 20px 25px;
  overflow-y: auto;
  height: 100%;
}
.sidebar.left,
.sidebar.right {
  background-color: #274472;
  width: 24%;
  min-width: 280px;
  color: #fff;
}
.sidebar.left {
  order: 1;
  border-right: 1px solid #1e3a5c;
}
.sidebar.right {
  order: 3;
  border-left: 1px solid #1e3a5c;
}
.content-area {
  background-color: #fff;
  flex-grow: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  order: 2;
  padding: 15px;
  color: #222;
}
iframe#content-frame {
  width: 100%;
  height: 100%;
  border: none;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(30,58,92,0.08);
}

/* Scrollbar styling */
.sidebar.left::-webkit-scrollbar,
.sidebar.right::-webkit-scrollbar,
.content-area::-webkit-scrollbar {
  width: 8px;
}
.sidebar.left::-webkit-scrollbar-thumb,
.sidebar.right::-webkit-scrollbar-thumb,
.content-area::-webkit-scrollbar-thumb {
  background-color: #ff9800;
  border-radius: 4px;
}
.sidebar.left::-webkit-scrollbar-track,
.sidebar.right::-webkit-scrollbar-track,
.content-area::-webkit-scrollbar-track {
  background-color: #274472;
}

/* Sidebar section headers */
.sidebar h2 {
  color: #ff9800;
  font-size: 0.9em;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 0;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 1px solid #1565c0;
}
.sidebar ul {
  list-style: none;
  padding: 0;
  margin-top: 0;
}
.sidebar ul li + li {
  margin-top: 6px;
}
.sidebar a {
  display: flex;
  align-items: center;
  color: #bbdefb;
  text-decoration: none;
  padding: 12px 10px;
  border-radius: 6px;
  transition: background-color 0.2s, color 0.2s;
  font-size: 0.95em;
}
.sidebar a .icon-placeholder {
  margin-right: 12px;
  font-size: 1.1em;
  width: 20px;
  text-align: center;
  color: #ff9800;
}
.sidebar a:hover {
  background-color: #1565c0;
  color: #fff;
}
.sidebar a:hover .icon-placeholder {
  color: #fff;
}
.sidebar a.active,
.sidebar a.active-lesson,
.sidebar a.active-activity {
  background-color: #ff9800;
  color: #fff;
  font-weight: 500;
}
.sidebar a.active .icon-placeholder,
.sidebar a.active-lesson .icon-placeholder,
.sidebar a.active-activity .icon-placeholder {
  color: #fff;
}

/* Overlay para móviles */
.mobile-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 999;
}

/* Responsividad mejorada */
@media (max-width: 1200px) {
  .sidebar.left, .sidebar.right {
    width: 28%;
    min-width: 250px;
  }
}

@media (max-width: 992px) {
  .sidebar.left, .sidebar.right {
    width: 32%;
    min-width: 220px;
  }
}

@media (max-width: 768px) {
  body {
    overflow: auto;
    height: auto;
  }
  
  .main-header {
    flex-direction: column;
    height: auto;
    padding: 15px;
    align-items: flex-start;
    position: relative;
  }
  
  .logo-container { 
    margin-bottom: 10px; 
    width: 100%;
    justify-content: space-between;
  }
  
  .mobile-buttons {
    display: flex;
  }
  
  .header-title { 
    text-align: left; 
    margin-bottom: 10px; 
  }
  
  .main-nav { 
    width: 100%; 
    display: flex; 
    justify-content: space-around; 
    flex-wrap: wrap;
    gap: 5px;
  }
  
  .main-nav .nav-link { 
    margin-left: 2px; 
    margin-right: 2px; 
    flex-grow: 1; 
    text-align: center; 
    font-size: 0.85em;
    padding: 6px 8px;
  }
  
  .main-layout {
    flex-direction: column;
    height: auto;
    overflow: visible;
    position: relative;
  }
  
  .sidebar.left, 
  .sidebar.right {
    position: fixed;
    top: 0;
    width: 280px;
    height: 100vh;
    z-index: 1000;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    display: block;
    min-width: unset;
    border-left: none;
    border-right: none;
    padding: 15px;
  }
  
  .sidebar.left { 
    left: 0;
  }
  
  .sidebar.left.mobile-open {
    transform: translateX(0);
  }
  
  .sidebar.right { 
    right: 0;
    left: auto;
    transform: translateX(100%);
  }
  
  .sidebar.right.mobile-open {
    transform: translateX(0);
  }
  
  .content-area { 
    width: 100%;
    min-width: unset;
    height: auto;
    max-height: none;
    overflow-y: visible;
    border-left: none;
    border-right: none;
    padding: 15px;
    margin: 0;
    min-height: 60vh;
  }
  
  iframe#content-frame {
    min-height: 400px;
  }
  
  .mobile-overlay.active {
    display: block;
  }
}

@media (max-width: 480px) {
  .main-header {
    padding: 10px;
  }
  
  .logo {
    width: 35px;
    height: 35px;
    font-size: 1.1em;
    margin-right: 10px;
  }
  
  .header-title .module-name {
    font-size: 0.8em;
  }
  
  .header-title .content-title {
    font-size: 1em;
  }
  
  .main-nav .nav-link {
    font-size: 0.8em;
    padding: 5px 6px;
  }
  
  .sidebar.left,
  .sidebar.right {
    width: 100%;
  }
  
  .content-area {
    padding: 8px;
  }
  
  iframe#content-frame {
    min-height: 350px;
  }
} 