:root {
  --primary-color: #2D2A4A; /* น้ำเงินเข้มแบบไทย */
  --secondary-color: #A51931; /* แดงไทย */
  --accent-color: #F4F5F8; /* ขาว */
  --gold: #D4AF37; /* ทองไทย */
  --text-color: #333333;
  --light-text: #FFFFFF;
  --background: #F8F9FA;
  --card-bg: #FFFFFF;
  --section-bg: #F1F3F5;
  --shadow: rgba(0, 0, 0, 0.1);
  --transition: all 0.3s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

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

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

a:hover {
  color: var(--secondary-color);
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.site-header {
  background-color: var(--primary-color);
  padding: 15px 0;
  position: fixed;
  width: 100%;
  top: 0;
  left: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px var(--shadow);
}

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

.logo {
  display: flex;
  align-items: center;
  color: var(--accent-color);
  font-size: 1.8rem;
  font-weight: 700;
}

.logo svg {
  width: 36px;
  height: 36px;
  margin-right: 10px;
}

.site-nav ul {
  display: flex;
  list-style: none;
  gap: 30px;
}

.site-nav a {
  color: var(--accent-color);
  font-weight: 500;
  position: relative;
}

.site-nav a::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--gold);
  transition: var(--transition);
}

.site-nav a:hover::after {
  width: 100%;
}

.menu-toggle {
  display: none;
  background: transparent;
  border: none;
  color: var(--accent-color);
  font-size: 1.5rem;
  cursor: pointer;
}

/* Hero */
.hero {
  background: linear-gradient(135deg, var(--primary-color), #4B478C);
  color: var(--light-text);
  padding: 150px 0 100px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 80 80'%3E%3Cpath fill='%23ffffff' fill-opacity='0.05' d='M14 16H9v-2h5V9.87a4 4 0 1 1 2 0V14h5v2h-5v15.95A10 10 0 0 0 23.66 27l-3.46-2 8.2-2.2-2.9 5a12 12 0 0 1-21 0l-2.89-5 8.2 2.2-3.47 2A10 10 0 0 0 14 31.95V16zm40 40h-5v-2h5v-4.13a4 4 0 1 1 2 0V54h5v2h-5v15.95A10 10 0 0 0 63.66 67l-3.47-2 8.2-2.2-2.88 5a12 12 0 0 1-21.02 0l-2.88-5 8.2 2.2-3.47 2A10 10 0 0 0 54 71.95V56zm-39 6a2 2 0 1 1 0-4 2 2 0 0 1 0 4zm40-40a2 2 0 1 1 0-4 2 2 0 0 1 0 4zM15 8a2 2 0 1 0 0-4 2 2 0 0 0 0 4zm40 40a2 2 0 1 0 0-4 2 2 0 0 0 0 4z'%3E%3C/path%3E%3C/svg%3E");
  opacity: 0.2;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  margin: 0 auto;
}

.hero h1 {
  font-size: 2.8rem;
  font-weight: 800;
  margin-bottom: 20px;
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  line-height: 1.3;
}

.hero p {
  font-size: 1.2rem;
  margin-bottom: 30px;
  opacity: 0.9;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.btn {
  display: inline-block;
  background-color: var(--gold);
  color: var(--primary-color);
  padding: 14px 32px;
  border-radius: 50px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  transition: var(--transition);
}

.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  background-color: #E5C158;
  color: var(--primary-color);
}

/* Features */
.features {
  padding: 80px 0;
  position: relative;
}

.section-title {
  text-align: center;
  margin-bottom: 50px;
}

.section-title h2 {
  font-size: 2.2rem;
  color: var(--primary-color);
  margin-bottom: 15px;
  position: relative;
  display: inline-block;
}

.section-title h2::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 3px;
  background: linear-gradient(to right, var(--secondary-color), var(--primary-color));
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
}

.feature-card {
  background-color: var(--card-bg);
  border-radius: 15px;
  padding: 30px;
  text-align: center;
  box-shadow: 0 5px 15px var(--shadow);
  transition: var(--transition);
  border-top: 4px solid var(--primary-color);
}

.feature-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px var(--shadow);
}

.feature-icon {
  width: 70px;
  height: 70px;
  background-color: rgba(45, 42, 74, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 25px;
}

.feature-icon svg {
  width: 35px;
  height: 35px;
  color: var(--primary-color);
}

.feature-card h3 {
  font-size: 1.4rem;
  margin-bottom: 15px;
  color: var(--primary-color);
}

/* How it Works */
.how-it-works {
  padding: 80px 0;
  background-color: var(--section-bg);
  position: relative;
}

.how-it-works::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 50px;
  background-color: var(--background);
  clip-path: polygon(0 100%, 100% 100%, 100% 0);
}

.steps {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 40px;
  margin-top: 30px;
}

.step-card {
  flex: 0 1 300px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.step-number {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: var(--accent-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: bold;
  margin-bottom: 20px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.step-card h3 {
  font-size: 1.3rem;
  margin-bottom: 15px;
  color: var(--primary-color);
}

/* AI Section */
.ai-section {
  padding: 80px 0;
}

.tech-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.tech-card {
  background-color: var(--card-bg);
  border-radius: 15px;
  padding: 30px;
  box-shadow: 0 5px 15px var(--shadow);
  border-left: 4px solid var(--secondary-color);
}

.tech-card h3 {
  font-size: 1.3rem;
  margin-bottom: 15px;
  color: var(--secondary-color);
  display: flex;
  align-items: center;
}

.tech-card h3 svg {
  width: 24px;
  height: 24px;
  margin-right: 10px;
}

/* CTA Section */
.cta-section {
  padding: 80px 0;
  background: linear-gradient(135deg, var(--secondary-color), #D13050);
  color: var(--light-text);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-section::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 30px;
  background-color: var(--background);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
}

.cta-content {
  position: relative;
  z-index: 2;
  max-width: 700px;
  margin: 0 auto;
}

.cta-section h2 {
  font-size: 2.5rem;
  margin-bottom: 20px;
}

.cta-section p {
  font-size: 1.1rem;
  margin-bottom: 30px;
  opacity: 0.9;
}

.btn-light {
  background-color: var(--accent-color);
  color: var(--secondary-color);
}

.btn-light:hover {
  background-color: var(--light-text);
  color: var(--secondary-color);
}

/* Footer */
.site-footer {
  background-color: var(--primary-color);
  color: #aaa;
  padding: 60px 0 20px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-info h3 {
  font-size: 1.5rem;
  color: var(--accent-color);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
}

.footer-info h3 svg {
  width: 28px;
  height: 28px;
  margin-right: 10px;
}

.footer-info p {
  margin-bottom: 20px;
}

.footer-links h3 {
  font-size: 1.2rem;
  color: var(--accent-color);
  margin-bottom: 20px;
  position: relative;
  display: inline-block;
}

.footer-links h3::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 40px;
  height: 2px;
  background-color: var(--gold);
}

.footer-links ul {
  list-style: none;
}

.footer-links li {
  margin-bottom: 12px;
}

.footer-links a {
  color: #aaa;
  transition: var(--transition);
}

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

.copyright {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 991px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  
  .footer-info {
    grid-column: span 2;
  }
}

@media (max-width: 768px) {
  .site-nav {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background-color: var(--primary-color);
    padding: 20px;
    clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
    transition: 0.3s ease;
  }
  
  .site-nav.active {
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    box-shadow: 0 10px 30px var(--shadow);
  }
  
  .site-nav ul {
    flex-direction: column;
    gap: 15px;
  }
  
  .menu-toggle {
    display: block;
  }
  
  .feature-grid,
  .tech-features {
    grid-template-columns: 1fr;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
  }
  
  .footer-info {
    grid-column: span 1;
  }
}
