/**
 * Estilos para Cards de Cursos
 * Diplomados, Microcredenciales y Cursos de Verano
 */

/* Contenedor principal de introducción */
.og-courses-intro {
    background: #fff;
    padding: 60px 0;
}

.og-courses-intro-text {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    font-size: 1.1rem;
    line-height: 1.8;
    color: #333;
    text-align: justify;
}

.og-courses-intro-text p {
    margin-bottom: 20px;
}

/* Lista de ruta educativa (Diplomados) */
.og-ruta-educativa {
    list-style: none;
    padding: 0;
    margin: 20px 0;
    background: #f0f8ff;
    padding: 20px 30px;
    border-left: 4px solid #0593f3;
    border-radius: 8px;
}

.og-ruta-educativa li {
    padding: 10px 0;
    padding-left: 30px;
    position: relative;
    line-height: 1.8;
    color: #333;
    font-size: 1.05rem;
}

.og-ruta-educativa li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #0593f3;
    font-weight: 700;
    font-size: 1.3rem;
}

.og-ruta-educativa li strong {
    color: #003F7F;
}

/* Contenedor de cards */
.og-courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 40px;
    max-width: 1400px;
    margin: 60px auto;
    padding: 0 20px;
    align-items: start; /* Alinear al inicio para evitar estiramientos */
}

/* Card individual */
.og-course-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    height: auto; /* Permitir altura automática */
}

.og-course-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

/* Imagen de la card */
.og-course-card-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-bottom: 4px solid #003F7F;
}

/* Contenido de la card */
.og-course-card-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.og-course-card-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #003F7F;
    margin-bottom: 20px;
    line-height: 1.3;
    min-height: 60px;
}

/* Metadatos (modalidad, duración, inversión) */
.og-course-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 12px;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e5e5e5;
}

.og-course-meta-item {
    text-align: center;
}

.og-course-meta-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
}

.og-course-meta-value {
    display: block;
    font-size: 1rem;
    font-weight: 700;
    color: #003F7F;
}

/* Descripción */
.og-course-description {
    font-size: 0.95rem;
    line-height: 1.5;
    color: #555;
    margin-bottom: 15px;
    text-align: justify;
}

/* Objetivos (para diplomados) */
.og-course-objetivos {
    margin-bottom: 20px;
    background: #f9f9f9;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #003F7F;
}

.og-course-objetivos-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #003F7F;
    margin-bottom: 10px;
}

.og-course-objetivos-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.og-course-objetivos-list li {
    padding: 8px 0;
    padding-left: 25px;
    position: relative;
    line-height: 1.6;
    color: #555;
}

.og-course-objetivos-list li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: #003F7F;
    font-weight: 700;
    font-size: 1.2rem;
}

/* Temario expandible */
.og-course-temario {
    margin-bottom: 15px;
}

.og-course-temario-toggle {
    background: #f5f5f5;
    border: 2px solid #003F7F;
    border-radius: 8px;
    padding: 10px 18px;
    width: 100%;
    font-size: 1rem;
    font-weight: 600;
    color: #003F7F;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.og-course-temario-toggle:hover {
    background: #003F7F;
    color: #fff;
}

.og-course-temario-toggle::after {
    content: '▼';
    font-size: 0.9rem;
    transition: transform 0.3s ease;
}

.og-course-temario-toggle.active::after {
    transform: rotate(180deg);
}

.og-course-temario-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
    padding: 0 20px;
}

.og-course-temario-content.show {
    max-height: 500px; /* Reducido de 800px a 500px */
    padding: 20px;
    overflow-y: auto; /* Agregar scroll si el contenido es muy largo */
}

/* Estilos del scrollbar para temario */
.og-course-temario-content.show::-webkit-scrollbar {
    width: 6px;
}

.og-course-temario-content.show::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.og-course-temario-content.show::-webkit-scrollbar-thumb {
    background: #003F7F;
    border-radius: 10px;
}

.og-course-temario-content.show::-webkit-scrollbar-thumb:hover {
    background: #002855;
}

.og-course-temario-content ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.og-course-temario-content li {
    padding: 10px 0;
    padding-left: 25px;
    position: relative;
    line-height: 1.5;
    color: #555;
}

.og-course-temario-content li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #003F7F;
    font-weight: 700;
}

/* Certificación */
.og-course-certification {
    background: #f9f9f9;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 15px;
    text-align: center;
}

.og-course-certification-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
    display: block;
}

.og-course-certification-value {
    font-size: 1rem;
    font-weight: 700;
    color: #003F7F;
}

/* Botones en cards de cursos de verano */
.og-course-buttons {
    display: flex;
    gap: 10px;
    margin-top: auto;
}

.og-course-btn {
    flex: 1;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 2px solid #003F7F;
}

.og-course-btn-primary {
    background: #003F7F;
    color: #fff;
}

.og-course-btn-primary:hover {
    background: #002855;
    transform: translateY(-2px);
}

.og-course-btn-secondary {
    background: #fff;
    color: #003F7F;
}

.og-course-btn-secondary:hover {
    background: #003F7F;
    color: #fff;
}

/* Información de contacto en cards de verano */
.og-course-contact {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
    font-size: 0.9rem;
    line-height: 1.6;
}

.og-course-contact-title {
    font-weight: 700;
    color: #003F7F;
    margin-bottom: 10px;
    display: block;
}

.og-course-contact p {
    margin: 5px 0;
    color: #555;
}

.og-course-contact a {
    color: #003F7F;
    text-decoration: none;
    font-weight: 600;
}

.og-course-contact a:hover {
    text-decoration: underline;
}

/* Sección especial de dirección/codirección */
.og-course-direction {
    background: #e8f4f8;
    padding: 15px;
    border-left: 4px solid #003F7F;
    margin-bottom: 15px;
    border-radius: 4px;
}

.og-course-direction-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: #003F7F;
    margin-bottom: 5px;
}

.og-course-direction-name {
    font-size: 0.95rem;
    color: #333;
    line-height: 1.5;
}

/* Metodología en cards de verano */
.og-course-methodology {
    margin-bottom: 20px;
}

.og-course-methodology-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #003F7F;
    margin-bottom: 10px;
}

.og-course-methodology-text {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #555;
    text-align: justify;
}

/* Responsividad */
@media (max-width: 768px) {
    .og-courses-grid {
        grid-template-columns: 1fr;
        gap: 30px;
        padding: 0 15px;
    }
    
    .og-course-card-title {
        font-size: 1.3rem;
        min-height: auto;
    }
    
    .og-course-meta {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .og-course-buttons {
        flex-direction: column;
    }
    
    .og-courses-intro-text {
        font-size: 1rem;
        text-align: left;
    }
}

@media (max-width: 480px) {
    .og-course-card-image {
        height: 200px;
    }
    
    .og-course-card-content {
        padding: 20px;
    }
    
    .og-courses-intro {
        padding: 40px 0;
    }
}

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

.og-course-card {
    animation: fadeInUp 0.6s ease forwards;
}

.og-course-card:nth-child(1) { animation-delay: 0.1s; }
.og-course-card:nth-child(2) { animation-delay: 0.2s; }
.og-course-card:nth-child(3) { animation-delay: 0.3s; }
.og-course-card:nth-child(4) { animation-delay: 0.4s; }

/* ========================================
   NUEVOS ESTILOS PARA MICROCREDENCIALES
   ======================================== */

/* Botón azul "Programa" */
.og-course-programa-btn {
    text-align: center;
    margin: 15px 0;
}

.og-btn-programa {
    display: inline-block;
    background: #0593f3;
    color: #fff;
    padding: 10px 30px;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(5, 147, 243, 0.3);
}

.og-btn-programa:hover {
    background: #0473c1;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(5, 147, 243, 0.4);
}

/* Diplomado Asociado */
.og-course-diplomado-asociado {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    border-left: 4px solid #003F7F;
}

.og-course-diplomado-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: #666;
    margin-bottom: 8px;
}

.og-course-diplomado-link {
    color: #e74c3c;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
}

.og-course-diplomado-link:hover {
    color: #c0392b;
    text-decoration: underline;
}

.og-course-diplomado-value {
    color: #333;
    font-size: 1rem;
    font-weight: 600;
}

/* Microcredenciales Asociadas */
.og-course-microcredenciales-asociadas {
    background: #f0f8ff;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    border-left: 4px solid #0593f3;
}

.og-course-micros-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: #003F7F;
    margin-bottom: 10px;
}

.og-course-micros-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.og-course-micros-list li {
    padding: 8px 0;
    padding-left: 20px;
    position: relative;
    line-height: 1.5;
    color: #555;
    font-size: 0.95rem;
}

.og-course-micros-list li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: #0593f3;
    font-weight: 700;
    font-size: 1.2rem;
}

/* Responsive para nuevos elementos */
@media (max-width: 768px) {
    .og-course-diplomado-asociado,
    .og-course-microcredenciales-asociadas {
        padding: 12px;
    }
    
    .og-btn-programa {
        padding: 10px 25px;
        font-size: 0.9rem;
    }
}
