/* ============================================
   DESIGN SYSTEM & CSS VARIABLES
   ============================================ */
:root {
  /* Typography */
  --font-heading: 'Space Grotesk', 'Noto Sans Thai', sans-serif;
  --font-body: 'Inter', 'Noto Sans Thai', sans-serif;

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --space-4xl: 6rem;

  /* Border Radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-base: 0.3s ease;
  --transition-slow: 0.5s ease;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.12);
  --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.15);

  /* Container */
  --container-max: 1120px;
  --nav-height: 72px;
}

/* --- DARK THEME (Default) --- */
[data-theme="dark"] {
  --bg-primary: #0a0f1e;
  --bg-secondary: #111827;
  --bg-tertiary: #1a2332;
  --bg-card: rgba(26, 35, 50, 0.7);
  --bg-card-hover: rgba(36, 48, 68, 0.8);
  --bg-nav: rgba(10, 15, 30, 0.85);

  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-tertiary: #64748b;

  --accent: #f7931a;
  --accent-light: #fbb957;
  --accent-dark: #d97c0a;
  --accent-glow: rgba(247, 147, 26, 0.15);

  --border: rgba(148, 163, 184, 0.1);
  --border-hover: rgba(148, 163, 184, 0.2);

  --glass-bg: rgba(17, 24, 39, 0.6);
  --glass-border: rgba(255, 255, 255, 0.06);

  --code-bg: #1e293b;
  --scrollbar-thumb: #334155;
}

/* --- LIGHT THEME --- */
[data-theme="light"] {
  --bg-primary: #f8fafc;
  --bg-secondary: #f1f5f9;
  --bg-tertiary: #e2e8f0;
  --bg-card: rgba(255, 255, 255, 0.8);
  --bg-card-hover: rgba(255, 255, 255, 0.95);
  --bg-nav: rgba(248, 250, 252, 0.88);

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-tertiary: #94a3b8;

  --accent: #e8820f;
  --accent-light: #f7931a;
  --accent-dark: #c46e0a;
  --accent-glow: rgba(247, 147, 26, 0.1);

  --border: rgba(15, 23, 42, 0.08);
  --border-hover: rgba(15, 23, 42, 0.15);

  --glass-bg: rgba(255, 255, 255, 0.65);
  --glass-border: rgba(15, 23, 42, 0.06);

  --code-bg: #e2e8f0;
  --scrollbar-thumb: #cbd5e1;
}

/* ============================================
   LANGUAGE TOGGLE — Show/Hide text
   ============================================ */
[data-lang="th"] [data-lang-en] {
  display: none !important;
}

[data-lang="en"] [data-lang-th] {
  display: none !important;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-height);
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  transition: background-color var(--transition-base), color var(--transition-base);
  overflow-x: hidden;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--accent-light);
}

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

ul {
  list-style: none;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.3;
  color: var(--text-primary);
}

::selection {
  background-color: var(--accent);
  color: #fff;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: var(--scrollbar-thumb);
  border-radius: var(--radius-full);
}

/* ============================================
   UTILITIES
   ============================================ */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-xl);
}

.text-accent {
  color: var(--accent);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius-full);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all var(--transition-base);
  border: none;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #fff;
  box-shadow: 0 4px 15px rgba(247, 147, 26, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(247, 147, 26, 0.4);
  color: #fff;
}

.btn-outline {
  background: transparent;
  color: var(--accent);
  border: 1.5px solid var(--accent);
}

.btn-outline:hover {
  background: var(--accent-glow);
  transform: translateY(-2px);
  color: var(--accent);
}

.btn-full {
  width: 100%;
  justify-content: center;
}

.section {
  padding: var(--space-4xl) 0;
  position: relative;
}

.section-title {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  margin-bottom: var(--space-2xl);
}

.section-subtitle {
  color: var(--text-secondary);
  font-size: 1.05rem;
  max-width: 600px;
  margin-bottom: var(--space-2xl);
}

/* ============================================
   ANIMATIONS
   ============================================ */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(-12px);
  }
}

@keyframes pulse-glow {

  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(247, 147, 26, 0.3);
  }

  50% {
    box-shadow: 0 0 20px 5px rgba(247, 147, 26, 0.1);
  }
}

@keyframes scroll-line {
  0% {
    transform: scaleY(0);
    transform-origin: top;
  }

  50% {
    transform: scaleY(1);
    transform-origin: top;
  }

  51% {
    transform-origin: bottom;
  }

  100% {
    transform: scaleY(0);
    transform-origin: bottom;
  }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(30px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ============================================
   NAVIGATION
   ============================================ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  z-index: 1000;
  background: var(--bg-nav);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--glass-border);
  transition: all var(--transition-base);
}

.navbar.scrolled {
  box-shadow: var(--shadow-md);
}

.nav-container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-xl);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  height: 100%;
}

.logo-img {
  height: 44px;
  width: auto;
  border-radius: 50%;
  transition: transform var(--transition-base);
}

.nav-logo:hover .logo-img {
  transform: scale(1.05);
}

.logo-accent {
  color: var(--accent);
}

.nav-links {
  display: flex;
  gap: var(--space-lg);
}

.nav-link {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  padding: var(--space-sm) 0;
  position: relative;
  text-decoration: none;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width var(--transition-base);
}

.nav-link:hover,
.nav-link.active {
  color: var(--text-primary);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

/* Language Toggle */
.lang-toggle {
  height: 36px;
  padding: 0 14px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--accent);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-base);
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.lang-toggle:hover {
  border-color: var(--accent);
  background: var(--accent-glow);
}

/* Theme Toggle */
.theme-toggle {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-base);
}

.theme-toggle:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-glow);
}

[data-theme="dark"] .icon-sun {
  display: block;
}

[data-theme="dark"] .icon-moon {
  display: none;
}

[data-theme="light"] .icon-sun {
  display: none;
}

[data-theme="light"] .icon-moon {
  display: block;
}

/* Mobile Menu Button */
.mobile-menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
}

.mobile-menu-btn span {
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  transition: all var(--transition-base);
  border-radius: 2px;
}

.mobile-menu-btn.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-btn.active span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ============================================
   HERO SECTION — Fullscreen Slideshow
   ============================================ */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.hero-slideshow {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-slideshow .slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.2s ease-in-out;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.hero-slideshow .slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-slideshow .slide.active {
  opacity: 1;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 750px;
  padding: 0 var(--space-xl);
}

.hero-greeting {
  font-size: 1rem;
  color: var(--accent);
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: var(--space-md);
}

.hero-name {
  font-size: clamp(2.5rem, 7vw, 4.5rem);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: var(--space-lg);
  letter-spacing: -1px;
  color: #fff;
}

.hero-name-en {
  font-size: 0.5em;
  letter-spacing: 4px;
  color: var(--accent);
  font-weight: 500;
  display: block;
  margin-top: var(--space-xs);
}

.hero-role-new {
  font-size: 1.25rem;
  margin: var(--space-xl) 0;
  line-height: 1.8;
  font-weight: 400;
  color: #fff;
}

.hero-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  transition: all var(--transition-base);
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}

.hero-link:hover {
  border-bottom-color: var(--accent);
  color: var(--accent-light);
}

.role-divider {
  margin: 2px 0;
  opacity: 0.5;
  font-weight: 300;
}

.hero-cta .btn {
  background: rgba(10, 25, 47, 0.75);
  color: var(--accent);
  border: 1px solid var(--accent);
  box-shadow: none;
}

.hero-cta .btn:hover {
  background: var(--accent);
  color: #fff;
  transform: translateY(-3px);
  box-shadow: 0 10px 20px var(--accent-glow);
}

.hero-cta {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
  justify-content: center;
}

/* Scroll Indicator */
.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.75rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  z-index: 2;
}

.scroll-line {
  width: 1px;
  height: 40px;
  background: var(--accent);
  animation: scroll-line 2s ease-in-out infinite;
}

/* ============================================
   COURSES SECTION
   ============================================ */
.courses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: var(--space-xl);
}

.course-card {
  display: block;
  text-decoration: none;
  color: inherit;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition-base);
}

.course-card:hover {
  transform: translateY(-6px);
  border-color: var(--accent);
  box-shadow: var(--shadow-xl), 0 0 40px var(--accent-glow);
}

.course-image {
  width: 100%;
  overflow: hidden;
}

.course-image img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform var(--transition-slow);
}

.course-card:hover .course-image img {
  transform: scale(1.05);
}

.course-image-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-tertiary);
  color: var(--text-tertiary);
  transition: background var(--transition-base);
}

.course-card:hover .course-image-placeholder {
  background: var(--accent-glow);
  color: var(--accent);
}

.course-info {
  padding: var(--space-lg);
}

.course-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: var(--space-md);
  line-height: 1.4;
}

.course-meta {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}

.course-date,
.course-location,
.course-time {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  color: var(--text-tertiary);
  font-weight: 500;
}

.course-date svg,
.course-location svg,
.course-time svg {
  color: var(--accent);
  flex-shrink: 0;
}

.course-description {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.7;
}

/* ============================================
   BOOK SECTION
   ============================================ */
.book-feature {
  display: grid;
  grid-template-columns: 420px 1fr;
  gap: var(--space-xl);
  align-items: start;
  padding: var(--space-xl);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  transition: all var(--transition-base);
}

.book-feature:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-lg);
}

.book-image {
  position: relative;
  width: 100%;
}

.book-image img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform var(--transition-base);
}

.book-feature:hover .book-image img {
  transform: scale(1.03) rotate(-1deg);
}

.book-image-placeholder {
  width: 100%;
  aspect-ratio: 3/4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
  color: var(--text-tertiary);
  gap: var(--space-md);
  box-shadow: var(--shadow-lg);
}

.book-image-placeholder svg {
  opacity: 0.5;
}

.book-image-placeholder p {
  font-size: 0.85rem;
  opacity: 0.5;
}

.book-info {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.book-badge {
  display: inline-flex;
  align-self: flex-start;
  font-size: 0.72rem;
  padding: 4px 12px;
  background: var(--accent-glow);
  color: var(--accent);
  border-radius: var(--radius-full);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.book-title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  line-height: 1.2;
}

.book-author {
  color: var(--text-tertiary);
  font-size: 0.9rem;
  font-weight: 500;
}

.book-description {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.8;
}

.book-buy-btn {
  align-self: flex-start;
  margin-top: var(--space-sm);
}

/* ============================================
   EVENTS TIMELINE
   ============================================ */
.events-timeline {
  position: relative;
  padding-left: var(--space-2xl);
}

.events-timeline::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent), var(--border));
}

.event-item {
  position: relative;
  margin-bottom: var(--space-2xl);
  animation: slideIn 0.5s ease forwards;
}

.event-item:last-child {
  margin-bottom: 0;
}

.event-marker {
  position: absolute;
  left: calc(-1 * var(--space-2xl) + 2px);
  top: 6px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid var(--bg-primary);
  z-index: 1;
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.event-content {
  padding: var(--space-lg);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: all var(--transition-base);
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.event-content.has-photos {
  flex-direction: row;
  align-items: flex-start;
}

.event-content:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-md);
}

.event-thumb {
  flex-shrink: 0;
  width: 180px;
  position: relative;
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: pointer;
  background: var(--bg-tertiary);
}

.event-thumb img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform var(--transition-base);
}

.event-thumb:hover img {
  transform: scale(1.1);
}

.thumb-overlay {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
  backdrop-filter: blur(4px);
}

.event-details {
  flex: 1;
  min-width: 0;
}

.event-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-bottom: var(--space-xs);
}

.event-header h3 {
  font-size: 1.15rem;
  font-weight: 600;
}

.event-type-badge {
  font-size: 0.7rem;
  padding: 3px 10px;
  background: var(--accent-glow);
  color: var(--accent);
  border-radius: var(--radius-full);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.event-meta {
  display: flex;
  gap: var(--space-lg);
  flex-wrap: wrap;
  margin-bottom: var(--space-md);
}

.event-date,
.event-location {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  color: var(--text-tertiary);
  font-weight: 500;
}

.event-date svg,
.event-location svg {
  color: var(--accent);
  flex-shrink: 0;
}

.event-description {
  color: var(--text-secondary);
  font-size: 0.92rem;
  margin-bottom: var(--space-md);
  line-height: 1.7;
}

.event-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}

.event-tag {
  font-size: 0.72rem;
  font-weight: 500;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  background: transparent !important;
  border: 1px solid transparent;
  transition: all var(--transition-fast);
}

/* Tag Colors - Dark Theme */
[data-theme="dark"] .tag-bitcoin {
  color: #fbb957;
  border-color: rgba(247, 147, 26, 0.4);
}

[data-theme="dark"] .tag-lightning-network {
  color: #71c4ff;
  border-color: rgba(113, 196, 255, 0.4);
}

[data-theme="dark"] .tag-nostr {
  color: #c084fc;
  border-color: rgba(168, 85, 247, 0.4);
}

[data-theme="dark"] .tag-ปรัชญา {
  color: #5eead4;
  border-color: rgba(45, 212, 191, 0.4);
}

[data-theme="dark"] .tag-เงิน {
  color: #10b981;
  border-color: rgba(16, 185, 129, 0.4);
}

[data-theme="dark"] .tag-technology {
  color: #818cf8;
  border-color: rgba(129, 140, 248, 0.4);
}

[data-theme="dark"] .tag-self-custody {
  color: #22d3ee;
  border-color: rgba(34, 211, 238, 0.4);
}

[data-theme="dark"] .tag-ศาสนา {
  color: #a855f7;
  border-color: rgba(168, 85, 247, 0.4);
}

[data-theme="dark"] .tag-ชีวิต {
  color: #fb7185;
  border-color: rgba(251, 113, 133, 0.4);
}

[data-theme="dark"] .tag-การเมือง {
  color: #fbbf24;
  border-color: rgba(251, 191, 36, 0.4);
}

[data-theme="dark"] .tag-ธุรกิจ {
  color: #a3e635;
  border-color: rgba(163, 230, 53, 0.4);
}

[data-theme="dark"] .tag-เศรษฐศาสตร์ {
  color: #86efac;
  border-color: rgba(34, 197, 94, 0.4);
}

[data-theme="dark"] .tag-community {
  color: #f472b6;
  border-color: rgba(236, 72, 153, 0.4);
}

[data-theme="dark"] .tag-กฎหมาย-ภาษี {
  color: #fca5a5;
  border-color: rgba(239, 68, 68, 0.4);
}

/* Tag Colors - Light Theme */
[data-theme="light"] .tag-bitcoin {
  color: #d97c0a;
  border-color: rgba(247, 147, 26, 0.3);
}

[data-theme="light"] .tag-lightning-network {
  color: #0284c7;
  border-color: rgba(14, 165, 233, 0.3);
}

[data-theme="light"] .tag-nostr {
  color: #9333ea;
  border-color: rgba(168, 85, 247, 0.3);
}

[data-theme="light"] .tag-ปรัชญา {
  color: #0f766e;
  border-color: rgba(20, 184, 166, 0.3);
}

[data-theme="light"] .tag-เงิน {
  color: #059669;
  border-color: rgba(5, 150, 105, 0.3);
}

[data-theme="light"] .tag-technology {
  color: #4f46e5;
  border-color: rgba(79, 70, 229, 0.3);
}

[data-theme="light"] .tag-self-custody {
  color: #0891b2;
  border-color: rgba(8, 145, 178, 0.3);
}

[data-theme="light"] .tag-ศาสนา {
  color: #7e22ce;
  border-color: rgba(126, 34, 206, 0.3);
}

[data-theme="light"] .tag-ชีวิต {
  color: #e11d48;
  border-color: rgba(225, 29, 72, 0.3);
}

[data-theme="light"] .tag-การเมือง {
  color: #d97706;
  border-color: rgba(217, 119, 6, 0.3);
}

[data-theme="light"] .tag-ธุรกิจ {
  color: #65a30d;
  border-color: rgba(101, 163, 13, 0.3);
}

[data-theme="light"] .tag-เศรษฐศาสตร์ {
  color: #15803d;
  border-color: rgba(34, 197, 94, 0.3);
}

[data-theme="light"] .tag-community {
  color: #be185d;
  border-color: rgba(236, 72, 153, 0.3);
}

[data-theme="light"] .tag-กฎหมาย-ภาษี {
  color: #b91c1c;
  border-color: rgba(239, 68, 68, 0.3);
}

.event-actions {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
}

.event-photos-btn,
.event-youtube-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  background: none;
  border: 1px solid var(--border);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  transition: all var(--transition-base);
  text-decoration: none;
  font-family: var(--font-body);
}

.event-photos-btn:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-glow);
}

.event-youtube-btn {
  background: rgba(255, 0, 0, 0.1);
  color: #ff0000;
  border-color: rgba(255, 0, 0, 0.3);
}

.event-youtube-btn:hover {
  background: rgba(255, 0, 0, 0.15);
  border-color: #ff0000;
  color: #ff0000;
}

.event-replay-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--accent);
  cursor: pointer;
  background: rgba(247, 147, 26, 0.1);
  border: 1px solid rgba(247, 147, 26, 0.3);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  transition: all var(--transition-base);
  text-decoration: none;
  font-family: var(--font-body);
}

.event-replay-btn:hover {
  background: rgba(247, 147, 26, 0.15);
  border-color: var(--accent);
  color: var(--accent);
}

.event-article-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 0.82rem;
  font-weight: 500;
  color: #3b82f6;
  cursor: pointer;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.3);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  transition: all var(--transition-base);
  text-decoration: none;
  font-family: var(--font-body);
}

.event-article-btn:hover {
  background: rgba(59, 130, 246, 0.15);
  border-color: #3b82f6;
  color: #3b82f6;
}

.events-load-more {
  text-align: center;
  margin-top: var(--space-2xl);
}



/* ============================================
   PHOTO MODAL
   ============================================ */
.photo-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
}

.photo-modal.active {
  display: flex;
}

.photo-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
}

.photo-modal-content {
  position: relative;
  z-index: 1;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.photo-modal-close {
  position: fixed;
  top: 20px;
  right: 20px;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  border: none;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-base);
  z-index: 2;
}

.photo-modal-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

.photo-modal-nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  border: none;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-base);
  z-index: 2;
}

.photo-modal-nav:hover {
  background: rgba(255, 255, 255, 0.2);
}

.photo-modal-prev {
  left: 20px;
}

.photo-modal-next {
  right: 20px;
}

.photo-modal-image-container {
  display: flex;
  align-items: center;
  justify-content: center;
}

.photo-modal-image-container img {
  max-width: 85vw;
  max-height: 80vh;
  object-fit: contain;
  border-radius: var(--radius-md);
}

.photo-modal-counter {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.85rem;
  margin-top: var(--space-md);
  font-weight: 500;
}

/* ============================================
   CONTACT
   ============================================ */
/* ============================================
   CONTACT REDESIGN
   ============================================ */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2xl);
  margin-top: var(--space-xl);
}

.contact-box {
  background: var(--bg-card);
  padding: var(--space-2xl);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
}

.contact-box-title {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  margin-bottom: var(--space-xl);
  color: var(--text-primary);
  border-bottom: 2px solid var(--accent);
  padding-bottom: var(--space-xs);
  display: inline-block;
  align-self: flex-start;
}

/* Follow Links */
.follow-links {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.follow-item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: all var(--transition-base);
}

.follow-item:hover {
  background: var(--accent-glow);
  border-color: var(--accent);
  transform: translateX(5px);
}

.follow-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.follow-icon.youtube {
  background: #ff0000;
  color: #fff;
}

.follow-icon.facebook {
  background: #1877f2;
  color: #fff;
}

.follow-details {
  display: flex;
  flex-direction: column;
}

.follow-name {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 1rem;
}

.follow-handle {
  font-size: 0.85rem;
  color: var(--text-tertiary);
}

/* Contact Details */
.contact-teaser {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-xl);
  line-height: 1.6;
}

.btn-messenger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  padding: 1rem 2rem;
  background: #0084ff;
  color: #fff;
  border-radius: var(--radius-md);
  text-decoration: none;
  font-weight: 600;
  font-size: 1.1rem;
  transition: all var(--transition-base);
  margin-bottom: var(--space-xl);
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0, 132, 255, 0.3);
}

.btn-messenger:hover {
  background: #0073e6;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 132, 255, 0.4);
}

.contact-item-simple {
  display: flex;
  gap: var(--space-sm);
  font-size: 1rem;
  color: var(--text-tertiary);
}

.contact-item-simple .label {
  font-weight: 600;
}

.contact-item-simple a {
  color: var(--accent);
  text-decoration: none;
}

.contact-item-simple a:hover {
  text-decoration: underline;
}

@media (max-width: 768px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  border-top: 1px solid var(--border);
  padding: var(--space-2xl) 0;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-left {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
}

.footer-logo {
  display: block;
}

.footer-logo .logo-img {
  height: 40px;
}

.footer-left p {
  color: var(--text-tertiary);
  font-size: 0.85rem;
}

.footer-links {
  display: flex;
  gap: var(--space-lg);
}

.footer-links a {
  color: var(--text-tertiary);
  font-size: 0.85rem;
  transition: color var(--transition-fast);
}

.footer-links a:hover {
  color: var(--accent);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 900px) {
  .hero-name {
    font-size: 2.8rem;
  }

  .book-feature {
    grid-template-columns: 1fr;
    text-align: center;
    gap: var(--space-2xl);
  }

  .book-badge,
  .book-buy-btn {
    align-self: center;
  }

  .book-image-placeholder {
    max-width: 250px;
    margin: 0 auto;
  }

  .contact-content {
    grid-template-columns: 1fr;
  }

  .footer-content {
    flex-direction: column;
    gap: var(--space-lg);
    text-align: center;
  }

  .footer-left {
    flex-direction: column;
    gap: var(--space-sm);
  }
}

@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-nav);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-xl);
    transform: translateX(100%);
    transition: transform var(--transition-base);
    z-index: 1001;
  }

  .nav-links.active {
    transform: translateX(0);
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
  }

  /* Overlay for mobile menu */
  .nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.82);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-base);
    z-index: 1000;
  }

  .nav-overlay.active {
    opacity: 1;
    pointer-events: auto;
  }

  .nav-link {
    font-size: 1.2rem;
  }

  .mobile-menu-btn {
    display: flex;
  }

  .section {
    padding: var(--space-3xl) 0;
  }

  .courses-grid {
    grid-template-columns: 1fr;
  }

  .hero-name {
    font-size: 2.5rem;
  }

  .events-timeline {
    padding-left: var(--space-xl);
  }

  .event-marker {
    left: calc(-1 * var(--space-xl) + 2px);
  }

  .event-header {
    flex-direction: column;
  }

  .event-content.has-photos {
    flex-direction: column;
  }

  .event-thumb {
    width: 100%;
  }

  .book-feature {
    grid-template-columns: 1fr;
    text-align: left;
  }

  .book-info,
  .book-description {
    text-align: left;
  }

  .book-badge,
  .book-buy-btn {
    align-self: flex-start;
  }

  .contact-grid {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
    margin-top: var(--space-md);
  }

  .contact-box {
    padding: var(--space-lg);
  }

  .contact-box-title {
    font-size: 1.25rem;
    margin-bottom: var(--space-lg);
  }

  .follow-item {
    width: 100%;
    padding: var(--space-sm) var(--space-md);
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 var(--space-md);
  }

  .hero-name {
    font-size: 2rem;
  }

  .book-feature {
    padding: var(--space-lg);
  }

  .event-meta {
    flex-direction: column;
    gap: var(--space-sm);
  }
}