/* ----------------Style----------------- */
html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--cream);
  color: var(--ink);
  overflow: hidden auto;
}

/* ------------------hero-------------------- */
.hero {
  min-height: 88vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  padding: 100px 8%;
  gap: 60px;
  background-color: var(--warm-white);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  background-image: url("/assets/images/wannakarnLogo_red.png");
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  position: absolute;
  top: -80px;
  right: -80px;
  width: 420px;
  height: 420px;
  border-radius: 15%;
  z-index: 0;
  opacity: 0.1;
}

.hero::after {
  content: "";
  background-image: url("/assets/images/wannakarnLogo_red.png");
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  position: absolute;
  bottom: -120px;
  left: 30%;
  width: 320px;
  height: 320px;
  border-radius: 15%;
  z-index: 0;
  opacity: 0.1;
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-title {
  font-family: var(--header-font), serif;
  font-size: clamp(36px, 3vw, 58px);
  font-weight: 700;
  line-height: 1.15;
  color: var(--ink);
  margin-bottom: 20px;
}

.hero-sub {
  font-family: var(--general-font), serif;
  font-size: 1em;
  color: var(--muted);
  line-height: 1.8;
  margin-bottom: 2em;
  max-width: 420px;
  font-weight: 300;
}

/* .hero-cta {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
} */

/* ------------------hero image-------------------- */
.hero-image {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-image-frame {
  width: 100%;
  /* max-width: 680px; */
  aspect-ratio: 9/5;
  background-color: linear-gradient(135deg, #f5ede0 0%, #eadbc8 100%);
  border-radius: 12px;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  img {
    object-fit: contain;
    width: 100%;
    height: 100%;
  }
}

.course-section {
  padding: 100px 8%;
  background-color: var(--cream);
}

.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 52px;
}
.section-title {
  font-family: var(--header-font), serif;
  font-size: clamp(26px, 3vw, 38px);
  font-weight: 700;
  color: var(--ink);
  line-height: 1.2;
}

.link-see-expand {
  font-family: var(--accent-font), serif;
  font-size: clamp(14px, 14px, 18px);
  color: var(--muted);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
  transition: color 0.2s;
  white-space: nowrap;
  padding-bottom: 4px;
  border-bottom: 1px solid transparent;
}

.link-see-expand:hover {
  color: var(--ink);
}

.courses-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.course-card {
  background: var(--card-bg);
  border-radius: 10px;
  border: 1px solid var(--border);
  overflow: hidden;
  transition:
    transform 0.25s,
    box-shadow 0.3s;
  cursor: pointer;
  padding: 24px 12px;
}

.course-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 0 rgba(15, 13, 14, 0.1);
}

.course-name {
  font-family: var(--header-font), serif;
  font-size: clamp(16px, 1.5em, 24px);
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 8px;
  line-height: 1.4;
}

.course-desc {
  font-family: var(--general-font), serif;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 16px;
  font-weight: 300;
}

.course-link {
  text-decoration: none;
  margin: 0;
  padding: 0;
  display: block;
  color: inherit;
}
.course-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--accent-font), serif;
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
  border-top: 1px solid var(--border);
  padding-top: 14px;
}

.arrow-link {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background-color: var(--cream);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  text-decoration: none;
  color: var(--ink);
  transition: all 0.2s;
}

.course-card:hover .arrow-link {
  background-color: var(--red);
  color: white;
  text-decoration: underline;
}

/* ------------------CTA-------------------- */
.cta-section {
  margin: 0 8% 100px;
  background: var(--ink);
  border-radius: 16px;
  padding: 64px 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  position: relative;
  overflow: hidden;
}

.cta-text {
  position: relative;
  z-index: 1;
}
.cta-title {
  font-family: var(--header-font), serif;
  font-size: 30px;
  font-weight: 700;
  color: white;
  line-height: 1.3;
  margin-bottom: 10px;
}

.cta-sub {
  font-family: var(--general-font), serif;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.5);
  font-weight: 300;
}

.cta-action {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.line-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  background-color: #06c755;
  color: white;
  padding: 14px 28px;
  border-radius: 6px;
  text-decoration: none;
  font-size: 16px;
  font-weight: 700;
  transition: all 0.2s;
  white-space: nowrap;
}

.line-btn:hover {
  background: #05b34a;
  transform: translateY(-2px);
}

.line-icon {
  width: 64px;
  height: 64px;
}

/* ------------------tablet-------------------- */
@media (max-width: 1100px) {
  .courses-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: unset;
    padding: 60px 6% 60px;
    gap: 48px;
  }
  .hero::before,
  .hero::after {
    display: none;
  }
  .hero-picture {
    order: -1;
  }
  .hero-image-frame {
    max-width: 100%;
  }
  .hero-title {
    font-size: clamp(28px, 6vw, 44px);
  }
  .hero-sub {
    max-width: 100%;
  }
}

/* ------------------tablet-------------------- */
@media (max-width: 640px) {
  .hero {
    padding: 0;
    gap: 0;
    display: flex;
    flex-direction: column;
    background-color: var(--warm-white);
  }
  .hero-image {
    order: -1;
    width: 100%;
  }
  .hero-image-frame {
    border-radius: 0;
    border-left: none;
    border-right: none;
    border-top: none;
    max-width: 100%;
    aspect-ratio: 16/9;
  }
  .hero-content {
    padding: 28px 5% 40px;
    width: 100%;
  }
  .hero-title {
    font-size: 26px;
    line-height: 1.3;
    margin-bottom: 14px;
  }
  .hero-sub {
    font-size: 14px;
    margin-bottom: 24px;
  }
  .hero-cta {
    flex-direction: column;
    gap: 10px;
  }
  .hero-cta .btn {
    width: 100%;
    justify-content: center;
    padding: 13px 24px;
    font-size: 15px;
  }

  .courses-section {
    padding: 48px 5%;
  }

  .course-meta {
    border-top: none;
    border-left: 1px solid var(--border);
    padding-left: 10px;
  }
  .section-header {
    margin-bottom: 24px;
  }
  .section-title {
    font-size: 22px;
  }
  .courses-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .course-link {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    border-radius: 8px;
  }

  .course-card-body {
    flex: 1;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
  .course-name {
    font-size: 15px;
    margin-bottom: 4px;
  }
  .course-desc {
    font-size: 12px;
    margin-bottom: 10px;
  }
  .course-meta {
    padding-top: 10px;
    gap: 10px;
  }

  .faq-section {
    padding: 48px 5%;
    display: flex;
    flex-direction: column;
    gap: 28px;
  }
  .faq-q {
    font-size: 14px;
    padding: 18px 0;
  }

  .cta-section {
    margin: 0 0 0;
    border-radius: 0;
    padding: 48px 5%;
  }
  .cta-title {
    font-size: 22px;
  }
  .line-btn {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .cta-section {
    flex-direction: column;
  }
}
