body,
html {
  font-family: "Sarabun", sans-serif;
  background-color: #f8f9fa;
  color: #343a40;
  line-height: 1.6;
  overflow-x: hidden; /* ป้องกัน horizontal scroll */
  width: 100%;
  position: relative;
  margin: 0;
  padding: 0;
}

/* Navbar */
.modern-navbar {
  background-image: linear-gradient(135deg, #005bea, #00c6fb);
  padding: 15px 0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
  font-weight: bold;
}

.logo-image {
  transition: transform 0.3s;
  width: 135px;
  height: 40px;
}

.logo-image:hover {
  transform: scale(1.05);
}

.navbar-nav .nav-link {
  color: white !important;
  font-weight: 500;
  font-size: 16px;
  padding: 10px 20px;
  border-radius: 5px;
  transition: all 0.3s ease;
  margin: 0 5px;
}

.navbar-nav .nav-link:hover {
  background-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}

.navbar-toggler {
  border: none;
  color: white;
}

/* Hero Section */
.hero-section {
  background-image: linear-gradient(135deg, #005bea, #00c6fb);
  padding: 100px 0;
  margin-bottom: 30px;
  position: relative;
}

.hero-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url('data:image/svg+xml;utf8,<svg width="100" height="100" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"><path d="M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z" fill="rgba(255,255,255,0.1)" fill-rule="evenodd"/></svg>');
  opacity: 0.4;
}

.btn-primary {
  background-color: #00c6fb;
  border-color: #00c6fb;
  padding: 10px 25px;
  font-weight: 500;
  box-shadow: 0 4px 15px rgba(0, 198, 251, 0.3);
  transition: all 0.3s ease;
}

.btn-primary:hover {
  background-color: #0056b3;
  border-color: #0056b3;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 86, 179, 0.4);
}

/* Section Header */
.section-header {
  margin-bottom: 2rem;
}

.section-header h2 {
  color: #2d4a8a;
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.section-header .lead {
  color: #6c757d;
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

.divider {
  height: 3px;
  width: 60px;
  background: linear-gradient(to right, #007bff, #00c6fb);
  margin: 1rem auto;
}

/* Filter Container - แก้ไขปัญหาที่ไม่แสดงถูกต้องในมือถือ */
.service-filter,
.portfolio-filter {
  margin-bottom: 2rem;
  width: 100%;
  overflow: visible;
}

.filter-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  padding: 0 5px;
}

.filter-btn {
  background-color: white;
  border: none;
  border-radius: 30px;
  padding: 8px 20px;
  font-size: 15px;
  font-weight: 500;
  color: #555;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  margin-bottom: 8px;
  flex: 0 0 auto;
}

.filter-btn.active,
.filter-btn:hover {
  background: linear-gradient(90deg, #007bff, #00c6fb);
  color: white;
  box-shadow: 0 4px 10px rgba(0, 123, 255, 0.25);
}

/* Service Card */
.service-card {
  background-color: white;
  border-radius: 15px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
  padding: 25px 20px;
  height: 100%;
  display: flex;
  flex-direction: column;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.service-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
}

/* Service Icon */
.service-icon {
  font-size: 2.5rem;
  width: 80px;
  height: 80px;
  background-color: #e6f5ff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  color: #007bff;
}

.service-icon i {
  background: linear-gradient(135deg, #007bff, #00c6fb);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.service-icon.premium {
  background: linear-gradient(135deg, #f9f9b9, #ffee97);
}

.service-badge {
  position: absolute;
  top: 15px;
  right: 15px;
  background: linear-gradient(90deg, #ff9900, #ffcc00);
  color: white;
  padding: 3px 10px;
  font-size: 0.8rem;
  border-radius: 20px;
  font-weight: 500;
}

/* Service Title */
.service-card h3 {
  font-size: 1.25rem;
  color: #2d4a8a;
  font-weight: 600;
  margin-bottom: 1rem;
  text-align: center;
}

/* Service Details */
.service-details {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.service-price {
  display: flex;
  align-items: baseline;
}

.price-tag {
  color: #007bff;
  font-size: 1.8rem;
  font-weight: 700;
}

.price-period {
  color: #6c757d;
  font-size: 0.9rem;
  margin-left: 5px;
}

.service-time {
  color: #6c757d;
  font-size: 0.9rem;
}

.service-time i {
  margin-right: 5px;
}

/* Service Description */
.service-description {
  color: #555;
  font-size: 0.95rem;
  line-height: 1.5;
  flex-grow: 1;
  margin-bottom: 1rem;
}

/* Pricing Details */
.pricing-details {
  display: flex;
  flex-direction: column;
  margin-bottom: 1.5rem;
}

.pricing-item {
  font-size: 0.9rem;
  color: #555;
  margin-bottom: 0.4rem;
  position: relative;
  padding-left: 1rem;
}

.pricing-item::before {
  content: "•";
  position: absolute;
  left: 0;
  color: #007bff;
}

/* Service Button */
.btn-service {
  background: linear-gradient(90deg, #007bff, #00c6fb);
  color: white;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 0;
  border-radius: 50px;
  font-weight: 500;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  margin-top: auto;
}

.btn-service i {
  margin-left: 8px;
  transition: transform 0.3s;
}

.btn-service:hover {
  background: linear-gradient(90deg, #0062cc, #00a9fb);
  color: white;
  box-shadow: 0 5px 15px rgba(0, 123, 255, 0.25);
}

.btn-service:hover i {
  transform: translateX(5px);
}

/* Show All Services Button */
#showAllServices {
  background: linear-gradient(90deg, #007bff, #00c6fb);
  border: none;
  padding: 10px 25px;
  box-shadow: 0 4px 15px rgba(0, 123, 255, 0.2);
  transition: all 0.3s ease;
}

#showAllServices:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 123, 255, 0.3);
}

/* Portfolio Section */
.portfolio-section {
  background-color: #f8fafb;
  padding: 80px 0;
}

/* Portfolio Card */
.portfolio-card {
  background-color: white;
  border-radius: 15px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.06);
  height: 100%;
  overflow: hidden;
  transition: all 0.35s ease;
  position: relative;
}

.portfolio-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 35px rgba(0, 123, 255, 0.15);
}

.portfolio-img-container {
  position: relative;
  width: 100%;
  padding-bottom: 66%;
  overflow: hidden;
  border-radius: 8px 8px 0 0;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
}

.portfolio-img-container img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

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

.portfolio-img-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.6));
  opacity: 0;
  transition: opacity 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.portfolio-card:hover .portfolio-img-overlay {
  opacity: 1;
}

.view-project {
  color: white;
  background: rgba(0, 123, 255, 0.8);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: scale(0);
  transition: all 0.3s ease;
}

.portfolio-card:hover .view-project {
  transform: scale(1);
}

.portfolio-card h4 {
  font-size: 1.1rem;
  color: #2d4a8a;
  font-weight: 600;
  margin-bottom: 0.5rem;
  transition: color 0.3s ease;
}

.portfolio-card:hover h4 {
  color: #007bff;
}

/* Text Blog Description */
.text-blog-description {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 14px;
  color: #555;
  margin-bottom: 15px;
  line-height: 1.5;
  min-height: 60px;
  word-break: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
}

/* Portfolio Badge */
.portfolio-badge {
  position: absolute;
  top: 15px;
  right: 15px;
  background: linear-gradient(90deg, #007bff, #00c6fb);
  color: white;
  padding: 3px 12px;
  font-size: 0.7rem;
  border-radius: 20px;
  font-weight: 500;
  box-shadow: 0 3px 10px rgba(0, 123, 255, 0.2);
  z-index: 1;
}

/* Portfolio Card Structure */
.portfolio-card .p-3 {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 18px !important;
  gap: 8px;
}

.portfolio-card .mt-3 {
  margin-top: auto !important;
  padding-top: 12px;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.portfolio-card .badge {
  display: inline-block;
  margin-bottom: 4px;
}

/* Contact Cards */
.contact-card {
  background-color: white;
  border-radius: 12px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  max-width: 100%;
  overflow: hidden;
  box-sizing: border-box;
  height: 100%;
}

.contact-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.contact-card a {
  text-decoration: none;
  color: inherit;
  display: block;
  padding: 25px;
  height: 100%;
}

.contact-card-header {
  text-align: center;
  margin-bottom: 15px;
}

.contact-card-header h3 {
  margin-top: 15px;
  font-size: 20px;
  font-weight: 600;
  color: #333;
}

.contact-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  color: white;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.facebook-color {
  background: linear-gradient(135deg, #3b5998, #2652af);
}

.line-color {
  background: linear-gradient(135deg, #06c755, #04b349);
}

.discord-color {
  background: linear-gradient(135deg, #7289da, #5773c9);
}

.contact-card-body {
  text-align: center;
}

.contact-card-body p {
  font-size: 14px;
  color: #777;
  margin-bottom: 15px;
}

.contact-profile {
  display: flex;
  flex-direction: column;
  margin-top: 20px;
}

.profile-name {
  font-weight: 600;
  color: #444;
  margin-bottom: 8px;
  font-size: 16px;
}

.contact-action {
  display: inline-block;
  padding: 8px 20px;
  background: linear-gradient(135deg, #005bea, #00c6fb);
  color: white;
  border-radius: 30px;
  font-size: 14px;
  font-weight: 500;
  margin-top: 10px;
  transition: all 0.3s ease;
}

.contact-card:hover .contact-action {
  transform: scale(1.05);
  box-shadow: 0 5px 15px rgba(0, 108, 251, 0.3);
}

/* Footer */
.footer {
  background-color: #1a2e4c;
  color: #f8f9fa;
  width: 100%;
  overflow: hidden;
}

.footer-top {
  padding: 60px 0 30px;
}

.footer-bottom {
  background-color: #152440;
  padding: 15px 0;
}

.footer-info img {
  margin-bottom: 20px;
}

.footer-info p {
  color: #c9d1d9;
  line-height: 1.6;
}

.social-links a {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 38px;
  height: 38px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  color: #fff;
  transition: all 0.3s ease;
  text-decoration: none;
}

.social-links a:hover {
  background: #007bff;
  transform: translateY(-3px);
}

.footer-heading {
  font-size: 1.2rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 10px;
  position: relative;
}

.footer-divider {
  width: 50px;
  height: 2px;
  background-image: linear-gradient(90deg, #007bff, #00c6fb);
  margin-bottom: 20px;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  padding: 8px 0;
}

.footer-links a {
  color: #c9d1d9;
  text-decoration: none;
  transition: all 0.3s ease;
}

.footer-links a:hover {
  color: #00c6fb;
  margin-left: 5px;
}

.contact-info p {
  margin-bottom: 12px;
  display: flex;
  align-items: center;
}

.contact-info i {
  width: 25px;
  color: #007bff;
  font-size: 0.9rem;
}

.footer-bottom p {
  color: #abb4bc;
  font-size: 0.9rem;
  margin: 0;
}

/* Cookie Consent */
.cookie-consent {
  position: fixed;
  bottom: -100%;
  left: 0;
  right: 0;
  background-color: #fff;
  box-shadow: 0 -5px 30px rgba(0, 0, 0, 0.15);
  z-index: 9999;
  padding: 20px;
  transition: bottom 0.5s ease;
}

.cookie-consent.show {
  bottom: 0;
}

.cookie-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.cookie-header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cookie-icon {
  color: #005bea;
  font-size: 24px;
  background: linear-gradient(135deg, #005bea, #00c6fb);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.cookie-header h5 {
  font-weight: 600;
  color: #2d4a8a;
  margin: 0;
}

.cookie-consent p {
  margin: 0;
  color: #555;
  font-size: 14px;
}

.cookie-link {
  color: #005bea;
  text-decoration: underline;
  margin: 0 4px;
}

.cookie-buttons {
  display: flex;
  gap: 15px;
  margin-top: 5px;
}

.btn-accept,
.btn-decline {
  padding: 8px 20px;
  border-radius: 30px;
  font-weight: 500;
  font-size: 14px;
  cursor: pointer;
  border: none;
  transition: all 0.3s ease;
}

.btn-accept {
  background: linear-gradient(135deg, #005bea, #00c6fb);
  color: white;
  box-shadow: 0 4px 15px rgba(0, 198, 251, 0.3);
}

.btn-accept:hover {
  box-shadow: 0 6px 20px rgba(0, 86, 179, 0.4);
  transform: translateY(-2px);
}

.btn-decline {
  background-color: #f8f9fa;
  color: #555;
  border: 1px solid #ddd;
}

.btn-decline:hover {
  background-color: #eaeaea;
}

/* Lightbox Modal */
.lightbox-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.lightbox-content {
  position: relative;
  max-width: 90%;
  max-height: 90%;
}

.lightbox-content img {
  max-width: 100%;
  max-height: 80vh;
  display: block;
  margin: 0 auto;
  box-shadow: 0 5px 25px rgba(0, 0, 0, 0.2);
}

.lightbox-content p {
  color: white;
  text-align: center;
  margin-top: 15px;
}

.lightbox-close {
  position: absolute;
  top: -40px;
  right: 0;
  font-size: 30px;
  color: white;
  cursor: pointer;
}

/* Media Queries */
@media (max-width: 992px) {
  .service-icon {
    width: 70px;
    height: 70px;
    font-size: 2.2rem;
  }

  .service-card h3 {
    font-size: 1.2rem;
  }

  .price-tag {
    font-size: 1.6rem;
  }

  .footer-top {
    padding: 40px 0 20px;
  }

  .footer-heading {
    margin-top: 20px;
  }
}

@media (max-width: 768px) {
  .section-header h2 {
    font-size: 2rem;
  }

  .filter-btn {
    padding: 7px 15px;
    font-size: 14px;
  }

  .service-card {
    padding: 20px 15px;
  }

  .service-icon {
    width: 65px;
    height: 65px;
    font-size: 2rem;
    margin-bottom: 1.2rem;
  }

  .service-card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.8rem;
  }

  .price-tag {
    font-size: 1.5rem;
  }

  .service-description {
    font-size: 0.9rem;
  }

  .pricing-item {
    font-size: 0.85rem;
  }

  .btn-service {
    padding: 8px 0;
    font-size: 0.9rem;
  }

  .portfolio-img-container {
    padding-bottom: 75%;
  }

  .portfolio-card .p-3 {
    padding: 15px !important;
  }
}

@media (max-width: 576px) {
  .section-header h2 {
    font-size: 1.8rem;
  }

  /* แก้ไข Filter Container สำหรับมือถือ */
  .filter-container {
    gap: 6px;
    justify-content: center;
  }

  .filter-btn {
    padding: 6px 12px;
    font-size: 13px;
    margin: 0 2px 6px 2px;
  }

  .service-icon {
    width: 60px;
    height: 60px;
    font-size: 1.8rem;
    margin-bottom: 1rem;
  }

  .service-card h3 {
    font-size: 1rem;
  }

  .price-tag {
    font-size: 1.4rem;
  }

  .price-period,
  .service-time {
    font-size: 0.8rem;
  }

  .service-description {
    font-size: 0.85rem;
    line-height: 1.4;
    margin-bottom: 0.8rem;
  }

  /* แก้ไข text-blog-description บนมือถือ */
  .text-blog-description {
    font-size: 13px;
    margin-bottom: 8px;
    min-height: 58px;
    max-height: 58px;
  }

  /* แก้ไข mb-2 สำหรับมือถือ */
  .mb-2 {
    margin-bottom: 0.3rem !important;
  }

  /* แก้ไขส่วนหัวของ portfolio card บนมือถือ */
  .portfolio-card h4 {
    font-size: 16px;
    line-height: 1.3;
    margin-bottom: 0.4rem !important;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .portfolio-card .badge {
    padding: 0.25em 0.5em;
    font-size: 0.75em;
    margin-right: 0.3rem;
    margin-bottom: 0.3rem;
  }

  .portfolio-card .p-3 {
    padding: 12px !important;
    gap: 3px;
  }

  .portfolio-card .mt-3 {
    padding-top: 8px;
  }

  /* เพิ่มการกำหนดรูปแบบ portfolio-img-container */
  .portfolio-img-container {
    padding-bottom: 80%;
  }
}

/* สไตล์สำหรับส่วนแสดงสถานะงาน - ปรับปรุงให้แสดงผลดีบนมือถือ */
.order-status-section {
  background-color: #f8f9fa;
  padding: 60px 0;
}

.order-status-container {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
  background-color: white;
  margin: 0 auto;
}

.order-status-iframe {
  width: 100%;
  height: 450px;
  border: none;
  max-width: 100%;
}

/* เพิ่มปุ่มสำหรับ zoom in/out บนมือถือ */
.sheet-controls {
  display: flex;
  justify-content: center;
  margin-bottom: 15px;
  gap: 10px;
}

.zoom-btn {
  background: linear-gradient(90deg, #007bff, #00c6fb);
  color: white;
  border: none;
  border-radius: 50px;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 6px rgba(0, 123, 255, 0.2);
}

.zoom-btn:hover {
  box-shadow: 0 4px 10px rgba(0, 123, 255, 0.3);
  transform: translateY(-2px);
}

.mobile-notice {
  display: none;
  text-align: center;
  font-size: 14px;
  color: #666;
  margin-bottom: 15px;
}

/* สำหรับมือถือขนาดเล็ก */
@media (max-width: 576px) {
  .order-status-iframe {
    height: 400px;
  }

  .mobile-notice {
    display: block;
  }
}
.mobile-sheet-link {
  display: none;
}

@media (max-width: 576px) {
  .mobile-sheet-link {
    display: block;
    margin-top: 15px;
  }
}
