/* Custom: Move What We Offer section center image upward */
.ts-service-area .col-lg-4.text-center img {
  display: block;
  margin-left: auto;
  margin-right: auto;
  margin-top: -100px;
}

@media (max-width: 991px) {
  .ts-service-area .col-lg-4.text-center img {
    margin-top: -30px;
  }
}

/* Logo area spacing fixes */
.logo-area.enhanced-header {
  padding-top: 40px; /* inner spacing */
  margin-top: 24px;  /* push block below fixed navbar */
}

.header-logo img.header-logo-large {
  max-width: 84px !important; /* increase base size; ensure it overrides theme */
  height: auto;
  margin-top: 6px; /* extra clearance under navbar shadow */
}

/* Card/project title yellow styling */
.project-item-title {
  color: #ffc107 !important;
  text-shadow: 1px 1px 2px #222, 0 0 5px #000;
}

/* Horizontally scrollable gallery card */
.scroll-gallery-card {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  padding: 10px 0 10px 0;
  margin-bottom: 18px;
}
.scroll-gallery-row {
  display: flex;
  overflow-x: auto;
  gap: 16px;
  padding: 10px 8px;
  scrollbar-width: thin;
  scrollbar-color: #ffc107 #eee;
}
.scroll-gallery-row::-webkit-scrollbar {
  height: 8px;
}
.scroll-gallery-row::-webkit-scrollbar-thumb {
  background: #ffc107;
  border-radius: 4px;
}
.scroll-gallery-row::-webkit-scrollbar-track {
  background: #eee;
  border-radius: 4px;
}
.scroll-gallery-row img {
  max-height: 260px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 1px 6px rgba(0,0,0,0.10);
}

/* ===== Projects page layout refinements ===== */
/* Give each project card breathing room with a border and subtle shadow */
.shuffle-wrapper .shuffle-item {
  padding: 8px;
}
.shuffle-wrapper .project-img-container {
  border: 1px solid #e9ecef;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
  aspect-ratio: 4 / 3; /* reserve space to prevent CLS */
}
.shuffle-wrapper .project-img-container img,
.shuffle-wrapper .project-img-container video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Featured project at the top: full width, taller media, emphasized */
.shuffle-wrapper .featured-project {
  order: -1; /* ensure first if shuffle reorders */
  margin-bottom: 18px;
}
.shuffle-wrapper .featured-project .project-img-container {
  border: 2px solid #ffc107;
  box-shadow: 0 6px 20px rgba(0,0,0,0.08);
  aspect-ratio: 16 / 9;
}
.shuffle-wrapper .featured-project .project-img-container video,
.shuffle-wrapper .featured-project .project-img-container img {
  height: 100%;
}

@media (max-width: 991px) {
  .shuffle-wrapper .project-img-container { aspect-ratio: 4 / 3; }
  .shuffle-wrapper .featured-project .project-img-container { aspect-ratio: 16 / 9; }
}

@media (max-width: 575px) {
  .shuffle-wrapper .project-img-container { aspect-ratio: 4 / 3; }
  .shuffle-wrapper .featured-project .project-img-container { aspect-ratio: 16 / 9; }
}

/* Social media label styling */
.social-label {
  font-weight: 500;
  color: #333;
  font-size: 0.9rem;
}

/* Header social links — match email hover behavior */
.logo-area .social-label,
.logo-area a.mx-2 {
  transition: transform 0.2s cubic-bezier(.4,2,.3,1), box-shadow 0.2s, color 0.2s;
  text-decoration: none;
  padding: 2px 4px;
  border-radius: 4px;
}
.logo-area .social-label:hover,
.logo-area a.mx-2:hover {
  transform: scale(1.06) translateY(-2px);
  box-shadow: 0 6px 24px -6px #007bff55;
  color: #007bff;
}
.logo-area a.mx-2:hover .social-icon i {
  color: #007bff;
}

.whatsapp-float {
  animation: whatsapp-pulse 1.6s infinite cubic-bezier(0.66, 0, 0, 1);

  position: fixed;
  width: 52px;
  height: 52px;
  left: 20px;
  bottom: calc(20px + env(safe-area-inset-bottom, 0px)) !important; /* normalized baseline + safe area */
  background-color: #25d366;
  color: #fff;
  border-radius: 50%;
  text-align: center;
  font-size: 2.4rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, box-shadow 0.2s, transform 0.2s;
}
.whatsapp-float:hover {
  background: #128c7e;
  color: #fff;
  box-shadow: 0 6px 18px rgba(0,0,0,0.22);
  transform: scale(1.07);
  text-decoration: none;
}

@keyframes whatsapp-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
    transform: scale(1);
  }
  70% {
    box-shadow: 0 0 0 12px rgba(37, 211, 102, 0);
    transform: scale(1.08);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    transform: scale(1);
  }
}

@media (max-width: 767px) {
  /* Prevent floating buttons from covering content on mobile */
  body, .body-inner { padding-bottom: 88px !important; }

  .whatsapp-float {
    width: 44px;
    height: 44px;
    font-size: 1.3rem; /* icon size */
    left: 12px;
    bottom: calc(16px + env(safe-area-inset-bottom, 0px)) !important; /* mobile baseline + safe area */
    box-shadow: 0 3px 10px rgba(0,0,0,0.18);
  }

  .logo-area.enhanced-header {
    padding-top: 24px; /* maintain extra clearance on mobile */
  }
  
  .header-logo {
    margin-bottom: 10px;
  }
  
  .social-label {
    font-size: 0.8rem;
  }
}

/* Footer logo — make smaller globally */
.footer-logo {
  width: 80px !important; /* override inline width="200px" */
  height: auto;
}

/* Tablet adjustments */
@media (max-width: 991px) {
  .header-logo img.header-logo-large { max-width: 76px !important; }
  .footer-logo { width: 70px !important; }
  .logo-area.enhanced-header { margin-top: 20px; }
}

/* Mobile adjustments */
@media (max-width: 767px) {
  .header-logo img.header-logo-large { max-width: 68px !important; }
  .footer-logo { width: 60px !important; }
  .logo-area.enhanced-header { margin-top: 16px; padding-top: 24px; }
}

/* Colorbox slideshow control — make it a neat icon button */
#cboxSlideshow {
  position: absolute;
  top: 6px;
  right: 44px; /* sit just left of the close (X) button */
  background: transparent;
  border: 0;
  color: #fff;
  font-size: 16px;
  line-height: 1;
  padding: 6px 8px;
  cursor: pointer;
}
#cboxSlideshow:hover { color: #ffc107; }

/* Hero motto: keep on a single line and size responsively */
.hero-motto {
  white-space: nowrap;
  line-height: 1.2;
  display: block;
  width: 100%;
  text-align: center;
  margin: 0 auto;
  /* Scale with viewport but cap at a comfortable maximum */
  font-size: clamp(1.25rem, 4.2vw, 3rem) !important;
}
@media (max-width: 991.98px) {
  .hero-motto { letter-spacing: 1px !important; }
}
@media (max-width: 575.98px) {
  .hero-motto {
    font-size: clamp(1.1rem, 5.2vw, 1.6rem) !important;
    letter-spacing: 0.5px !important;
  }
}

/* Hide statistics section */
#facts {
    display: none !important;
}

/* Alternating section bands and divider */
section.band-light { background: #f8f9fa; }
section.band-white { background: #ffffff; }
.section-divider {
  height: 1px;
  border: 0;
  margin: 32px 0;
  background: linear-gradient(90deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.12) 15%, rgba(0,0,0,0.12) 85%, rgba(0,0,0,0) 100%);
}

/* Ensure Font Awesome uses swap to avoid FOIT */
@font-face {
  font-family: "Font Awesome 5 Free";
  font-style: normal;
  font-weight: 900;
  font-display: swap;
  src: url("../plugins/fontawesome/webfonts/fa-solid-900.woff2") format("woff2");
}
@font-face {
  font-family: "Font Awesome 5 Free";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../plugins/fontawesome/webfonts/fa-regular-400.woff2") format("woff2");
}
@font-face {
  font-family: "Font Awesome 5 Brands";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../plugins/fontawesome/webfonts/fa-brands-400.woff2") format("woff2");
}

/* Hero as image for better LCP prioritization */
.banner-carousel-item { position: relative; }
.banner-carousel-item .banner-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.banner-carousel-item .slider-content { position: relative; z-index: 1; }

/* Tawk chat widget: force bottom-right position and ensure it floats above everything */
#tawkchat-minified {
  right: 20px !important;
  left: auto !important;
  bottom: 20px !important; /* normalized baseline */
  position: fixed !important;
  z-index: 2147483647 !important; /* highest practical */
  pointer-events: auto !important;
}
/* Defensive: bump z-index on common Tawk containers and iframes */
#tawkchat-container,
.tawk-min-container,
[id^="tawkchat"],
[id^="tawk-"] ,
iframe[src*="tawk.to"] {
  z-index: 2147483647 !important;
  position: fixed !important;
}
@media (max-width: 767px) {
  #tawkchat-minified {
    right: 16px !important;
    bottom: calc(16px + env(safe-area-inset-bottom, 0px)) !important;
    transform: scale(0.8); /* reduce visual size on small screens */
    transform-origin: bottom right;
  }
}

/* Very small phones: tighten a bit more */
@media (max-width: 360px) {
  .whatsapp-float { width: 36px; height: 36px; font-size: 1.1rem; }
  #tawkchat-minified { transform: scale(0.75); right: 14px !important; }
  #back-to-top { right: 76px !important; }
  #back-to-top .btn.btn-primary { width: 32px !important; height: 32px !important; line-height: 32px !important; }
}

/* Tablet adjustments (768px–1199px): slightly smaller Tawk, more breathing room */
@media (min-width: 768px) and (max-width: 1199px) {
  .whatsapp-float { bottom: 22px !important; }
  #tawkchat-minified { bottom: 18px !important; right: 12px !important; transform: scale(0.9); }
  #back-to-top { right: 150px !important; }
  #back-to-top.position-fixed { bottom: 22px !important; }
  #back-to-top .btn.btn-primary { width: 36px !important; height: 36px !important; line-height: 36px !important; }
}

/* Desktop (>=1200px): increase bottom offset and button size for visibility */
@media (min-width: 1200px) {
  .whatsapp-float { bottom: 28px !important; }
  #tawkchat-minified { bottom: 20px !important; right: 14px !important; transform: none; }
  #back-to-top { right: 210px !important; }
  #back-to-top.position-fixed { bottom: 32px !important; }
  #back-to-top .btn.btn-primary { width: 44px !important; height: 44px !important; line-height: 44px !important; font-size: 18px !important; }
}

/* Back-to-Top: share baseline, sit left of Tawk bubble */
#back-to-top { right: 106px !important; }
#back-to-top.position-fixed { bottom: calc(20px + env(safe-area-inset-bottom, 0px)) !important; }
@media (max-width: 767px) {
  #back-to-top { right: 92px !important; }
  #back-to-top.position-fixed { bottom: calc(16px + env(safe-area-inset-bottom, 0px)) !important; }
  /* tighten the button size slightly on mobile for balance */
  #back-to-top .btn.btn-primary {
    width: 34px !important;
    height: 34px !important;
    line-height: 34px !important;
    padding: 0 !important;
  }
}

/* Contrast and visibility tweaks for the Back-to-Top button across viewports */
#back-to-top .btn.btn-primary {
  background: #ffc107 !important; /* brand yellow */
  color: #111 !important;
  border: 2px solid #ffffff !important;
  box-shadow: 0 6px 16px rgba(0,0,0,0.22) !important;
}
#back-to-top .btn.btn-primary i { color: #111 !important; }
#back-to-top .btn.btn-primary:hover { filter: brightness(0.95); }
