/* =============================================================================
   HEALIX WHO WE SERVE MENU STYLES
   Full-Screen Overlay with Tab Navigation and Organization Cards
   Matches Mega Menu styling with square cards
   ============================================================================= */

/* -------------------------------------------------------------------------
   Who We Serve Overlay
   ------------------------------------------------------------------------- */

.who-we-serve-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: all var(--transition-normal);
    backdrop-filter: blur(4px);
}

.who-we-serve-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.who-we-serve-container {
    position: relative;
    background: var(--white);
    border-radius: 1rem;
    box-shadow: var(--shadow-xl);
    max-width: 1100px;
    width: 95%;
    max-height: 90vh;
    overflow: hidden;
    transform: scale(0.9);
    transition: transform var(--transition-normal);
}

.who-we-serve-overlay.active .who-we-serve-container {
    transform: scale(1);
}

/* -------------------------------------------------------------------------
   Close Button
   ------------------------------------------------------------------------- */

.who-we-serve-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: var(--gray-100);
    border: none;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 1.5rem;
    transition: all var(--transition-fast);
    z-index: 10;
}

.who-we-serve-close:hover {
    background: var(--primary-color);
    color: white;
    transform: rotate(90deg);
}

/* -------------------------------------------------------------------------
   Who We Serve Content Layout
   ------------------------------------------------------------------------- */

.who-we-serve-content {
    display: flex;
    height: 75vh;
    max-height: 600px;
}

/* -------------------------------------------------------------------------
   Left Side: Organization Type Tabs
   ------------------------------------------------------------------------- */

.who-we-serve-tabs {
    width: 280px;
    background: var(--gray-50);
    padding: 2rem 1.5rem;
    border-right: 1px solid var(--gray-200);
    overflow-y: auto;
}

.who-we-serve-tabs .tabs-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    padding-left: 0.5rem;
}

.who-we-serve-tabs .tab-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.wws-tab-button {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: white;
    border: 2px solid transparent;
    border-radius: 0.75rem;
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-normal);
    text-align: left;
}

.wws-tab-button i {
    font-size: 1.5rem;
    color: var(--text-secondary);
    transition: color var(--transition-fast);
}

.wws-tab-button:hover {
    background: white;
    border-color: var(--primary-light);
    color: var(--primary-color);
}

.wws-tab-button:hover i {
    color: var(--primary-color);
}

.wws-tab-button.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    box-shadow: var(--shadow-md);
}

.wws-tab-button.active i {
    color: white;
}

/* -------------------------------------------------------------------------
   Right Side: Feature Cards Grid (Same as Mega Menu)
   ------------------------------------------------------------------------- */

.who-we-serve-features {
    flex: 1;
    padding: 2.5rem 2.5rem 1.5rem;
    overflow-y: auto;
    position: relative;
}

.wws-feature-grid {
    display: none;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    opacity: 0;
    transform: translateY(20px);
    transition: all var(--transition-normal);
}

.wws-feature-grid.active {
    display: grid;
    opacity: 1;
    transform: translateY(0);
}

/* -------------------------------------------------------------------------
   Feature Cards (Same styling as Mega Menu)
   ------------------------------------------------------------------------- */

.wws-feature-card {
    background: white;
    border: 2px solid var(--gray-200);
    border-radius: 0.75rem;
    padding: 1.75rem;
    cursor: pointer;
    transition: all var(--transition-normal);
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
    text-decoration: none;
}

.wws-feature-card:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-lg);
    transform: translateY(-6px);
    text-decoration: none;
}

.wws-feature-icon {
    width: 3.5rem;
    height: 3.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.75rem;
    transition: transform var(--transition-fast);
}

.wws-feature-card:hover .wws-feature-icon {
    transform: scale(1.1);
}

.wws-feature-title {
    font-size: 1.125rem !important;
    font-weight: 700 !important;
    color: var(--text-primary);
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1.3 !important;
}

.wws-feature-description {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0;
}

/* -------------------------------------------------------------------------
   Scrollbar Styling
   ------------------------------------------------------------------------- */

.who-we-serve-tabs::-webkit-scrollbar,
.who-we-serve-features::-webkit-scrollbar {
    width: 6px;
}

.who-we-serve-tabs::-webkit-scrollbar-track,
.who-we-serve-features::-webkit-scrollbar-track {
    background: var(--gray-100);
    border-radius: 3px;
}

.who-we-serve-tabs::-webkit-scrollbar-thumb,
.who-we-serve-features::-webkit-scrollbar-thumb {
    background: var(--primary-light);
    border-radius: 3px;
}

.who-we-serve-tabs::-webkit-scrollbar-thumb:hover,
.who-we-serve-features::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/* -------------------------------------------------------------------------
   Animations
   ------------------------------------------------------------------------- */

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

.wws-feature-grid.active {
    animation: wwsFadeIn var(--transition-normal);
}

/* -------------------------------------------------------------------------
   Responsive Design
   ------------------------------------------------------------------------- */

/* Tablet (768px - 991px) */
@media (max-width: 991px) {
    .who-we-serve-content {
        height: 80vh;
    }

    .who-we-serve-tabs {
        width: 220px;
        padding: 1.5rem 1rem;
    }

    .who-we-serve-tabs .tabs-title {
        font-size: 1.125rem;
    }

    .wws-tab-button {
        padding: 0.875rem 1rem;
        font-size: 0.9375rem;
    }

    .wws-tab-button i {
        font-size: 1.25rem;
    }

    .who-we-serve-features {
        padding: 2rem 1.5rem 1.5rem;
    }

    .wws-feature-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.25rem;
    }

    .wws-feature-card {
        padding: 1.5rem;
    }

    .wws-feature-icon {
        width: 3rem;
        height: 3rem;
        font-size: 1.5rem;
    }

    .wws-feature-title {
        font-size: 1rem !important;
    }

    .wws-feature-description {
        font-size: 0.875rem;
    }
}

/* Mobile (< 768px) */
@media (max-width: 767px) {
    .who-we-serve-container {
        width: 100%;
        max-height: 100vh;
        height: 100vh;
        border-radius: 0;
    }

    .who-we-serve-content {
        flex-direction: column;
        height: 100vh;
    }

    .who-we-serve-tabs {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--gray-200);
        padding: 1.5rem 1rem;
        max-height: 200px;
        overflow-y: auto;
    }

    .who-we-serve-tabs .tabs-title {
        font-size: 1rem;
        margin-bottom: 1rem;
    }

    .who-we-serve-tabs .tab-buttons {
        flex-direction: row;
        overflow-x: auto;
        gap: 0.5rem;
        padding-bottom: 0.5rem;
    }

    .wws-tab-button {
        min-width: 180px;
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
    }

    .wws-tab-button i {
        font-size: 1.125rem;
    }

    .who-we-serve-features {
        padding: 1.5rem 1rem;
        flex: 1;
        overflow-y: auto;
    }

    .wws-feature-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .wws-feature-card {
        padding: 1.25rem;
    }

    .wws-feature-icon {
        width: 2.75rem;
        height: 2.75rem;
        font-size: 1.375rem;
    }

    .who-we-serve-close {
        top: 1rem;
        right: 1rem;
        width: 2.5rem;
        height: 2.5rem;
        font-size: 1.25rem;
    }

    /* Hide scrollbar on mobile */
    .who-we-serve-tabs .tab-buttons::-webkit-scrollbar {
        height: 3px;
    }
}

/* Small Mobile (< 480px) */
@media (max-width: 479px) {
    .who-we-serve-features {
        padding: 1rem 0.75rem;
    }

    .wws-feature-card {
        padding: 1rem;
        gap: 0.75rem;
    }

    .wws-feature-title {
        font-size: 0.9375rem !important;
    }

    .wws-feature-description {
        font-size: 0.8125rem;
    }

    .wws-tab-button {
        min-width: 160px;
    }
}

/* -------------------------------------------------------------------------
   Body Scroll Lock (When Menu is Open)
   ------------------------------------------------------------------------- */

body.who-we-serve-open {
    overflow: hidden;
}

/* -------------------------------------------------------------------------
   Accessibility: Focus States
   ------------------------------------------------------------------------- */

.wws-tab-button:focus,
.wws-feature-card:focus,
.who-we-serve-close:focus {
    outline: 3px solid var(--primary-light);
    outline-offset: 2px;
}

/* -------------------------------------------------------------------------
   Print Styles
   ------------------------------------------------------------------------- */

@media print {
    .who-we-serve-overlay {
        display: none !important;
    }
}
