/* Container do Modal */
.mdc-modal-container {
    display: none;
    justify-content: center;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, backdrop-filter 0.3s ease;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.mdc-modal-container.active-modal {
    display: flex;
    opacity: 1;
    pointer-events: auto;
}

/* Box principal do modal */
.mdc-modal-box {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    max-width: 1100px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    position: relative;
}

.mdc-modal-container.active-modal .mdc-modal-box {
    transform: translateY(0);
    opacity: 1;
}

/* Cabeçalho */
.mdc-modal-header {
    text-align: center;
    margin-bottom: 1rem;
}

.mdc-modal-header h2 {
    color: #2c3e50;
    font-size: 1.6rem;
    margin-top: 1.6rem;
}

.mdc-modal-header p {
    color: #7f8c8d;
    font-size: 1rem;
}

/* Botão de fechar */
.mdc-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.5rem;
    cursor: pointer;
    color: #7f8c8d;
    transition: color 0.2s;
    background: none;
    border: none;
    padding: 0.5rem;
}

.mdc-modal-close:hover {
    color: #e74c3c;
}

/* Grid de cursos */
.mdc-cursos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

/* Cards individuais */
.mdc-curso-card {
    background: #fff;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.mdc-curso-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
}

/* Container da imagem */
.mdc-card-img-container {
    padding: 0;
}

.mdc-card-img-container {
  position: relative; /* necessário para posicionamento absoluto do ::before */
  overflow: hidden;   /* se quiser que o gradiente fique dentro da borda */
  border-radius: 8px;
}

.mdc-card-img-container img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  display: block;
}

.mdc-card-img-container::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to right,
    hsl(222.2, 47.4%, 11.2%, 0.8) 0%,
    hsla(211, 98%, 19%, 0.616) 50%,
    hsl(211, 86%, 70%, 0.7) 100%);
  z-index: 1;
  pointer-events: none;
}


/* Corpo do card */
.mdc-card-body {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.mdc-card-body h3 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.mdc-card-body p {
    color: #7f8c8d;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

/* Botões */
.mdc-btn {
    display: inline-block;
    padding: 0.6rem 1.2rem;
    border-radius: 25px;
    text-decoration: none;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    font-weight: 500;
}

.mdc-btn-primary {
    background-color: #003a92;
    color: white;
}

.mdc-btn-primary:hover {
    background-color: #2980b9;
}

/* Scrollbar personalizada */
.mdc-modal-box::-webkit-scrollbar {
    width: 8px;
}

.mdc-modal-box::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.mdc-modal-box::-webkit-scrollbar-thumb {
    background: #bdc3c7;
    border-radius: 10px;
}

.mdc-modal-box::-webkit-scrollbar-thumb:hover {
    background: #95a5a6;
}

/* Responsividade */
@media (max-width: 768px) {
    .mdc-cursos-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }

    .mdc-modal-box {
        padding: 1.5rem;
    }

    .mdc-modal-header {
        display: none;
    }
}