/* General Styles */
body {
  margin: 0;
  font-family: 'Arial', sans-serif;
  background-color: #0d1117;
  color: #c9d1d9;
  line-height: 1.6;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: auto;
}
  
/* Project Hero Section */
.project-hero {
  
  color: #ffffff;
  text-align: center;
  padding: 8rem 1rem;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #1e1e2f, #24243e, #6254beb0);
  background-size: 300% 300%; /* ขยายขนาดพื้นหลัง */
  animation: gradientShift 8s ease infinite;
}

.project-hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(138,43,226,0.2) 0%, rgba(0,0,0,0) 70%);
  z-index: 0;
  animation: rotateBackground 20s linear infinite; /* เพิ่มการหมุน background */
}

@keyframes gradientShift {
  0% {
    background-position: 0% 50%; /* เริ่มต้นที่จุดหนึ่ง */
  }
  50% {
    background-position: 100% 50%; /* เคลื่อนไปอีกจุด */
  }
  100% {
    background-position: 0% 50%; /* กลับมาที่เดิม */
  }
}

.project-hero h1 {
  font-size: 4rem;
  font-weight: 700;
  margin-top: 20px;
  margin-bottom: 20px;
  color: #ffffff;
  text-shadow: 0 5px 15px rgba(0, 0, 0, 0.6); /* เพิ่มเงาให้ดูมีมิติ */
  z-index: 1;
  position: relative;
}

.project-hero .subheading {
  font-size: 1.5rem;
  font-weight: 500;
  color: #a0a8ff;
  margin-bottom: 40px;
  z-index: 1;
  position: relative;
}

.project-hero .project-image {
  max-width: 50%;
  margin: 20px auto;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  z-index: 1;
  position: relative;
}

.project-hero .project-image:hover {
  transform: scale(1.05); /* เพิ่มเอฟเฟกต์ zoom */
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.8);
}

.project-hero p {
  font-size: 1.3rem;
  line-height: 1.8;
  color: #e4e4e4;
  margin-top: 1.5rem;
  z-index: 1;
  position: relative;
}
.project-hero p::after {
  content: '';
  display: block;
  width: 150px;
  height: 3px;
  background: #fff;
  margin: 1.5rem auto 0; /* เพิ่มเส้นคั่น */
  border-radius: 2px;
}
  
  .project-hero .back-button {
    display: inline-block;
    margin-top: 2rem;
    padding: 0.8rem 2rem;
    text-decoration: none;
    font-weight: bold;
    color: #9f7aea;
    background: #fff;
    border-radius: 25px;
    transition: background 0.3s ease, transform 0.3s ease;
  }
  
  .project-hero .back-button:hover {
    background: #9f7aea;
    color: #fff;
    transform: scale(1.05);
  }
  
  /* Project Details Section */
  .project-details {
    padding: 4rem 1rem;
    max-width: 1200px;
    margin: auto;
  }
  
  .project-content {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    align-items: center;
  }
  
  .project-image-container {
    flex: 1;
    text-align: center;
  }
  
  .project-image {
    max-width: 100%;
    border-radius: 15px;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease-in-out;
  }
  
  .project-image:hover {
    transform: scale(1.05);
  }
  
  .project-text {
    flex: 1;
  }
  
  .project-text h2,
  .project-text h3 {
    color: #9f7aea;
    margin-bottom: 1rem;
  }
  
  .project-text p {
    font-size: 1rem;
    margin-bottom: 1.5rem;
  }
  
  .project-text ul {
    list-style: none;
    padding-left: 0;
  }
  
  .project-text ul li {
    font-size: 1rem;
    margin-bottom: 0.8rem;
    position: relative;
    padding-left: 20px;
  }
  
  .project-text ul li::before {
    content: "✔";
    position: absolute;
    left: 0;
    color: #9f7aea;
  }
  
  .project-buttons {
    text-align: center;
    margin-top: 2rem;
  }
  
  .project-buttons .btn {
    display: inline-block;
    margin: 0 1rem;
    padding: 0.8rem 2rem;
    text-decoration: none;
    font-weight: bold;
    color: #fff;
    border-radius: 25px;
    transition: background 0.3s ease, transform 0.3s ease;
  }
  
  .project-buttons .btn.github {
    background: #24292f;
  }
  
  .project-buttons .btn.github:hover {
    background: #6e5494;
  }
  
  .project-buttons .btn.demo {
    background: #9f7aea;
  }
  
  .project-buttons .btn.demo:hover {
    background: #805ad5;
  }

  /* Back Button (at the bottom) */
.back-button {
  display: inline-block;
  margin-top: 40px;
  margin-bottom: 40px;
  padding: 0.8rem 2rem;
  text-decoration: none;
  font-weight: bold;
  color: #ffffff;
  background: #9f7aea;
  border-radius: 25px;
  transition: background 0.3s ease, transform 0.3s ease;
  text-align: center;
}

.back-button:hover {
  background: #805ad5;
  transform: scale(1.05);
}
  
/* Footer */
.footer {
  background: #161b22;
  text-align: center;
  padding: 1.5rem 0;
  color: #8b949e;
}

/* Responsive Styles */

/* สำหรับหน้าจอขนาดกลาง (Tablet) */
@media (max-width: 768px) {
  .project-hero {
    padding: 6rem 1rem; /* ลด Padding */
  }

  .project-hero h1 {
    font-size: 3rem; /* ลดขนาดหัวข้อ */
  }

  .project-hero .subheading {
    font-size: 1.2rem; /* ลดขนาด Subheading */
  }

  .project-hero .project-image {
    max-width: 70%; /* ลดขนาดรูปภาพ */
  }

  .project-details {
    padding: 3rem 1rem; /* ลด Padding */
  }

  .project-content {
    flex-direction: column; /* จัดเนื้อหาเป็นแนวตั้ง */
    gap: 1.5rem; /* ลดระยะห่าง */
  }

  .project-text h2,
  .project-text h3 {
    font-size: 1.5rem; /* ลดขนาดหัวข้อ */
  }

  .project-text p {
    font-size: 0.9rem; /* ลดขนาดข้อความ */
  }
}

/* สำหรับหน้าจอขนาดเล็ก (Mobile) */
@media (max-width: 480px) {
  .project-hero {
    padding: 4rem 1rem; /* ลด Padding เพิ่มเติม */
  }

  .project-hero h1 {
    font-size: 2.5rem; /* ลดขนาดหัวข้อ */
  }

  .project-hero .subheading {
    font-size: 1rem; /* ลดขนาด Subheading */
  }

  .project-hero .project-image {
    max-width: 90%; /* ลดขนาดรูปภาพเพิ่มเติม */
  }

  .project-details {
    padding: 2rem 1rem; /* ลด Padding */
  }

  .project-text h2,
  .project-text h3 {
    font-size: 1.2rem; /* ลดขนาดหัวข้อ */
  }

  .project-text p {
    font-size: 0.8rem; /* ลดขนาดข้อความ */
  }

  .project-buttons .btn {
    padding: 0.6rem 1.5rem; /* ลดขนาดปุ่ม */
    font-size: 0.9rem; /* ลดขนาดข้อความในปุ่ม */
  }

  .back-button {
    padding: 0.6rem 1.5rem; /* ลดขนาดปุ่ม Back */
    font-size: 0.9rem; /* ลดขนาดข้อความในปุ่ม Back */
  }
}
  