/* ============================================================
   set.css — เซต (Sets) shared stylesheet
   ใช้ร่วมกับ page.css
   สำหรับทุกหน้าในโฟลเดอร์ /set/
   ============================================================ */

/* ── Section Card — extra color: blue ── */
.section-card.blue {
    border-left-color: var(--primary-light);
}

.section-card.blue .section-num {
    background: var(--primary-light);
}

/* ── Subsection Title ── */
.subsection-title {
    font-size: clamp(1rem, 2.2vw, 1.25rem);
    font-weight: 700;
    margin: clamp(18px, 3vw, 32px) 0 clamp(10px, 1.8vw, 16px);
    color: var(--primary);
    padding-bottom: 6px;
    border-bottom: 2px solid var(--border);
}

/* ── Type Card — generic card used for any categorized content ── */
.type-card {
    border-radius: clamp(10px, 2vw, 16px);
    border: 1.5px solid var(--border);
    padding: clamp(14px, 3vw, 26px) clamp(12px, 2.5vw, 26px);
    margin: clamp(12px, 2.5vw, 22px) 0;
    background: rgba(255, 255, 255, 0.55);
    transition: transform 0.2s, box-shadow 0.2s;
}

.type-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(26, 35, 126, 0.08);
    background: rgba(255, 255, 255, 0.85);
}

.type-header {
    display: flex;
    align-items: center;
    gap: clamp(10px, 2.5vw, 20px);
    margin-bottom: clamp(10px, 2vw, 18px);
}

.type-icon {
    font-size: clamp(1.2rem, 3vw, 2rem);
    font-weight: 800;
    min-width: clamp(36px, 6vw, 56px);
    text-align: center;
    color: var(--primary);
    font-family: monospace;
}

.type-header h3 {
    font-size: clamp(1rem, 2.5vw, 1.35rem);
    font-weight: 700;
    color: var(--text);
    margin: 0;
}

.type-header h3 span {
    font-size: 0.85rem;
    font-weight: 400;
    color: var(--text-muted);
    font-style: italic;
    margin-left: 6px;
}

/* ── Interactive Box (wraps any interactive demo/checker) ── */
.interactive-box {
    background: linear-gradient(135deg, #f0f4ff 0%, #e8f5e9 100%);
    border: 1.5px solid var(--border);
    border-radius: clamp(10px, 2vw, 16px);
    padding: clamp(14px, 3vw, 26px) clamp(12px, 2.5vw, 24px);
    margin-top: clamp(16px, 3vw, 28px);
}

.interactive-box h3 {
    font-size: clamp(0.95rem, 2vw, 1.2rem);
    font-weight: 700;
    margin-bottom: clamp(4px, 1vw, 8px);
    color: var(--primary);
}

/* ── Checker Input Row (shared input + button pattern) ── */
.checker-input-row {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.checker-input-row input {
    padding: 9px 14px;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    font-family: 'Angsana New', 'Sarabun', sans-serif;
    font-size: 1rem;
    width: 140px;
    outline: none;
    transition: border-color 0.2s;
    background: #fff;
}

.checker-input-row input:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(57, 73, 171, 0.1);
}

.checker-input-row button {
    padding: 9px 22px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-family: 'Angsana New', 'Sarabun', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
}

.checker-input-row button:hover {
    background: var(--primary-light);
    transform: translateY(-1px);
}

/* ── Checker Result ── */
.checker-result {
    margin-top: 14px;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    display: none;
    animation: fadeIn 0.3s ease;
}

.checker-result.is-member,
.checker-result.equiv-true {
    background: #e8f5e9;
    border: 1.5px solid #a5d6a7;
    color: var(--positive);
    display: block;
}

.checker-result.not-member,
.checker-result.equiv-false {
    background: #ffebee;
    border: 1.5px solid #ef9a9a;
    color: var(--negative);
    display: block;
}

/* ── Dropdown animation ── */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ══════════════════════════════════════════
   VOCAB SECTION — shared style in page.css
   ══════════════════════════════════════════ */

/* ── Responsive (shared layout) ── */
@media (max-width: 500px) {
    .type-header {
        flex-wrap: wrap;
    }

    .checker-input-row {
        flex-direction: column;
        align-items: stretch;
    }

    .checker-input-row input,
    .checker-input-row button {
        width: 100%;
    }
}
