.speakers-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    /* gap: 20px; */ /* Bootstrap row handles gap better with columns */
}

.speaker-card {
    background-color: #fff;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.1);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 5px;
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out, background 0.3s, color 0.3s;
    cursor: pointer;
    color: #333;
    min-height: 400px;
    height: 100%;
}

@media (max-width: 768px) {
    .speaker-card {
        min-height: auto;
        padding: 15px;
    }
}

.speaker-card:hover {
    transform: translateY(-5px);
    background: linear-gradient(45deg, #272b75, #CB7A2D);
    color: #fff !important;
}

.speaker-card:hover * {
    color: #fff !important;
}

.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;
}

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

.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 {
    color: #666;font-size: 14px;
    margin-bottom: 10px;
    position: relative;
    display: inline-block;
}

.position::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -3px;
    width: 100%;
    height: 1px;
    background-color: #999;
    opacity: 0.5;
    transition: opacity 0.3s ease;
}

.position:hover::after {
    opacity: 1;
}

.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);
}

/* Modal Styles */
.team-modal .modal-dialog {
    max-width: 80vw;
    width: 80vw;
    margin: 30px auto;
}

@media (max-width: 768px) {
    .team-modal .modal-dialog {
        max-width: 95vw;
        width: 95vw;
        margin: 10px auto;
    }
}

.team-modal .modal-content {
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    margin-top: 5vh;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
}

.team-modal .modal-header {
    border-bottom: none;
    padding: 1rem 1.5rem;
    flex-shrink: 0;
}

.team-modal .modal-title {
    font-size: 1.5rem;
    font-weight: bold;
    color: #333;
}

.team-modal .btn-close {
    box-shadow: none;
}

.team-modal .modal-body {
    padding: 1rem 1.5rem;
    overflow-y: auto;
    flex-grow: 1;
}

.team-modal .member-details {
    text-align: center;
}

.team-modal .member-image {
    max-width: 150px;
    height: auto;
    border-radius: 10%;
    object-fit: cover;
    margin-bottom: 15px;
}

.team-modal .member-name {
    font-size: 1.8rem;
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
}

.team-modal .member-position {
    font-style: italic;
    color: #666;
    margin-bottom: 15px;
}

.team-modal .member-description {
    line-height: 1.6;
    color: #555;
    text-align: left;
}

.team-modal .social-links {
    margin-top: 20px;
    justify-content: center;
}

.team-modal .social-links .social-icon {
    font-size: 20px;
    margin: 0 8px;
}
