/**
 * style.css - การออกแบบเว็บไซต์ประเมินผลการปฏิบัติงานตามข้อตกลง (PA)
 * ธีม: ขบวนรถไฟแห่งการเรียนรู้ & ผองเพื่อนสัตว์แสนน่ารัก (Learning Train & Cute Animal Friends)
 * ไม่มีเมนูแฮมเบอร์เกอร์ (No Hamburger Menu) - ใช้ Top Navigation Bar สดใส ทันสมัย
 */

:root {
    /* Color Palette - Vibrant & Cheerful Educational Theme */
    --primary: #0284c7;
    --primary-light: #38bdf8;
    --primary-pastel: #e0f2fe;
    
    --accent-gold: #f59e0b;
    --accent-gold-light: #fef3c7;
    --accent-emerald: #10b981;
    --accent-emerald-light: #d1fae5;
    --accent-coral: #f43f5e;
    --accent-coral-light: #ffe4e6;
    --accent-purple: #8b5cf6;
    --accent-purple-light: #ede9fe;
    
    --bg-main: #f8fafc;
    --bg-gradient: linear-gradient(180deg, #f0fdf4 0%, #e0f2fe 30%, #fefce8 70%, #f8fafc 100%);
    --bg-card: rgba(255, 255, 255, 0.92);
    --bg-card-solid: #ffffff;
    
    --text-main: #0f172a;
    --text-muted: #475569;
    --text-light: #64748b;
    
    --border-color: rgba(226, 232, 240, 0.9);
    --border-cute: #bae6fd;
    
    --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.05);
    --shadow-md: 0 8px 24px -4px rgba(15, 23, 42, 0.08), 0 4px 8px -2px rgba(15, 23, 42, 0.04);
    --shadow-lg: 0 16px 36px -6px rgba(14, 165, 233, 0.15), 0 8px 16px -4px rgba(15, 23, 42, 0.06);
    --shadow-hover: 0 20px 40px -8px rgba(14, 165, 233, 0.22);
    
    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-full: 9999px;
    
    --font-thai: 'Noto Sans Thai', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-title: 'Mitr', 'Noto Sans Thai', sans-serif;
    --font-brand: 'Fredoka', 'Mitr', cursive, sans-serif;
    --font-en: 'Outfit', sans-serif;

    /* Theme-switchable variables (overridden by data-theme attribute) */
    --theme-bg: #f8fafc;
    --theme-bg-gradient: linear-gradient(180deg, #f0fdf4 0%, #e0f2fe 30%, #fefce8 70%, #f8fafc 100%);
    --theme-card: rgba(255, 255, 255, 0.92);
    --theme-card-icon-bg: #f0f9ff;
    --theme-card-border: rgba(226, 232, 240, 0.9);
    --theme-field-label: #475569;
    --theme-field-value: #0f172a;
    --theme-text: #0f172a;
    --theme-text-muted: #475569;
    --theme-accent: #0284c7;
    --theme-accent-light: #e0f2fe;
    --theme-accent-2: #f59e0b;
    --theme-navbar-bg: rgba(255, 255, 255, 0.95);
    --theme-navbar-border: rgba(226, 232, 240, 0.8);
    --theme-shadow: 0 8px 24px -4px rgba(15, 23, 42, 0.08);
    --theme-radius: 16px;
    --theme-section-bg: rgba(255,255,255,0.85);
    --theme-header-text: #0f172a;
}

/* ==========================================
   🌌 FULL THEME SYSTEM — 5 Core Presets + Custom Theme Engine
   1. สีไฮไลท์หัวข้อ: เข้มเด่นชัด
   2. สีภายในการ์ด: 4 ชุดสีมีมิติ (แทบบน/ไอคอน, พื้นการ์ด, ข้อความในกรอบ, สีกรอบ)
   3. สีพื้นหลังสุด: แยกอิสระ
   ========================================== */

/* ==========================================
   🌌 FULL THEME SYSTEM — 5 Two-Tone Harmonic Presets + Custom Studio Engine
   1. สีพื้นหลังทั้งหน้า: --theme-bg
   2. สีไฮไลท์หัวข้อ: --theme-header-text
   3. สีพื้นหลังกรอบใหญ่ (Section BG): --theme-section-bg
   4.1 สีลาเบลคาดหัว (Ribbon Label): --theme-card-icon-bg
   4.2 สีภายในกรอบการ์ดย่อย (Card Inner BG): --theme-card
   4.3 สีกรอบตัดมิติ (Border): --theme-card-border
   4.4 สีตัวหนังสือบนลาเบล (Ribbon Text): --theme-field-label
   5. สีตัวหนังสือ/ข้อความในกรอบ: --theme-field-value & --theme-text
   ========================================== */

/* 1. ☀️ สว่างสดชื่น (Clean Ocean & Sky Two-Tone) */
[data-theme="light"], [data-theme="classic"] {
    --theme-bg: #f0f7ff;
    --theme-header-text: #0369a1;
    --theme-section-bg: #ffffff;
    --theme-card-icon-bg: #0284c7;
    --theme-card: #f8fafc;
    --theme-card-border: #bae6fd;
    --theme-field-label: #ffffff;
    --theme-field-value: #0f172a;
    --theme-text: #1e293b;
    --theme-accent: #0284c7;
    --theme-accent-light: #e0f2fe;
}

/* 2. 🌙 มืดหรูหรา (Midnight Obsidian & Neon Violet Two-Tone) */
[data-theme="dark"], [data-theme="midnight"], [data-theme="galaxy"] {
    --theme-bg: #09090b;
    --theme-header-text: #c084fc;
    --theme-section-bg: #18181b;
    --theme-card-icon-bg: #7e22ce;
    --theme-card: #27272a;
    --theme-card-border: #581c87;
    --theme-field-label: #ffffff;
    --theme-field-value: #f8fafc;
    --theme-text: #f1f5f9;
    --theme-accent: #a855f7;
    --theme-accent-light: rgba(168, 85, 247, 0.18);
}

/* 3. 🌿 สดใสธรรมชาติ (Emerald Green & Mint Glow Two-Tone) */
[data-theme="vibrant"], [data-theme="nature"], [data-theme="mint"] {
    --theme-bg: #f0fdf4;
    --theme-header-text: #047857;
    --theme-section-bg: #ffffff;
    --theme-card-icon-bg: #059669;
    --theme-card: #ecfdf5;
    --theme-card-border: #86efac;
    --theme-field-label: #ffffff;
    --theme-field-value: #064e3b;
    --theme-text: #064e3b;
    --theme-accent: #10b981;
    --theme-accent-light: #dcfce7;
}

/* 4. 🏛️ ทางการพรีเมียม (Royal Navy & Champagne Gold Two-Tone) */
[data-theme="formal"], [data-theme="navy_gold"], [data-theme="royal_gold"] {
    --theme-bg: #070e1e;
    --theme-header-text: #fbbf24;
    --theme-section-bg: #0f1d3a;
    --theme-card-icon-bg: #d97706;
    --theme-card: #18294d;
    --theme-card-border: #f59e0b;
    --theme-field-label: #ffffff;
    --theme-field-value: #f8fafc;
    --theme-text: #f8fafc;
    --theme-accent: #f59e0b;
    --theme-accent-light: rgba(245, 158, 11, 0.2);
}

/* 5. 🌸 หวานละมุนน่ารัก (Sakura Rose & Warm Peach Two-Tone) */
[data-theme="cute"], [data-theme="sakura"] {
    --theme-bg: #fff1f2;
    --theme-header-text: #be185d;
    --theme-section-bg: #ffffff;
    --theme-card-icon-bg: #e11d48;
    --theme-card: #fff5f5;
    --theme-card-border: #fda4af;
    --theme-field-label: #ffffff;
    --theme-field-value: #881337;
    --theme-text: #881337;
    --theme-accent: #e11d48;
    --theme-accent-light: #ffe4e6;
}

/* 6. 🎨 กำหนดเอง (Custom Theme Dynamic Engine) */
[data-theme="custom"] {
    --theme-bg: #f0f7ff;
    --theme-header-text: #0369a1;
    --theme-section-bg: #ffffff;
    --theme-card-icon-bg: #0284c7;
    --theme-card: #f8fafc;
    --theme-card-border: #bae6fd;
    --theme-field-label: #ffffff;
    --theme-field-value: #0f172a;
    --theme-text: #1e293b;
}

/* ==========================================
   Global Theme Bindings Across All Elements
   ========================================== */
body {
    background: var(--theme-bg, #f0f7ff) !important;
    background-size: cover;
    color: var(--theme-text, #1e293b) !important;
    min-height: 100vh;
}

/* กรอบใหญ่ของแต่ละหัวข้อ (Outer Section Containers & Layered Depth) */
.content-card-section,
.fb-profile-card,
.fb-profile-body,
.hero-train-banner,
.pa-statement-banner,
.modal-card,
.dropdown-panel {
    background: var(--theme-section-bg, #ffffff) !important;
    border: 2px solid var(--theme-card-border, #bae6fd) !important;
    color: var(--theme-text, #1e293b) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05), 0 2px 6px rgba(0, 0, 0, 0.03);
}

/* แถบลาเบลคาดหัว (Card Header Ribbon) */
.info-card-ribbon,
.committee-header-ribbon {
    background: var(--theme-card-icon-bg, #0284c7) !important;
    color: var(--theme-field-label, #ffffff) !important;
    border-bottom: 1.5px solid var(--theme-card-border, rgba(0, 0, 0, 0.08)) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

/* กรอบการ์ดย่อยภายในการ์ด (Inner Item Cards / Info Cards) */
.info-item-cute,
.stat-card,
.committee-card,
.committee-cute-card,
.album-card,
.photo-card-cute,
.custom-sec-card,
.video-card,
.schedule-card-panel,
.cute-table,
.cute-table th,
.cute-table td,
.eval-doc-card,
.summary-matrix-table,
.summary-matrix-table th,
.summary-matrix-table td,
.teacher-photo-card {
    background: var(--theme-card, #f8fafc) !important;
    border: 2px solid var(--theme-card-border, #bae6fd) !important;
    color: var(--theme-text, #1e293b) !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.03);
}

.info-card-content {
    background: var(--theme-card, #f8fafc) !important;
}

.info-field-box {
    border: 1px solid var(--theme-card-border, #cbd5e1) !important;
}

.info-field-val {
    color: var(--theme-field-value, #0f172a) !important;
}

.info-field-val.highlight-rank {
    color: var(--theme-header-text, #0369a1) !important;
    font-weight: 800;
}

/* สีหัวข้อเด่นชัด */
h1, h2, h3, h4,
.fb-profile-name,
.section-header-cute h2,
.teacher-name-tag,
.hero-main-title,
.committee-name,
.subject-name {
    color: var(--theme-header-text, #0369a1) !important;
}

.info-icon {
    background: var(--theme-card-icon-bg, #e0f2fe) !important;
    border-color: var(--theme-card-border, #cbd5e1) !important;
}

.info-text label {
    color: var(--theme-field-label, #475569) !important;
}

.info-text strong {
    color: var(--theme-field-value, #0f172a) !important;
}

[data-theme="galaxy"] p, [data-theme="galaxy"] .fb-profile-sub,
[data-theme="galaxy"] .hero-sub-text, [data-theme="galaxy"] .info-text label,
[data-theme="galaxy"] .committee-role {
    color: #cbd5e1 !important;
}

[data-theme="galaxy"] .info-text strong, [data-theme="galaxy"] .hero-sub-text strong {
    color: #f8fafc !important;
}

[data-theme="galaxy"] .fb-profile-bio {
    background: rgba(99, 102, 241, 0.15) !important;
    border-color: rgba(99, 102, 241, 0.4) !important;
    color: #a5b4fc !important;
}

/* 🏛️ Formal Royal Gold Theme */
[data-theme="formal"] .info-card-ribbon,
[data-theme="formal"] .committee-header-ribbon {
    background: linear-gradient(135deg, #fef08a 0%, #f59e0b 45%, #92400e 100%) !important;
    color: #451a03 !important;
    font-weight: 800 !important;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.4) !important;
    box-shadow: 0 3px 10px rgba(180, 83, 9, 0.3) !important;
}

[data-theme="formal"] .info-ribbon-icon,
[data-theme="formal"] .info-ribbon-label {
    color: #451a03 !important;
    font-weight: 800 !important;
}

/* 5. 💎 Glass Theme (Optimized Ultra-Smooth Glassmorphism) */
[data-theme="glass"] body {
    background: radial-gradient(circle at 10% 10%, #e0f2fe 0%, #f8fafc 50%, #f0fdf4 100%) !important;
}

[data-theme="glass"] .content-card-section,
[data-theme="glass"] .fb-profile-card,
[data-theme="glass"] .stat-card,
[data-theme="glass"] .committee-card,
[data-theme="glass"] .album-card,
[data-theme="glass"] .custom-sec-card,
[data-theme="glass"] .video-card,
[data-theme="glass"] .teacher-photo-card,
[data-theme="glass"] .info-item-cute,
[data-theme="glass"] .committee-cute-card,
[data-theme="glass"] .schedule-card-panel {
    background: rgba(255, 255, 255, 0.94) !important;
    border: 2px solid #38bdf8 !important;
    box-shadow: 0 10px 30px rgba(2, 132, 199, 0.08) !important;
}

[data-theme="glass"] .top-navbar {
    background: rgba(255, 255, 255, 0.96) !important;
    border-bottom: 2px solid #38bdf8 !important;
}

/* 6. 🌈 Rainbow Dream Theme */
[data-theme="rainbow"] body {
    background: radial-gradient(circle at 10% 10%, #fef3c7 0%, #fce7f3 30%, #ede9fe 60%, #dbeafe 85%, #d1fae5 100%) !important;
}

[data-theme="rainbow"] .content-card-section,
[data-theme="rainbow"] .fb-profile-card,
[data-theme="rainbow"] .teacher-photo-card {
    border: 2.5px solid #c084fc !important;
    box-shadow: 0 10px 30px rgba(168, 85, 247, 0.12) !important;
}

[data-theme="rainbow"] .info-card-ribbon,
[data-theme="rainbow"] .committee-header-ribbon {
    background: linear-gradient(135deg, #ec4899 0%, #a855f7 50%, #3b82f6 100%) !important;
    color: #ffffff !important;
}

/* 7. 🌿 Nature Theme */
[data-theme="nature"] body {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 40%, #fefce8 100%) !important;
}
[data-theme="nature"] .content-card-section,
[data-theme="nature"] .fb-profile-card,
[data-theme="nature"] .teacher-photo-card {
    border-color: #86efac !important;
    box-shadow: 0 8px 24px rgba(5, 150, 105, 0.12) !important;
}

/* 7. 🌸 Sakura Theme */
[data-theme="sakura"] body {
    background: linear-gradient(135deg, #fff1f2 0%, #fce7f3 40%, #ffe4e6 100%) fixed !important;
}
[data-theme="sakura"] .content-card-section,
[data-theme="sakura"] .fb-profile-card,
[data-theme="sakura"] .teacher-photo-card {
    border-color: #fecdd3 !important;
    box-shadow: 0 8px 24px rgba(225, 29, 72, 0.12) !important;
}

/* 8. 🔥 Sunset Theme */
[data-theme="sunset"] body {
    background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 40%, #fee2e2 100%) fixed !important;
}
[data-theme="sunset"] .content-card-section,
[data-theme="sunset"] .fb-profile-card,
[data-theme="sunset"] .teacher-photo-card {
    border-color: #fed7aa !important;
    box-shadow: 0 8px 24px rgba(234, 88, 12, 0.12) !important;
}

/* 9. 🏔️ Mountain Theme */
[data-theme="mountain"] body {
    background: linear-gradient(135deg, #fefce8 0%, #fef3c7 40%, #fed7aa 100%) fixed !important;
}
[data-theme="mountain"] .content-card-section,
[data-theme="mountain"] .fb-profile-card,
[data-theme="mountain"] .teacher-photo-card {
    border-color: #fde047 !important;
    box-shadow: 0 8px 24px rgba(202, 138, 4, 0.12) !important;
}

/* ==========================================
   Section Empty State
   ========================================== */
.section-empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: #94a3b8;
}

.section-empty-state .empty-icon {
    display: block;
    font-size: 3.5rem;
    margin-bottom: 1rem;
    opacity: 0.6;
}

.section-empty-state .empty-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 0.5rem;
}

.section-empty-state .empty-desc {
    font-size: 0.88rem;
    color: #94a3b8;
}

/* ==========================================
   Base & Reset

   ========================================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-thai);
    background: var(--bg-gradient);
    background-attachment: fixed;
    color: var(--text-main);
    line-height: 1.65;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font-family: inherit;
    border: none;
    background: none;
    cursor: pointer;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ==========================================
   Top Navigation Bar (No Hamburger)
   ========================================== */
.top-navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 2px solid #bae6fd;
    box-shadow: 0 4px 20px rgba(14, 165, 233, 0.08);
    transition: all 0.3s ease;
}

.nav-container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0.5rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: nowrap;
}

.nav-left-group {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    flex-shrink: 0;
}

.btn-drawer-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 9999px;
    background: linear-gradient(135deg, #e0f2fe, #f0fdf4);
    border: 1.5px solid #0284c7;
    color: #0369a1;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 6px rgba(2, 132, 199, 0.12);
    white-space: nowrap;
    flex-shrink: 0;
}

.btn-drawer-toggle:hover {
    background: #0284c7;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.25);
}

.btn-drawer-toggle .material-icons-round {
    font-size: 20px;
}

/* ==========================================
   Side Drawer Menu Styles
   ========================================== */
.side-drawer {
    position: fixed;
    top: 0;
    left: 0;
    width: 320px;
    max-width: 86vw;
    height: 100vh;
    background: #ffffff;
    box-shadow: 4px 0 30px rgba(0, 0, 0, 0.18);
    z-index: 9999;
    transform: translateX(-105%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.side-drawer.open {
    transform: translateX(0);
}

.drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(4px);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s ease;
}

.drawer-overlay.open {
    opacity: 1;
    visibility: visible;
}

.side-drawer-header {
    padding: 16px 20px;
    background: linear-gradient(135deg, #0284c7, #0369a1);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.drawer-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.drawer-mascot {
    font-size: 1.8rem;
}

.drawer-title-wrap {
    display: flex;
    flex-direction: column;
}

.drawer-title {
    font-family: var(--font-title);
    font-weight: 700;
    font-size: 1.05rem;
    color: #ffffff;
}

.drawer-sub {
    font-size: 0.75rem;
    color: #e0f2fe;
}

.btn-close-drawer {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: #ffffff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s;
}

.btn-close-drawer:hover {
    background: rgba(255, 255, 255, 0.35);
}

.side-drawer-nav {
    flex: 1;
    overflow-y: auto;
    padding: 14px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.drawer-nav-section-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
    padding: 10px 12px 4px 12px;
}

.drawer-nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: 10px;
    color: #334155;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.15s ease;
    border: 1px solid transparent;
    cursor: pointer;
}

.drawer-nav-item:hover {
    background: #f0f9ff;
    color: #0284c7;
    border-color: #bae6fd;
    transform: translateX(3px);
}

.drawer-nav-item.active {
    background: #e0f2fe;
    color: #0284c7;
    font-weight: 700;
    border-color: #7dd3fc;
}

.drawer-nav-item .material-icons-round {
    font-size: 20px;
    color: #0284c7;
    flex-shrink: 0;
}

.drawer-sub-list {
    margin-left: 18px;
    padding-left: 10px;
    border-left: 2px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-bottom: 4px;
}

.drawer-sub-item {
    padding: 6px 10px;
    font-size: 0.82rem;
    color: #475569;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.15s;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.drawer-sub-item:hover {
    background: #f1f5f9;
    color: #0284c7;
}

.drawer-sub-item.active {
    background: #f0f9ff;
    color: #0284c7;
    font-weight: 700;
}

/* Brand */
.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    flex-shrink: 0;
    white-space: nowrap;
}

.brand-mascot {
    font-size: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #e0f2fe, #fef3c7);
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(2, 132, 199, 0.15);
    animation: bounceSlow 3s ease-in-out infinite;
    flex-shrink: 0;
}

.brand-text {
    display: flex;
    flex-direction: column;
    white-space: nowrap;
}

.brand-title {
    font-family: var(--font-title);
    font-size: 1.1rem;
    font-weight: 700;
    color: #0369a1;
    line-height: 1.2;
    white-space: nowrap;
}

.brand-title span {
    color: #f59e0b;
    font-family: var(--font-brand);
    margin-left: 4px;
}

.brand-sub {
    font-size: 0.75rem;
    color: var(--text-light);
    font-weight: 500;
    white-space: nowrap;
}

/* Desktop Menu */
.nav-menu {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: nowrap;
    flex-shrink: 0;
}

.nav-item-dropdown {
    position: relative;
    flex-shrink: 0;
    white-space: nowrap;
}

.nav-link-btn {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    gap: 0.35rem;
    padding: 0.45rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text-muted);
    background: transparent;
    transition: all 0.2s ease;
    white-space: nowrap !important;
    word-break: keep-all !important;
    overflow: visible;
    flex-shrink: 0;
}

.nav-label {
    white-space: nowrap !important;
    word-break: keep-all !important;
    display: inline-block;
}

.nav-link-btn .nav-icon {
    font-size: 1.15rem;
    color: var(--primary);
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.nav-link-btn .nav-caret {
    font-size: 1.05rem;
    color: var(--text-light);
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.nav-link-btn:hover {
    background: var(--primary-pastel);
    color: var(--primary);
}

.nav-link-btn:hover .nav-icon {
    transform: scale(1.15);
}

.nav-link-btn.current {
    background: linear-gradient(135deg, #0284c7, #0ea5e9);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.25);
}

.nav-link-btn.current .nav-icon,
.nav-link-btn.current .nav-caret {
    color: #ffffff;
}

/* Dropdown Panel */
.dropdown-panel {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 310px;
    background: #ffffff;
    border-radius: var(--radius-md);
    border: 2px solid #bae6fd;
    box-shadow: var(--shadow-lg);
    padding: 0.6rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 100;
}

.nav-item-dropdown:hover .dropdown-panel,
.nav-item-dropdown:focus-within .dropdown-panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-header {
    padding: 0.45rem 0.75rem 0.55rem;
    border-bottom: 1px dashed #e2e8f0;
    margin-bottom: 0.4rem;
}

.dropdown-header-title {
    font-size: 0.8rem;
    font-weight: 700;
    color: #0284c7;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.dropdown-list {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.dropdown-link {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.55rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text-main);
    transition: all 0.15s ease;
}

.dropdown-link .child-icon {
    font-size: 1.15rem;
    color: #0ea5e9;
    background: #f0f9ff;
    padding: 4px;
    border-radius: 8px;
}

.dropdown-link:hover {
    background: #f0fdf4;
    color: #059669;
    transform: translateX(4px);
}

.dropdown-link:hover .child-icon {
    background: #d1fae5;
    color: #059669;
}

.dropdown-link.active {
    background: #e0f2fe;
    color: #0284c7;
    font-weight: 700;
}

/* Nav Actions & Search Button */
.nav-actions {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.65rem;
    flex-wrap: nowrap;
    flex-shrink: 0;
}

.btn-search-nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: #f1f5f9;
    border: 1.5px solid #cbd5e1;
    border-radius: var(--radius-full);
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-search-nav:hover {
    background: #ffffff;
    border-color: var(--primary);
    color: var(--primary);
    box-shadow: 0 2px 10px rgba(14, 165, 233, 0.15);
}

.search-kbd {
    font-size: 0.72rem;
    font-family: var(--font-en);
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 2px 6px;
    color: var(--text-light);
}

/* Mobile Scrollable Sub Bar */
.mobile-nav-bar {
    display: none;
    overflow-x: auto;
    white-space: nowrap;
    padding: 0.4rem 1rem 0.6rem;
    gap: 0.5rem;
    scrollbar-width: none;
    border-top: 1px solid #e2e8f0;
}

.mobile-nav-bar::-webkit-scrollbar {
    display: none;
}

.mobile-nav-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.75rem;
    background: #ffffff;
    border: 1px solid #bae6fd;
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    flex-shrink: 0;
}

.mobile-nav-pill.active {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
}

.mobile-nav-pill .pill-icon {
    font-size: 1rem;
}

/* ==========================================
   Main Wrapper & Page Animations
   ========================================== */
.main-wrapper {
    flex: 1;
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    padding: 1.5rem;
    box-sizing: border-box;
    transform: translateZ(0);
}

.page-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

@keyframes pageFadeUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================
   Facebook-Style Personal Profile Cover Header
   ========================================== */
.fb-profile-card {
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: var(--theme-section-bg, #ffffff) !important;
    border: 2.5px solid var(--theme-card-border, #bae6fd) !important;
    box-shadow: var(--shadow-md);
    margin-bottom: 2.2rem;
    position: relative;
}

.fb-cover-container {
    position: relative;
    width: 100%;
    aspect-ratio: 3.2 / 1;
    min-height: 220px;
    max-height: 380px;
    overflow: hidden;
    background: linear-gradient(135deg, #0284c7, #38bdf8);
}

.fb-cover-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.fb-cover-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, 0.25) 100%);
    pointer-events: none;
}

.fb-profile-body {
    padding: 0 2.4rem 2.2rem;
    position: relative;
    background: var(--theme-section-bg, #ffffff) !important;
}

.fb-profile-main {
    display: flex;
    gap: 2.2rem;
    align-items: flex-start;
    position: relative;
    z-index: 10;
    flex-wrap: wrap;
}

.fb-avatar-wrap {
    width: 180px;
    height: 230px;
    border-radius: 24px;
    border: 5px solid #ffffff;
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.22);
    overflow: hidden;
    background: linear-gradient(135deg, #e0f2fe, #d1fae5);
    flex-shrink: 0;
    position: relative;
    margin-top: -90px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fb-avatar-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}

.fb-avatar-placeholder {
    font-size: 5.5rem;
}

.fb-profile-info {
    flex: 1;
    min-width: 320px;
    padding-top: 1.2rem;
    padding-bottom: 0.5rem;
}

.fb-profile-name {
    font-family: var(--font-title);
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--theme-header-text, #0369a1) !important;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    line-height: 1.3;
    margin-bottom: 0.35rem;
}

.teacher-name-main {
    display: inline-block;
    color: inherit !important;
    word-break: keep-all;
    overflow-wrap: break-word;
}

.fb-profile-badge-row {
    margin-top: 6px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.fb-profile-sub {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--theme-text, #475569) !important;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    line-height: 1.6;
    margin-top: 10px;
    margin-bottom: 12px;
}

.fb-profile-sub span {
    color: inherit !important;
}

.sub-sep {
    color: var(--theme-card-border, #94a3b8) !important;
    margin: 0 4px;
}

.fb-profile-bio {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--theme-header-text, #0369a1) !important;
    background: var(--theme-card, #f0f9ff) !important;
    border: 1.5px solid var(--theme-card-border, #bae6fd) !important;
    border-left: 5px solid var(--primary, #0284c7) !important;
    padding: 12px 20px;
    border-radius: 12px;
    margin-top: 14px;
    line-height: 1.65;
}

.fb-profile-bottom-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 1.2rem;
    width: 100%;
    border-top: none;
}

.fb-profile-bottom-left {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.fb-profile-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.btn-fb-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 44px;
    padding: 0 20px;
    border-radius: var(--radius-full);
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1;
    box-sizing: border-box;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-fb-action:hover {
    transform: translateY(-2px);
}

.btn-fb-primary {
    background: linear-gradient(135deg, #0284c7, #0369a1);
    color: #ffffff !important;
    border: none;
    box-shadow: 0 4px 14px rgba(2, 132, 199, 0.3);
}

.btn-fb-secondary {
    background: #ffffff;
    color: var(--theme-header-text, #0369a1) !important;
    border: 2px solid var(--theme-card-border, #bae6fd);
}

/* ==========================================
   Hero Train Banner (ขบวนรถไฟ & ท้องฟ้าสดใส)
   ========================================== */
.hero-train-banner {
    position: relative;
    background: linear-gradient(135deg, #dbeafe 0%, #fef3c7 50%, #dcfce7 100%);
    border: 3px solid #7dd3fc;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 2.5rem 2rem 2rem;
    overflow: hidden;
    text-align: center;
}

.train-sky-decor {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.sky-cloud, .sky-balloon, .sky-sun, .sky-star {
    position: absolute;
    user-select: none;
}

.sky-sun {
    top: 15px;
    right: 35px;
    font-size: 3rem;
    animation: rotateSlow 20s linear infinite;
}

.sky-cloud.c1 { top: 20px; left: 6%; font-size: 2.5rem; opacity: 0.85; animation: floatCloud 25s linear infinite; }
.sky-cloud.c2 { top: 60px; right: 15%; font-size: 2.2rem; opacity: 0.75; animation: floatCloud 30s linear infinite reverse; }
.sky-balloon.b1 { top: 15px; left: 22%; font-size: 2.4rem; animation: floatBalloon 4s ease-in-out infinite alternate; }
.sky-balloon.b2 { top: 35px; right: 26%; font-size: 2rem; animation: floatBalloon 5s ease-in-out infinite alternate 1s; }
.sky-star.s1 { top: 80px; left: 35%; font-size: 1.5rem; animation: twinkle 2s ease-in-out infinite alternate; }
.sky-star.s2 { top: 30px; right: 38%; font-size: 1.6rem; animation: twinkle 2.5s ease-in-out infinite alternate 0.5s; }

.hero-train-content {
    position: relative;
    z-index: 2;
    max-width: 960px;
    margin: 0 auto;
}

.hero-badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #ffffff;
    color: #0369a1;
    font-size: 0.95rem;
    font-weight: 700;
    padding: 0.45rem 1.25rem;
    border-radius: var(--radius-full);
    border: 2px solid #38bdf8;
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.12);
    margin-bottom: 1.2rem;
}

.hero-main-title {
    font-family: var(--font-title);
    font-size: clamp(1.75rem, 3.5vw, 2.35rem);
    font-weight: 800;
    color: var(--theme-header-text, #0f172a) !important;
    line-height: 1.3;
    margin-bottom: 0.75rem;
    letter-spacing: -0.01em;
}

.hero-main-title .hero-highlight {
    display: block;
    color: #ffffff !important;
    background: linear-gradient(135deg, #ffffff 0%, #e0f2fe 45%, #7dd3fc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    font-size: clamp(1.4rem, 2.8vw, 1.85rem);
    font-weight: 800;
    margin-top: 0.35rem;
}

[data-theme="formal"] .hero-main-title .hero-highlight {
    background: linear-gradient(135deg, #fef08a 0%, #fde047 50%, #f59e0b 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

[data-theme="rainbow"] .hero-main-title .hero-highlight {
    background: linear-gradient(135deg, #f472b6 0%, #c084fc 50%, #60a5fa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-sub-text {
    font-size: 1.1rem;
    color: var(--theme-text, #334155) !important;
    margin-bottom: 1.8rem;
    line-height: 1.6;
}

.hero-sub-text strong {
    color: var(--theme-header-text, #0f172a) !important;
    font-weight: 700;
}

.train-showcase-wrapper {
    margin-top: 1rem;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    border: 4px solid var(--theme-card-border, #ffffff);
    background: var(--theme-card, #ffffff);
}

.train-banner-img {
    width: 100%;
    max-height: 380px;
    object-fit: cover;
    border-radius: calc(var(--radius-md) - 4px);
    transition: transform 0.5s ease;
}

.train-banner-img:hover {
    transform: scale(1.015);
}

/* ==========================================
   Section Components & Cute Headers
   ========================================== */
.content-card-section {
    background: var(--theme-section-bg, #ffffff) !important;
    border: 2px solid var(--theme-card-border, #bae6fd) !important;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 2.2rem;
    position: relative;
}

.section-header-cute {
    display: flex;
    align-items: flex-start;
    gap: 1.2rem;
    margin-bottom: 1.8rem;
    padding-bottom: 1.2rem;
    border-bottom: 2px dashed var(--theme-card-border, #bae6fd);
}

.header-mascot {
    font-size: 2.6rem;
    width: 60px;
    height: 60px;
    background: var(--theme-card, #e0f2fe);
    border: 2px solid var(--theme-card-border, #bae6fd);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    flex-shrink: 0;
}

.header-titles {
    display: flex;
    flex-direction: column;
}

.header-tag {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--theme-header-text, #0284c7) !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.header-titles h2 {
    font-family: var(--font-title);
    font-size: 2.15rem;
    font-weight: 800;
    color: var(--theme-header-text, #0f172a) !important;
    line-height: 1.3;
    margin: 3px 0 6px;
}

.header-titles p {
    font-size: 1.25rem;
    color: var(--theme-text, #334155) !important;
    font-weight: 600;
    line-height: 1.5;
}

/* ==========================================
   Committee Cards Grid
   ========================================== */
.committee-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.committee-cute-card {
    background: var(--theme-card, #ffffff);
    border: 2px solid var(--theme-card-border, #e2e8f0);
    border-radius: var(--radius-md);
    padding: 0;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.committee-cute-card:hover {
    transform: translateY(-6px);
    border-color: #38bdf8;
    box-shadow: var(--shadow-hover);
}

.committee-cute-card.chairman-card {
    border-color: #f59e0b;
    background: #ffffff;
    box-shadow: 0 8px 24px rgba(245, 158, 11, 0.15);
}

.committee-decor-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.85rem 1rem;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 2;
    background: linear-gradient(to bottom, rgba(0,0,0,0.32) 0%, transparent 100%);
}

.animal-tag {
    font-size: 1.8rem;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}

.committee-rank-badge {
    font-size: 1.05rem;
    font-weight: 800;
    padding: 0.35rem 0.95rem;
    border-radius: var(--radius-full);
    background: rgba(255,255,255,0.92);
    color: #0f172a;
    backdrop-filter: blur(6px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    letter-spacing: 0.02em;
}

.committee-rank-badge.rank-chairman {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    color: #92400e;
    border: 1.5px solid #f59e0b;
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.3);
}

.committee-avatar-wrapper {
    width: 100%;
    height: 0;
    padding-bottom: 120%; /* 3:4 Portrait Ratio */
    position: relative;
    background: linear-gradient(135deg, #e0f2fe, #fef3c7);
    flex-shrink: 0;
}

.avatar-ring {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border-radius: 0;
    background: linear-gradient(135deg, #e0f2fe, #fef3c7);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: none;
    overflow: hidden;
}

.avatar-ring img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 15%;
}

.chairman-card .avatar-ring {
    background: linear-gradient(135deg, #fef3c7, #fed7aa);
}

.avatar-icon {
    font-size: 5.5rem;
    opacity: 0.85;
}

/* Committee Text & Member Badge */
.committee-text-block {
    padding: 1.25rem 1.1rem 1.45rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    background: var(--theme-card, #ffffff) !important;
}

/* Member Name Label Badge (พรีเซ็ตลาเบลแปะที่ชื่อกรรมการ) */
.committee-member-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 1.1rem;
    font-weight: 800;
    padding: 0.38rem 1.25rem;
    border-radius: 9999px;
    margin-bottom: 0.25rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
    letter-spacing: 0.02em;
    transition: all 0.2s ease;
}

/* Shape Presets */
.committee-member-badge.shape-pill {
    border-radius: 9999px;
}
.committee-member-badge.shape-badge {
    border-radius: 12px;
}
.committee-member-badge.shape-ribbon {
    border-radius: 6px;
    position: relative;
    padding: 0.4rem 1.3rem;
}
.committee-member-badge.shape-outline {
    border-radius: 9999px;
    background: #ffffff !important;
    border-width: 2.5px !important;
}

/* Extra Style Presets for Committee */
.badge-style-sunset {
    background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 40%, #ea580c 100%) !important;
    color: #7c2d12 !important;
    border: 2.5px solid #ea580c !important;
    box-shadow: 0 6px 18px rgba(234, 88, 12, 0.35) !important;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
}

.badge-style-teal {
    background: linear-gradient(135deg, #f0fdfa 0%, #ccfbf1 40%, #0d9488 100%) !important;
    color: #134e4a !important;
    border: 2.5px solid #0d9488 !important;
    box-shadow: 0 6px 18px rgba(13, 148, 136, 0.35) !important;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
}

.committee-name {
    font-family: var(--font-title);
    font-size: 1.48rem;
    font-weight: 800;
    color: var(--theme-header-text, #0f172a) !important;
    margin: 0.15rem 0;
    padding: 0 0.5rem;
    line-height: 1.35;
    text-align: center;
}

.committee-position-text {
    font-size: 1.15rem;
    color: var(--theme-text, #475569) !important;
    margin: 0;
    padding: 0 0.5rem;
    font-weight: 600;
    line-height: 1.4;
    text-align: center;
}

/* School text below position without separating line */
.committee-school-text {
    font-size: 1.12rem;
    color: var(--theme-header-text, #0284c7) !important;
    margin: 0.15rem 0 0;
    padding: 0 0.5rem;
    font-weight: 700;
    line-height: 1.4;
    text-align: center;
    letter-spacing: 0.01em;
}

/* ==========================================
   Teacher Profile Section (Large Prominent Showcase)
   ========================================== */
.profile-hero-layout {
    display: grid;
    grid-template-columns: 460px 1fr;
    gap: 1.6rem;
    align-items: stretch;
}

.profile-photo-col {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.teacher-photo-card {
    background: linear-gradient(180deg, #f0fdf4 0%, #ffffff 100%);
    border: 2.5px solid #86efac;
    border-radius: 24px;
    padding: 1.4rem 1.3rem;
    text-align: center;
    box-shadow: 0 10px 30px rgba(16, 185, 129, 0.12);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    flex: 1;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.teacher-photo-card:hover {
    box-shadow: 0 16px 40px rgba(16, 185, 129, 0.18);
}

.teacher-avatar-frame {
    width: 100%;
    flex: 1;
    min-height: 340px;
    margin: 0 0 1rem 0;
    background: linear-gradient(135deg, #bbf7d0, #fef08a);
    border-radius: 20px;
    border: 3.5px solid #ffffff;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.teacher-avatar-frame img,
.teacher-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    border-radius: 18px;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.teacher-avatar-frame:hover img,
.teacher-avatar-frame:hover .teacher-avatar-img {
    transform: scale(1.03);
}

.teacher-large-avatar {
    font-size: 6.5rem;
}

.teacher-info-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    margin-top: auto;
}

.teacher-badge-container {
    margin-bottom: 0.85rem;
    display: flex;
    justify-content: center;
    width: 100%;
}

.teacher-badge-container:empty,
.fb-profile-badge-row:empty {
    display: none !important;
    margin: 0 !important;
    padding: 0 !important;
}


.teacher-badge-container .teacher-title-badge {
    max-width: 100%;
    white-space: normal;
    text-align: center;
    justify-content: center;
    font-size: 1.05rem;
    padding: 6px 14px;
    word-break: keep-all;
    overflow-wrap: break-word;
}

/* ==========================================
   Teacher Title Badge (7 Customizable Distinct Styles)
   ========================================== */
.teacher-title-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 1.15rem;
    border-radius: var(--radius-full);
    font-size: 1.12rem;
    font-weight: 800;
    line-height: 1.35;
    white-space: nowrap;
    vertical-align: middle;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}

.teacher-title-badge .badge-icon {
    font-size: 1.25rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.teacher-title-badge .badge-text {
    font-weight: 800;
    letter-spacing: 0.01em;
    word-break: keep-all;
    overflow-wrap: break-word;
}

/* 1. 🏆 ราชบัณฑิตสีทองพรีเมียม (Royal Gold) */
.badge-style-gold {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 40%, #f59e0b 100%) !important;
    color: #78350f !important;
    border: 2.5px solid #d97706 !important;
    box-shadow: 0 6px 18px rgba(245, 158, 11, 0.38) !important;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
}

/* 2. 💎 บลูไดมอนด์นีออน (Cyber Blue Glow) */
.badge-style-blue {
    background: linear-gradient(135deg, #f0f9ff 0%, #bae6fd 40%, #0284c7 100%) !important;
    color: #082f49 !important;
    border: 2.5px solid #0284c7 !important;
    box-shadow: 0 6px 18px rgba(2, 132, 199, 0.35) !important;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
}

/* 3. 🌿 มรกตแห่งวิชาชีพ (Emerald Green) */
.badge-style-emerald {
    background: linear-gradient(135deg, #f0fdf4 0%, #a7f3d0 40%, #10b981 100%) !important;
    color: #064e3b !important;
    border: 2.5px solid #059669 !important;
    box-shadow: 0 6px 18px rgba(16, 185, 129, 0.35) !important;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
}

/* 4. 🌺 ทับทิมเกียรติยศ (Ruby Crimson) */
.badge-style-ruby {
    background: linear-gradient(135deg, #fff1f2 0%, #fecdd3 40%, #f43f5e 100%) !important;
    color: #881337 !important;
    border: 2.5px solid #e11d48 !important;
    box-shadow: 0 6px 18px rgba(244, 63, 94, 0.35) !important;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
}

/* 5. 💜 อเมทิสต์พรีเมียม (Amethyst Violet) */
.badge-style-purple {
    background: linear-gradient(135deg, #faf5ff 0%, #e9d5ff 40%, #8b5cf6 100%) !important;
    color: #4c1d95 !important;
    border: 2.5px solid #7c3aed !important;
    box-shadow: 0 6px 18px rgba(139, 92, 246, 0.35) !important;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
}

/* 6. 🏛️ ออบซิเดียนหรูหรา (Obsidian Dark) */
.badge-style-obsidian {
    background: linear-gradient(135deg, #334155 0%, #0f172a 100%) !important;
    color: #f8fafc !important;
    border: 2.5px solid #94a3b8 !important;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.45) !important;
}

/* 7. 📜 ริบบิ้นทองทางการ (Golden Ribbon) */
.badge-style-ribbon {
    background: linear-gradient(90deg, #d97706 0%, #b45309 100%) !important;
    color: #ffffff !important;
    border: 2.5px solid #fde047 !important;
    border-radius: 8px !important;
    box-shadow: 0 6px 18px rgba(180, 83, 9, 0.4) !important;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

/* ==========================================
   Infographic Card Design (ลาเบลคาด + กรอบ + พื้นใน + กล่องรายละเอียด)
   ========================================== */
.info-grid-cute {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
    align-content: stretch;
}

.info-item-cute {
    display: flex;
    flex-direction: column;
    background: var(--theme-card, #ffffff);
    border: 1.5px solid var(--theme-card-border, #cbd5e1);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.04);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.info-item-cute:hover {
    border-color: var(--theme-card-icon-bg, #0284c7);
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.07);
}

.info-span-2 {
    grid-column: 1 / -1;
}

/* 1. ลาเบลคาดด้านบน (Header Ribbon / Top Label) */
.info-card-ribbon {
    background: var(--theme-card-icon-bg, #0284c7);
    color: var(--theme-field-label, #ffffff);
    padding: 0.48rem 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.55rem;
    border-bottom: 1px solid var(--theme-card-border, rgba(0, 0, 0, 0.08));
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.01em;
}

.info-ribbon-icon {
    font-size: 1.15rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.info-ribbon-label {
    flex: 1;
    color: inherit;
    font-weight: 700;
}

/* 2. พื้นที่ภายในกรอบ (Card Body) */
.info-card-content {
    padding: 0.55rem 0.75rem;
    background: var(--theme-card, #ffffff);
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* 3. กล่องรายละเอียดภายใน (Inner Detail Box) */
.info-field-box {
    background: rgba(0, 0, 0, 0.02);
    border: 1.2px solid var(--theme-card-border, #e2e8f0);
    border-radius: 9px;
    padding: 0.45rem 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-height: 38px;
    justify-content: center;
}

.info-field-val {
    font-size: 1.1rem;
    color: var(--theme-field-value, #0f172a) !important;
    font-weight: 700;
    line-height: 1.35;
    word-break: break-word;
    white-space: normal;
}

.info-field-val.highlight-rank {
    color: var(--theme-header-text, #0284c7) !important;
    font-weight: 800;
    font-size: 1.15rem;
}

.info-field-sub {
    font-size: 0.95rem;
    color: var(--theme-text, #f8fafc) !important;
    opacity: 0.9;
    font-weight: 600;
    margin-top: 2px;
    display: block;
}

/* Legacy Support & Fallback */
.info-icon {
    font-size: 1.5rem;
    width: 42px;
    height: 42px;
    background: var(--theme-card-icon-bg, #f0f9ff);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 1px solid var(--theme-card-border, #e0f2fe);
}

.info-text {
    display: flex;
    flex-direction: column;
}

.info-text label {
    font-size: 0.85rem;
    color: var(--theme-field-label, #475569) !important;
    font-weight: 600;
    margin-bottom: 3px;
}

.info-text strong {
    font-size: 1.05rem;
    color: var(--theme-field-value, #0f172a) !important;
    font-weight: 700;
    line-height: 1.4;
}

/* ==========================================
   PA Statement Banner & Teaching Schedule (18 hrs)
   ========================================== */
.pa-statement-banner {
    display: flex;
    align-items: flex-start;
    gap: 1.2rem;
    background: linear-gradient(135deg, #f0fdf4, #e0f2fe);
    border: 2px solid #86efac;
    border-radius: var(--radius-md);
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.8rem;
}

.statement-icon {
    font-size: 2.2rem;
    flex-shrink: 0;
}

.statement-body strong {
    display: block;
    font-size: 1.05rem;
    color: #047857;
    margin-bottom: 0.35rem;
}

.statement-body p {
    font-size: 0.92rem;
    color: #334155;
    line-height: 1.55;
}

.schedule-columns-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
    gap: 1.8rem;
}

.schedule-card-panel {
    background: #ffffff;
    border: 2px solid #e2e8f0;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
}

.schedule-panel-header {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 1.1rem 1.4rem;
    border-bottom: 2px solid #e2e8f0;
}

.header-academic {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border-bottom-color: #fcd34d;
}

.header-activities {
    background: linear-gradient(135deg, #ede9fe, #ddd6fe);
    border-bottom-color: #c4b5fd;
}

.panel-icon {
    font-size: 2rem;
}

.schedule-panel-header h3 {
    font-family: var(--font-title);
    font-size: 1.1rem;
    font-weight: 700;
    color: #0f172a;
}

.schedule-panel-header p {
    font-size: 0.82rem;
    color: #475569;
}

.schedule-table-wrap {
    flex: 1;
    overflow-x: auto;
}

.cute-table {
    width: 100%;
    border-collapse: collapse;
}

.cute-table th {
    background: #f8fafc;
    font-size: 0.85rem;
    font-weight: 700;
    color: #64748b;
    padding: 0.75rem 1.2rem;
    border-bottom: 1px solid #e2e8f0;
    text-align: left;
}

.cute-table td {
    padding: 0.75rem 1.2rem;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.92rem;
}

.cute-table tbody tr:hover {
    background: #f0f9ff;
}

.subject-cell {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.subject-icon {
    font-size: 1.2rem;
}

.subject-name {
    font-weight: 600;
    color: #1e293b;
}

.grade-badge {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 600;
    color: #0369a1;
    background: #e0f2fe;
    padding: 0.2rem 0.6rem;
    border-radius: var(--radius-full);
}

.activity-badge {
    color: #6d28d9;
    background: #ede9fe;
}

.hours-badge {
    display: inline-block;
    font-size: 0.88rem;
    font-weight: 700;
    color: #047857;
    background: #d1fae5;
    padding: 0.25rem 0.65rem;
    border-radius: var(--radius-full);
}

.activity-hours {
    color: #7c2d12;
    background: #ffedd5;
}

.text-right {
    text-align: right;
}

.schedule-summary-footer {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    background: linear-gradient(135deg, #dcfce7, #bbf7d0);
    border-top: 2px solid #86efac;
    padding: 0.95rem 1.4rem;
}

.summary-icon {
    font-size: 1.8rem;
}

.summary-text {
    display: flex;
    flex-direction: column;
}

.summary-text span {
    font-size: 0.82rem;
    color: #166534;
    font-weight: 600;
}

.summary-text strong {
    font-size: 1.15rem;
    color: #14532d;
    font-weight: 800;
}

/* ==========================================
   Reports Dual Grid (PA & Challenge)
   ========================================== */
.reports-dual-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(440px, 1fr));
    gap: 1.8rem;
}

.report-preview-box {
    background: #ffffff;
    border: 2px solid #bae6fd;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
}

.report-box-header {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 1.1rem 1.4rem;
    background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
    border-bottom: 2px solid #bae6fd;
}

.report-icon {
    font-size: 2rem;
}

.report-box-header h3 {
    font-family: var(--font-title);
    font-size: 1.15rem;
    font-weight: 700;
    color: #0369a1;
}

.report-box-header p {
    font-size: 0.82rem;
    color: #64748b;
}

.report-viewer-holder {
    padding: 1.2rem;
    flex: 1;
    min-height: 280px;
    background: #f8fafc;
}

.report-box-footer {
    padding: 0.9rem 1.4rem;
    background: #ffffff;
    border-top: 1px solid #e2e8f0;
    text-align: center;
}

.btn-cute-action {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 1.25rem;
    background: linear-gradient(135deg, #0284c7, #0ea5e9);
    color: #ffffff;
    font-size: 0.92rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.2);
    transition: all 0.2s ease;
}

.btn-cute-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(2, 132, 199, 0.3);
}

/* ==========================================
   Bottom Section: Photo Gallery & Video Player
   ========================================== */
.gallery-video-section {
    background: linear-gradient(180deg, #ffffff 0%, #f0fdf4 100%);
}

.subsection-title {
    font-family: var(--font-title);
    font-size: 1.35rem;
    font-weight: 700;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-bottom: 1.2rem;
}

.sub-icon {
    font-size: 1.6rem;
}

.video-helper-tag {
    font-size: 0.85rem;
    font-weight: 500;
    color: #0284c7;
    margin-left: 0.5rem;
}

/* Photos Masonry Grid */
.photos-masonry-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
    align-items: start;
}

.photos-masonry-grid:has(.photo-card-cute:only-child) {
    max-width: 820px;
    margin: 0 auto;
}

.photo-card-cute {
    background: #ffffff;
    border: 2px solid #e2e8f0;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
}

.photo-card-cute:hover {
    transform: translateY(-6px);
    border-color: #38bdf8;
    box-shadow: var(--shadow-hover);
}

.photo-image-frame {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
}

.photo-image-frame img {
    width: 100%;
    height: auto;
    max-height: 560px;
    object-fit: contain;
    display: block;
    transition: transform 0.4s ease;
}

.photo-card-cute:hover .photo-image-frame img {
    transform: scale(1.03);
}

.photo-overlay {
    position: absolute;
    inset: 0;
    background: rgba(2, 132, 199, 0.65);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.photo-card-cute:hover .photo-overlay {
    opacity: 1;
}

.zoom-icon {
    color: #ffffff;
    font-weight: 700;
    font-size: 0.95rem;
    background: rgba(0, 0, 0, 0.4);
    padding: 0.4rem 0.9rem;
    border-radius: var(--radius-full);
}

.photo-card-desc {
    padding: 1.1rem;
}

.photo-tag {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    color: #0284c7;
    background: #e0f2fe;
    padding: 0.2rem 0.6rem;
    border-radius: var(--radius-full);
    margin-bottom: 0.45rem;
}

.photo-card-desc h4 {
    font-family: var(--font-title);
    font-size: 1rem;
    font-weight: 700;
    color: var(--theme-header-text, #0f172a) !important;
    line-height: 1.35;
    margin-bottom: 0.35rem;
}

.photo-card-desc p {
    font-size: 0.85rem;
    color: var(--theme-text, #64748b) !important;
    line-height: 1.45;
}

/* ==========================================
   Video Cards Grid & Modern Player Thumbnail
   ========================================== */
.videos-cute-grid,
.video-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.video-card-cute {
    background: var(--theme-card, #ffffff) !important;
    border: 2px solid var(--theme-card-border, #e0f2fe) !important;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.06);
    display: flex;
    flex-direction: column;
    cursor: pointer;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.video-card-cute:hover {
    transform: translateY(-6px);
    border-color: var(--primary, #38bdf8) !important;
    box-shadow: 0 14px 30px rgba(2, 132, 199, 0.18);
}

.video-thumb-container {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #0f172a;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-thumb-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1), filter 0.3s ease;
}

.video-card-cute:hover .video-thumb-img {
    transform: scale(1.08);
    filter: brightness(0.92);
}

.video-thumb-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    color: #94a3b8;
    gap: 8px;
    padding: 16px;
    text-align: center;
}

.video-fallback-icon {
    font-size: 44px;
    color: #38bdf8;
}

.video-fallback-text {
    font-size: 0.85rem;
    color: #cbd5e1;
    max-width: 90%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.video-play-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0.4) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
    pointer-events: none;
    z-index: 1;
}

.video-card-cute:hover .video-play-overlay {
    background: radial-gradient(circle, rgba(0, 0, 0, 0.05) 0%, rgba(0, 0, 0, 0.5) 100%);
}

.play-btn-circle {
    width: 62px;
    height: 62px;
    background: #ef4444;
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(239, 68, 68, 0.5), 0 0 0 0 rgba(239, 68, 68, 0.4);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 3px solid rgba(255, 255, 255, 0.9);
}

.play-btn-circle .material-icons-round {
    font-size: 36px;
    margin-left: 3px; /* visual center for play triangle */
}

.video-card-cute:hover .play-btn-circle {
    transform: scale(1.15);
    background: #dc2626;
    box-shadow: 0 8px 30px rgba(239, 68, 68, 0.7), 0 0 0 10px rgba(239, 68, 68, 0.25);
    border-color: #ffffff;
}

.video-source-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 9999px;
    font-size: 0.72rem;
    font-weight: 700;
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
    z-index: 2;
    backdrop-filter: blur(4px);
}

.video-body {
    padding: 1.2rem;
    display: flex;
    flex-direction: column;
    flex: 1;
    background: var(--theme-card, #ffffff) !important;
}

.video-body h4 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--theme-header-text, #0f172a) !important;
    line-height: 1.45;
    margin-bottom: 0.45rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.video-body p {
    font-size: 0.85rem;
    color: var(--theme-text, #64748b) !important;
    line-height: 1.5;
    margin-bottom: 0.9rem;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.video-action-hint {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--theme-header-text, #0284c7) !important;
    margin-top: auto;
    transition: color 0.2s ease, transform 0.2s ease;
}

.video-card-cute:hover .video-action-hint {
    color: #0369a1;
    transform: translateX(4px);
}

/* ==========================================
   Subpages Layout & Topics Grid
   ========================================== */
.subpage-hero-banner {
    background: linear-gradient(135deg, #e0f2fe 0%, #fef3c7 100%);
    border: 2px solid #7dd3fc;
    border-radius: var(--radius-lg);
    padding: 2rem 2.2rem;
    box-shadow: var(--shadow-md);
    margin-bottom: 1.5rem;
}

.subpage-breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: #0284c7;
    margin-bottom: 0.75rem;
}

.subpage-breadcrumb a:hover {
    text-decoration: underline;
}

.subpage-breadcrumb .separator {
    color: #94a3b8;
}

.subpage-title-wrap {
    display: flex;
    align-items: center;
    gap: 1.2rem;
}

.subpage-mascot {
    font-size: 2.8rem;
}

.subpage-title-wrap h1 {
    font-family: var(--font-title);
    font-size: 1.85rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.25;
}

.subpage-title-wrap p {
    font-size: 0.95rem;
    color: #475569;
}

.challenge-hero-bg {
    background: linear-gradient(135deg, #fef3c7 0%, #fee2e2 100%);
    border-color: #fca5a5;
}

.challenge-overview-card {
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
    background: #ffffff;
    border: 2px solid #fde68a;
    border-radius: var(--radius-md);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.challenge-icon-box {
    font-size: 2.8rem;
}

.challenge-tag-pill {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 700;
    color: #b45309;
    background: #fef3c7;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    margin-bottom: 0.4rem;
}

.challenge-info-box h2 {
    font-family: var(--font-title);
    font-size: 1.25rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 0.4rem;
}

.challenge-info-box p {
    font-size: 0.92rem;
    color: #475569;
}

.subtopics-grid-cute {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.25rem;
}

.subtopic-card-cute {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: #ffffff;
    border: 2px solid #e2e8f0;
    border-radius: var(--radius-md);
    padding: 1.25rem;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: all 0.25s ease;
}

.subtopic-card-cute:hover {
    border-color: #0284c7;
    transform: translateY(-4px) translateX(4px);
    box-shadow: var(--shadow-md);
}

.subtopic-num-badge {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, #0284c7, #38bdf8);
    color: #ffffff;
    font-family: var(--font-en);
    font-size: 1.1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.subtopic-content {
    flex: 1;
}

/* ==========================================
   Challenge Photo Showcase & Gallery
   ========================================== */
.challenge-photos-section {
    margin-top: 32px;
    background: #ffffff;
    border: 2px solid var(--theme-card-border, #bae6fd);
    border-radius: var(--radius-lg, 20px);
    padding: 24px;
    box-shadow: 0 4px 16px rgba(2, 132, 199, 0.06);
}

.challenge-photos-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 1.5px dashed var(--theme-card-border, #e2e8f0);
}

.challenge-photos-title-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
}

.challenge-photos-mascot {
    font-size: 2.2rem;
    line-height: 1;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.challenge-photos-title h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--theme-header-text, #0369a1);
    font-family: var(--font-title);
}

.challenge-photos-title p {
    margin: 4px 0 0 0;
    font-size: 0.88rem;
    color: #64748b;
}

.challenge-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 18px;
}

.challenge-photo-card {
    background: #ffffff;
    border: 2px solid var(--theme-card-border, #bae6fd);
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
}

.challenge-photo-card:hover {
    transform: translateY(-5px);
    border-color: var(--theme-primary, #0284c7);
    box-shadow: 0 10px 24px rgba(2, 132, 199, 0.18);
}

.challenge-photo-card:hover .challenge-photo-thumb img {
    transform: scale(1.06);
}

.challenge-photo-thumb {
    width: 100%;
    aspect-ratio: 4/3;
    overflow: hidden;
    position: relative;
    background: #f8fafc;
}

.challenge-photo-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.challenge-photo-zoom-badge {
    position: absolute;
    inset: 0;
    background: rgba(2, 132, 199, 0.35);
    backdrop-filter: blur(2px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.25s ease;
    color: #ffffff;
}

.challenge-photo-card:hover .challenge-photo-zoom-badge {
    opacity: 1;
}

.challenge-photo-zoom-badge span {
    background: rgba(255, 255, 255, 0.95);
    color: #0284c7;
    font-size: 1.5rem;
    padding: 10px;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.challenge-photo-caption {
    padding: 12px 14px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #1e293b;
    line-height: 1.4;
    background: #ffffff;
    border-top: 1px solid #f1f5f9;
}


.subtopic-content .subtopic-icon {
    font-size: 1.2rem;
    color: #0ea5e9;
    margin-bottom: 2px;
}

.subtopic-content h3 {
    font-family: var(--font-title);
    font-size: 1rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.35;
    margin-bottom: 2px;
}

.subtopic-content p {
    font-size: 0.8rem;
    color: #64748b;
}

.subtopic-arrow {
    color: #94a3b8;
    transition: transform 0.2s ease;
}

.subtopic-card-cute:hover .subtopic-arrow {
    transform: translateX(4px);
    color: #0284c7;
}

/* ==========================================
   PDF Viewer Components
   ========================================== */
.pdf-card-panel {
    background: var(--theme-section-bg, #ffffff) !important;
    border: 2.5px solid var(--theme-card-border, #bae6fd) !important;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    margin-bottom: 2.2rem;
    width: 100%;
}

.pdf-panel-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.4rem;
    background: var(--theme-card, #f0f9ff) !important;
    border-bottom: 2px solid var(--theme-card-border, #bae6fd) !important;
}

.pdf-title-info {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.pdf-badge-icon {
    color: #e11d48;
    font-size: 1.6rem;
}

.pdf-label-text {
    font-size: 1.2rem;
    color: var(--theme-header-text, #0f172a) !important;
    font-weight: 800;
}

.btn-pdf-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 700;
    color: #0284c7;
    background: #ffffff;
    border: 2px solid #bae6fd;
    padding: 0.45rem 1.15rem;
    border-radius: var(--radius-full);
    transition: all 0.2s ease;
}

.btn-pdf-link:hover {
    background: #0284c7;
    color: #ffffff;
}

.pdf-viewer-container {
    width: 100% !important;
    min-height: 860px !important;
    height: 860px !important;
    background: #1e293b;
    position: relative;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.pdf-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 1.4rem;
    background: #0f172a;
    color: #ffffff;
    font-size: 1rem;
    font-weight: 600;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

.pdf-toolbar-left {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.pdf-toolbar-right {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.pdf-btn {
    color: #ffffff;
    padding: 7px 14px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.15);
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.pdf-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

.pdf-canvas-wrapper {
    max-height: none;
    min-height: 860px;
    height: 100%;
    flex: 1;
    overflow-y: auto;
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    background: #334155;
    width: 100%;
    box-sizing: border-box;
}

.pdf-canvas-wrapper canvas {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.35);
    border-radius: 8px;
    background: #ffffff;
}

.pdf-viewer-container iframe {
    width: 100% !important;
    min-height: 860px !important;
    height: 860px !important;
    border: none;
    background: #ffffff;
}

.pdf-loading-cute {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    height: 320px;
    color: #94a3b8;
    font-size: 0.95rem;
    font-weight: 500;
}

.cute-spinner {
    font-size: 2.8rem;
    animation: trainShake 0.6s ease-in-out infinite alternate;
}

.pdf-placeholder-cute {
    text-align: center;
    padding: 3rem 2rem;
    background: #ffffff;
    border: 2px dashed #cbd5e1;
    border-radius: var(--radius-md);
}

.placeholder-icon {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.pdf-placeholder-cute h3 {
    font-family: var(--font-title);
    font-size: 1.15rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 0.25rem;
}

.pdf-placeholder-cute p {
    font-size: 0.9rem;
    color: #64748b;
}

.pdf-placeholder-cute code {
    background: #f1f5f9;
    color: #0284c7;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 700;
}

/* ==========================================
   Modals (Video Player & Lightbox & Search)
   ========================================== */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    animation: modalFadeIn 0.25s ease;
}

.modal-overlay.hidden {
    display: none;
}

@keyframes modalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-card {
    background: #ffffff;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 880px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: cardZoomIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes cardZoomIn {
    from {
        opacity: 0;
        transform: scale(0.94);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.modal-title-wrap {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.modal-icon {
    font-size: 1.5rem;
}

.modal-title-wrap h3 {
    font-family: var(--font-title);
    font-size: 1.15rem;
    font-weight: 700;
    color: #0f172a;
}

.modal-close-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #f1f5f9;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.modal-close-btn:hover {
    background: #fee2e2;
    color: #ef4444;
}

/* Video Frame Container */
.video-frame-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    background: #000000;
}

.video-responsive-iframe,
.video-responsive-player {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.modal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 1.5rem;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
}

.video-info-tag {
    font-size: 0.85rem;
    color: #64748b;
    font-weight: 600;
}

.btn-external {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: #0284c7;
}

/* Image Lightbox */
#image-lightbox {
    z-index: 999999 !important;
    background: rgba(10, 15, 30, 0.94);
    padding: 1rem;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

.lightbox-content {
    position: relative;
    max-width: 95vw;
    max-height: 95vh;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.lightbox-content img {
    max-width: 92vw;
    max-height: 85vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: var(--radius-md);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.85);
    border: 3px solid rgba(255, 255, 255, 0.95);
    background: #0f172a;
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.lightbox-close-btn {
    position: absolute;
    top: -48px;
    right: 0;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.35);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 10;
}

.lightbox-close-btn:hover {
    background: #ef4444;
    transform: scale(1.1);
}

.lightbox-nav-btn {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.22);
    border: 2px solid rgba(255, 255, 255, 0.4);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 9999999;
}

.lightbox-nav-btn.prev {
    left: 20px;
}

.lightbox-nav-btn.next {
    right: 20px;
}

.lightbox-nav-btn:hover {
    background: rgba(2, 132, 199, 0.9);
    border-color: #ffffff;
    transform: translateY(-50%) scale(1.12);
    box-shadow: 0 8px 24px rgba(2, 132, 199, 0.5);
}

.lightbox-nav-btn .material-icons-round {
    font-size: 36px;
}

.lightbox-counter {
    position: fixed;
    top: 20px;
    left: 24px;
    background: rgba(0, 0, 0, 0.65);
    color: #ffffff;
    font-size: 0.92rem;
    font-weight: 700;
    padding: 6px 16px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    z-index: 9999999;
}

.lightbox-caption {
    margin-top: 0.75rem;
    color: #ffffff;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    background: rgba(0, 0, 0, 0.6);
    padding: 0.4rem 1rem;
    border-radius: var(--radius-full);
}

.lightbox-caption:empty {
    display: none;
}

@media (max-width: 768px) {
    .lightbox-nav-btn {
        width: 44px;
        height: 44px;
    }
    .lightbox-nav-btn.prev { left: 8px; }
    .lightbox-nav-btn.next { right: 8px; }
    .lightbox-nav-btn .material-icons-round { font-size: 28px; }
}

/* Search Modal */
.search-modal-card {
    max-width: 580px;
}

.search-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-bottom: 2px solid #bae6fd;
}

.search-header .search-icon {
    font-size: 1.5rem;
    color: #0284c7;
}

.search-header input {
    flex: 1;
    border: none;
    outline: none;
    font-family: inherit;
    font-size: 1.05rem;
    color: #0f172a;
}

.search-results-list {
    max-height: 380px;
    overflow-y: auto;
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.search-item-row {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.15s ease;
}

.search-item-row:hover {
    background: #f0f9ff;
}

.search-item-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: #e0f2fe;
    color: #0284c7;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-item-info {
    flex: 1;
}

.search-item-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #0f172a;
}

.search-item-path {
    font-size: 0.78rem;
    color: #64748b;
}

.search-item-arrow {
    color: #cbd5e1;
}

/* ==========================================
   Site Footer
   ========================================== */
.site-footer {
    position: relative;
    background: #0f172a;
    color: #ffffff;
    padding: 3rem 1.5rem 2.5rem;
    text-align: center;
    margin-top: 3rem;
    overflow: hidden;
}

.footer-decorations {
    position: absolute;
    top: 15px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-around;
    pointer-events: none;
    opacity: 0.4;
    font-size: 1.8rem;
}

.footer-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
}

.footer-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.4rem 1.25rem;
    border-radius: var(--radius-full);
    font-size: 0.9rem;
    font-weight: 600;
    color: #38bdf8;
    margin-bottom: 1.2rem;
}

.footer-teacher {
    font-size: 1.15rem;
    color: #f8fafc;
    margin-bottom: 0.35rem;
}

.footer-teacher strong {
    color: #fde047;
}

.footer-school {
    font-size: 0.92rem;
    color: #94a3b8;
    margin-bottom: 0.25rem;
}

.footer-year {
    font-size: 0.85rem;
    color: #64748b;
}

/* ==========================================
   Cute Keyframe Animations
   ========================================== */
@keyframes bounceSlow {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

@keyframes floatCloud {
    0% { transform: translateX(-20px); }
    50% { transform: translateX(25px); }
    100% { transform: translateX(-20px); }
}

@keyframes floatBalloon {
    0% { transform: translateY(0) rotate(-2deg); }
    100% { transform: translateY(-15px) rotate(3deg); }
}

@keyframes rotateSlow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes twinkle {
    0% { opacity: 0.3; transform: scale(0.85); }
    100% { opacity: 1; transform: scale(1.15); }
}

@keyframes trainShake {
    0% { transform: translateX(-3px); }
    100% { transform: translateX(3px); }
}

/* ==========================================
   Responsive Adjustments & Mobile Protection
   ========================================== */
@media (max-width: 1024px) {
    .nav-menu {
        display: none !important; /* Hide complex desktop bar on tablet/mobile */
    }
    
    .mobile-nav-bar {
        display: flex !important; /* Show clean scrollable pill nav */
    }
    
    .profile-hero-layout {
        grid-template-columns: 1fr;
        justify-items: center;
    }

    .teacher-photo-card {
        max-width: 480px;
        width: 100%;
    }
    
    .schedule-columns-grid,
    .reports-dual-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .nav-container {
        padding: 0.4rem 0.75rem;
        gap: 0.5rem;
    }

    .brand-sub {
        display: none !important;
    }

    .brand-mascot {
        width: 38px;
        height: 38px;
        font-size: 1.5rem;
    }

    .brand-title {
        font-size: 0.95rem;
    }

    .btn-fb-action {
        flex: 1 1 calc(50% - 0.5rem);
        justify-content: center;
    }

    .fb-profile-body {
        padding: 0.8rem 1.25rem 1.5rem;
    }

    .fb-profile-main {
        flex-direction: column;
        align-items: center;
        text-align: center;
        width: 100%;
    }

    .fb-profile-info {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .fb-avatar-wrap {
        margin-top: -75px;
    }
}

@media (max-width: 640px) {
    .main-wrapper {
        padding: 1rem 0.75rem;
    }

    .hero-train-banner {
        padding: 2rem 1rem 1.5rem;
    }

    .content-card-section {
        padding: 1.5rem 1rem;
    }

    .section-header-cute {
        gap: 0.85rem;
    }

    .header-mascot {
        width: 48px;
        height: 48px;
        font-size: 2rem;
    }

    .info-grid-cute {
        grid-template-columns: 1fr;
    }
    
    .info-span-2 {
        grid-column: span 1;
    }

    .btn-drawer-label {
        display: none;
    }

    .btn-drawer-toggle {
        padding: 6px 10px;
    }

    .btn-search-text,
    .search-kbd {
        display: none !important;
    }
    
    .btn-search-nav {
        width: 36px;
        height: 36px;
        padding: 0 !important;
        justify-content: center;
        border-radius: 50%;
    }

    .btn-nav-back-portal span:not(.material-icons-round),
    .btn-nav-login span:not(.material-icons-round) {
        display: none !important;
    }

    .btn-nav-back-portal,
    .btn-nav-login {
        width: 36px;
        height: 36px;
        padding: 0 !important;
        justify-content: center;
        border-radius: 50%;
        margin-left: 2px;
    }
}

@media (max-width: 380px) {
    .nav-container {
        padding: 0.35rem 0.5rem;
        gap: 0.35rem;
    }

    .brand-title {
        font-size: 0.85rem;
    }

    .brand-mascot {
        width: 32px;
        height: 32px;
        font-size: 1.3rem;
    }
}

/* ==========================================
   Facebook-style Teacher Profile Header
   ========================================== */
.fb-profile-card {
    background: #ffffff;
    border-radius: var(--radius-lg);
    border: 2px solid var(--border-cute);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    margin-bottom: 2rem;
    animation: pageFadeUp 0.4s ease;
}

.fb-cover-container {
    position: relative;
    width: 100%;
    aspect-ratio: 3.2 / 1;
    min-height: 220px;
    max-height: 380px;
    background: linear-gradient(135deg, #e0f2fe 0%, #fef3c7 100%);
    overflow: hidden;
}

.fb-cover-img,
.fb-cover-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.5s ease;
}

.fb-cover-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0) 60%, rgba(0,0,0,0.25) 100%);
    pointer-events: none;
}

.fb-profile-body {
    position: relative;
    padding: 0.8rem 2.2rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 1.5rem;
    background: #ffffff;
}

.fb-profile-main {
    display: flex;
    align-items: flex-start;
    gap: 1.8rem;
    z-index: 5;
}

.fb-avatar-wrap {
    position: relative;
    width: 240px;
    height: 310px;
    border-radius: 32px;
    border: 8px solid #ffffff;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
    background: linear-gradient(135deg, #e0f2fe, #d1fae5);
    overflow: hidden;
    flex-shrink: 0;
    margin-top: -155px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    will-change: transform;
}

.fb-avatar-wrap:hover {
    transform: scale(1.02);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
}

.fb-avatar-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    border-radius: 24px;
    display: block;
}

.fb-avatar-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 8.5rem;
}

.fb-profile-info {
    padding-top: 0.4rem;
}

.fb-profile-name {
    font-family: var(--font-title);
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--theme-header-text, #0369a1) !important;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
    margin-bottom: 0.25rem;
    letter-spacing: -0.02em;
    line-height: 1.3;
}

.fb-profile-badge-row {
    margin-top: 6px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.fb-verified-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    background: linear-gradient(135deg, #0284c7, #0ea5e9);
    color: #ffffff;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 0.25rem 0.85rem;
    border-radius: var(--radius-full);
}

.fb-profile-sub {
    font-size: 1.35rem;
    color: var(--theme-text, #475569) !important;
    font-weight: 600;
    margin-top: 10px;
    margin-bottom: 12px;
    line-height: 1.6;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.fb-profile-sub span {
    color: inherit !important;
}

.fb-profile-bio {
    font-size: 1.05rem;
    color: var(--theme-header-text, #0369a1) !important;
    background: var(--theme-card, #f0f9ff) !important;
    border: 1.5px solid var(--theme-card-border, #bae6fd) !important;
    border-left: 5px solid var(--primary, #0284c7) !important;
    padding: 0.6rem 1.2rem;
    border-radius: 12px;
    display: inline-block;
    font-weight: 600;
    line-height: 1.55;
}

.fb-profile-bottom-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 1.2rem;
    width: 100%;
    border-top: none;
}

.fb-profile-bottom-left {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.fb-profile-social-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
    margin: 0;
}

.social-link-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 44px;
    padding: 0 20px;
    border-radius: var(--radius-full);
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
    color: #334155;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1;
    box-sizing: border-box;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
}

.social-link-badge .social-icon,
.social-link-badge .material-icons-round {
    font-size: 22px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.social-link-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.1);
    border-color: #cbd5e1;
}

.fb-profile-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.btn-fb-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 44px;
    padding: 0 20px;
    border-radius: var(--radius-full);
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1;
    box-sizing: border-box;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
    text-decoration: none;
}

.btn-fb-action .material-icons-round {
    font-size: 22px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-fb-primary {
    background: linear-gradient(135deg, #0284c7, #0369a1);
    color: #ffffff !important;
    box-shadow: 0 4px 14px rgba(2, 132, 199, 0.28);
    border: none;
}

.btn-fb-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(2, 132, 199, 0.38);
}

.btn-fb-secondary {
    background: #f1f5f9;
    color: #334155 !important;
    border: 1.5px solid #cbd5e1;
}

.btn-fb-secondary:hover {
    background: #e2e8f0;
    color: #0f172a !important;
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    .fb-cover-container { 
        aspect-ratio: 16 / 7; 
        min-height: 150px; 
        max-height: 240px;
        height: auto; 
    }
    .fb-profile-main {
        flex-direction: column;
        align-items: center;
        text-align: center;
        width: 100%;
        gap: 1rem;
    }
    .fb-avatar-wrap { 
        width: 140px; 
        height: 180px; 
        margin-top: -70px; 
        border-radius: 20px;
        border-width: 5px;
    }
    .fb-avatar-placeholder { font-size: 4.5rem; }
    .fb-profile-body {
        flex-direction: column;
        align-items: center;
        padding: 0 1rem 1.5rem;
    }
    .fb-profile-info {
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100%;
        padding-top: 0;
    }
    .fb-profile-name { justify-content: center; font-size: 1.45rem; text-align: center; }
    .fb-profile-badge-row { justify-content: center; width: 100%; }
    .fb-profile-sub { justify-content: center; font-size: 1rem; text-align: center; gap: 6px; }
    .fb-profile-bio { font-size: 0.9rem; padding: 0.5rem 1rem; width: 100%; max-width: 100%; box-sizing: border-box; }
    .fb-profile-bottom-bar { justify-content: center; flex-direction: column; gap: 10px; width: 100%; margin-top: 1rem; }
    .fb-profile-bottom-left { justify-content: center; width: 100%; }
    .fb-profile-social-row { 
        justify-content: center; 
        width: 100%; 
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }
    .social-link-badge {
        flex: 1 1 calc(50% - 8px);
        min-width: 120px;
        max-width: 180px;
        height: 38px;
        padding: 0 12px;
        font-size: 0.82rem;
    }
    .social-link-badge .social-icon,
    .social-link-badge .material-icons-round {
        font-size: 18px;
    }
    .fb-profile-actions { 
        justify-content: center; 
        width: 100%; 
        flex-direction: column;
        gap: 8px;
    }
    .btn-fb-action {
        width: 100%;
        height: 42px;
        font-size: 0.9rem;
    }
}

/* ==========================================
   Portal Landing Page Styles (Pre-login Home)
   ========================================== */
.portal-hero {
    position: relative;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0369a1 100%);
    border-radius: var(--radius-lg);
    padding: 60px 32px 50px;
    margin-bottom: 36px;
    color: #ffffff;
    overflow: hidden;
    box-shadow: 0 20px 45px -10px rgba(15, 23, 42, 0.4);
    text-align: center;
}

.portal-hero-decor {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    pointer-events: none;
    overflow: hidden;
}

.portal-decor-item {
    position: absolute;
    font-size: 2.2rem;
    opacity: 0.25;
    animation: floatDecor 6s ease-in-out infinite alternate;
}

.portal-decor-item.d1 { top: 12%; left: 6%; animation-duration: 5s; }
.portal-decor-item.d2 { top: 20%; right: 8%; animation-duration: 7s; }
.portal-decor-item.d3 { bottom: 15%; left: 10%; animation-duration: 6s; }
.portal-decor-item.d4 { bottom: 18%; right: 12%; animation-duration: 8s; }
.portal-decor-item.d5 { top: 45%; left: 2%; animation-duration: 5.5s; }
.portal-decor-item.d6 { top: 50%; right: 3%; animation-duration: 6.5s; }

@keyframes floatDecor {
    0% { transform: translateY(0) rotate(0deg) scale(1); }
    100% { transform: translateY(-20px) rotate(15deg) scale(1.15); }
}

.portal-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    padding: 8px 20px;
    border-radius: 9999px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #bae6fd;
    margin-bottom: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.portal-badge .badge-dot {
    width: 8px;
    height: 8px;
    background: #38bdf8;
    border-radius: 50%;
    box-shadow: 0 0 10px #38bdf8;
    animation: pulseDot 2s infinite;
}

@keyframes pulseDot {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.4); opacity: 0.7; }
}

.portal-title {
    font-family: var(--font-title);
    font-size: 2.6rem;
    font-weight: 800;
    line-height: 1.25;
    margin-bottom: 16px;
    color: #ffffff;
}

.portal-title-gradient {
    background: linear-gradient(135deg, #38bdf8 0%, #fbbf24 50%, #f472b6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.portal-subtitle {
    font-size: 1.15rem;
    color: #cbd5e1;
    max-width: 720px;
    margin: 0 auto 32px;
    line-height: 1.6;
}

.portal-cta-group {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 36px;
}

.btn-portal-primary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    color: #ffffff;
    padding: 14px 28px;
    border-radius: 9999px;
    font-weight: 700;
    font-size: 1.05rem;
    text-decoration: none;
    box-shadow: 0 8px 24px rgba(2, 132, 199, 0.4);
    transition: all 0.25s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-portal-primary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 12px 30px rgba(2, 132, 199, 0.55);
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
    color: #fff;
}

.btn-portal-secondary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    padding: 14px 28px;
    border-radius: 9999px;
    font-weight: 700;
    font-size: 1.05rem;
    text-decoration: none;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    transition: all 0.25s ease;
}

.btn-portal-secondary:hover {
    background: rgba(255, 255, 255, 0.22);
    transform: translateY(-3px);
    color: #fff;
}

.portal-stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    max-width: 900px;
    margin: 0 auto;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.portal-stat-item {
    text-align: center;
}

.portal-stat-num {
    font-family: var(--font-title);
    font-size: 1.8rem;
    font-weight: 800;
    color: #38bdf8;
}

.portal-stat-lbl {
    font-size: 0.82rem;
    color: #94a3b8;
    margin-top: 2px;
}

/* Directory Section */
.portal-search-bar-wrap {
    margin-bottom: 24px;
    display: flex;
    gap: 12px;
    align-items: center;
}

.portal-search-input {
    flex: 1;
    padding: 14px 20px;
    border: 2px solid var(--border-cute);
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-family: var(--font-thai);
    background: #ffffff;
    outline: none;
    transition: all 0.2s;
    box-shadow: var(--shadow-sm);
}

.portal-search-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

.teacher-dir-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.teacher-dir-card {
    background: #ffffff;
    border: 1.5px solid var(--border-cute);
    border-radius: var(--radius-lg);
    padding: 24px 20px;
    text-align: center;
    box-shadow: var(--shadow-md);
    transition: all 0.25s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

.teacher-dir-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 6px;
    background: linear-gradient(90deg, var(--primary), var(--accent-gold));
}

.teacher-dir-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary-light);
}

.dir-avatar-frame {
    width: 86px;
    height: 86px;
    margin: 0 auto 14px;
    border-radius: 50%;
    border: 3px solid var(--primary-pastel);
    box-shadow: 0 4px 14px rgba(2, 132, 199, 0.2);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
}

.dir-avatar-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dir-avatar-emoji {
    font-size: 2.8rem;
}

.dir-name {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 4px;
}

.dir-rank {
    display: inline-block;
    background: var(--accent-gold-light);
    color: #92400e;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 9999px;
    margin-bottom: 8px;
}

.dir-school {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 14px;
}

.btn-open-portfolio {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 10px 16px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: #ffffff;
    font-weight: 700;
    font-size: 0.9rem;
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.25);
}

.btn-open-portfolio:hover {
    background: linear-gradient(135deg, #0369a1, var(--primary));
    transform: scale(1.02);
    color: #fff;
}

/* Feature Showcase Cards */
.feature-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.feature-box {
    background: #ffffff;
    border: 1px solid var(--border-cute);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    transition: all 0.25s ease;
}

.feature-box:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-light);
}

.feature-icon-bubble {
    width: 54px;
    height: 54px;
    border-radius: var(--radius-md);
    background: var(--primary-pastel);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin-bottom: 16px;
}

.feature-box h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 8px;
}

.feature-box p {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.5;
}

@media (max-width: 768px) {
    .portal-hero { padding: 40px 18px 30px; }
    .portal-title { font-size: 1.8rem; }
    .portal-subtitle { font-size: 0.95rem; }
    .portal-stats-row { grid-template-columns: repeat(2, 1fr); gap: 12px; }
}

.btn-nav-login {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, var(--primary), #0284c7);
    color: #ffffff !important;
    padding: 8px 16px;
    border-radius: 9999px;
    font-weight: 700;
    font-size: 0.88rem;
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.3);
    transition: all 0.2s ease;
    margin-left: 8px;
}

.btn-nav-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(2, 132, 199, 0.45);
    background: linear-gradient(135deg, #0ea5e9, var(--primary));
    color: #fff !important;
}

.btn-nav-login.logged-in {
    background: linear-gradient(135deg, #059669, #10b981);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.35);
}

.btn-nav-login.logged-in:hover {
    background: linear-gradient(135deg, #10b981, #34d399);
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.5);
}

.btn-nav-back-portal {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(2, 132, 199, 0.08);
    color: var(--primary) !important;
    padding: 7px 14px;
    border-radius: 9999px;
    font-weight: 700;
    font-size: 0.84rem;
    border: 1px solid var(--border-cute);
    transition: all 0.2s ease;
    margin-left: 6px;
}

.btn-nav-back-portal:hover {
    background: var(--primary);
    color: #fff !important;
}

/* ==========================================
   Login Modal Styles
   ========================================== */
.login-modal-card {
    max-width: 440px;
    width: 90%;
    background: #ffffff;
    border-radius: var(--radius-lg);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    animation: modalPop 0.25s ease-out;
}

@keyframes modalPop {
    from { transform: scale(0.92); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.login-modal-body {
    padding: 24px;
    text-align: center;
}

.login-modal-desc {
    color: #64748b;
    font-size: 0.92rem;
    line-height: 1.5;
    margin-bottom: 24px;
}

.btn-google-auth {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 13px 20px;
    background: #ffffff;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 0.98rem;
    font-weight: 700;
    color: #1e293b;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.btn-google-auth:hover {
    border-color: #3b82f6;
    background: #f8fafc;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.15);
}

.auth-divider {
    display: flex;
    align-items: center;
    margin: 20px 0;
    color: #94a3b8;
    font-size: 0.82rem;
}

.auth-divider::before, .auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e2e8f0;
}

.auth-divider span {
    padding: 0 12px;
}

.btn-direct-admin {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px 18px;
    background: #f1f5f9;
    color: #334155;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    border: 1px solid #cbd5e1;
}

.btn-direct-admin:hover {
    background: #e2e8f0;
    color: #0f172a;
}

/* Assessment Steps Guide */
.assessment-steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.step-card {
    background: #f8fafc;
    border: 1px solid var(--border-cute);
    border-radius: var(--radius-lg);
    padding: 24px 20px;
    position: relative;
}

.step-num-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: var(--primary);
    color: #fff;
    font-weight: 800;
    font-size: 0.9rem;
    border-radius: 50%;
    margin-bottom: 12px;
}

.step-card h4 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 6px;
}

.step-card p {
    font-size: 0.86rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Interactive Theme Switcher Preview */
.theme-preview-tabs {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 24px;
    justify-content: center;
}

.theme-tab-btn {
    padding: 10px 18px;
    border-radius: 9999px;
    border: 2px solid var(--border-cute);
    background: #ffffff;
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.theme-tab-btn.active {
    border-color: var(--primary);
    background: var(--primary-pastel);
    color: var(--primary);
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.15);
}

.theme-preview-stage {
    background: #ffffff;
    border: 2px solid var(--border-cute);
    border-radius: var(--radius-lg);
    padding: 28px;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}





/* ==========================================
   📸 Album Cards & Social Badges Styles
   ========================================== */
.social-link-badge:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.12) !important;
    border-color: #38bdf8 !important;
}

[data-theme="midnight"] .social-link-badge {
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: rgba(139, 92, 246, 0.3) !important;
    color: #e2e8f0 !important;
}

[data-theme="glass"] .social-link-badge {
    background: rgba(255, 255, 255, 0.6) !important;
    backdrop-filter: blur(10px);
    border-color: rgba(255, 255, 255, 0.8) !important;
}

[data-theme="galaxy"] .social-link-badge {
    background: rgba(255, 255, 255, 0.06) !important;
    border-color: rgba(99, 102, 241, 0.3) !important;
    color: #e2e8f0 !important;
}

/* Modal Enhancements */
#album-photos-modal .modal-card {
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
/* ==========================================
   📄 Mock PDF Realistic Document Simulation
   ========================================== */
.mock-pdf-doc-viewer {
    background: #525659;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: inset 0 2px 8px rgba(0,0,0,0.3);
}

.mock-pdf-topbar {
    background: #323639;
    padding: 10px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #45494d;
    color: #ffffff;
}

.mock-pdf-page-count {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.82rem;
    color: #cbd5e1;
}

.badge-demo-pill {
    background: rgba(14, 165, 233, 0.25);
    border: 1px solid #38bdf8;
    color: #7dd3fc;
    padding: 2px 10px;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.mock-pdf-paper-scroll {
    padding: 24px 16px;
    max-height: 540px;
    overflow-y: auto;
    display: flex;
    justify-content: center;
    background: #525659;
}

.mock-a4-page {
    width: 100%;
    max-width: 620px;
    background: #ffffff;
    border-radius: 4px;
    padding: 40px 36px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.35);
    color: #0f172a;
    font-family: 'Noto Sans Thai', sans-serif;
}

.mock-doc-header {
    text-align: center;
    margin-bottom: 24px;
}

.mock-garuda-emblem {
    font-size: 3rem;
    margin-bottom: 8px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.15));
}

.mock-doc-title {
    font-family: 'Mitr', 'Noto Sans Thai', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.4;
    margin-bottom: 6px;
}

.mock-doc-subtitle {
    font-size: 0.95rem;
    color: #475569;
}

.mock-divider-line {
    height: 2px;
    background: linear-gradient(90deg, transparent, #0284c7, transparent);
    margin: 16px auto;
    width: 80%;
}

.mock-doc-body {
    font-size: 0.92rem;
    line-height: 1.7;
    color: #334155;
}

.mock-info-row {
    margin-bottom: 8px;
    display: flex;
    gap: 8px;
}

.mock-info-row strong {
    color: #0f172a;
    min-width: 140px;
}

.mock-content-box {
    margin-top: 18px;
    padding: 14px 18px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

.mock-content-box h4 {
    color: #0284c7;
    font-size: 0.98rem;
    margin-bottom: 10px;
    font-family: 'Mitr', sans-serif;
}

.mock-pa-points {
    margin-left: 20px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 0.88rem;
}

.mock-doc-signatures {
    margin-top: 32px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    text-align: center;
}

.mock-sig-box {
    font-size: 0.85rem;
    color: #475569;
}

.mock-sig-line {
    height: 1px;
    background: #94a3b8;
    margin: 36px auto 8px;
    width: 80%;
}

/* ============================================================
   Premium Lock Overlay System
   สำหรับแสดงให้ผู้ใช้ฟรีเห็นว่าฟีเจอร์ใดเป็น Premium เท่านั้น
============================================================ */

/* Wrapper ที่ห่อฟีเจอร์พรีเมียม */
.premium-gate-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    min-height: 220px; /* Ensure overlay has room to center */
}

/* Blur overlay ทาบเนื้อหา */
.premium-blur-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 249, 230, 0.72);
    backdrop-filter: blur(7px);
    -webkit-backdrop-filter: blur(7px);
    border-radius: 16px;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 24px;
    text-align: center;
    border: 2px solid rgba(245, 158, 11, 0.35);
    cursor: default;
    box-sizing: border-box;
}

/* กล่องป้าย Premium */
.premium-lock-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #ffffff;
    font-weight: 800;
    font-size: 0.9rem;
    padding: 8px 18px;
    border-radius: 9999px;
    box-shadow: 0 4px 16px rgba(245, 158, 11, 0.45);
    letter-spacing: 0.3px;
    animation: premiumPulse 2s ease-in-out infinite;
}

@keyframes premiumPulse {
    0%, 100% { box-shadow: 0 4px 16px rgba(245, 158, 11, 0.45); }
    50%       { box-shadow: 0 6px 24px rgba(245, 158, 11, 0.7); }
}

/* ไอคอน lock ขนาดใหญ่ */
.premium-lock-icon {
    font-size: 2.8rem;
    filter: drop-shadow(0 2px 8px rgba(245, 158, 11, 0.4));
}

/* ข้อความอธิบาย */
.premium-lock-title {
    font-size: 1rem;
    font-weight: 800;
    color: #92400e;
    margin: 0;
    line-height: 1.4;
}

.premium-lock-desc {
    font-size: 0.82rem;
    color: #78350f;
    margin: 0;
    line-height: 1.5;
    max-width: 320px;
}

/* ปุ่มอัปเกรด */
.btn-premium-upgrade {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #d97706, #b45309);
    color: #ffffff;
    font-weight: 800;
    font-size: 0.88rem;
    padding: 9px 22px;
    border-radius: 9999px;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(180, 83, 9, 0.4);
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-premium-upgrade:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(180, 83, 9, 0.55);
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

/* Theme card ที่ถูก lock (Premium) */
.theme-preset-card.premium-locked {
    position: relative;
    overflow: hidden;
}

.theme-preset-card.premium-locked::after {
    content: '⭐ Premium';
    position: absolute;
    top: 8px;
    right: 8px;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 800;
    padding: 3px 10px;
    border-radius: 9999px;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.5);
    z-index: 5;
    pointer-events: none;
}

.theme-preset-card.premium-locked .theme-preview-banner,
.theme-preset-card.premium-locked .theme-preset-body {
    filter: blur(2px);
    opacity: 0.7;
    pointer-events: none;
    user-select: none;
}

.theme-preset-card.premium-locked:hover {
    border-color: #f59e0b !important;
    box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.3);
    cursor: pointer;
}

/* Free badge ในธีมที่ฟรีใช้ได้ */
.theme-free-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #dcfce7;
    color: #15803d;
    font-size: 0.72rem;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 6px;
    border: 1px solid #86efac;
    margin-top: 4px;
}

/* Inline lock banner สำหรับ admin-card ทั้งกล่อง */
.admin-card-premium-banner {
    display: flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #fffbeb, #fef3c7);
    border: 1.5px solid #fde68a;
    border-radius: 12px;
    padding: 12px 16px;
    margin-bottom: 14px;
    font-size: 0.88rem;
    color: #92400e;
    font-weight: 600;
}

.admin-card-premium-banner .material-icons-round {
    color: #d97706;
    font-size: 22px;
    flex-shrink: 0;
}

/* ==========================================
   Premium-Only Red Label & Disabled Highlight
   สำหรับฟีเจอร์ที่ลองดูได้แต่ใช้ไม่ได้ (Premium Only)
   ========================================== */

/* Badge สีแดงติดที่ฟีเจอร์ "ใช้ได้เฉพาะพรีเมียม" */
.premium-only-label {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 800;
    padding: 3px 10px;
    border-radius: 9999px;
    letter-spacing: 0.3px;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.45);
    white-space: nowrap;
    animation: premiumRedPulse 2.5s ease-in-out infinite;
}

@keyframes premiumRedPulse {
    0%, 100% { box-shadow: 0 2px 8px rgba(239, 68, 68, 0.45); }
    50% { box-shadow: 0 4px 16px rgba(239, 68, 68, 0.7); }
}

/* ไฮไลท์กรอบแดงสำหรับ theme card ที่ดูได้แต่ใช้ไม่ได้ */
.theme-preset-card.premium-locked::after {
    content: '🔒 Premium Only';
    position: absolute;
    top: 8px;
    right: 8px;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 800;
    padding: 3px 10px;
    border-radius: 9999px;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.5);
    z-index: 5;
    pointer-events: none;
    animation: premiumRedPulse 2.5s ease-in-out infinite;
}

/* กรอบ wrapper สีแดงเมื่อ feature ถูก lock */
.premium-gate-wrapper {
    border: 2px solid transparent;
    transition: border-color 0.3s ease;
}
.premium-gate-wrapper:has(.premium-blur-overlay) {
    border-color: rgba(239, 68, 68, 0.3);
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.08);
}

/* Red banner ที่แสดงบน admin-card สำหรับ premium-only */
.admin-card-premium-red-banner {
    display: flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #fff1f1, #fee2e2);
    border: 1.5px solid #fca5a5;
    border-radius: 12px;
    padding: 10px 14px;
    margin-bottom: 12px;
    font-size: 0.85rem;
    color: #b91c1c;
    font-weight: 700;
}

.admin-card-premium-red-banner .material-icons-round {
    color: #ef4444;
    font-size: 20px;
    flex-shrink: 0;
}

/* Sidebar menu item ที่เป็น Premium-only */
.sidebar-item.premium-locked-item {
    position: relative;
    opacity: 0.75;
}
.sidebar-item.premium-locked-item::after {
    content: '⭐';
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
}

/* ==========================================
   Live Demo Theme Switcher Bar
   ========================================== */
.demo-theme-switcher-bar {
    position: sticky;
    top: 60px;
    z-index: 99;
    background: rgba(15, 23, 42, 0.94);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 2px solid rgba(56, 189, 248, 0.3);
    padding: 10px 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
    animation: fadeInDown 0.3s ease;
}

.demo-theme-switcher-inner {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.demo-switcher-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.demo-badge {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 9999px;
    letter-spacing: 0.04em;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.demo-label {
    color: #e2e8f0;
    font-size: 0.88rem;
    font-weight: 600;
}

.demo-theme-btns-group {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.demo-theme-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.1);
    color: #f1f5f9;
    border: 1.5px solid rgba(255, 255, 255, 0.2);
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.demo-theme-btn:hover {
    background: rgba(255, 255, 255, 0.22);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-1px);
}

.demo-theme-btn.active {
    background: #ffffff;
    color: #0f172a;
    border-color: #38bdf8;
    box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.5), 0 4px 12px rgba(0,0,0,0.2);
}

.theme-color-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 4px rgba(0,0,0,0.3);
}

.btn-demo-start-portal {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #0284c7, #0369a1);
    color: #ffffff;
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 700;
    padding: 7px 16px;
    border-radius: 9999px;
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.35);
    transition: all 0.2s ease;
}

.btn-demo-start-portal:hover {
    background: linear-gradient(135deg, #0369a1, #075985);
    transform: translateY(-1px);
}

@media (max-width: 768px) {
    .demo-theme-switcher-bar {
        position: relative !important;
        top: 0 !important;
        padding: 8px 12px;
        box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    }
    .demo-theme-switcher-inner {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        justify-content: flex-start;
        padding-bottom: 4px;
        gap: 8px;
        scrollbar-width: none;
    }
    .demo-theme-switcher-inner::-webkit-scrollbar {
        display: none;
    }
    .demo-switcher-left {
        flex-shrink: 0;
    }
    .demo-label {
        display: none;
    }
    .demo-theme-btns-group {
        flex-wrap: nowrap;
        flex-shrink: 0;
        gap: 6px;
    }
    .demo-theme-btn {
        padding: 4px 10px;
        font-size: 0.76rem;
        white-space: nowrap;
    }
    .btn-demo-start-portal {
        flex-shrink: 0;
        padding: 5px 12px;
        font-size: 0.76rem;
        white-space: nowrap;
    }
}

/* Legal Disclaimer Box in Footer & Portal */
.legal-disclaimer-box {
    margin-top: 18px;
    padding: 12px 18px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    font-size: 0.76rem;
    color: #94a3b8;
    line-height: 1.6;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}