
/* ============================================ */
/* ===== ESTILOS PARA LA PÁGINA DE LISTADO ===== */
/* ============================================ */
.posgrados-page {
    padding: 40px 0 80px;
    min-height: 100vh;
}

.posgrados-titulo-seccion {
    font-size: 2rem;
    font-weight: 700;
    color: var(--iesitblue-dark);
    margin: 50px 0 20px;
    padding-bottom: 10px;
    border-bottom: 3px solid var(--iesitblue);
    display: inline-block;
    letter-spacing: -0.5px;
}

.posgrados-titulo-seccion:first-of-type {
    margin-top: 0;
}

.posgrados-subtitulo {
    color: var(--gray-600);
    font-size: 1.1rem;
    margin-bottom: 25px;
}

.posgrados-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

/* Tarjetas tipo bandera (reutilizadas de licenciaturas) */
.bandera-card {
    display: block;
    text-decoration: none;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    border-radius: 16px;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
}

.bandera-card:hover {
    transform: translateY(-8px);
    border-color: rgba(20, 23, 243, 0.2);
    box-shadow: 0 20px 60px rgba(20, 23, 243, 0.12);
}

.bandera-imagen {
    position: relative;
    width: 100%;
    padding-bottom: 140%;
    overflow: hidden;
    background: #1a2a3a;
}

.bandera-imagen img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.bandera-card:hover .bandera-imagen img {
    transform: scale(1.06);
}

.bandera-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 30px 20px 25px;
    background: linear-gradient(to top, 
        rgba(0, 0, 0, 0.85) 0%,
        rgba(0, 0, 0, 0.4) 60%,
        rgba(0, 0, 0, 0) 100%
    );
    min-height: 45%;
    display: flex;
    align-items: flex-end;
}

.bandera-content {
    width: 100%;
    color: #ffffff;
}

.bandera-titulo {
    font-size: 1.1rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 6px;
    line-height: 1.2;
}

.bandera-descripcion {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.4;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.bandera-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.bandera-duracion {
    font-size: 0.85rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
}

.bandera-ver-programa {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #85c1e9;
    transition: all 0.3s ease;
}

.bandera-card:hover .bandera-ver-programa {
    color: #ffffff;
    gap: 8px;
}

.bandera-icono {
    width: 16px;
    height: 16px;
    transition: transform 0.3s ease;
}

.bandera-card:hover .bandera-icono {
    transform: translateX(3px);
}

/* Responsive del listado */
@media (max-width: 768px) {
    .posgrados-grid {
        grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
        gap: 20px;
    }
    .posgrados-titulo-seccion {
        font-size: 1.6rem;
        margin-top: 30px;
    }
    .bandera-overlay {
        padding: 20px 14px 16px;
        min-height: 40%;
    }
    .bandera-titulo {
        font-size: 0.95rem;
    }
    .bandera-descripcion {
        font-size: 0.8rem;
    }
    .bandera-duracion {
        font-size: 0.75rem;
    }
    .bandera-ver-programa {
        font-size: 0.75rem;
    }
}

@media (max-width: 480px) {
    .posgrados-grid {
        grid-template-columns: 1fr 1fr;
        gap: 15px;
    }
    .posgrados-titulo-seccion {
        font-size: 1.3rem;
    }
    .bandera-imagen {
        padding-bottom: 120%;
    }
    .bandera-overlay {
        padding: 14px 10px 12px;
        min-height: 35%;
    }
    .bandera-titulo {
        font-size: 0.8rem;
    }
    .bandera-descripcion {
        font-size: 0.7rem;
        -webkit-line-clamp: 1;
    }
    .bandera-duracion {
        font-size: 0.65rem;
    }
    .bandera-ver-programa {
        font-size: 0.65rem;
    }
    .bandera-icono {
        width: 12px;
        height: 12px;
    }
}


/* ============================================ */
/* ===== ESTILOS PARA PÁGINAS DE DETALLE ===== */
/* ============================================ */

/* Hero de la maestría/doctorado/especialidad */
.maestria-hero {
    background: linear-gradient(135deg, var(--iesitblue-dark), var(--iesitblue));
    padding: 80px 20px 60px;
    text-align: center;
    color: white;
    border-radius: 0 0 30px 30px;
    margin-bottom: 40px;
    position: relative;
    overflow: hidden;
}

.maestria-hero::before {
    content: '';
    position: absolute;
    top: -30%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    pointer-events: none;
}

.maestria-hero h2 {
    font-size: 2.8rem;
    font-weight: 800;
    margin-bottom: 10px;
    letter-spacing: -0.5px;
}

.maestria-hero p {
    font-size: 1.2rem;
    font-weight: 300;
    opacity: 0.9;
    max-width: 700px;
    margin: 0 auto;
}

/* Contenedor de contenido */
.maestria-content {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px 60px;
}

/* Bloques de información */
.maestria-block {
    background: #ffffff;
    border-radius: 20px;
    padding: 35px 30px;
    margin-bottom: 40px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.04);
    transition: box-shadow 0.3s ease;
}

.maestria-block:hover {
    box-shadow: 0 8px 35px rgba(20, 23, 243, 0.08);
}

.maestria-block h3 {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--iesitblue-dark);
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 3px solid var(--iesitblue);
    display: inline-block;
}

.maestria-block p,
.maestria-block li {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--gray-600);
    text-align: justify;
}

.maestria-block ul {
    list-style: none;
    padding: 0;
}

.maestria-block ul li {
    padding: 8px 0 8px 30px;
    position: relative;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

.maestria-block ul li:last-child {
    border-bottom: none;
}

.maestria-block ul li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--iesitblue);
    font-weight: 700;
    font-size: 1.2rem;
}

/* Galería de imágenes */
.maestria-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.maestria-gallery a {
    display: block;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.maestria-gallery a:hover {
    transform: scale(1.03);
    box-shadow: 0 8px 30px rgba(20, 23, 243, 0.12);
}

.maestria-gallery img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.maestria-gallery a:hover img {
    transform: scale(1.05);
}

/* Responsive de detalle */
@media (max-width: 768px) {
    .maestria-hero h2 {
        font-size: 2.2rem;
    }
    .maestria-hero p {
        font-size: 1rem;
    }
    .maestria-block {
        padding: 25px 20px;
    }
    .maestria-block h3 {
        font-size: 1.3rem;
    }
    .maestria-block p,
    .maestria-block li {
        font-size: 0.95rem;
    }
    .maestria-gallery {
        grid-template-columns: 1fr 1fr;
    }
    .maestria-gallery img {
        height: 160px;
    }
}

@media (max-width: 480px) {
    .maestria-hero h2 {
        font-size: 1.8rem;
    }
    .maestria-gallery {
        grid-template-columns: 1fr;
    }
    .maestria-gallery img {
        height: 200px;
    }
    .maestria-block ul li {
        padding-left: 24px;
        font-size: 0.9rem;
    }
}
