/* Container que se ajusta à altura disponível */
.main-quiz-cards {
    width: 100%;
    max-height: 100vh;
    display: flex;
    align-items: center;
}

.rm-quiz-container {
    font-family: "PT Serif", Georgia, serif;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    padding: 10px;
    box-sizing: border-box;
}

.rm-main-title {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 10px;
}

.rm-divider {
    border: 0;
    border-top: 1px solid #eee;
    width: 60%;
    margin: 0 auto 15px;
}

.rm-quiz-subtitle {
    font-size: 18px;
    margin-bottom: 20px;
    color: #444;
    font-weight: 700;
}

/* Grid Lado a Lado */
.rm-quiz-row {
    display: flex !important;
    justify-content: center !important;
    gap: 15px;
    width: 100%;
    box-sizing: border-box;
}

.rm-quiz-card {
    display: block;
    width: 260px;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    text-decoration: none !important;
    color: #333 !important;
    transition: transform 0.2s ease;
    border: 1px solid #f0f0f0;
}

/* Imagens compridas mas limitadas pela altura da tela */
.rm-quiz-card-img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
}

.rm-quiz-card-body {
    padding: 15px 10px;
    background: #fdfdfd;
}

.rm-quiz-card-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 4px;
}

.rm-quiz-rating {
    font-size: 11px;
    color: #888;
    margin-bottom: 4px;
}

.rm-quiz-stars {
    font-size: 14px;
    color: #f6b800;
    letter-spacing: 1px;
}

.quiz-footer-copy {
    margin-top: 20px;
    font-size: 10px;
    color: #ccc;
}

/* --- RESPONSIVO PARA QUALQUER TELEMÓVEL --- */
@media (max-width: 640px) {
    .rm-quiz-row {
        gap: 10px;
        padding: 0 5px;
    }

    .rm-quiz-card {
        width: calc(50% - 10px) !important;
        /* Força 2 colunas */
    }

    /* Reduz a altura da imagem no mobile para não gerar scroll vertical */
    .rm-quiz-card-img {
        height: 30vh;
        /* Usa 30% da altura da tela do aparelho */
        min-height: 150px;
    }

    .rm-main-title {
        font-size: 20px;
    }

    .rm-quiz-subtitle {
        font-size: 15px;
        margin-bottom: 15px;
    }

    .rm-quiz-card-title {
        font-size: 15px;
    }
}

/* Ajuste extra para telemóveis muito pequenos */
@media (max-height: 600px) {
    .rm-quiz-card-img {
        height: 25vh;
    }

    .rm-quiz-subtitle {
        margin-bottom: 10px;
    }
}