/* MODAL / LIGHTBOX */
.modal {
    display: none;
    position: fixed;
    z-index: 99999;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.9);
    justify-content: center; align-items: center;
}

.modal-content {
    max-height: 90vh;
    max-width: 90vw;
    border: 3px solid white;
    border-radius: 8px;
}

.close {
    position: absolute;
    top: 20px; right: 40px;
    color: white; font-size: 50px; cursor: pointer;
}

@media (max-width: 768px) {
    .course-card-open { 
        flex-direction: column; 
    }
    .course-image { 
        max-width: 100%; 
        height: auto; /* Remove a altura fixa de 300px que causava o corte */
    }
}
/* MODAL DE DETALHES (ABA NA FRENTE) */
.modal-overlay {
    display: none; /* Escondido por padrão */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10002;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(5px);
}

.modal-card {
    background: white;
    width: 100%;
    max-width: 600px;
    border-radius: 15px;
    padding: 40px;
    position: relative;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
    animation: scaleUp 0.3s ease;
}

@keyframes scaleUp {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 2rem;
    color: #64748b;
    cursor: pointer;
    transition: 0.3s;
}

.modal-close:hover { color: #000; }

.modal-card h2 {
    color: var(--primary);
    margin-bottom: 15px;
    font-size: 1.8rem;
}

.modal-body {
    margin: 20px 0;
    line-height: 1.8;
    color: #475569;
    max-height: 60vh;
    overflow-y: auto; /* Scroll caso o texto seja muito longo */
}

.modal-footer {
    margin-top: 25px;
    border-top: 1px solid #eee;
    padding-top: 20px;
}

#selo-ec {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 10px 0;
    min-height: 60px; /* Evita que o layout "pule" enquanto o script carrega */
}

#selo-ec img {
    max-width: 100%;
    height: auto;
    cursor: pointer;
}