/* =====================================================
   quiz-home.css — Styles for Quiz Home Index page
   Inspired by pricing page layout.
   CSS variables from style.css:
     --primary-200-color: #2fb362
     --primary-600-color: #1c6d3a
   ===================================================== */

/* ─── Section background ─────────────────────────── */
section.quiz-home-section {
    background-image: linear-gradient(rgba(10, 28, 16, 0.72), rgba(10, 28, 16, 0.72)),
        url("/Webmain/assets/img/cta-bg.jpg");
    background-attachment: fixed;
    background-position: center;
    background-size: cover;
    padding: 100px 0 60px;
}

/* ─── Section title ──────────────────────────────── */
.quiz-home-section .quiz-section-title {
    text-align: center;
    padding-bottom: 30px;
}

.quiz-home-section .quiz-section-title h2 {
    font-size: 32px;
    font-weight: bold;
    text-transform: uppercase;
    margin-bottom: 20px;
    padding-bottom: 20px;
    position: relative;
    color: #fff;
}

.quiz-home-section .quiz-section-title h2::before {
    content: "";
    position: absolute;
    display: block;
    width: 120px;
    height: 1px;
    background: rgba(255, 255, 255, 0.25);
    bottom: 1px;
    left: calc(50% - 60px);
}

.quiz-home-section .quiz-section-title h2::after {
    content: "";
    position: absolute;
    display: block;
    width: 40px;
    height: 3px;
    background: var(--primary-200-color, #2fb362);
    bottom: 0;
    left: calc(50% - 20px);
}

.quiz-home-section .quiz-section-title p {
    color: rgba(255, 255, 255, 0.82);
    margin-bottom: 0;
}

/* ─── Grid row ───────────────────────────────────── */
.quiz-home-section .quiz-row {
    padding-top: 40px;
}

/* ─── Card ───────────────────────────────────────── */
.quiz-card {
    background: #fff;
    padding: 0 0 30px 0;
    box-shadow: 0 3px 20px -2px rgba(20, 45, 100, 0.15);
    border-top: 4px solid #fff;
    border-radius: 5px;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.quiz-card.featured {
    border-top-color: var(--primary-200-color, #2fb362);
}

/* ─── Cover image / placeholder ─────────────────── */
.quiz-card-cover {
    width: 100%;
    height: 160px;
    object-fit: cover;
    display: block;
}

.quiz-card-cover-placeholder {
    width: 100%;
    height: 160px;
    background: linear-gradient(135deg, var(--primary-600-color, #1c6d3a), var(--primary-200-color, #2fb362));
    display: flex;
    align-items: center;
    justify-content: center;
}

.quiz-card-cover-placeholder i {
    font-size: 3.5rem;
    color: rgba(255, 255, 255, 0.45);
}

/* ─── Card body ──────────────────────────────────── */
.quiz-card-body {
    padding: 24px 28px 0;
}

.quiz-card-body h3 {
    font-weight: 500;
    margin-bottom: 8px;
    font-size: 20px;
    color: var(--primary-600-color, #1c6d3a);
}

.quiz-card-body .quiz-desc {
    font-size: 0.9rem;
    font-style: italic;
    color: #6c757d;
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ─── Info block (replaces price-block) ──────────── */
.quiz-info-block {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 16px;
}

.quiz-info-block .quiz-date-label {
    font-size: 18px;
    font-weight: 500;
    color: var(--primary-600-color, #1c6d3a);
    font-family: "Jost", sans-serif;
    line-height: 1;
}

.quiz-info-block .quiz-date-label i {
    font-size: 1rem;
    vertical-align: middle;
    margin-right: 4px;
}

.quiz-info-block .quiz-free-label {
    font-size: 15px;
    color: var(--primary-200-color, #2fb362);
    font-family: "Jost", sans-serif;
    white-space: nowrap;
}

/* ─── Feature list ───────────────────────────────── */
.quiz-card-body .quiz-features {
    padding: 12px 0 20px;
    list-style: none;
    color: #999;
    text-align: left;
    line-height: 20px;
    margin: 0;
}

.quiz-card-body .quiz-features li {
    padding: 8px 0 8px 30px;
    position: relative;
}

.quiz-card-body .quiz-features i {
    color: #28a745;
    font-size: 22px;
    position: absolute;
    left: 0;
    top: 6px;
}

/* ─── CTA button ─────────────────────────────────── */
.quiz-card-body .quiz-play-btn {
    display: inline-block;
    padding: 12px 35px;
    border-radius: 50px;
    color: var(--primary-200-color, #2fb362);
    font-size: 16px;
    font-weight: 500;
    font-family: "Jost", sans-serif;
    transition: 0.3s;
    border: 1px solid var(--primary-200-color, #2fb362);
    text-decoration: none;
}

.quiz-card-body .quiz-play-btn:hover {
    background: var(--primary-200-color, #2fb362);
    color: #fff;
}

.quiz-card.featured .quiz-card-body .quiz-play-btn {
    background: var(--primary-200-color, #2fb362);
    color: #fff;
}

.quiz-card.featured .quiz-card-body .quiz-play-btn:hover {
    background: var(--primary-600-color, #1c6d3a);
}

/* ─── Badge (NỔI BẬT) ────────────────────────────── */
.quiz-badge {
    position: absolute;
    top: 148px; /* just below cover image (160px - 12px) */
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(90deg, var(--primary-200-color, #2fb362), var(--primary-600-color, #1c6d3a));
    color: white;
    padding: 4px 16px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1px;
    white-space: nowrap;
    z-index: 2;
}

/* ─── Empty state ────────────────────────────────── */
.quiz-empty-state {
    text-align: center;
    padding: 60px 0;
}

.quiz-empty-state i {
    font-size: 4rem;
    color: rgba(255, 255, 255, 0.35);
}

.quiz-empty-state h4 {
    color: rgba(255, 255, 255, 0.7);
    margin-top: 16px;
}

.quiz-empty-state p {
    color: rgba(255, 255, 255, 0.5);
}

/* ─── Join with PIN section ──────────────────────── */
.quiz-join-section {
    background: linear-gradient(135deg, #0a1c10 0%, #1c3d22 100%);
    padding: 130px 0 60px; /* 70px header + 60px top padding */
    border-bottom: 1px solid rgba(47,179,98,0.2);
}

.quiz-join-box {
    text-align: center;
    max-width: 580px;
    margin: 0 auto;
}

.quiz-join-icon i {
    font-size: 3rem;
    color: #2fb362;
    margin-bottom: 12px;
    display: block;
}

.quiz-join-box h2 {
    font-size: 1.8rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 8px;
}

.quiz-join-box p {
    color: rgba(255,255,255,0.55);
    margin-bottom: 28px;
    font-size: 0.95rem;
}

.quiz-pin-form {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.quiz-pin-input {
    flex: 1;
    min-width: 200px;
    max-width: 300px;
    padding: 14px 20px;
    border-radius: 50px;
    border: 2px solid rgba(47,179,98,0.4) !important;
    background: rgba(255,255,255,0.07) !important;
    color: #fff !important;
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 3px;
    text-align: center;
    outline: none;
    transition: border-color 0.2s;
    box-shadow: none !important;
}

.quiz-pin-input::placeholder {
    color: rgba(255,255,255,0.3);
    letter-spacing: 1px;
    font-weight: 400;
    font-size: 0.9rem;
}

.quiz-pin-input:focus {
    border-color: #2fb362 !important;
    background: rgba(47,179,98,0.1) !important;
    box-shadow: 0 0 0 3px rgba(47,179,98,0.2) !important;
}

.quiz-pin-btn {
    padding: 14px 32px;
    border-radius: 50px;
    border: none;
    background: linear-gradient(135deg, #2fb362, #1c6d3a);
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.1s;
    box-shadow: 0 4px 16px rgba(47,179,98,0.35);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.quiz-pin-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

/* ─── Trust signals section ──────────────────────── */
.quiz-trust-section {
    padding: 60px 0;
    background-color: #f6f9fe;
}

.quiz-trust-section .quiz-trust-title {
    text-align: center;
    padding-bottom: 30px;
}

.quiz-trust-section .quiz-trust-title h2 {
    font-size: 28px;
    font-weight: bold;
    text-transform: uppercase;
    margin-bottom: 20px;
    padding-bottom: 20px;
    position: relative;
    color: var(--primary-600-color, #1c6d3a);
}

.quiz-trust-section .quiz-trust-title h2::before {
    content: "";
    position: absolute;
    display: block;
    width: 120px;
    height: 1px;
    background: #ddd;
    bottom: 1px;
    left: calc(50% - 60px);
}

.quiz-trust-section .quiz-trust-title h2::after {
    content: "";
    position: absolute;
    display: block;
    width: 40px;
    height: 3px;
    background: var(--primary-200-color, #2fb362);
    bottom: 0;
    left: calc(50% - 20px);
}

.quiz-trust-item {
    text-align: center;
    padding: 20px;
}

.quiz-trust-item i {
    font-size: 2.5rem;
    color: var(--primary-200-color, #2fb362);
    margin-bottom: 12px;
    display: block;
}

.quiz-trust-item h5 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--primary-600-color, #1c6d3a);
}

.quiz-trust-item p {
    font-size: 0.85rem;
    color: #6c757d;
    margin: 0;
}

/* ─── Responsive ─────────────────────────────────── */
@media (max-width: 992px) {
    .quiz-card {
        max-width: 60%;
        margin: 0 auto 30px auto;
    }
}

@media (max-width: 767px) {
    .quiz-card {
        max-width: 80%;
        margin: 0 auto 30px auto;
    }
}

/* ─── Light mode overrides ───────────────────────── */
html:not(.dark-mode) .quiz-join-section {
    background: linear-gradient(135deg, #e8f5ee 0%, #d0ead8 100%);
    border-bottom: 1px solid #b8ddc6;
}

html:not(.dark-mode) .quiz-join-icon i {
    color: var(--primary-600-color, #1c6d3a);
}

html:not(.dark-mode) .quiz-join-box h2 {
    color: var(--primary-600-color, #1c6d3a);
}

html:not(.dark-mode) .quiz-join-box p {
    color: #4a7a5a;
}

html:not(.dark-mode) .quiz-pin-input {
    border: 2px solid rgba(28, 109, 58, 0.35) !important;
    background: #fff !important;
    color: #1a1a2e !important;
}

html:not(.dark-mode) .quiz-pin-input::placeholder {
    color: #aaa;
}

html:not(.dark-mode) .quiz-pin-input:focus {
    border-color: var(--primary-200-color, #2fb362) !important;
    background: #f0fff6 !important;
    box-shadow: 0 0 0 3px rgba(47, 179, 98, 0.15) !important;
}

@media (max-width: 420px) {
    .quiz-card {
        max-width: 100%;
        margin: 0 auto 30px auto;
    }
}
