@import url('https://fonts.googleapis.com/css2?family=Kanit&display=swap');

/* รีเซ็ตค่าพื้นฐาน */
html, body {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Kanit", serif;
  background-color: transparent;
  line-height: 1.6;
  color: #333; /* สีตัวอักษรที่นุ่มนวล */
  /* ใส่ภาพพื้นหลัง */
  background: url("../images/group-all-2.jpg")     /* path จาก css → images */
              no-repeat                        /* ไม่วนซ้ำ */
              center center                     /* จัดตำแหน่งตรงกลาง */
              / cover;                          /* ขยายเต็ม ไม่เสียสัดส่วน */
}

/* ส่วน Banner ด้านบน */
.about-banner {
  background-image: url("../images/tao-1.jpg"); 
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  height: 850px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: right;
  padding: 20px;
  color: #fff;
  z-index: 1;
  border-bottom-left-radius: 0px; 
  border-bottom-right-radius: 0px; 
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.about-content {
  max-width: 600px;
  margin-left: 1200px;
  width: 100%;
  text-align: left;
  background-color: rgba(0, 0, 0, 0.5);
  padding: 30px;
  border-radius: 8px;
  transform: translateX(50px); 
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease;
}

.about-content:hover {
  transform: translateX(0);
}

.about-content h1 {
  font-size: 36px;
  margin-bottom: 20px;
}

.about-content p {
  font-size: 18px;
  margin-bottom: 20px;
}

.about-content button {
  background-color: #0072bc;
  color: #fff;
  padding: 10px 20px;
  border: none;
  cursor: pointer;
  border-radius: 50px;
  font-size: 16px;
  transition: background-color 0.3s ease, transform 0.3s ease;
}

.about-content button:hover {
  background-color: #005f9f;
  transform: translateY(-3px);
}

/* ส่วน content1 ในรูปภาพ*/
.about-card1 {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 320px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
  padding: 32px;
  overflow: hidden;
  border-radius: 10px;
  transition: all 0.5s cubic-bezier(0.23, 1, 0.320, 1);
}

.about-content1 {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
  color: #e8e8e8;
  transition: all 0.5s cubic-bezier(0.23, 1, 0.320, 1);
}

.about-content1 .h1 {
  font-weight: 700;
  font-size: 32px;
}

.about-content1 .p {
  line-height: 1.5;
}

.about-content1 .btn {
  color: #e8e8e8;
  font-size: 14px;
  text-decoration: none;
  padding: 10px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  background: linear-gradient(-45deg, #f89b29 0%, #9f0fff 100% );
  border-radius: 5px;
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
}

.about-card1::before {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  width: 5px;
  height: 100%;
  background: linear-gradient(-45deg, #f89b29 0%, #9f0fff 100% );
  z-index: -1;
  transition: all 0.5s cubic-bezier(0.23, 1, 0.320, 1);
}

.about-card1:hover::before {
  width: 100%;
}

.about-card1:hover {
  box-shadow: none;
}

.about-card1:hover .btn {
  color: #212121;
  background: #e8e8e8;
}

.about-content1 .btn:hover {
  outline: 2px solid #e8e8e8;
  background: transparent;
  color: #e8e8e8;
}

.about-content1 .btn:active {
  box-shadow: none;
}

/* ส่วนเมนู/เนื้อหาด้านล่าง */
.about-menu-grid {
  position: relative;
  z-index: 2;
  margin-top: -100px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  max-width: 1600px;
  margin-left: auto;
  margin-right: auto;
  padding: 40px 20px;
  margin-bottom: -60px;
}

/* การ์ดข่าว */
.about-card {
  position: relative;
  overflow: hidden;
  border-radius: 0px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  background-color: #fff;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
  height: 100%;
}

.about-card:hover {
  transform: translateY(-5px); 
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.about-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.about-card img:hover {
  transform: scale(1.05); 
}

.icon-overlay {
  position: absolute;
  bottom: 0px;
  right: 30px;
  transform: translate(-50%, -50%);
  color: white;
  opacity: 0;
  transition: opacity 0.3s ease;
  font-size: 20px;
}

.about-card:hover .icon-overlay {
  opacity: 1;
}

.about-card h3 {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 80%;
  padding: 10px 15px;
  color: white;
  text-align: left;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 22px;
  margin-left: 20px; 
}

/* สไตล์แอนิเมชันการเลื่อนขึ้นจากล่าง */
@keyframes fadeInFromBottom {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.about-card {
  animation: fadeInFromBottom 0.6s ease-out;
}

/* --- MEDIA QUERIES สำหรับมือถือ --- */
@media (max-width: 767px) {
  .about-menu-grid {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 20px 15px;
    margin-top: -50px;
    margin-bottom: 80px;
  }

  .about-card h3 {
    font-size: 18px;
    margin-left: 15px;
    padding: 8px 12px;
  }

  .about-card img {
    height: auto;
    max-height: 250px;
  }
}
