/* Fuente Montserrat */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600&display=swap');

body {
  margin: 0;
  font-family: 'Montserrat', sans-serif;
  display: flex;
  min-height: 100vh;
  background: #f4f4f4;
}

/* Topbar */
.topbar {
  position: fixed;
  top: 0;
  width: 100%;
  height: 50px;
  background-color: #0d1b4c;
  color: white;
  display: flex;
  align-items: center;
  padding: 0 15px;
  z-index: 1003;
  font-weight: 600;
  font-size: 1.2rem;
}

.topbar a { color: white; text-decoration: none; }
.topbar li { list-style: none; }

/* Botón hamburguesa */
.btn-burger {
  background: none;
  border: none;
  cursor: pointer;
  margin-right: 10px;
}
.burger {
  width: 25px;
  height: 3px;
  background-color: white;
  display: block;
  position: relative;
}
.burger::after, .burger::before {
  content: "";
  width: 25px;
  height: 3px;
  background-color: white;
  position: absolute;
  left: 0;
}
.burger::before { top: -8px; }
.burger::after { top: 8px; }

/* Overlay */
.overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  z-index: 1001;
}
.overlay.active { display: block; }

/* Sidebar lateral */
.sidebar {
  position: fixed;
  top: 50px;
  left: 0;
  width: 180px; /* más angosto */
  height: calc(100% - 50px);
  background-color: #0d1b4c;
  color: white;
  overflow-y: auto;
  transition: transform 0.3s ease-in-out;
  z-index: 1002;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.sidebar nav { flex-grow: 1; }

.sidebar nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar a {
  color: white;
  text-decoration: none;
  display: block;
  padding: 10px 12px; /* más compacto */
  border-radius: 5px;
  transition: background 0.3s;
}
.sidebar a:hover { background-color: rgba(255,255,255,0.1); }

/* Submenús */
.submenu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
  list-style: none;
  padding-left: 12px;
}
.submenu.open { max-height: 500px; }
.submenu li a { padding: 8px 12px; display: block; }

/* Botones de submenú */
.item {
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  padding: 10px 12px;
  text-align: left;
  width: 100%;
  font-size: 0.95rem;
  transition: background 0.3s;
}
.item:hover { background-color: rgba(255,255,255,0.1); }

/* Extra nav: botón WhatsApp */
.extra-nav {
  padding: 15px;
  text-align: center;
}

.site-button.btn-whatsapp {
  display: inline-block;
  background-color: #25D366; /* WhatsApp green */
  color: white;
  font-weight: 600;
  padding: 8px 10px;
  border-radius: 5px;
  text-decoration: none;
  font-size: 0.85rem;
  transition: background 0.3s;
}

.site-button.btn-whatsapp i { margin-right: 5px; }
.site-button.btn-whatsapp:hover { background-color: #1ebe57; }

/* Logo al final */
.logo-frame {
  text-align: center;
  padding: 20px 10px;
  border-top: 1px solid rgba(255,255,255,0.1);
}
.logo-frame img {
  max-width: 100px;
  margin: 0 auto;
  display: block;
  height: auto;
}
/* Fondo oscuro */
.popup {
  display: none;
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,.6);
  justify-content: center;
  align-items: center;
  z-index: 1000;
}
.popup.open { display: flex; }
.popup-content {
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  max-width: 600px;
  width: 90%;
  position: relative;
}
.popup-close {
  position: absolute;
  top: 10px; right: 10px;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
}


/* Contenido */
.content {
  margin-left: 180px; /* espacio suficiente al lado derecho */
  padding: 20px;
  flex: 1;
  transition: margin-left 0.3s ease;
}

/* Spinner */
.spinner {
  display: none;
  border: 4px solid rgba(0,0,0,0.1);
  border-left-color: #0d1b4c;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  animation: spin 1s linear infinite;
  margin: 20px auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Responsive */
@media (max-width: 768px) {
  .content { margin-left: 0; margin-top: 50px; }
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
}