/*
Theme Name: Waijing Theme
Theme URI: http://waijing.local
Description: Affiliate Blog Theme - inspired by okvii.com design
Author: Waijing
Template: astra
Version: 1.0.0
Text Domain: waijing-theme
*/

/* ===== ROOT COLORS (okvii.com palette) ===== */
:root {
  --color-bg-dark:     #052018;
  --color-bg-mid:      #0a3d2e;
  --color-green:       #1a7a5a;
  --color-green-light: #1e9e5a;
  --color-gold:        #c8a830;
  --color-gold-light:  #e6c84a;
  --color-red:         #8b2020;
  --color-red-hover:   #a83232;
  --color-white:       #ffffff;
  --color-text-muted:  #b0c8bf;
  --color-card-bg:     #0d4a35;
  --color-border:      #1a5e45;
}

/* ===== GLOBAL ===== */
body {
  background: radial-gradient(ellipse at center, var(--color-bg-mid) 0%, var(--color-bg-dark) 100%);
  background-attachment: fixed;
  color: var(--color-white);
  font-family: 'Sarabun', 'Prompt', sans-serif;
  min-height: 100vh;
}

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

/* ===== HEADER ===== */
.site-header,
#masthead,
.ast-header-wrap {
  background: linear-gradient(to bottom, #052018 0%, #0a3d2e 100%) !important;
  border-bottom: 1px solid var(--color-border);
}

.ast-site-header-wrap { background: transparent !important; }

/* Logo */
.ast-logo-container img,
.site-logo img { max-height: 56px; }

/* Nav */
.main-navigation a,
.ast-header-navigation .menu-item > a,
.main-header-menu .menu-item > a {
  color: var(--color-white) !important;
  font-size: 15px;
  font-weight: 500;
  padding: 8px 16px !important;
  transition: color 0.2s;
}
.main-navigation a:hover,
.ast-header-navigation .menu-item > a:hover {
  color: var(--color-gold) !important;
}
.main-header-menu .current-menu-item > a {
  color: var(--color-gold) !important;
}

/* ===== HERO SECTION ===== */
.hero-section {
  background: linear-gradient(135deg, #052018 0%, #0d5038 50%, #052018 100%);
  padding: 80px 20px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 70% at 50% 50%, rgba(26,122,90,0.3) 0%, transparent 70%);
}
.hero-section h1 {
  font-size: 3rem;
  color: var(--color-white);
  text-shadow: 0 2px 20px rgba(0,0,0,0.5);
  margin-bottom: 16px;
  position: relative;
}
.hero-section .hero-subtitle {
  font-size: 1.3rem;
  color: var(--color-text-muted);
  margin-bottom: 32px;
  position: relative;
}
.hero-badge {
  display: inline-block;
  background: linear-gradient(135deg, var(--color-gold) 0%, #a07820 100%);
  color: #052018;
  font-weight: 700;
  font-size: 13px;
  padding: 4px 16px;
  border-radius: 20px;
  margin-bottom: 20px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* ===== CTA BUTTONS ===== */
.btn-cta-green,
.wp-block-button__link,
.ast-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--color-green-light) 0%, var(--color-green) 100%);
  color: var(--color-white) !important;
  border: none;
  padding: 14px 36px;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none !important;
  transition: all 0.2s;
  box-shadow: 0 4px 15px rgba(30,158,90,0.35);
}
.btn-cta-green:hover {
  background: linear-gradient(135deg, #25b86a 0%, #1a9060 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(30,158,90,0.5);
  color: var(--color-white) !important;
}

.btn-cta-red {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--color-red-hover) 0%, var(--color-red) 100%);
  color: var(--color-white) !important;
  border: none;
  padding: 14px 36px;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none !important;
  transition: all 0.2s;
  box-shadow: 0 4px 15px rgba(139,32,32,0.35);
}
.btn-cta-red:hover {
  background: linear-gradient(135deg, #c03c3c 0%, #952525 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(139,32,32,0.5);
}

.btn-cta-gold {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--color-gold-light) 0%, var(--color-gold) 100%);
  color: #052018 !important;
  border: none;
  padding: 16px 40px;
  border-radius: 6px;
  font-size: 18px;
  font-weight: 800;
  cursor: pointer;
  text-decoration: none !important;
  transition: all 0.2s;
  box-shadow: 0 4px 20px rgba(200,168,48,0.45);
}
.btn-cta-gold:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(200,168,48,0.6);
}

/* ===== FEATURE CARDS ===== */
.feature-card {
  background: rgba(13,74,53,0.6);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 28px 20px;
  text-align: center;
  transition: all 0.3s;
  backdrop-filter: blur(4px);
}
.feature-card:hover {
  border-color: var(--color-green-light);
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(26,122,90,0.3);
}
.feature-card .card-icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
}
.feature-card h3 {
  color: var(--color-gold);
  font-size: 1.1rem;
  margin-bottom: 8px;
}
.feature-card p {
  color: var(--color-text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* ===== INFO SECTIONS ===== */
.section-dark {
  background: rgba(5,32,24,0.8);
  padding: 60px 0;
}
.section-green {
  background: rgba(10,61,46,0.6);
  padding: 60px 0;
}
.section-title {
  color: var(--color-gold);
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 12px;
}
.section-subtitle {
  color: var(--color-text-muted);
  font-size: 1rem;
  margin-bottom: 40px;
}

/* ===== BLOG ===== */
.ast-article-post,
.post-card {
  background: rgba(13,74,53,0.5) !important;
  border: 1px solid var(--color-border) !important;
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s;
  margin-bottom: 24px;
}
.ast-article-post:hover {
  border-color: var(--color-green-light) !important;
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(26,122,90,0.25);
}
.ast-article-post .entry-title a,
.post-card .entry-title a {
  color: var(--color-white) !important;
  text-decoration: none;
}
.ast-article-post .entry-title a:hover {
  color: var(--color-gold) !important;
}
.entry-content { color: var(--color-text-muted) !important; }
.entry-meta, .ast-post-meta { color: var(--color-green-light) !important; font-size: 13px; }

/* ===== SINGLE POST ===== */
.single .entry-content {
  color: #cde0d8;
  line-height: 1.9;
  font-size: 1.05rem;
}
.single .entry-content h2,
.single .entry-content h3 {
  color: var(--color-gold);
  margin-top: 2rem;
}
.single .entry-content a { color: var(--color-gold-light); }
.single .entry-content blockquote {
  border-left: 4px solid var(--color-green);
  background: rgba(13,74,53,0.4);
  padding: 16px 20px;
  border-radius: 0 8px 8px 0;
}

/* ===== SIDEBAR ===== */
.widget-area,
#secondary {
  background: rgba(13,74,53,0.4);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 24px;
}
.widget-title {
  color: var(--color-gold) !important;
  border-bottom: 2px solid var(--color-green);
  padding-bottom: 10px;
  margin-bottom: 16px;
  font-size: 1.05rem;
  font-weight: 700;
}
.widget a { color: var(--color-text-muted) !important; }
.widget a:hover { color: var(--color-gold) !important; }

/* ===== AFFILIATE BOX ===== */
.affiliate-box {
  background: linear-gradient(135deg, #052018 0%, #0d5038 100%);
  border: 2px solid var(--color-gold);
  border-radius: 16px;
  padding: 32px;
  text-align: center;
  margin: 40px 0;
  position: relative;
  overflow: hidden;
}
.affiliate-box::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(200,168,48,0.1) 0%, transparent 70%);
}
.affiliate-box .affiliate-logo { max-height: 60px; margin-bottom: 16px; }
.affiliate-box .affiliate-title {
  color: var(--color-gold);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 8px;
}
.affiliate-box .affiliate-desc {
  color: var(--color-text-muted);
  margin-bottom: 20px;
}
.affiliate-box .affiliate-bonus {
  color: var(--color-gold-light);
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 20px;
}

/* ===== FOOTER ===== */
.site-footer,
#colophon {
  background: #052018 !important;
  border-top: 1px solid var(--color-border);
  color: var(--color-text-muted) !important;
  padding: 40px 0 20px;
}
.site-footer .widget-title { color: var(--color-gold) !important; }
.site-footer a { color: var(--color-text-muted) !important; }
.site-footer a:hover { color: var(--color-gold) !important; }
.ast-footer-copyright { color: var(--color-text-muted) !important; font-size: 13px; }

/* ปุ่ม CTA ใน footer ต้องใช้สีตัวอักษรของตัวเองไม่ถูก override */
.site-footer .btn-cta-gold,
.site-footer .btn-cta-gold:hover { color: #052018 !important; }
.site-footer .btn-cta-green,
.site-footer .btn-cta-green:hover { color: #ffffff !important; }
.site-footer .btn-cta-red,
.site-footer .btn-cta-red:hover { color: #ffffff !important; }
.widget .btn-cta-gold,
.widget .btn-cta-gold:hover { color: #052018 !important; }
.affiliate-box a.btn-cta-gold,
.affiliate-box a.btn-cta-gold:hover { color: #052018 !important; }

/* ===== CONTENT AREA ===== */
#content, .site-content, #primary {
  background: transparent !important;
}
.ast-container { max-width: 1200px !important; }

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #052018; }
::-webkit-scrollbar-thumb { background: var(--color-green); border-radius: 3px; }
