/* remove when completed
.grid-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    background-size: 20px 20px;
    background-image: 
        linear-gradient(to right, rgba(255, 0, 0, 0.1) 2px, transparent 2px),
        linear-gradient(to bottom, rgba(255, 0, 0, 0.1) 2px, transparent 2px);
}
*/

.main-profile {
    visibility: hidden;
}

/* Show after data loads */
.main-profile.loaded {
    visibility: visible;
}

.profile-container {
    width: 100%;
}

.profile-layout {
    display: grid;
    grid-template-columns: 450px 1fr;
    gap: 30px;
    align-items: start;
}

/*Breadcrumbs */


.navigation-bar {
    max-width: 1200px;
    padding: 20px 40px;
    display: flex;
    align-items: center;
    gap: 24px;
    justify-content: space-between;
}

.back-button {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #60A699;
    text-decoration: none;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.2s;
}

.back-button:hover {
    background: #f0f8f6;
}

.back-icon {
    width: 20px;
    height: 20px;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.breadcrumb a {
    color: #60A699;
    text-decoration: none;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s;
}

.breadcrumb a:hover {
    background: #f0f8f6;
    color: #4d8a7e;
}

.breadcrumb .separator {
    color: #9CC5B8;
}

.breadcrumb .current {
    color: #043259;
    font-weight: 600;
}

.help-btn {
    padding: 6px 10px;
    border-radius: 5px;
    border: none;
    background: #DFF0FF;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: all 0.2s;
}


.help-btn:hover{
    transform: translateY(-2px);
    box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.25);
}


.help-btn img{
    width: 25px;
    height: 25px;
    aspect-ratio: 1/1;
}

.provider-actions {
    display: flex;
    gap: 12px;

}

.action-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: "Nunito Sans";
    border: 2px solid transparent;
}

.action-icon {
    width: 20px;
    height: 20px;
}

.share-btn {
    background: white;
    color: #043259;
}

.share-btn:hover {
    background: #f0f8f6;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(96, 166, 153, 0.3);
}


/* Sidebar Styles - Reviewed. Just not sure how to make it a little bit wider */
.sidebar {
    background-color: rgba(136, 170, 200, 0.51);
    margin-left: 60px;
    margin-top: 40px;
    margin-bottom: 40px;
    border-radius: 10px;
    padding: 25px;
    position: sticky;
    top: 120px;
    max-height: calc(100vh - px);
    width: 60%;
    overflow-y: auto;
    box-shadow: 0 4px 10px 0 rgba(0, 0, 0, 0.25);
}

/* Provider Card */
.provider-card {
    position: relative;
    width: 200px;
    height: 200px;
    margin: 0 auto 20px;
}

.provider-image {
    width: 70%;
    height: 70%;
    object-fit: cover;
    border-radius: 16px;
    margin: 0 auto 20px;
    border: 2px solid #036A6F;
    box-shadow: 0 8px 24px rgba(4, 50, 89, 0.12);
    background: linear-gradient(206deg, #FFF 4.06%, #CAE1DD 34.79%, #97C5BC 64.03%, #60A699 95.94%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    margin: 0 auto;
}

.provider-image img {
    width: 90%;
    height: 90%;
    object-fit: cover;
    border-radius: 20px;
    object-fit: contain;
}

/* Information Sections */
.info-section {
    margin-bottom: 25px;
    
}

.info-section h3 {
    font-size: 18px;
    font-weight: 700;
    color: #043259;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid rgba(96, 166, 153, 0.8);
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-size: 15px;
    padding: 5px 0;
}

.info-item .label {
    font-weight: 600;
    color: #043259;
}

.info-item .value {
    color: #666;
    font-weight: 500;
}

/* Availability, Languages, Insurance, etc. */
.availability-item {
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
}

.availability-item .day {
    color: #043259; 
    font-size: 15px;
    font-weight: 600;
}

.availability-item .value {
    color: #666;
    font-size: 15px;
    font-weight: 400;
}

.languages,
.insurance-list,
.affiliations,
.payment-methods {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.language,
.insurance,
.affiliation,
.payment {
    display: inline-block;
    background-color: #043259;
    color: white;
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
}

/* Provider Header in Main Content Area */
.provider-header {
    margin-top: 40px;
    padding-bottom: 10px;
    font-family: "Nunito Sans";
}

.name-verification-row {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 0px; 
}


.provider-name {
    font-size: 30px;
    font-weight: 600;
    color: #043259;
    font-family: "Nunito Sans";
    margin-bottom: 0;
    line-height: 1.1;
}

.provider-specialty {
    font-size: 26px;
    color: #036A6F;
    margin-bottom: 10px;
    margin-top: 10px;
    font-weight: 500;
    line-height: 1.1;
}

.provider-status {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #043259;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 10px;
    margin-top: 0px;
}


.verification-badge {
    display: flex;
    align-items: center;
    align-self: flex-end;
    margin-bottom: 4px;
    color: #036A6F;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;  /* Prevent wrapping */
}

/* Location Cards */
.locations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}  

.phone a {
    color: #60A699;
    cursor: pointer;
    text-decoration: none;
    font-weight: 600;
}

.phone a:hover {
    color: #043259;
    text-decoration: underline;
}

.icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
    margin-right: 4px;
    margin-left: 12px;
    vertical-align: middle;
}

.location-card {
    border: 2px solid #043259;
    border-radius: 10px;
    padding: 20px;
    transition: box-shadow 0.3s ease;
    background: rgba(176, 217, 205, 0.35);
    width: 362px;
    flex-shrink: 0;
    margin-bottom: 20px;
}

.location-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.location-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    margin-left: 16px;
    
}

.location-details .icon {
    margin-right: 12px;
    flex-shrink: 0; 
}

.location-header h3{
    color: #043259;
}

.get-directions-btn {
    border-radius: 5px;
    background: #043259;
    box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.25);
    color: white;
    font-size: 10px;
    font-weight: 600;
    display: flex;
    height: 24px;
    padding: 10px;
    justify-content: center;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;

}

.get-directions-btn:hover {
    background: #4D6F8C;
    box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.25);
}

.location-header h3 {
    font-size: 16px;
    font-weight: 600;
}

.location-details {
    margin-top: 16px;
}


.location-details p {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    font-size: 14px;
    color: #043259;
    line-height: 1.6;
}

/*MAP SECTION */
.map-section {
    margin-top: 40px;
    margin-bottom: 40px;
    margin-right: 60px;
}

.map-section h2 {
    font-size: 24px;
    font-weight: 600;
    color: #043259;
    margin-bottom: 20px;
    font-family: "Nunito Sans";
}

.map-container {
    width: 100%;
    height: 350px;
    border-radius: 10px;
    border: 2px solid #043259;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
}

.map-container iframe {
    width: 100%;
    height: 100%;
}

/*Review Section */

.reviews-section {
    margin-bottom: 30px;
}

.reviews-summary {
    display: grid;
    grid-template-columns: 450px 1fr;
    gap: 30px;
    margin-bottom: 10px;
    align-items: start;
} 

.summary-card {
    margin-left: 60px;
    border-radius: 10px;
    border: 2px solid #043259;
    background: rgba(176, 217, 205, 0.35);
    padding: 25px;
    display: flex;
    flex-direction: column;
    text-align: center;
    gap: 15px;
    width: 60%;
    max-height: 150px;

}


.star-icon {
    background-color: #043259;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.star-icon img {
    width: 50px;
    height: 50px;
}

.summary-content h3 {
    color: #043259;
    text-align: center;
    font-family: "Nunito Sans";
    font-size: 16px;
    font-weight: 400;
}

.summary-content p {
    color: #4D6F8C;
    font-family: "Nunito Sans";
    font-size: 12px;
    font-weight: 400;
}

.no-data-message {
    color: #999;
    font-size: 13px;
    font-style: italic;
    margin: 4px 0 0 0;
    padding: 4px 0;
}

/*RATING */
.ratings-details {
    background-color: rgba(176, 217, 205, 0.08);
    border: 2px solid #043259;
    border-radius: 10px;
    margin-right: 60px;
    padding: 0px 20px 8px 20px; /* top, right, bottom, left */

}

.ratings-details h3 {
    font-size: 18px;
    font-weight: 600;
    color: #043259;
    margin-left: 20px;
}


.rating-row {
    display: grid;
    grid-template-columns: 1fr auto auto;
    align-items: center;
    gap: 12px;
    padding: 6px 0;
    margin-left: 20px;
}

.ratings-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    column-gap: 80px;
    row-gap: 12px;
}

.rating-label {
    font-size: 15px;
    color: #043259;
    font-weight: 400;
    margin-right: 20px;
}

.rating-right {
    display: flex;
    align-items: center;
    gap: 12px; /* Space between stars and score */
}

.stars {
    color: #036A6F;
    font-size: 15px;
}

.rating-score {
    font-weight: 700;
    color: #043259;
    font-size: 18px;
    width: 40px;
    text-align: left;
}

.share-toast {
    position: fixed;
    bottom: -100px;
    left: 50%;
    transform: translateX(-50%);
    background: #4CAF50;
    color: white;
    padding: 16px 24px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    font-family: "Nunito Sans";
    font-weight: 600;
    font-size: 15px;
    z-index: 10000;
    transition: bottom 0.3s ease;
}

.share-toast.show {
    bottom: 30px;
}

/* ==========================================
   SHARE MODAL (Fallback)
   ========================================== */

.share-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.share-modal-content {
    background: white;
    border-radius: 16px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.share-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #D5EDE7;
}

.share-modal-header h3 {
    margin: 0;
    color: #043259;
    font-size: 20px;
    font-family: "Nunito Sans";
}

.close-modal {
    background: none;
    border: none;
    font-size: 32px;
    color: #5a7184;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s;
}

.close-modal:hover {
    background: #f0f8f6;
    color: #043259;
}

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

.share-modal-body p {
    margin: 0 0 12px 0;
    color: #043259;
    font-weight: 600;
}

.share-url-container {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
}

.share-url-input {
    flex: 1;
    padding: 12px;
    border: 2px solid #D5EDE7;
    border-radius: 8px;
    font-size: 14px;
    font-family: monospace;
    color: #043259;
}

.copy-btn {
    padding: 12px 20px;
    background: #60A699;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.copy-btn:hover {
    background: #4d8a7e;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(96, 166, 153, 0.3);
}

.share-social {
    border-top: 1px solid #D5EDE7;
    padding-top: 20px;
}

.share-social p {
    margin-bottom: 16px;
}

.social-share-btn {
    display: inline-block;
    padding: 10px 20px;
    margin: 4px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s;
}

.social-share-btn.facebook {
    background: #1877F2;
    color: white;
}

.social-share-btn.facebook:hover {
    background: #145dbf;
}

.social-share-btn.whatsapp {
    background: #25D366;
    color: white;
}

.social-share-btn.whatsapp:hover {
    background: #1da851;
}

.social-share-btn.email {
    background: #043259;
    color: white;
}

.social-share-btn.email:hover {
    background: #032340;
}

/* Mobile adjustments */
@media (max-width: 640px) {
    .share-modal-content {
        width: 95%;
        margin: 20px;
    }
    
    .share-url-container {
        flex-direction: column;
    }
    
    .copy-btn {
        width: 100%;
    }
    
    .social-share-btn {
        display: block;
        width: 100%;
        text-align: center;
        margin: 8px 0;
    }
}

/* ==========================================
   TABLET (max-width: 1024px)
   ========================================== */
@media (max-width: 1024px) {

    .profile-layout {
        grid-template-columns: 260px 1fr;
        gap: 16px;
    }

    .sidebar {
        margin-left: 16px;
        margin-top: 20px;
        margin-bottom: 20px;
        width: auto;
        padding: 16px;
    }

    .provider-card {
        width: 120px;
        height: 120px;
    }

    .provider-image {
        width: 70%;
        height: 70%;
    }


    .content-area {
        padding-right: 16px;
    }

    .provider-header {
        margin-top: 20px;
    }

    .provider-name {
        font-size: 22px;
    }

    .provider-specialty {
        font-size: 20px;
    }

    .location-card {
        width: 90%;
    }

    .map-section {
        margin-right: 16px;
        margin-top: 20px;
    }

    .map-container {
        height: 280px;
    }

    .navigation-bar {
        padding: 12px 16px;
        gap: 12px;
    }

    .breadcrumb {
        font-size: 12px;
    }
}

/* ==========================================
   MOBILE (max-width: 768px)
   ========================================== */
@media (max-width: 768px) {

    /* Switch to single column, reorder via order property */
    .profile-layout {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .locations-grid {
        display: flex;
        justify-content: center;
    }   

    /* ORDER 1: Content area (name, badges, location) comes first */
    .content-area {
        order: 1;
        padding: 0 16px;
    }

    /* ORDER 2: Sidebar comes second */
    .sidebar {
        order: 2;
        margin: 0 auto 20px auto;
        width: 80%;
        position: static;
        top: auto;
        max-height: none;
        padding: 16px;
    }

    /* Map section is INSIDE content-area so it naturally comes 
       after location card - move it after sidebar using margin trick */
    .map-section {
        order: 3;
        margin: 0 16px 20px 16px;
    }

    /* Provider header */
    .provider-header {
        margin-top: 16px;
        padding-left: 8px;
    }

    /* Name + verification badge stack */
    .name-verification-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
        margin: 0 12px 8px 12px;
    }

    .provider-name {
        font-size: 16px;
        line-height: 1.2;
    }

    .provider-specialty {
        font-size: 14px;
        margin-top: 4px;
        margin: 0 12px 8px 12px;
    }

    /* Location card full width */
    .location-card {
        width: 90%;
        box-sizing: border-box;
        padding: 12px;
    }

    .location-header {
        margin-left: 0;      /* remove left indent */
        margin-bottom: 4px;
    }

    .location-header h3 {
        font-size: 13px;
    }

    .get-directions-btn {
        font-size: 9px;
        padding: 6px 8px;
        height: 22px;
    }

    .location-details {
        margin-top: 8px;     /* tighter */
    }

    .location-details p {
        font-size: 12px;
        margin-bottom: 8px;  /* reduced spacing between rows */
    }

    .icon {
        width: 16px;
        height: 16px;
        margin-left: 4px;
        margin-right: 8px;
    }

    /* Shrink doctor image significantly */
    .provider-card {
        width: 120px;
        height: 120px;
        margin: 0 auto 12px;
    }


    /* Map */
    .map-container {
        height: 220px;
        margin-bottom: 40px;
    }
    
    .map-section h2 {
        font-size: 16px;
    }

    .provider-image {
        width: 70%;
        height: 70%;
    }

    /* Navigation bar */
    .navigation-bar {
        padding: 10px 16px;
        gap: 6px;
        justify-content: space-between;
    }

    /* Breadcrumb - wrap cleanly */
    .breadcrumb {
        display: none;
    }

    .verification-badge {
        font-size: 12px;
        align-self: flex-start; 
    }

    .verification-badge img {
        width: 12px;
        height: 12px;
    }

    .provider-status {
        font-size: 12px;
        gap: 5px;
    }

    .provider-status img {
        width: 12px;
        height: 12px;
    }


    .back-button {
        padding: 6px 10px;
        font-size: 13px;
    }

    /* Share button - icon only on mobile */
    .share-btn span:last-child {
        display: none;
    }

    .action-btn {
        padding: 6px 10px;
    }

    /* Sidebar sections slightly smaller text */
    .info-section h3 {
        font-size: 14px;
    }


    .info-item,
    .availability-item .day,
    .availability-item .value {
        font-size: 12px;
    }
}

/* ==========================================
   SMALL MOBILE (max-width: 480px)
   ========================================== */
@media (max-width: 480px) {

    .provider-name {
        font-size: 16px;
    }

    .provider-specialty {
        font-size: 14px;
    }

    .sidebar {
        margin: 0 auto 16px auto;
        width: 80%;
        padding: 14px;
    }

    .map-section {
        margin: 0 12px 16px 12px;
    }

    .map-container {
        height: 200px;
    }

    .content-area {
        padding: 0 12px;
    }

    .provider-card {
        width: 100px;
        height: 100px;
    }

    /* Ratings grid single column */
    .ratings-grid {
        grid-template-columns: 1fr;
        column-gap: 0;
    }

    /* Location details smaller */
    .location-details p {
        font-size: 13px;
    }

    .get-directions-btn {
        font-size: 9px;
        padding: 8px;
    }
}