.mega-menu {
    background: #fff;
    color: #0E1018;
}

/* ── Simple layout (Company, Content) ────────── */

.mega-menu__simple {
    padding: 28px 0;
}

.mega-menu__simple-list {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 4px 16px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.mega-menu__simple-link {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 10px 12px;
    border-radius: 12px;
    text-decoration: none;
    transition: background 0.2s;
    position: relative;
    overflow: hidden;
}

.mega-menu__simple-link:hover {
    background: rgba(0,0,0,0.04);
}

/* Stars on hover */
.mega-menu__simple-link::before,
.mega-menu__simple-link::after {
    content: '✦';
    position: absolute;
    color: #8DE6A6;
    opacity: 0;
    transition: opacity 0.25s, transform 0.25s;
    pointer-events: none;
    line-height: 1;
}

.mega-menu__simple-link::before {
    font-size: 10px;
    top: 5px;
    right: 8px;
    transform: scale(0.3) rotate(-30deg);
}

.mega-menu__simple-link::after {
    font-size: 7px;
    bottom: 6px;
    right: 5px;
    transform: scale(0.3) rotate(20deg);
}

.mega-menu__simple-link:hover::before,
.mega-menu__simple-link:hover::after {
    opacity: 1;
    transform: scale(1) rotate(0deg);
}

.mega-menu__simple-icon {
    width: 28px;
    height: 28px;
    object-fit: contain;
    border-radius: 6px;
    margin-bottom: 2px;
    flex-shrink: 0;
}

.mega-menu__empty {
    color: rgba(14,16,24,0.30);
    font-size: 14px;
    padding: 28px 0;
    margin: 0;
}

/* ── Panel ────────────────────────────────────────────────────── */

.mega-menu__panel {
    display: none;
}

.mega-menu__panel--active {
    display: block;
}

/* ── Solutions / Partners layout ──────────────────────────────── */

.mega-menu__solutions,
.mega-menu__partners {
    display: flex;
    padding: 20px 0 50px;
    gap: 0;
    align-items: flex-start;
}

/* Sidebar icon (16×16) before tab label */
.mega-menu__sidebar-btn-label {
    display: flex;
    align-items: center;
    gap: 8px;
}

.mega-menu__sidebar-icon {
    display: block;
    width: 16px;
    height: 16px;
    object-fit: contain;
    flex-shrink: 0;
}

/* ── Sidebar ──────────────────────────────────────────────────── */

.mega-menu__sidebar {
    list-style: none;
    margin: 0;
    padding: 16px 0;
    min-width: 240px;
    max-width: 240px;
    height: 450px;
    max-height: 450px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(0,0,0,0.15) transparent;
    background: rgba(0, 0, 0, 0.03);
    border-radius: 20px;
    flex-shrink: 0;
}

.mega-menu__sidebar::-webkit-scrollbar {
    width: 4px;
}
.mega-menu__sidebar::-webkit-scrollbar-track {
    background: transparent;
    margin: 16px 0;
}
.mega-menu__sidebar::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.15);
    border-radius: 4px;
}
.mega-menu__sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(0,0,0,0.30);
}

.mega-menu__sidebar-item {
    margin: 0;
}

.mega-menu__sidebar-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    color: #0E1018;
    font-size: 16px;
    font-weight: 600;
    font-family: inherit;
    padding: 5px 10px 5px 15px;
    cursor: pointer;
    transition: color 0.2s;
}

.mega-menu__sidebar-btn:hover {
    color: rgba(14,16,24,0.55);
}

.mega-menu__sidebar-arrow {
    display: flex;
    align-items: center;
    opacity: 0;
    transform: translateX(-4px) rotate(-90deg);
    transition: opacity 0.2s, transform 0.2s;
    flex-shrink: 0;
}

.mega-menu__sidebar-btn:hover .mega-menu__sidebar-arrow {
    opacity: 1;
    transform: translateX(0) rotate(-90deg);
}

/* Active sidebar item — faded */
.mega-menu__sidebar-item--active .mega-menu__sidebar-btn {
    color: rgba(14,16,24,0.40);
    background: none;
}

/* ── Content area ─────────────────────────────────────────────── */

.mega-menu__content {
    flex: 1;
    padding: 0 0 0 30px;
    max-height: 450px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(0,0,0,0.15) transparent;
}

.mega-menu__content::-webkit-scrollbar {
    width: 4px;
}
.mega-menu__content::-webkit-scrollbar-track {
    background: transparent;
    margin: 16px 0;
}
.mega-menu__content::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.15);
    border-radius: 4px;
}
.mega-menu__content::-webkit-scrollbar-thumb:hover {
    background: rgba(0,0,0,0.30);
}

/* ── Category hub (title + desc вгорі) ───────────────────────── */

.mega-menu__cat-hub {
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(0,0,0,0.06);
}

.mega-menu__cat-hub-title {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #0E1018;
    font-size: 26px;
    font-weight: 700;
    line-height: 1.1;
    text-decoration: none;
    transition: opacity 0.2s;
}

.mega-menu__cat-hub-title:hover {
    opacity: 0.70;
}

.mega-menu__cat-hub-arrow {
    display: flex;
    align-items: center;
    transition: transform 0.2s;
    transform: translateX(0) rotate(-90deg);
}

.mega-menu__cat-hub-title:hover .mega-menu__cat-hub-arrow {
    transform: translateX(4px) rotate(-90deg);
}

.mega-menu__cat-hub-desc {
    margin: 6px 0 0;
    color: rgba(14,16,24,0.50);
    font-size: 16px;
    font-weight: 500;
    line-height: 1.4;
}

.mega-menu__cat-hub-image {
    margin-top: 16px;
    width: 100%;
    height: 165px;
    border-radius: 16px;
    overflow: hidden;
}

.mega-menu__cat-hub-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ── Tab ──────────────────────────────────────────────────────── */

.mega-menu__tab {
    display: none;
}

.mega-menu__tab--active {
    display: block;
}

/* ── Group (hub card + items grid) ───────────────────────────── */

.mega-menu__group {
    padding-bottom: 20px;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(0,0,0,0.06);
}

.mega-menu__group:last-child {
    padding-bottom: 0;
    margin-bottom: 0;
    border-bottom: none;
}

.mega-menu__group-title {
    color: #0E1018;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 12px;
}

.mega-menu__group-row {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.mega-menu__group--no-hub .mega-menu__items {
    grid-template-columns: repeat(5, 1fr);
}

/* ── Hub card ─────────────────────────────────────────────────── */

.mega-menu__hub-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: rgba(0, 0, 0, 0.03);
    border-radius: 20px;
    padding: 20px;
    text-decoration: none;
    min-width: 190px;
    max-width: 190px;
    flex-shrink: 0;
    transition: background 0.2s;
}

.mega-menu__hub-card:hover {
    background: rgba(0,0,0,0.07);
}

.mega-menu__hub-icon {
    width: 25px;
    height: 25px;
}

.mega-menu__hub-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    /* border-radius: 50%; */
}

.mega-menu__hub-body {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.mega-menu__hub-title {
    color: #0E1018;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.3;
}

.mega-menu__hub-desc {
    color: rgba(14,16,24,0.50);
    font-size: 12px;
    font-weight: 500;
    line-height: 1.4;
}

/* ── Items grid ───────────────────────────────────────────────── */

.mega-menu__items {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px 20px;
    list-style: none;
    margin: 0;
    padding: 0;
    flex: 1;
    align-content: start;
}

.mega-menu__item {
    margin: 0;
}

.mega-menu__item-link {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 8px 0;
    text-decoration: none;
    transition: opacity 0.2s;
}

.mega-menu__item-link:hover {
    opacity: 0.60;
}

.mega-menu__item-title {
    color: #0E1018;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.2;
}

.mega-menu__item-desc {
    color: rgba(14,16,24,0.50);
    font-size: 12px;
    font-weight: 500;
    line-height: 1.4;
}

/* ── Cards layout (Company / Content) ────────────────────────── */

.mega-menu__cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    padding: 20px 0 28px;
}

.mega-menu__card {
    position: relative;
    display: block;
    background: #23242C;
    border-radius: 20px;
    min-height: 472px;
    overflow: hidden;
    text-decoration: none;
    transition: opacity 0.2s;
}

.mega-menu__card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: url(../design/design-v20/mh-card-stars.png) no-repeat center center / 285px 355px;
    opacity: 0;
    transform: scale(1.08);
    transition: opacity 0.5s ease, transform 0.6s ease;
    pointer-events: none;
    z-index: 1;
}

.mega-menu__card:hover::after {
    opacity: 1;
    transform: scale(1);
}


/* Card header (title + arrow) */
.mega-menu__card-header {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 20px 20px 0;
}

.mega-menu__card-title {
    color: rgba(255,255,255,0.80);
    font-size: 26px;
    font-weight: 700;
    line-height: 1.1;
    transition: color 0.2s;
}

.mega-menu__card:hover .mega-menu__card-title {
    color: #fff;
}

.mega-menu__card-arrow {
    display: flex;
    align-items: center;
    color: rgba(255,255,255,0.80);
    transition: color 0.2s, transform 0.2s;
}

.mega-menu__card:hover .mega-menu__card-arrow {
    color: #fff;
    transform: translateX(4px);
}

/* Card illustration */
.mega-menu__card-image {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 90%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 20px 20px;
}

.mega-menu__card-image img {
    max-width: 85%;
    max-height: 100%;
    object-fit: contain;
}

/* ── Stars background image ───────────────────────────────────── */

/* ── Responsive ───────────────────────────────────────────────── */

@media (max-width: 1300px) {
    .mega-menu__items { grid-template-columns: repeat(3, 1fr); }
    .mega-menu__simple-list { grid-template-columns: repeat(3, 1fr); }
    .mega-menu__cards { grid-template-columns: repeat(2, 1fr); }
    .mega-menu__card { min-height: 320px; }
}

@media (max-width: 1150px) {
    .mega-menu__items { grid-template-columns: repeat(2, 1fr); }
    .mega-menu__simple-list { grid-template-columns: repeat(2, 1fr); }
    .mega-menu__hub-card { min-width: 160px; max-width: 170px; }
    .mega-menu__sidebar { min-width: 200px; max-width: 200px; }
    .mega-menu__content { padding-left: 20px; }
}
