/* ========================================
   CLINIC PROFILE CARD V2 STYLES
   ======================================== */

/* Hero Section */
.clinic-hero {
    position: relative;
    width: 100%;
    min-height: 400px;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.clinic-hero__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--navy);
    opacity: 0.75;
}

.clinic-hero__content {
    position: relative;
    z-index: 1;
    text-align: center;
    color: white;
    padding: 70px 50px;
}

.clinic-hero__avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 4px solid white;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
    margin-bottom: 1rem;
    object-fit: cover;
}

.clinic-hero__name {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: white;
}

.clinic-hero__badges {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

/* Wrapper */
.clinic-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 70px 50px;
}

/* Info Bar (3 equal columns) */
.clinic-infobar {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 30px;
}

.clinic-infobar__item {
    background: var(--blue-grey);
    padding: 30px;
}

.card__content h3,
.clinic-infobar__item h3 {
    margin-bottom: 15px;
    font-size: 20px !important;
}

.clinic-infobar__item p {
    margin: 0 0 10px;
    color: var(--text);
    display: inline-flex;
    gap: 5px;
    overflow-wrap: anywhere;
}

.clinic-infobar__item svg {
    width: 20px;
    height: 20px;
    flex: none;
}

.clinic-infobar__item p:last-of-type {
    margin-bottom: 0 !important;
}

.tag {
    display: inline-block;
    background: var(--aqua);
    color: white;
    padding: 0.4rem 0.8rem;
    margin: 0.2rem;
    font-size: 0.9rem;
}

/* Main Layout Grid (60/40 split) */
.clinic-layout {
    display: grid;
    grid-template-columns: 60fr 40fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.clinic-layout__left,
.clinic-layout__right {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Card Styles */
.card {
    background: var(--blue-grey);
    padding: 30px;
}

.card__header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    /*border-bottom: 1px solid white;*/
    padding-bottom: 15px;
    /*margin-bottom: 15px;*/
}

.card__title {
    font-size: 20px !important;
    color: var(--navy);
    margin: 0;
    font-weight: 700;
}

.card__body {
    color: var(--text);
}

.card__body p {
    margin: 0.5rem 0;
    line-height: 1.6;
}

.card__body ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.card__body ul li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.card__body ul li svg {
    fill: var(--orange);
    flex-shrink: 0;
}

.card--badges .card__body {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    column-gap: 15px;
    row-gap: 5px;
}

/* Badge Styles */
.badge {
    display: inline;
    background: var(--aqua);
    color: white;
    padding: 10px 20px;
    font-size: 14px;
    line-height: 1em;
}

.badge-premier {
    display: inline;
    background: var(--orange);
    color: white;
    padding: 10px 20px;
    font-size: 14px;
    line-height: 1em;
}

/* Clinic Profile Badge Images */
.clinic-profile-badges {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.clinic-profile-badges img {
    height: 40px;
    width: auto;
}

/* Button Styles */
.btn {
    padding: 16px 30px;
    border: none;
    border-radius: 25px;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    line-height: 1em;
}

.btn--primary {
    background: var(--orange);
    color: white;
}

.btn--primary:hover {
    background: var(--dark-orange);
}

/* Service Detail Cards */
.clinic-services-detail {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.card--service-detail {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
    align-items: start;
}

.card--service-detail .card__content {
    grid-column: 1;
}

.card--service-detail .card__media {
    grid-column: 2;
}

.card--service-detail .card__media img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

.card__content div > ul:last-of-type {
    margin-bottom: 0 !important;
}

/* Service card with no image */
.card--service-detail.no-image {
    grid-template-columns: 1fr;
}

.card--service-detail.no-image .card__content {
    grid-column: 1;
}

/* Map Container */
.card--map #map-container {
    height: 250px;
    border-radius: 6px;
    overflow: hidden;
}

/* Responsive Breakpoints */
@media (max-width: 1000px) {
    .clinic-infobar {
        grid-template-columns: repeat(2, 1fr);
    }

    .clinic-infobar .clinic-infobar__item:last-of-type {
        grid-column: span 2;
    }

    .clinic-layout {
        grid-template-columns: 1fr;
    }

    .card--service-detail {
        grid-template-columns: 1fr;
    }

    .card--service-detail .card__media {
        grid-column: 1;
        order: -1; /* Image above text */
    }
}

@media (max-width: 690px) {
    .clinic-hero {
        min-height: 300px;
    }

    .clinic-hero__avatar {
        width: 90px;
        height: 90px;
    }

    .clinic-hero__content,
    .clinic-wrapper {
        padding: 50px 30px;
    }
    .clinic-infobar__item,
    .card {
        padding: 20px;
    }

    .clinic-layout__right {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: space-between;
    }

    .clinic-layout__right .card:not(.card--map) {
        width: calc(50% - 15px);
    }

    .clinic-layout__right .card--map {
        width: 100%;
    }
}

@media(max-width: 480px) {
    .clinic-infobar {
        grid-template-columns: 1fr;
    }

    .clinic-infobar .clinic-infobar__item:last-of-type {
        grid-column: span 1;
    }

    .clinic-layout__right .card {
        width: 100% !important;
    }
}

/* Hours Pre-formatted Text Styling */
.card--hours pre {
    background: unset !important;
    padding: 0 !important;
    font-size: 16px !important;
    line-height: 1.7em !important;
    white-space: pre-wrap;
    font-family: inherit;
    margin: 0;
}

/* Custom Posts Styling */
.custom-post {
    margin-bottom: 1rem;
}

.custom-post h4 {
    margin: .2rem 0;
}

/* Modal Button Styling */
.open-modal-btn {
    margin-top: 5px;
    background-color: var(--navy);
    color: #fff;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
}

/* Modal Styles (for consultation form) */
.modal-overlay {
    position: fixed;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(0,0,0,0.6);
    display: none;
    z-index: 9999 !important;
    justify-content: center;
    align-items: center;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background: #fff;
    padding: 2rem;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    position: relative;
}

.modal-content h2 {
    margin-top: 0;
    margin-bottom: 1.5rem;
    color: #333;
}

.modal-content form input[type="text"],
.modal-content form input[type="email"],
.modal-content form textarea {
    width: 100%;
    padding: 0.75rem;
    margin-bottom: 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.modal-content form textarea {
    min-height: 100px;
    resize: vertical;
}

.modal-content form label {
    display: block;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    line-height: 1.4;
}

.modal-content form label input[type="checkbox"] {
    margin-right: 0.5rem;
}

.modal-content form button[type="submit"] {
    width: 100%;
    padding: 1rem;
    background: var(--orange);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    text-transform: uppercase;
}

.modal-content form button[type="submit"]:hover {
    background: var(--dark-orange);
}

.close-modal {
    position: absolute;
    top: 0.5rem;
    right: 1rem;
    font-size: 1.5rem;
    cursor: pointer;
    color: #999;
}

.close-modal:hover {
    color: #333;
}

/* ========================================
   BuddyBoss Profile Page Clinic View Overrides
   ======================================== */

.bb-profile-clinic .clinic-wrapper {
    padding: 0;
}

.bb-profile-clinic .card,
.bb-profile-clinic .clinic-infobar__item {
    padding: 20px;
}

body.buddypress .buddypress-wrap .bb-profile-clinic h3 {
    font-size: 18px !important;
    margin-bottom: 0 !important;
}

.bb-profile-clinic .card__header {
    padding-bottom: 5px;
}

.clinic-profile-cta .btn:hover {
    background: var(--dark-orange);
    color: white;
}

@media(max-width: 1000px) {
    .bb-profile-clinic .clinic-layout {
        grid-template-columns: 60fr 40fr;
    }
}


@media(max-width: 690px) {
    .bb-profile-clinic .clinic-layout {
        grid-template-columns: 1fr;
    }

    .bb-profile-clinic .card {
        width: 100% !important;
    }
}