/* ==========================================================================
   GLOBAL TYPOGRAPHY & LAYOUT RESET (MODERN COMPACT STYLE)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans+Thai:wght@400;500;600;700&family=Sarabun:wght@400;500;700&display=swap');

html, body {
    font-family: 'Sarabun', sans-serif;
    font-weight: 400;
    font-size: 14px;
    line-height: 1.75;
    color: #2C3E50;
    background-color: #F8F9FA;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6, 
.text-primary-thai, 
.navbar-brand, 
.modal-title, 
.section-title,
.breadcrumb-item {
    font-family: 'IBM Plex Sans Thai', sans-serif;
    font-weight: 600;
    letter-spacing: 0.1px;
    color: #0072FF; /* ปรับสีหัวข้อให้เป็นสีฟ้าสดใสเข้ากับธีมหลัก */
}

h1 { font-size: 2.0rem; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.35rem; }
h4 { font-size: 1.15rem; }
h5 { font-size: 1.05rem; }
h6 { font-size: 0.95rem; }

/* ==========================================================================
   THEME COLORS SYSTEM (VIBRANT COLORS RESTORED)
   ========================================================================== */

/* แถบเมนูด้านบน (Navbar) และ Footer กลับมาใช้สีฟ้าน้ำทะเลสดใส */
.bg-primary-thai {
    background: linear-gradient(135deg, #0072FF 0%, #00C6FF 100%) !important;
    color: white !important;
}

/* ปุ่มหลักให้สดใสเข้ากัน */
.btn-thai {
    background-color: #0072FF !important;
    color: white !important;
    border: none;
}
.btn-thai:hover {
    background-color: #0056b3 !important;
    color: white !important;
    box-shadow: 0 4px 10px rgba(0, 114, 255, 0.3) !important;
}

/* แถบข้อมูลด้านล่างสุด (Footer) ปรับให้กลืนกับสีสดใส */
footer, .footer {
    background-color: transparent; /* ลบสีเทาทึบออก เพื่อให้ใช้สีไล่เฉดจาก bg-primary-thai แทน */
    color: #FFFFFF !important;
    padding: 20px 0;
    font-size: 0.95rem;
    font-family: 'Sarabun', sans-serif;
    font-weight: 400;
}
footer a, .footer a {
    color: #FFEB3B !important; /* ลิงก์สีเหลืองทองให้ตัดกับพื้นหลังสีฟ้า */
    text-decoration: none;
    font-weight: 500;
}
footer a:hover, .footer a:hover {
    color: #FFF !important;
    text-decoration: underline;
}

/* ==========================================================================
   COMPACT UI ELEMENTS (BUTTONS, FORMS, CARDS)
   ========================================================================== */

.btn {
    font-family: 'IBM Plex Sans Thai', sans-serif;
    font-weight: 500;
    font-size: 0.88rem;       
    padding: 6px 18px;        
    border-radius: 8px;       
    box-shadow: none !important;
    transition: all 0.2s ease;
}

.btn-sm {
    font-size: 0.8rem;
    padding: 4px 12px;
}

.rounded-pill {
    border-radius: 50px !important;
}

.form-control, select, textarea {
    font-family: 'Sarabun', sans-serif;
    font-weight: 400;        
    font-size: 0.9rem;
    padding: 6px 12px;
    height: auto;
    border: 1px solid #E3F2FD;
    border-radius: 8px !important;
    background-color: #FFF;
}
.form-control:focus {
    border-color: #00C6FF;
    box-shadow: 0 0 0 0.2rem rgba(0, 198, 255, 0.2);
}

.card-modern, .content-card, .quiz-card, .quiz-row-card, .std-checkbox-card {
    border-radius: 12px !important;
    padding: 20px !important; 
    margin-bottom: 20px;
    background: #FFFFFF;
    border: 1px solid #E3F2FD !important;
    box-shadow: 0 4px 10px rgba(0, 114, 255, 0.05) !important; 
}

/* ==========================================================================
   TABLES & ACCENTS
   ========================================================================== */

.table-custom th {
    font-family: 'IBM Plex Sans Thai', sans-serif;
    font-weight: 600;
    font-size: 0.88rem;
    padding: 12px 14px !important;
    background-color: #F0F8FF; /* สีพื้นหลังหัวตารางอ่อนๆ ให้เข้ากับสีหลัก */
    color: #0072FF;
}

.table-custom td {
    font-size: 0.9rem;
    padding: 10px 14px !important;
}

.badge {
    font-family: 'Sarabun', sans-serif;
    font-weight: 500;
    font-size: 0.75rem;
    padding: 5px 12px;
    border-radius: 6px;
}

.badge-pill {
    border-radius: 50px;
}

.navbar {
    padding: 10px 0;
}
.navbar-nav .nav-link {
    font-size: 0.95rem;
    padding-left: 14px !important;
    padding-right: 14px !important;
}