.learn-best-section {
    text-align: center;
    padding-bottom: 0;
}

.learn-best-section h1 {
    font-weight: 600;
    font-size: 3.75rem; /* 60px */
    line-height: 100%;
    color: #0e0e0e;
    margin-bottom: 30px;
}

.learn-best-section h2 {
    font-weight: 600;
    line-height: 100%;
    color: #0e0e0e;
}

.learn-best-section p {
    color: #0e0e0e;
    margin-bottom: 40px;
}

.learn-best-section .search-field {
    width: 100%;
    max-width: 600px;
    height: 65px;
    background-color: #ffffff;
    border: 0.85px solid #c9dbfe;
    border-radius: 50px;
    display: flex;
    align-items: center;
    padding: 0 20px;
    /* box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1); */
}

.learn-best-section .search-button {
    width: 100%;
    max-width: 600px;
    height: 65px;
    border-radius: 50px;
    padding: 0 20px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.learn-best-section .search-field img {
    margin-right: 10px;
}

.learn-best-section .search-field input {
    width: 100%;
    border: none;
    outline: none;
    font-family: 'Poppins', sans-serif;
    font-weight: 400;
    font-size: 16.88px;
    color: #969696;
    background-color: transparent;
}
.learn-best-section .search-field input::placeholder {
    font-size: 13px;
}

.learn-best-section .reset-button {
    font-size: 30px;
    color: black;
}
.learn-best-section .reset-button:hover {
    color: #0040c3;
}

/* .coaches-section {
    padding: 50px 0;
} */

.coach-card {
    background: #ffffff;
    border-radius: 10px;
    border: 2px solid #0040c3;
    padding: 20px 15px;
    text-align: center;
    max-width: 285px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 476px;
    position: relative;
    padding-top: 45px; /* Add space at top for qualified badge */
}
.coach-card .image {
    width: 120px; /* Fixed width */
    height: 120px; /* Fixed height to maintain perfect circle */
    object-fit: cover; /* Ensures image fills the space properly */
    border-radius: 50%;
    margin: 15px auto;
    display: block;
    border: 2px solid #3766C5; /* Optional: adds a border around the image */
}

.qualified-coach,
.contact-now {
    display: inline-block;
    background-color: #f7bf2e;
    color: #0040c3;
    font-weight: 500;
    font-size: 13px;
    line-height: 19.5px;
    padding: 4.5px 10px;
    border-radius: 2px;
    /* margin-right: 10px; */
    text-decoration: none;
}

.qualified-coach {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
}

/* Qualified coach badge in modal header */
.modal-header .qualified-coach {
    position: static;
    transform: none;
    margin: 0 auto;
}

.modal-header {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    padding: 1rem;
    border-bottom: 0px !important;
}

.modal-header .btn-close {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    margin: 0;
}

/* Add placeholder for when qualified badge is hidden */
.qualified-coach.d-none {
    visibility: hidden;
    display: block !important;
    height: 28px; /* Match height of badge */
}

.contact-now {
    background-color: #0040c3;
    color: #FFFFFF;
    font-size: 20px;
    padding: 8px 15px;
    border-radius: 5px;
}

.contact-now:hover {
    background-color: #003399;
    color: #FFFFFF;
    text-decoration: none;
}

.coach-name {
    font-weight: 500;
    font-size: 20px;
    line-height: 30px;
    color: #0e0e0e;
}

.coach-info {
    font-weight: 400;
    font-size: 16px;
    line-height: 24px;
    color: #000;
    margin-top: 10px;
    margin-bottom: 10px;
    text-align: start;
}

.cec-status {
    display: inline-block;
    background: #defff5;
    border-radius: 5px;
    padding: 4px 5px;
    font-weight: 500;
    font-size: 14px;
    color: #2db98f;
}

.view-profile-btn {
    display: inline-block;
    margin-top: 20px;
    padding: 5px 15px;
    border: 1px solid #0040c3;
    border-radius: 5px;
    font-weight: 500;
    font-size: 20px;
    line-height: 30px;
    color: #0040c3;
    text-decoration: none;
    transition: all 0.3s ease;
    min-width: 178px;
    cursor: pointer;
}

.view-profile-btn:hover {
    background-color: #0040c3;
    color: #ffffff;
}

.coach-location-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
}

.coach-location-item {
    display: flex;
    align-items: center;
    flex-direction: column;
    gap: 10px;
    white-space: normal; 
    height: 5rem; 
    text-align: center;
    width: 100px;
    cursor: pointer;
}

.coach-contact-link{
    cursor: pointer;
    white-space: normal;
}

.coach-info-row {
    margin-top: 20px;
}

.flex-grow {
    flex-grow: 1;
}

/* Contact Coach Section */
.form-container {
    display: none;
    background-color: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
}

.form-content {
    background-color: #ffffff;
    border: 1px solid #eaeaea;
    border-radius: 10px;
    padding: 40px;
    width: 100%;
    max-width: 800px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
    max-height: 90vh;
}

.form-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.form-header h1 {
    font-weight: 500;
    font-size: 25px;
    color: #0e0e0e;
    margin: 0;
}

.close-btn {
    width: 26px;
    height: 26px;
    cursor: pointer;
}

.form-group label {
    font-weight: 500;
    font-size: 16px;
    color: #505050;
    margin-bottom: 5px;
}

.form-control {
    padding: 13px 18px;
    border: 1px solid #eaeaea;
    border-radius: 10px;
}

.form-control::placeholder {
    color: #9a9a9a;
    font-weight: 400;
    font-size: 13px;
}

.form-select {
    padding: 13px 18px;
    border: 1px solid #eaeaea;
    border-radius: 10px;
    color: #9a9a9a;
    font-weight: 400;
    font-size: 13px;
}

.submit-btn {
    width: 108px;
    height: 40px;
    background-color: #0040c3;
    color: #ffffff;
    border: none;
    border-radius: 5px;
    font-weight: 500;
    font-size: 16px;
    text-align: center;
    cursor: pointer;
    margin-top: 20px;
}

.pagination .page-link {
    font-size: 14px;
    box-shadow: none;
    color: #0040c3;
}

.active>.page-link, .page-link.active {
    background-color: #0040c3; 
    color: #ffffff; 
}

/* Profile Section */
.profile-content {
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

/* General coach image styles */
.coach-image {
    width: 100%;
    max-width: 300px; 
    height: 400px;
    object-fit: cover;
}

/* Styles for the coach image in the "View Profile" pop-up */
.view-profile-popup .coach-image {
    border-radius: 0; /* Remove rounded border */
    max-width: 100%; /* Ensure the image takes the full width of its container */
    margin: 0; /* Remove margin */
}

.close-icon {
    position: absolute;
    top: 11px;
    right: 11px;
    cursor: pointer;
    width: 24px;
    height: 24px;
}

.qr-code {
    position: static;
    width: 120px;
    height: 120px;
}

.qr-section {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    /* padding-top: 40px; */
}

.no-data {
    font-size: 30px;
    text-align: center;
    margin-bottom: 50px;
    font-weight: 500;
    color: #b85656;
}

.details-content {
    flex: 1;
    padding-left: 20px;
    display: flex;
    flex-direction: column;
}

.highlight {
    color: #1A9CFC;
}

.interest-btn {
    border: 1px solid #6f6d6dff;
    border-radius: 5px;
    padding: 6px 12px;
    margin-right: 5px;
    margin-bottom: 5px;
    font-size: 14px;
    color: #6f6d6dff;
}

.intro-paragraph {
    /* border: 1px solid rgba(146, 146, 157, 0.39);
    padding: 10px; */
    border-radius: 5px;
    width: 100%;
}

.bottom-section {
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
}
.side-section {
    display: flex;
    justify-content: center;
    padding: 0;
}

/* Fix for modal shifting issues - CSS only solution */
body.modal-open {
    overflow: auto !important;
    padding-right: 0 !important;
    width: 100% !important;
}


.modal-backdrop {
    width: 100vw !important;
    height: 100vh !important;
}

/* Ensure modal content doesn't cause overflow issues */
.modal-content {
    max-height: 90vh;
    overflow-y: auto;
}

/* Keep scrollbar visibility consistent */
html {
    overflow-y: scroll !important;
}

/* Force modal to take correct dimensions */
.modal {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* Ensure modals stack correctly */
.modal-dialog {
    margin: 1.75rem auto !important;
}

@media (max-width: 991.98px) {
    .learn-best-section {
        padding-top: 50px;
    }

    .learn-best-section h1 {
        font-size: 2.5rem; /* 40px */
    }

    .learn-best-section h2 {
        font-size: 1.75rem; /* 28px */
    }

    .learn-best-section p {
        font-size: 17px;
        margin-bottom: 30px;
    }

    .learn-best-section .search-field {
        height: 55px;
    }

    .learn-best-section .search-button {
        height: 55px;
    }

    .learn-best-section .search-field input {
        font-size: 0.875rem; /* 14px */
    }

    .coach-card {
        max-width: 100%;
    }

    .profile-content {
        flex-direction: column;
        /* align-items: center; */
    }

    .coach-image {
        max-width: 250px; /* Adjust the maximum width for medium screens */
        width: 100%;
        height: auto;
        margin-bottom: 20px;
    }

    .details-content {
        padding-left: 0;
    }

    .qr-code {
        position: static;
        width: 80px;
        height: 80px;
        margin-bottom: 20px;
    }
}

@media (max-width: 767.98px) {
    .learn-best-section {
        padding-top: 30px;
    }

    .learn-best-section h1 {
      font-size: 2rem; /* 32px */
    }

    .learn-best-section h2 {
        font-size: 1.5rem; /* 24px */
    }

    .learn-best-section p {
        font-size: 15px;
        margin-bottom: 20px;
    }

    .learn-best-section .search-field {
        height: 45px;
    }

    .learn-best-section .search-button {
        height: 45px;
    }

    .learn-best-section .search-field input {
        font-size: 0.75rem; /* 12px */
    } 

    .coach-image {
        max-width: 200px; /* Adjust the maximum width for small screens */
        width: 100%;
        height: auto;
        margin-bottom: 20px;
    }

    /* Make modal full width on mobile */
    .modal-dialog.modal-lg,
    .modal-dialog.modal-xl {
        max-width: 100% !important;
        margin: 0.5rem;
    }

    /* Adjust modal content padding */
    .modal-content {
        padding: 1rem;
    }

    /* Adjust form fields spacing */
    .form-group {
        margin-bottom: 1rem;
    }

    /* Make submit button full width */
    .submit-btn {
        width: 100%;
    }

    /* Adjust form field font sizes */
    .form-control,
    .form-select {
        font-size: 14px;
        padding: 10px 15px;
    }

    /* Adjust labels */
    .form-group label {
        font-size: 14px;
    }

    /* Adjust modal title */
    .modal-title {
        font-size: 18px;
    }

    /* Profile content adjustments */
    .profile-content {
        flex-direction: column;
        padding: 15px;
    }

    /* Side section with image adjustments */
    .side-section {
        width: 100%;
        margin-right: 0;
        margin-bottom: 20px;
        align-items: flex-start; /* Align items to the left */
    }

    /* Coach image adjustments */
    .coach-image {
        max-width: 200px;
        width: 100%;
        height: auto;
        margin: 0 0 15px 0; /* Remove center margin, add bottom margin */
        align-self: flex-start; /* Align image to the left */
    }

    /* Details content adjustments */
    .details-content {
        padding-left: 0;
        width: 100%;
    }

    .qr-section {
        padding-top: 20px;
        order: 2;
    }

    .details-content {
        order: 3;
    }

    .side-section {
        order: 1;
    }
}
/* Ensure "Contact Coach Now" and "Qualified Coach" appear in one line for small, medium, and large devices */
@media (max-width: 991.98px) {
    .qualified-coach,
    .contact-now {
        display: inline-block;
        margin-right: 10px;
    }
}

/* Center the "Search for courses" section for laptop sizes */
@media (min-width: 1024px) and (max-width: 1440px) {
    .learn-best-section .search-field {
        margin: 0 auto;
    }
}
/* Ensure "Be the Best" comes in one line on large mobile devices */
@media (max-width: 767.98px) {
    .learn-best-section h1 {
        font-size: 2rem; /* Adjust font size to fit in one line */
    }
}

/* Center the "Search for courses" section on tablets */
@media (min-width: 768px) and (max-width: 1023.98px) {
    .learn-best-section .search-field {
        margin: 0 auto;
    }
}

/* Center the "Search for courses" section for screens with a width of 1440px */
@media (min-width: 1440px) {
    .learn-best-section .search-field {
        margin: 0 auto;
    }
}

/* Ensure "Be the Best" comes in one line on laptops with a width of 1024px */
@media (min-width: 1024px) and (max-width: 1439.98px) {
    .learn-best-section h1 {
        font-size: 2.5rem; /* Adjust font size to fit in one line */
    }
}

/* .contact-button-section {
    margin-top: 20px;
} */

.contact-button-section {
    margin-top: 20px;
    width: 100%;
}

.contact-button-section .contact-now {
    min-width: 200px;
    max-width: 300px;
    width: auto;
    border: none;
    cursor: pointer;
    padding: 10px 20px;
    font-size: 18px;
}

@media (max-width: 991.98px) {
    .contact-button-section .contact-now {
        width: 80%;
        max-width: 250px;
        font-size: 16px;
        padding: 8px 15px;
    }
}

@media (max-width: 767.98px) {
    .contact-button-section {
        margin-top: 15px;
    }
    
    .contact-button-section .contact-now {
        width: 90%;
        max-width: 200px;
        font-size: 14px;
        padding: 8px 12px;
    }
}

/* Update media query for tablets */
@media (min-width: 768px) and (max-width: 991.98px) {
    .profile-content .row {
        flex-direction: column;
    }

    .side-section {
        margin-bottom: 30px;
        width: 100%;
        display: flex;
        justify-content: center;
        order: 1;
    }

    .details-content {
        padding: 0;
        order: 3;
    }

    .qr-section {
        padding-top: 0;
        margin-bottom: 20px;
        order: 2;
    }

    .qr-code {
        width: 100px;  /* Reduced from 150px */
        height: 100px; /* Reduced from 150px */
    }

    /* Ensure contact button stays at bottom */
    .contact-button-section {
        order: 4;
    }
}

/* Add specific tablet layout adjustments */
@media (min-width: 992px) and (max-width: 1199.98px) {
    .coach-image {
        width: 100%;
        height: 380px;
        object-fit: cover;
    }

    .side-section {
        padding: 0 10px;
    }

    .details-content {
        padding-left: 15px;
        padding-right: 15px;
    }
}

/* Specific fix for 1024px screens */
@media screen and (width: 1024px) {
    .coach-card {
        padding-top: 60px; /* Increase top padding to prevent overlap */
    }
    
    .qualified-coach {
        top: 15px; /* Adjust top position */
        width: auto;
        min-width: 120px;
        text-align: center;
    }
}
