/* --- Variables & Reset --- */
:root {
  --blue: #219ebc;
  --light-blue: #e0fbfc;
  --dark-blue: #023047;
  --orange: #fb8500;
  --light-orange: #ffe8d6;
  --yellow: #ffb703;
  --light-yellow: #fff4d2;
  --green: #52b788;
  --white: #ffffff;
  --text-main: #333333;
  --text-muted: #666666;
  --bg-gray: #f8f9fa;
  --red: #bb2222;
}

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

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

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

a {
  text-decoration: none;
}
/* ul {
  list-style: none;
} */

/* --- Utility Classes --- */
.text-orange {
  color: var(--orange);
}
.text-blue {
  color: var(--blue);
}
.text-yellow {
  color: var(--yellow);
}
.text-white {
  color: var(--white);
}
.bg-blue {
  background-color: var(--blue);
}
.bg-orange {
  background-color: var(--orange);
}
.bg-yellow {
  background-color: var(--yellow);
}
.bg-green {
  background-color: var(--green);
}
.bg-light-blue {
  background-color: var(--light-blue);
}
.bg-light-orange {
  background-color: var(--light-orange);
}
.bg-light-yellow {
  background-color: var(--light-yellow);
}
.bg-gray {
  background-color: var(--bg-gray);
}

.text-center {
  text-align: center;
}

/* --- Buttons --- */
.btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: 50px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}
.btn-primary {
  background: var(--red);
  color: var(--white);
  box-shadow: 0 4px 15px rgba(251, 133, 0, 0.3);
}
.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(251, 133, 0, 0.4);
}
.btn-outline {
  border-color: var(--orange);
  color: var(--orange);
  background: transparent;
}
.btn-outline:hover {
  background: var(--light-orange);
}
.btn-white {
  background: var(--white);
  color: var(--red);
  font-weight: 600;
}
.btn-dark {
  background: var(--dark-blue);
  color: var(--white);
}

/* --- Navbar --- */
header {
  background: var(--white);
  padding: 15px 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.logo {
  font-size: 24px;
  font-weight: 700;
  color: var(--dark-blue);
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav-menu a {
  margin: 0 15px;
  color: var(--text-muted);
  font-weight: 500;
  transition: 0.3s;
}
.nav-menu a:hover,
.nav-menu a.active {
  color: var(--orange);
}
.nav-action {
  display: flex;
  align-items: center;
  gap: 15px;
}
.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 24px;
  color: var(--dark-blue);
  cursor: pointer;
}

/* --- Hero Section --- */
.hero {
  /* background: linear-gradient(135deg, #fff9f2 0%, #e0fbfc 100%); */
  background: linear-gradient(135deg, #ffffff 0%, #ffdada 100%);
  padding: 80px 0 0 0;
  position: relative;
}
.hero-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: center;
  padding-bottom: 50px;
}
.badge {
  background: var(--light-orange);
  color: var(--orange);
  padding: 6px 15px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  display: inline-block;
  margin-bottom: 20px;
}
.hero-content h1 {
  font-size: 46px;
  line-height: 1.2;
  margin-bottom: 20px;
  color: var(--dark-blue);
}
.hero-content h1 span {
  color: var(--red);
  font-size: 32px;
}
.hero-content p {
  font-size: 18px;
  color: var(--text-muted);
  margin-bottom: 30px;
}
.hero-btns {
  display: flex;
  gap: 15px;
  align-items: center;
}

.hero-image {
  position: relative;
}
.image-wrapper {
  position: relative;
}
.image-wrapper img {
  width: 100%;
  max-width: 500px;
  /* border-radius: 40px 10px 40px 10px; */
  /* box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08); */
}
.floating-card {
  position: absolute;
  background: var(--white);
  padding: 12px 20px;
  border-radius: 30px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
  font-weight: 600;
  color: var(--dark-blue);
  display: flex;
  align-items: center;
  gap: 10px;
}
.top-left {
  top: 20px;
  left: -20px;
}
.wave {
  display: block;
  width: 100%;
  height: auto;
  margin-bottom: -5px;
}

/* --- Features --- */
.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin-top: -30px;
  position: relative;
  z-index: 10;
  padding-bottom: 60px;
}
.feature-box {
  background: var(--white);
  padding: 30px;
  border-radius: 20px;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s;
}
.feature-box:hover {
  transform: translateY(-10px);
}
.icon-circle {
  width: 70px;
  height: 70px;
  margin: 0 auto 20px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 28px;
}
.feature-box h3 {
  margin-bottom: 10px;
  color: var(--dark-blue);
}
.feature-box p {
  color: var(--text-muted);
  font-size: 15px;
}

/* --- Section New --- */
.section-new {
  text-align: center;
  margin-bottom: 50px;
  max-width: 1000px;
  margin-inline: auto;
}
.section-new h2 {
  font-size: 36px;
  color: var(--dark-blue);
  margin-bottom: 15px;
}
.section-new h2 span {
  color: var(--red);
}
.section-new p {
  color: var(--text-muted);
  margin-bottom: 1.5em; /* ระยะห่างระหว่างย่อหน้า */
  text-align: justify; /* จัดเนื้อหาให้เท่ากันสองด้าน */
  text-indent: 2em; /* ย่อหน้าบรรทัดแรก */
  font-size: 18px;
}

/* --- Curriculum Section --- */
.curriculum {
  padding: 80px 0;
  background-image: url(https://www.act.ac.th/img/bg/study-bg-02.png);
  background-size: cover;
  /* background-attachment: fixed; */
  background-position: center;
  background-repeat: no-repeat;
}
.section-title {
  text-align: center;
  margin-bottom: 50px;
  max-width: 600px;
  margin-inline: auto;
}
.section-title h2 {
  font-size: 36px;
  color: var(--dark-blue);
  margin-bottom: 15px;
}
.section-title h2 span {
  color: var(--orange);
}
.section-title p {
  color: var(--text-muted);
}

.curriculum-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
}
.subject-card {
  background: var(--white);
  padding: 18px 18px;
  border-radius: 18px;
  border-bottom: 5px solid transparent;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.03);
  /* width: 390px; */
}
.subject-card.border-blue {
  border-color: var(--blue);
}
.subject-card.border-orange {
  border-color: var(--orange);
}
.subject-card.border-yellow {
  border-color: var(--yellow);
}
.subject-card.border-green {
  border-color: var(--green);
}
.subject-card.border-red {
  border-color: var(--red);
}

.subject-icon {
  width: 60px;
  height: 60px;
  border-radius: 15px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 24px;
  margin-bottom: 20px;
}
.subject-card h3 {
  font-size: 20px;
  margin-bottom: 10px;
  color: var(--dark-blue);
}
.subject-card p {
  color: var(--text-muted);
  font-size: 18px;
}
.subject-card img {
  border-radius: 10px;
  width: 100%; /* ให้ความกว้างขยายเต็มตัว Card */
  height: 260px; /* กำหนดความสูงที่ต้องการให้เท่ากันทุกภาพ */
  object-fit: cover; /* ภาพไม่เพี้ยน ไม่ยืด แต่จะกินขอบแทน */
  object-position: center; /* จัดให้จุดกึ่งกลางของภาพอยู่ตรงกลางพอดี */
}

/* --- About Info --- */
.about-info {
  padding: 50px 0px 50px 0px;
  display: grid;
  gap: 60px;
  align-items: center;
  position: relative;
}
.about-info-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: center;
  padding-bottom: 50px;
}
.about-images {
  /* flex: 1; */
  position: relative;
  /* height: 500px; */
  /* display: flex;
  justify-content: center;
  align-items: center; */
}
.about-images img {
  width: 100%;
  max-width: 500px;
  border-radius: 10px;
}

.img-1 {
  width: 70%;
  height: auto;
  border-radius: 5px;
}
.img-2 {
  position: absolute;
  bottom: -30px;
  right: 0;
  width: 60%;
  border: 10px solid var(--white);
  border-radius: 5px;
}
/* .about-text {
  flex: 1;
} */
.tag {
  color: var(--primary-red);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  display: block;
  margin-bottom: 10px;
}
.about-text h2 {
  font-size: 36px;
  color: var(--red);
  line-height: 1.2;
  margin-bottom: 20px;
  text-align: center;
}
.about-text .desc {
  margin-bottom: 30px;
  font-size: 18px;
  color: var(--text-muted);
  margin-bottom: 1.5em; /* ระยะห่างระหว่างย่อหน้า */
  text-align: justify; /* จัดเนื้อหาให้เท่ากันสองด้าน */
  text-indent: 2em; /* ย่อหน้าบรรทัดแรก */
}
.desc {
  margin-bottom: 30px;
  font-size: 18px;
  color: var(--text-muted);
  margin-bottom: 1.5em; /* ระยะห่างระหว่างย่อหน้า */
  text-align: justify; /* จัดเนื้อหาให้เท่ากันสองด้าน */
  text-indent: 2em; /* ย่อหน้าบรรทัดแรก */
}
.service-list {
  margin-bottom: 20px;
  list-style: none;
}
.service-list li {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 14px;
  /* flex-direction: column; */
  justify-content: center;
  align-items: center;
}
.service-list i {
  font-size: 18px;
  color: var(--red);
  /* margin-top: 5px; */
}
.service-list h4 {
  color: var(--red);
  /* margin-bottom: 5px; */
  font-weight: 500;
}
.service-list p {
  font-size: 18px;
}
.service-list-item {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  /* margin-bottom: 20px; */
  background-color: #fcdcdc;
  padding: 8px 12px;
  border-radius: 24px;
  width: 125px;
}

/* --- Extracurricular Activities --- */
.activities {
  padding: 80px 20px;
}
.activity-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 40px;
}
.activity-card {
  background: var(--white);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
  transition: 0.3s;
}
.activity-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
}
.act-img {
  position: relative;
  height: 220px;
}
.act-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.act-tag {
  position: absolute;
  top: 15px;
  left: 15px;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  color: var(--white);
}
.tag-orange {
  background: var(--orange);
}
.tag-blue {
  background: var(--blue);
}
.tag-green {
  background: var(--green);
}

.act-info {
  padding: 25px;
}
.act-info h3 {
  margin-bottom: 10px;
  color: var(--dark-blue);
}
.act-info p {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 20px;
  line-height: 1.5;
}
.act-meta {
  display: flex;
  align-items: center;
  color: var(--blue);
  font-weight: 500;
  font-size: 14px;
  border-top: 1px solid #eee;
  padding-top: 15px;
}

/* --- CTA Section --- */
.cta-section {
  background: var(--red);
  padding: 60px 0;
  margin-top: 40px;
}
.cta-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: url('data:image/svg+xml;utf8,<svg width="100" height="100" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"><circle cx="50" cy="50" r="40" stroke="rgba(255,255,255,0.1)" stroke-width="20" fill="none"/></svg>')
    no-repeat right center;
  background-size: contain;
}
.cta-text {
  flex: 1;
  color: var(--white);
  max-width: 600px;
}
.cta-text h2 {
  font-size: 32px;
  margin-bottom: 15px;
}
.cta-text p {
  font-size: 18px;
  opacity: 0.9;
}
.cta-btns {
  display: flex;
  align-items: center;
  gap: 15px;
}
.cta-btns i {
  font-size: 42px;
  color: var(--white);
}

.list-unstyled {
  padding-left: 28px;
}

.list-item {
  font-size: 18px;
  color: var(--text-muted);
  text-align: justify; /* จัดเนื้อหาให้เท่ากันสองด้าน */
}

/* .list-item {
  display: flex;
  align-items: center;
  gap: 10px;
} */

/* --- Responsive Design --- */
@media (max-width: 992px) {
  .hero-container {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 30px;
  }
  .hero-content h1 {
    font-size: 32px;
  }
  .hero-btns {
    justify-content: center;
  }
  .floating-card {
    display: none;
  } /* ซ่อนการ์ดลอยในมือถือเพื่อไม่ให้บังรูป */
  .features {
    grid-template-columns: 1fr;
    margin-top: 20px;
    padding: 0 20px 40px;
    gap: 20px;
  }
  .cta-container {
    flex-direction: column;
    text-align: center;
    gap: 30px;
    background-position: center;
  }
  .about-info {
    padding: 40px 0px 0px 0px;
    display: grid;
    gap: 60px;
    align-items: center;
    position: relative;
  }
  .about-info-container {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 30px;
    padding-bottom: 28px;
  }
  .about-images-wrap {
    position: relative;
  }
  .about-text h2 {
    font-size: 26px;
  }
  .section-new h2 {
    font-size: 26px;
  }
  .service-list li {
    gap: 10px;
  }
  .service-list-item {
    flex-direction: column;
  }

  .curriculum {
    padding: 40px 0;
  }

  .cta-text h2 {
    font-size: 28px;
  }
}

@media (max-width: 768px) {
  .nav-menu {
    display: none;
  }
  .nav-action .btn {
    display: none;
  }
  .menu-toggle {
    display: block;
  }

  /* Mobile Menu Style (Toggle via JS) */
  .nav-menu.active {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--white);
    padding: 20px;
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
    border-top: 1px solid #eee;
  }
  .nav-menu.active a {
    margin: 10px 0;
    text-align: center;
  }
  .hero-btns {
    flex-direction: column;
    width: 100%;
  }
  .hero-btns .btn {
    width: 100%;
  }
  .cta-btns {
    flex-direction: column;
    width: 100%;
  }
}
