@charset "UTF-8";
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@600;700&family=Poppins:wght@300;400;500;600&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Sarabun:wght@300;400;500;600;700&display=swap'); /* เพิ่มฟอนต์ไทย */

/* =========================================
   1. ROYAL HERITAGE THEME VARIABLES
   ========================================= */
:root {
    --bg-cream: #f9f7f2;
    --bg-white: #ffffff;
    --primary-navy: #1a2c4e;
    --royal-red: #a81c22;
    --accent-gold: #c5a059;
    --text-dark: #1a2c4e;
    --text-grey: #555555;
    
    --card-shadow: 0 10px 30px rgba(26, 44, 78, 0.08);
    --hover-shadow: 0 15px 40px rgba(168, 28, 34, 0.15);
    --transition: all 0.3s ease;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Poppins', sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
    background-color: var(--bg-cream);
    background-image: radial-gradient(#e0ded8 1px, transparent 1px);
    background-size: 20px 20px;
    overflow-x: hidden;
}

a { text-decoration: none; color: inherit; transition: var(--transition); }
ul { list-style: none; }

::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg-cream); }
::-webkit-scrollbar-thumb { background: var(--royal-red); border-radius: 5px; }

/* =========================================
   2. NAVBAR & DROPDOWN
   ========================================= */
.navbar {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border-bottom: 3px solid var(--accent-gold);
    padding: 0;
    position: sticky; top: 0; z-index: 1000;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    height: 80px; display: flex; align-items: center;
}

.nav-container {
    max-width: 1200px; margin: 0 auto; padding: 0 20px;
    display: flex; justify-content: space-between; align-items: center; width: 100%; height: 100%;
}

.nav-logo-group { display: flex; align-items: center; gap: 15px; height: 60px; }
.nav-logo-img { height: 100%; width: auto; object-fit: contain; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1)); }
.nav-logo-divider { height: 40px; border-left: 1px solid var(--primary-navy); opacity: 0.3; }

.nav-menu { display: flex; gap: 5px; align-items: center; height: 100%; }
.nav-link {
    color: var(--primary-navy); font-weight: 600; font-size: 0.9rem;
    position: relative; padding: 0 15px; text-transform: uppercase; letter-spacing: 0.5px;
    cursor: pointer; height: 80px; display: flex; align-items: center;
}
.nav-link:hover, .nav-link.active { color: var(--royal-red); background-color: rgba(0,0,0,0.02); }
.nav-link::after {
    content: ''; position: absolute; width: 0; height: 3px; bottom: 0; left: 0;
    background-color: var(--royal-red); transition: width 0.3s;
}
.nav-link:hover::after, .nav-link.active::after { width: 100%; }

.hamburger { display: none; color: var(--primary-navy); font-size: 1.5rem; cursor: pointer; }

/* Dropdown */
.nav-dropdown { position: relative; height: 100%; display: flex; align-items: center; }
.dropdown-toggle i { font-size: 0.8em; margin-left: 5px; transition: transform 0.3s; }
.nav-dropdown:hover .dropdown-toggle i { transform: rotate(180deg); }

.dropdown-menu {
    visibility: hidden; opacity: 0; position: absolute;
    top: 100%; left: 50%; transform: translateX(-50%) translateY(10px);
    background-color: var(--bg-white); min-width: 280px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15); border-radius: 0 0 8px 8px;
    padding: 10px 0; z-index: 1001; border-top: 4px solid var(--royal-red);
    transition: all 0.3s ease;
}
.nav-dropdown:hover .dropdown-menu { visibility: visible; opacity: 1; transform: translateX(-50%) translateY(0); }

.dropdown-menu a {
    color: var(--primary-navy); padding: 12px 25px; display: block;
    font-size: 0.9rem; border-bottom: 1px solid rgba(0,0,0,0.05);
    font-weight: 500; text-transform: none;
}
.dropdown-menu a:hover { background-color: rgba(168, 28, 34, 0.05); color: var(--royal-red); padding-left: 30px; }

/* =========================================
   3. HERO & INFO (Home Page)
   ========================================= */
.hero {
    position: relative; height: 85vh; max-height: 850px; min-height: 600px;
    background: radial-gradient(circle at center, #ffffff 0%, var(--bg-cream) 100%);
    display: flex; align-items: center; justify-content: center;
    text-align: center; color: var(--primary-navy); overflow: hidden; border-bottom: 1px solid #ddd;
}
.hero::before {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background-image: url('https://www.transparenttextures.com/patterns/thatch.png'); /* หรือใช้รูป Pattern อื่น */
    opacity: 0.4; z-index: 0;
}
.hero-content { position: relative; z-index: 2; max-width: 900px; padding: 20px; margin-top: 20px; }
.hero-logos { display: flex; justify-content: center; align-items: center; gap: 30px; margin-bottom: 30px; }
.hero-logos img { height: 130px; width: auto; object-fit: contain; filter: drop-shadow(0 5px 15px rgba(0,0,0,0.15)); }

.main-title { font-family: 'Playfair Display', serif; font-size: 3.8rem; font-weight: 700; margin-bottom: 10px; color: var(--primary-navy); line-height: 1.1; }
.tagline { font-family: 'Poppins', sans-serif; font-size: 1.3rem; color: var(--royal-red); margin-bottom: 40px; font-weight: 500; letter-spacing: 1px; text-transform: uppercase; }

.btn { padding: 14px 40px; border-radius: 4px; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; display: inline-block; transition: var(--transition); }
.btn-primary { background: var(--royal-red); color: white; border: 2px solid var(--royal-red); box-shadow: 0 4px 10px rgba(168, 28, 34, 0.3); }
.btn-primary:hover { background: #8a151b; border-color: #8a151b; transform: translateY(-2px); }
.btn-outline { background: transparent; color: var(--primary-navy); border: 2px solid var(--primary-navy); }
.btn-outline:hover { background: var(--primary-navy); color: white; transform: translateY(-2px); }

.info-bar-container { margin-top: -50px; position: relative; z-index: 10; padding: 0 20px; display: flex; justify-content: center; }
.info-bar { background: var(--primary-navy); padding: 25px 60px; border-radius: 8px; box-shadow: 0 15px 30px rgba(0,0,0,0.2); display: flex; gap: 60px; align-items: center; border: 2px solid #fff; }
.info-item { display: flex; align-items: center; gap: 15px; }
.info-item .icon { font-size: 1.8rem; color: var(--accent-gold); }
.info-item .label { display: block; font-size: 0.75rem; font-weight: 600; color: rgba(255,255,255,0.6); }
.info-item .value { display: block; font-weight: 500; font-size: 1.2rem; color: #fff; font-family: 'Playfair Display', serif; }
.info-divider { width: 1px; height: 40px; background: rgba(255,255,255,0.2); }

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.section-title { font-family: 'Playfair Display', serif; font-size: 2.5rem; font-weight: 700; color: var(--primary-navy); margin-bottom: 50px; text-align: center; }
.section-title::after { content: '✦'; display: block; color: var(--royal-red); font-size: 1.2rem; margin-top: 10px; text-shadow: 15px 0 0 var(--accent-gold), -15px 0 0 var(--accent-gold); }

/* =========================================
   4. HOME PAGE COMPONENTS
   ========================================= */
.countdown-section { padding: 80px 0 60px; text-align: center; }
.countdown-grid { display: flex; justify-content: center; gap: 20px; flex-wrap: wrap; }
.time-box { background: var(--bg-white); width: 110px; height: 110px; border-radius: 8px; display: flex; flex-direction: column; justify-content: center; align-items: center; box-shadow: var(--card-shadow); border: 1px solid #e0e0e0; }
.time-box span { font-family: 'Playfair Display', serif; font-size: 3rem; font-weight: 700; color: var(--royal-red); line-height: 1; }
.time-box label { font-size: 0.9rem; color: var(--text-dark); margin-top: 5px; text-transform: uppercase; }

.bg-light { background-color: rgba(255,255,255,0.5); padding: 80px 0; border-top: 1px solid #eee; border-bottom: 1px solid #eee; }
.date-grid, .topics-grid { display: grid; gap: 30px; padding-top: 20px; }
.date-grid { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.topics-grid { grid-template-columns: repeat(auto-fit, minmax(400px, 1fr)); }

.date-card, .topic-card { background: var(--bg-white); border-radius: 8px; padding: 35px; box-shadow: var(--card-shadow); transition: var(--transition); border: 1px solid rgba(0,0,0,0.05); position: relative; overflow: hidden; }
.date-card::before, .topic-card::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 4px; background: var(--accent-gold); transition: var(--transition); }
.date-card:hover, .topic-card:hover { transform: translateY(-5px); box-shadow: var(--hover-shadow); }
.date-card:hover::before, .topic-card:hover::before { background: var(--royal-red); }

.date-card h3, .topic-card h3 { font-family: 'Playfair Display', serif; font-size: 1.4rem; color: var(--primary-navy); margin-bottom: 10px; }
.date-highlight { font-size: 1.1rem; font-weight: 700; color: var(--royal-red); }
.icon-circle { width: 60px; height: 60px; border: 1px solid var(--accent-gold); border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 20px; color: var(--accent-gold); font-size: 1.5rem; }

.topic-card .card-header { border-bottom: 1px solid #eee; padding-bottom: 15px; margin-bottom: 20px; gap: 15px; display: flex; align-items: center; }
.topic-card .topic-icon { color: var(--royal-red); font-size: 1.8rem; }
.topic-card ul li { padding-left: 20px; margin-bottom: 8px; color: #666; position: relative; }
.topic-card ul li::before { content: '♦'; color: var(--accent-gold); font-size: 0.8rem; position: absolute; left: 0; top: 2px; }

/* =========================================
   5. WELCOME MESSAGES (Vertical Layout)
   ========================================= */
.welcome-section {
    padding: 100px 0;
    background-color: var(--bg-cream);
    background-image: radial-gradient(circle at top left, #ffffff 0%, transparent 40%),
                      radial-gradient(circle at bottom right, #eaddcf 0%, transparent 40%);
    position: relative; overflow: hidden;
}
.welcome-section::before {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    /* ตรวจสอบ Path รูปภาพให้ถูกต้อง */
    background-image: url('../img/thai-pattern.png'); 
    background-size: 500px auto; background-repeat: repeat; background-position: center top;
    opacity: 0.05; z-index: 0; pointer-events: none;
}
.welcome-section .container { position: relative; z-index: 2; }

.section-title-wrapper { text-align: center; margin-bottom: 70px; }
.title-underline { width: 80px; height: 4px; background: var(--royal-red); margin: 15px auto; border-radius: 2px; }

.welcome-grid { display: grid; grid-template-columns: 1fr; gap: 80px; max-width: 900px; margin: 0 auto; }

.welcome-card {
    background: #fff; border-radius: 4px; box-shadow: 0 20px 50px rgba(0,0,0,0.08);
    display: flex; flex-direction: column; overflow: hidden;
    border-top: 5px solid var(--accent-gold); transition: transform 0.4s ease;
}
.welcome-card:hover { transform: translateY(-10px); }

.president-visual { padding: 40px; background: #fff; display: flex; justify-content: center; align-items: center; position: relative; }
.img-frame { position: relative; width: 100%; max-width: 320px; aspect-ratio: 3/4; z-index: 1; }
.president-img { width: 100%; height: 100%; object-fit: cover; border-radius: 4px; box-shadow: 0 10px 30px rgba(0,0,0,0.15); position: relative; z-index: 2; }
.img-frame::before { content: ''; position: absolute; top: -15px; right: -15px; width: 100%; height: 100%; border: 2px solid var(--accent-gold); z-index: 1; transition: all 0.4s ease; }
.img-frame::after { content: ''; position: absolute; bottom: -15px; left: -15px; width: 100%; height: 100%; background-color: var(--primary-navy); opacity: 0.1; z-index: 0; transition: all 0.4s ease; }
.welcome-card:hover .img-frame::before { top: -10px; right: -10px; }
.welcome-card:hover .img-frame::after { bottom: -10px; left: -10px; }

.role-badge {
    position: absolute; bottom: 25px; left: 50%; transform: translateX(-50%);
    background: var(--primary-navy); color: var(--accent-gold);
    font-family: 'Poppins', sans-serif; font-size: 0.8rem; font-weight: 600; text-transform: uppercase; letter-spacing: 1.5px;
    padding: 10px 25px; border-radius: 50px; border: 2px solid #fff; box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    z-index: 3; white-space: nowrap;
}

.welcome-content { padding: 40px 60px 60px; flex: 1; display: flex; flex-direction: column; text-align: center; }
.welcome-header-name { font-family: 'Playfair Display', serif; font-size: 1.8rem; color: var(--primary-navy); margin-bottom: 5px; font-weight: 700; }
.welcome-header-title { font-family: 'Playfair Display', serif; font-size: 1.2rem; color: var(--text-grey); margin-bottom: 30px; line-height: 1.3; }
.welcome-header-title span { color: var(--royal-red); font-size: 0.9rem; text-transform: uppercase; letter-spacing: 2px; display: block; margin-top: 5px; font-family: 'Poppins', sans-serif; }
.welcome-body { color: #444; font-size: 1.05rem; line-height: 1.8; text-align: justify; }
.salutation { font-weight: 600; color: var(--primary-navy); margin-bottom: 20px; font-family: 'Playfair Display', serif; font-size: 1.1rem; text-align: center; }

.quote-box { background: rgba(212, 161, 24, 0.08); border-left: 3px solid var(--accent-gold); padding: 20px 25px; margin: 25px 0; font-style: italic; color: var(--primary-navy); font-family: 'Playfair Display', serif; }
.highlight-list { background: #f9f9f9; padding: 25px; border-radius: 8px; margin-bottom: 25px; text-align: left; }
.highlight-list h5 { color: var(--royal-red); margin-bottom: 15px; font-weight: 700; }
.highlight-list ul li { margin-bottom: 8px; display: flex; align-items: flex-start; gap: 10px; font-size: 0.95rem; }
.highlight-list ul li i { color: var(--accent-gold); margin-top: 5px; }

.signature-block { margin-top: 40px; padding-top: 30px; border-top: 1px solid #eee; text-align: center; }
.signature-block .closing { font-family: 'Playfair Display', serif; font-style: italic; color: #888; margin-bottom: 15px; }
.signature-block .name { font-family: 'Playfair Display', serif; font-size: 1.3rem; color: var(--primary-navy); font-weight: 700; margin-bottom: 5px; }
.signature-block .position { font-size: 0.85rem; color: #666; font-weight: 500; }

/* =========================================
   6. REGISTRATION PAGE & TABLES (เพิ่มกลับมาแล้ว!)
   ========================================= */

/* Page Header สำหรับหน้าย่อย (Registration, Venue) */
.page-header {
    /* ใช้รูปเดียวกับ Hero หรือรูปอื่น ถ้าไม่มีให้ใช้สีพื้น */
    background: linear-gradient(rgba(26, 44, 78, 0.9), rgba(168, 28, 34, 0.7)), url('../img/hero-bg.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    padding: 120px 0;
    text-align: center;
    color: white;
    border-bottom: 5px solid var(--accent-gold);
    margin-bottom: 60px; /* เว้นระยะจากเนื้อหา */
}

.page-header h1 {
    font-family: 'Playfair Display', serif;
    font-size: 3.5rem;
    color: #fff;
    text-shadow: 0 4px 10px rgba(0,0,0,0.3);
    margin-bottom: 10px;
}

.page-header p {
    font-family: 'Poppins', sans-serif;
    font-size: 1.3rem;
    font-weight: 300;
    opacity: 0.9;
    letter-spacing: 1px;
}

/* Registration Content Layout */
.registration-content { padding: 40px 0 80px; }

.reg-intro { text-align: center; max-width: 800px; margin: 0 auto 50px; }
.reg-intro h2 {
    font-family: 'Playfair Display', serif; font-size: 2.5rem; color: var(--primary-navy);
    margin-bottom: 20px; position: relative; display: inline-block;
}
.reg-intro h2::after { content: ''; display: block; width: 50px; height: 3px; background: var(--royal-red); margin: 10px auto 0; }
.currency-note { margin-top: 15px; color: var(--royal-red); font-style: italic; }


/* Pricing Table Style */
.pricing-table-wrapper {
    overflow-x: auto; margin-bottom: 60px; border-radius: 8px; box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.pricing-table {
    width: 100%; border-collapse: collapse; background: white; min-width: 700px; /* กันตารางบีบเกินไป */
}

.pricing-table thead th {
    background-color: var(--primary-navy); color: white; padding: 25px;
    font-family: 'Playfair Display', serif; font-size: 1.2rem;
    border-right: 1px solid rgba(255,255,255,0.1); text-transform: uppercase; letter-spacing: 1px;
}

.pricing-table thead th.highlight-col {
    background-color: #253b63; /* สีที่สว่างขึ้น */
    border-bottom: 4px solid var(--accent-gold);
}

.sub-date {
    display: block; font-family: 'Poppins', sans-serif; font-size: 0.8rem;
    font-weight: 400; color: var(--accent-gold); margin-top: 5px; text-transform: none;
}

.pricing-table tbody td {
    padding: 25px 20px; text-align: center; border-bottom: 1px solid #eee; color: var(--text-dark);
    font-size: 1.1rem;
}

.pricing-table tbody tr:last-child td { border-bottom: none; }
.pricing-table tbody tr:hover { background-color: #fcfcfc; }

/* Cell Specifics */
.category-cell {
    text-align: left !important; width: 40%; font-size: 1.2rem; color: var(--primary-navy) !important; font-weight: 600;
}
.category-cell .desc {
    display: block; font-size: 0.9rem; color: #777; margin-top: 5px; font-weight: 400;
}

.price-cell { font-family: 'Playfair Display', serif; font-size: 1.8rem; font-weight: 700; color: var(--primary-navy); }
.highlight-cell { color: var(--royal-red); background-color: rgba(212, 161, 24, 0.05); }

/* Benefits List */
.reg-benefits {
    background: white; padding: 40px; border-radius: 8px; box-shadow: var(--card-shadow);
    max-width: 800px; margin: 0 auto 50px; border-left: 5px solid var(--accent-gold);
}
.reg-benefits h3 { color: var(--primary-navy); margin-bottom: 20px; font-family: 'Playfair Display', serif; }
.benefit-list li { margin-bottom: 10px; display: flex; align-items: center; gap: 15px; }
.benefit-list li i { color: var(--royal-red); }

/* Action Buttons */
.reg-action { text-align: center; }
.btn-large { padding: 18px 50px; font-size: 1.1rem; box-shadow: 0 10px 25px rgba(168, 28, 34, 0.4); }
.reg-action .remark { margin-top: 20px; font-size: 0.9rem; color: #666; }

/* Venue Page Styles (รวมไว้ให้เลยเผื่อใช้) */
.venue-content { padding: 80px 0; }
.venue-hero-card { display: flex; background: #fff; border-radius: 12px; overflow: hidden; box-shadow: var(--card-shadow); margin-bottom: 80px; }
.venue-image { flex: 1; min-height: 450px; }
.venue-image img { width: 100%; height: 100%; object-fit: cover; }
.venue-info { flex: 1; padding: 60px; display: flex; flex-direction: column; justify-content: center; }
.venue-info h2 { font-family: 'Playfair Display', serif; font-size: 2.8rem; color: var(--primary-navy); margin-bottom: 20px; }
.venue-features-list li { margin-bottom: 15px; display: flex; gap: 15px; }
.venue-features-list li i { color: var(--accent-gold); margin-top: 5px; }

/* =========================================
   7. FOOTER & RESPONSIVE
   ========================================= */
footer { background: var(--primary-navy); color: #ccc; padding: 60px 0 20px; font-size: 0.9rem; border-top: 4px solid var(--royal-red); }
.footer-content { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 40px; padding-bottom: 40px; border-bottom: 1px solid rgba(255,255,255,0.1); }
.footer-social a { display: inline-flex; justify-content: center; align-items: center; width: 40px; height: 40px; background: rgba(255,255,255,0.1); border-radius: 50%; margin-right: 10px; color: #fff; transition: var(--transition); }
.footer-social a:hover { background: var(--accent-gold); color: var(--primary-navy); transform: translateY(-3px); }

#btnTop { position: fixed; bottom: 30px; right: 30px; background: var(--royal-red); color: white; width: 50px; height: 50px; border: none; border-radius: 4px; font-size: 1.2rem; cursor: pointer; box-shadow: 0 5px 15px rgba(168, 28, 34, 0.4); display: none; z-index: 999; }

@media (max-width: 992px) {
    .main-title { font-size: 3rem; }
    .hero { height: auto; padding: 120px 0 80px; }
    .info-bar { flex-direction: column; width: 90%; gap: 20px; padding: 30px; }
    .info-divider { display: none; }
    .info-item { width: 100%; justify-content: flex-start; }
    .venue-hero-card { flex-direction: column; }
    .venue-image { min-height: 300px; }
}

@media (max-width: 768px) {
    .hamburger { display: block; }
    .nav-menu { position: absolute; top: 100%; left: 0; width: 100%; background: var(--bg-white); flex-direction: column; padding: 0; box-shadow: 0 10px 20px rgba(0,0,0,0.1); display: none; border-top: 3px solid var(--royal-red); max-height: 80vh; overflow-y: auto; }
    .nav-menu.active { display: flex; }
    .nav-link { width: 100%; text-align: center; height: 50px; justify-content: center; border-bottom: 1px solid #eee; padding: 0; }
    .nav-link::after { display: none; }
    
    /* Mobile Dropdown Fix */
    .nav-dropdown { display: block; width: 100%; height: auto; }
    .nav-dropdown .dropdown-toggle { width: 100%; display: flex; justify-content: center; }
    .dropdown-menu { position: static; transform: none; visibility: visible; opacity: 1; width: 100%; display: none; box-shadow: none; border: none; background: #f8f9fa; padding: 0; }
    .nav-dropdown.active .dropdown-menu { display: block !important; }
    .dropdown-menu a { text-align: center; padding: 15px; border-bottom: 1px solid #e9ecef; }
    
    .hero-logos img { height: 90px; }
    .main-title { font-size: 2rem; }
    .welcome-content { padding: 30px 20px; }
    
    /* Table Responsive */
    .page-header h1 { font-size: 2.2rem; }
    .pricing-table thead th { font-size: 1rem; padding: 15px; }
    .price-cell { font-size: 1.4rem; }
    .category-cell { font-size: 1rem; width: auto; }
}

/* =========================================
   HOTFIX: MOBILE MENU & DROPDOWN (แก้ไขเมนูมือถือ)
   ========================================= */
@media (max-width: 768px) {
    /* 1. ให้กล่องเมนูหลักยืดความสูงได้อิสระ ไม่โดนตัด */
    .nav-menu {
        height: auto !important;
        max-height: calc(100vh - 80px) !important; /* เลื่อนดูได้ถ้าเมนูยาวกว่าจอ */
        overflow-y: auto !important;
        padding-bottom: 20px !important; /* เว้นที่ว่างด้านล่างให้ปุ่ม */
    }

    /* 2. แก้ปัญหาช่องเมนูแคบ และยกเลิกความสูงแบบตายตัว */
    .nav-link {
        height: auto !important;
        padding: 18px 0 !important;
        white-space: normal !important;
    }

    /* 3. จัดการ Dropdown ให้เรียงจากบนลงล่าง (แก้ปัญหาเมนูแหว่งครึ่งจอ) */
    .nav-dropdown {
        display: flex !important;
        flex-direction: column !important; /* สำคัญมาก: บังคับให้เมนูย่อยดันลงล่าง */
        width: 100% !important;
        height: auto !important;
    }

    .nav-dropdown .dropdown-toggle {
        padding: 18px 0 !important;
        height: auto !important;
    }

    /* 4. จัดการกล่องเมนูย่อย (Registration) ให้กว้างเต็มจอและอ่านง่าย */
    .dropdown-menu {
        position: static !important;
        transform: none !important;
        width: 100% !important;
        min-width: 100% !important;
        background-color: #f1f3f5 !important; /* พื้นหลังสีเทาอ่อนให้ดูต่างจากเมนูหลัก */
        box-shadow: none !important;
        border: none !important;
    }

    .dropdown-menu a {
        padding: 15px 20px !important;
        font-size: 0.95rem !important;
        width: 100% !important;
        text-align: center !important;
        white-space: normal !important; /* ป้องกันตัวหนังสือล้นจอ */
    }

    /* 5. ปรับปุ่ม Submit Abstract ให้อยู่กึ่งกลางและสวยงามบนมือถือ */
    .nav-menu .btn-primary {
        margin: 20px 20px 0 20px !important;
        width: calc(100% - 40px) !important;
        text-align: center !important;
        height: auto !important;
        display: block !important;
    }
}

/* =========================================
   HERO GOLD DUST ANIMATION
   ========================================= */

/* ให้แน่ใจว่า Hero ไม่แสดงสิ่งที่ล้นออกไปนอกกรอบ */
.hero {
    position: relative;
    overflow: hidden; 
}

/* กล่องคุมละอองทองให้อยู่เต็มพื้นที่ Hero */
#gold-dust-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none; /* เพื่อไม่ให้ขวางการคลิกปุ่มของ User */
    z-index: 1; /* ให้อยู่ใต้เนื้อหา (z-index: 2) แต่อยู่บนภาพพื้นหลัง */
}

/* หน้าตาของละอองทอง 1 เม็ด */
.gold-dust {
    position: absolute;
    bottom: -20px; /* ให้เริ่มลอยจากใต้ขอบจอนิดนึง */
    
    /* สร้างสีทองและแสงเรืองรอง (Glow effect) */
    background: radial-gradient(circle, #ffffff 10%, #ffe066 70%, transparent 100%);
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(255, 224, 102, 0.8), 0 0 15px rgba(255, 224, 102, 0.4);
    
    opacity: 0;
    animation: floatUp linear infinite;
}

/* แอนิเมชันลอยขึ้นและจางหาย */
@keyframes floatUp {
    0% {
        transform: translateY(0) scale(0.5);
        opacity: 0;
    }
    20% {
        opacity: 0.8; /* ค่อยๆ สว่างขึ้นตอนเริ่มลอย */
    }
    80% {
        opacity: 0.6;
    }
    100% {
        transform: translateY(-100vh) scale(1.2); /* ลอยขึ้นจนสุดจอและขยายขนาดนิดหน่อย */
        opacity: 0;
    }
}