:root {
  --primary-color: #0053b6;
  --primary-gradient: linear-gradient(135deg, #0053b6 0%, #2a7de1 100%);
  --secondary-color: #f8f9fa;
  --accent-color: #ffc107;
  --text-dark: #2d3436;
  --text-light: #636e72;
  --white: #ffffff;
  --border-radius-lg: 24px;
  --border-radius-md: 16px;
  --card-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.08);
  --card-shadow-hover: 0 20px 50px -10px rgba(0, 0, 0, 0.12);
  --transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

body {
  font-family: "IBM Plex Sans Thai", sans-serif;
  color: var(--text-dark);
  background-color: #fcfcfc; 
  line-height: 1.6;
  width: 100%;
}

html {
  overflow-x: hidden;
  width: 100%;
}

h1,h2,h3,h4,h5,h6 {
  font-weight: 700;
  letter-spacing: -0.5px;
}

a {
  text-decoration: none;
  transition: var(--transition);
}

/* =========================================
   2. PRELOADER (CUTE & MODERN)
   ========================================= */
.loading-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #ffffff;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.loading-container.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.cute-loader {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
}

.bag-wrapper {
  position: relative;
  width: 60px;
  height: 70px;
  animation: bounceBag 0.6s infinite alternate cubic-bezier(0.5, 0.05, 1, 0.5);
}

.bag-body {
  width: 100%;
  height: 100%;
  background-color: #e0ac69;
  border-radius: 8px 8px 4px 4px;
  position: relative;
  box-shadow: inset -5px -5px 0 rgba(0,0,0,0.1);
}

.bag-handle {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  width: 30px;
  height: 20px;
  border: 4px solid #c99653;
  border-bottom: none;
  border-radius: 15px 15px 0 0;
}

/* Cute Face */
.bag-face {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.bag-face .eye {
  width: 6px;
  height: 6px;
  background-color: #5d4037;
  border-radius: 50%;
  display: inline-block;
  margin: 0 4px;
  animation: blinkEye 3s infinite;
}

.bag-face .mouth {
  width: 12px;
  height: 6px;
  border-bottom: 2px solid #5d4037;
  border-radius: 0 0 10px 10px;
}

.loading-dots span {
  font-size: 24px;
  color: var(--primary-color);
  animation: dotsFade 1.4s infinite ease-in-out both;
}

.loading-dots span:nth-child(1) { animation-delay: -0.32s; }
.loading-dots span:nth-child(2) { animation-delay: -0.16s; }

/* Animations */
@keyframes bounceBag {
  from { transform: translateY(0); }
  to { transform: translateY(-15px); }
}

@keyframes blinkEye {
  0%, 90%, 100% { transform: scaleY(1); }
  95% { transform: scaleY(0.1); }
}

@keyframes dotsFade {
  0%, 80%, 100% { opacity: 0; }
  40% { opacity: 1; }
}

/* =========================================
   3. HERO SECTION (MODERN SOFTENED)
   ========================================= */
.hero-section {
  position: relative;
  /* Soft overlay gradient */
  background: linear-gradient(135deg, rgba(0, 48, 107, 0.92) 0%, rgba(0, 83, 182, 0.85) 100%), 
              url("../img/HEADER-BACKGROUND.webp") center/cover no-repeat fixed;
  min-height: 700px;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 100px 0 140px 0;
  /* Removed sharp polygon clip-path, replaced with soft curve at bottom */
  border-radius: 0 0 60px 60px;
  margin-bottom: 2rem;
  box-shadow: 0 10px 30px rgba(0, 83, 182, 0.15);
}

@media (max-width: 768px) {
  .hero-section {
    border-radius: 0 0 30px 30px;
    padding: 100px 0 80px 0;
    min-height: auto;
  }
}

/* Ambient Animations */
.hero-section::before {
  content: '';
  position: absolute;
  top: -100px;
  right: -50px;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 70%);
  border-radius: 50%;
  filter: blur(40px);
  animation: floatBubbleOne 20s ease-in-out infinite;
}

@keyframes floatBubbleOne {
  0% { transform: translate(0px, 0px); }
  50% { transform: translate(30px, -30px); }
  100% { transform: translate(0px, 0px); }
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 900px;
  margin: 0 auto;
}

.hero-title {
  font-size: 4rem;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  text-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.hero-subtitle {
  font-size: 1.25rem;
  font-weight: 300;
  margin-bottom: 2.5rem;
  opacity: 0.95;
  line-height: 1.8;
}

.highlight {
  color: var(--accent-color);
  position: relative;
  display: inline-block;
}

/* Feature Badges in Hero */
.hero-features {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
}

.feature-badge {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  padding: 8px 20px;
  border-radius: 50px;
  color: var(--white);
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Buttons */
.btn-hero-primary {
  background: var(--white);
  color: var(--primary-color);
  padding: 14px 40px;
  border-radius: 50px;
  font-weight: 700;
  box-shadow: 0 10px 20px rgba(0,0,0,0.1);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 2px solid var(--white);
}

.btn-hero-primary:hover {
  background: transparent;
  color: var(--white);
  transform: translateY(-5px);
  box-shadow: 0 20px 30px rgba(0,0,0,0.2);
}

.btn-hero-secondary {
  background: rgba(255,255,255,0.1);
  color: var(--white);
  padding: 14px 40px;
  border-radius: 50px;
  font-weight: 600;
  backdrop-filter: blur(5px);
  border: 2px solid rgba(255, 255, 255, 0.3);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-hero-secondary:hover {
  background: var(--white);
  color: var(--primary-color);
  transform: translateY(-5px);
}

/* LINE Button Variant (Green) */
.btn-hero-line {
  background-color: #06C755;
  color: var(--white);
  padding: 14px 40px;
  border-radius: 50px;
  font-weight: 600;
  border: 2px solid #06C755;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 10px 20px rgba(6, 199, 85, 0.2);
  transition: var(--transition);
}

.btn-hero-line:hover {
  background-color: #05a546;
  border-color: #05a546;
  color: var(--white);
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(6, 199, 85, 0.3);
}

/* =========================================
   4. PRODUCT GRID (SOFTER CARDS)
   ========================================= */
.section-products {
  padding-top: 2rem;
}

.product-card {
  background: var(--white);
  border-radius: 0.5rem;
  overflow: hidden;
  box-shadow: var(--card-shadow);
  transition: var(--transition);
  height: 100%;
  border: 1px solid #f0f0f0;
}

/* .product-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--card-shadow-hover);
} */

.product-card .img-wrapper {
  background: #f8faff;
  /* padding: 30px; */
  display: flex;
  align-items: center;
  justify-content: center;
  /* height: 240px; */
  position: relative;
  overflow: hidden;
}

.product-card img {
  /* max-height: 180px; */
  transition: transform 0.5s ease;
  filter: drop-shadow(0 10px 15px rgba(0,0,0,0.1));
}

/* .product-card:hover img {
  transform: scale(1.1) rotate(2deg);
} */

.product-card .card-body {
  padding: 0.5rem !important;
  background: var(--white);
}

.product-card h5 {
  font-size: 1.1rem;
  color: var(--text-dark);
  margin: 0;
}

.separator-line {
  height: 5px;
  width: 70px;
  background: var(--accent-color);
  border-radius: 10px;
  margin: 10px;
}

/* =========================================
   5. CTA SECTION (FLOATING)
   ========================================= */
.cta-section {
  position: relative;
  background: var(--primary-gradient) !important;
  border-radius: 40px; /* Floating look */
  margin: 80px auto;
  width: 90%; /* Indent nicely */
  max-width: 1200px;
  box-shadow: 0 25px 50px -12px rgba(0, 83, 182, 0.35);
}
@media (max-width: 992px) {
  .cta-section { width: 100%; border-radius: 1rem !important; margin: 40px 0; }
  .phone-pd{
    padding: 1rem;
  }
  .separator-line{
    margin: 16px;
  }
}

/* =========================================
   6. PACKAGE CARDS & REVIEWS
   ========================================= */
.package-card {
  border: none !important;
  border-radius: var(--border-radius-lg) !important;
  padding: 2.5rem !important;
  box-shadow: var(--card-shadow) !important;
  transition: var(--transition);
  background: var(--white);
}

.package-card:hover {
  transform: translateY(-15px);
  box-shadow: var(--card-shadow-hover) !important;
}

/* Override popular card border */
.package-card[style*="border"] {
  border: 2px solid var(--primary-color) !important;
  transform: scale(1.05); /* Slight popup for popular item */
  z-index: 10;
}
.package-card[style*="border"]:hover {
  transform: scale(1.05) translateY(-10px);
}

.btn-outline-primary {
  border-radius: 50px;
  border-width: 2px;
  padding: 10px 20px;
  font-weight: 600;
}

.btn-primary {
  border-radius: 50px;
  padding: 10px 20px;
  font-weight: 600;
  background: var(--primary-gradient);
  border: none;
}

/* Review Cards */
.review-card {
  background: var(--white) !important;
  border: 1px solid #eee !important;
  border-radius: var(--border-radius-md) !important;
  box-shadow: 0 5px 20px rgba(0,0,0,0.03);
  padding: 2rem !important;
}

/* Animations Helper */
.animate-up {
  opacity: 0;
  animation: slideUpFade 0.8s ease-out forwards;
}
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.3s; }
.delay-3 { animation-delay: 0.5s; }

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

/* =========================================
   7. SWIPER CONTROLS
   ========================================= */
.swiper-reviews {
  padding-bottom: 50px !important;
  overflow: hidden; /* ป้องกันไม่ให้ทะลุขอบจอ โดยเฉพาะในมือถือ */
}

.swiper-button-prev,
.swiper-button-next {
  color: var(--primary-color) !important;
  background: rgba(255, 255, 255, 0.9) !important;
  width: 50px !important;
  height: 50px !important;
  border-radius: 50% !important;
  box-shadow: 0 10px 20px rgba(0,0,0,0.1);
  transition: var(--transition);
}
.swiper-button-prev:after,
.swiper-button-next:after {
  font-size: 20px !important;
  font-weight: bold;
}
.swiper-button-prev:hover,
.swiper-button-next:hover {
  background: var(--primary-color) !important;
  color: white !important;
  transform: scale(1.1);
}

.swiper-pagination-bullet-active {
  background: var(--primary-color) !important;
  width: 20px;
  border-radius: 10px;
  transition:all 0.3s;
}

/* =========================================
   8. FOOTER
   ========================================= */
.FOOTER-ALL {
  background-color: #032c70; /* keep the dark blue but maybe softer */
  color: var(--white);
  padding-top: 80px;
  margin-top: 80px;
  border-radius: 60px 60px 0 0; /* Modern curved top for footer */
  position: relative;
  padding-bottom: 30px;
  box-shadow: 0 -10px 30px rgba(0,0,0,0.05); /* Slight shadow to separate */
}

.show-line{
  width: 100%;
  margin-top: 1rem;
  background-color: #06C755;
  color: var(--white);
  border-radius: 50px;
  padding: 10px;
  font-weight: 600;
  border: 2px solid #06C755;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-align: center;
  box-shadow: 0 10px 20px rgba(6, 199, 85, 0.2);
  justify-content: center;
}

.step-container {
    position: relative;
    z-index: 1;
    text-align: center;
}

/* เส้นเชื่อมแนวนอน */
.step-line {
    position: absolute;
    top: 35px; /* กึ่งกลางของวงกลม (70px / 2) */
    left: 12%;
    width: 76%;
    height: 4px;
    background: #e9ecef;
    z-index: -1;
    border-radius: 2px;
}

/* เอฟเฟกต์สีวิ่งบนเส้น (ตัวเลือกเสริมความทันสมัย) */
.step-line::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background: var(--primary-color, #0053b6);
    animation: fillLine 4s ease-in-out infinite;
}

@keyframes fillLine {
    0% { width: 0%; opacity: 1; }
    80% { width: 100%; opacity: 1; }
    100% { width: 100%; opacity: 0; }
}

/* วงกลมตัวเลข */
.step-circle {
    width: 70px;
    height: 70px;
    background-color: var(--primary-color, #0053b6);
    color: #ffffff;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    font-weight: 700;
    box-shadow: 0 8px 20px rgba(0, 83, 182, 0.2);
    border: 5px solid #ffffff;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    margin-bottom: 10px;
}

.step-item:hover .step-circle {
    transform: scale(1.15) translateY(-5px);
    background-color: #ffc107; /* เปลี่ยนเป็นสีเหลืองเมื่อโฮเวอร์ */
    color: #212529;
    border-color: #fffde7;
    box-shadow: 0 10px 25px rgba(255, 193, 7, 0.4);
}
.portfolio-slider {
    width: 100%;
    height: auto;
    padding-top: 10px;
    padding-bottom: 50px;
}

.portfolio-slider .swiper-slide {
    display: flex;
    justify-content: center;
    align-items: center;
}

.portfolio-slider .portfolio-item {
    width: 100%;
    margin: 0;
    box-shadow: none;
    border: 1px solid #e2e8f0;
}

.portfolio-slider .portfolio-img-container {
    height: 250px;
    width: 100%;
    border-radius: unset !important;

}

.portfolio-slider .portfolio-img-container img {
    height: 100%;
    width: 100%;
    object-fit: cover;
    border-radius: unset !important;
}

.portfolio-slider .swiper-pagination-bullet {
    background-color: var(--primary-color);
    width: 10px;
    height: 10px;
    opacity: 0.5;
}

.portfolio-slider .swiper-pagination-bullet-active {
    opacity: 1;
}

.portfolio-slider .swiper-button-next,
.portfolio-slider .swiper-button-prev {
    color: var(--primary-dark);
    width: 44px;
    height: 44px;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s ease;
}

.portfolio-slider .swiper-button-next:hover,
.portfolio-slider .swiper-button-prev:hover {
    background-color: white;
    color: var(--primary-color);
}

.portfolio-slider .swiper-button-next::after,
.portfolio-slider .swiper-button-prev::after {
    font-size: 1.2rem;
    font-weight: bold;
}
.portfolio-slider {
    padding: 80px 0;
    background: var(--bg-light);
    overflow: hidden;
}

.portfolio-slider .section-title {
    color: #333;
}

.slider-container {
    display: flex;
    width: max-content;
    animation: scroll-infinite 20s linear infinite;
    margin-top: 20px;
}

.slide-item {
    flex: 0 0 auto;
    width: 300px;
    margin: 0 15px;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.slide-item img {
    width: 100%;
    height: auto;
    display: block;
}

.slide-item:hover {
    transform: scale(1.05);
    z-index: 10;
}

@keyframes scroll-infinite {
    0% { 
        transform: translateX(0); 
    }
    100% { 
        transform: translateX(-50%); 
    }
}

/* การตั้งค่าสำหรับมือถือ (Mobile Responsive) */
@media (max-width: 767px) {
    .step-item {
        display: flex;
        align-items: flex-start;
        text-align: left;
        padding: 0 15px;
    }
    
    .step-circle {
        min-width: 55px;
        width: 55px;
        height: 55px;
        font-size: 1.4rem;
        border-width: 3px;
        margin-right: 20px;
        margin-bottom: 0;
    }

    .step-content {
        padding-top: 5px;
    }
    
    /* สร้างเส้นเชื่อมแนวตั้งแทนแนวนอนสำหรับมือถือ */
    .step-item:not(:last-child) {
        position: relative;
    }
    .step-item:not(:last-child)::after {
        content: '';
        position: absolute;
        top: 60px;
        left: 42px; /* กึ่งกลางวงกลม */
        width: 2px;
        height: calc(100% - 40px);
        background: #e9ecef;
        z-index: -1;
    }
}

/* Footer Responsive */
@media (max-width: 768px) {
  /* GLOBAL MOBILE FIXES */
  body {
    font-size: 15px; /* Slightly smaller base font */
  }
  
  .container {
    padding-left: 20px;
    padding-right: 20px;
  }

  /* HERO MOBILE */
  .hero-section {
    border-radius: 0 0 30px 30px;
    padding: 80px 0 60px 0;
    min-height: auto;
    text-align: center;
  }
  
  .hero-title {
    font-size: 2.2rem; /* Much smaller than 4rem */
    margin-bottom: 1rem;
    line-height: 1.2;
  }
  
  .hero-subtitle {
    font-size: 1rem;
    margin-bottom: 2rem;
    padding: 0 10px;
  }

  .hero-features {
    gap: 10px;
    justify-content: center;
  }
  
  .feature-badge {
    font-size: 0.8rem;
    padding: 6px 14px;
  }
  
  .btn-hero-primary, 
  .btn-hero-secondary,
  .btn-hero-line {
    padding: 12px 30px;
    width: 100%; /* Full width buttons on mobile */
    justify-content: center;
    font-size: 1rem;
  }

  /* PRODUCTS MOBILE */
  .product-card .img-wrapper {
    padding: 1px; /* Reduce padding to show larger image */
    /* height: 160px; */
    height: 100%;
  }
  .product-card img {
    /* max-height: 120px; */
  }
  .product-card{
    height: unset !important;
  }
  .product-card .card-body {
    padding: 7px !important;
  }
  .product-card h5 {
    font-size: 0.95rem; /* Smaller title */
  }

  /* PACKAGE CARDS MOBILE */
  .package-card {
    padding: 1.5rem !important;
    margin-bottom: 1rem;
  }
  
  /* REVIEWS MOBILE */
  .review-card {
    padding: 1.5rem !important;
    height: auto; /* Let it grow naturally */
    /* min-height: 300px; */
  }

  /* FOOTER & CTA MOBILE */
  .FOOTER-ALL {
    text-align: center;
    border-radius: 30px 30px 0 0;
    padding-top: 50px;
  }
  .FOOTER-ALL-TEXT-START {
    text-align: center !important;
  }
  .FOOTER-ALL-TEXT-START-DIV {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px !important;
  }
  .cta-section {
    padding: 2rem 1rem !important;
    margin: 40px 0 !important;
    width: 100% !important;
    margin-top: 1px !important;
  }
  .cta-section img {
    display: none;
  }
  
  /* HIDE ELEMENTS */
  .swiper-button-prev,
  .swiper-button-next {
    display: none;
  }
}

/* Back To Top Button */
.btn-back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background-color: var(--primary-color);
  color: white;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 24px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.2);
  z-index: 99;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  transform: translateY(20px);
}
.btn-back-to-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.btn-back-to-top:hover {
  background-color: var(--accent-color);
  color: var(--text-dark);
  transform: translateY(-5px);
}



