/* ==========================================================================
   ESTILOS MODERNOS PARA PROGRAMAS (CCO)
   ========================================================================== */

html {
    scroll-behavior: smooth;
}

#body-programas {
    background-color: #f1f5f9;
    min-height: 100vh;
    position: relative;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.contenedor-programas {
    max-width: 1100px;
    margin: 0 auto;
    padding: 120px 20px 100px;
}

/* --- Hero Section --- */
.hero-programas {
    text-align: center;
    margin-bottom: 80px;
    animation: fadeInUp 0.8s ease-out;
}

.hero-programas h1 {
    font-size: 3.5rem;
    color: #14522c;
    font-weight: 900;
    letter-spacing: -2px;
    margin-bottom: 20px;
}

.hero-programas p {
    font-size: 1.25rem;
    color: #475569;
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.6;
}

/* --- Pestañas de Navegación --- */
.programas-tabs {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 80px;
    position: sticky;
    top: 180px; /* Se posiciona debajo del menú principal */
    z-index: 1;
    background: rgba(241, 245, 249, 0.8);
    backdrop-filter: blur(15px);
    padding: 15px;
    border-radius: 50px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
    border: 1px solid rgba(255,255,255,0.5);
}

.tab-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    background: white;
    color: #14522c;
    text-decoration: none;
    border-radius: 30px;
    font-weight: 700;
    font-size: 0.9rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid #e2e8f0;
    white-space: nowrap;
}

.tab-link:hover {
    background: #03A64A;
    color: white;
    border-color: #03A64A;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(3, 166, 74, 0.3);
}

/* --- Layout de Programas --- */
.programas-lista {
    display: flex;
    flex-direction: column;
    gap: 100px;
}

.programa-item {
    display: flex;
    align-items: center;
    gap: 60px;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.6s forwards;
    scroll-margin-top: 220px; /* Compensación para que el encabezado no tape el título */
}

.programa-item.reverse {
    flex-direction: row-reverse;
}

.programa-img {
    flex: 1;
    border-radius: 30px;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    transition: transform 0.4s ease;
}

.programa-img img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    display: block;
}

.programa-info {
    flex: 1;
}

.programa-icon {
    width: 60px;
    height: 60px;
    background: #03A64A;
    color: white;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin-bottom: 25px;
    box-shadow: 0 10px 15px -3px rgba(3, 166, 74, 0.3);
}

.programa-info h2 {
    font-size: 2.2rem;
    color: #1e293b;
    margin-bottom: 20px;
    font-weight: 800;
}

.programa-info p {
    font-size: 1.1rem;
    color: #64748b;
    line-height: 1.8;
    text-align: justify;
}

/* --- Animaciones --- */
@keyframes fadeInUp {
    to { opacity: 1; transform: translateY(0); }
}

/* --- Responsividad --- */
@media (max-width: 900px) {
    .programa-item, .programa-item.reverse { flex-direction: column; gap: 30px; text-align: center; }
    .programa-info { display: flex; flex-direction: column; align-items: center; }
    .programa-img { width: 100%; }
    .programa-img img { height: 300px; }
    .hero-programas h1 { font-size: 2.5rem; }
}