/* ============================================
   XENON FULLSCREEN MEGA MENU
   Premium tehnomedia.rs style menu
   ============================================ */

/* Trigger Button */
.xfm-trigger {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, #d5a431 0%, #b8860b 100%);
    color: #000;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-family: "Montserrat", sans-serif;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.xfm-trigger:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(213, 164, 49, 0.4);
}

.xfm-hamburger {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 20px;
}

.xfm-hamburger span {
    display: block;
    width: 100%;
    height: 2px;
    background: #000;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.xfm-trigger:hover .xfm-hamburger span:nth-child(1) {
    transform: translateX(3px);
}

.xfm-trigger:hover .xfm-hamburger span:nth-child(3) {
    transform: translateX(-3px);
}

/* Overlay */
.xfm-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 10, 0.98);
    z-index: 999999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    overflow: hidden;
}

.xfm-overlay.active {
    opacity: 1;
    visibility: visible;
}

.xfm-container {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 20px;
    box-sizing: border-box;
    transform: scale(0.95);
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}

.xfm-overlay.active .xfm-container {
    transform: scale(1);
    opacity: 1;
}

/* Close Button */
.xfm-close {
    position: absolute;
    top: 30px;
    right: 30px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
}

.xfm-close:hover {
    background: #d5a431;
    border-color: #d5a431;
    color: #000;
    transform: rotate(90deg);
}

/* Content Layout */
.xfm-content {
    display: flex;
    height: 100%;
    max-width: 1600px;
    margin: 0 auto;
    width: 100%;
    padding-top: 40px;
}

/* Sidebar */
.xfm-sidebar {
    width: 320px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-right: 40px;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    overflow-y: auto;
}

.xfm-group-btn {
    display: flex;
    align-items: center;
    gap: 15px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
    padding: 18px 20px;
    border-radius: 12px;
    font-family: "Montserrat", sans-serif;
    font-size: 14px;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.xfm-group-btn::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    width: 4px;
    height: 100%;
    background: var(--group-color);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.xfm-group-btn:hover,
.xfm-group-btn.active {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--group-color);
    color: #fff;
}

.xfm-group-btn:hover::before,
.xfm-group-btn.active::before {
    transform: scaleY(1);
}

.xfm-group-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    transition: all 0.3s ease;
}

.xfm-group-btn:hover .xfm-group-icon,
.xfm-group-btn.active .xfm-group-icon {
    background: var(--group-color);
    color: #000;
}

.xfm-group-icon svg {
    fill: currentColor;
}

.xfm-group-title {
    flex: 1;
}

.xfm-arrow {
    opacity: 0.5;
    transition: all 0.3s ease;
}

.xfm-group-btn:hover .xfm-arrow,
.xfm-group-btn.active .xfm-arrow {
    opacity: 1;
    transform: translateX(5px);
    color: var(--group-color);
}

/* Main Panel */
.xfm-main {
    flex: 1;
    padding-left: 50px;
    overflow-y: auto;
    position: relative;
}

.xfm-panel {
    display: none;
    animation: fadeIn 0.4s ease;
}

.xfm-panel.active {
    display: block;
}

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

.xfm-panel-title {
    font-family: "Montserrat", sans-serif;
    font-size: 28px;
    font-weight: 800;
    margin: 0 0 30px 0;
    padding-bottom: 15px;
    border-bottom: 2px solid currentColor;
    display: inline-block;
}

/* Back Button - Hidden on desktop */
.xfm-back-btn {
    display: none;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 12px 20px;
    border-radius: 10px;
    font-family: "Montserrat", sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.xfm-back-btn:hover {
    background: #d5a431;
    border-color: #d5a431;
    color: #000;
}

.xfm-back-btn svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

/* Categories Grid */
.xfm-categories {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

.xfm-category {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 25px;
    transition: all 0.3s ease;
}

.xfm-category:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-5px);
}

.xfm-category-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-decoration: none;
    color: #fff;
    font-family: "Montserrat", sans-serif;
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 15px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: color 0.3s ease;
}

.xfm-category-link:hover {
    color: #d5a431;
}

.xfm-category-count {
    background: rgba(213, 164, 49, 0.2);
    color: #d5a431;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

/* Subcategories */
.xfm-subcategories {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.xfm-subcategory-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.6);
    font-family: "Montserrat", sans-serif;
    font-size: 13px;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.xfm-subcategory-link:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    padding-left: 18px;
}

.xfm-subcat-count {
    color: rgba(255, 255, 255, 0.4);
    font-size: 11px;
}

/* Scrollbar */
.xfm-sidebar::-webkit-scrollbar,
.xfm-main::-webkit-scrollbar {
    width: 6px;
}

.xfm-sidebar::-webkit-scrollbar-track,
.xfm-main::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.xfm-sidebar::-webkit-scrollbar-thumb,
.xfm-main::-webkit-scrollbar-thumb {
    background: rgba(213, 164, 49, 0.5);
    border-radius: 3px;
}

.xfm-sidebar::-webkit-scrollbar-thumb:hover,
.xfm-main::-webkit-scrollbar-thumb:hover {
    background: #d5a431;
}

/* ============================================
   MOBILE RESPONSIVE - Full Screen Panels
   ============================================ */
@media (max-width: 1024px) {
    .xfm-content {
        flex-direction: column;
        position: relative;
        overflow: hidden;
    }
    
    .xfm-sidebar {
        width: 100%;
        padding-right: 0;
        border-right: none;
        padding-bottom: 0;
        transition: transform 0.4s ease, opacity 0.4s ease;
        position: relative;
        z-index: 2;
    }
    
    .xfm-group-btn {
        padding: 16px 20px;
        font-size: 14px;
    }
    
    .xfm-group-icon {
        width: 36px;
        height: 36px;
    }
    
    .xfm-main {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        padding-left: 0;
        background: rgba(10, 10, 10, 0.98);
        transform: translateX(100%);
        opacity: 0;
        transition: transform 0.4s ease, opacity 0.4s ease;
        z-index: 3;
        overflow-y: auto;
        padding: 0;
    }
    
    /* When panel is open on mobile */
    .xfm-overlay.panel-open .xfm-sidebar {
        transform: translateX(-100%);
        opacity: 0;
        pointer-events: none;
    }
    
    .xfm-overlay.panel-open .xfm-main {
        transform: translateX(0);
        opacity: 1;
    }
    
    /* Show back button on mobile */
    .xfm-back-btn {
        display: inline-flex;
        position: sticky;
        top: 0;
        background: rgba(10, 10, 10, 0.95);
        border: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 0;
        padding: 15px 20px;
        margin-bottom: 0;
        z-index: 10;
        width: 100%;
        box-sizing: border-box;
    }
    
    .xfm-panel {
        padding: 20px;
    }
    
    .xfm-panel-title {
        font-size: 22px;
        margin-bottom: 20px;
    }
    
    .xfm-categories {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .xfm-category {
        padding: 20px;
    }
    
    .xfm-category-link {
        font-size: 15px;
    }
    
    .xfm-close {
        top: 15px;
        right: 15px;
        width: 50px;
        height: 50px;
    }
    
    .xfm-container {
        padding: 70px 0 0 0;
    }
}

@media (max-width: 480px) {
    .xfm-group-btn {
        padding: 14px 16px;
        font-size: 13px;
        gap: 12px;
    }
    
    .xfm-group-icon {
        width: 32px;
        height: 32px;
    }
    
    .xfm-group-icon svg {
        width: 18px;
        height: 18px;
    }
    
    .xfm-panel {
        padding: 15px;
    }
    
    .xfm-panel-title {
        font-size: 20px;
    }
    
    .xfm-category {
        padding: 15px;
    }
    
    .xfm-category-link {
        font-size: 14px;
        margin-bottom: 12px;
        padding-bottom: 10px;
    }
    
    .xfm-subcategory-link {
        font-size: 12px;
        padding: 6px 10px;
    }
    
    .xfm-trigger {
        padding: 10px 16px;
        font-size: 12px;
        gap: 8px;
    }
    
    .xfm-hamburger {
        width: 16px;
        gap: 3px;
    }
    
    .xfm-close {
        top: 10px;
        right: 10px;
        width: 45px;
        height: 45px;
    }
}

/* Animation for body when menu is open */
body.xfm-menu-open {
    overflow: hidden;
}

/* ============================================
   MENU BAR WITH QUICK LINKS
   ============================================ */
.xfm-menu-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 10px 0;
}

.xfm-trigger-main {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, #d5a431 0%, #b8860b 100%);
    color: #000;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-family: "Montserrat", sans-serif;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.xfm-trigger-main:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(213, 164, 49, 0.4);
}

.xfm-trigger-main .xfm-hamburger {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 20px;
}

.xfm-trigger-main .xfm-hamburger span {
    display: block;
    width: 100%;
    height: 2px;
    background: #000;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.xfm-trigger-main:hover .xfm-hamburger span:nth-child(1) {
    transform: translateX(3px);
}

.xfm-trigger-main:hover .xfm-hamburger span:nth-child(3) {
    transform: translateX(-3px);
}

/* Divider */
.xfm-divider {
    width: 1px;
    height: 35px;
    background: rgba(255, 255, 255, 0.2);
    margin: 0 5px;
}

/* Quick Links Container */
.xfm-quick-links {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* Individual Quick Link */
.xfm-quick-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    text-decoration: none;
    padding: 10px 18px;
    border-radius: 8px;
    font-family: "Montserrat", sans-serif;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.xfm-quick-link::before {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--link-color);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.xfm-quick-link:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--link-color);
    color: var(--link-color);
    transform: translateY(-2px);
}

.xfm-quick-link:hover::before {
    transform: scaleX(1);
}

/* Quick Link Icon */
.xfm-quick-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    transition: all 0.3s ease;
}

.xfm-quick-link:hover .xfm-quick-icon {
    background: var(--link-color);
    color: #000;
}

.xfm-quick-icon svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
}

/* Mobile Responsive for Menu Bar */
@media (max-width: 1024px) {
    .xfm-menu-bar {
        gap: 8px;
    }
    
    .xfm-trigger-main {
        padding: 10px 18px;
        font-size: 12px;
    }
    
    .xfm-quick-link {
        padding: 8px 14px;
        font-size: 12px;
    }
    
    .xfm-quick-icon {
        width: 20px;
        height: 20px;
    }
    
    .xfm-quick-icon svg {
        width: 12px;
        height: 12px;
    }
    
    .xfm-divider {
        height: 30px;
    }
}

@media (max-width: 768px) {
    .xfm-menu-bar {
        justify-content: center;
    }
    
    .xfm-divider {
        display: none;
    }
    
    .xfm-quick-links {
        width: 100%;
        justify-content: center;
        margin-top: 5px;
    }
    
    .xfm-quick-link {
        padding: 8px 12px;
        font-size: 11px;
    }
    
    .xfm-quick-link span:not(.xfm-quick-icon) {
        display: none;
    }
    
    .xfm-quick-icon {
        margin: 0;
    }
}

@media (max-width: 480px) {
    .xfm-trigger-main {
        padding: 10px 14px;
        font-size: 11px;
        width: 100%;
        justify-content: center;
    }
    
    .xfm-quick-links {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 6px;
        width: 100%;
    }
    
    .xfm-quick-link {
        justify-content: center;
        padding: 10px 8px;
    }
}
