.subject-filter {
    background-color: var(--background-color);
    padding: 20px;
    box-shadow: 20px 20px 38px rgba(70, 62, 221, 0.2);
    width: 80%;
    max-width: 1120px;
}

#featured-tutors {
    display: flex;
    flex-direction: column;
    align-items: center;
}

#tutor-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center; 
    max-width: 1200px;
}

#tutor-grid .tutor {
    position: relative; /* Ensure proper placement of the overlay */
    width: 250px;
    height: 500px;
    padding: 10px;
    margin: 20px;
    box-sizing: border-box;
    border: 1px solid #ccc;
    border-radius: 30px;
    box-shadow: 20px 20px 38px rgba(70, 62, 221, 0.2);
    background-color: white;
}

#tutor-grid .tutor:hover {
    box-shadow: 20px 20px 38px rgba(70, 62, 221, 0.3);
}

.pfp-large {
    width: 230px;
    height: 230px;
    border-radius: 20px;
    display: block;
    margin-bottom: 10px;
    margin-left: auto;
    margin-right: auto;
    object-fit: cover;
}

.tutor-name {
    margin-bottom: 0;
    text-align: center;
}

.tutor-info {
    height: 200px;
    overflow: scroll;
}

/* Scrollbar styling */
.tutor-info::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.tutor-info::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.row {
    justify-content: center;
}

.col-md-6 {
    padding-top: 20px;
}

.filter-title {
    padding-top: 15px;
}

.tutor-card-link {
    text-decoration: none !important; /* Remove underline */
    color: inherit !important; /* Inherit color */
}

.tutor {
    transition: transform 0.3s ease; /* Smooth transition for scaling */
}


.tutor-card-link:hover {
    opacity: 0.90; /* Optional: apply a hover effect to the whole card */
}

/* Tooltip text styling */
.tooltip-text {
    position: fixed;
    bottom: 10px; /* Adjust as needed */
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.7); /* Dark background for text */
    color: #fff; /* White text */
    padding: 8px;
    border-radius: 5px;
    font-size: 14px;
    display: none; /* Hidden by default */
    white-space: nowrap;
}

/* Show the tooltip when hovering */
.tutor-card-link:hover .tooltip-text {
    display: block;
}

.tag {
    display: inline-block;
    background-color: #f3f3f3;
    color: #333;
    padding: 2px 5px 2px 2px;
    margin: 2px;
    border-radius: 2px;
    white-space: nowrap;
    font-size: 12px;
}

.atar-div {
    text-align: center;
    font-size: 13px;
    font-weight: 600;
}

/* Banner overlaying the profile picture */
.match-distance-banner {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.352);
    color: white;
    padding: 5px 10px;
    font-size: 14px;
    font-weight: bold;
    border-radius: 15px;
    text-align: center;
    max-width: 80%;
    white-space: nowrap;
}

.tutor-unavailable-overlay {
    position: absolute;
    inset: 0; /* top:0 right:0 bottom:0 left:0 */
    background: rgba(0, 0, 0, 0.262);
    border-radius: 30px; /* match card radius */
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-bottom: 80px;
}

.tutor-unavailable-text {
    color: red;
    font-weight: 800;
    font-size: 26px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    padding: 10px 14px;
    border: 2px solid rgba(255, 59, 59, 0.6);
    border-radius: 14px;
    background: rgba(0, 0, 0, 0.577);
}

.tutor-card-link:hover .tutor:not(:has(.tutor-unavailable-overlay)) {
    transform: scale(1.05);
}

/* Spots-left badge in top-right */
.spots-left-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 6; /* above image + overlays */
    background: rgba(0, 0, 0, 0.72);
    color: #fff;
    font-weight: 700;
    font-size: 12px;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(6px);
    line-height: 1;
    display: flex;
    align-items: center;
    gap: 6px;
}

.spots-left-badge .num {
    font-size: 13px;
    font-weight: 800;
}

/* Optional: colour cue when low/none */
.spots-left-badge[data-spots="0"] {
    background: rgba(255, 59, 59, 0.85);
    border-color: rgba(255, 255, 255, 0.35);
}

.spots-left-badge[data-low="true"] {
    background: rgba(255, 149, 0, 0.85);
    border-color: rgba(255, 255, 255, 0.35);
}