/**
 * Quantra — modern layout & mobile enhancements (loads after theme CSS)
 */
html.site-modern {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: reduce) {
  html.site-modern {
    scroll-behavior: auto;
  }
}

html.site-modern {
  --qm-radius: 12px;
  --qm-radius-sm: 8px;
  --qm-radius-lg: 20px;
  --qm-shadow: 0 4px 24px rgba(15, 23, 42, 0.08);
  --qm-shadow-lg: 0 12px 40px rgba(15, 23, 42, 0.12);
  --qm-ring: 0 0 0 3px rgba(0, 48, 98, 0.25);
}

html.site-modern body {
  overflow-x: clip;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html.site-modern #wrapper {
  min-height: 100dvh;
}

/* Sticky header — keep original theme colors (do not set background; theme uses dark header) */
html.site-modern #pageHeaderWrapper.main-header {
  position: sticky;
  top: 0;
  z-index: 10050;
  transition: box-shadow 0.2s ease;
}

html.site-modern #pageHeaderWrapper.main-header.is-scrolled {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

/* Google Translate widget (replaces GTranslate plugin in .language-selector) */
html.site-modern .language-selector {
  position: relative;
  z-index: 10060;
}

html.site-modern .language-selector .goog-te-gadget {
  font-family: inherit !important;
  color: inherit;
}

/* Contact page — increase contrast / readability */
html.site-modern .ContactSection2 {
  background-color: #0b1220 !important;
  background-image: linear-gradient(155deg, rgba(3, 10, 20, 0.85) 0%, rgba(0, 48, 98, 0.35) 40%, rgba(3, 10, 20, 0.9) 100%),
    url("/wp-content/uploads/2025/03/bg-contact2.jpg") !important;
  background-size: cover, cover !important;
  background-position: center, center !important;
  background-repeat: no-repeat, no-repeat !important;
}

html.site-modern .ContactSection2 .container {
  position: relative;
  z-index: 1;
}

html.site-modern .ContactSection2 .qm-contact-form {
  max-width: 980px;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  padding: clamp(16px, 3vw, 28px);
  backdrop-filter: blur(8px);
}

html.site-modern .ContactSection2 .qm-contact-form .form-control {
  background: rgba(255, 255, 255, 0.95) !important;
}

html.site-modern .ContactSection2 .qm-contact-form .qm-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Fluid horizontal padding for main containers */
html.site-modern .container-fluid {
  padding-left: clamp(1rem, 4vw, 2.5rem) !important;
  padding-right: clamp(1rem, 4vw, 2.5rem) !important;
}

html.site-modern .container,
html.site-modern .container-lg {
  max-width: min(1200px, 100%) !important;
  padding-left: clamp(1rem, 3vw, 1.5rem);
  padding-right: clamp(1rem, 3vw, 1.5rem);
}

/* Typography rhythm */
html.site-modern .main-content-wrapper {
  font-size: clamp(0.9375rem, 0.9rem + 0.2vw, 1.0625rem);
  line-height: 1.65;
}

html.site-modern .main-content-wrapper h1,
html.site-modern .main-content-wrapper h2,
html.site-modern .banner-info h2 {
  line-height: 1.2;
  letter-spacing: -0.02em;
}

html.site-modern .banner-info h2 {
  font-size: clamp(1.35rem, 4vw, 2.25rem) !important;
}

/* Images & media */
html.site-modern img,
html.site-modern video {
  max-width: 100%;
  height: auto;
}

html.site-modern .slide-image,
html.site-modern .slide-media {
  background-size: cover !important;
  background-position: center !important;
}

/* Buttons */
html.site-modern .custom-button,
html.site-modern .button,
html.site-modern .woocommerce a.button,
html.site-modern .woocommerce button.button {
  border-radius: var(--qm-radius) !important;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease !important;
}

html.site-modern .custom-button:hover,
html.site-modern .woocommerce a.button:hover {
  transform: translateY(-1px);
  box-shadow: var(--qm-shadow);
}

/* Links — clearer focus for keyboard users */
html.site-modern a:focus-visible {
  outline: 2px solid var(--alternate1, #003062);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Nav — larger tap targets on touch */
html.site-modern .main-menu a,
html.site-modern .sub-menu a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

@media (max-width: 1199.98px) {
  html.site-modern .topRightHeader .main-menu .sub-menu {
    position: static !important;
    box-shadow: none !important;
    padding-left: 0.75rem !important;
    border-radius: var(--qm-radius-sm);
    background: rgba(0, 48, 98, 0.04);
    margin-top: 0.25rem !important;
  }

  html.site-modern .secondary-nav .nav-container {
    max-height: min(70vh, 560px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: env(safe-area-inset-bottom, 0);
  }
}

/* Cards & sections — do not clip the home case-studies strip: background lives on #section5, not the card */
html.site-modern .solution-box,
html.site-modern .pod-box,
html.site-modern .service-box,
html.site-modern .woocommerce ul.products li.product {
  border-radius: var(--qm-radius-lg) !important;
  overflow: hidden;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

html.site-modern .casestudies-box {
  border-radius: var(--qm-radius-lg) !important;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

html.site-modern .woocommerce ul.products li.product:hover {
  box-shadow: var(--qm-shadow-lg);
}

/* Tables — horizontal scroll on small screens without breaking layout tables */
html.site-modern .woocommerce table.shop_table {
  display: block;
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--qm-radius-sm);
}

@media (min-width: 768px) {
  html.site-modern .woocommerce table.shop_table {
    display: table;
  }
}

html.site-modern .main-content-wrapper .wp-block-table,
html.site-modern .tdata-list {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Forms */
html.site-modern input[type="text"],
html.site-modern input[type="email"],
html.site-modern input[type="tel"],
html.site-modern input[type="search"],
html.site-modern textarea,
html.site-modern select {
  border-radius: var(--qm-radius-sm) !important;
  min-height: 44px;
  font-size: 16px !important;
}

/* Modals */
html.site-modern .modal-content {
  border-radius: var(--qm-radius-lg) !important;
  border: none !important;
  box-shadow: var(--qm-shadow-lg) !important;
}

/* Footer bar (mobile cart) */
html.site-modern .footer-bar {
  padding-bottom: env(safe-area-inset-bottom, 12px);
  box-shadow: 0 -4px 24px rgba(15, 23, 42, 0.08);
}

/* Utility: no horizontal bleed */
html.site-modern .fullcontainer,
html.site-modern #fullpage {
  max-width: 100vw;
}

/* Home — Section 1 (About Us): match two-column balance; lazy SVG had 0×0 and collapsed the left column */
html.site-modern .section.Section1 .Section1-left img.responsive {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

/*
 * Home — Our Solutions (#section2): full-width photo strip (bg-home1) on upper area + white type; cards sit on light grey below (theme).
 * Case Studies (#section5): maroon + texture, white type, red CTA.
 */
html.site-modern #section2.Section2.qm-our-solutions-hero {
  background-color: #e9eef3 !important;
  background-image: linear-gradient(
      to bottom,
      rgba(0, 30, 62, 0.25) 0%,
      rgba(0, 30, 62, 0.08) 45%,
      transparent 70%
    ),
    url("/wp-content/uploads/2025/03/bg-home1.jpg") !important;
  background-size: 100% 50%, 100% 50% !important;
  background-position: top left, top left !important;
  background-repeat: no-repeat, no-repeat !important;
  padding-top: clamp(2rem, 5vw, 3.5rem);
  padding-bottom: clamp(0.5rem, 2vw, 1rem);
}

html.site-modern #section2 .qm-section2-title small {
  color: rgba(255, 255, 255, 0.9) !important;
}

html.site-modern #section2 .qm-section2-title h2 {
  color: #ffffff !important;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}

html.site-modern #section2 .qm-section2-intro p {
  color: rgba(255, 255, 255, 0.95) !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

html.site-modern #section5.Section5.qm-case-studies-hero {
  background-color: #5c1f1c !important;
  background-image: linear-gradient(
      155deg,
      rgba(45, 12, 10, 0.94) 0%,
      rgba(110, 34, 30, 0.82) 42%,
      rgba(40, 10, 8, 0.96) 100%
    ),
    url("/wp-content/uploads/2025/03/bg-home2.jpg") !important;
  background-size: cover, cover !important;
  background-position: center, center !important;
  background-repeat: no-repeat, no-repeat !important;
  padding-top: clamp(2.5rem, 6vw, 4rem);
  padding-bottom: clamp(2rem, 5vw, 3rem);
}

html.site-modern #section5 .pageTitle.white h2,
html.site-modern #section5 .pageTitle.white small {
  color: #ffffff !important;
}

html.site-modern #section5 .casestudies-box-content.white,
html.site-modern #section5 .casestudies-box-content.white h3,
html.site-modern #section5 .casestudies-box-content.white .pageTitle.white small {
  color: #ffffff !important;
}

html.site-modern #section5 .casestudies-box-info p {
  color: rgba(255, 255, 255, 0.9) !important;
}

html.site-modern #section5 .custom-button-holder .custom-button.height-55 {
  background-color: #ee382a !important;
  color: #ffffff !important;
  border-color: transparent !important;
}

html.site-modern section.CaseStudySection1.bg-img.white {
  background-color: #5c1f1c !important;
  background-image: linear-gradient(
      155deg,
      rgba(45, 12, 10, 0.94) 0%,
      rgba(110, 34, 30, 0.82) 42%,
      rgba(40, 10, 8, 0.96) 100%
    ),
    url("/wp-content/uploads/2025/03/bg-case-study1.jpg") !important;
  background-size: cover, cover !important;
  background-position: center, center !important;
  padding-top: clamp(2.5rem, 6vw, 4rem);
  padding-bottom: clamp(2rem, 5vw, 3rem);
}

html.site-modern section.CaseStudySection1.bg-img.white .pageTitle.white h2,
html.site-modern section.CaseStudySection1.bg-img.white h3.white {
  color: #ffffff !important;
}

