/* ----------------------------------------------- */
/* 1.hero-section-css */
/* ----------------------------------------------- */
.hero-section {
  position: relative;
  width: 100%;
  height: 100vh;
  background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)),
    url('../images/bg.png') no-repeat center center/cover;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  overflow: hidden;
  margin-top: -80px;
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  color: white;
}

.logo-title {
  width: 700px;
  max-width: 90%;
  margin-bottom: 1rem;
}

.hero-subtitle {
  font-size: 18px;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 1.5rem;
}

.hero-button {
  display: inline-block;
  background: #00ff55;
  color: black;
  font-weight: bold;
  padding: 12px 24px;
  border-radius: 8px;
  text-decoration: none;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hero-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 255, 100, 0.4);
}



/* ----------------------------------------------- */
/* 2.recom-course-css */
/* ----------------------------------------------- */
.recom-course {
  position: relative;
  margin-top: -120px;
  /* overlap hero section */
  z-index: 10;
}

.recom-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 40px 20px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 40px;
  /* background: #0f1117; */
  border-radius: 20px;
  /* box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4); */
}

.recom-text {
  flex: 1;
  color: white;
  font-size: 16px;
}

.recom-text h2 {
  font-size: 28px;
  margin-bottom: 1rem;
}

.recom-text .green-text {
  color: #00ff55;
}

.recom-text .recom-links a {
  display: block;
  color: #00bfff;
  margin-top: 15px;
  font-size: 18px;
  font-weight: 600;
  text-decoration: none;
}

.zoom-icon {
  height: 24px;
  vertical-align: middle;
  margin-left: 4px;
}

.recom-cards {
  display: flex;
  gap: 20px;
  flex: 1.5;
}

.course-card {
  background: #1a1e26;
  border-radius: 12px;
  overflow: hidden;
  color: white;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  width: 100%;
  max-width: 300px;
}

.course-card img {
  width: 100%;
  display: block;
}

.course-info {
  padding: 16px;
}

.course-time {
  font-size: 16px;
  font-weight: bold;
  padding: 0 5px;
  color: #a3ffbf;
  margin-bottom: 6px;
}

.course-desc {
  font-size: 14px;
  color: #ccc;
}

.course-card {
  position: relative;
  background: #1a1e26;
  border-radius: 12px;
  overflow: hidden;
  color: white;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  width: 100%;
  max-width: 300px;
}

.course-image-wrapper {
  position: relative;
}

.course-image-wrapper img {
  width: 100%;
  display: block;
}

/* ป้ายราคา */
.price-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(0, 0, 0, 0.7);
  padding: 6px 10px;
  border-radius: 8px;
  text-align: left;
}

.original-price {
  color: #aaa;
  font-size: 12px;
  text-decoration: line-through;
  display: block;
}

.discount-price {
  color: #00ff55;
  font-size: 16px;
  font-weight: bold;
  margin-top: 2px;
}



/* ----------------------------------------------- */
/* 3.Online Course 1*/
/* ----------------------------------------------- */
.online-course {
  margin-top: 30px;
  padding: 0 20px;
}

.online-container {
  max-width: 1400px;
  margin: 0 auto;
}

.online-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.online-header h2 {
  font-size: 28px;
  color: white;
}

.green-text {
  color: #00ff55;
}

.view-all {
  color: #ccc;
  font-size: 14px;
  text-decoration: none;
}

.course-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.course-card {
  background: #1a1e26;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
  transition: transform 0.3s ease;
  color: white;
}

.course-card:hover {
  transform: translateY(-4px);
}

.course-thumb {
  position: relative;
}

.course-thumb img {
  width: 100%;
  display: block;
}

.price-tag {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.7);
  padding: 4px 8px;
  border-radius: 6px;
  text-align: right;
}

.price-tag .original {
  font-size: 16px;
  text-decoration: line-through;
  color: #ccc;
}

.price-tag .discount {
  font-size: 18px;
  font-weight: bold;
  color: #00ff55;
}

.video-count {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.6);
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 12px;
  color: white;
}

.video-count i {
  margin-right: 4px;
}

.course-info {
  padding: 12px 16px;
}

.course-info h3 {
  font-size: 16px;
  margin-bottom: 4px;
}

.course-info .type {
  font-size: 13px;
  color: #00ff55;
  margin-bottom: 8px;
}

.course-info .desc {
  font-size: 13px;
  color: #ccc;
}



/* ----------------------------------------------- */
/* 4.Online Course 2*/
/* ----------------------------------------------- */
.online-course2 {
  margin-top: 70px;
  padding: 0 20px;
}

.online-container2 {
  max-width: 1400px;
  margin: 0 auto;
}

.online-header2 {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.online-header2 h2 {
  font-size: 28px;
  color: white;
}

.green-text2 {
  color: #00ff55;
}

.view-all2 {
  color: #ccc;
  font-size: 14px;
  text-decoration: none;
}

.course-grid2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.course-card2 {
  background: #1a1e26;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
  transition: transform 0.3s ease;
  color: white;
}

.course-card2:hover {
  transform: translateY(-4px);
}

.course-thumb2 {
  position: relative;
}

.course-thumb2 img {
  width: 100%;
  display: block;
}

.price-tag2 {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.7);
  padding: 4px 8px;
  border-radius: 6px;
  text-align: right;
}

.price-tag2 .original2 {
  font-size: 16px;
  text-decoration: line-through;
  color: #ccc;
}

.price-tag2 .discount2 {
  font-size: 18px;
  font-weight: bold;
  color: #00ff55;
}

.video-count2 {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.6);
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 12px;
  color: white;
}

.video-count2 i {
  margin-right: 4px;
}

.course-info2 {
  padding: 12px 16px;
}

.course-info2 h3 {
  font-size: 16px;
  margin-bottom: 4px;
}

.course-info2 .type2 {
  font-size: 13px;
  color: #00ff55;
  margin-bottom: 8px;
}

.course-info2 .desc2 {
  font-size: 13px;
  color: #ccc;
}


/* ----------------------------------------------- */
/* 5.Portfolio CSS */
/* ----------------------------------------------- */
.portfolio {
  padding: 40px 20px;
  /* background: #0f1117; */
  margin-top: 50px;
}

.portfolio-container {
  max-width: 95%;
  margin: 0 auto;
}

.portfolio-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.portfolio-header h2 {
  font-size: 28px;
  color: white;
}

.green-text {
  color: #00ff55;
}

.portfolio-filter {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.portfolio-filter button {
  background: none;
  border: none;
  color: white;
  font-size: 16px;
  cursor: pointer;
  padding: 6px 10px;
  transition: color 0.3s ease;
}

.portfolio-filter button.active,
.portfolio-filter button:hover {
  color: #00ff55;
}

.view-all {
  color: #ccc;
  font-size: 14px;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 4px;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  /* 👈 จำกัดไว้ 5 ช่องต่อแถว */
  gap: 12px;
}

.portfolio-item {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  cursor: pointer;
}

.portfolio-item img {
  width: 100%;
  display: block;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.portfolio-item:hover img {
  transform: scale(1.05);
}

.portfolio-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 17, 23, 0.7);
  opacity: 0;
  transition: opacity 0.3s ease;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.portfolio-item:hover .portfolio-overlay {
  opacity: 1;
}

.zoom-icon {
  font-size: 24px;
  color: white;
  margin-bottom: 10px;
}

.artist-name {
  color: #ccc;
  font-size: 14px;
}



/* ----------------------------------------------- */
/* 📱 Responsive: Mobile & Tablet */
/* ----------------------------------------------- */
@media (max-width: 1024px) {
  .recom-container {
    flex-direction: column;
    gap: 30px;
    text-align: center;
  }

  .recom-cards {
    justify-content: center;
    flex-wrap: wrap;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }

  .course-card {
    max-width: 100%;
  }

  .online-header,
  .online-header2,
  .portfolio-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  /* ปรับให้ portfolio แสดง 3 การ์ดต่อแถวบนแท็บเล็ต */
  .portfolio-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .hero-section {
    background: none;
    background-color: #1a1e26;
    height: 60vh;
    padding: 100px 20px 40px;
  }

  .logo-title {
    width: 90%;
  }

  .hero-subtitle {
    font-size: 18px;
  }

  .hero-button {
    padding: 10px 20px;
    font-size: 18px;
  }

  .recom-container {
    margin-top: 60px;
    padding: 30px 16px;
  }

  .recom-text h2,
  .online-header h2,
  .online-header2 h2,
  .portfolio-header h2 {
    font-size: 18px;
  }

  .recom-text p{
    padding: 3px;
    font-size: 14px;
  }

  /* ปรับให้ online-course แสดง 2 การ์ดต่อแถว */
  .course-grid,
  .course-grid2 {
    grid-template-columns: repeat(2, 1fr);
  }

  /* ปรับให้ portfolio แสดง 3 การ์ดต่อแถว */
  .portfolio-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .zoom-icon {
    font-size: 16px;
  }
  .recom-links{
    display: flex;
    justify-content: space-between;
    font-size: 14px;
  }
}

@media (max-width: 480px) {
  .hero-subtitle {
    font-size: 18px;
  }

  .logo-title {
    width: 90%;
  }

  .hero-button {
    font-size: 16px;
    padding: 8px 16px;
  }

  .course-info h3,
  .course-info2 h3 {
    font-size: 14px;
  }

  .course-info .desc,
  .course-info2 .desc2 {
    font-size: 12px;
  }

  /* ปรับการแสดงผลบนมือถือ */
  .course-grid,
  .course-grid2 {
    grid-template-columns: repeat(2, 1fr); /* 2 การ์ดต่อแถวสำหรับ online-course */
  }

  .portfolio-grid {
    grid-template-columns: repeat(3, 1fr); /* 3 การ์ดต่อแถวสำหรับ portfolio */
  }

  .recom-cards {
    grid-template-columns: 1fr; /* 1 การ์ดต่อแถวสำหรับ recom-course (ตามที่ขอ 2 การ์ดต่อแถว แต่ดูจากโค้ดเดิมเป็นแบบคอลัมน์) */
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
  }

  /* ถ้าต้องการให้ recom-course แสดง 2 การ์ดต่อแถวบนมือถือ ให้ใช้แบบนี้แทน */
  /*
  .recom-cards {
    grid-template-columns: repeat(2, 1fr);
    display: grid;
    gap: 15px;
  }
  */
}