/* =============================================================
   พิษณุโลก ฟิชชิ่ง — Dark Outdoors / Nature theme
   Brand: deep charcoal + water-blue + forest-green accent
   Framework: Bootstrap 5 (CDN). This file = brand tokens, type,
   small component tweaks only.
   ============================================================= */

:root {
  /* Charcoal / ink scale (heritage dark) */
  --ink-900: #0c0f0e;
  --ink-850: #111513;
  --ink-800: #161b19;
  --ink-700: #1d2422;
  --ink-600: #27302d;
  --ink-500: #354040;

  /* Forest green accent (from original #5a9e2f, refined) */
  --green-400: #8cd04a;
  --green-500: #66b539;
  --green-600: #4f9c2c;
  --green-700: #3c7d20;

  /* Fresh water-blue secondary accent */
  --water-300: #7fd4e8;
  --water-400: #45b9d6;
  --water-500: #2a9fc0;
  --water-600: #1d7e9c;

  /* Text on dark */
  --text-100: #f3f6f4;
  --text-200: #d6ddd9;
  --text-300: #aab4b0;
  --text-400: #8a948f;

  --radius: 14px;
  --radius-sm: 9px;
  --shadow-soft: 0 10px 30px rgba(0, 0, 0, .45);
  --shadow-lift: 0 18px 48px rgba(0, 0, 0, .55);

  --font-body: 'Sarabun', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-head: 'Kanit', 'Sarabun', system-ui, sans-serif;

  --maxw: 1180px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background-color: var(--ink-900);
  color: var(--text-200);
  font-size: 1.0625rem;
  line-height: 1.85;
  margin: 0;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  /* subtle layered radial wash so the dark feels alive, not flat */
  background-image:
    radial-gradient(1200px 600px at 12% -8%, rgba(42, 159, 192, .10), transparent 60%),
    radial-gradient(1000px 520px at 92% 4%, rgba(79, 156, 44, .10), transparent 62%);
  background-attachment: fixed;
}

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

a { color: var(--green-400); text-decoration: none; transition: color .18s ease; }
a:hover { color: var(--water-300); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Typography ---------- */
h1, h2, h3, h4 {
  font-family: var(--font-head);
  color: var(--text-100);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: .01em;
}
h1 { font-size: clamp(1.9rem, 4.4vw, 3rem); font-weight: 700; margin: 0 0 1rem; }
h2 {
  font-size: clamp(1.4rem, 2.8vw, 1.95rem);
  margin: 2.4rem 0 1rem;
  padding-left: .85rem;
  border-left: 4px solid var(--green-500);
}
h3 { font-size: clamp(1.15rem, 2vw, 1.4rem); margin: 1.8rem 0 .6rem; color: var(--water-300); }
p { margin: 0 0 1.15rem; }
strong { color: var(--text-100); font-weight: 600; }
em { color: var(--text-300); font-style: normal; font-size: .95em; letter-spacing: .02em; }

/* ---------- Navbar ---------- */
.site-nav {
  background: rgba(12, 15, 14, .82);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, .06);
  box-shadow: 0 2px 24px rgba(0, 0, 0, .35);
}
.brand-wrap { display: flex; align-items: center; gap: .65rem; }
.brand-mark {
  width: 40px; height: 40px; border-radius: 11px; flex: 0 0 auto;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--green-600), var(--water-600));
  box-shadow: 0 4px 14px rgba(79, 156, 44, .4);
  font-size: 1.35rem;
}
.brand-text { line-height: 1.1; }
.brand-text .b-main {
  font-family: var(--font-head); font-weight: 700; font-size: 1.18rem; color: var(--text-100);
  letter-spacing: .015em;
}
.brand-text .b-sub { font-size: .72rem; color: var(--text-400); letter-spacing: .04em; }

.navbar-dark .navbar-nav .nav-link {
  color: var(--text-200);
  font-family: var(--font-head);
  font-weight: 500;
  font-size: .98rem;
  padding: .5rem .9rem;
  border-radius: 9px;
  transition: background .18s ease, color .18s ease;
}
.navbar-dark .navbar-nav .nav-link:hover,
.navbar-dark .navbar-nav .nav-link:focus { color: var(--green-400); background: rgba(255, 255, 255, .05); }
.navbar-dark .navbar-nav .nav-link.active { color: var(--green-400); background: rgba(102, 181, 57, .14); }
.navbar-toggler { border-color: rgba(255, 255, 255, .18); }
.dropdown-menu-dark {
  background: var(--ink-800);
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 12px;
  box-shadow: var(--shadow-soft);
  padding: .4rem;
}
.dropdown-menu-dark .dropdown-item { border-radius: 8px; font-size: .95rem; color: var(--text-200); padding: .5rem .8rem; }
.dropdown-menu-dark .dropdown-item:hover { background: rgba(102, 181, 57, .16); color: var(--green-400); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 70vh;
  display: flex;
  align-items: flex-end;
  color: var(--text-100);
  overflow: hidden;
  border-bottom: 1px solid rgba(255, 255, 255, .06);
}
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background: var(--hero-img, none) center / cover no-repeat;
  transform: scale(1.04);
  z-index: 0;
}
.hero-bg {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; object-position: center;
  transform: scale(1.04);
  z-index: 0;
}
.hero::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(8, 11, 10, .25) 0%, rgba(8, 11, 10, .55) 55%, rgba(8, 11, 10, .94) 100%);
  z-index: 1;
}
.hero-inner { position: relative; z-index: 2; padding: 3.5rem 0 3rem; max-width: 820px; }
.hero .eyebrow {
  display: inline-block;
  font-family: var(--font-head);
  font-size: .8rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--green-400);
  background: rgba(102, 181, 57, .12);
  border: 1px solid rgba(102, 181, 57, .35);
  padding: .3rem .8rem; border-radius: 999px; margin-bottom: 1rem;
}
.hero h1 { color: #fff; text-shadow: 0 2px 24px rgba(0, 0, 0, .6); }
.hero .lead-text { font-size: 1.15rem; color: var(--text-200); max-width: 640px; text-shadow: 0 1px 12px rgba(0,0,0,.5); }

/* compact page hero for interior pages */
.page-hero { min-height: 46vh; }
.page-hero .hero-inner { padding: 3rem 0 2.4rem; }

/* ---------- Section wrappers ---------- */
.section { padding: 3.5rem 0; }
.section-tight { padding: 2.4rem 0; }
.bg-panel { background: var(--ink-850); }
.bg-panel-2 { background: linear-gradient(180deg, var(--ink-850), var(--ink-900)); }
.container-narrow { max-width: 880px; }

/* ---------- Article body ---------- */
.article {
  background: var(--ink-800);
  border: 1px solid rgba(255, 255, 255, .055);
  border-radius: var(--radius);
  padding: clamp(1.4rem, 3vw, 2.8rem);
  box-shadow: var(--shadow-soft);
}
.article ul, .article ol { margin: 0 0 1.2rem; padding-left: 1.3rem; }
.article li { margin-bottom: .55rem; }
.article ul li::marker { color: var(--green-500); }
.article img {
  border-radius: var(--radius-sm);
  margin: 1.6rem 0;
  border: 1px solid rgba(255, 255, 255, .07);
  box-shadow: var(--shadow-soft);
  width: 100%;
}
.article figure { margin: 1.8rem 0; }
.article figcaption { font-size: .85rem; color: var(--text-400); text-align: center; margin-top: .5rem; }
.article a { border-bottom: 1px dotted rgba(140, 208, 74, .5); }
.article a:hover { border-bottom-color: var(--water-300); }
.article > p:first-of-type { font-size: 1.1rem; color: var(--text-100); }

/* breadcrumb-ish lead em line */
.kicker {
  font-family: var(--font-head);
  font-size: .82rem; letter-spacing: .04em;
  color: var(--green-400);
  text-transform: none;
  margin-bottom: .4rem;
}

/* ---------- Cards (hub grids / homepage) ---------- */
.tile {
  display: block; height: 100%;
  background: var(--ink-800);
  border: 1px solid rgba(255, 255, 255, .07);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
  color: var(--text-200);
}
.tile:hover {
  transform: translateY(-5px);
  border-color: rgba(102, 181, 57, .5);
  box-shadow: var(--shadow-lift);
  text-decoration: none;
}
.tile-media { aspect-ratio: 3 / 2; overflow: hidden; background: var(--ink-700); }
.tile-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.tile:hover .tile-media img { transform: scale(1.06); }
.tile-body { padding: 1.15rem 1.25rem 1.35rem; }
.tile-body h3 { margin: 0 0 .4rem; color: var(--text-100); font-size: 1.15rem; }
.tile-body p { margin: 0; font-size: .94rem; color: var(--text-300); line-height: 1.65; }
.tile-tag {
  display: inline-block; font-size: .72rem; letter-spacing: .05em;
  color: var(--water-300); margin-bottom: .55rem; font-family: var(--font-head);
}

/* index list of knowledge links */
.linklist { list-style: none; padding: 0; margin: 0; }
.linklist li { margin: 0; }
.linklist a {
  display: flex; align-items: center; gap: .7rem;
  padding: .85rem 1.05rem;
  background: var(--ink-800);
  border: 1px solid rgba(255, 255, 255, .06);
  border-radius: 11px;
  color: var(--text-100);
  font-family: var(--font-head); font-weight: 500;
  transition: all .18s ease;
}
.linklist a::before { content: "›"; color: var(--green-500); font-size: 1.3rem; line-height: 1; }
.linklist a:hover { background: rgba(102, 181, 57, .12); border-color: rgba(102,181,57,.4); transform: translateX(3px); text-decoration: none; }

/* ---------- Buttons ---------- */
.btn-river {
  --bs-btn-color: #06140a;
  background: linear-gradient(135deg, var(--green-500), var(--green-700));
  border: none; color: #07160b; font-family: var(--font-head); font-weight: 600;
  border-radius: 999px; padding: .65rem 1.6rem;
  box-shadow: 0 8px 22px rgba(79, 156, 44, .35);
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn-river:hover { transform: translateY(-2px); color: #07160b; box-shadow: 0 12px 30px rgba(79, 156, 44, .5); }
.btn-ghost {
  border: 1px solid rgba(127, 212, 232, .5);
  color: var(--water-300); border-radius: 999px; padding: .65rem 1.6rem;
  font-family: var(--font-head); font-weight: 500; background: transparent;
  transition: all .15s ease;
}
.btn-ghost:hover { background: rgba(69, 185, 214, .12); color: var(--water-300); }

/* ---------- Pager (prev/next within knowledge) ---------- */
.section-divider { height: 1px; background: linear-gradient(90deg, transparent, rgba(255,255,255,.12), transparent); margin: 2.6rem 0; border: 0; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink-850);
  border-top: 1px solid rgba(255, 255, 255, .07);
  padding: 3rem 0 1.6rem;
  color: var(--text-300);
  margin-top: 2rem;
}
.site-footer h4 { font-size: 1rem; color: var(--text-100); margin-bottom: 1rem; }
.site-footer a { color: var(--text-300); }
.site-footer a:hover { color: var(--green-400); text-decoration: none; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: .55rem; font-size: .94rem; }
.footer-brand .brand-text .b-main { font-size: 1.25rem; }
.footer-note {
  border-top: 1px solid rgba(255, 255, 255, .06);
  margin-top: 2rem; padding-top: 1.2rem;
  font-size: .85rem; color: var(--text-400); text-align: center;
}
.footer-disclaimer { font-size: .9rem; color: var(--text-400); line-height: 1.7; }

/* ---------- 404 ---------- */
.notfound {
  min-height: 72vh; display: flex; align-items: center; justify-content: center; text-align: center;
  padding: 4rem 1rem;
}
.notfound .big { font-family: var(--font-head); font-size: clamp(4rem, 16vw, 9rem); font-weight: 700;
  line-height: 1; background: linear-gradient(135deg, var(--green-400), var(--water-400));
  -webkit-background-clip: text; background-clip: text; color: transparent; margin-bottom: .5rem; }

/* ---------- Utility ---------- */
.text-accent { color: var(--green-400); }
.text-water { color: var(--water-300); }
.muted { color: var(--text-400); }
.lead-text { font-size: 1.12rem; color: var(--text-200); }
.intro-card {
  background: linear-gradient(135deg, rgba(42,159,192,.08), rgba(79,156,44,.06));
  border: 1px solid rgba(255,255,255,.07);
  border-radius: var(--radius); padding: 1.6rem 1.8rem;
}

@media (max-width: 575.98px) {
  body { font-size: 1rem; line-height: 1.78; }
  .hero { min-height: 62vh; }
  .article { padding: 1.25rem; }
}
