@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;700&family=Roboto:wght@400;500&display=swap');

:root {
    --azul-oscuro: #0a2c5d;
    --azul-medio: #1a4480;
    --azul-claro: #2c6aa8;
    --dorado: #c9a962;
    --dorado-claro: #e0c78c;
    --background-color: #f8f9fa;
    --text-color: #333;
    --card-bg-color: #ffffff;
    --shadow-color: rgba(0, 0, 0, 0.1);
}

.tarjetas {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

section {
    margin-bottom: 3rem;
}

h2 {
    font-family: 'Montserrat', sans-serif;
    text-align: center;
    font-size: 2.2rem;
    color: var(--azul-oscuro);
    margin-bottom: 2rem;
    position: relative;
}

h2::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background-color: var(--dorado);
    margin: 0.5rem auto 0;
    border-radius: 2px;
}
 
h2.no-underline::after {
    display: none;
}

.speaker-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

.speaker-card {
    background-color: var(--card-bg-color);
    border-radius: 15px;
    box-shadow: 0 4px 15px var(--shadow-color);
    text-align: center;
    padding: 1.5rem;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    border-top: 5px solid var(--dorado);
}

#conferencistas .speaker-card {
    border-top-color: var(--dorado);
}

.speaker-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.speaker-photo {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 1rem;
    border: 5px solid var(--background-color);
    box-shadow: 0 0 10px var(--shadow-color);
    transition: transform 0.3s ease;
}

.speaker-card:hover .speaker-photo {
    transform: scale(1.05);
}

.speaker-name {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.4rem;
    margin: 0.5rem 0;
    color: var(--azul-oscuro);
}

.speaker-institution {
    font-size: 0.95rem;
    color: #666;
    margin-bottom: 1rem;
    flex-grow: 1;
}

.bio-link {
    display: inline-block;
    background-color: var(--azul-medio);
    color: white;
    padding: 0.6rem 1.5rem;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 500;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.bio-link:hover {
    background-color: var(--azul-oscuro);
    transform: scale(1.05);
}

/* --- Modal Styles --- */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.6);
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: var(--card-bg-color);
    margin: auto;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 25px var(--shadow-color);
    position: relative;
    width: 90%;
    max-width: 800px;
    animation-name: animatetop;
    animation-duration: 0.4s;
    max-height: 90vh;
    overflow-y: auto;
    border-top: 5px solid var(--dorado);
}

.modal-close-button {
    color: #aaa;
    position: absolute;
    top: 15px;
    right: 25px;
    font-size: 36px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}

.modal-close-button:hover,
.modal-close-button:focus {
    color: var(--azul-oscuro);
    text-decoration: none;
    cursor: pointer;
}

#modalSpeakerName {
    font-family: 'Montserrat', sans-serif;
    color: var(--azul-oscuro);
    margin-bottom: 1rem;
    font-size: 1.8rem;
    text-align: center;
    border-bottom: 2px solid var(--dorado);
    padding-bottom: 10px;
}

#modalSemblanzaContent {
    font-family: 'Roboto', sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    text-align: justify;
}

@keyframes animatetop {
    from {top: -300px; opacity: 0}
    to {top: 0; opacity: 1}
}

.footer-iibi-title {
    text-align: left;
    margin-left: 0;
    margin-right: auto;
}

.footer-head {
    text-align: left;
}

/* Estilos adicionales para mejorar la coherencia visual */
.tarjetas h2 {
    background: linear-gradient(to right, var(--azul-oscuro), var(--azul-medio));
    color: white;
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.tarjetas h2::after {
    background-color: var(--dorado);
}

/* Ajustes responsivos */
@media (max-width: 768px) {
    .speaker-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1.5rem;
    }
    
    .speaker-card {
        padding: 1rem;
    }
    
    .speaker-photo {
        width: 120px;
        height: 120px;
    }
    
    .tarjetas h2 {
        font-size: 1.8rem;
        padding: 12px 15px;
    }
}