/* OVERLAY */
#right-sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  opacity: 0;
  visibility: hidden;
  transition: 0.3s ease;
  z-index: 10000;
}

#right-sidebar-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* RIGHT SIDEBAR MENU */
#right-sidebar-menu {
  position: fixed;
  top: 0;
  right: 0;
  width: 500px;
  max-width: 90%;
  height: 100vh;
  background: #ffffff;
  padding: 40px 40px 40px 40px;
  overflow-y: auto;
  box-shadow: -4px 0 20px rgba(0,0,0,0.15);
  transform: translateX(100%);
  transition: 0.35s ease;
  z-index: 10002;
  font-family: 'Open Sans', sans-serif;
}

/* ACTIVE */
#right-sidebar-menu.active {
  transform: translateX(0);
}

/* HEADER STYLE */
.right-sidebar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  padding-bottom: 20px;
}

.right-sidebar-title {
  font-family: 'Open Sans', sans-serif;
  font-weight: 400;
  font-style: normal;
  font-size: 14px;
  line-height: 1.2;
  letter-spacing: 0%;
  color: #868A99;
  margin: 0;
  padding: 0;
  display: block;
}

.right-sidebar-close {
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0B3746;
  transition: transform 0.3s ease, color 0.3s ease;
  width: 40px;
  height: 40px;
  border-radius: 50%;
}

.right-sidebar-close:hover {
  transform: rotate(90deg);
  color: #166987;
  background-color: rgba(22, 105, 135, 0.1);
}

.right-sidebar-close svg {
  width: 24px;
  height: 24px;
}

/* NAVIGATION */
.right-sidebar-nav {
  margin: 0;
  padding: 0;
}

/* MAIN MENU LINKS (Giới thiệu, Quảng cáo) */
.right-sidebar-main-menu {
  margin-bottom: 40px;
  padding-bottom: 30px;
  border-bottom: 1px solid #E8C986;
}

.right-sidebar-main-link {
  font-family: 'Open Sans', sans-serif;
  font-weight: 500;
  font-style: normal;
  font-size: 32px;
  line-height: 1.3;
  letter-spacing: 0%;
  color: #0B3746;
  text-decoration: none;
  display: block;
  width: fit-content;
  padding: 12px 0;
  transition: color 0.3s ease;
  margin-bottom: 8px;
  position: relative;
}

.right-sidebar-main-link::after {
  content: '';
  position: absolute;
  bottom: 8px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: #166987;
  transition: width 0.3s ease;
}

.right-sidebar-main-link:hover,
.right-sidebar-main-link.active {
  color: #166987;
}

.right-sidebar-main-link:hover::after,
.right-sidebar-main-link.active::after {
  width: 100%;
}

.right-sidebar-menu-item {
  margin: 0;
  padding: 0;
  margin-bottom: 30px;
}

/* PARENT MENU LINKS (Các ấn phẩm Tạp chí, Màn hình giải trí, ...) */
.right-sidebar-menu-parent {
  font-family: 'Open Sans', sans-serif;
  font-weight: 600;
  font-style: normal;
  font-size: 16px;
  line-height: 1.4;
  letter-spacing: 0%;
  color: #0B3746;
  text-decoration: none;
  display: inline-block;
  padding: 0 0 12px 0;
  cursor: default;
  transition: color 0.3s ease;
  position: relative;
  margin-bottom: 12px;
}

.right-sidebar-menu-parent::after {
  content: '';
  position: absolute;
  bottom: 8px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: #166987;
  transition: width 0.3s ease;
}

.right-sidebar-menu-parent:hover,
.right-sidebar-menu-parent.active {
  color: #166987;
}

.right-sidebar-menu-parent:hover::after,
.right-sidebar-menu-parent.active::after {
  width: 100%;
}

/* CHILD MENU LINKS - Multi-column layout - Always visible */
.right-sidebar-menu-children {
  list-style: none;
  margin: 0;
  padding: 8px 0 0 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 8px 20px;
  column-gap: 20px;
}

.right-sidebar-menu-children li {
  margin: 0;
  padding: 0;
}

.right-sidebar-menu-child {
  font-family: 'Open Sans', sans-serif;
  font-weight: 400;
  font-style: normal;
  font-size: 14px;
  line-height: 1.6;
  letter-spacing: 0%;
  color: #868A99;
  text-decoration: none;
  display: inline-block;
  padding: 4px 0;
  transition: color 0.3s ease;
  position: relative;
}

.right-sidebar-menu-child::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 0;
  width: 0;
  height: 1.5px;
  background-color: #166987;
  transition: width 0.3s ease;
}

.right-sidebar-menu-child:hover,
.right-sidebar-menu-child.active {
  color: #166987;
  text-decoration: none;
}

.right-sidebar-menu-child:hover::after,
.right-sidebar-menu-child.active::after {
  width: 100%;
}

/* Responsive */
@media (max-width: 1024px) {
  #right-sidebar-menu {
    width: 450px;
    padding: 35px 30px;
  }
  
  .right-sidebar-menu-children {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 6px 15px;
  }
}

@media (max-width: 768px) {
  #right-sidebar-menu {
    width: 100%;
    max-width: 100%;
    padding: 30px 20px;
  }
  
  .right-sidebar-header {
    margin-bottom: 25px;
    padding-bottom: 15px;
  }
  
  .right-sidebar-title {
    font-size: 12px;
  }
  
  .right-sidebar-close {
    width: 36px;
    height: 36px;
  }
  
  .right-sidebar-close svg {
    width: 20px;
    height: 20px;
  }
  
  .right-sidebar-main-menu {
    margin-bottom: 30px;
    padding-bottom: 25px;
  }
  
  .right-sidebar-main-link {
    font-size: 28px;
    padding: 10px 0;
    margin-bottom: 6px;
  }
  
  .right-sidebar-menu-item {
    margin-bottom: 25px;
  }
  
  .right-sidebar-menu-parent {
    font-size: 15px;
    padding: 0 0 10px 0;
    margin-bottom: 10px;
  }
  
  .right-sidebar-menu-children {
    grid-template-columns: 1fr;
    gap: 6px 0;
    padding-top: 6px;
  }
  
  .right-sidebar-menu-child {
    font-size: 13px;
    padding: 3px 0;
  }
}

@media (max-width: 480px) {
  #right-sidebar-menu {
    padding: 25px 15px;
  }
  
  .right-sidebar-main-link {
    font-size: 24px;
  }
  
  .right-sidebar-menu-parent {
    font-size: 14px;
  }
  
  .right-sidebar-menu-child {
    font-size: 12px;
  }
}

