/* ========================================
   PH-IDEAS Resources Page
   ======================================== */
/* ========================================
    Global Scroll Behavior
   ======================================== */

html, body {
    overflow-y: visible !important; /* Let the window handle scrolling */
    height: auto !important;        /* Stop restricting height to 100% */
}

/* We keep overflow-x hidden on body to prevent horizontal scrollbars */
body {
    overflow-x: hidden !important;
}
/* ========================================
   SECTION TAGS - Matching Home Page
   ======================================== */

.section-tag {
    display: inline-block;
    background: linear-gradient(135deg, #0066CC 0%, #00A99D 100%);
    color: white;
    padding: 0.5rem 1.25rem;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.75rem;
}
    /* background: linear-gradient(135deg, var(--primary-blue) 0%, var(--dark-blue) 100%);
    color: white;
    padding: 4rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
} */

/* Main Content Layout */
.main-content {
    display: flex;
    max-width: 1800px;
    margin: 1.5rem auto;
    padding: 0 2rem;
    gap: 1.5rem;
    min-height: calc(100vh - 250px);
}

/* Filters Panel */
.filters-sidebar {
    width: 280px;
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    height: fit-content;
    position: sticky;
    top: 100px;
}

.filters-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    animation: fadeInUp 0.6s ease-out;
}

.filters-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.clear-filters {
    color: var(--primary-blue);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
}

.clear-filters:hover {
    text-decoration: underline;
    color: var(--primary-orange);
}

.active-filters {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

.active-filter-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--primary-blue);
    color: white;
    padding: 0.5rem 0.75rem 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    margin: 0.25rem;
}

.remove-filter {
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    transition: background 0.2s;
}

.remove-filter:hover {
    background: rgba(255,255,255,0.35);
}

.filter-category {
    margin-bottom: 1.25rem;
    
}

.filter-category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: var(--bg-gray);
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
    font-weight: 600;
    color: var(--text-primary);
    animation: fadeInUp 0.6s ease-out;
    border: 1px solid var(--border);
}

.filter-category-header:hover {
    background: var(--light-blue);
}

.filter-category-header i {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-right: 0.5rem;
}

.filter-category-header .fa-chevron-down {
    margin-right: 0;
    margin-left: auto;
    transition: transform 0.3s;
}

.filter-category-header.active .fa-chevron-down {
    transform: rotate(180deg);
}

.filter-dropdown {
    position: relative;
}

.filter-options {
    display: none;
    background: white;
    border: 2px solid var(--border);
    border-radius: 8px;
    margin-top: 0.5rem;
    padding: 0.75rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    position: absolute;
    left: 0;
    right: 0;
    z-index: 100;
    max-height: 300px;
    overflow-y: auto;
}

.filter-options.show {
    display: block;
}

.filter-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 0.5rem;
    cursor: pointer;
    border-radius: 6px;
    transition: background 0.2s;
}

.filter-option:hover {
    background: var(--bg-gray);
}

.filter-option input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary-blue);
}

.filter-option label {
    cursor: pointer;
    font-size: 0.9375rem;
    flex: 1;
}
.mobile-filters-footer {
    position: sticky;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    /* padding: 1rem; */
    display: flex;
    gap: 1rem;
}

.clear-mobile-filters-btn {
    position: sticky;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    color: var(--primary-blue);
    border: none;
    padding: 1rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 1.5rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.clear-mobile-filters-btn:hover {
    color: var(--primary-orange);
}

/* Content Area */
.content-area {
    flex: 1;
    min-width: 0;
}

.content-header {
    background: white;
    padding: 1.25rem 1.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    margin-bottom: 1.5rem;
    animation: fadeInUp 0.6s ease-out;
}

.content-header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.page-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-blue);
    margin-bottom: 0.5rem;
}

.view-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.location-count {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.view-toggle {
    display: flex;
    gap: 0.5rem;
    background: var(--bg-gray);
    padding: 0.25rem;
    border-radius: 8px;
}

.view-btn {
    padding: 0.625rem 1.25rem;
    background: transparent;
    border: none;
    cursor: pointer;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.9375rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s;
    color: var(--text-secondary);
}

.view-btn.active {
    background: var(--primary-blue);
    color: white;
    box-shadow: var(--shadow);
}

/* Map Container */
.map-container {
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow);
    height: 600px;
    position: relative;
    overflow: hidden;
    animation: fadeInUp 1s ease-out;
}

#map {
    width: 100%;
    height: 100%;
}

.locate-me-btn {
    position: absolute;
    top: 2rem;
    right: 2rem;
    background: var(--primary-orange);
    color: white;
    border: none;
    padding: 1rem;
    border-radius: 50%;
    width: 56px;
    height: 56px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    z-index: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    transition: all 0.2s;
}

.locate-me-btn:hover {
    background: #e67e00;
    transform: scale(1.05);
}

/* Grid View */
.grid-view {
    display: none;
}

.grid-view.active {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.clinic-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    transition: all 0.2s;
    border: 2px solid transparent;
    display: flex;
    flex-direction: column;
    animation: fadeInUp 0.6s ease-out;
}

.clinic-card:hover {
    border-color: var(--primary-orange);
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    transform: translateY(-2px);
}

.clinic-name {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--primary-blue);
    margin-bottom: 0.75rem;
}

.clinic-info {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: start;
    gap: 0.5rem;
}

.clinic-info i {
    margin-top: 0.125rem;
    color: var(--primary-orange);
}

.services-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1rem 0;
}

.service-tag {
    padding: 0.3rem 0.7rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
    letter-spacing: 0.01em;
}

/* 8-color pastel palette — assigned by tag name hash */
.service-tag.tc-0 { background: #dbeafe; color: #1e40af; }
.service-tag.tc-1 { background: #d1fae5; color: #065f46; }
.service-tag.tc-2 { background: #ede9fe; color: #5b21b6; }
.service-tag.tc-3 { background: #fef3c7; color: #92400e; }
.service-tag.tc-4 { background: #fce7f3; color: #9d174d; }
.service-tag.tc-5 { background: #ccfbf1; color: #0f766e; }
.service-tag.tc-6 { background: #e0e7ff; color: #3730a3; }
.service-tag.tc-7 { background: #ffe4e6; color: #be123c; }

.clinic-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.action-btn {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.2s;
    font-size: 0.9375rem;
    text-decoration: none;
}

.action-btn.primary {
    background: var(--primary-blue);
    color: white;
    border: none;
}

.action-btn.primary:hover {
    background: var(--dark-blue);
}

.action-btn.secondary {
    background: white;
    color: var(--primary-blue);
    border: 2px solid var(--primary-blue);
}

.action-btn.secondary:hover {
    background: var(--bg-gray);
}

/* Map Popup Styles */
.leaflet-popup-content-wrapper {
    border-radius: 12px;
    padding: 0;
}

/* Ensure all Leaflet controls stay below the header */
.leaflet-control-zoom{
    z-index: 400 !important;
}

.leaflet-top, .leaflet-bottom {
    z-index: 400 !important;
}

.leaflet-pane {
    z-index: 400;
}

.leaflet-popup-pane {
    z-index: 450 !important;
}

.leaflet-popup-content {
    margin: 0;
    min-width: 320px;
}

.popup-content {
    padding: 1.25rem;
}

.popup-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--primary-blue);
    margin-bottom: 0.75rem;
}

.popup-info {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: start;
    gap: 0.5rem;
}

.popup-info i {
    color: var(--primary-orange);
    margin-top: 0.125rem;
}

.popup-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    margin: 0.75rem 0;
}

.popup-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.625rem;
    margin-top: 1rem;
}

.popup-btn {
    padding: 0.625rem 1rem;
    text-decoration: none;
    text-align: center;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.2s;
}

.popup-btn.primary {
    background: var(--primary-blue);
    color: white;
}

.popup-btn.primary:hover {
    background: var(--dark-blue);
}

.popup-btn.secondary {
    background: white;
    color: var(--primary-blue);
    border: 2px solid var(--primary-blue);
}

.popup-btn.secondary:hover {
    background: var(--bg-gray);
}

/* Mobile Filters Button */
.mobile-filters-btn {
    display: none;
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    background: var(--primary-blue);
    color: white;
    border: none;
    padding: 1rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    z-index: 999;
    font-size: 1rem;
}

.mobile-filters-btn i {
    margin-right: 0.5rem;
}

/* Modal for Mobile Filters */
.filters-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1100;
}

.filters-modal.show {
    display: block;
}

.filters-modal-content {
    background: white;
    width: 100%;
    height: 100%;
    overflow-y: auto;
    padding: 2rem;
}

.mobile-active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1rem 0;
}

.mobile-active-filters .active-filter-tag {
    background: var(--primary-blue);
    color: #fff;
    padding: 0.4rem 0.75rem;
    border-radius: 6px;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.mobile-active-filters .active-filter-tag .remove-filter {
    cursor: pointer;
}


.filters-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.close-modal {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-secondary);
}

.apply-filters-btn {
    position: sticky;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--primary-blue);
    color: white;
    border: none;
    padding: 1rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 1.5rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.apply-filters-btn:hover {
    background: var(--dark-blue);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 6rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    opacity: 0.3;
    color: var(--text-secondary);
}

.empty-state h3 {
    font-size: 1.75rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.empty-state p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 1.125rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .main-content {
        flex-direction: column;
        padding: 0 1rem;
    }


    .filters-sidebar {
        display: none;
    }

    .mobile-filters-btn {
        display: block;
    }

    .content-header-top {
        flex-direction: column;
        gap: 1rem;
    }

    .view-controls {
        width: 100%;
        justify-content: space-between;
    }

    .grid-view.active {
        grid-template-columns: 1fr;
    }

    .map-container {
        height: 450px;
    }

    /* .locate-me-btn {
        bottom: 1rem;
        right: 1rem;
        width: 48px;
        height: 48px;
        font-size: 1.125rem;
    } */

    .leaflet-popup-content {
        min-width: 260px;
        max-width: 280px;
    }

    .popup-content {
        padding: 1rem;
    }

    .popup-title {
        font-size: 1rem;
    }

    .popup-info {
        font-size: 0.8125rem;
    }

    .popup-tags {
        gap: 0.25rem;
    }

    .service-tag {
        font-size: 0.75rem;
        padding: 0.25rem 0.5rem;
    }

    .popup-actions {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .popup-btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.8125rem;
    }
}

@media (max-width: 480px) {
        .main-content {
        padding: 1.5rem 0.75rem;
    }

    .page-title {
        font-size: 1.25rem;
    }

    .view-btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.875rem;
    }

    .leaflet-popup-content {
        min-width: 240px;
        max-width: 260px;
    }
}

/* Location Status Banner - Only shows in Grid View */
.location-status-banner {
    background: white;
    border-radius: 12px;
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow);
    display: flex; /* Changed from none to flex by default */
    align-items: center;
    gap: 1rem;
    border-left: 4px solid var(--primary-blue);
    transition: all 0.3s;
    animation: fadeInUp 0.6s ease-out;
}

/* Hide banner when in map view */
.content-area.map-active #locationStatusBanner {
    display: none;
}

.location-status-banner.location-off {
    border-left-color: var(--primary-orange);
    background: linear-gradient(to right, #fff7ed 0%, white 100%);
}

.location-status-banner.location-on {
    border-left-color: #10b981;
    background: linear-gradient(to right, #d1fae5 0%, white 100%);
    padding: 0.75rem 1rem;
}

.location-status-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.location-status-banner.location-off .location-status-icon {
    background: var(--primary-orange);
    color: white;
}

.location-status-banner.location-on .location-status-icon {
    background: #10b981;
    color: white;
    width: 32px;
    height: 32px;
    font-size: 1rem;
}

.location-status-content {
    flex: 1;
}

.location-status-title {
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.location-status-banner.location-on .location-status-title {
    margin-bottom: 0;
    font-size: 0.875rem;
}

.location-status-message {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.location-status-banner.location-on .location-status-message {
    display: none;
}

.location-status-action {
    flex-shrink: 0;
}

.enable-location-btn {
    padding: 0.75rem 1.5rem;
    background: var(--primary-orange);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s;
    font-size: 0.875rem;
    white-space: nowrap;
}

.enable-location-btn:hover {
    background: #e67e00;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(247, 148, 30, 0.3);
}

.enable-location-btn:disabled {
    background: var(--text-secondary);
    cursor: not-allowed;
    transform: none;
}

.sorting-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #065f46;
    font-size: 0.875rem;
    font-weight: 600;
}

.sorting-info i {
    color: #10b981;
}

/* Toast Notification */
.toast-notification {
    position: fixed;
    top: 100px;
    right: 2rem;
    background: #10b981;
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    z-index: 2000;
    animation: slideInRight 0.3s ease, fadeOut 0.3s ease 2.7s;
    font-weight: 600;
    font-size: 0.9375rem;
}

.toast-notification i {
    font-size: 1.25rem;
}

@keyframes slideInRight {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .location-status-banner {
        padding: 0.875rem 1rem;
        gap: 0.75rem;
    }

    .location-status-banner.location-off {
        flex-direction: column;
        text-align: center;
    }

    .location-status-banner.location-on {
        padding: 0.625rem 1rem;
    }

    .location-status-icon {
        width: 36px;
        height: 36px;
        font-size: 1.125rem;
    }

    .location-status-banner.location-on .location-status-icon {
        width: 28px;
        height: 28px;
        font-size: 0.875rem;
    }

    .location-status-banner.location-off .location-status-action {
        width: 100%;
    }

    .enable-location-btn {
        width: 100%;
        justify-content: center;
        padding: 0.625rem 1.25rem;
        font-size: 0.8125rem;
    }

    .location-status-title {
        font-size: 0.875rem;
    }

    .location-status-message {
        font-size: 0.8125rem;
    }

    .sorting-info {
        font-size: 0.8125rem;
    }

    .toast-notification {
        top: 80px;
        right: 1rem;
        left: 1rem;
        padding: 0.875rem 1rem;
        font-size: 0.875rem;
    }

    .toast-notification i {
        font-size: 1.125rem;
    }
}

@media (max-width: 480px) {
    .location-status-banner {
        padding: 0.75rem;
    }

    .location-status-banner.location-on {
        padding: 0.5rem 0.75rem;
    }

    .location-status-title {
        font-size: 0.8125rem;
    }

    .location-status-message {
        font-size: 0.75rem;
        line-height: 1.4;
    }

    .enable-location-btn {
        font-size: 0.75rem;
        padding: 0.5rem 1rem;
    }

    .sorting-info {
        font-size: 0.75rem;
    }
}

/* ========================================
   ADDITIONAL BRANDING UPDATES
   ======================================== */

.filters-header-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.filters-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--primary-blue), var(--teal-accent));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.875rem;
}

.filters-title {
    font-weight: 800 !important;
    color: var(--gray-900) !important;
}

.content-header-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.page-title {
    font-size: 1.75rem !important;
    font-weight: 800 !important;
    color: var(--gray-900) !important;
    margin-bottom: 0.5rem;
}

.location-count {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--gray-600) !important;
}

.location-count i {
    color: var(--primary-orange);
}

.filters-sidebar {
    border-radius: 20px !important;
    box-shadow: var(--shadow-md) !important;
    border: 2px solid var(--gray-200);
}

.content-header {
    border-radius: 20px !important;
    box-shadow: var(--shadow-md) !important;
}

.map-container {
    border-radius: 20px !important;
    box-shadow: var(--shadow-md) !important;
}

.clinic-card {
    border-radius: 20px !important;
    box-shadow: var(--shadow-md) !important;
    transition: all 0.4s ease !important;
}

.clinic-card:hover {
    transform: translateY(-8px) !important;
    box-shadow: var(--shadow-xl) !important;
}

.clinic-name {
    font-weight: 800 !important;
    color: var(--gray-900) !important;
}

/* .locate-me-btn {
    border-radius: 50% !important;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.75rem !important;
    width: auto !important;
    height: auto !important;
    min-width: 56px;
} */

.locate-me-btn span {
    font-size: 0.625rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mobile-filters-btn {
    border-radius: 50px !important;
    box-shadow: var(--shadow-lg) !important;
    display: none;
    align-items: center;
    gap: 0.5rem;
}

.filter-count {
    background: white;
    color: var(--primary-blue);
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 800;
}

.view-btn {
    font-weight: 700 !important;
}

.action-btn {
    font-weight: 700 !important;
}

@media (max-width: 768px) {
    .locate-me-btn span {
        display: none;
    }
    
    .mobile-filters-btn {
        display: flex !important;
    }
}


.clinic-website {
    margin: 0.75rem 0 1rem 0;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
    color: var(--primary-orange);
}

.popup-website {
    margin: 0.75rem 0 1rem 0;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
    color: var(--primary-orange);
}

.popup-website .website-link {
    color: var(--primary-orange) !important;
    font-weight: 600;
}

.website-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-orange);
    text-decoration: none;
    font-size: 0.9375rem;
    font-weight: 500;
    transition: all 0.2s;
}

.website-link:hover {
    color: var(--primary-blue);
    text-decoration: underline;
}

.website-link i {
    font-size: 0.875rem;
}



/* Filter Search Box */
.filter-search {
    position: relative;
    margin-bottom: 0.75rem;
    padding: 0 0.75rem;
}

.filter-search-input {
    width: 100%;
    padding: 0.625rem 2.5rem 0.625rem 0.75rem;
    border: 2px solid var(--gray-200);
    border-radius: 8px;
    font-size: 0.9375rem;
    transition: all 0.2s;
    font-family: 'DM Sans', sans-serif;
}

.filter-search-input:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(0, 48, 135, 0.1);
}

/* ========================================
   NO RESULTS MODAL
   ======================================== */

.no-results-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    backdrop-filter: blur(2px);
}

.no-results-overlay.show {
    display: flex;
    animation: nrFadeIn 0.2s ease;
}

@keyframes nrFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.no-results-modal {
    background: white;
    border-radius: 20px;
    padding: 2.5rem 2rem 2rem;
    max-width: 460px;
    width: 100%;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    animation: nrSlideUp 0.25s ease;
    text-align: center;
}

@keyframes nrSlideUp {
    from { transform: translateY(16px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}

.no-results-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 32px;
    height: 32px;
    border: none;
    background: var(--gray-100, #f3f4f6);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: background 0.15s;
}

.no-results-close:hover {
    background: var(--gray-200, #e5e7eb);
}

.no-results-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #eff6ff;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem;
}

.no-results-icon i {
    font-size: 1.5rem;
    color: var(--primary-blue);
}

.no-results-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 0.5rem;
}

.no-results-message {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    margin: 0 0 0.75rem;
}

.no-results-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    justify-content: center;
    margin-bottom: 1rem;
}

.no-results-hint {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin: 0 0 1.75rem;
}

.no-results-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
}

.no-results-btn-secondary {
    padding: 0.625rem 1.5rem;
    border: 1.5px solid var(--primary-blue);
    border-radius: 8px;
    background: white;
    color: var(--primary-blue);
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}

.no-results-btn-secondary:hover {
    background: var(--gray-100, #f3f4f6);
}

.no-results-btn-primary {
    padding: 0.625rem 1.5rem;
    border: none;
    border-radius: 8px;
    background: var(--primary-blue);
    color: white;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    transition: opacity 0.15s;
}

.no-results-btn-primary:hover {
    opacity: 0.88;
}

.filter-search i {
    position: absolute;
    right: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-600);
    pointer-events: none;
}

/* Multi-select Options Container */
.multi-select-options {
    max-height: 250px;
    /* overflow-y: auto; */
    padding: 0 0.75rem;
}

.multi-select-options::-webkit-scrollbar {
    width: 6px;
}

.multi-select-options::-webkit-scrollbar-track {
    background: var(--gray-100);
    border-radius: 3px;
}

.multi-select-options::-webkit-scrollbar-thumb {
    background: var(--gray-600);
    border-radius: 3px;
}

.multi-select-options::-webkit-scrollbar-thumb:hover {
    background: var(--primary-blue);
}

/* Mobile Filter Search */
#mobileFiltersContent .filter-search {
    padding: 0 0.5rem;
    margin-bottom: 0.5rem;
}

#mobileFiltersContent .filter-search-input {
    padding: 0.5rem 2rem 0.5rem 0.625rem;
    font-size: 0.875rem;
}

#mobileFiltersContent .filter-search i {
    right: 1rem;
}

#mobileFiltersContent .multi-select-options {
    max-height: 200px;
    padding: 0 0.5rem;
}

/* Adjust filter option spacing for multi-select */
.multi-select-options .filter-option {
    margin-bottom: 0.5rem;
}

.multi-select-options .filter-option:last-child {
    margin-bottom: 0;
}

/* Empty state for filtered search */
.multi-select-options:empty::after {
    content: 'No options found';
    display: block;
    text-align: center;
    padding: 1rem;
    color: var(--gray-600);
    font-size: 0.875rem;
}

/* ========================================
   TAB NAVIGATION
   ======================================== */

.tabs-container {
    background: white;
    border-bottom: 2px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 900;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.tabs-wrapper {
    max-width: 1800px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    gap: 0.5rem;
}

.tab-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.tab-btn:hover {
    color: var(--primary-blue);
    background: rgba(0, 102, 204, 0.05);
}

.tab-btn.active {
    color: var(--primary-blue);
    border-bottom-color: var(--primary-blue);
}

.tab-btn i {
    font-size: 1.1rem;
}

/* ========================================
   TAB CONTENT
   ======================================== */

.tab-content {
    display: none;
    animation: fadeIn 0.4s ease-in-out;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   RESOURCES LAYOUT (TN State & Federal)
   ======================================== */

/* .resources-layout {
    display: flex;
    max-width: 1800px;
    margin: 1.5rem auto;
    padding: 0 2rem;
    gap: 2rem;
    min-height: calc(100vh - 350px);
} */

/* Resources Sidebar */
/* .resources-sidebar {
    width: 280px;
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    height: fit-content;
    position: sticky;
    top: 120px;
    position: -webkit-sticky; 
    position: sticky;
    align-self: start;
} */

/* Update the Parent Container */
.resources-layout {
    display: flex;
    align-items: flex-start; /* CRITICAL: This ensures the sidebar doesn't stretch to full height */
    max-width: 1800px;
    margin: 1.5rem auto;
    padding: 0 2rem;
    gap: 2rem;
    min-height: calc(100vh - 350px);
}

/* Update the Sidebar */
.resources-sidebar {
    width: 280px;
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    /* Sticky Positioning */
    position: -webkit-sticky;
    position: sticky;
    top: 90px; 
    z-index: 10; 
    height: auto; /* Allow it to be natural height */
    max-height: calc(100vh - 160px); /* Prevent it from being taller than screen */
    overflow-y: auto; /* Scroll internally if content is too long */
}

.resources-sidebar-header {
    /* margin-bottom: 1.5rem; */
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border);
}

.resources-sidebar-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.resources-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.resources-nav-item {
    display: block;
    padding: 0.35rem 0.35rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.9375rem;
    transition: all 0.2s ease;
    cursor: pointer;
    border: 1px solid transparent;
}

.resources-nav-item:hover {
    background: var(--light-blue);
    color: var(--primary-blue);
    border-color: rgba(0, 102, 204, 0.2);
}

.resources-nav-item.active {
    background: linear-gradient(135deg, rgba(0, 102, 204, 0.1) 0%, rgba(0, 169, 157, 0.1) 100%);
    color: var(--primary-blue);
    border-color: var(--primary-blue);
    font-weight: 600;
}

/* Resources Content Area */
.resources-content-area {
    flex: 1;
    background: white;
    border-radius: 12px;
    padding: 2.5rem;
    box-shadow: var(--shadow);
}

.resource-section {
    margin-bottom: 3.5rem;
    scroll-margin-top: 140px;
}

.resource-section:last-child {
    margin-bottom: 0;
}

.resource-section-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 3px solid var(--primary-blue);
}

.resource-item {
    /* margin-bottom: 2rem; */
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border);
}

.resource-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.resource-item-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.resource-item-content {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-secondary);
}

.resource-item-content a {
    color: var(--primary-blue);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
    border-bottom: 1px solid transparent;
}

.resource-item-content a:hover {
    color: var(--primary-orange);
    border-bottom-color: var(--primary-orange);
}

/* Mobile Resources Navigation Button */
.mobile-resources-btn {
    display: none;
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--dark-blue) 100%);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 1rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.3);
    z-index: 800;
    gap: 0.5rem;
    align-items: center;
    transition: all 0.3s ease;
}

.mobile-resources-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 102, 204, 0.4);
}

.mobile-resources-btn i {
    font-size: 1.1rem;
}

/* ========================================
   RESPONSIVE DESIGN FOR TABS
   ======================================== */

@media (max-width: 1024px) {
    .tabs-wrapper {
        padding: 0 1.5rem;
    }

    .tab-btn {
        padding: 0.875rem 1.5rem;
        font-size: 0.9375rem;
    }

    .resources-layout {
        padding: 0 1.5rem;
    }

    .resources-sidebar {
        width: 240px;
    }

    .resources-content-area {
        padding: 2rem;
    }
}

@media (max-width: 768px) {
    .tabs-container {
        position: relative;
    }

    .tabs-wrapper {
        padding: 0 1rem;
        gap: 0.25rem;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .tabs-wrapper::-webkit-scrollbar {
        display: none;
    }

    .tab-btn {
        padding: 0.875rem 1.25rem;
        font-size: 0.875rem;
        white-space: nowrap;
        flex-shrink: 0;
    }

    .tab-btn span {
        display: inline;
    }

    .resources-layout {
        padding: 0 1rem;
        margin: 1rem auto;
    }

    .resources-sidebar {
        display: none;
    }

    .resources-content-area {
        padding: 1.5rem;
        width: 100%;
    }

    .resource-section {
        margin-bottom: 2.5rem;
        scroll-margin-top: 100px;
    }

    .resource-section-title {
        font-size: 1.5rem;
        margin-bottom: 1.25rem;
    }

    .resource-item {
        margin-bottom: 1.5rem;
        padding-bottom: 1.5rem;
    }

    .resource-item-title {
        font-size: 1.125rem;
    }

    .resource-item-content {
        font-size: 0.9375rem;
    }

    .mobile-resources-btn {
        display: flex;
        bottom: 1.5rem;
        left: 1.5rem;
    }
}

@media (max-width: 480px) {
    .tab-btn {
        padding: 0.75rem 1rem;
        font-size: 0.8125rem;
    }

    .tab-btn i {
        font-size: 1rem;
    }

    .resources-content-area {
        padding: 1.25rem;
    }

    .resource-section-title {
        font-size: 1.375rem;
    }

    .mobile-resources-btn {
        padding: 0.875rem 1.25rem;
        font-size: 0.9375rem;
        bottom: 1rem;
        left: 1rem;
    }
}

/* Mobile Resources Modal */
.mobile-resources-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-resources-modal.show {
    display: block;
    opacity: 1;
}

.mobile-resources-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-radius: 16px 16px 0 0;
    max-height: 70vh;
    overflow-y: auto;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    padding: 1.5rem;
}

.mobile-resources-modal.show .mobile-resources-content {
    transform: translateY(0);
}

.mobile-resources-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border);
}

.mobile-resources-header h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.mobile-resources-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-resources-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.mobile-resources-list .resources-nav-item {
    margin: 0;
}