/* 
  ไฟล์สไตล์ CSS สำหรับ nudefyTH.pw
  สร้างขึ้นเพื่อประสบการณ์ผู้ใช้ที่ดีที่สุดสำหรับผู้ใช้ไทย
  ปรับปรุงล่าสุด: 2025-08-21
*/

:root {
  /* สีหลักของเว็บไซต์ - สีที่ได้รับแรงบันดาลใจจากธงชาติไทย */
  --primary-color: #0039a6; /* น้ำเงินเข้ม */
  --secondary-color: #f42a41; /* แดง */
  --accent-color: #fd5c63; /* โทนสีแดงอ่อน */
  --white-color: #ffffff; /* ขาว */
  --dark-blue: #00205b; /* น้ำเงินเข้มมาก */
  --light-grey: #f5f5f5;
  --text-color: #333333;
  --footer-bg: #00205b;
  --footer-text: #ffffff;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Sarabun', sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--white-color);
  color: var(--text-color);
  line-height: 1.6;
  overflow-x: hidden;
}

/* ระยะห่างมาตรฐานระหว่างส่วนต่างๆ */
.section-spacing {
  padding: 80px 0;
}

/* รูปแบบส่วนหัวของแต่ละส่วน */
.section-header {
  text-align: center;
  margin-bottom: 50px;
}

.section-header .section-title {
  margin-bottom: 15px;
}

.section-header .section-description {
  max-width: 800px;
  margin: 0 auto;
  color: #666;
}

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

/* ส่วนหัวเว็บไซต์ */
.header {
  background-color: var(--white-color);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  position: fixed;
  width: 100%;
  top: 0;
  left: 0;
  z-index: 1000;
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0;
}

.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: var(--primary-color);
  font-weight: bold;
  font-size: 1.5rem;
}

.logo-text {
  margin-left: 10px;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 25px;
}

.nav-menu li {
  display: inline-block;
}

.nav-link {
  text-decoration: none;
  color: var(--text-color);
  font-weight: 500;
  position: relative;
  padding-bottom: 5px;
  transition: color 0.3s ease;
}

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

.nav-link:after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  background: var(--primary-color);
  bottom: 0;
  left: 0;
  transition: width 0.3s ease;
}

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

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

.mobile-toggle {
  display: none;
  cursor: pointer;
  width: 30px;
  height: 24px;
  position: relative;
  z-index: 1001;
}

.mobile-toggle span {
  display: block;
  position: absolute;
  height: 3px;
  width: 100%;
  background: var(--primary-color);
  border-radius: 3px;
  opacity: 1;
  left: 0;
  transform: rotate(0deg);
  transition: .25s ease-in-out;
}

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

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

.mobile-toggle span:nth-child(4) {
  top: 20px;
}

.mobile-toggle.active span:nth-child(1) {
  top: 10px;
  width: 0%;
  left: 50%;
}

.mobile-toggle.active span:nth-child(2) {
  transform: rotate(45deg);
}

.mobile-toggle.active span:nth-child(3) {
  transform: rotate(-45deg);
}

.mobile-toggle.active span:nth-child(4) {
  top: 10px;
  width: 0%;
  left: 50%;
}

/* หน้าหลัก Hero Section */
.hero {
  padding: 160px 0 100px;
  background: linear-gradient(135deg, var(--primary-color), var(--dark-blue));
  color: var(--white-color);
  position: relative;
  overflow: hidden;
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.hero::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="none"><path d="M0,100 L50,0 L100,100 Z" fill="rgba(255,255,255,0.05)" /></svg>');
  background-size: cover;
}

.hero-title {
  font-size: 2.8rem;
  font-weight: 700;
  margin-bottom: 20px;
  line-height: 1.2;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-description {
  max-width: 800px;
  margin: 0 auto 30px;
  font-size: 1.1rem;
  line-height: 1.6;
  opacity: 0.9;
}

.hero-buttons {
  margin-top: 30px;
}

/* คุณสมบัติหลัก */
.features {
  padding: 80px 0;
  background-color: var(--light-grey);
}

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

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

.section-title::after {
  content: '';
  position: absolute;
  width: 60px;
  height: 3px;
  background-color: var(--secondary-color);
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
}

.section-subtitle {
  font-size: 1.1rem;
  color: #666;
  max-width: 700px;
  margin: 0 auto;
}

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

.feature-box {
  background: white;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  text-align: center;
}

.feature-box:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

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

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

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

.feature-description {
  color: #666;
  font-size: 1rem;
}

/* วิธีการใช้งาน */
.how-it-works {
  padding: 80px 0;
  background: linear-gradient(to bottom, var(--white-color), #f8f9fa);
  position: relative;
}

.steps-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
  margin-top: 30px;
}

.step {
  width: 300px;
  margin: 20px;
  text-align: center;
  transition: all 0.3s ease;
}

.step-number {
  width: 50px;
  height: 50px;
  background-color: var(--secondary-color);
  color: white;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.5rem;
  font-weight: bold;
  margin: 0 auto 20px;
}

.step-title {
  color: var(--primary-color);
  font-size: 1.3rem;
  margin-bottom: 10px;
}

.step-description {
  color: #666;
}

/* การเรียกร้องให้ลงมือทำ CTA */
.benefits {
  background-color: var(--white-color);
}

.cta {
  padding: 80px 0;
  background-color: var(--primary-color);
  color: white;
  text-align: center;
}

.cta-container {
  max-width: 800px;
  margin: 0 auto;
}

.cta-title {
  font-size: 2.5rem;
  margin-bottom: 20px;
  font-weight: 700;
}

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

.cta-btn {
  display: inline-block;
  background-color: var(--secondary-color);
  color: white;
  padding: 15px 35px;
  border-radius: 30px;
  font-size: 1.2rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  border: 2px solid var(--secondary-color);
}

.cta-btn:hover {
  background-color: transparent;
  color: white;
  border-color: white;
}

/* FAQ */
.faq {
  background-color: var(--light-grey);
}

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

.accordion-item {
  margin-bottom: 15px;
  border-radius: 8px;
  overflow: hidden;
  background-color: white;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.accordion-header {
  padding: 20px;
  background-color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  border-radius: 8px;
}

.accordion-header h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--primary-color);
}

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

.accordion-icon::before,
.accordion-icon::after {
  content: '';
  position: absolute;
  background-color: var(--primary-color);
  top: 50%;
  left: 0;
  transition: all 0.3s ease;
}

.accordion-icon::before {
  width: 20px;
  height: 2px;
  transform: translateY(-50%);
}

.accordion-icon::after {
  width: 2px;
  height: 20px;
  transform: translateX(9px) translateY(-50%);
}

.accordion-item.active .accordion-icon::after {
  opacity: 0;
}

.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.accordion-inner {
  padding: 0 20px 20px;
}

/* ส่วนท้าย Footer */
.footer {
  background-color: var(--footer-bg);
  color: var(--footer-text);
  padding: 60px 0 20px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  margin-bottom: 40px;
}

.footer-logo {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
}

.footer-logo-text {
  font-size: 1.5rem;
  font-weight: 700;
  margin-left: 10px;
}

.footer-description {
  margin-bottom: 20px;
  opacity: 0.8;
  font-size: 0.95rem;
  line-height: 1.6;
}

.footer-heading {
  font-size: 1.2rem;
  margin-bottom: 20px;
  position: relative;
  padding-bottom: 10px;
}

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

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

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

.footer-links a {
  color: var(--footer-text);
  text-decoration: none;
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

.footer-links a:hover {
  opacity: 1;
}

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.9rem;
  opacity: 0.7;
}

/* อนิเมชั่น */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.active {
  opacity: 1;
  transform: translateY(0);
}

/* การตอบสนองบนมือถือ */
@media screen and (max-width: 992px) {
  .hero-title {
    font-size: 2.2rem;
  }

  .section-title {
    font-size: 1.8rem;
  }

  .step {
    width: 100%;
    max-width: 300px;
  }

  .cta-title {
    font-size: 2rem;
  }
}

@media screen and (max-width: 768px) {
  .mobile-toggle {
    display: block;
  }

  .nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 300px;
    height: 100vh;
    background: white;
    flex-direction: column;
    justify-content: flex-start;
    padding-top: 80px;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    transition: right 0.3s ease;
    z-index: 1000;
  }

  .nav-menu.active {
    right: 0;
  }

  .nav-list {
    flex-direction: column;
    width: 100%;
  }

  .nav-list li {
    margin: 10px 0;
    width: 100%;
    text-align: center;
  }

  .nav-link {
    display: block;
    padding: 10px;
    margin: 5px 0;
  }

  .nav-menu .btn {
    margin-top: 20px;
  }

  .hero {
    padding: 140px 0 80px;
  }

  .hero-title {
    font-size: 1.8rem;
  }

  .hero-description {
    font-size: 1rem;
  }

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

  .steps-container {
    flex-direction: column;
    align-items: center;
  }

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