/* สีหลักและตัวแปร */
:root {
  --primary: #12AA83;
  --primary-light: #26C6A9;
  --primary-dark: #0E8A69;
  --accent: #F15152;
  --accent-light: #FF7A7B;
  --text-dark: #243746;
  --text: #4B5563;
  --text-light: #6B7280;
  --bg-main: #FFFFFF;
  --bg-alt: #FFF8E5;
  --bg-light: #F8FAFC;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --radius-sm: 0.25rem;
  --radius: 0.5rem;
  --radius-lg: 1.25rem;
  --transition: all 0.3s ease;
}

/* รีเซ็ตและสไตล์พื้นฐาน */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Sarabun', sans-serif;
  color: var(--text);
  background-color: var(--bg-main);
  line-height: 1.6;
  font-weight: 400;
}

.page-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

.container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* การจัดรูปแบบข้อความ */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1.3;
  margin-bottom: 1rem;
}

h1 {
  font-size: 2.75rem;
  margin-bottom: 1.5rem;
}

h2 {
  font-size: 2.25rem;
  text-align: center;
  margin-bottom: 2rem;
  position: relative;
}

h2::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background-color: var(--primary);
  border-radius: 2px;
}

h3 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

p {
  margin-bottom: 1.25rem;
}

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

a:hover {
  color: var(--primary-dark);
}

/* ปุ่มกด */
.primary-button {
  display: inline-block;
  background-color: var(--primary);
  color: white !important;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  font-weight: 600;
  transition: var(--transition);
  border: none;
  cursor: pointer;
  text-align: center;
}

.primary-button:hover {
  background-color: var(--primary-dark);
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.secondary-button {
  display: inline-block;
  background-color: transparent;
  color: var(--primary) !important;
  border: 2px solid var(--primary);
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  font-weight: 600;
  transition: var(--transition);
  cursor: pointer;
  text-align: center;
}

.secondary-button:hover {
  background-color: var(--primary-light);
  color: white !important;
  border-color: var(--primary-light);
  transform: translateY(-3px);
}

.large-button {
  padding: 1rem 2.5rem;
  font-size: 1.125rem;
}

.nav-button {
  background-color: var(--accent);
  color: white !important;
  padding: 0.625rem 1.25rem;
  border-radius: var(--radius);
  font-weight: 600;
  transition: var(--transition);
}

.nav-button:hover {
  background-color: var(--accent-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

/* ส่วนหัว */
.main-header {
  background-color: white;
  padding: 1rem 0;
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 100;
}

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

.logo a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--primary);
  font-weight: 700;
  font-size: 1.5rem;
}

.logo-icon {
  width: 40px;
  height: 40px;
}

.main-nav {
  display: flex;
  align-items: center;
}

.nav-list {
  display: flex;
  list-style: none;
  gap: 2rem;
  align-items: center;
}

.nav-list li a {
  color: var(--text-dark);
  font-weight: 500;
  transition: var(--transition);
}

.nav-list li a:hover {
  color: var(--primary);
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  width: 30px;
  height: 24px;
  position: relative;
}

.menu-toggle span {
  display: block;
  position: absolute;
  height: 2px;
  width: 100%;
  background-color: var(--text-dark);
  border-radius: 2px;
  transition: var(--transition);
}

.menu-toggle span:nth-child(1) {
  top: 0;
}

.menu-toggle span:nth-child(2) {
  top: 10px;
}

.menu-toggle span:nth-child(3) {
  top: 20px;
}

/* Hero Section */
.hero-section {
  padding: 6rem 0 4rem;
  background-color: var(--bg-alt);
  position: relative;
  overflow: hidden;
}

.hero-section .container {
  display: flex;
  align-items: center;
  gap: 4rem;
}

.hero-content {
  flex: 1;
  max-width: 600px;
}

.hero-graphic {
  flex: 1;
  max-width: 500px;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
}

/* About Section */
.about-section {
  padding: 5rem 0;
  background-color: var(--bg-main);
}

.content-wrapper {
  display: flex;
  align-items: center;
  gap: 3rem;
  margin-top: 2rem;
}

.about-content {
  flex: 1;
}

.stats-container {
  display: flex;
  justify-content: center;
  gap: 2rem;
}

.stat-item {
  background-color: var(--bg-light);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
  box-shadow: var(--shadow);
  transition: var(--transition);
  min-width: 120px;
}

.stat-item:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
}

.stat-label {
  color: var(--text-light);
  margin-top: 0.5rem;
}

/* How It Works Section */
.how-section {
  padding: 5rem 0;
  background-color: var(--bg-light);
}

.steps-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2.5rem;
  margin-top: 3rem;
}

.step {
  background-color: white;
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.step:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-lg);
}

.step-icon {
  margin: 0 auto 1.5rem;
}

.cta-center {
  text-align: center;
  margin-top: 3rem;
}

/* Features Section */
.features-section {
  padding: 5rem 0;
  background-color: var(--bg-main);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2.5rem;
  margin-top: 3rem;
}

.feature-card {
  background-color: var(--bg-light);
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.feature-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

.feature-card svg {
  margin: 0 auto 1.5rem;
}

/* FAQ Section */
.faq-section {
  padding: 5rem 0;
  background-color: var(--bg-light);
}

.faq-container {
  max-width: 800px;
  margin: 3rem auto 0;
}

.faq-item {
  background-color: white;
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.faq-question {
  padding: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: var(--transition);
}

.faq-question:hover {
  background-color: rgba(18, 170, 131, 0.05);
}

.faq-question h3 {
  margin: 0;
}

.toggle-icon {
  position: relative;
  width: 20px;
  height: 20px;
}

.toggle-icon::before,
.toggle-icon::after {
  content: '';
  position: absolute;
  background-color: var(--primary);
  transition: var(--transition);
}

.toggle-icon::before {
  top: 50%;
  left: 0;
  width: 100%;
  height: 2px;
  transform: translateY(-50%);
}

.toggle-icon::after {
  top: 0;
  left: 50%;
  width: 2px;
  height: 100%;
  transform: translateX(-50%);
}

.faq-item.active .toggle-icon::after {
  transform: translateX(-50%) rotate(90deg);
  opacity: 0;
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  padding: 0 1.5rem;
}

.faq-item.active .faq-answer {
  max-height: 300px;
  padding: 0 1.5rem 1.5rem;
}

/* CTA Section */
.cta-section {
  padding: 5rem 0;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  text-align: center;
  color: white;
}

.cta-section h2 {
  color: white;
  margin-bottom: 1rem;
}

.cta-section h2::after {
  background-color: white;
}

.cta-section p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.25rem;
  max-width: 600px;
  margin: 0 auto 2rem;
}

.cta-section .primary-button {
  background-color: white;
  color: var(--primary) !important;
}

.cta-section .primary-button:hover {
  background-color: var(--bg-alt);
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

/* Footer */
.main-footer {
  background-color: var(--text-dark);
  color: white;
  padding: 5rem 0 2rem;
  margin-top: auto;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 3rem;
}

.footer-logo {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
}

.footer-links {
  display: flex;
  gap: 3rem;
}

.footer-menu h4,
.footer-legal h4 {
  color: white;
  margin-bottom: 1.5rem;
  font-size: 1.25rem;
}

.footer-menu ul,
.footer-legal ul {
  list-style: none;
}

.footer-menu li,
.footer-legal li {
  margin-bottom: 0.75rem;
}

.footer-menu a,
.footer-legal a {
  color: rgba(255, 255, 255, 0.7);
}

.footer-menu a:hover,
.footer-legal a:hover {
  color: white;
}

.footer-bottom {
  text-align: center;
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.875rem;
}

/* Responsive Styles */
@media (max-width: 992px) {
  h1 {
    font-size: 2.25rem;
  }
  
  h2 {
    font-size: 2rem;
  }
  
  .hero-section .container {
    flex-direction: column;
  }
  
  .hero-content, .hero-graphic {
    max-width: 100%;
  }
  
  .content-wrapper {
    flex-direction: column;
  }
  
  .stats-container {
    flex-wrap: wrap;
    justify-content: center;
  }
}

@media (max-width: 768px) {
  h1 {
    font-size: 2rem;
  }
  
  h2 {
    font-size: 1.75rem;
  }
  
  .menu-toggle {
    display: block;
    z-index: 101;
  }
  
  .nav-list {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 300px;
    height: 100vh;
    background-color: white;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: right 0.3s ease;
    z-index: 100;
    box-shadow: var(--shadow-lg);
  }
  
  .nav-list.active {
    right: 0;
  }
  
  .menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 9px);
  }
  
  .menu-toggle.active span:nth-child(2) {
    opacity: 0;
  }
  
  .menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -9px);
  }
  
  .nav-list li {
    margin: 1rem 0;
  }
  
  .hero-buttons {
    flex-direction: column;
  }
  
  .footer-content {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  
  .footer-logo {
    align-items: center;
  }
  
  .footer-links {
    flex-direction: column;
    gap: 2rem;
  }
}

@media (max-width: 576px) {
  h1 {
    font-size: 1.75rem;
  }
  
  h2 {
    font-size: 1.5rem;
  }
  
  .steps-container,
  .features-grid {
    grid-template-columns: 1fr;
  }
  
  .stat-item {
    min-width: 100px;
  }
  
  .container {
    padding: 0 1rem;
  }
}
