/* ============================================
   MEGAMENU STYLES - Extracted from templates
   ============================================ */

/* ========== CATEGORIES MEGAMENU ========== */

/* Mega Dropdown Container */
.categories-mega-dropdown {
    background: white;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
    border-top: 1px solid #e9ecef;
    max-width: 1430px;
    width: 100%;
    margin: 0 auto;
}

@media (min-width: 1600px) {
    .categories-mega-dropdown {
        max-width: 1500px;
    }
}

.categories-menu-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 0;
}

/* Tabs Wrapper - Split Layout */
.categories-tabs-wrapper {
    display: grid;
    grid-template-columns: 350px 1fr;
    min-height: 400px;
}

/* Left Navigation */
.categories-tabs-nav {
    background: #f8f9fa;
    border-right: 1px solid #e9ecef;
    display: flex;
    flex-direction: column;
    max-height: 500px;
}

.categories-tabs-nav-scrollable {
    flex: 1;
    overflow-y: auto;
    padding: 0;
}

.category-tab-link {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 16px;
    text-decoration: none;
    color: #495057;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
    flex-shrink: 0;
}

/* All Categories Link - Fixed at Bottom */
.category-all-link {
    position: sticky;
    bottom: 0;
    background: #fff;
    border-top: 2px solid #e9ecef;
    border-left: 3px solid #0d6efd !important;
    margin-top: auto;
    font-weight: 600;
    box-shadow: 0 -2px 8px rgba(0,0,0,0.08);
}

.category-tab-link:hover {
    background: #fff;
    color: #0d6efd;
}

.category-tab-link.active {
    background: #fff;
    color: #0d6efd;
    border-left-color: #0d6efd;
}

.category-tab-icon {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    background: #fff;
}

.category-tab-icon img {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.category-tab-icon i {
    font-size: 16px;
    color: #6c757d;
}

.category-icon-emoji {
    font-size: 1.5em;
    line-height: 1;
}

.category-tab-content {
    flex: 1;
    min-width: 0;
}

.category-tab-title {
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 2px;
    line-height: 1.3;
}

.category-tab-desc {
    font-size: 10px;
    color: #6c757d;
    margin: 0;
    line-height: 1.35;
    font-weight: 400;
}

/* Right Content Area */
.categories-tabs-content {
    position: relative;
    display: flex;
    flex-direction: column;
    max-height: 500px;
}

.categories-tabs-scrollable {
    flex: 1;
    overflow-y: auto;
    padding: 24px 30px;
}

.category-tab-panel {
    display: none;
}

.category-tab-panel.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

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

/* Category Panel Title */
.category-panel-title {
    font-size: 18px;
    font-weight: 700;
    color: #212529;
    margin: 0 0 8px 0;
    padding-bottom: 12px;
    border-bottom: 2px solid #e9ecef;
}

/* Category Panel Description */
.category-panel-description {
    font-size: 13px;
    color: #6c757d;
    line-height: 1.5;
    margin: 0 0 20px 0;
    padding: 0;
}

/* Services Grid */
.services-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 24px;
}

.service-item {
    padding: 12px 14px;
    background: #f8f9fa;
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
}

.service-item:hover {
    background: #e9ecef;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.service-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.service-icon img {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.service-icon span,
.service-icon-emoji {
    font-size: 1.2em;
}

.service-title {
    font-size: 12px;
    font-weight: 600;
    color: #212529;
    margin-bottom: 3px;
    line-height: 1.35;
    word-break: break-word;
}

.service-desc {
    font-size: 11px;
    color: #6c757d;
    margin: 0 0 4px 0;
    line-height: 1.4;
    word-break: break-word;
    font-weight: 400;
}

/* Service Price */
.service-price {
    font-size: 11px;
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.service-price .price-label {
    color: #6c757d;
    font-weight: 400;
}

.service-price .price-value {
    color: #0d6efd;
    font-weight: 600;
    font-size: 12px;
}

/* View All Link - Sticky Footer */
.category-view-all-sticky {
    padding: 16px 30px;
    background: white;
    border-top: 2px solid #e9ecef;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.05);
}

.view-all-link {
    display: none;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: #0d6efd;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.view-all-link.active {
    display: inline-flex;
}

.view-all-link:hover {
    background: #0b5ed7;
    color: white;
    transform: scale(1.02);
}

.view-all-link i {
    font-size: 11px;
    transition: transform 0.2s ease;
}

.view-all-link:hover i {
    transform: translateX(3px);
}

/* ========== SOCIAL NETWORKS MEGAMENU ========== */

/* Mega Dropdown Container */
.social-networks-mega-dropdown {
    background: white;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
    border-top: 1px solid #e9ecef;
    max-width: 1430px;
    width: 100%;
    margin: 0 auto;
}

@media (min-width: 1600px) {
    .social-networks-mega-dropdown {
        max-width: 1500px;
    }
}

.social-networks-menu-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 0;
}

/* Tabs Wrapper - Split Layout */
.social-networks-tabs-wrapper {
    display: grid;
    grid-template-columns: 350px 1fr;
    min-height: 400px;
}

/* Left Navigation */
.social-networks-tabs-nav {
    background: #f8f9fa;
    border-right: 1px solid #e9ecef;
    display: flex;
    flex-direction: column;
    max-height: 500px;
}

.social-networks-tabs-nav-scrollable {
    flex: 1;
    overflow-y: auto;
    padding: 0;
}

.network-tab-link {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 16px;
    text-decoration: none;
    color: #495057;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
    cursor: pointer;
}

.network-tab-link:hover {
    background: white;
    color: #0d6efd;
}

.network-tab-link.active {
    background: white;
    color: #0d6efd;
    border-left-color: #0d6efd;
}

.network-tab-link.network-all-link {
    margin-top: auto;
    border-top: 1px solid #e9ecef;
    background: #f1f3f5;
}

.network-tab-icon {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
}

.network-tab-icon img {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.network-tab-link:hover .network-tab-icon {
    transform: scale(1.1);
}

.network-tab-icon i {
    font-size: 20px;
    color: #6c757d;
}

.network-tab-link.active .network-tab-icon i {
    color: #0d6efd;
}

.network-icon-emoji {
    font-size: 1.5em;
    line-height: 1;
}

.network-tab-content {
    flex: 1;
    min-width: 0;
}

.network-tab-title {
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 2px;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
}

.network-tab-desc {
    font-size: 10px;
    color: #6c757d;
    margin: 0;
    line-height: 1.35;
    font-weight: 400;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* Right Content Area */
.social-networks-tabs-content {
    position: relative;
    display: flex;
    flex-direction: column;
    max-height: 500px;
}

.social-networks-tabs-scrollable {
    flex: 1;
    overflow-y: auto;
    padding: 24px 30px;
}

.network-tab-panel {
    display: none;
}

.network-tab-panel.active {
    display: block;
}

/* Network Panel Title */
.network-panel-title {
    font-size: 18px;
    font-weight: 700;
    color: #212529;
    margin: 0 0 8px 0;
    padding-bottom: 12px;
    border-bottom: 2px solid #e9ecef;
}

/* Network Panel Description */
.network-panel-description {
    font-size: 13px;
    color: #6c757d;
    line-height: 1.5;
    margin: 0 0 20px 0;
    padding: 0;
}

/* Categories Grid */
.categories-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

/* Category Item */
.category-item {
    padding: 12px 14px;
    background: #f8f9fa;
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
}

.category-item:hover {
    background: #e9ecef;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* Category Icon */
.category-icon {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.category-icon img {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.category-icon span {
    font-size: 16px;
}

.category-title {
    font-size: 12px;
    font-weight: 600;
    color: #212529;
    margin-bottom: 3px;
    line-height: 1.35;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.category-desc {
    font-size: 11px;
    color: #6c757d;
    margin: 0;
    line-height: 1.4;
    font-weight: 400;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* View All Link - Sticky Footer */
.network-view-all-sticky {
    padding: 16px 30px;
    background: white;
    border-top: 2px solid #e9ecef;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.05);
}

/* ========== DARK THEME ========== */

/* Categories Dark Theme */
.dark-theme .categories-mega-dropdown {
    background: #1a1d20;
    border-top-color: #3a3f45;
}

.dark-theme .categories-tabs-nav {
    background: #2c3034;
    border-right-color: #3a3f45;
}

.dark-theme .category-tab-link {
    color: #adb5bd;
}

.dark-theme .category-tab-link:hover,
.dark-theme .category-tab-link.active {
    background: #343a40;
    color: #e9ecef;
}

.dark-theme .category-tab-icon {
    background: #343a40;
}

.dark-theme .service-item {
    background: #2c3034;
}

.dark-theme .service-item:hover {
    background: #343a40;
}

.dark-theme .service-title {
    color: #e9ecef;
}

.dark-theme .category-view-all {
    border-top-color: #3a3f45;
}

/* Social Networks Dark Theme */
.dark-theme .social-networks-mega-dropdown {
    background: #1a1d20;
    border-top-color: #3a3f45;
}

.dark-theme .social-networks-tabs-nav {
    background: #2c3034;
    border-right-color: #3a3f45;
}

.dark-theme .network-tab-link {
    color: #adb5bd;
}

.dark-theme .network-tab-link:hover,
.dark-theme .network-tab-link.active {
    background: #1a1d20;
    color: #0d6efd;
}

.dark-theme .network-tab-link.network-all-link {
    background: #24272a;
    border-top-color: #3a3f45;
}

.dark-theme .social-networks-tabs-content {
    background: #1a1d20;
}

.dark-theme .category-item {
    background: #2c3034;
}

.dark-theme .category-item:hover {
    background: #343a40;
}

.dark-theme .category-title {
    color: #e9ecef;
}

.dark-theme .network-view-all {
    border-top-color: #3a3f45;
}

/* ========== RESPONSIVE MEGAMENU ========== */

@media (max-width: 992px) {
    .categories-tabs-wrapper,
    .social-networks-tabs-wrapper {
        grid-template-columns: 1fr;
    }

    .categories-tabs-nav,
    .social-networks-tabs-nav {
        border-right: none;
        border-bottom: 1px solid #e9ecef;
        max-height: 200px;
    }

    .services-grid,
    .categories-grid {
        grid-template-columns: 1fr;
    }
}

/* ========== DESKTOP MEGAMENU HOVER & CLICK ========== */

@media (min-width: 769px) {
    /* Hide submenu by default */
    .section-header__main-menu .megamenu > ul,
    .section-header__main-menu .dropdown-arrow > ul {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        min-width: 900px;
        z-index: 1000;
    }

    /* Show on hover */
    .section-header__main-menu .megamenu.hover-open > ul,
    .section-header__main-menu .dropdown-arrow.hover-open > ul {
        display: block;
    }

    /* Clicked state - stays open */
    .section-header__main-menu .megamenu.clicked > ul,
    .section-header__main-menu .dropdown-arrow.clicked > ul {
        display: block;
    }

    /* Visual indicator for clicked state */
    .section-header__main-menu .megamenu.clicked > a,
    .section-header__main-menu .dropdown-arrow.clicked > a {
        position: relative;
    }

    .section-header__main-menu .megamenu.clicked > a::after,
    .section-header__main-menu .dropdown-arrow.clicked > a::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        height: 3px;
        background: #667eea;
    }
}

@media (max-width: 768px) {
    .social-networks-tabs-scrollable,
    .categories-tabs-scrollable {
        padding: 20px 15px;
    }

    .category-item,
    .service-item {
        padding: 10px;
    }

    .network-tab-link,
    .category-tab-link {
        padding: 12px 16px;
    }
}
