/* ─── Prevent Horizontal Scroll & GPU Glitches ────────── */
html,
body {
  overflow-x: hidden;
  width: 100%;
}

/* Enforce overflow-x hidden on the main content wrapper to prevent 
   GSAP horizontal offset animations from causing scrollbars or GPU glitches on mobile */
body > .relative {
  overflow-x: hidden;
  width: 100%;
}

.dark {
  --bg-primary: #000000 !important;
  --bg-secondary: #080808 !important;
  --bg-accent: #101010 !important;
  --card-bg: rgba(255, 255, 255, 0.02) !important;
  --border-color: rgba(255, 255, 255, 0.08) !important;
}

/* ─── Body / root background ────────────────────────────── */
.zentrix-theme {
  background: var(--bg-primary);
}

/* ─── Nav Dropdown Submenu ─────────────────────────────── */
.nav-dropdown {
  position: relative;
}

.nav-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  min-width: 180px;
  padding: 8px 0;
  border-radius: 10px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  z-index: 60;
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
}

.is-scrolled .nav-dropdown-menu {
  background: rgba(240, 248, 255, 0.97);
  border-color: var(--border-color);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
}

.dark .is-scrolled .nav-dropdown-menu {
  background: rgba(8, 8, 8, 0.97);
  border-color: rgba(255, 255, 255, 0.1);
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.nav-dropdown-trigger {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.2s ease;
}

#site-navigation:not(.is-scrolled) .nav-dropdown-trigger {
  color: rgba(255, 255, 255, 0.9);
}

#site-navigation:not(.is-scrolled) .nav-dropdown-trigger:hover {
  color: #ffffff;
}

#site-navigation.is-scrolled .nav-dropdown-trigger {
  color: var(--text-title);
}

#site-navigation.is-scrolled .nav-dropdown-trigger:hover {
  color: var(--brand);
}

.nav-dropdown-menu a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.8);
  transition: color 0.15s, background 0.15s;
  white-space: nowrap;
}

.nav-dropdown-menu a:hover {
  color: #4d9cff;
  background: rgba(77, 156, 255, 0.08);
}

.is-scrolled .nav-dropdown-menu a {
  color: var(--text-body);
}

.is-scrolled .nav-dropdown-menu a:hover {
  color: #4d9cff;
  background: rgba(77, 156, 255, 0.06);
}

.dark .is-scrolled .nav-dropdown-menu a {
  color: rgba(255, 255, 255, 0.7);
}

/* ─── Navigation Scroll State ──────────────────────────── */
/* When scrolled, the nav gets a frosted-glass background.
   The nav LINK and TOGGLE classes are swapped by JS (matching React),
   so we only handle the nav container itself here.             */
#site-navigation.is-scrolled {
  background: rgba(240, 248, 255, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  box-shadow: 0 1px 20px rgba(0, 0, 0, 0.08);
}

.dark #site-navigation.is-scrolled {
  background: rgba(0, 0, 0, 0.85);
}

/* ─── Theme Toggle Icons ──────────────────────────────── */
/* Light mode: show moon, hide sun.  Dark mode: show sun, hide moon */
.theme-icon-sun,
.dark .theme-icon-moon {
  display: none;
}

.dark .theme-icon-sun {
  display: inline-flex;
}

/* ─── Mobile Menu ─────────────────────────────────────── */
.mobile-menu-close,
.mobile-menu-is-open .mobile-menu-open {
  display: none;
}

.mobile-menu-is-open .mobile-menu-close {
  display: inline-flex;
}

#mobile-menu {
  background-color: rgba(3, 7, 18, 0.98) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

#mobile-menu.is-open {
  opacity: 1;
  pointer-events: auto;
}

/* ─── Desktop Sticky CTA Buttons ──────────────────────── */
.sticky-buttons {
  position: fixed;
  right: -80px;
  top: 50%;
  z-index: 50;
  transform: translateY(-50%);
  flex-direction: column;
  transition: right 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.sticky-buttons.is-visible {
  right: 20px;
}

.sticky-pill {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 28px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.sticky-action {
  position: relative;
  display: flex;
  width: 56px;
  height: 56px;
  align-items: center;
  justify-content: center;
  border: 0;
  background: #1b7bfe;
  color: #fff;
  cursor: pointer;
  transition: background-color 0.3s;
}

.sticky-action:hover {
  background: #4d9cff;
}

.sticky-action span {
  position: absolute;
  right: 66px;
  white-space: nowrap;
  border-radius: 8px;
  background: #000000;
  padding: 6px 14px;
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  opacity: 0;
  pointer-events: none;
  transform: translateX(8px);
  transition: opacity 0.2s, transform 0.2s;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.sticky-action:hover span {
  opacity: 1;
  transform: translateX(0);
}

.sticky-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.15);
}

.sticky-pulse {
  position: absolute;
  inset: -4px;
  border: 2px solid rgba(27, 123, 254, 0.3);
  border-radius: 32px;
  pointer-events: none;
  animation: stickyPulse 2.5s ease-in-out infinite;
}

/* ─── Mobile Sticky Bar ───────────────────────────────── */
#sticky-mobile {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 50;
  padding: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background: #000000;
  transform: translateY(100%);
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

#sticky-mobile.is-visible {
  transform: translateY(0);
}

.mobile-sticky-call,
.mobile-sticky-estimate {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 12px;
  padding: 12px 0;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.mobile-sticky-call {
  background: #1b7bfe;
}

.mobile-sticky-estimate {
  border: 2px solid rgba(255, 255, 255, 0.3);
  background: transparent;
}

/* ─── Project Lightbox ────────────────────────────────── */
.project-lightbox {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.project-lightbox.is-open {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.95);
}

.lightbox-close,
.lightbox-arrow {
  position: absolute;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  cursor: pointer;
}

.lightbox-close {
  top: 20px;
  right: 20px;
  width: 44px;
  height: 44px;
}

.lightbox-arrow {
  top: 50%;
  width: 48px;
  height: 48px;
  transform: translateY(-50%);
}

.lightbox-prev {
  left: 16px;
}

.lightbox-next {
  right: 16px;
}

.lightbox-counter {
  position: absolute;
  top: 24px;
  left: 24px;
  z-index: 10;
  color: rgba(255, 255, 255, 0.6);
  font-size: 14px;
  font-weight: 500;
}

.lightbox-counter span:first-child {
  color: #fff;
  font-weight: 700;
}

.lightbox-content {
  position: relative;
  z-index: 5;
  display: flex;
  width: 100%;
  max-width: 900px;
  flex-direction: column;
  align-items: center;
  padding: 0 80px;
}

.lightbox-image-wrap {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.4);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5);
}

#lightbox-image {
  display: block;
  width: 100%;
  max-height: 70vh;
  object-fit: contain;
  opacity: 0;
  transform: scale(0.97);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

#lightbox-image.is-loaded {
  opacity: 1;
  transform: scale(1);
}

.lightbox-loader {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-loader::before {
  width: 32px;
  height: 32px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  content: "";
}

.lightbox-image-wrap.is-loaded .lightbox-loader {
  display: none;
}

.lightbox-caption {
  display: flex;
  width: 100%;
  align-items: flex-start;
  justify-content: space-between;
  margin-top: 16px;
}

#lightbox-category {
  display: inline-block;
  margin-bottom: 6px;
  border-radius: 20px;
  background: rgba(77, 156, 255, 0.2);
  padding: 3px 10px;
  color: #4d9cff;
  font-size: 11px;
  font-weight: 600;
}

#lightbox-title {
  margin: 4px 0 2px;
  color: #fff;
  font-size: 17px;
  font-weight: 600;
}

#lightbox-location {
  color: rgba(255, 255, 255, 0.5);
  font-size: 13px;
}

.lightbox-hint {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  color: rgba(255, 255, 255, 0.35);
  font-size: 12px;
}

.lightbox-thumbs {
  display: flex;
  width: 100%;
  gap: 8px;
  overflow-x: auto;
  margin-top: 16px;
  padding-bottom: 8px;
}

.lightbox-thumb {
  flex-shrink: 0;
  width: 60px;
  height: 44px;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: none;
  cursor: pointer;
  opacity: 0.5;
  padding: 0;
  transition: all 0.3s ease;
}

.lightbox-thumb.is-active {
  border-color: #4d9cff;
  opacity: 1;
  transform: scale(1.05);
}

.lightbox-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ─── Keyframes ───────────────────────────────────────── */
@keyframes stickyPulse {
  0%,
  100% {
    opacity: 0;
    transform: scale(1);
  }

  50% {
    opacity: 1;
    transform: scale(1.08);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ─── Responsive ──────────────────────────────────────── */

/* ── Extra-small screens (phones, < 480px) ─────────────── */
@media (max-width: 479px) {
  /* Hero section */
  #hero {
    min-height: 100svh;
  }

  #hero .section-padding {
    padding-top: 6.5rem;
    padding-bottom: 5rem;
  }

  .hero-headline {
    font-size: 1.85rem !important;
    line-height: 1.15 !important;
  }

  .hero-sub {
    font-size: 0.95rem !important;
  }

  .hero-buttons {
    flex-direction: column !important;
    width: 100%;
  }

  .hero-buttons > * {
    width: 100%;
    text-align: center;
    justify-content: center;
  }

  /* About section */
  #about h2,
  #services h2,
  #process h2,
  #projects h2,
  #service-areas h2,
  #contact h2 {
    font-size: 1.6rem !important;
    line-height: 1.2 !important;
  }

  #about .about-left img:first-child {
    height: 280px !important;
  }

  .about-stats .about-stat p:first-of-type {
    font-size: 1.5rem !important;
  }

  /* Services cards */
  .service-card .p-6 {
    padding: 1rem;
  }

  .service-card .h-48 {
    height: 10rem;
  }

  /* Process section — compact icon */
  .process-step .w-14 {
    width: 2.75rem;
    height: 2.75rem;
    min-width: 2.75rem;
  }

  .process-step .w-14 svg {
    width: 18px;
    height: 18px;
  }

  /* Process connector line hidden on mobile */
  .process-step > .absolute {
    display: none;
  }

  /* Contact section */
  #contact .rounded-2xl.p-8 {
    padding: 1.25rem;
  }

  /* Footer */
  footer .pt-20 {
    padding-top: 3rem;
  }

  footer h4 {
    font-size: 0.75rem;
    margin-bottom: 1rem;
  }

  /* Mobile sticky bar — bigger touch targets */
  .mobile-sticky-call,
  .mobile-sticky-estimate {
    padding: 14px 0;
    font-size: 13px;
  }

  /* Lightbox */
  .lightbox-content {
    padding: 0 12px;
  }

  .lightbox-arrow {
    width: 34px;
    height: 34px;
  }

  .lightbox-prev {
    left: 6px;
  }

  .lightbox-next {
    right: 6px;
  }

  .lightbox-close {
    top: 12px;
    right: 12px;
    width: 38px;
    height: 38px;
  }

  .lightbox-counter {
    top: 16px;
    left: 16px;
    font-size: 12px;
  }

  #lightbox-title {
    font-size: 14px;
  }

  .lightbox-thumbs {
    gap: 4px;
  }

  .lightbox-thumb {
    width: 44px;
    height: 32px;
  }

  .lightbox-hint {
    display: none;
  }

  /* Trust bar — compact on small mobile */
  #trust .flex-wrap {
    gap: 0.75rem;
  }

  .trust-item .label-text {
    font-size: 0.65rem;
  }

  /* Service areas features — scrollable pills */
  #service-areas .flex-wrap {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.5rem;
    gap: 0.5rem;
    scrollbar-width: none;
  }

  #service-areas .flex-wrap::-webkit-scrollbar {
    display: none;
  }

  #service-areas .flex-wrap > div {
    flex-shrink: 0;
  }
}

/* ── Small screens (phones landscape + small tablets, < 640px) ── */
@media (max-width: 639px) {
  /* Section vertical spacing */
  #about,
  #process,
  #projects,
  #service-areas,
  #contact {
    padding-top: 3.5rem;
    padding-bottom: 3.5rem;
  }

  #services {
    padding-top: 3.5rem;
    padding-bottom: 3.5rem;
  }

  /* Section header bottom margins */
  .services-header,
  .projects-header {
    margin-bottom: 2rem !important;
  }

  /* Trust section */
  #trust {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
  }

  /* About stats grid — stack on mobile */
  .about-stats {
    grid-template-columns: 1fr !important;
    gap: 1.5rem !important;
    margin-top: 3rem !important;
  }

  /* Projects grid — single column on mobile */
  .projects-grid {
    grid-template-columns: 1fr !important;
    gap: 1rem;
  }

  /* Project card — uniform height on mobile */
  .project-card {
    grid-row: span 1 !important;
  }

  .project-card .relative.overflow-hidden {
    height: 250px !important;
    min-height: auto !important;
  }

  /* Services grid — single column */
  .services-grid {
    grid-template-columns: 1fr !important;
    gap: 1rem;
  }

  /* Service card featured — full width */
  .service-card[class*="col-span"] {
    grid-column: span 1 !important;
  }

  /* Process — compact step cards and grid stack */
  .process-step {
    padding: 1.25rem !important;
    gap: 1rem !important;
  }

  #process .grid {
    grid-template-columns: 1fr !important;
  }

  .process-left {
    position: static !important;
  }

  .process-left .lg\:sticky {
    position: static !important;
  }

  /* About grid — stack on mobile */
  #about > div > .grid {
    grid-template-columns: 1fr !important;
  }

  /* About secondary (overlapping) image — hide on mobile */
  .about-left > img.absolute {
    display: none;
  }

  /* Contact grid — stack on mobile */
  #contact .grid {
    grid-template-columns: 1fr !important;
    gap: 2rem !important;
  }

  /* Footer */
  footer {
    padding-top: 3rem !important;
    padding-bottom: 1.5rem !important;
  }

  footer .section-padding {
    padding-left: 5vw;
    padding-right: 5vw;
  }

  footer .section-padding > .grid {
    grid-template-columns: 1fr !important;
    gap: 2.5rem !important;
    margin-bottom: 3rem !important;
  }

  /* Map — ensure taller on phone */
  .map-container iframe {
    min-height: 220px;
  }

  #contact .rounded-2xl iframe {
    height: 200px !important;
  }

  /* Mobile sticky bottom bar spacing */
  #sticky-mobile {
    padding: 10px 12px;
    padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  }

  /* Ensure content doesn't get hidden behind mobile sticky */
  footer {
    padding-bottom: 5rem !important;
  }
}

/* ── Medium screens (tablets, < 768px) ─────────────────── */
@media (max-width: 767px) {
  .lightbox-content {
    padding: 0 48px;
  }

  .lightbox-arrow {
    width: 40px;
    height: 40px;
  }

  .lightbox-hint {
    display: none;
  }

  .lightbox-caption {
    flex-direction: column;
    gap: 8px;
  }

  /* Navigation — adjust padding */
  #site-navigation > div {
    padding-left: 1rem;
    padding-right: 1rem;
    height: 4rem;
  }

  /* CTA phone button in nav — hide on tablets too */
  #site-navigation .hidden.md\:inline-flex {
    display: none !important;
  }

  /* Hero trust bar — always hidden below md */
  .hero-trust-bar {
    display: none !important;
  }

  /* About badge overlay — compact inline on mobile/tablets */
  #about .about-left .absolute.-bottom-6.-right-6 {
    position: relative !important;
    bottom: auto !important;
    right: auto !important;
    display: inline-flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 0.5rem !important;
    padding: 0.5rem 1rem !important;
    border-radius: 12px !important;
    margin-top: 1rem !important;
    box-shadow: 0 4px 12px rgba(0, 68, 204, 0.08) !important;
  }

  #about .about-left .absolute.-bottom-6.-right-6 p:first-child {
    font-size: 1.25rem !important;
    font-weight: 700 !important;
    line-height: 1 !important;
  }

  #about .about-left .absolute.-bottom-6.-right-6 p:last-child {
    font-size: 0.875rem !important;
    margin: 0 !important;
    line-height: 1 !important;
    white-space: nowrap !important;
  }
}

/* ── Tablet landscape (640px – 1023px) ─────────────────── */
@media (min-width: 640px) and (max-width: 1023px) {
  /* Sections — moderate padding */
  #about,
  #process,
  #projects,
  #service-areas,
  #contact {
    padding-top: 4.5rem;
    padding-bottom: 4.5rem;
  }

  /* About image height */
  #about .about-left img:first-child {
    height: 350px !important;
  }

  /* Process — stack layout */
  #process .grid {
    grid-template-columns: 1fr !important;
    gap: 2rem;
  }

  .process-left .lg\:sticky {
    position: static !important;
  }

  /* Footer — 2 columns */
  footer .grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  /* Contact — refine form card padding */
  #contact .rounded-2xl.p-8 {
    padding: 1.75rem;
  }
}

/* ── Touch device optimizations ────────────────────────── */
@media (hover: none) and (pointer: coarse) {
  /* Larger tap targets */
  .nav-link {
    padding: 8px 4px;
  }

  .testimonial-dot {
    min-width: 20px;
    min-height: 20px;
    padding: 4px;
  }

  /* Disable hover-only effects for touch */
  .service-card:active {
    transform: scale(0.98);
  }

  .project-card .absolute.top-4.right-4 {
    opacity: 1 !important;
    transform: translateY(0) !important;
  }

  /* Scroll indicator bounce — reduce on mobile for battery */
  .animate-bounce {
    animation-duration: 2s;
  }
}

/* ── Print styles ──────────────────────────────────────── */
@media print {
  #site-navigation,
  #mobile-menu,
  #sticky-buttons,
  #sticky-mobile,
  .hero-scroll,
  .hero-trust-bar,
  #project-lightbox {
    display: none !important;
  }

  section {
    padding-top: 1.5rem !important;
    padding-bottom: 1.5rem !important;
    break-inside: avoid;
  }
}

/* ── Landscape phone fix ───────────────────────────────── */
@media (max-height: 500px) and (orientation: landscape) {
  #hero {
    min-height: auto;
    padding-top: 5rem;
    padding-bottom: 2rem;
  }

  .hero-headline {
    font-size: 1.75rem !important;
  }

  .hero-scroll {
    display: none;
  }

  #hero .section-padding {
    padding-top: 5rem;
    padding-bottom: 2rem;
  }
}

/* ═══════════════════════════════════════════════════════════
   SERVICES PAGE STYLES
   ═══════════════════════════════════════════════════════════ */

/* ── Section Dividers ─────────────────────────────────── */
.sp-service-section + .sp-service-section {
  border-top: 1px solid var(--border-color);
  transition: border-color 0.5s ease;
}

/* ── Service Detail Sections ──────────────────────────── */
.sp-detail-image img {
  transition: transform 0.7s ease;
}

.sp-detail-image:hover img {
  transform: scale(1.02);
}

/* ── Why Choose Cards ──────────────────────────────────── */
.sp-why-card:hover {
  background: rgba(255, 255, 255, 0.1) !important;
  border-color: rgba(77, 156, 255, 0.3) !important;
  transform: translateY(-4px);
}

/* ── Services Page Responsive ─────────────────────────── */

/* Extra-small screens (< 480px) */
@media (max-width: 479px) {
  #services-hero {
    padding-top: 6rem;
    padding-bottom: 2.5rem;
  }

  #services-hero .sp-hero-headline {
    font-size: 1.75rem !important;
    line-height: 1.15 !important;
  }

  .sp-detail-content h2 {
    font-size: 1.5rem !important;
    line-height: 1.2 !important;
  }

  .sp-detail-image img {
    height: 220px !important;
  }

  #why-zentrix h2,
  #sp-service-areas h2,
  #services-cta h2 {
    font-size: 1.5rem !important;
    line-height: 1.2 !important;
  }

  .sp-why-card {
    padding: 1.25rem !important;
  }

  /* Contact & Location sub-page hero */
  #contact-hero {
    padding-top: 5.5rem !important;
    padding-bottom: 2.5rem !important;
  }

  #contact-hero .sp-hero-headline {
    font-size: 1.75rem !important;
    line-height: 1.15 !important;
  }

  #contact-hero h2 {
    font-size: 1.5rem !important;
    line-height: 1.2 !important;
  }
}

/* Small screens (< 640px) */
@media (max-width: 639px) {
  .sp-detail-image,
  .sp-detail-content {
    order: unset !important;
  }

  .sp-detail-image img {
    height: 240px !important;
  }

  #why-zentrix .grid {
    grid-template-columns: 1fr !important;
  }

  #sp-service-areas .grid {
    grid-template-columns: 1fr !important;
  }

  /* Override inline styles for mobile */
  .sp-service-section {
    padding-top: 3.5rem !important;
    padding-bottom: 3.5rem !important;
  }

  #why-zentrix,
  #sp-service-areas,
  #services-cta {
    padding-top: 4rem !important;
    padding-bottom: 4rem !important;
  }

  #services-hero {
    padding-top: 6rem !important;
    padding-bottom: 3rem !important;
  }

  .page-template-page-services footer {
    padding-bottom: 5rem !important;
  }

  /* Contact & Location page mobile overrides */
  #contact-hero {
    padding-top: 6rem !important;
    padding-bottom: 3rem !important;
  }

  #contact-form-section {
    padding-top: 3.5rem !important;
    padding-bottom: 3.5rem !important;
  }

  #contact-form-section .grid {
    grid-template-columns: 1fr !important;
    gap: 2rem !important;
  }

  .page-template-page-contact footer,
  .page-template-page-location footer {
    padding-bottom: 5rem !important;
  }
}

/* Medium screens (< 768px) */
@media (max-width: 767px) {
  .sp-detail-image .absolute {
    position: relative !important;
    bottom: auto !important;
    right: auto !important;
    left: auto !important;
    display: inline-flex !important;
    margin-top: 0.5rem !important;
    border-radius: 0.75rem !important;
  }
}

/* Tablet landscape (640px – 1023px) */
@media (min-width: 640px) and (max-width: 1023px) {
  .sp-service-section {
    padding-top: 5rem !important;
    padding-bottom: 5rem !important;
  }

  #why-zentrix,
  #sp-service-areas,
  #services-cta {
    padding-top: 5.5rem !important;
    padding-bottom: 5.5rem !important;
  }

  .sp-detail-image img {
    height: 320px !important;
  }
}

/* ═══════════════════════════════════════════════════════════
   PROJECTS PAGE STYLES
   ═══════════════════════════════════════════════════════════ */

/* ── Filter Tabs ───────────────────────────────────────── */
.pp-filter-btn {
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  background-color: var(--bg-card, #ffffff);
  border: 1px solid var(--border-color, rgba(0, 0, 0, 0.1));
  color: var(--text-title, #333333);
}

.pp-filter-btn:hover {
  border-color: #4d9cff;
  color: #4d9cff;
}

.pp-filter-btn.active {
  background-color: #0044cc !important;
  border-color: #0044cc !important;
  color: #ffffff !important;
}

.dark .pp-filter-btn {
  background-color: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.9);
}

.dark .pp-filter-btn:hover {
  border-color: #1b7bfe;
  color: #1b7bfe;
}

.dark .pp-filter-btn.active {
  background-color: #1b7bfe !important;
  border-color: #1b7bfe !important;
  color: #030712 !important;
  font-weight: 700;
}

/* ── Project Specifications Box ────────────────────────── */
.pp-specs-box {
  padding: 1.5rem;
  border-radius: 1rem;
  background-color: var(--bg-card, #ffffff);
  border: 1px solid var(--border-color, rgba(0, 0, 0, 0.08));
  box-shadow: var(--card-shadow);
  transition: all 0.5s ease;
}

.pp-specs-title {
  font-size: 0.75rem !important;
  font-weight: 700 !important;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-title);
  margin-bottom: 1rem !important;
}

.pp-specs-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

.pp-specs-item {
  display: flex;
  flex-direction: column;
}

.pp-specs-label {
  font-size: 10px !important;
  font-weight: 700 !important;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-body);
  opacity: 0.55;
  line-height: 1;
}

.pp-specs-value {
  font-size: 0.75rem !important;
  font-weight: 600 !important;
  color: var(--text-title);
  margin-top: 0.25rem;
  line-height: 1.35;
}

.dark .pp-specs-box {
  background-color: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.08);
}

/* ── Case Studies Detail Sections ──────────────────────── */
.pp-case-section {
  border-bottom: 1px solid var(--border-color);
  transition: border-color 0.5s ease;
}

.pp-case-image img {
  transition: transform 0.7s ease;
}

.pp-case-image:hover img {
  transform: scale(1.02);
}

/* ── Projects Page Responsive ─────────────────────────── */

/* Extra-small screens (< 480px) */
@media (max-width: 479px) {
  #projects-hero {
    padding-top: 6rem;
    padding-bottom: 2.5rem;
  }

  #projects-hero .pp-hero-headline {
    font-size: 1.75rem !important;
    line-height: 1.15 !important;
  }

  .pp-case-content h2 {
    font-size: 1.5rem !important;
    line-height: 1.2 !important;
  }

  .pp-case-image img {
    height: 220px !important;
  }

  #projects-gallery h2,
  #projects-faq h2,
  #projects-cta h2 {
    font-size: 1.5rem !important;
    line-height: 1.2 !important;
  }

  .pp-specs-grid {
    grid-template-columns: 1fr !important;
    gap: 0.75rem !important;
  }

  .pp-filter-btn {
    padding: 0.5rem 1rem !important;
    font-size: 10px !important;
  }
}

/* Small screens (< 640px) */
@media (max-width: 639px) {
  .pp-case-image,
  .pp-case-content {
    order: unset !important;
  }

  .pp-case-image img {
    height: 240px !important;
  }

  /* Override inline styles for mobile */
  .pp-case-section,
  #projects-gallery,
  #projects-faq,
  #projects-cta {
    padding-top: 3.5rem !important;
    padding-bottom: 3.5rem !important;
  }

  #projects-hero {
    padding-top: 6rem !important;
    padding-bottom: 3rem !important;
  }

  .page-template-page-projects footer {
    padding-bottom: 5rem !important;
  }
  
  .pp-faq-item h3 {
    font-size: 16px !important;
  }
  
  .pp-faq-item p {
    padding-left: 0 !important;
  }
}

/* Medium screens (< 768px) */
@media (max-width: 767px) {
  .pp-case-image .absolute {
    position: relative !important;
    bottom: auto !important;
    right: auto !important;
    left: auto !important;
    display: inline-flex !important;
    margin-top: 0.5rem !important;
    border-radius: 0.75rem !important;
  }
}

/* Tablet landscape (640px – 1023px) */
@media (min-width: 640px) and (max-width: 1023px) {
  .pp-case-section,
  #projects-gallery,
  #projects-faq,
  #projects-cta {
    padding-top: 5rem !important;
    padding-bottom: 5rem !important;
  }

  .pp-case-image img {
    height: 320px !important;
  }
}

/* ─── Premium Sub-Page Hero & Form styling ─── */

/* Subtle Radial Grid Background for Sub-Page Heroes */
#services-hero,
#projects-hero,
#contact-hero {
  position: relative;
  overflow: hidden;
}

#services-hero::before,
#projects-hero::before,
#contact-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(rgba(27, 123, 254, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(27, 123, 254, 0.03) 1px, transparent 1px);
  background-size: 45px 45px;
  background-position: center top;
  mask-image: radial-gradient(circle at 50% 50%, black, transparent 80%);
  -webkit-mask-image: radial-gradient(circle at 50% 50%, black, transparent 80%);
  pointer-events: none;
  z-index: 1;
}

.dark #services-hero::before,
.dark #projects-hero::before,
.dark #contact-hero::before {
  background-image: 
    linear-gradient(rgba(77, 156, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(77, 156, 255, 0.02) 1px, transparent 1px);
}

/* Custom Select Dropdown Arrow for Form dropdowns */
.zentrix-theme select {
  appearance: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%231b7bfe' stroke-width='2.5'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E") !important;
  background-position: right 1.25rem center !important;
  background-repeat: no-repeat !important;
  background-size: 1.1rem !important;
  padding-right: 3rem !important;
}

.dark .zentrix-theme select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%234d9cff' stroke-width='2.5'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E") !important;
}

/* Glow Focus States for Premium Interactive Feel */
.zentrix-theme input:focus,
.zentrix-theme select:focus,
.zentrix-theme textarea:focus {
  border-color: #1b7bfe !important;
  box-shadow: 0 0 0 4px rgba(27, 123, 254, 0.15) !important;
}

.dark .zentrix-theme input:focus,
.dark .zentrix-theme select:focus,
.dark .zentrix-theme textarea:focus {
  border-color: #4d9cff !important;
  box-shadow: 0 0 0 4px rgba(77, 156, 255, 0.15) !important;
}

/* Brand Light Background for Icon Containers */
.bg-theme-brand-light {
  background-color: rgba(27, 123, 254, 0.08) !important;
}

.dark .bg-theme-brand-light {
  background-color: rgba(77, 156, 255, 0.08) !important;
}

/* Premium Globals: High-contrast Card Backgrounds & Modern Subtle Borders */
.zentrix-theme .bg-theme-card {
  background-color: #ffffff !important;
  border-color: rgba(0, 0, 0, 0.06) !important;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.04), 0 1px 1px rgba(0, 0, 0, 0.02) !important;
}

.dark .zentrix-theme .bg-theme-card {
  background-color: var(--bg-secondary) !important;
  border-color: rgba(255, 255, 255, 0.06) !important;
  box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.5) !important;
}

.zentrix-theme .border-theme {
  border-color: rgba(0, 0, 0, 0.06) !important;
}

.dark .zentrix-theme .border-theme {
  border-color: rgba(255, 255, 255, 0.06) !important;
}

/* ─── Location Page Trust Grid & Cards ────────────────── */
.loc-trust-grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 1.5rem !important;
  width: 100% !important;
}

@media (min-width: 768px) {
  .loc-trust-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 2rem !important;
  }
}

.loc-trust-card {
  display: flex !important;
  align-items: center !important;
  gap: 1rem !important;
  padding: 1.25rem !important;
  background-color: #ffffff !important;
  border: 1px solid rgba(0, 0, 0, 0.06) !important;
  border-radius: 1rem !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02) !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.dark .loc-trust-card {
  background-color: rgba(255, 255, 255, 0.02) !important;
  border-color: rgba(255, 255, 255, 0.06) !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15) !important;
}

.loc-trust-card:hover {
  transform: translateY(-4px) !important;
  border-color: #1b7bfe !important;
  box-shadow: 0 12px 24px -8px rgba(27, 123, 254, 0.15) !important;
}

.dark .loc-trust-card:hover {
  border-color: #4d9cff !important;
  box-shadow: 0 12px 24px -8px rgba(77, 156, 255, 0.15) !important;
}

/* ─── Custom Sub-Page Hero Overlays (Dynamic Theme-Adaptive) ─── */
/* Base: moderate tint so the image is clearly visible */
.subpage-hero-overlay-base {
  position: absolute;
  inset: 0;
  background-color: rgba(255, 255, 255, 0.55);
  transition: background-color 0.5s ease;
  z-index: 1;
}

.dark .subpage-hero-overlay-base {
  background-color: rgba(3, 7, 18, 0.65);
}

/* Gradient: heavier on the left (where text is) fading to lighter on the right (image shows through) */
.subpage-hero-overlay-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0.35) 50%, rgba(255, 255, 255, 0.1) 100%);
  transition: background 0.5s ease;
  z-index: 2;
}

.dark .subpage-hero-overlay-gradient {
  background: linear-gradient(to right, rgba(3, 7, 18, 0.75) 0%, rgba(3, 7, 18, 0.45) 50%, rgba(3, 7, 18, 0.15) 100%);
}

/* Ambient: subtle bottom fade for depth */
.subpage-hero-overlay-ambient {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(255, 255, 255, 0.3), transparent 50%);
  transition: background 0.5s ease;
  z-index: 3;
}

.dark .subpage-hero-overlay-ambient {
  background: linear-gradient(to top, rgba(3, 7, 18, 0.35), transparent 50%);
}

/* ═══════════════════════════════════════════════════════════
   LOCATION PAGE RESPONSIVE OVERRIDES
   ═══════════════════════════════════════════════════════════ */

@media (max-width: 479px) {
  .loc-trust-grid {
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
  }

  .loc-trust-card {
    padding: 1rem !important;
    gap: 0.75rem !important;
  }

  .loc-services-header h2,
  .loc-faq-header h2 {
    font-size: 1.5rem !important;
    line-height: 1.2 !important;
  }

  .loc-service-card .p-6 {
    padding: 1rem !important;
  }

  .loc-service-card .h-48 {
    height: 10rem !important;
  }

  .loc-faq-item h3 {
    font-size: 1rem !important;
  }
}

@media (max-width: 639px) {
  /* Location services grid — stack on mobile */
  .page-template-page-location .grid.sm\:grid-cols-2 {
    grid-template-columns: 1fr !important;
  }

  /* Location FAQ grid — single column */
  .loc-faq-item p {
    padding-left: 0 !important;
  }

  /* Location page sections — tighter padding */
  .page-template-page-location section {
    padding-top: 3.5rem !important;
    padding-bottom: 3.5rem !important;
  }

  .page-template-page-location footer {
    padding-bottom: 5rem !important;
  }
}

/* ─── Photo Blending and Hover Effects ────────────────────── */
/* Make raw project/job-site photos blend seamlessly with the sleek black theme */
.project-card img,
.loc-service-card img,
.service-card img {
  filter: brightness(0.8) contrast(1.05) saturate(0.85);
  transition: filter 0.4s cubic-bezier(0.4, 0, 0.2, 1), transform 0.7s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* On hover, light them up to full color, brightness, and detail */
.project-card:hover img,
.loc-service-card:hover img,
.service-card:hover img {
  filter: brightness(1) contrast(1) saturate(1);
}

/* Ensure full-screen lightbox images display at full original quality */
#lightbox-image {
  filter: none !important;
}

/* ── Accessibility: Reduced Motion ─────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .hero-bg-image {
    transform: none !important;
  }
}
