@media (min-width: 992px) {
  .educate-header-area .row.header-wrap {
    flex-wrap: nowrap;
    align-items: center;
    padding-left: 24px;
    padding-right: 16px;
  }
  .educate-header-area .header-wrap > .col-lg-2:first-child {
    flex: 0 0 110px;
    max-width: 110px;
    width: 110px;
  }
  .educate-header-area .header-wrap > .col-lg-8 {
    flex: 1 1 auto;
    max-width: none;
    width: auto;
  }
  .educate-header-area .header-wrap > .col-lg-2:last-child {
    flex: 0 0 52px;
    max-width: 52px;
    width: 52px;
  }
  .header-menu {
    text-align: center;
  }
  .header-menu > ul.nav_scroll {
    display: flex !important;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: center;
    width: 100%;
    white-space: nowrap;
  }
  .header-menu > ul.nav_scroll > li {
    display: inline-flex;
    flex-shrink: 0;
  }
  .header-menu > ul.nav_scroll > li > a {
    padding: 7px 10px !important;
    margin: 28px 1px;
    border-radius: 8px;
    white-space: nowrap;
    font-size: 14px !important;
  }
  .header-menu > ul.nav_scroll > li > a::before {
    position: absolute !important;
    left: 0 !important;
    right: auto !important;
    top: 0 !important;
    width: 0 !important;
    height: 100% !important;
    border-radius: 8px !important;
    background: var(--primary-color) !important;
    transform: none !important;
    z-index: -1;
  }
  .header-menu > ul.nav_scroll > li > a:hover::before,
  .header-menu > ul.nav_scroll > li:hover > a::before,
  .header-menu > ul.nav_scroll > li.has-mega.is-open > a::before {
    width: 100% !important;
  }
  .header-menu > ul.nav_scroll > li:hover > a,
  .header-menu > ul.nav_scroll > li:hover > a i,
  .header-menu > ul.nav_scroll > li.has-mega.is-open > a,
  .header-menu > ul.nav_scroll > li.has-mega.is-open > a i {
    color: #fff !important;
  }
  .sticky .header-menu > ul.nav_scroll > li > a::before {
    background: #fff !important;
  }
  .sticky .header-menu > ul.nav_scroll > li:hover > a,
  .sticky .header-menu > ul.nav_scroll > li:hover > a i,
  .sticky .header-menu > ul.nav_scroll > li:hover > a span,
  .sticky .header-menu > ul.nav_scroll > li.has-mega.is-open > a,
  .sticky .header-menu > ul.nav_scroll > li.has-mega.is-open > a i,
  .sticky .header-menu > ul.nav_scroll > li.has-mega.is-open > a span {
    color: #3b0764 !important;
  }

  .header-menu ul li.has-mega {
    position: static;
  }
  .educate-header-area {
    overflow: visible;
  }
  .mega-mobile-list {
    display: none !important;
  }
  .mega-menu a::before,
  .mega-menu button::before {
    display: none !important;
    width: 0 !important;
  }
  .mega-menu .mega-cat-title,
  .mega-menu .mega-item-text,
  .mega-menu .mega-item-text strong,
  .mega-menu .mega-item-text small {
    transform: none !important;
    margin-left: 0 !important;
    position: static !important;
    top: auto !important;
    letter-spacing: normal !important;
  }
  .mega-menu i {
    margin-left: 0 !important;
    letter-spacing: normal !important;
  }
  .mega-menu i:not(.mega-cat-arrow):not(.mega-item-arrow) {
    transform: none !important;
    position: static !important;
    top: auto !important;
  }
  .mega-cat-title {
    display: block !important;
  }
  .mega-item-text {
    display: flex !important;
    flex-direction: column;
  }
  .mega-cat-icon,
  .mega-item-icon {
    display: flex !important;
    transform: none !important;
  }
  .mega-menu {
    display: none;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 100%;
    width: min(1100px, calc(100vw - 40px));
    background: linear-gradient(180deg, #ffffff 0%, #fbf8ff 100%);
    border: 1px solid rgba(107, 47, 181, 0.08);
    border-radius: 22px;
    box-shadow: 0 24px 60px rgba(40, 20, 80, 0.16);
    z-index: 2000;
    padding: 20px;
    text-align: left;
    animation: megaFade 0.28s ease;
  }
  .mega-menu::before {
    content: "";
    position: absolute;
    left: 50%;
    top: -36px;
    transform: translateX(-50%);
    width: 100vw;
    height: 40px;
  }
  @keyframes megaFade {
    from { opacity: 0; transform: translateX(-50%) translateY(12px) scale(0.985); }
    to { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
  }
  .header-menu ul li.has-mega.is-open > .mega-menu {
    display: block;
  }
  .header-menu ul li.has-mega.mega-force-hide > .mega-menu {
    display: none !important;
  }
  .mega-menu-inner {
    display: flex;
    position: relative;
    height: min(70vh, 520px);
    min-height: 360px;
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
  }
  .mega-menu-inner::after {
    content: "";
    position: absolute;
    top: 0;
    left: -40%;
    width: 30%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(123, 63, 212, 0.07), transparent);
    animation: megaEduShine 6s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
  }
  @keyframes megaEduShine {
    0% { transform: translateX(0); }
    100% { transform: translateX(420%); }
  }
  .mega-menu,
  .mega-menu-inner,
  .mega-menu-left,
  .mega-menu-right,
  .mega-panel,
  .mega-items {
    overflow-x: hidden;
  }
  .mega-menu-left,
  .mega-items {
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: #c9b6ea #f3eefc;
  }
  .mega-menu-left::-webkit-scrollbar,
  .mega-items::-webkit-scrollbar {
    width: 8px;
    height: 0;
  }
  .mega-menu-left::-webkit-scrollbar-track,
  .mega-items::-webkit-scrollbar-track {
    background: #f3eefc;
    border-radius: 8px;
  }
  .mega-menu-left::-webkit-scrollbar-thumb,
  .mega-items::-webkit-scrollbar-thumb {
    background: #c9b6ea;
    border-radius: 8px;
  }
  .mega-menu-left {
    width: 290px;
    flex-shrink: 0;
    height: 100%;
    padding: 8px;
    background: linear-gradient(180deg, #f8f4ff 0%, #f4f6fb 100%);
    border-radius: 16px;
    position: relative;
    z-index: 1;
  }
  .mega-cat {
    width: 100%;
    border: 0;
    background: transparent;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 14px;
    border-radius: 12px;
    color: #2b2b33;
    font-size: 14px;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    transition: background 0.18s ease, box-shadow 0.18s ease, color 0.18s ease, transform 0.18s ease;
  }
  .mega-cat:hover {
    background: #efe6ff;
    color: #5b22a8;
    transform: translateX(3px);
  }
  .mega-cat.active {
    background: #fff;
    color: #5b22a8;
    box-shadow: 0 8px 20px rgba(91, 34, 168, 0.12);
  }
  .mega-cat-icon {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
    color: #6b2fb5;
    font-size: 17px;
    box-shadow: 0 2px 8px rgba(20, 16, 40, 0.06);
  }
  .mega-cat.active .mega-cat-icon {
    background: linear-gradient(180deg, #7b3fd4 0%, #5b22a8 100%);
    color: #fff;
    animation: megaIconGlow 2.2s ease-in-out infinite;
  }
  @keyframes megaIconGlow {
    0%, 100% { box-shadow: 0 2px 8px rgba(91, 34, 168, 0.16); }
    50% { box-shadow: 0 8px 18px rgba(91, 34, 168, 0.34); }
  }
  .mega-cat-icon img {
    width: 24px;
    height: 24px;
    object-fit: contain;
  }
  .mega-cat-title {
    flex: 1;
    min-width: 0;
    line-height: 1.35;
    white-space: normal;
    overflow-wrap: anywhere;
  }
  .mega-cat-arrow {
    font-size: 12px;
    opacity: 0.45;
  }
  .mega-cat.active .mega-cat-arrow {
    opacity: 1;
    color: #5b22a8;
  }
  .mega-menu-right {
    flex: 1;
    min-width: 0;
    height: 100%;
    padding: 8px 6px 8px 18px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
  }
  .mega-panel {
    display: none;
  }
  .mega-panel.active {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
  }
  .mega-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f0eef6;
  }
  .mega-panel-head h4 {
    margin: 0;
    font-size: 18px;
    color: #1f1f28;
    font-weight: 700;
  }
  .mega-panel-actions {
    display: flex;
    align-items: center;
    gap: 10px;
  }
  .mega-view-all {
    color: #6b2fb5 !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    padding: 6px 10px !important;
    border-radius: 8px;
    text-transform: none !important;
  }
  .mega-view-all:hover {
    background: #f4eaff;
    color: #5b22a8 !important;
  }
  .mega-view-all i {
    font-size: 12px;
    margin-left: 4px;
  }
  .mega-close {
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    background: #f3f4f8;
    color: #444;
    cursor: pointer;
    transition: background 0.18s ease, color 0.18s ease;
  }
  .mega-close:hover {
    background: #efe6ff;
    color: #5b22a8;
  }
  .mega-items {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 14px;
    flex: 1;
    min-height: 0;
    align-content: start;
    padding-right: 6px;
  }
  .mega-item {
    display: flex !important;
    align-items: center;
    gap: 12px;
    padding: 13px 14px !important;
    border-radius: 14px;
    border: 1px solid #f0eef6;
    background: #fff;
    color: #222 !important;
    text-transform: none !important;
    font-weight: 500 !important;
    line-height: 1.3 !important;
    box-shadow: 0 1px 0 rgba(20, 16, 40, 0.02);
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease, background 0.18s ease;
  }
  .mega-panel.active .mega-item {
    animation: megaItemIn 0.38s ease both;
  }
  .mega-panel.active .mega-item:nth-child(1) { animation-delay: 0.04s; }
  .mega-panel.active .mega-item:nth-child(2) { animation-delay: 0.08s; }
  .mega-panel.active .mega-item:nth-child(3) { animation-delay: 0.12s; }
  .mega-panel.active .mega-item:nth-child(4) { animation-delay: 0.16s; }
  .mega-panel.active .mega-item:nth-child(5) { animation-delay: 0.20s; }
  .mega-panel.active .mega-item:nth-child(6) { animation-delay: 0.24s; }
  .mega-panel.active .mega-item:nth-child(7) { animation-delay: 0.28s; }
  .mega-panel.active .mega-item:nth-child(8) { animation-delay: 0.32s; }
  .mega-panel.active .mega-item:nth-child(n+9) { animation-delay: 0.36s; }
  @keyframes megaItemIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
  }
  .mega-item:hover {
    background: #faf7ff !important;
    border-color: #e4d6ff;
    box-shadow: 0 10px 22px rgba(91, 34, 168, 0.1);
    transform: translateY(-2px);
    color: #222 !important;
  }
  .mega-item::before,
  .mega-view-all::before,
  .mega-cat::before {
    display: none !important;
  }
  .mega-item-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(180deg, #f6f1ff 0%, #eef2fb 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
    color: #6b2fb5;
    font-size: 18px;
  }
  .mega-item:hover .mega-item-icon {
    background: linear-gradient(180deg, #efe6ff 0%, #e7ddff 100%);
  }
  .mega-item-icon img {
    width: 28px;
    height: 28px;
    object-fit: contain;
  }
  .mega-item-text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
    overflow: hidden;
  }
  .mega-item-text strong,
  .mega-item-text small {
    white-space: normal;
    overflow-wrap: anywhere;
  }
  .mega-item-text strong {
    font-size: 14px;
    color: #1f1f28;
  }
  .mega-item-text small {
    font-size: 12px;
    color: #8a8a96;
    font-weight: 400;
  }
  .mega-item-arrow {
    color: #c2b8d6;
    font-size: 13px;
  }
  .mega-item:hover .mega-item-arrow {
    color: #6b2fb5;
    transform: translateX(3px);
  }
  .mega-menu-empty,
  .mega-empty-items {
    padding: 24px 8px;
    color: #777;
    margin: 0;
  }
}

@media (max-width: 991px) {
  .mega-menu {
    display: none !important;
  }
}
