/* ===== DYNAMIC ENHANCEMENTS FOR YUTTANAART ===== */

/* --- Google Font Import (Sarabun - modern Thai font) --- */
@import url('https://fonts.googleapis.com/css2?family=Sarabun:wght@300;400;500;600;700&display=swap');

/* --- Root Variables --- */
:root {
  --primary: #c0392b;
  --primary-dark: #922b21;
  --primary-light: #e74c3c;
  --accent: #f39c12;
  --dark: #1a1a2e;
  --light-bg: #f8f9fa;
  --shadow-sm: 0 2px 15px rgba(0,0,0,0.08);
  --shadow-md: 0 8px 30px rgba(0,0,0,0.15);
  --shadow-lg: 0 20px 60px rgba(0,0,0,0.25);
  --transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== NAVBAR SCROLL EFFECT ===== */
.navbar.navbar-default {
  transition: var(--transition);
  border: none;
  z-index: 1000;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: rgba(255,255,255,0.97);
  box-shadow: 0 2px 15px rgba(0,0,0,0.08);
}

body {
  padding-top: 60px;
}

/* Navbar stays white always — no color change on scroll */

/* ===== HERO BANNER ===== */
#hero-banner {
  position: relative;
  overflow: hidden;
}

#hero-carousel .carousel-inner { height: 540px; }

#hero-carousel .hero-slide {
  height: 540px;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  position: relative;
  display: flex;
  align-items: center;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(10, 10, 30, 0.80) 0%,
    rgba(10, 10, 30, 0.55) 50%,
    rgba(192, 57, 43, 0.30) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px;
}

.hero-text {
  max-width: 560px;
}

.hero-text h1 {
  color: #fff !important;
  font-size: 42px;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 16px;
  text-shadow: 0 2px 20px rgba(0,0,0,0.4);
}

.hero-text p {
  color: rgba(255,255,255,0.88) !important;
  font-size: 18px;
  margin-bottom: 28px;
  line-height: 1.6;
}

.hero-btn {
  display: inline-block;
  background: linear-gradient(135deg, var(--primary), var(--accent)) !important;
  color: #fff !important;
  border: none;
  border-radius: 50px !important;
  padding: 14px 38px !important;
  font-size: 18px !important;
  font-weight: 600 !important;
  letter-spacing: 0.5px;
  box-shadow: 0 6px 25px rgba(192,57,43,0.45);
  transition: var(--transition) !important;
  text-decoration: none !important;
}

.hero-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 35px rgba(192,57,43,0.6) !important;
  color: #fff !important;
}

/* Carousel controls — override Bootstrap 3 defaults */
.carousel-control.hero-prev,
.carousel-control.hero-next {
  position: absolute !important;
  top: 50% !important;
  bottom: auto !important;
  width: 46px !important;
  height: 46px !important;
  margin-top: -23px;
  border-radius: 50% !important;
  background: rgba(255,255,255,0.2) !important;
  text-shadow: none !important;
  opacity: 1 !important;
  transition: var(--transition);
  display: -webkit-box !important;
  display: -ms-flexbox !important;
  display: flex !important;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  border: 2px solid rgba(255,255,255,0.4);
}

.carousel-control.hero-prev { left: 20px !important; right: auto !important; }
.carousel-control.hero-next { right: 20px !important; left: auto !important; }

.carousel-control.hero-prev:hover,
.carousel-control.hero-next:hover {
  background: var(--primary) !important;
  border-color: var(--primary) !important;
  opacity: 1 !important;
}

.carousel-control.hero-prev span,
.carousel-control.hero-next span {
  font-size: 16px;
  line-height: 1;
  color: #fff;
  position: static !important;
  width: auto !important;
  height: auto !important;
  margin: 0 !important;
}

/* Carousel indicators */
.carousel-indicators li {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  border: none;
  margin: 0 5px;
  transition: var(--transition);
}

.carousel-indicators li.active {
  background: var(--accent);
  transform: scale(1.3);
}

/* Fade-in bottom wave */
#hero-banner::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 80px;
  background: linear-gradient(to top, #fff 0%, transparent 100%);
  pointer-events: none;
  z-index: 10;
}

/* Text animation */
.hero-slide.active .hero-text h1 { animation: fadeInLeft 0.8s ease 0.2s both; }
.hero-slide.active .hero-text p  { animation: fadeInLeft 0.8s ease 0.4s both; }
.hero-slide.active .hero-btn     { animation: fadeInLeft 0.8s ease 0.6s both; }

@keyframes fadeInLeft {
  from { opacity: 0; transform: translateX(-30px); }
  to   { opacity: 1; transform: translateX(0); }
}

@media (max-width: 768px) {
  #hero-carousel .hero-slide { height: 380px; }
  .hero-text h1 { font-size: 26px; }
  .hero-text p  { font-size: 15px; }
  .hero-btn     { padding: 10px 24px !important; font-size: 15px !important; }
  .hero-content { padding: 0 20px; }
}

/* ===== MODERN BUTTONS ===== */
.btn.pi-btn-default,
.btn.rounded.btn-lg.pi-btn-default {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: #fff !important;
  border: none;
  border-radius: 50px !important;
  padding: 12px 32px;
  font-weight: 500;
  letter-spacing: 0.5px;
  position: relative;
  overflow: hidden;
  transition: var(--transition);
  box-shadow: 0 4px 15px rgba(192, 57, 43, 0.4);
}

.btn.pi-btn-default::before,
.btn.rounded.btn-lg.pi-btn-default::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, transparent 100%);
  transition: left 0.4s ease;
}

.btn.pi-btn-default:hover::before,
.btn.rounded.btn-lg.pi-btn-default:hover::before {
  left: 100%;
}

.btn.pi-btn-default:hover,
.btn.rounded.btn-lg.pi-btn-default:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(192, 57, 43, 0.5);
  color: #fff !important;
  text-decoration: none;
}

/* ===== SECTION TITLE ANIMATION ===== */
.section-title {
  position: relative;
  display: inline-block;
  font-weight: 600;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 2px;
  transition: width 0.6s ease;
}

.section-title.animated::after {
  width: 60px;
}

h4.uppercase,
h5.uppercase {
  position: relative;
  padding-bottom: 12px;
}

h4.uppercase::after,
h5.uppercase::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 50px;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 2px;
  animation: expandLine 0.8s ease forwards;
}

@keyframes expandLine {
  from { width: 0; opacity: 0; }
  to { width: 50px; opacity: 1; }
}

/* ===== SERVICE CARDS HOVER EFFECTS ===== */
.single_box {
  background: #fff;
  border-radius: 16px !important;
  padding: 30px 20px !important;
  transition: var(--transition) !important;
  border: 1px solid #f0f0f0;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.single_box::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}

.single_box:hover::before {
  transform: scaleX(1);
}

.single_box:hover {
  transform: translateY(-10px) !important;
  box-shadow: var(--shadow-lg) !important;
  border-color: transparent;
}

.single_box .icons_introimg {
  transition: var(--transition);
}

.single_box:hover .icons_introimg {
  transform: scale(1.1) rotate(5deg);
}

.icons_introimg.box.grey {
  background: linear-gradient(135deg, #636e72, #2d3436) !important;
}

.icons_introimg.box.pink {
  background: linear-gradient(135deg, #fd79a8, #e84393) !important;
}

.icons_introimg.box.purple {
  background: linear-gradient(135deg, #a29bfe, #6c5ce7) !important;
}

.icons_introimg.box.red {
  background: linear-gradient(135deg, var(--primary-light), var(--primary-dark)) !important;
}

/* ===== ABOUT SECTION ===== */
#about {
  background: linear-gradient(135deg, #fff 0%, #fef9f9 100%) !important;
  position: relative;
  overflow: hidden;
}

#about::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(192, 57, 43, 0.06) 0%, transparent 70%);
  pointer-events: none;
}

#about .img-responsive {
  border-radius: 16px;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
}

#about .img-responsive:hover {
  transform: scale(1.03);
  box-shadow: var(--shadow-lg);
}

/* ===== LIST ITEMS ANIMATION ===== */
.list3 li {
  transition: var(--transition);
  padding: 6px 0 !important;
}

.list3 li:hover {
  transform: translateX(8px);
  color: var(--primary);
}

.list3 li i.fa {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ===== OWL CAROUSEL IMAGES ===== */
.owl-carousel .item img {
  border-radius: 12px;
  transition: var(--transition);
}

/* ===== SECTION GREY ===== */
.section-grey {
  background: linear-gradient(135deg, #f8f9fa 0%, #ecf0f1 100%) !important;
}

/* ===== PARALLAX SECTION MODERN ===== */
.section-parallax {
  position: relative;
  overflow: hidden;
}

.section-parallax .layer {
  background: linear-gradient(135deg, rgba(26, 26, 46, 0.75) 0%, rgba(192, 57, 43, 0.5) 100%) !important;
}

.parallax-content h3 {
  color: #fff !important;
  font-size: 36px;
  font-weight: 700;
  text-shadow: 0 2px 20px rgba(0,0,0,0.3);
  animation: fadeInDown 0.8s ease;
}

.parallax-content p {
  color: rgba(255,255,255,0.9) !important;
  font-size: 18px;
}

.parallax-content ul.list3 li {
  color: rgba(255,255,255,0.9);
  font-size: 16px;
}

.parallax-content ul.list3 li i.fa {
  color: var(--accent) !important;
  -webkit-text-fill-color: var(--accent);
}

.parallax-content ul.list3 li:hover {
  color: #fff;
}

/* ===== MAP SECTION ===== */
#map iframe {
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  min-height: 400px;
}

/* ===== FOOTER MODERNIZATION ===== */
#footer.dark {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%) !important;
}

#footer h5 {
  color: #fff !important;
  font-weight: 600;
  position: relative;
  padding-bottom: 10px;
  margin-bottom: 16px;
}

#footer h5::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 30px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
}

#footer address p,
#footer p {
  color: rgba(255,255,255,0.75) !important;
}

#footer a {
  color: rgba(255,255,255,0.75) !important;
  transition: var(--transition);
}

#footer a:hover {
  color: var(--accent) !important;
  text-decoration: none;
}

#footer .icon i {
  color: var(--accent) !important;
  font-size: 24px;
  margin-bottom: 8px;
  display: block;
}

/* ===== SOCIAL ICONS ===== */
.social-icon-jump-x4.circle {
  transition: var(--transition) !important;
  border: 2px solid rgba(255,255,255,0.2) !important;
  background: rgba(255,255,255,0.05) !important;
}

.social-icon-jump-x4.circle:hover {
  transform: translateY(-5px) scale(1.1) !important;
  border-color: var(--accent) !important;
  background: rgba(243, 156, 18, 0.15) !important;
  box-shadow: 0 8px 20px rgba(243, 156, 18, 0.3);
}

/* ===== COPYRIGHTS BAR ===== */
.copyrights {
  background: rgba(0,0,0,0.3) !important;
  border-top: 1px solid rgba(255,255,255,0.08);
}

/* ===== SCROLL TO TOP BUTTON ===== */
#toTop {
  background: linear-gradient(135deg, var(--primary), var(--primary-light)) !important;
  border-radius: 50% !important;
  box-shadow: 0 4px 15px rgba(192, 57, 43, 0.4);
  transition: var(--transition) !important;
}

#toTop:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(192, 57, 43, 0.5) !important;
}

/* ===== CONTACT INFO PULSE ===== */
.fa-phone {
  animation: phonePulse 2s infinite;
}

@keyframes phonePulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); color: var(--accent); }
}

/* ===== FADE IN ANIMATIONS ===== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ===== REVEAL ANIMATION CLASS ===== */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-left {
  opacity: 0;
  transform: translateX(-30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal-left.visible {
  opacity: 1;
  transform: translateX(0);
}

/* ===== IMAGE HOVER EFFECT FOR SERVICE IMAGES ===== */
.col-sm-4 .img-responsive {
  border-radius: 12px;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.col-sm-4 .img-responsive:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: var(--shadow-md);
}

/* ===== MOBILE RESPONSIVE FIXES ===== */
@media (max-width: 768px) {
  #about::before {
    display: none;
  }

  .single_box:hover {
    transform: translateY(-5px) !important;
  }

  .parallax-content h3 {
    font-size: 26px;
  }
}

/* ===== FLOATING LOGO ANIMATION ===== */
.zm-logo img {
  transition: var(--transition);
  animation: floatLogo 4s ease-in-out infinite;
}

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

/* ===== GALLERY SECTION ===== */
#gallery {
  background: linear-gradient(135deg, #fafafa 0%, #f0f0f0 100%) !important;
}

.line {
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  margin: 12px auto 28px;
  border-radius: 2px;
}

/* Filter Buttons */
.gallery-filters {
  margin-bottom: 30px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.gallery-btn {
  padding: 8px 22px;
  border: 2px solid #ddd;
  background: #fff;
  border-radius: 50px;
  cursor: pointer;
  font-family: Kanit, serif;
  font-size: 14px;
  color: #555;
  transition: var(--transition);
}

.gallery-btn:hover,
.gallery-btn.active {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 15px rgba(192,57,43,0.35);
  transform: translateY(-2px);
}

/* Gallery Grid */
.gallery-grid {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -ms-flex-wrap: wrap;
  flex-wrap: wrap;
  margin: 0 -8px;
  margin-top: 10px;
}

.gallery-item {
  width: 25%;
  padding: 8px;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
}

.gallery-card {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  cursor: pointer;
  -webkit-box-shadow: var(--shadow-sm);
  box-shadow: var(--shadow-sm);
  height: 200px;
}

.gallery-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  -o-object-fit: cover;
  display: block;
  -webkit-transition: -webkit-transform 0.5s ease;
  transition: transform 0.5s ease;
}

.gallery-card:hover img {
  -webkit-transform: scale(1.08);
  transform: scale(1.08);
}

.gallery-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(to top, rgba(26,26,46,0.85) 0%, transparent 60%);
  opacity: 0;
  -webkit-transition: var(--transition);
  transition: var(--transition);
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: end;
  -ms-flex-align: end;
  align-items: flex-end;
  padding: 14px;
}

.gallery-card:hover .gallery-overlay {
  opacity: 1;
}

.gallery-overlay span {
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  font-family: Kanit, serif;
}

/* Lightbox */
.lightbox-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.88);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.lightbox-overlay.active {
  opacity: 1;
}

.lightbox-box {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  text-align: center;
}

.lightbox-box img {
  max-width: 100%;
  max-height: 80vh;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.lightbox-box p {
  color: #fff !important;
  margin-top: 12px;
  font-size: 16px;
}

.lightbox-close {
  position: absolute;
  top: -40px;
  right: 0;
  background: none;
  border: none;
  color: #fff;
  font-size: 36px;
  cursor: pointer;
  line-height: 1;
  transition: var(--transition);
}

.lightbox-close:hover {
  color: var(--accent);
  transform: rotate(90deg);
}

/* ===== MOBILE RESPONSIVE ===== */

/* Tablet (≤992px) */
@media (max-width: 992px) {
  /* Gallery */
  .gallery-item { width: 33.333%; }

  /* Service boxes */
  .single_box { margin-bottom: 16px; }
}

/* Mobile (≤768px) */
@media (max-width: 768px) {
  /* --- Navbar --- */
  body { padding-top: 50px; }

  .navbar.navbar-default {
    background: rgba(255,255,255,0.98) !important;
  }

  /* Zetta menu mobile override */
  .zetta-menu.zm-response-switch {
    overflow-y: auto;
    max-height: 80vh;
  }

  /* --- Hero Banner --- */
  #hero-carousel .carousel-inner { height: 350px; }
  #hero-carousel .hero-slide      { height: 350px; }

  .hero-content { padding: 0 16px; }

  .hero-text h1 {
    font-size: 22px !important;
    margin-bottom: 8px;
  }

  .hero-text p {
    font-size: 14px !important;
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .hero-btn {
    padding: 9px 20px !important;
    font-size: 14px !important;
  }

  .carousel-control.hero-prev,
  .carousel-control.hero-next {
    width: 36px !important;
    height: 36px !important;
    margin-top: -18px;
  }

  .carousel-control.hero-prev { left: 8px !important; }
  .carousel-control.hero-next { right: 8px !important; }

  /* --- About Section --- */
  #about-content .col-sm-6 {
    width: 100%;
    float: none;
    padding: 12px 16px;
    text-align: center;
  }

  #about h4.uppercase::after { left: 50%; transform: translateX(-50%); }

  #about .img-responsive {
    width: 100%;
    max-width: 360px;
    margin: 0 auto;
    display: block;
  }

  /* --- Service Icon Boxes --- */
  #service-icons .col-sm-6 {
    width: 50%;
    float: left;
  }

  .single_box {
    padding: 20px 12px !important;
    margin-bottom: 0;
  }

  .single_box h3 { font-size: 18px; }
  .single_box .introtext { font-size: 13px; }

  /* --- Service Images --- */
  #service-images .col-sm-4 {
    width: 100%;
    float: none;
    padding: 8px 16px;
  }

  #service-images .img-responsive { border-radius: 10px; }

  /* --- Boon Section --- */
  #boon-content .col-sm-12,
  #boon-content .col-sm-6 {
    width: 100%;
    float: none;
    padding: 12px 16px;
  }

  /* --- Gallery --- */
  .gallery-filters { gap: 6px; }
  .gallery-btn { padding: 6px 14px; font-size: 13px; }
  .gallery-item { width: 50%; padding: 5px; }
  .gallery-card  { height: 160px; }

  /* --- Parallax Section --- */
  .parallax-content h3 { font-size: 24px; }
  .parallax-content p  { font-size: 15px; }
  .parallax-content ul.list3 li { font-size: 14px; }

  /* --- Map --- */
  #map-content iframe { min-height: 280px; }

  /* --- Footer --- */
  #footer .col-sm-4 {
    width: 100%;
    float: none;
    padding: 16px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
  }

  #footer .col-sm-4:last-child { border-bottom: none; }

  /* --- General --- */
  h3 { font-size: 24px !important; }
  h4 { font-size: 20px !important; }
  h5 { font-size: 18px !important; }

  .content { padding: 30px 0; }

  .btn.pi-btn-default,
  .btn.rounded.btn-lg.pi-btn-default {
    padding: 10px 22px;
    font-size: 14px;
  }

  /* hide reveal transition on mobile for performance */
  .reveal, .reveal-left {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* Small mobile (≤480px) */
@media (max-width: 480px) {
  #hero-carousel .carousel-inner,
  #hero-carousel .hero-slide { height: 260px; }

  .hero-text h1 { font-size: 18px !important; }
  .hero-text p  { display: none; }

  #service-icons .col-sm-6 { width: 50%; }
  .gallery-item { width: 50%; }
  .gallery-card  { height: 130px; }
}

/* ===== LOADING SHIMMER EFFECT ===== */
.img-responsive[src=""] {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  min-height: 200px;
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
