.speakers-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

.speaker-card {
    background-color: #fff;
    padding: 20px;
    border-radius: 15px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
    cursor: pointer;
    min-height: 340px;
}

.speaker-card:hover {
    transform: translateY(-5px);
}

.speaker-card img {
    width: 180px;
    height: 240px;
    border-radius: 10%;
    object-fit: cover;
    object-position: center 15%;
    border: 0.1px solid var(--primary_color);
}

.speaker-card h3 {
    font-size: 20px;
    font-weight: bold;
    margin-top: 10px;
    color: #333;
}

.speaker-card p {
    font-size: 16px;
    color: #555;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 10px;
    min-height: 30px;
    align-items: center;
}

.social-icon {
    color: #333;
    font-size: 18px;
    text-decoration: none;
    transition: color 0.3s ease-in-out;
}

.social-icon:hover {
    color: var(--primary_color);
}

.social-links:empty {
    visibility: hidden;
}

.position {
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 16px;
    font-weight: 500;
    color: #555;
    overflow: hidden;
    word-wrap: break-word;
}

.btt {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--primary_color);
    color: white;
    padding: 12px 16px;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: background 0.3s ease-in-out;
}

.btt:hover {
    background: var(--hover_color);
}

/* ---- STYLES FOR MODAL ---- */
.team-modal .modal-dialog.modal-custom-size {
    width: 90%; /* Use percentage for better responsiveness */
    max-width: 700px; /* Max width for larger screens, adjust as needed */
    margin-left: auto;
    margin-right: auto;
    max-height: 85vh; /* Crucial: Dialog itself won't exceed 85% of viewport height */
}

.team-modal .modal-content {
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    height: 100%; /* Allows content to fill the max-height of the dialog if modal-dialog-scrollable is used */
    /* Bootstrap's modal-dialog-scrollable will manage internal flex heights effectively */
    display: flex; /* Added to ensure content flexes correctly with scrollable body */
    flex-direction: column; /* Ensures header, body, footer stack vertically */
}

.team-modal .modal-header {
    flex-shrink: 0; /* Prevents header from shrinking if body content is large */
}

.team-modal .modal-body {
    padding: 20px;
    /* overflow-y: auto; -- This is automatically handled by modal-dialog-scrollable */
    text-align: center;
    flex-grow: 1; /* Allows body to take up available space and become scrollable */
}

.team-modal .modal-image {
    max-width: 150px;
    height: auto;
    border-radius: 10%;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 15px;
}

.team-modal .modal-body h3 {
    font-size: 1.5em;
    margin-bottom: 5px;
    font-weight: bold;
}

.team-modal .modal-body .position {
    font-style: italic;
    color: #666;
    margin-bottom: 10px;
    font-size: 1.1em;
}

.team-modal .modal-body .description {
    line-height: 1.5;
    margin-bottom: 15px;
    font-size: 1em;
    text-align: left;
}

.team-modal .social-links .btn {
    margin-right: 5px;
}
/* ---- END STYLES FOR MODAL ---- */
