/* Extended Header Approach - Yo!Coach Style */

/* Hide the original dropdown since we're using extended header */
.menu__item--dropdown .menu__dropdown {
    display: none !important;
}

/* Extended Header Section - Initially Hidden */
.header-extended {
    background: #fff;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateY(-10px);
    width: 100%;
    margin: 0;
    border-radius: 0;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 999;
}

/* Show extended header on Services hover - controlled by JavaScript */
.header-extended.show {
    max-height: 300px;
    opacity: 1;
    transform: translateY(0);
}

/* Services Mega Menu Content */
.services-mega-menu {
    padding: 2rem 1rem;
}

.header-extended .container {
    max-width: 100%;
    padding: 0;
}

.services-mega-menu .row {
    margin: 0;
    justify-content: center;
    gap: 1rem;
}

.services-mega-menu .col-md-3 {
    padding: 0.5rem;
    flex: 0 0 auto;
    width: auto;
    min-width: 200px;
}

/* Service Item Styling */
.service-item {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    height: 100%;
}

.service-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0,123,255,0.15);
    border-color: #007bff;
}

.service-item a {
    display: block;
    padding: 1.5rem 1rem;
    color: #495057;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
    height: 100%;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.service-item:hover a {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: #fff;
}

/* Dropdown Arrow Styling */
.dropdown-arrow {
    display: inline-block;
    width: 12px;
    height: 12px;
    margin-left: 5px;
    transition: opacity 0.3s ease;
    font-size: 10px;
    line-height: 1;
}

.menu__item--dropdown:hover .dropdown-arrow {
    opacity: 0;
}

/* Header Integration */
.header-wrapper {
    position: relative;
}

.header {
    position: relative;
    z-index: 10;
}

.header-primary {
    position: relative;
}

/* Services Menu Item Highlight */
.menu__item--dropdown:hover > a {
    background: rgba(0,123,255,0.1);
    border-radius: 4px;
}

/* Ensure smooth transition area */
.menu__item--dropdown,
.header-extended {
    position: relative;
}

/* Create invisible bridge for smooth hover */
.menu__item--dropdown::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    right: 0;
    height: 10px;
    background: transparent;
    z-index: 999;
}

/* Mobile Styles */
@media (max-width: 768px) {
    .header-extended {
        display: none;
    }
    
    /* Keep original mobile accordion for mobile */
    .menu__item--dropdown .d-md-none {
        display: block !important;
    }
    
    .menu__item--dropdown .mobile-nav-link {
        background: transparent;
        border: none;
        padding: 1.25rem 1.5rem;
        font-size: 0.9rem;
        font-weight: 600;
        color: inherit;
        text-decoration: none;
        width: 100%;
        text-align: left;
        display: flex;
        justify-content: space-between;
        align-items: center;
        cursor: pointer;
        transition: all 0.2s ease;
        text-transform: uppercase;
    }
    
    .menu__item--dropdown .mobile-nav-link:hover {
        color: var(--color-primary);
    }
    
    .menu__item--dropdown .mobile-nav-link:focus {
        outline: none;
        box-shadow: none;
    }
    
    .menu__item--dropdown .mobile-arrow {
        font-size: 12px;
        transition: opacity 0.3s ease;
        color: #666;
    }
    
    .menu__item--dropdown .mobile-nav-link:hover .mobile-arrow {
        opacity: 0;
    }
    
    .menu__item--dropdown .accordion-collapse {
        border: none;
        background: transparent;
    }
    
    .menu__item--dropdown .accordion-body {
        padding: 0;
        background: transparent;
    }
    
    .menu__item--dropdown .list-group {
        border: none;
        background: transparent;
    }
    
    .menu__item--dropdown .list-group-item {
        background: white;
        border: 1px solid #e0e0e0;
        border-radius: 4px;
        margin: 0.25rem 0 0.25rem 1.5rem;
        padding: 0.75rem 1rem;
        font-size: 14px;
        color: #333;
        text-decoration: none;
    }
    
    .menu__item--dropdown .list-group-item:hover {
        background: #f8f9fa;
        color: #007bff;
        border-color: #007bff;
    }
}

/* Responsive adjustments for extended header */
@media (min-width: 769px) and (max-width: 1024px) {
    .services-mega-menu .col-md-3 {
        min-width: 180px;
    }
    
    .service-item a {
        padding: 1.25rem 0.75rem;
        font-size: 13px;
    }
}

@media (min-width: 1025px) {
    .services-mega-menu .col-md-3 {
        min-width: 220px;
    }
}