/* =====================
    FUENTES
===================== */
@font-face {
    font-family: 'Montserrat';
    src: url('../Resources/Fonts/Montserrat-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
}
@font-face {
    font-family: 'Montserrat';
    src: url('../Resources/Fonts/Montserrat-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
}
@font-face {
    font-family: 'Montserrat';
    src: url('../Resources/Fonts/Montserrat-SemiBold.ttf') format('truetype');
    font-weight: 600;
    font-style: normal;
}
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@700&display=swap');

.roman {
    font-family: 'Cinzel', serif;
    font-weight: 700;
    color: #00594E;
    margin-right: 6px;
}

/* =====================
    GENERALES
===================== */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: 'Montserrat', sans-serif;
    background-color: #f4f4f4;
    color: #000000;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* =====================
    CONTENEDOR
===================== */
.page-container {
    max-width: 1100px;
    margin: 20px auto;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.08);
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 40px);
}
.content {
    padding: 40px;
    flex: 1;
}

/* =====================
    HEADER
===================== */
.header {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
    padding-top: 10px;
}
.header h1 {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 700;
    color: #00594E;
    text-align: center;
}
.logo-universidad, .logo-seminario {
    max-height: 90px;
    width: auto;
}
@media (max-width: 700px) {
    .header { grid-template-columns: 1fr; row-gap: 12px; }
    .logo-universidad { max-height: 64px; justify-self: center; }
}

/* =====================
    MENÚ
===================== */
.menu {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}
.btn-nav {
    background: #00594E;
    color: #fff;
    padding: 12px 20px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all .3s;
}
.btn-nav:hover { background: #B5A160; transform: scale(1.05); }

/* =====================
    BLOQUES
===================== */
.bloque { margin-bottom: 30px; }
.bloque-header { text-align: center; margin-bottom: 16px; }
.bloque-header h2 { color: #00594E; font-size: 1.5rem; }
.subrayado span {
    display: inline-block; width: 80px; height: 3px;
    background: #B5A160; margin: 8px auto; border-radius: 999px;
}
.bloque-desc { color: #555; }

/* =====================
    CARDS
===================== */
.grid-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    align-items: stretch;
}
.card {
    background: #fff;
    border: 1.5px solid #e5e7eb;
    border-radius: 12px;
    padding: 12px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0,0,0,.05);
    transition: transform .2s, border-color .2s;
    position: relative; /* para posicionar la bandera */
}
.card:hover { transform: translateY(-4px); border-color: #B5A160; }
.card-img {
    width: 120px; height: 140px; object-fit: cover;
    border-radius: 8px; background: #e5e7eb; margin-bottom: 10px;
}
.card-title { font-size: 0.95rem; font-weight: 700; color: #0e2a47; }
.card-affil { font-size: 0.8rem; color: #444; }
.card-actions {
    display: flex; gap: 6px; flex-wrap: wrap;
    justify-content: center; margin-top: 6px;
}
.btn-chip {
    background: #B5A160; color: #fff; border: none;
    font-weight: 600; font-size: 0.75rem;
    padding: 6px 10px; border-radius: 6px;
    cursor: pointer; transition: filter .2s;
}
.btn-chip:hover { filter: brightness(1.08); }

/* Bandera sobre la foto en las cards */
.flag-badge{
    position: absolute;
    top: 8px;
    right: 8px;
    width: 38px;
    height: 25px;
    border-radius: 3px;
    object-fit: cover;
    border: 1px solid rgba(0,0,0,.15);
    box-shadow: 0 1px 3px rgba(0,0,0,.25);
    pointer-events: none;
}

/* =====================
    FOOTER
===================== */
.footer {
    background-color: #00594E;
    color: white;
    padding: 30px 20px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    column-gap: 20px;
    text-align: center;
    border-bottom-left-radius: 18px;
    border-bottom-right-radius: 18px;
    overflow: hidden;
}
.footer-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}
.footer p { margin: 5px 0; font-size: 0.9rem; line-height: 1.5; }
.footer-container p:first-child { font-size: 1rem; margin-bottom: 4px; font-weight: 600; }
.footer .logo-universidad, .footer .logo-seminario {
    max-height: 80px;
    width: auto;
    object-fit: contain;
}
@media (max-width: 700px) {
    .footer { grid-template-columns: 1fr; row-gap: 12px; text-align: center; }
    .footer .logo-universidad, .footer .logo-seminario { justify-self: center; max-height: 60px; }
}

/* =====================
    MODAL BIO
===================== */
.modal {
    display: none; position: fixed; z-index: 9999; inset: 0;
    background-color: rgba(0,0,0,0.6);
    justify-content: center; align-items: center; padding: 16px;
}
.modal-dialog {
    position: relative;
    background-color: #fff;
    padding: 30px;
    border-radius: 12px;
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 8px 30px rgba(0,0,0,0.2);
    transform: translateY(-16px) scale(0.96);
    opacity: 0;
    animation: modalIn .28s forwards cubic-bezier(.25,.46,.45,.94);
}
.modal-flex {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}
.modal-left {
    display: flex;
    flex-direction: column;
    align-items: center; /* Alinea los elementos hijos (img y bandera) al centro */
}
.modal-text { flex: 1; }
.modal-title {
    font-size: 1.35rem;
    margin-bottom: 15px;
    color: #0e2a47;
    font-weight: 700;
    border-bottom: 2px solid #B5A160;
    padding-bottom: 8px;
}
.modal-content {
    font-size: 0.98rem;
    color: #333;
    line-height: 1.6;
    text-align: justify;
}
.modal-img {
    width: 160px;
    height: 180px;
    object-fit: cover;
    border-radius: 10px;
    display: block;
    margin: 0;
    flex-shrink: 0;
    border: 3px solid #f0f0f0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
/* Bandera debajo de la foto en el modal */
.modal-flag{
    display: none;
    width: 60px;  /* ¡AUMENTADO! */
    height: 40px; /* ¡AUMENTADO! */
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid rgba(0,0,0,.1);
    box-shadow: 0 1px 3px rgba(0,0,0,.2);
    margin-top: 10px;
}
.modal-close {
    position: absolute; top: 10px; right: 12px;
    background: none; border: none; color: #555;
    font-size: 1.5rem; cursor: pointer;
}
@keyframes modalIn {
    to { transform: translateY(0) scale(1); opacity: 1; }
}

/* =====================
    RESPONSIVIDAD EXTRA
===================== */
@media (min-width: 481px) {
    .modal-flex { flex-direction: row; align-items: flex-start; gap: 25px; }
    .modal-left { align-items: flex-start; } /* Desactivar la alineación para pantallas grandes */
}
@media (max-width: 480px) {
    .content { padding: 20px; }
    .card-img { width: 100px; height: 120px; }
    .card-title { font-size: 0.85rem; }
    .card-affil { font-size: 0.75rem; }
    .btn-chip { font-size: 0.7rem; padding: 5px 8px; }
    .modal-dialog { padding: 18px; max-width: 95%; }
    .modal-title { font-size: 1rem; }
    .modal-content { font-size: 0.9rem; }
}