/* --- Global Styles & Variables --- */
:root {
  --primary-color: #00b4d8;
  --text-dark: #0a1930;
  --text-light: #6b7280;
  --bg-light: #f8fcfd;
  --white: #ffffff;
  --orange: #ff8c42;
  --yellow: #ffc300;
  --red: #bb2222;
  --blue: #004aad;
}

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

body {
  background-color: var(--bg-light);
  color: var(--text-dark);
  line-height: 1.6;
}

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

a {
  text-decoration: none;
  color: inherit;
}
ul {
  list-style: none;
}

/* --- Buttons --- */
.btn {
  /* padding: 12px 24px; */
  padding: 6px 12px;
  border-radius: 30px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: 0.3s;
}
.btn-primary {
  background-color: var(--blue);
  color: var(--white);
  font-weight: 400;
}
.btn-primary:hover {
  background-color: var(--blue);
}
.btn-outline {
  border: 2px solid var(--blue);
  color: var(--blue);
  background: transparent;
}
.btn-outline:hover {
  background-color: var(--blue);
  color: var(--white);
}

/* --- Header --- */
header {
  background: var(--white);
  padding: 20px 0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.logo {
  font-size: 24px;
  font-weight: 700;
  color: var(--primary-color);
}
.nav-links a {
  margin: 0 15px;
  font-weight: 500;
  color: var(--text-light);
  transition: 0.3s;
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--primary-color);
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}
.login-btn {
  font-weight: 500;
  color: var(--primary-color);
}
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
}

/* --- Hero Section --- */
.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  padding: 80px 20px;
  align-items: center;
}
.hero-content h1 {
  font-size: 46px;
  line-height: 1.2;
  margin-bottom: 20px;
}
.hero-content h1 span {
  /* color: var(--yellow); */
  color: #c10303;
}
.hero-content p {
  color: var(--text-light);
  margin-bottom: 30px;
  font-size: 16px;
}

.search-box {
  display: flex;
  background: var(--white);
  padding: 10px;
  border-radius: 50px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  align-items: center;
  gap: 10px;
  width: fit-content;
}
.search-input,
.category-select {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 15px;
}
.search-input input,
.category-select select {
  border: none;
  outline: none;
  padding: 10px 0;
  background: transparent;
}
.category-select {
  /* border-left: 1px solid #eee; */
}

/* Hero Image Grid (Simulated) */
.hero-image-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  position: relative;
}
.grid-item {
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}
.grid-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.shape-orange {
  border-radius: 50% 50% 0 50%;
  background: var(--orange);
  height: 250px;
}
.shape-1 {
  width: 270px;
  margin-bottom: 50px;
}
.shape-2 {
  width: 250px;
  margin-top: 50px;
}
.shape-blue {
  border-radius: 100px;
  background: var(--primary-color);
  height: 300px;
  margin-top: 50px;
}
.shape-yellow {
  border-radius: 20px;
  background: var(--yellow);
  grid-column: span 2;
  height: 200px;
}

/* --- Categories --- */
.categories {
  padding: 60px 20px;
}
.section-header h2 {
  font-size: 32px;
  text-align: center;
  margin-bottom: 40px;
}
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 20px;
}
.cat-card {
  background: var(--white);
  padding: 30px 20px;
  border-radius: 15px;
  text-align: center;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.03);
  transition: transform 0.3s;
  cursor: pointer;
}
.cat-card:hover {
  transform: translateY(-10px);
}
.cat-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto 15px;
  border-radius: 15px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 24px;
}

/* --- Transform Section --- */
.transform {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  padding: 60px 20px;
  align-items: center;
}
.transform-content h2 {
  font-size: 36px;
  margin-bottom: 20px;
}
.transform-content p {
  color: var(--text-light);
  margin-bottom: 30px;
}
.feature-list li {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
  background: var(--white);
  padding: 15px;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.03);
}
.feature-list i {
  font-size: 24px;
  margin-top: 5px;
}
.text-blue {
  color: var(--primary-color);
}
.text-orange {
  color: var(--orange);
}
.text-green {
  color: #4caf50;
}

/* --- Stats Banner --- */
.stats-banner {
  background: var(--primary-color);
  color: var(--white);
  padding: 50px 0;
  margin: 40px 0;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  text-align: center;
  gap: 30px;
}
.stat-item i {
  font-size: 40px;
  margin-bottom: 15px;
  opacity: 0.8;
}
.stat-item h3 {
  font-size: 36px;
  font-weight: 700;
}

/* --- Courses --- */
.courses1 {
  /* background: var(--primary-color); */
  /* backdrop-filter: blur(80px); */
  backdrop-filter: drop-shadow(4px 4px 50px rgb(0, 0, 0));
  background-image: url(https://www.act.ac.th/img/bg/bg-1_red.png);
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  background-repeat: no-repeat;
  padding: 60px 20px;
}
.courses2 {
  /* background: var(--primary-color); */
  /* backdrop-filter: blur(80px); */
  backdrop-filter: drop-shadow(4px 4px 50px rgb(0, 0, 0));
  background-image: url(https://www.act.ac.th/img/bg/bg-1_green.png);
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  background-repeat: no-repeat;
  padding: 60px 20px;
}
.courses3 {
  /* background: var(--primary-color); */
  /* backdrop-filter: blur(80px); */
  backdrop-filter: drop-shadow(4px 4px 50px rgb(0, 0, 0));
  background-image: url(https://www.act.ac.th/img/bg/bg-1_blue.png);
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  background-repeat: no-repeat;
  padding: 60px 20px;
}
.flex-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 40px;
}
.course-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}
.course-card {
  background: var(--white);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  transition: 0.3s;
}
.course-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
}
.course-img {
  padding: 20px;
  text-align: center;
}
.course-img img {
  border-radius: 10px;
  width: 100%;
  max-height: 200px;
  object-fit: cover;
}
.course-info {
  padding: 0 25px 25px 25px;
}
.tag {
  font-size: 12px;
  padding: 5px 10px;
  border-radius: 5px;
  font-weight: 600;
}
.tag-green {
  background: #e8f5e9;
  color: #4caf50;
}
.tag-blue {
  background: #e3f2fd;
  color: #2196f3;
}
.tag-purple {
  background: #e8eaf6;
  color: #3f51b5;
}
.course-info h3 {
  font-size: 18px;
  margin: 15px 0;
  line-height: 1.4;
  text-align: center;
  font-weight: 600;
}
.instructor {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-light);
  font-size: 14px;
  margin-bottom: 20px;
}
.instructor img {
  border-radius: 50%;
}
.course-meta {
  display: flex;
  justify-content: center;
  /* justify-content: space-between; */
  align-items: center;
  border-top: 1px solid #eee;
  padding-top: 15px;
  higth: auto;
}
.price {
  font-weight: 700;
  font-size: 18px;
}
.rating {
  font-size: 14px;
  color: var(--text-light);
}
.rating i {
  color: var(--yellow);
}

.desc {
  margin-bottom: 30px;
  font-size: 18px;
  color: var(--text-muted);
  margin-bottom: 1.5em; /* ระยะห่างระหว่างย่อหน้า */
  text-align: justify; /* จัดเนื้อหาให้เท่ากันสองด้าน */
  text-indent: 1em;
}

/* --- Responsive (Mobile / Tablet) --- */
@media (max-width: 992px) {
  .hero,
  .transform {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .search-box {
    flex-direction: column;
    width: 100%;
  }
  .category-select {
    border-left: none;
    border-top: 1px solid #eee;
    padding-top: 10px;
    width: 100%;
    justify-content: center;
  }
  .search-box .btn {
    width: 100%;
  }
  .hero-image-grid {
    display: none; /* ซ่อนรูปกราฟิกซับซ้อนในมือถือเพื่อความสะอาดตา */
  }
  .hero-content p {
    text-align: center;
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none; /* ซ่อนเมนูสำหรับหน้าจอเล็ก (ต้องใช้ JS เปิด) */
  }
  .mobile-menu-btn {
    display: block;
  }
  .nav-links.show {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 70px;
    left: 0;
    width: 100%;
    background: var(--white);
    padding: 20px;
    box-shadow: 0 10px 10px rgba(0, 0, 0, 0.1);
  }
  .flex-between {
    flex-direction: column;
    gap: 20px;
    text-align: center;
  }
  .hero-content h1 {
    font-size: 32px;
    line-height: 1.2;
    margin-bottom: 20px;
  }
}
