/* ========= HERO ========= */

.hero-jumbo {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1.6fr);
    gap: 40px;
    align-items: center;
    background: linear-gradient(135deg, #f5f8cf, #f9ffd8);
    padding: 60px 40px;
    border-radius: 24px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
    margin-top: 40px;
}

.hero-text h1 {
    font-size: 2.6rem;
    margin-bottom: 16px;
}

.hero-text p {
    font-size: 1rem;
    max-width: 540px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 24px 0 8px;
}

.btn-jumbo {
    padding: 14px 26px;
    font-size: 1rem;
}

.btn-jumbo-secondary {
    font-size: 0.95rem;
}

.hero-note {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* HERO image */

.hero-illustration {
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-head-img {
    width: 100%;
    max-width: 480px;
    height: auto;
    filter: drop-shadow(0 18px 32px rgba(0, 0, 0, 0.25));
    animation: floatHero 6s ease-in-out infinite;
}

@keyframes floatHero {
    0%   { transform: translateY(0); }
    50%  { transform: translateY(-10px); }
    100% { transform: translateY(0); }
}

/* ========= SECTIONS ========= */

.section {
    margin-top: 60px;
}

.section-light {
    background: rgba(255, 255, 255, 0.9);
    padding: 40px 30px;
    border-radius: 24px;
    margin-top: 50px;
}

.section-header {
    text-align: center;
    margin-bottom: 28px;
}

.section-header h2 {
    font-size: 1.8rem;
    margin-bottom: 8px;
}

.section-header p {
    max-width: 620px;
    margin: 0 auto;
    font-size: 0.98rem;
}

/* ========= GRID / CARDS ========= */

.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.feature-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 18px;
    padding: 18px 20px;
    box-shadow: 0 10px 18px rgba(0, 0, 0, 0.06);
    font-size: 0.96rem;
}

.feature-card h3 {
    font-size: 1.05rem;
    margin-bottom: 6px;
}

/* ========= GRADES ========= */

.grade-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.grade-card {
    background: var(--bg);
    border-radius: 16px;
    padding: 16px 18px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.05);
    font-size: 0.95rem;
}

.grade-label {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 999px;
    background: var(--primary);
    color: #fff;
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 8px;
}

/* ========= STEPS (3 การ์ด) ========= */

.steps-grid {
    margin-top: 10px;
}

.step-card {
    position: relative;
    padding-top: 26px;
}

.step-badge {
    position: absolute;
    top: -16px;
    left: 20px;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    background: var(--primary);
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.18);
}

.step-card h3 {
    margin-bottom: 6px;
    font-size: 1.02rem;
}

.step-card p {
    font-size: 0.95rem;
    line-height: 1.5;
}

/* ========= FINAL CTA ========= */

.final-cta {
    margin-top: 60px;
}

.final-cta-box {
    max-width: 1100px;                     /* จำกัดความกว้างให้ดูไม่ยืดเกิน */
    margin: 0 auto;                        /* จัดให้อยู่กลาง */
    padding: 28px 36px;
    border-radius: 28px;

    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff;

    display: flex;
    align-items: center;
    gap: 24px;
}

/* ฝั่ง icon */
.final-cta-icon-wrap {
    flex-shrink: 0;
}

.final-cta-icon {
    width: 72px;
    height: 72px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.15);
    padding: 8px;
}

/* ฝั่งข้อความ */
.final-cta-text {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.final-cta-text h2 {
    font-size: 1.6rem;
    margin: 0;
}

.final-cta-text p {
    font-size: 1rem;
    margin: 0;
    margin-top: 4px;
}

/* ปุ่มใน CTA */
.final-cta-text .btn-jumbo {
    margin-top: 12px;
    align-self: flex-start;                /* ชิดซ้ายใน desktop */
}

/* ========= RESPONSIVE CTA ========= */
@media (max-width: 900px) {

    .final-cta-box {
        flex-direction: column;            /* เรียงบนลงล่างในมือถือ */
        text-align: center;
        padding: 24px 20px;
    }

    .final-cta-text {
        align-items: center;
    }

    .final-cta-text .btn-jumbo {
        align-self: center;
        width: 100%;
        max-width: 260px;                  /* ปุ่มกึ่งเต็มแถว ดูเป็น call to action */
    }
}

/* ========= RESPONSIVE ========= */

@media (max-width: 900px) {
    .hero-jumbo {
        grid-template-columns: 1fr;
        padding: 32px 20px;
        text-align: center;
    }

    .hero-text p {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-actions {
        justify-content: center;
    }

    .hero-illustration {
        margin-top: 18px;
    }

    .feature-grid,
    .grade-grid {
        grid-template-columns: 1fr;
    }

    .section-light {
        padding: 26px 18px;
    }

    .final-cta-box {
        flex-direction: column;
        text-align: center;
    }
}

/* ========= DARK THEME สำหรับหน้า Home ========= */

[data-theme="dark"] .hero-jumbo {
    background: linear-gradient(135deg, #1f1f1f, #262626);
    color: #f5f5f5;
}

[data-theme="dark"] .hero-text p,
[data-theme="dark"] .hero-note {
    color: #dcdcdc;
}

[data-theme="dark"] .section-light {
    background: #1f1f1f !important;
}

[data-theme="dark"] .feature-card {
    background: #222 !important;
    color: #e6e6e6 !important;
}

[data-theme="dark"] .grade-card {
    background: #1e1e1e !important;
    border: 1px solid #333;
    color: #e6e6e6;
}

[data-theme="dark"] .step-card {
    background: #222 !important;
    color: #e6e6e6;
}

[data-theme="dark"] .step-badge {
    background: var(--accent) !important;
    color: #fff;
}

[data-theme="dark"] .final-cta-box {
    background: linear-gradient(135deg, #3c7cff, #ff7ac4) !important;
    color: #fff;
}

[data-theme="dark"] .final-cta-box p {
    color: #fff !important;
}
