/* Services Full-Width Mega Menu Styles */

/* Desktop Full-Width Mega Menu */
.nav-item.services-megamenu {
    position: static;
}

.services-fullwidth-dropdown {
    position: fixed;
    left: 0;
    right: 0;
    width: 100%;
    background: #ffffff;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 9999;
    margin-top: 0;
    max-height: 80vh;
    overflow-y: auto;
}

/* Arrow pointing from Services menu item to dropdown */
.nav-item.services-megamenu {
    position: relative;
}

.nav-item.services-megamenu::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 12px solid transparent;
    border-right: 12px solid transparent;
    border-bottom: 10px solid #ffffff;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 10000;
}

.nav-item.services-megamenu:hover::after {
    opacity: 1;
    visibility: visible;
}

.nav-item.services-megamenu:hover .services-fullwidth-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.services-dropdown-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 40px 50px;
    width: 100%;
    box-sizing: border-box;
}

.services-content-wrapper {
    display: grid;
    grid-template-columns: 2fr 360px;
    gap: 40px;
    align-items: center;
    width: 100%;
}

/* Left Section - Categories */
.services-left-section {
    padding-right: 20px;
    min-width: 0;
}

.services-header {
    margin-bottom: 25px;
}

.services-header h3 {
    font-size: 24px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 8px;
}

.services-header p {
    font-size: 13px;
    color: #666;
    margin: 0;
    line-height: 1.5;
}

.services-categories-grid {
    display: flex;
    gap: 30px;
    width: 100%;
}

.service-category-column {
    flex: 1;
    min-width: 0;
}

.service-category-column h4.category-name {
    font-size: 15px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e8e8e8;
}

.service-items-list {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 420px;
    overflow-y: auto;
    padding-right: 10px;
}

.service-items-list::-webkit-scrollbar {
    width: 4px;
}

.service-items-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 2px;
}

.service-items-list::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 2px;
}

.service-items-list::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

.service-items-list li {
    margin-bottom: 8px;
}

.service-items-list li a {
    color: #555;
    font-size: 13px;
    text-decoration: none;
    transition: all 0.2s ease;
    display: block;
    padding: 5px 8px;
    line-height: 1.4;
    border-radius: 4px;
}

.service-items-list li a:hover {
    color: #00a9a5;
    background: rgba(0, 169, 165, 0.05);
    padding-left: 12px;
    font-weight: 500;
}

/* Right Section - Featured Card */
.services-right-section {
    position: relative;
    min-width: 0;
    display: flex;
    align-items: center;
    min-height: 100%;
}

.featured-service-box {
    background: linear-gradient(135deg, rgba(240, 249, 249, 0.95) 0%, rgba(227, 244, 244, 0.85) 100%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 25px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 169, 165, 0.08);
}

.featured-service-label {
    display: inline-block;
    background: #00a9a5;
    color: #ffffff;
    font-size: 10px;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 3px;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 0.7px;
}

.featured-service-name {
    font-size: 19px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 12px;
    line-height: 1.3;
}

.featured-service-desc {
    font-size: 13px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 20px;
}

.featured-service-actions {
    display: flex;
    gap: 10px;
}

.btn-view-service,
.btn-all-services {
    flex: 1;
    padding: 10px 15px;
    border-radius: 5px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    text-align: center;
    display: inline-block;
}

.btn-view-service {
    background: #00a9a5;
    color: #ffffff;
}

.btn-view-service:hover {
    background: #008f8c;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(0, 169, 165, 0.3);
}

.btn-all-services {
    background: transparent;
    color: #00a9a5;
    border: 2px solid #00a9a5;
}

.btn-all-services:hover {
    background: #00a9a5;
    color: #ffffff;
}

/* RTL Support */
[dir="rtl"] .services-left-section {
    padding-right: 0;
    padding-left: 20px;
}

[dir="rtl"] .services-content-wrapper {
    grid-template-columns: 360px 2fr;
}

[dir="rtl"] .services-left-section {
    order: 2;
}

[dir="rtl"] .services-right-section {
    order: 1;
}

[dir="rtl"] .services-header {
    text-align: right;
}

[dir="rtl"] .service-category-column {
    text-align: right;
}

[dir="rtl"] .service-items-list {
    text-align: right;
    padding-right: 0;
    padding-left: 10px;
}

[dir="rtl"] .service-items-list li a:hover {
    padding-left: 8px;
    padding-right: 12px;
}

[dir="rtl"] .featured-service-box {
    border-left: none;
    border-right: 4px solid #00a9a5;
    text-align: right;
}

[dir="rtl"] .featured-service-label {
    float: right;
}

[dir="rtl"] .featured-service-actions {
    flex-direction: row-reverse;
}

[dir="rtl"] .nav-item.services-megamenu::after {
    left: 50%;
    transform: translateX(-50%);
}

/* Responsive Breakpoints */
@media (min-width: 1600px) {
    .services-dropdown-container {
        max-width: 1600px;
    }
    
    .services-content-wrapper {
        grid-template-columns: 2fr 380px;
        align-items: center;
    }
    
    [dir="rtl"] .services-content-wrapper {
        grid-template-columns: 380px 2fr;
        align-items: center;
    }
}

@media (max-width: 1399px) {
    .services-dropdown-container {
        max-width: 1200px;
        padding: 35px 35px 45px;
    }
    
    .services-content-wrapper {
        grid-template-columns: 2fr 320px;
        gap: 35px;
        align-items: center;
    }
    
    [dir="rtl"] .services-content-wrapper {
        grid-template-columns: 320px 2fr;
        align-items: center;
    }
    
    .services-categories-grid {
        gap: 25px;
    }
    
    .service-items-list {
        max-height: 380px;
    }
}

@media (max-width: 1199px) {
    .services-dropdown-container {
        max-width: 100%;
        padding: 30px 30px 40px;
    }
    
    .services-content-wrapper {
        grid-template-columns: 2fr 300px;
        gap: 30px;
        align-items: center;
    }
    
    [dir="rtl"] .services-content-wrapper {
        grid-template-columns: 300px 2fr;
        align-items: center;
    }
    
    .services-categories-grid {
        gap: 20px;
    }
    
    .services-header h3 {
        font-size: 22px;
    }
    
    .featured-service-box {
        padding: 20px;
    }
    
    .service-items-list {
        max-height: 350px;
    }
}

/* Tablet - Hide full-width menu, show accordion */
@media (max-width: 991px) {
    .services-fullwidth-dropdown {
        display: none !important;
    }
}

/* Accessibility */
.service-items-list li a:focus,
.btn-view-service:focus,
.btn-all-services:focus {
    outline: 2px solid #00a9a5;
    outline-offset: 2px;
}

/* Smooth Animations */
@keyframes fadeSlideDownServices {
    from {
        opacity: 0;
        transform: translateY(-15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.nav-item.services-megamenu:hover .services-fullwidth-dropdown {
    animation: fadeSlideDownServices 0.3s ease;
}

/* Enhanced visual separation */
.services-categories-grid::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 60px;
    bottom: 20px;
    width: 1px;
    background: #e8e8e8;
    transform: translateX(-50%);
}

.services-categories-grid {
    position: relative;
}

/* Show item count for categories with many items */
.service-category-column.has-many-items .category-name::after {
    content: attr(data-count);
    background: #f0f0f0;
    color: #666;
    font-size: 10px;
    font-weight: 500;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: 8px;
}

[dir="rtl"] .service-category-column.has-many-items .category-name::after {
    margin-left: 0;
    margin-right: 8px;
}
