/* assets/site.css
   CSS กลางของหน้าสาธารณะ (สกัดจาก index.php) ใช้ร่วมกันทุกหน้า
   แก้ที่นี่ที่เดียว ทุกหน้าเปลี่ยนตาม */
:root { --primary: #0a192f; --primary-light: #112a4e; --gold: #c5a059; --gold-bright: #e6ca65; --gold-gradient: linear-gradient(135deg, #a37c38 0%, #e6ca65 50%, #916c29 100%); --gray-light: #f8fafc; --gray-card: #f1f5f9; --text-main: #0f172a; --text-muted: #64748b; --transition: all 0.5s cubic-bezier(0.165, 0.84, 0.44, 1); }
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: 'Prompt', sans-serif; background: #fff; color: var(--text-main); line-height: 1.7; overflow-x: hidden; }

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

.top-bar { background: #030712; color: #94a3b8; padding: 10px 5%; font-size: 0.8rem; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; }
.top-bar span { display: inline-flex; align-items: center; gap: 8px; }
.news-ticker { background: #f8fafc; border-bottom: 1px solid #e2e8f0; border-top: 1px solid #e2e8f0; color: var(--text-main); padding: 6px 5%; font-size: 0.85rem; font-weight: 500; display: flex; align-items: center; overflow: hidden; position: relative; z-index: 999; }
.ticker-badge { background: var(--primary); color: var(--gold-bright); padding: 3px 10px; border-radius: 4px; font-size: 0.75rem; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; margin-right: 15px; flex-shrink: 0; box-shadow: 0 2px 4px rgba(10,25,47,0.08); }
.ticker-badge i { color: var(--gold-bright); animation: pulseDot 1.5s infinite; }
.ticker-content { overflow: hidden; white-space: nowrap; width: 100%; }
.ticker-content marquee { font-weight: 500; color: var(--text-main); }
.ticker-content a { color: var(--gold); text-decoration: none; font-weight: 600; margin-left: 10px; transition: var(--transition); }
.ticker-content a:hover { text-decoration: underline; color: var(--primary); }
header { background: rgba(255,255,255,0.9); backdrop-filter: blur(20px); position: sticky; top: 0; z-index: 998; border-bottom: 1px solid rgba(226,232,240,0.8); transition: var(--transition); }
header.scrolled { box-shadow: 0 15px 35px rgba(10,25,47,0.1); background: rgba(255,255,255,0.98); }
.nav-container { max-width: 1400px; margin: 0 auto; padding: 14px 5%; display: flex; justify-content: space-between; align-items: center; }
.logo { font-size: 1.1rem; font-weight: 700; color: var(--primary); letter-spacing: 0.5px; text-decoration: none; position: relative; }
.logo::after { content: ''; position: absolute; width: 6px; height: 6px; background: var(--gold); border-radius: 50%; bottom: 2px; right: -10px; animation: pulseDot 2s infinite; }
.nav-menu { display: flex; list-style: none; gap: 14px; align-items: center; flex-wrap: wrap; }
.nav-menu a { text-decoration: none; color: var(--text-main); font-weight: 500; font-size: 0.82rem; transition: var(--transition); position: relative; padding-bottom: 3px; }
.nav-menu a::after { content: ''; position: absolute; bottom: 0; left: 0; width: 0; height: 2px; background: var(--gold); transition: var(--transition); }
.nav-menu a:hover, .nav-menu a.active { color: var(--gold); }
.nav-menu a:hover::after, .nav-menu a.active::after { width: 100%; }
.nav-highlight { background: var(--gold-gradient) !important; color: #030712 !important; padding: 6px 12px !important; border-radius: 50px !important; font-weight: 600 !important; box-shadow: 0 4px 15px rgba(197,160,89,0.3); transition: var(--transition) !important; }
.nav-highlight::after { display: none !important; }
.nav-highlight:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(197,160,89,0.5); color: #030712 !important; }
.btn-nav { background: var(--primary) !important; color: #fff !important; padding: 6px 12px !important; border-radius: 50px !important; font-weight: 600 !important; transition: var(--transition) !important; }
.btn-nav::after { display: none !important; }
.btn-nav:hover { background: var(--gold) !important; color: var(--primary) !important; transform: translateY(-2px); }
.hamburger { display: none; font-size: 1.4rem; cursor: pointer; color: var(--primary); }
.reveal { opacity: 0; transform: translateY(40px); transition: opacity 0.8s cubic-bezier(0.165,0.84,0.44,1), transform 0.8s cubic-bezier(0.165,0.84,0.44,1); }
.reveal.active { opacity: 1; transform: translateY(0); }
.reveal-left { opacity: 0; transform: translateX(-40px); transition: opacity 0.9s cubic-bezier(0.165,0.84,0.44,1), transform 0.9s cubic-bezier(0.165,0.84,0.44,1); }
.reveal-left.active { opacity: 1; transform: translateX(0); }
.reveal-right { opacity: 0; transform: translateX(40px); transition: opacity 0.9s cubic-bezier(0.165,0.84,0.44,1), transform 0.9s cubic-bezier(0.165,0.84,0.44,1); }
.reveal-right.active { opacity: 1; transform: translateX(0); }
footer { background: #030712; color: #94a3b8; padding: 35px 5% 20px; margin-top: 60px; border-top: 2px solid var(--gold); }
.footer-grid { max-width: 1400px; margin: 0 auto; display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 24px; padding-bottom: 25px; border-bottom: 1px solid rgba(255,255,255,0.08); }
.footer-col h4 { color: #fff; font-size: 0.92rem; font-weight: 700; margin-bottom: 12px; position: relative; padding-bottom: 6px; }
.footer-col h4::after { content: ''; position: absolute; bottom: 0; left: 0; width: 25px; height: 2px; background: var(--gold); }
.footer-col p { font-size: 0.8rem; line-height: 1.6; margin-bottom: 10px; color: #cbd5e1; }
.footer-links-list { list-style: none; display: flex; flex-direction: column; gap: 7px; }
.footer-links-list a { color: #94a3b8; text-decoration: none; font-size: 0.8rem; transition: var(--transition); display: inline-flex; align-items: center; gap: 5px; }
.footer-links-list a:hover { color: var(--gold-bright); transform: translateX(3px); }
.footer-contact-info { display: flex; flex-direction: column; gap: 7px; font-size: 0.8rem; }
.footer-contact-info div { display: flex; align-items: flex-start; gap: 8px; color: #cbd5e1; }
.footer-contact-info i { color: var(--gold); margin-top: 3px; flex-shrink: 0; }
.footer-socials { display: flex; gap: 8px; margin-top: 10px; }
.footer-socials a { width: 30px; height: 30px; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; transition: var(--transition); text-decoration: none; font-size: 0.78rem; }
.footer-socials a:hover { background: var(--gold); color: var(--primary); border-color: var(--gold); transform: translateY(-2px); }
.footer-bottom { max-width: 1400px; margin: 15px auto 0; display: flex; justify-content: space-between; align-items: center; font-size: 0.75rem; color: #64748b; flex-wrap: wrap; gap: 12px; }
.back-to-top { position: fixed; bottom: 25px; right: 25px; width: 48px; height: 48px; background: var(--primary); color: var(--gold); border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; opacity: 0; visibility: hidden; transition: var(--transition); z-index: 999; box-shadow: 0 10px 25px rgba(0,0,0,0.2); border: 1px solid rgba(197,160,89,0.3); }
.back-to-top.show { opacity: 1; visibility: visible; }
.back-to-top:hover { background: var(--gold); color: var(--primary); transform: translateY(-5px); }

/* Page banner (หน้าภายใน) */
.page-banner { background: linear-gradient(135deg, rgba(3, 7, 18, 0.92) 0%, rgba(10, 25, 47, 0.88) 100%), url('https://images.unsplash.com/photo-1523240795612-9a054b0db644?auto=format&fit=crop&w=1600&q=80') center/cover; color: #fff; padding: 80px 20px; text-align: center; position: relative; }
.page-banner h1 { color: var(--gold-bright); font-size: 2.5rem; font-weight: 700; margin-bottom: 10px; }
.page-banner p { color: #cbd5e1; font-size: 1rem; }

@media(max-width: 1200px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 20px; }
  .nav-menu { position: fixed; top: 0; right: -100%; width: 80%; max-width: 380px; height: 100vh; background: #fff; flex-direction: column; justify-content: center; gap: 18px; transition: 0.5s cubic-bezier(0.165,0.84,0.44,1); box-shadow: -15px 0 40px rgba(0,0,0,0.15); z-index: 1000; padding: 20px; }
  .nav-menu.active { right: 0; }
  .hamburger { display: block; z-index: 1001; }
}
@media(max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .top-bar { font-size: 0.72rem; padding: 8px 4%; flex-direction: column; gap: 4px; text-align: center; }
}

/* ปุ่ม "ตรวจสอบคะแนน" สีเขียว: ใช้สไตล์เดียวกันทั้งหน้าแรกและหน้าอื่น */
.nav-scores { background: linear-gradient(135deg, #15803d 0%, #16a34a 100%) !important; color: #fff !important; padding: 6px 12px !important; border-radius: 50px !important; font-weight: 600 !important; box-shadow: 0 4px 15px rgba(22, 163, 74, 0.35); transition: var(--transition) !important; white-space: nowrap; }
.nav-scores::after { display: none !important; }
.nav-scores:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(22, 163, 74, 0.55); color: #fff !important; filter: brightness(1.08); }
/* ขนาดตัวอักษรและระยะของเมนู: เท่ากันทุกรายการ ปรับตามความกว้างจอ (เมนูมือถือเริ่มที่ 1200px ลงไป) */
.nav-menu a { white-space: nowrap; }
@media (min-width: 1201px) {
    .nav-container { padding: 12px 3%; }
    .nav-menu { flex-wrap: wrap; justify-content: flex-end; gap: 6px 12px; }
    .nav-menu a { font-size: clamp(0.84rem, 0.95vw, 1rem); }
    .logo { font-size: clamp(1rem, 1.1vw, 1.15rem); }
    .btn-nav, .nav-scores { padding: 6px 12px !important; }
}
