@import url('https://fonts.googleapis.com/css2?family=Sarabun:wght@300;400;500;600;700;800&family=Inter:wght@400;500;600;700&display=swap');

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

:root {
  --navy: #0d1b3e;
  --navy-light: #1a2f5e;
  --navy-mid: #162550;
  --gold: #f5c518;
  --gold-light: #ffd54f;
  --bg-dark: #080f23;
  --bg-card: rgba(255,255,255,0.04);
  --border: rgba(255,255,255,0.08);
  --text: #e8eaf0;
  --text-muted: #8892a4;
  --text-light: #ffffff;
  --success: #22c55e;
  --danger: #ef4444;
  --radius: 12px;
  --radius-lg: 20px;
  --shadow: 0 8px 32px rgba(0,0,0,0.4);
  --transition: 0.3s ease;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Sarabun', 'Inter', sans-serif;
  background: var(--bg-dark);
  color: var(--text);
  font-size: 16px;
  line-height: 1.7;
  min-height: 100vh;
}

/* ===== SKIP NAV (Accessibility) ===== */
.skip-nav { position: absolute; top: -100px; left: 0; background: var(--gold); color: var(--navy); font-weight: 700; padding: 0.75rem 1.5rem; z-index: 9999; border-radius: 0 0 8px 0; transition: top 0.2s; }
.skip-nav:focus { top: 0; color: var(--navy); }

/* ===== TYPOGRAPHY ===== */
h1,h2,h3,h4,h5 { font-weight: 700; line-height: 1.3; color: var(--text-light); }
h1 { font-size: clamp(1.8rem,4vw,3rem); }
h2 { font-size: clamp(1.4rem,3vw,2.2rem); }
h3 { font-size: clamp(1.1rem,2vw,1.5rem); }
p { margin-bottom: 1rem; }
a { color: var(--gold); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--gold-light); }

/* ===== LAYOUT ===== */
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.section { padding: 5rem 0; }
.section-sm { padding: 3rem 0; }

/* ===== NAVBAR ===== */
.navbar {
  position: sticky; top: 0; z-index: 1000;
  background: rgba(8,15,35,0.9);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 0.8rem 0;
}
.navbar .container { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.navbar-brand { font-size: 1.2rem; font-weight: 800; color: var(--text-light); display: flex; align-items: center; gap: 0.5rem; }
.navbar-brand .brand-icon { width: 36px; height: 36px; background: linear-gradient(135deg,var(--gold),var(--gold-light)); border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 1.1rem; }
.navbar-brand span { color: var(--gold); }
.navbar-nav { display: flex; align-items: center; gap: 0.3rem; list-style: none; }
.navbar-nav a { color: var(--text-muted); font-size: 0.92rem; font-weight: 500; padding: 0.5rem 0.9rem; border-radius: 8px; transition: var(--transition); }
.navbar-nav a:hover, .navbar-nav a.active { color: var(--text-light); background: var(--bg-card); }
.navbar-nav .btn-nav { background: linear-gradient(135deg,var(--gold),var(--gold-light)); color: var(--navy) !important; font-weight: 700; padding: 0.5rem 1.2rem; border-radius: 50px; }
.navbar-nav .btn-nav:hover { opacity: 0.9; background: var(--bg-card); }
.hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; padding: 5px; }
.hamburger span { display: block; width: 24px; height: 2px; background: var(--text); border-radius: 2px; transition: var(--transition); }

/* ===== HERO ===== */
.hero {
  min-height: 92vh;
  display: flex; align-items: center;
  background: linear-gradient(135deg, var(--bg-dark) 0%, var(--navy) 60%, #1a1040 100%);
  position: relative; overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse 60% 60% at 70% 50%, rgba(245,197,24,0.08), transparent);
}
.hero-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; }
.hero-badge { display: inline-flex; align-items: center; gap: 0.5rem; background: rgba(245,197,24,0.12); border: 1px solid rgba(245,197,24,0.3); border-radius: 50px; padding: 0.4rem 1rem; font-size: 0.85rem; color: var(--gold); margin-bottom: 1.5rem; }
.hero-title { font-size: clamp(2rem,4.5vw,3.5rem); font-weight: 800; line-height: 1.2; margin-bottom: 1.5rem; }
.hero-title .highlight { background: linear-gradient(135deg,var(--gold),var(--gold-light)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.hero-desc { font-size: 1.1rem; color: var(--text-muted); margin-bottom: 2rem; max-width: 520px; }
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 2rem; margin-top: 3rem; }
.hero-stat { text-align: center; }
.hero-stat .num { font-size: 2rem; font-weight: 800; color: var(--gold); }
.hero-stat .label { font-size: 0.85rem; color: var(--text-muted); }
.hero-visual { position: relative; display: flex; justify-content: center; align-items: center; }
.hero-card-float {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  backdrop-filter: blur(20px);
  width: 100%; max-width: 400px;
  animation: float 6s ease-in-out infinite;
}
@keyframes float { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-12px)} }

/* ===== BUTTONS ===== */
.btn { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.75rem 1.8rem; border-radius: 50px; font-weight: 600; font-size: 0.95rem; border: none; cursor: pointer; transition: var(--transition); text-decoration: none; font-family: inherit; }
.btn-primary { background: linear-gradient(135deg,var(--gold),var(--gold-light)); color: var(--navy); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(245,197,24,0.35); color: var(--navy); }
.btn-outline { border: 1.5px solid var(--border); color: var(--text); background: transparent; }
.btn-outline:hover { border-color: var(--gold); color: var(--gold); background: rgba(245,197,24,0.06); }
.btn-sm { padding: 0.5rem 1.2rem; font-size: 0.85rem; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-success { background: var(--success); color: #fff; }

/* ===== CARDS ===== */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.8rem;
  transition: var(--transition);
  backdrop-filter: blur(10px);
}
.card:hover { border-color: rgba(245,197,24,0.25); transform: translateY(-4px); box-shadow: var(--shadow); }
.card-icon { width: 52px; height: 52px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.4rem; margin-bottom: 1rem; background: linear-gradient(135deg,rgba(245,197,24,0.15),rgba(245,197,24,0.05)); }
.card-title { font-size: 1.1rem; font-weight: 700; margin-bottom: 0.5rem; }
.card-text { color: var(--text-muted); font-size: 0.92rem; }

/* ===== SECTION HEADER ===== */
.section-header { text-align: center; margin-bottom: 3.5rem; }
.section-badge { display: inline-block; background: rgba(245,197,24,0.1); border: 1px solid rgba(245,197,24,0.25); color: var(--gold); font-size: 0.82rem; font-weight: 600; padding: 0.3rem 1rem; border-radius: 50px; margin-bottom: 1rem; text-transform: uppercase; letter-spacing: 0.05em; }
.section-title { font-size: clamp(1.6rem,3vw,2.4rem); margin-bottom: 0.8rem; }
.section-desc { color: var(--text-muted); max-width: 600px; margin: 0 auto; }
.divider { width: 60px; height: 3px; background: linear-gradient(90deg,var(--gold),transparent); border-radius: 3px; margin: 1rem auto 0; }

/* ===== GRID ===== */
.grid-2 { display: grid; grid-template-columns: repeat(2,1fr); gap: 1.5rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 1.5rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4,1fr); gap: 1.5rem; }

/* ===== TIMELINE ===== */
.timeline { position: relative; padding-left: 2rem; }
.timeline::before { content: ''; position: absolute; left: 18px; top: 0; bottom: 0; width: 2px; background: linear-gradient(var(--gold),transparent); }
.timeline-item { position: relative; padding: 0 0 2.5rem 2rem; }
.timeline-dot { position: absolute; left: -2rem; top: 4px; width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(135deg,var(--gold),var(--gold-light)); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 0.85rem; color: var(--navy); }
.timeline-title { font-weight: 700; font-size: 1.05rem; margin-bottom: 0.4rem; }
.timeline-body { color: var(--text-muted); font-size: 0.92rem; }

/* ===== TABLE ===== */
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border); }
table { width: 100%; border-collapse: collapse; }
thead { background: rgba(245,197,24,0.08); }
th, td { padding: 0.9rem 1.2rem; text-align: left; border-bottom: 1px solid var(--border); font-size: 0.92rem; }
th { font-weight: 700; color: var(--gold); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.05em; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(255,255,255,0.02); }

/* ===== FAQ ACCORDION ===== */
.faq-item { border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 0.75rem; overflow: hidden; transition: var(--transition); }
.faq-item.open { border-color: rgba(245,197,24,0.35); }
.faq-question { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1.2rem 1.5rem; cursor: pointer; font-weight: 600; transition: var(--transition); }
.faq-question:hover { background: rgba(255,255,255,0.03); }
.faq-icon { width: 28px; height: 28px; border-radius: 50%; border: 1.5px solid var(--border); display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: var(--transition); font-size: 1.2rem; color: var(--gold); }
.faq-item.open .faq-icon { transform: rotate(45deg); border-color: var(--gold); }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.4s ease, padding 0.3s ease; }
.faq-answer-inner { padding: 0 1.5rem 1.5rem; color: var(--text-muted); font-size: 0.95rem; }

/* ===== LOCATION GRID ===== */
.location-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px,1fr)); gap: 0.75rem; }
.location-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; text-align: center; color: var(--text); font-size: 0.9rem; font-weight: 500; transition: var(--transition); cursor: pointer; }
.location-card:hover { border-color: var(--gold); color: var(--gold); background: rgba(245,197,24,0.05); transform: translateY(-2px); }
.location-card .loc-icon { font-size: 1.4rem; margin-bottom: 0.4rem; }

/* ===== BREADCRUMB ===== */
.breadcrumb { display: flex; align-items: center; gap: 0.5rem; font-size: 0.85rem; color: var(--text-muted); margin-bottom: 1.5rem; flex-wrap: wrap; }
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--gold); }
.breadcrumb-sep { color: var(--border); }

/* ===== CTA SECTION ===== */
.cta-section {
  background: linear-gradient(135deg, var(--navy-mid), var(--navy));
  border-radius: var(--radius-lg);
  padding: 4rem 3rem;
  text-align: center;
  border: 1px solid rgba(245,197,24,0.15);
  position: relative; overflow: hidden;
}
.cta-section::before { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse 50% 80% at 50% 0%, rgba(245,197,24,0.1),transparent); }
.cta-section h2 { font-size: clamp(1.5rem,3vw,2.4rem); margin-bottom: 1rem; }
.cta-section p { color: var(--text-muted); margin-bottom: 2rem; max-width: 560px; margin-left: auto; margin-right: auto; }
.cta-contacts { display: flex; justify-content: center; gap: 1.5rem; flex-wrap: wrap; margin-top: 2rem; }
.cta-contact-item { display: flex; align-items: center; gap: 0.5rem; color: var(--text-muted); font-size: 0.95rem; }
.cta-contact-item strong { color: var(--text-light); }

/* ===== BADGES ===== */
.badge { display: inline-block; padding: 0.25rem 0.75rem; border-radius: 50px; font-size: 0.78rem; font-weight: 600; }
.badge-gold { background: rgba(245,197,24,0.15); color: var(--gold); border: 1px solid rgba(245,197,24,0.3); }
.badge-green { background: rgba(34,197,94,0.15); color: var(--success); }
.badge-red { background: rgba(239,68,68,0.15); color: var(--danger); }

/* ===== FOOTER ===== */
.footer { background: rgba(4,8,18,0.8); border-top: 1px solid var(--border); padding: 3rem 0 1.5rem; margin-top: 5rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 3rem; margin-bottom: 2rem; }
.footer-brand { font-size: 1.1rem; font-weight: 800; color: var(--text-light); margin-bottom: 0.8rem; }
.footer-brand span { color: var(--gold); }
.footer-desc { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 1.2rem; }
.footer h4 { font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--gold); margin-bottom: 1rem; }
.footer ul { list-style: none; }
.footer ul li { margin-bottom: 0.5rem; }
.footer ul li a { color: var(--text-muted); font-size: 0.9rem; transition: var(--transition); }
.footer ul li a:hover { color: var(--gold); }
.footer-bottom { border-top: 1px solid var(--border); padding-top: 1.5rem; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; }
.footer-bottom p { color: var(--text-muted); font-size: 0.82rem; }
.contact-pill { display: inline-flex; align-items: center; gap: 0.4rem; background: rgba(245,197,24,0.1); border: 1px solid rgba(245,197,24,0.2); border-radius: 50px; padding: 0.4rem 1rem; font-size: 0.88rem; color: var(--gold); margin: 0.3rem; }

/* ===== SLIDESHOW ===== */
.slideshow { position: relative; overflow: hidden; border-radius: var(--radius-lg); }
.slide { display: none; }
.slide.active { display: block; }
.slide-inner { padding: 4rem 3rem; min-height: 340px; display: flex; flex-direction: column; justify-content: center; }
.slide-dots { display: flex; justify-content: center; gap: 0.5rem; margin-top: 1.5rem; }
.slide-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--border); cursor: pointer; transition: var(--transition); }
.slide-dot.active { background: var(--gold); width: 24px; border-radius: 4px; }

/* ===== KNOWLEDGE CARD ===== */
.article-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; transition: var(--transition); display: flex; flex-direction: column; }
.article-card:hover { border-color: rgba(245,197,24,0.25); transform: translateY(-4px); box-shadow: var(--shadow); }
.article-card-body { padding: 1.5rem; flex: 1; }
.article-card-meta { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 0.5rem; }
.article-card-title { font-size: 1rem; font-weight: 700; margin-bottom: 0.5rem; color: var(--text-light); }
.article-card-title a { color: inherit; }
.article-card-title a:hover { color: var(--gold); }
.article-card-summary { font-size: 0.88rem; color: var(--text-muted); }
.article-card-footer { padding: 1rem 1.5rem; border-top: 1px solid var(--border); }

/* ===== SEARCH BAR ===== */
.search-bar { display: flex; gap: 0.5rem; max-width: 560px; margin: 0 auto; }
.search-bar input { flex: 1; background: var(--bg-card); border: 1px solid var(--border); border-radius: 50px; padding: 0.8rem 1.5rem; color: var(--text); font-family: inherit; font-size: 0.95rem; outline: none; transition: var(--transition); }
.search-bar input:focus { border-color: var(--gold); }
.search-bar input::placeholder { color: var(--text-muted); }
.search-bar button { background: linear-gradient(135deg,var(--gold),var(--gold-light)); color: var(--navy); border: none; border-radius: 50px; padding: 0.8rem 1.5rem; font-weight: 700; cursor: pointer; font-family: inherit; transition: var(--transition); }
.search-bar button:hover { opacity: 0.9; }

/* ===== ADMIN ===== */
.admin-body { background: #0b1120; }
.admin-layout { display: flex; min-height: 100vh; }
.sidebar { width: 260px; background: rgba(255,255,255,0.03); border-right: 1px solid var(--border); padding: 1.5rem 0; flex-shrink: 0; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.sidebar-brand { padding: 0 1.5rem 1.5rem; border-bottom: 1px solid var(--border); margin-bottom: 1rem; font-weight: 800; font-size: 1rem; color: var(--text-light); }
.sidebar-brand span { color: var(--gold); }
.sidebar-nav { list-style: none; }
.sidebar-nav li a { display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem 1.5rem; color: var(--text-muted); font-size: 0.9rem; font-weight: 500; transition: var(--transition); }
.sidebar-nav li a:hover, .sidebar-nav li a.active { color: var(--text-light); background: rgba(245,197,24,0.08); border-right: 2px solid var(--gold); }
.sidebar-nav .nav-icon { font-size: 1.1rem; width: 22px; text-align: center; }
.admin-content { flex: 1; padding: 2rem; overflow-x: hidden; }
.admin-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2rem; flex-wrap: wrap; gap: 1rem; }
.admin-header h1 { font-size: 1.5rem; }
.stat-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; }
.stat-card .stat-num { font-size: 2.5rem; font-weight: 800; color: var(--gold); }
.stat-card .stat-label { color: var(--text-muted); font-size: 0.9rem; }

/* ===== FORMS ===== */
.form-group { margin-bottom: 1.2rem; }
.form-label { display: block; font-size: 0.88rem; font-weight: 600; color: var(--text-muted); margin-bottom: 0.4rem; text-transform: uppercase; letter-spacing: 0.04em; }
.form-control { width: 100%; background: rgba(255,255,255,0.05); border: 1px solid var(--border); border-radius: 8px; padding: 0.75rem 1rem; color: var(--text); font-family: inherit; font-size: 0.95rem; outline: none; transition: var(--transition); }
.form-control:focus { border-color: var(--gold); background: rgba(255,255,255,0.07); }
.form-control::placeholder { color: var(--text-muted); }
textarea.form-control { resize: vertical; min-height: 120px; }
select.form-control option { background: var(--navy); }
.form-check { display: flex; align-items: center; gap: 0.5rem; }
.form-check input { width: 18px; height: 18px; accent-color: var(--gold); }

/* ===== FLASH ===== */
.flash { padding: 1rem 1.5rem; border-radius: var(--radius); margin-bottom: 1.5rem; font-weight: 500; border-left: 4px solid; }
.flash-success { background: rgba(34,197,94,0.1); border-color: var(--success); color: var(--success); }
.flash-error { background: rgba(239,68,68,0.1); border-color: var(--danger); color: var(--danger); }

/* ===== ANIMATIONS ===== */
.fade-in { opacity: 0; transform: translateY(20px); transition: opacity 0.6s ease, transform 0.6s ease; }
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2,1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { display: none; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .navbar-nav { display: none; flex-direction: column; position: absolute; top: 100%; left: 0; right: 0; background: rgba(8,15,35,0.98); padding: 1rem 1.5rem; border-bottom: 1px solid var(--border); }
  .navbar-nav.open { display: flex; }
  .hamburger { display: flex; }
  .admin-layout { flex-direction: column; }
  .sidebar { width: 100%; height: auto; position: relative; }
  .footer-grid { grid-template-columns: 1fr; }
  .location-grid { grid-template-columns: repeat(auto-fill,minmax(130px,1fr)); }
}
@media (max-width: 480px) {
  .grid-4 { grid-template-columns: 1fr; }
  .hero-actions { flex-direction: column; }
  .hero-stats { gap: 1.5rem; }
  .cta-section { padding: 2.5rem 1.5rem; }
}
