/* =========================================================
   Base
   ========================================================= */

* {
    box-sizing: border-box;
}

html {
    font-size: 16px;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    color: #25252a;
    background: #fff;
    line-height: 1.5;
}

a {
    color: #00a94f;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

img {
    max-width: 100%;
    height: auto;
}

.public-container {
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
}


/* =========================================================
   Header
   ========================================================= */

.site-header {
    background: #fff;
    border-top: 6px solid #2d263d;
    border-bottom: 1px solid #e5e5e5;
}

.site-header .public-container {
    min-height: 90px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

.site-logo {
    color: #25252a;
    font-size: 24px;
    font-weight: 700;
}

.site-logo:hover {
    text-decoration: none;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 25px;
}

.site-nav a {
    font-weight: 600;
}

.front-logo {
    width: 15rem;
}


/* =========================================================
   Main
   ========================================================= */

.site-main {
    min-height: 600px;
}


/* =========================================================
   Provider Page
   ========================================================= */

.provider-page {
    padding-bottom: 60px;
}


/* Breadcrumbs */

.breadcrumbs {
    padding: 18px 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    text-transform: uppercase;
}

.breadcrumbs a {
    color: #555;
}


/* Provider Heading */

.provider-heading {
    background: #00b74f;
    color: #fff;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    margin-bottom: 30px;
}

.provider-heading h1 {
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
    padding: 18px 0 22px;
    font-size: 32px;
    font-weight: 400;
    line-height: 1.2;
}


/* Main two-column structure */

.provider-layout {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 60px;
    align-items: start;
}


/* =========================================================
   Provider Sidebar
   ========================================================= */

.provider-sidebar {
    min-width: 0;
}

.provider-photo {
    display: block;
    width: 100%;
    max-width: 240px;
    aspect-ratio: 1 / 1.1;
    object-fit: cover;
    margin-bottom: 16px;
}

.provider-sidebar > h2 {
    margin: 0 0 4px;
    font-size: 21px;
    font-weight: 400;
    line-height: 1.3;
}

.provider-title {
    margin: 0;
    color: #555;
}

.provider-sidebar-section {
    margin-top: 28px;
}

.provider-sidebar-section h3 {
    margin: 0 0 8px;
    font-size: 20px;
    font-weight: 400;
}

.provider-sidebar-section ul {
    margin: 0;
    padding-left: 24px;
}

.provider-sidebar-section li {
    margin: 3px 0;
}


/* =========================================================
   Provider Content
   ========================================================= */

.provider-content {
    min-width: 0;
    border: 1px solid #e3e3e3;
    border-radius: 4px;
    overflow: hidden;
    background: #fff;
}


/* Tabs */

.provider-tabs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border-bottom: 1px solid #ddd;
}

.provider-tab {
    appearance: none;
    border: 0;
    border-right: 1px solid #ddd;
    background: #f5f5f5;
    color: #00a94f;
    padding: 17px 15px;
    font: inherit;
    font-size: 18px;
    text-transform: uppercase;
    cursor: pointer;
}

.provider-tab:last-child {
    border-right: 0;
}

.provider-tab.active {
    background: #fff;
    border-top: 3px solid #00b74f;
    padding-top: 14px;
}


/* Tab panels */

.provider-tab-panel {
    display: none;
    padding: 22px;
}

.provider-tab-panel.active {
    display: block;
}

.provider-tab-panel > h2:first-child {
    margin-top: 0;
}


/* =========================================================
   Locations
   ========================================================= */

.provider-location {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 35px;
    align-items: start;
}

.provider-location + .provider-location {
    margin-top: 35px;
    padding-top: 35px;
    border-top: 1px solid #eee;
}

.provider-location h2 {
    margin: 0 0 3px;
    font-size: 21px;
    font-weight: 400;
}

.provider-location p {
    margin: 3px 0;
}

.location-description {
    margin-bottom: 7px !important;
}

.provider-location-image img {
    display: block;
    width: 100%;
    border-radius: 4px;
}


/* =========================================================
   Footer
   ========================================================= */

.site-footer {
    background: #007a3d;
    color: #fff;
    padding: 35px 0;
}

.site-footer p {
    margin: 0;
}


/* =========================================================
   Responsive
   ========================================================= */

@media (max-width: 900px) {

    .provider-layout {
        grid-template-columns: 1fr;
        gap: 35px;
    }

    .provider-sidebar {
        max-width: 500px;
    }

    .provider-photo {
        max-width: 280px;
    }

    .provider-location {
        grid-template-columns: 1fr;
    }

    .provider-location-image {
        max-width: 500px;
    }
}

@media (max-width: 600px) {

    .public-container {
        width: min(100% - 28px, 1180px);
    }

    .site-header .public-container {
        min-height: 70px;
    }

    .site-logo {
        font-size: 19px;
    }

    .provider-heading h1 {
        width: min(100% - 28px, 1180px);
        font-size: 27px;
    }

    .provider-tabs {
        grid-template-columns: 1fr;
    }

    .provider-tab {
        border-right: 0;
        border-bottom: 1px solid #ddd;
    }

    .provider-tab-panel {
        padding: 18px;
    }
}

/* ==========================================================================
   Find a Provider
   ========================================================================== */

.provider-directory-page {
    background: #fff;
}


/* Page heading
   ========================================================================== */

.provider-directory-heading {
    background: #00b956;
    color: #fff;
    padding: 18px 0 20px;
}

.provider-directory-heading .breadcrumbs {
    margin-bottom: 8px;
    color: #fff;
}

.provider-directory-heading .breadcrumbs a,
.provider-directory-heading .breadcrumbs span {
    color: #fff;
}

.provider-directory-heading h1 {
    margin: 0;
    color: #fff;
    font-size: 32px;
    font-weight: 400;
}


/* Search section
   ========================================================================== */

.provider-search-section {
    position: relative;
    padding: 42px 0 48px;
    background: #f5f5f5;
    border-bottom: 3px solid #00b956;
}

.provider-search-intro {
    max-width: 720px;
    margin: 0 auto 30px;
    text-align: center;
}

.provider-search-intro h2 {
    margin: 0 0 20px;
    font-size: 25px;
    font-weight: 700;
    color: #222;
}

.provider-search-intro p {
    margin: 0 auto 14px;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.65;
    color: #333;
}


/* Search fields
   ========================================================================== */

.provider-search-form {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px;
    align-items: end;
}

.provider-search-field label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 700;
    color: #333;
}

.provider-search-control {
    display: flex;
    width: 100%;
}

.provider-search-control input,
.provider-search-control select {
    min-width: 0;
    width: 100%;
    height: 46px;
    padding: 0 14px;
    background: #fff;
    border: 1px solid #ccc;
    border-right: 0;
    border-radius: 3px 0 0 3px;
    font-family: inherit;
    font-size: 14px;
    color: #333;
    outline: none;
}

.provider-search-control select {
    cursor: pointer;
}

.provider-search-control input:focus,
.provider-search-control select:focus {
    border-color: #00a94f;
}

.provider-search-control button {
    flex: 0 0 auto;
    height: 46px;
    padding: 0 15px;
    border: 0;
    border-radius: 0 3px 3px 0;
    background: #00a94f;
    color: #fff;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.provider-search-control button:hover {
    background: #008f43;
}


/* Search Results Header
   ========================================================================== */

.provider-search-results-header {
    position: relative;
    margin-bottom: 28px;
}

.provider-search-results-title {
    margin: 0;
}

.provider-clear-search {
    position: absolute;
    top: 50%;
    right: 0;
    transform: translateY(-50%);

    display: inline-block;
    padding: 10px 18px;
    background: #00a94f;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
    border-radius: 2px;
    transition: background-color 0.2s ease;
}

.provider-clear-search:hover,
.provider-clear-search:focus {
    background: #008c42;
    color: #fff;
    text-decoration: none;
}


//* ==========================================================================
   Provider Search Results
   ========================================================================== */

.provider-search-results {
    padding: 34px 0 60px;
    margin: 45px 0;
    background: #fff;
}

.front-search-results {
    margin: 45px;
}

.provider-search-results-title {
    margin: 0 0 28px;
    font-size: 24px;
    line-height: 1.2;
    font-weight: 600;
    color: #222;
}


/* Results list
   ========================================================================== */

.provider-search-results-list {
    display: flex;
    flex-direction: column;
    gap: 36px;
}


/* Individual provider
   ========================================================================== */

.provider-search-result {
    display: flex;
    align-items: flex-start;
    gap: 30px;
    padding-bottom: 25px;
    border-bottom: 1px solid #006838;
}

.provider-search-result-photo {
    flex: 0 0 240px;
}

.provider-search-result-photo a {
    display: block;
}

.provider-search-result-photo img {
    display: block;
    width: 240px;
    height: auto;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 3px;
    background: #fff;
}

/* Provider Result Image Hover
   ========================================================================== */

.provider-result-image-link {
    position: relative;
    display: block;
    overflow: hidden;
    text-decoration: none;
}

.provider-result-image {
    display: block;
    width: 100%;
    height: auto;
    transition:
        filter 0.2s ease,
        transform 0.2s ease;
}

.provider-result-image-overlay {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;

    padding: 9px 12px;

    background: rgba(255, 255, 255, 0.92);
    color: #666;

    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    text-transform: uppercase;

    transform: translateY(100%);
    transition: transform 0.2s ease;
}

.provider-result-image-link:hover .provider-result-image,
.provider-result-image-link:focus .provider-result-image {
    filter: brightness(70%);
}

.provider-result-image-link:hover .provider-result-image-overlay,
.provider-result-image-link:focus .provider-result-image-overlay {
    transform: translateY(0);
}

/* Provider Name Tooltip
   ========================================================================== */

.provider-result-tooltip {
    position: relative;
}

.provider-result-tooltip::before {
    content: attr(data-tooltip);

    position: absolute;
    left: 50%;
    bottom: calc(100% + 9px);

    padding: 5px 7px;

    background: #222;
    color: #fff;

    font-size: 10px;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;

    border-radius: 3px;

    opacity: 0;
    visibility: hidden;

    transform: translate(-50%, 3px);

    transition:
        opacity 0.15s ease,
        transform 0.15s ease,
        visibility 0.15s ease;

    pointer-events: none;
    z-index: 10;
}

.provider-result-tooltip::after {
    content: "";

    position: absolute;
    left: 50%;
    bottom: calc(100% + 4px);

    width: 0;
    height: 0;

    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid #222;

    opacity: 0;
    visibility: hidden;

    transform: translateX(-50%);

    transition:
        opacity 0.15s ease,
        visibility 0.15s ease;

    pointer-events: none;
    z-index: 10;
}

.provider-result-tooltip:hover::before,
.provider-result-tooltip:hover::after,
.provider-result-tooltip:focus::before,
.provider-result-tooltip:focus::after {
    opacity: 1;
    visibility: visible;
}

.provider-result-tooltip:hover::before,
.provider-result-tooltip:focus::before {
    transform: translate(-50%, 0);
}


/* Provider information
   ========================================================================== */

.provider-search-result-info {
    flex: 1;
    min-width: 0;
    padding-top: 3px;
}

.provider-search-result-info h3 {
    margin: 0 0 18px;
    font-size: 17px;
    line-height: 1.3;
    font-weight: 400;
}

.provider-search-result-info h3 a {
    color: #00a94f;
    text-decoration: none;
}

.provider-search-result-info h3 a:hover {
    text-decoration: underline;
}


/* Clinical interests / locations
   ========================================================================== */

.provider-search-result-section {
    margin-bottom: 18px;
    font-size: 13px;
    line-height: 1.5;
    color: #222;
}

.provider-search-result-section:last-child {
    margin-bottom: 0;
}

.provider-search-result-section strong {
    display: block;
    margin-bottom: 5px;
    font-size: 13px;
}

.provider-search-result-section ul {
    margin: 0;
    padding-left: 27px;
}

.provider-search-result-section li {
    margin: 2px 0;
    padding-left: 2px;
}

.provider-search-result-section a,
.provider-search-location-name {
    color: #00a94f;
    text-decoration: none;
}

.provider-search-result-section a:hover {
    text-decoration: underline;
}

.provider-search-location-phone {
    margin-left: 8px;
    color: #222;
    white-space: nowrap;
}


/* No results
   ========================================================================== */

.provider-no-results {
    padding: 30px 0;
}

.provider-no-results h3 {
    margin: 0 0 8px;
    font-size: 20px;
}

.provider-no-results p {
    margin: 0;
    color: #666;
}


/* ========================================
   Provider Search Pagination
======================================== */

.provider-results-pagination {
    margin-top: 40px;
    padding-top: 25px;
    border-top: 1px solid #eee;
}

.provider-results-pagination nav {
    display: block;
}

/* Pagination list */
.provider-results-pagination .pagination {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;

    padding: 0;
    margin: 0;

    list-style: none;
}

/* Remove any inherited list styling */
.provider-results-pagination .page-item {
    margin: 0;
    padding: 0;
    list-style: none;
}

/* Individual page buttons */
.provider-results-pagination .page-link {
    display: flex;
    align-items: center;
    justify-content: center;

    min-width: 34px;
    height: 34px;
    padding: 0 10px;

    background: #fff;
    border: 1px solid #ddd;

    color: #00a94f;
    font-size: 14px;
    line-height: 1;
    text-decoration: none;

    transition:
        background-color 0.15s ease,
        border-color 0.15s ease,
        color 0.15s ease;
}

/* Hover */
.provider-results-pagination .page-link:hover {
    background: #00a94f;
    border-color: #00a94f;
    color: #fff;
}

/* Current page */
.provider-results-pagination .page-item.active .page-link {
    background: #00a94f;
    border-color: #00a94f;
    color: #fff;
}

/* Disabled previous/next */
.provider-results-pagination .page-item.disabled .page-link {
    color: #999;
    background: #f5f5f5;
    cursor: default;
}

/* Prevent disabled button hover */
.provider-results-pagination .page-item.disabled .page-link:hover {
    color: #999;
    background: #f5f5f5;
    border-color: #ddd;
}

/* Responsive
   ========================================================================== */

@media (max-width: 700px) {

    .provider-search-result {
        gap: 20px;
    }

    .provider-search-result-photo {
        flex-basis: 150px;
    }

    .provider-search-result-photo img {
        width: 150px;
    }

}


@media (max-width: 500px) {

    .provider-search-result {
        flex-direction: column;
    }

    .provider-search-result-photo {
        flex-basis: auto;
    }

    .provider-search-result-photo img {
        width: 200px;
    }

    .provider-search-location-phone {
        display: block;
        margin-left: 0;
    }

}

/* ==========================================================================
   Find a Provider - Mobile
   ========================================================================== */

@media (max-width: 767px) {

    /*
     * Stack the three search fields
     */
    .provider-search-form {
        display: flex;
        flex-direction: column;
        gap: 20px;
    }

    .provider-search-field {
        width: 100%;
        flex: none;
    }

    .provider-search-field label {
        display: block;
        margin-bottom: 7px;
    }

    /*
     * Input/select + Go button
     */
    .provider-search-control {
        display: flex;
        width: 100%;
    }

    .provider-search-control input,
    .provider-search-control select {
        flex: 1 1 auto;
        width: 100%;
        min-width: 0;
    }

    .provider-search-control button {
        flex: 0 0 auto;
    }


    /*
     * Search Results / Clear Filters
     */
    .provider-search-results-header {
        position: static;
        margin-bottom: 28px;
    }

    .provider-search-results-title {
        margin: 0 0 15px;
    }

    .provider-clear-search {
        position: static;
        top: auto;
        right: auto;
        bottom: auto;
        left: auto;
        transform: none;

        display: inline-block;
    }
}
