/* Updated Services Directory Container */
.services-directory-wrapper {
    margin: 20px 0;
    font-family: "Brandon Grotesque", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    max-width: 100%;
}

.services-intro {
    margin-bottom: 20px;
    font-size: 18px;
    color: #0F0F10;
    padding-left: 5px;
    font-weight: 500;
}

/* Main layout - two column design */
.services-directory-container {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
}

/* Left column - services list */
.services-list-container {
    flex: 0 0 45%;
    max-width: 45%;
}

/* Right column - service detail */
.service-detail-container {
    flex: 0 0 50%;
    max-width: 50%;
    text-align: center;
}

/* Store list styling */
.store-list {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    border-radius: 0 !important;
    background: none !important;
}

/* Basic tab styling */
.services-directory-wrapper .store-list-item {
    margin: 0 !important;
    padding: 0 !important;
    border: none !important; /* Reset all borders first */
    border-bottom: 1px solid #0F0F10 !important; /* Apply bottom border to all items */
    background-color: #f8f8f8 !important;
    position: relative !important;
    z-index: 1 !important;
    display: block !important;
    border-radius: 0 !important;
    transition: all 0.2s ease !important;
}

/* Special handling for first item */
.services-directory-wrapper .store-list-item:first-child {
    border-top: 1px solid #0F0F10 !important; /* Apply top border only to first item */
}

/* Hover styling */
.services-directory-wrapper .store-list-item:hover {
    background-color: #DEE2E8 !important;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.5) !important;
}

/* Active tab styling */
.services-directory-wrapper .store-list-item.active {
    position: relative !important;
    z-index: 2 !important; /* Higher z-index than regular items */
    background-color: #DEE2E8 !important;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.5) !important;
}

/* Apply borders to active item with ::before and ::after to avoid interference */
.services-directory-wrapper .store-list-item.active::before {
    content: "" !important;
    position: absolute !important;
    top: -1px !important;
    left: 0 !important;
    right: 0 !important;
    height: 2px !important; /* Currently 2px */
    background-color: #0F0F10 !important;
}

.services-directory-wrapper .store-list-item.active::after {
    content: "" !important;
    position: absolute !important;
    bottom: -1px !important;
    left: 0 !important;
    right: 0 !important;
    height: 2px !important; /* Currently 2px */
    background-color: #0F0F10 !important;
}

/* Button styling */
.store-list-button {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    width: 100% !important;
    padding: 30px 20px !important;
    text-align: left !important;
    border: none !important;
    border-radius: 0 !important;
    background: transparent !important;
    cursor: pointer !important;
    color: #0F0F10 !important;
    font-weight: normal !important;
    transition: background-color 0.2s !important;
    box-shadow: none !important;
}

.store-list-button:hover,
.store-list-button:focus {
    background-color: #DEE2E8 !important;
    color: #0F0F10 !important;
}

.store-list-button:focus {
    outline: 1px 0px 1px 0px solid #1B365D !important;
    outline-offset: -1px !important;
}

.store-list-item.active .store-list-button {
    background-color: #DEE2E8 !important;
    color: #0F0F10 !important;
}

/* Text elements styling */
.store-name {
    font-family: "Brandon Grotesque", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
    font-size: 18px !important;
    font-weight: 500 !important;
    color: #0F0F10 !important;
    text-decoration: none !important;
}

.store-name:hover {
    text-decoration: underline !important;
}

.store-location {
    font-family: "Brandon Grotesque", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
    font-size: 18px !important;
    font-weight: 400 !important;
    line-height: 27px !important;
    color: #0F0F10 !important;
    text-align: right !important;
}

/* Service Detail Styling */
.service-detail {
    padding: 0;
    text-align: center;
    display: none;
}

.service-detail.active {
    display: block;
}

.service-detail-image {
    margin: 0 0 25px 0;
    width: 100%;
    text-align: center;
}

.service-detail-image img {
    width: 85%;
    max-height: 350px;
    object-fit: cover;
    height: auto;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    display: inline-block;
    cursor: pointer;
}

.service-detail-header {
    margin-top: 0;
    margin-bottom: 20px;
}

.service-detail-header h3 {
    font-size: 28px;
    margin: 0 0 20px 0;
    color: #0F0F10;
    font-weight: 600;
    text-align: center;
}

.service-detail-description {
    margin: 0 auto 25px auto;
    line-height: 27px;
    font-family: "Brandon Grotesque", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 18px;
    font-weight: 400;
    color: #0F0F10;
    max-width: 90%;
    text-align: center;
}

.service-detail-description p {
    margin-bottom: 36px;
}

.service-detail-hours {
    margin-bottom: 15px;
    text-align: center;
}

.service-detail-hours p {
    margin: 5px 0;
    font-size: 18px;
    font-weight: 600;
    color: #0F0F10;
}

.service-detail-location {
    margin-bottom: 25px;
    text-align: center;
}

.service-detail-location p {
    margin: 5px 0;
    font-family: "Brandon Grotesque", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 18px;
    font-weight: 400;
    line-height: 27px;
    color: #0F0F10;
}

.service-detail-links {
    margin: 30px auto;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
}

/* Button styles based on Image 2 */
.map-link a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 15px 24px;
    background-color: #1B365D;
    border-radius: 30px;
    text-decoration: none;
    color: white;
    font-weight: 500;
    border: 1px solid #1B365D;
    transition: all 0.3s ease;
    font-family: "Brandon Grotesque", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 18px;
}

.learn-more-link a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 15px 24px;
    background-color: white;
    border-radius: 30px;
    text-decoration: none;
    color: #0F0F10;
    font-weight: 500;
    border: 1px solid #1B365D;
    transition: all 0.3s ease;
    font-family: "Brandon Grotesque", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 18px;
}

.map-link a:hover,
.map-link a:focus {
    background-color: white;
    color: #0F0F10;
    text-decoration: underline;
    border: 1px solid #1B365D;
}

.learn-more-link a:hover,
.learn-more-link a:focus {
    background-color: #1B365D;
    color: white;
    text-decoration: none;
}

/* Modern lightbox styles */
.service-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.service-lightbox.active {
    opacity: 1;
}

.service-lightbox img {
    max-width: 90%;
    max-height: 90vh;
    object-fit: contain;
}

.service-lightbox-close {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background-color: transparent;
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 30px;
    font-weight: 300;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: background-color 0.3s ease;
}

.service-lightbox-close:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

/* Mobile Styles */
@media (max-width: 767px) {
    .services-directory-container {
        flex-direction: column;
    }
    
    .services-list-container,
    .service-detail-container {
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    .services-list-container {
        margin-bottom: 30px;
    }
    
    .store-list-button {
        padding: 20px 15px !important;
    }
    
    .store-name,
    .store-location {
        font-size: 16px !important;
    }
    
    .service-detail-links {
        flex-direction: column;
    }
    
    .map-link a,
    .learn-more-link a {
        width: 100%;
        justify-content: center;
    }
}


/* Ensure header has higher z-index than the directory items */
.site-header, 
header,
.elementor-location-header {
    position: relative;
    z-index: 100 !important; /* Higher than any z-index in the directory */
}

/* Fix 2: Correct the extra margin causing gap */
/* Add these to your services-directory.css file */

/* Container fixes */
.services-directory-wrapper {
    margin: 20px 0;
    font-family: "Brandon Grotesque", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    max-width: 100%;
    width: 100%;
    overflow-x: hidden; /* Prevent horizontal scrolling */
    box-sizing: border-box;
}

.services-directory-container {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    width: 100%;
    box-sizing: border-box;
    padding: 0;
    margin: 0;
}

/* Mobile improvements */
@media (max-width: 767px) {
    .services-directory-wrapper {
        padding: 0;
        overflow-x: clip; /* Modern alternative to hidden */
    }
    
    .services-directory-container {
        margin: 0;
        padding: 0;
        gap: 15px;
    }
    
    /* Fix scrolling behavior */
    .services-list-container {
        position: relative;
        z-index: 1; /* Lower z-index on mobile */
    }
    
    /* Ensure active items don't overlap header */
    .services-directory-wrapper .store-list-item.active {
        z-index: 1 !important; /* Lower z-index to prevent header overlap */
    }
}