/* ====== PÁGINA COMPETENCIAS ====== */

.comp-container {
    width: 90%;
    max-width: 1200px;
    margin: 120px auto 60px auto; /* Espacio por el navbar */
}

.titulo-comp {
    text-align: center;
    color: #0d1b2a;
    margin-bottom: 25px;
    font-size: 32px;
    font-weight: 700;
}

.comp-page-grid {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.comp-card {
    width: 30%;
    min-width: 280px;
    background: #ffffff;
    border-radius: 12px;
    text-align: center;
    padding: 20px;
    text-decoration: none;
    color: #000;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    transition: 0.3s;
}

.comp-card img {
    width: 250px;
    margin-bottom: 15px;
}

.comp-card h2 {
    color: #0d1b2a;
    margin-bottom: 10px;
}

.comp-card p {
    font-size: 15px;
    line-height: 1.4;
}

.comp-card:hover {
    transform: scale(1.04);
    box-shadow: 0 6px 18px rgba(0,0,0,0.25);
}

/* ====== TIMELINE ====== */
.timeline-container {
    margin-top: 40px;
    text-align: center;
}

.subtitulo {
    font-size: 24px;
    margin-bottom: 20px;
}

.timeline {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.year-btn {
    background: #0d1b2a;
    color: #fff;
    border: none;
    padding: 12px 22px;
    font-size: 16px;
    border-radius: 10px;
    cursor: pointer;
    transition: 0.3s;
}

.year-btn:hover {
    background: #1b263b;
    transform: scale(1.08);
}

/* ====== POPUP ====== */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.55);
    backdrop-filter: blur(2px);
}

.modal-content {
    background: #fff;
    margin: 80px auto;
    padding: 25px;
    width: 90%;
    max-width: 700px;
    border-radius: 12px;
    animation: popupFade 0.3s ease;
}

@keyframes popupFade {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

.close-modal {
    float: right;
    font-size: 28px;
    cursor: pointer;
    color: #333;
    font-weight: bold;
}

.close-modal:hover {
    color: red;
}

/* TABLA EJEMPLO */
.tabla-historica {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.tabla-historica th {
    background: #0d1b2a;
    color: #fff;
    padding: 10px;
}

.tabla-historica td {
    padding: 10px;
    border-bottom: 1px solid #ddd;
}

.tabla-historica img {
    width: 26px;
    margin-right: 8px;
    vertical-align: middle;
}

/* === MEJORA DEL POPUP PARA TABLAS GRANDES === */

.modal-content {
    max-height: 80vh;   /* evita que se corte la tabla */
    overflow-y: auto;   /* scroll interno */
}
