/* =========================================
   ACME MEGA MENU — Desktop Styles
   ========================================= */

/* ---------- NAV CONTAINER ---------- */
.site-nav {
    display: flex;
    align-items: center;
}

.nav-list {
    display: flex;
    gap: 32px;
    align-items: center;
    margin: 0;
    padding: 0;
    list-style: none;
}

/* ---------- LEVEL 0: MAIN NAV LINKS ---------- */
.nav-link {
    font-size: 15px;
    font-weight: 600;
    padding: 28px 0;
    display: block;
    position: relative;
    color: #1A1A1A;
    text-decoration: none;
    transition: color var(--acme-speed, 300ms) ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 20px;
    left: 0;
    width: 0%;
    height: 2px;
    background-color: var(--acme-primary, #E50914);
    transition: width var(--acme-speed, 300ms) ease;
}

.nav-link:hover::after {
    width: 100%;
}

.nav-link:hover {
    color: var(--acme-primary, #E50914);
}

/* ---------- MEGA MENU: STRUCTURAL LAYOUT ---------- */
.has-mega-menu {
    position: static;
}

.mega-menu {
    position: absolute;
    top: 80px;
    left: 0;
    width: 100%;
    background-color: #FFFFFF;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border-radius: 0 0 12px 12px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(15px);
    transition: opacity var(--acme-speed, 300ms) ease,
                transform var(--acme-speed, 300ms) ease,
                visibility var(--acme-speed, 300ms) ease;
    border-top: 1px solid #F8F9FA;
}

.has-mega-menu:hover .mega-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.mega-menu-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px;
    display: flex;
    gap: 40px;
}

/* ---------- LEFT SIDEBAR (TABS) — 30% ---------- */
.mega-sidebar {
    width: 30%;
    display: flex;
    flex-direction: column;
    gap: 8px;
    border-right: 1px solid #EBEBEB;
    padding-right: 40px;
}

.mega-tab {
    text-align: left;
    padding: 14px 20px;
    font-size: 16px;
    font-weight: 600;
    color: #1A1A1A;
    border-radius: 12px;
    background-color: #FFFFFF;
    border: none;
    cursor: pointer;
    font-family: inherit;
    transition: all var(--acme-speed, 300ms) ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.mega-tab:hover {
    background-color: #F8F9FA;
}

.mega-tab.active {
    background-color: var(--acme-primary, #E50914);
    color: #FFFFFF;
}

.mega-tab-icon {
    width: 18px;
    height: 18px;
    object-fit: contain;
    flex-shrink: 0;
}

/* ---------- RIGHT CONTENT BOX — 70% ---------- */
.mega-content {
    width: 70%;
}

.mega-pane {
    display: none;
    animation: acmeFadeIn var(--acme-speed, 300ms) ease forwards;
}

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

@keyframes acmeFadeIn {
    from { opacity: 0; transform: translateY(8px) scale(0.99); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ---------- PANE LAYOUT ---------- */
.pane-layout {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

/* ---------- SERVICE GRID (LINKS) ---------- */
.service-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(200px, 1fr));
    gap: 8px;
    width: 65%;
    margin: 0;
    padding: 0;
    list-style: none;
}

.service-grid li {
    list-style: none;
}

.service-grid a {
    display: block;
    padding: 12px 16px;
    font-size: 15px;
    font-weight: 500;
    color: #666666;
    border-radius: 8px;
    background-color: #FFFFFF;
    border: 1px solid transparent;
    text-decoration: none;
    transition: all var(--acme-speed, 300ms) ease;
}

.service-grid a:hover {
    color: var(--acme-primary, #E50914);
    background-color: #F8F9FA;
    border-color: #EBEBEB;
    transform: translateX(4px);
}

/* ---------- LEVEL 3: SUB-LINKS UNDER GRID ---------- */
.service-grid > li {
    position: relative;
}

.service-sub-grid {
    display: none;
    list-style: none;
    margin: 4px 0 0;
    padding: 0 0 0 12px;
    border-left: 2px solid #EBEBEB;
}

.service-grid > li:hover > .service-sub-grid {
    display: block;
}

.service-sub-grid li {
    list-style: none;
}

.service-sub-grid a {
    display: block;
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 500;
    color: #888888;
    border-radius: 6px;
    background-color: #FAFAFA;
    border: 1px solid transparent;
    text-decoration: none;
    transition: all var(--acme-speed, 300ms) ease;
}

.service-sub-grid a:hover {
    color: var(--acme-primary, #E50914);
    background-color: #F8F9FA;
    border-color: #EBEBEB;
    transform: translateX(4px);
}

/* ---------- DYNAMIC IMAGE PREVIEW (35%) ---------- */
.mega-image-preview {
    width: 35%;
    height: 240px;
    border-radius: 12px;
    overflow: hidden;
    background-color: #F8F9FA;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    flex-shrink: 0;
}

.preview-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 150ms ease, transform var(--acme-speed, 300ms) ease;
    opacity: 1;
}

.preview-img.fade-out {
    opacity: 0.2;
    transform: scale(0.97);
}

/* ---------- REGULAR DROPDOWN (non-mega) ---------- */
.sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    background: #FFFFFF;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border-radius: 0 0 12px 12px;
    padding: 8px 0;
    margin: 0;
    list-style: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(15px);
    transition: opacity var(--acme-speed, 300ms) ease,
                transform var(--acme-speed, 300ms) ease,
                visibility var(--acme-speed, 300ms) ease;
}

.nav-item:hover > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.sub-menu-item a {
    display: block;
    padding: 10px 20px;
    font-size: 15px;
    font-weight: 500;
    color: #1A1A1A;
    text-decoration: none;
    transition: all var(--acme-speed, 300ms) ease;
}

.sub-menu-item a:hover {
    color: var(--acme-primary, #E50914);
    background-color: #F8F9FA;
}

/* ---------- MOBILE TOGGLE (hidden on desktop) ---------- */
.mobile-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 26px;
    height: 18px;
    z-index: 1001;
    border: none;
    background: none;
    cursor: pointer;
    padding: 0;
}

.hamburger-line {
    width: 100%;
    height: 2px;
    background-color: #1A1A1A;
    transition: all var(--acme-speed, 300ms) ease;
}
