/* Basic styling - customize as needed */
.office-listings-page {
    max-width: 1290px;
    margin: 0 auto !important;
    padding: 64px 20px;
}
.sub-head {
    max-width: 100%;
    padding: 50px 20px;
    margin: 0 auto;
    background: #317ec1;
}
.sub-head h1 {
    font-size: 42px;
    line-height: 1.2;
    font-weight: 300;
    color: #fff;
    margin: 0 auto;
    max-width: 1290px;
    padding: 0 20px;
}
.office-search-header {
    margin-bottom: 30px;
}

.office-search-form {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin: 20px 0;
    padding: 20px;
    background: #f5f5f5;
    border-radius: 8px;
}

.office-search-form .search-field {
    flex: 1;
    min-width: 250px;
}
.office-search-form .search-field.telehealthsec {
    flex: 0.5;
    min-width: 0;
    position: relative;
    align-self: center;
    top: 20px;
}

.office-search-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.office-search-form input[type="text"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.office-search-form button {
    align-self: flex-end;
    padding: 10px 30px;
    background: #0073aa;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.office-search-form button:hover {
    background: #005177;
}

.search-summary {
    margin: 20px 0;
    padding: 15px;
    background: #e7f3f8;
    border-left: 4px solid #0073aa;
}

/* Map Styles */
.maplibregl-popup {
    max-width: 250px;
}

.maplibregl-popup-content {
    padding: 10px 12px;
    border-radius: 6px;
}

.popup-content {
    font-family: inherit;
}

.popup-content .name {
    font-weight: bold;
    font-size: 14px;
    color: #2c3e50;
    margin-bottom: 5px;
}

.popup-content .address {
    font-size: 12px;
    color: #666;
    margin-bottom: 3px;
}

.popup-content .phone {
    font-size: 12px;
    color: #3498db;
    font-weight: 500;
}

.popup-content .phone a {
    color: #3498db;
    text-decoration: none;
}

.popup-content .phone a:hover {
    text-decoration: underline;
}

.maplibregl-popup-close-button {
    border: 0 !important;
    outline: none !important;
}

.maplibregl-ctrl-bottom-right {
    opacity: 0.6;
}

.maplibregl-ctrl-attrib.maplibregl-compact {
    margin: 2px !important;
}

.listings-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 25px;
    margin: 30px 0;
}

.office-listing-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    transition: box-shadow 0.3s ease;
    border: 1px solid #e4e4e4;
}

.office-listing-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.office-card-header {
    display: flex;
    align-items: center;
    margin-bottom: 0px;
    padding: 10px;
    background: #f5f5f5;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
}

.office-logo {
    margin-right: 20px;
}

.office-logo img {
    width: auto;
    max-height: 40px;
}

.office-name {
    margin: 0 0 6px 0;
    font-size: 24px;
    line-height: 1;
    color: #333;
}

.office-name a {
    color: #333;
    text-decoration: none;
}

.office-name a:hover {
    color: #0073aa;
}

.office-card-body {
    padding: 20px;
    display: flex;
    gap: 30px;
}
.office-card-body > div {
    margin: 0;
}
.office-info {
    width: 100%;
    max-width: 400px;
}
.office-address, .office-phone, .office-website {
    line-height: 1.1;
    margin-bottom: 10px;
}
.office-distance {
    line-height: 1.1;
    margin: 0;
}

.office-features ul {
    columns: 2;
    -webkit-columns: 2;
    -moz-columns: 2;
    column-gap: 30px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.office-features li {
    padding: 0;
    color: #27ae60;
    font-weight: bold;
}

.office-social {
    margin-top: 15px;
}

.office-social .social-links {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 5px;
}

.office-social .social-links a {
    font-size: 0.9em;
}
.office-social .social-links a {
    filter: grayscale(100%);
}

.office-social .social-links a:hover {
    filter: grayscale(0%);
}

.office-actions {
    flex-grow: 1;
    text-align: center;
    align-self: center;
}

.button.see-on-map {
    display: inline-block;
    padding: 8px 16px;
    background: #0073aa;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    text-decoration: none;
    font-weight: 500;
}

.button.see-on-map:hover {
    background: #005177;
}

.button.view-office-details {
    display: inline-block;
    padding: 10px 20px;
    background: #0073aa;
    color: white;
    text-decoration: none;
    border-radius: 4px;
}

.button.view-office-details:hover {
    background: #005177;
}

.office-listings-pagination {
    margin: 40px 0;
    text-align: center;
}

.office-listings-pagination .page-numbers {
    display: inline-block;
    padding: 8px 12px;
    margin: 0 3px;
    background: #f0f0f0;
    color: #333;
    text-decoration: none;
    border-radius: 4px;
}

.office-listings-pagination .page-numbers.current {
    background: #0073aa;
    color: white;
}

.office-listings-pagination .page-numbers:hover {
    background: #0073aa;
    color: white;
}

.no-results {
    text-align: center;
    padding: 60px 20px;
}

/* Mobile Search Toggle Button */
.mobile-search-toggle {
    display: none; /* Hidden by default, shown on mobile */
    width: 100%;
    padding: 10px 20px;
    background: #317ec1;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 20px;
    text-align: center;
    transition: background-color 0.3s ease;
    box-shadow: 0 2px 8px rgba(49, 126, 193, 0.3);
}

.mobile-search-toggle:hover {
    background: #2666a0;
}

.mobile-search-toggle.active {
    background: #317ec1;
}

.mobile-search-toggle.active:hover {
    background: #2666a0;
}

.mobile-search-toggle .toggle-icon {
    font-size: 18px;
    margin-right: 8px;
}

@media (max-width: 768px) {
    /* Show mobile search toggle button */
    .mobile-search-toggle {
        display: block;
    }
    
    /* Hide search form by default on mobile */
    .office-search-header {
        display: none;
        animation: slideDown 0.3s ease-out;
    }
    
    /* Show search form when toggled */
    .office-search-header.search-visible {
        display: block;
    }
    
    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-20px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
    
    .listings-grid {
        grid-template-columns: 1fr;
    }
    
    .office-search-form {
        flex-direction: column;
    }
    
    .office-search-form button {
        align-self: stretch;
    }
    .office-card-header {
        flex-wrap: wrap;
        padding: 20px;
    }
    .office-logo {
        margin: 0 0 10px 0;
    }
    .office-name {
        font-size: 18px;
    }
    .office-card-body {
        flex-wrap: wrap;
        gap: 5px;
    }
    .office-features ul {
        columns: 1;
        -webkit-columns: 1;
        -moz-columns: 1;
        list-style: none;
        padding: 0;
        margin: 0;
    }
    .office-listings-page {
        padding: 20px;
    }
    .office-search-form .search-field.telehealthsec {
        margin-bottom: 0 !important;
        align-self: start;
        top: 0;
    }  
    .office-social {
        margin-bottom: 20px;
        margin-top: 0;
    } 
    
}
@media (max-width: 450px) {
    .sub-head {
        padding: 20px 0;
    }
    .office-actions {
        flex-grow: 1;
        text-align: left;
        margin-top: 15px !important;
    }
    .office-social {
        margin-bottom: 20px;
        margin-top: 0;
    }
    
}

/* Google Maps Directions Modal Styles */
.directions-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
}

.directions-modal-content {
    background-color: #fff;
    margin: 10% auto;
    padding: 0;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.directions-modal-header {
    padding: 20px 24px;
    background-color: #317ec1;
    color: white;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.directions-modal-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
}

.directions-modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 32px;
    font-weight: 300;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: opacity 0.2s;
}

.directions-modal-close:hover {
    opacity: 0.7;
}

.directions-modal-body {
    padding: 24px;
}

.directions-modal-body p {
    margin: 0 0 16px 0;
    line-height: 1.6;
    color: #333;
}

.directions-modal-body p:last-child {
    margin-bottom: 0;
}

.directions-modal-body #modalAddress {
    font-weight: 600;
    color: #317ec1;
}

.directions-modal-footer {
    padding: 16px 24px;
    background-color: #f5f5f5;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.directions-modal-footer .button {
    margin: 0;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    border: none;
    transition: background-color 0.2s;
}

.directions-modal-footer .button-secondary {
    background-color: #e0e0e0;
    color: #333;
}

.directions-modal-footer .button-secondary:hover {
    background-color: #d0d0d0;
}

.directions-modal-footer .button-primary {
    background-color: #317ec1;
    color: white;
}

.directions-modal-footer .button-primary:hover {
    background-color: #2666a0;
}

.button.get-directions {
    display: inline-block;
    padding: 8px 16px;
    background: #27ae60;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    text-decoration: none;
    font-weight: 500;
    margin-top: 8px;
}

.button.get-directions:hover {
    background: #229954;
}

@media (max-width: 768px) {
    .directions-modal-content {
        margin: 20% auto;
        width: 95%;
    }
    
    .directions-modal-footer {
        flex-direction: column;
    }
    
    .directions-modal-footer .button {
        width: 100%;
    }
}
