/* Sidebar */

.sidebar {
  width: 280px;
  background: var(--background-primary);
  color: var(--white);
  padding: 0;
  overflow-y: auto;
  position: fixed;
  height: 100vh;
  left: 0;
  top: 0;
  z-index: 98;
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
}

.sidebar-header {
  padding: 24px 0 24px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: var(--main_primary);
}

.sidebar-header h2 {
  font-size: 22px;
  font-weight: 700;
  margin: 0;
  color: var(--text);
}

.sidebar-menu {
  list-style: none;
  padding: 16px 0;
  border-bottom: 2px solid var(--main_primary);
}

.menu-item,
.category-item {
  margin: 2px 12px;
  padding: 0;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 14px;
  font-weight: 500;
}

.sidebar-menu-bottom-btn {
  margin-top: auto;
  width: 100%;
  margin-bottom: 16px;
  list-style: none;
  padding: 0;
}

li.menu-item::marker {
  content: "";
}

.menu-item:hover,
.category-item:hover {
  background-color: rgba(255, 255, 255, 0.22);
  color: var(--white);
  border-radius: 8px;
}

.menu-item.active {
  background-color: var(--main_primary);
  color: var(--text);
  border-radius: 8px;
}

.menu-link.menu-item-full {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 12px 20px;
  border-radius: 8px;
  box-sizing: border-box;
  color: var(--white);
  text-decoration: none;
  border: none;
}

.menu-item.active .menu-link.menu-item-full {
  background-color: var(--main_primary);
  color: var(--text);
}

.menu-item-full.blog-item-nav{
  gap: 150px;
  font-weight: 300;
  
}


.menu-icon,
.category-icon {
  margin-right: 12px;
  font-size: 16px;
  width: 20px;
  text-align: center;
}

.menu-link {
  color: var(--sidebar-text-color);
  font-size: 1em;
}

.menu-link:hover,
.menu-link:focus {
  color: var(--white);
}

.sidebar-section {
  margin: 24px 0;
  padding: 0 20px 25px;
  border-bottom: 1px solid var(--primary);
}

.sidebar-section h4 {
  color: rgba(255, 255, 255, 0.6);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 12px;
}

.category-list {
  list-style: none;
}

.category-item {
  padding: 10px 0;
  margin: 0;
  font-size: 13px;
}

/* Sticky header bar */

.header {
  background: var(--white);
  padding: 20px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  margin-left: 280px;
}

.header-left h1 {
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.header-left p {
  color: var(--text);
  font-size: 14px;
}

/* Fade-in animation */

.fadeInContent {
  opacity: 0;
  transform: translateY(40px);
  animation: fadeInContent 0.4s ease-out forwards;
}

@keyframes fadeInContent {
  from { opacity: 0; transform: translateY(40px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Mobile menu toggle */

.mobile-menu-toggle {
  display: none;
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 9999;
  width: 56px;
  height: 56px;
  border-radius: 16px;
  border: none;
  background: var(--main_primary);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition:
    transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
    box-shadow 0.3s ease,
    background 0.3s ease;
}

.mobile-menu-toggle:active {
  transform: scale(0.92);
}

.mobile-menu-toggle:focus,
.mobile-menu-toggle:focus-visible {
  outline: none;
  background: var(--main_primary);
}

.mobile-menu-toggle.is-active {
  background: #fff;
}

.mobile-menu-toggle.is-active:focus,
.mobile-menu-toggle.is-active:focus-visible {
  background: #fff;
}

/* Hamburger bars */

.hamburger {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 24px;
  height: 18px;
}

.hamburger span {
  display: block;
  position: absolute;
  left: 0;
  width: 100%;
  height: 2.5px;
  border-radius: 2px;
  background: var(--text);
  transition: all 0.35s cubic-bezier(0.77, 0, 0.18, 1);
}

.hamburger span:nth-child(1) { top: 0; }
.hamburger span:nth-child(2) { top: 50%; transform: translateY(-50%); }
.hamburger span:nth-child(3) { bottom: 0; }

.mobile-menu-toggle.is-active .hamburger span {
  background: var(--text);
}

.mobile-menu-toggle.is-active .hamburger span:nth-child(1) {
  top: 50%;
  transform: translateY(-50%) rotate(45deg);
}

.mobile-menu-toggle.is-active .hamburger span:nth-child(2) {
  opacity: 0;
  transform: translateY(-50%) scaleX(0);
}

.mobile-menu-toggle.is-active .hamburger span:nth-child(3) {
  bottom: 50%;
  transform: translateY(50%) rotate(-45deg);
}

/* Backdrop overlay */

.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9990;
  background: rgba(0, 0, 0, 0);
  backdrop-filter: blur(0);
  -webkit-backdrop-filter: blur(0);
  transition: background 0.35s ease, backdrop-filter 0.35s ease, -webkit-backdrop-filter 0.35s ease;
  pointer-events: none;
}

.sidebar-backdrop.is-visible {
  display: block;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  pointer-events: auto;
}

.menu-link_inline{
  color: var(--text);
}

@keyframes menuItemSlideIn {
  from { opacity: 0; transform: translateX(-20px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* Responsive: tablet & below */

@media (max-width: 1136px) {
  html, body {
    min-width: 320px;
    flex-direction: column;
  }

  .mobile-menu-toggle {
    display: block;
  }

  .sidebar {
    width: 300px;
    max-width: 85vw;
    height: 100vh;
    height: 100dvh;
    position: fixed;
    top: 0;
    left: 0;
    transform: translateX(-105%);
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.4s ease;
    box-shadow: none;
    z-index: 9995;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .sidebar.is-open {
    transform: translateX(0);
    box-shadow: 8px 0 30px rgba(0, 0, 0, 0.3);
  }

  .sidebar.is-open .menu-item,
  .sidebar.is-open .sidebar-menu-bottom-btn .menu-item {
    animation: menuItemSlideIn 0.35s ease forwards;
    opacity: 0;
  }

  .sidebar.is-open .menu-item:nth-child(1) { animation-delay: 0.08s; }
  .sidebar.is-open .menu-item:nth-child(2) { animation-delay: 0.13s; }
  .sidebar.is-open .menu-item:nth-child(3) { animation-delay: 0.18s; }
  .sidebar.is-open .menu-item:nth-child(4) { animation-delay: 0.23s; }
  .sidebar.is-open .menu-item:nth-child(5) { animation-delay: 0.28s; }
  .sidebar.is-open .sidebar-menu-bottom-btn .menu-item { animation-delay: 0.35s; }

  .sidebar.is-open .sidebar-header {
    animation: menuItemSlideIn 0.4s ease forwards;
    animation-delay: 0.02s;
    opacity: 0;
  }

  .header {
    padding: 16px;
    flex-direction: column;
    gap: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-left: 0;
  }

  .header-left h1 {
    font-size: 22px;
    text-align: center;
  }

  .header-left p {
    text-align: center;
  }

  .main-content {
    margin-left: 0;
  }

  .menu-link.menu-item-full {
    padding: 14px 20px;
  }

  .menu-icon {
    font-size: 18px;
  }
}

/* Responsive: small phones */

@media (max-width: 430px) {
  .header {
    padding: 16px;
    flex-direction: column;
    gap: 12px;
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
    margin-left: 0;
    padding-left: 3rem;
  }

  .sidebar {
    max-width: 92vw;
  }

  .sidebar-header h2 {
    font-size: 19px;
  }
}
