/* =====================================
   HERO SECTION
   ===================================== */

.hero {
  color: #36a0f4;
  height: 80vh;
  display: flex;
  padding-top: 60px;
  justify-content: center;
  text-align: center;
  color: rgb(0, 0, 0);
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* Logo bounce */
.hero-logo {
  max-width: 250px;
  height: auto;
  animation: bounceIn 1.8s ease forwards;
}

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="stars" x="0" y="0" width="20" height="20" patternUnits="userSpaceOnUse"><circle cx="10" cy="10" r="1" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23stars)"/></svg>');
  animation: float 20s ease-in-out infinite;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  padding: 0 2rem;
}

.hero p {
  font-size: 1.1rem;
  margin-bottom: 3rem;
  opacity: 0.9;
  line-height: 1.8;
}

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="stars" x="0" y="0" width="20" height="20" patternUnits="userSpaceOnUse"><circle cx="10" cy="10" r="1" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23stars)"/></svg>');
  animation: float 20s ease-in-out infinite;
}

.anniversary-badge {
  display: inline-block;
  position: relative;
  margin-bottom: 2rem;
  animation: 2s ease-in-out 0s infinite normal none running pulse;
}

.stars-circle {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 300px;
  height: 300px;
}

.anniversary-text {
  font-family: "Kanit", sans-serif;
  font-size: 4.5rem;
  font-weight: bold;
  color: #ffffff;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
  font-style: italic;
  margin-bottom: 0.5rem;
  animation: bounceIn 2s ease forwards;
}

.hero-description {
  font-family: "Kanit", sans-serif;
  font-size: 1.2em;
  font-weight: bold;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
  color: #ffffff;
  animation: fadeUp 2.2s ease forwards;
}

.hero-description1 {
  font-size: 1.4rem;
  margin-bottom: 2rem;
  line-height: 1.8;
}

/* Services Section */

.services {
  padding: 80px 0;
  background: #f8f9fa;
}

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

.imabout-image {
  overflow: hidden; /* ซ่อนส่วนเกิน */
  width: 100%;
}

.imimage-slider-loop {
  display: flex;
  width: max-content; /* ขยายตามจำนวนรูป */
  animation: scroll 30s linear infinite;
}

.imimage-slider-loop img {
  height: 500px;
  border-radius: 25px;
  margin-left: 10px;
  flex-shrink: 0; /* กันไม่ให้หด */
}

.imimage-slider {
  display: inline-flex;
  animation: slideRight 10s linear infinite;
  gap: 100px;
}

.imimage-slider img {
  width: 300px;
  height: 400px;
  border-radius: 25px;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

/* About Section */

.about {
  padding: 80px 0;
}

.about-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: center;
}

.about-text h2 {
  font-size: 32px;
  margin-bottom: 20px;
  color: #1a1a2e;
}

.about-text p {
  margin-bottom: 20px;
  font-size: 16px;
  line-height: 1.8;
}

.about-features {
  list-style: none;
  margin-top: 30px;
}

.about-features li {
  padding: 10px 0;
  padding-left: 25px;
  position: relative;
}

.about-features li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #4caf50;
  font-weight: bold;
}

.about-image img {
  width: 100%;
  width: 500px;
  height: 300px;
  object-fit: cover;
  border-radius: 15px;
  padding-left: 70px;
}

/* Services Grid */

.section-title {
  text-align: center;
  margin-bottom: 50px;
}

.section-title h2 {
  font-size: 32px;
  color: #1a1a2e;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-bottom: 50px;
}

.service-card {
  background: white;
  padding: 30px;
  border-radius: 15px;
  text-align: center;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.service-card:hover {
  transform: translateY(-5px);
}

.service-card img {
  width: 100%;
  height: 200px;
  object-fit: contain;
  margin-bottom: 20px;
}

.service-card h3 {
  font-size: 20px;
  margin-bottom: 15px;
  color: #1a1a2e;
}

.service-card1 {
  background: white;
  padding: 30px;
  border-radius: 15px;
  text-align: center;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
  max-width: 400px;
  margin: 0 auto;
}

.service-card1:hover {
  transform: translateY(-5px);
}

.service-card1 img {
  width: 100%;
  height: 200px;
  object-fit: contain;
  margin-bottom: 20px;
}

.service-card1 h3 {
  font-size: 20px;
  margin-bottom: 15px;
  color: #1a1a2e;
}

/* Contact Section */

.contact-section {
  background: linear-gradient(135deg, #1a1a2e, #16213e);
  padding: 80px 0;
  color: white;
}

.section-title1 {
  font-size: 32px;
  margin-bottom: 50px;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
}

.contact-item {
  text-align: center;
  padding: 20px;
}

.contact-icon {
  color: rgb(255, 255, 255);
  width: 60px;
  height: 60px;
  background: linear-gradient(
    135deg,
    rgb(54, 160, 244) 60%,
    rgb(37, 131, 255) 100%
  );
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-size: 24px;
}

.contact-item h4 {
  font-size: 18px;
  margin-bottom: 10px;
}

.contact-item p {
  opacity: 0.8;
}

/* =====================================
   Responsive Disign
===================================== */

@media (min-width: 1024px) {
  .hero-description {
    font-size: 16px;
  }

  .hero {
    height: 100vh;
    display: flex;
    padding-top: 60px;
    justify-content: center;
    text-align: center;
  }
  .about-content {
    gap: 30px;
  }
}

@media (max-width: 768px) {
  .hero {
    padding: 120px 20px 40px;
    min-height: 80vh;
  }

  .anniversary-badge img {
    width: 160px;
    height: 160px;
  }

  .anniversary-text {
    font-size: 24px;
  }

  .hero-description {
    font-size: 14px;
  }

  .about-content {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .about-image {
    order: -1;
  }

  .about-image img {
    margin: 0;
  }

  .services-grid {
    grid-template-columns: 1fr;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }

  .imimage-slider-loop img {
    width: 250px;
    height: 180px;
  }

  .hero-description {
    font-size: 12px; /* เล็กลงเล็กน้อย */
    line-height: 1.8; /* เพิ่มช่องไฟให้อ่านง่าย */
    padding: 0 10px; /* มีระยะห่างขอบจอ */
  }
}

@media (max-width: 480px) {
  .hero {
    padding: 100px 15px 30px;
    height: 30vh;
  }

  .anniversary-text {
    font-size: 20px;
  }

  .hero-description {
    font-size: 13px;
  }

  .about-text h2 {
    font-size: 26px;
  }

  .section-title h2 {
    font-size: 26px;
  }

  .service-card {
    padding: 20px;
  }

  .service-card1 {
    padding: 20px;
  }

  .contact-item {
    padding: 15px;
  }

  .imimage-slider-loop img {
    width: 300px;
    max-height: 350px;
  }

  .about-image {
    text-align: center; /* จัดกึ่งกลาง */
  }

  .about-image img {
    display: inline-block; /* ใช้ inline-block ให้ text-align ทำงาน */
    max-width: 100%; /* ไม่เกินความกว้างจอ */
    height: auto; /* รักษาอัตราส่วน */
    border-radius: 8px; /* โค้งเล็กน้อย */
    padding-left: 0;
  }

  .hero-description {
    font-size: 11px;
    line-height: 1.9;
    padding: 0 8px;
  }
}

@media (max-width: 320px) {
  .hero-description {
    font-size: 12px;
  }

  .about-text h2 {
    font-size: 22px;
  }

  .section-title h2 {
    font-size: 22px;
  }
}

/* =====================================
   ANIMATIONS & KEYFRAMES
===================================== */

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-20px);
  }
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

@keyframes scroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%); /* เลื่อนครึ่งเดียวพอ เพราะเรามีรูปซ้ำ */
  }
}
