body {
  font-family: 'Kanit', sans-serif;
  line-height: 1.7;
  color: #333;
  margin: 0;
  padding: 0;
}

/* Contact Icon */
.contact-float .contact-icon img {
  width: 40px;
  height: 40px;
  max-width: 100%;
}

/* Hero Banner */
.hero {
  background: url('../image/banner.png') center/cover no-repeat;
  min-height: 70vh; /* Desktop / Tablet */
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  text-align: center;
  padding: 40px 20px;
}
.hero::after {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.4);
}
.hero .container {
  position: relative;
  z-index: 2;
  max-width: 900px; /* จำกัดความกว้าง */
}
.hero h1 {
  font-size: clamp(1.8rem, 5vw, 3rem);
  color: #fff;
  font-weight: 700;
  line-height: 1.3;
}
.hero p {
  font-size: clamp(1rem, 2.5vw, 1.3rem);
  color: #eee;
  margin-top: 15px;
  line-height: 1.6;
}

/* Responsive: มือถือเต็มจอ */
@media (max-width: 576px) {
  .hero {
    min-height: 100vh; /* เต็มจอมือถือ */
    padding: 20px 15px;
  }
  .hero h1 {
    font-size: 1.8rem; /* พอดีมือถือ */
  }
  .hero p {
    font-size: 1rem;
  }
}


/* Service Box */
.service-box {
  transition: transform 0.3s, box-shadow 0.3s;
  text-align: center;
}
.service-box:hover {
  transform: translateY(-8px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}
.service-box img {
  width: 100%;
  max-height: 220px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 15px;
}

/* Portfolio Thumbnail */
.portfolio-img,
.portfolio-detail-img {
  width: 100%;
  aspect-ratio: 4/3;       /* รักษาสัดส่วน 4:3 */
  object-fit: cover;       /* ครอบภาพโดยไม่บิดเบี้ยว */
  border-radius: 6px;      /* มุมโค้ง */
  max-width: 100%;         /* ป้องกันการหลุดขอบ */
  height: auto;            /* ให้ browser ปรับตามสัดส่วน */
}

/* Responsive สำหรับแท็บเล็ต (≤ 768px) */
@media (max-width: 768px) {
  .portfolio-img,
  .portfolio-detail-img {
    aspect-ratio: 16/9;   /* ขยายเป็นแนวกว้าง */
    border-radius: 8px;   /* มุมโค้งมากขึ้น */
  }
}

/* Responsive สำหรับมือถือ (≤ 480px) */
@media (max-width: 480px) {
  .portfolio-img,
  .portfolio-detail-img {
    aspect-ratio: 1/1;    /* บนมือถือทำเป็นสี่เหลี่ยมจัตุรัส */
    border-radius: 10px;  /* โค้งมากขึ้น */
  }
}

/* Footer */
.footer-qr {
  max-width: 120px;
  width: 100%;
  border-radius: 8px;
  margin-top: 10px;
}

/* Timeline */
.timeline-zigzag {
  position: relative;
  margin: 0 auto;
  padding: 20px 0;
  width: 90%;
}
.timeline-item {
  width: 50%;
  padding: 20px;
  position: relative;
}
.timeline-item.left { left: 0; text-align: right; }
.timeline-item.right { left: 50%; text-align: left; }
.timeline-content {
  background: #fff;
  border-radius: 10px;
  padding: 20px;
  position: relative;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}
.step-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #FFD700;
  color: #003366;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 15px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}
.timeline-zigzag::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 3px;
  background: #003366;
  transform: translateX(-50%);
}

/* Navbar */
.navbar {
  background: #fff;
  transition: all 0.3s ease;
}
.navbar .nav-link {
  color: #003366;
  transition: color 0.2s ease;
}
.navbar .nav-link:hover {
  color: #FFD700;
}
.navbar .dropdown-menu {
  border-radius: 8px;
  padding: 10px 0;
}
.navbar .dropdown-item:hover {
  background-color: #f8f9fa;
  color: #003366;
}

/* ========== Responsive Breakpoints ========== */
@media (max-width: 991px) {
  .timeline-item {
    width: 100%;
    left: 0 !important;
    text-align: left !important;
    margin-bottom: 20px;
  }
  .timeline-zigzag::before {
    display: none;
  }
}
@media (max-width: 576px) {
  .hero {
    min-height: 50vh;
    padding: 20px 10px;
  }
  .service-box img {
    max-height: 180px;
  }
}
