/* ===== Fun88 Generator — Base CSS ===== */
/* Colors/fonts injected by build.py from config */
:root {
  --primary: #059669;
  --secondary: #1e293b;
  --accent: #f59e0b;
  --accent-light: #fef3c7;
  --bg: #ffffff;
  --bg-alt: #f0fdf4;
  --text: #1a1a1a;
  --text-muted: #4b5563;
  --border: #d1d5db;
  --font: 'Sarabun', sans-serif;
  --radius: 6px;
  --shadow: 0 4px 12px rgba(0,0,0,.08);
}

/* === RESET === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { font-family: var(--font); background: var(--bg); color: var(--text); line-height: 1.7; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; transition: color .2s; }
a:hover { color: var(--secondary); }

/* === HEADER === */
.site-header {
  background: var(--secondary);
  color: #fff;
  padding: 0 1rem;
  position: sticky; top: 0; z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
}
.header-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  min-height: 60px;
}
.logo {
  font-size: 1.5rem; font-weight: 700; color: #fff;
}
.logo .accent { color: var(--accent); }
.nav-toggle {
  display: none; background: none; border: none;
  color: #fff; font-size: 1.5rem; cursor: pointer;
}
.main-nav { display: flex; gap: .5rem; flex-wrap: wrap; }
.main-nav a {
  color: rgba(255,255,255,.85); padding: .5rem .75rem;
  border-radius: var(--radius); font-size: .9rem; transition: all .2s;
}
.main-nav a:hover, .main-nav a.active {
  color: #fff; background: var(--primary);
}

/* === HERO === */
.hero-section {
  position: relative; min-height: 420px;
  display: flex; align-items: center; justify-content: center;
  background-size: cover; background-position: center;
  overflow: hidden;
}
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(0,0,0,.7), rgba(0,0,0,.4));
}
.hero-content {
  position: relative; z-index: 2; text-align: center;
  padding: 3rem 1.5rem; max-width: 800px;
}
.hero-content h1 {
  font-size: 2.5rem; margin-bottom: .75rem;
  text-shadow: 0 2px 8px rgba(0,0,0,.3);
}
.hero-sub {
  font-size: 1.15rem; opacity: .9; margin-bottom: 1.5rem;
}

/* === CTA BUTTON === */
.btn-glow {
  display: inline-block; padding: .85rem 2rem;
  background: var(--primary); color: #fff;
  font-size: 1.1rem; font-weight: 700;
  border-radius: var(--radius);
  box-shadow: 0 4px 15px rgba(0,0,0,.2);
  transition: transform .2s, box-shadow .2s;
}
.btn-glow:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,.3);
  color: #fff;
}
.btn-large { padding: 1.1rem 3rem; font-size: 1.25rem; }

/* === CONTENT === */
.content-section {
  max-width: 1000px; margin: 0 auto;
  padding: 3rem 1.5rem;
}
.content-section h2 {
  font-size: 1.6rem; margin-bottom: 1.5rem;
  color: var(--primary);
  border-bottom: 3px solid var(--primary); padding-bottom: .5rem;
}
.content-section h3 { font-size: 1.2rem; margin: 1rem 0 .5rem; }
.content-section p { margin-bottom: 1rem; }
.dark-section {
  background: var(--bg-alt);
  max-width: 100%; padding: 3rem 1.5rem;
}
.dark-section > * { max-width: 1000px; margin: 0 auto; }

/* === FEATURE GRID === */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem; margin-top: 1.5rem;
}
.feature-card {
  background: var(--bg-alt);
  border-radius: var(--radius);
  padding: 1.5rem;
  border: 1px solid var(--border);
  transition: transform .2s, box-shadow .2s;
}
.feature-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}
.feature-icon { font-size: 2rem; margin-bottom: .5rem; }
.feature-card h3 { margin-bottom: .5rem; color: var(--primary); }
.feature-card p { font-size: .9rem; color: var(--text-muted); margin: 0; }

/* === TIMELINE === */
.timeline { margin-top: 1.5rem; }
.timeline-item {
  display: flex; gap: 1rem; margin-bottom: 1.5rem;
}
.timeline-num {
  flex-shrink: 0; width: 40px; height: 40px;
  background: var(--primary); color: #fff;
  border-radius: 50%; display: flex;
  align-items: center; justify-content: center;
  font-weight: 700; font-size: 1.1rem;
}
.timeline-content h3 { margin-bottom: .25rem; }

/* === TIPS LIST === */
.tips-list {
  list-style: none; padding: 0;
}
.tips-list li {
  padding: .75rem 0 .75rem 1.5rem;
  border-bottom: 1px solid var(--border);
  position: relative;
}
.tips-list li::before {
  content: '▸'; position: absolute; left: 0;
  color: var(--primary); font-weight: 700;
}

/* === CTA SECTION === */
.cta-section {
  text-align: center; padding: 3rem 1.5rem;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
}
.cta-section h2 { color: #fff; margin-bottom: 1.5rem; }
.cta-section .btn-glow {
  background: #fff; color: var(--primary);
}
.cta-block {
  margin: 2rem 0; text-align: center;
}

/* === BLOG === */
.blog-listing { margin-top: 2rem; }
.blog-card {
  display: flex; gap: 1.5rem; margin-bottom: 2rem;
  background: var(--bg-alt); border-radius: var(--radius);
  overflow: hidden; border: 1px solid var(--border);
  transition: transform .2s;
}
.blog-card:hover { transform: translateY(-2px); }
.blog-card img {
  width: 200px; min-height: 140px;
  object-fit: cover; flex-shrink: 0;
}
.blog-card-body { padding: 1rem; }
.blog-tag {
  display: inline-block; font-size: .75rem;
  background: var(--accent-light); color: var(--primary);
  padding: .15rem .5rem; border-radius: 3px;
  font-weight: 700; margin-bottom: .5rem;
}
.blog-card h2 { font-size: 1.1rem; margin-bottom: .5rem; }
.blog-card h2 a { color: var(--text); }
.blog-card h2 a:hover { color: var(--primary); }
.blog-card p { font-size: .85rem; color: var(--text-muted); }

.blog-article { max-width: 800px; margin: 0 auto; }
.blog-article h2 {
  margin-top: 2rem; font-size: 1.3rem;
  color: var(--primary);
}
.content-img {
  border-radius: var(--radius); margin: 1.5rem 0;
  width: 100%;
}

/* === FOOTER === */
.site-footer {
  background: var(--secondary); color: rgba(255,255,255,.8);
  padding: 2.5rem 1.5rem 1.5rem;
}
.footer-inner {
  max-width: 1200px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
}
.footer-col h4 { color: #fff; margin-bottom: .75rem; font-size: 1.1rem; }
.footer-col .accent { color: var(--accent); }
.footer-col p { font-size: .85rem; margin-bottom: .35rem; }
.disclaimer { font-style: italic; opacity: .7; }

/* === LAYOUT VARIANTS === */

/* sidebar layout */
body.layout-sidebar .content-section { max-width: 100%; }
body.layout-sidebar main {
  display: grid;
  grid-template-columns: 240px 1fr;
  max-width: 1200px; margin: 0 auto;
  min-height: 60vh;
}
body.layout-sidebar .sidebar-nav {
  background: var(--bg-alt); padding: 1.5rem;
  border-right: 1px solid var(--border);
}
body.layout-sidebar .sidebar-nav a {
  display: block; padding: .6rem .75rem;
  border-radius: var(--radius); color: var(--text);
  margin-bottom: .25rem; font-size: .9rem;
}
body.layout-sidebar .sidebar-nav a:hover,
body.layout-sidebar .sidebar-nav a.active {
  background: var(--primary); color: #fff;
}

/* grid layout */
body.layout-grid .feature-grid {
  grid-template-columns: repeat(3, 1fr);
}

/* landing layout */
body.layout-landing .hero-section { min-height: 80vh; }
body.layout-landing .content-section {
  max-width: 700px;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
  .nav-toggle { display: block; }
  .main-nav {
    display: none; position: absolute;
    top: 60px; left: 0; right: 0;
    background: var(--secondary); flex-direction: column;
    padding: 1rem; box-shadow: 0 4px 12px rgba(0,0,0,.2);
  }
  .main-nav.open { display: flex; }
  .hero-content h1 { font-size: 1.8rem; }
  .feature-grid { grid-template-columns: 1fr; }
  .blog-card { flex-direction: column; }
  .blog-card img { width: 100%; min-height: 160px; }
  body.layout-sidebar main { grid-template-columns: 1fr; }
  body.layout-sidebar .sidebar-nav {
    border-right: none; border-bottom: 1px solid var(--border);
  }
  body.layout-grid .feature-grid { grid-template-columns: 1fr; }
}

/* === SCHEMA MARKUP (hidden) === */
.schema-only { display: none; }
