/* ==========================================================================
   Sharjah Chemical — homepage + global polish layer (2026-10-11)
   Loaded last. Fixes: edge-to-edge content at laptop widths, horizontal
   overflow, over-truncated card titles, cramped blog list, Arial fallback
   in the footer, featured-products section (replaces empty demo team block).
   ========================================================================== */

/* Stretched sliders (pbmit-col-stretched-*) bleed past the viewport by design;
   clip instead of hidden so the sticky "Our Process" card stack keeps working. */
html, body { overflow-x: clip; }

/* Theme container is 1524px wide with a 12px gutter -> text touched the screen
   edge on 1280-1600px laptops. Give it a real gutter. */
.container { padding-left: clamp(16px, 3.4vw, 56px); padding-right: clamp(16px, 3.4vw, 56px); }
.container .container { padding-left: 0; padding-right: 0; }
.container.is-row { padding-left: clamp(16px, 3.4vw, 56px); padding-right: clamp(16px, 3.4vw, 56px); }

/* Headings: balanced wrapping, no orphans */
.pbmit-heading-subheading .pbmit-title,
.sj-product-card__title,
.pbmit-element-title { text-wrap: balance; }

/* Hero: keep the description readable on bright photos */
.pbmit-slider-item .pbmit-slider-bg::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(3, 37, 30, .72) 0%, rgba(3, 37, 30, .38) 55%, rgba(3, 37, 30, 0) 100%);
  pointer-events: none;
}
.pbmit-slider-item .pbmit-slider-bg { position: absolute; }
.pbmit-slider-item .container { position: relative; z-index: 2; }

/* Icon-box row under the hero: 32px titles clamped to 2 lines cut off
   "Marine & Oil Field Chemicals" -> smaller, allow 3 lines, no ellipsis. */
.pbmit-ihbox-style-1 .pbmit-element-title {
  font-size: clamp(22px, 1.8vw, 28px);
  line-height: 1.22;
  -webkit-line-clamp: 3;
  letter-spacing: -0.01em;
}

/* Stats column ("4000+ / 60+ / 15+"): tabular figures so counting doesn't jitter */
.pbmit-number-rotate, .pbmit-fid-inner { font-variant-numeric: tabular-nums; }

/* ---------- Featured products (section 32, was "Meet our team") ---------- */
.sj-featured-products { background: var(--sj-surface, #f7f7f5); }
.sj-featured-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 32px 64px; flex-wrap: wrap; margin-bottom: 48px;
}
.sj-featured-head .pbmit-heading-subheading { margin-bottom: 0; max-width: 640px; }
.sj-featured-head__aside { max-width: 420px; }
.sj-featured-head__aside p { margin: 0 0 20px; line-height: 1.65; text-wrap: pretty; }
.sj-featured-products .sj-product-grid { gap: 24px; }
.sj-featured-products .sj-product-card { height: 100%; display: flex; flex-direction: column; background: #fff; }
.sj-featured-products .sj-product-card__body { display: flex; flex-direction: column; flex: 1; }
.sj-featured-products .sj-product-card__foot { margin-top: auto; }
@media (max-width: 767px) {
  .sj-featured-head { margin-bottom: 32px; }
}

/* ---------- Latest blog (right half) ---------- */
/* Theme pads this box 120/200/120/100px -> titles squeezed to ~180px & clamped. */
.blog-one-rightbox { padding: clamp(56px, 7vw, 110px) clamp(24px, 6vw, 96px) clamp(56px, 7vw, 110px) clamp(24px, 5vw, 80px) !important; }
.blog-one-rightbox .pbmit-blog-style-2 .pbmit-featured-wrapper img {
  aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px;
}
.blog-one-rightbox .pbmit-blog-style-2 .pbmit-post-title,
.blog-one-rightbox .pbmit-blog-style-2 h3 {
  font-size: clamp(18px, 1.35vw, 22px); line-height: 1.3; -webkit-line-clamp: 3;
}

/* ---------- Footer ---------- */
/* Footer widgets fell back to Arial (no font-family on these wrappers). */
.site-footer, .site-footer p, .site-footer a, .site-footer li, .site-footer label,
.site-footer input, .site-footer .pbmit-contact-widget-lines, .site-footer .pbmit-footer-text-area {
  font-family: var(--pbmit-body-typography-font-family);
}
.site-footer .pbmit-contact-widget-phone, .site-footer .pbmit-contact-widget-phone a {
  font-family: var(--pbmit-heading-typography-font-family);
}
/* Newsletter form: inline pill input + button instead of raw browser controls */
.site-footer .webform-submission-newsletter-form-form { display: flex; align-items: flex-end; gap: 0; position: relative; }
.site-footer .webform-submission-newsletter-form-form .form-item-email-address { flex: 1; margin: 0 !important; }
.site-footer .webform-submission-newsletter-form-form label { font-size: 13px; letter-spacing: .04em; opacity: .7; margin-bottom: 8px; }
.site-footer .webform-submission-newsletter-form-form input[type=email] {
  width: 100%; height: 52px; padding: 0 18px; color: #fff;
  background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 999px 0 0 999px; outline: none; transition: border-color .2s, background .2s;
}
.site-footer .webform-submission-newsletter-form-form input[type=email]:focus { border-color: var(--sj-green); background: rgba(255, 255, 255, .1); }
.site-footer .webform-submission-newsletter-form-form .form-actions { margin: 0 !important; }
.site-footer .webform-submission-newsletter-form-form .form-submit {
  height: 52px; width: auto; padding: 0 26px; border: 0; border-radius: 0 999px 999px 0;
  background: var(--sj-green); color: #fff; font-weight: 600; letter-spacing: .02em;
  font-family: var(--pbmit-btn-typography-font-family); transition: filter .2s, transform .1s;
}
.site-footer .webform-submission-newsletter-form-form .form-submit:hover { filter: brightness(1.08); }
.site-footer .webform-submission-newsletter-form-form .form-submit:active { transform: translateY(1px); }

/* Visible keyboard focus everywhere */
a:focus-visible, button:focus-visible, input:focus-visible, .pbmit-btn:focus-visible {
  outline: 2px solid var(--sj-green); outline-offset: 3px;
}

/* ---------- Hero slider ---------- */
/* 100px titles wrapped to 4 lines (500px) and pushed the copy below the fold;
   2.4s stagger meant the headline was barely visible before autoplay moved on. */
.pbmit-slider-one .pbmit-slider-item .pbmit-title,
.pbmit-slider-one .pbmit-slider-item .pbmit-title strong {
  font-size: clamp(40px, 5.2vw, 80px);
  line-height: 1.04;
}
.pbmit-slider-one .pbmit-slider-item .pbmit-title {
  letter-spacing: -0.025em;
  max-width: 15ch;
  text-wrap: balance;
}
.pbmit-slider-one .pbmit-slider-content .pbmit-sub-title { margin-bottom: 22px; }
.pbmit-slider-one .pbmit-slider-content .pbmit-desc { max-width: calc(260px + 52ch); text-wrap: pretty; }
.pbmit-slider-one .pbmit-slider-content .pbmit-desc br { display: none; }
@media (max-width: 991px) { .pbmit-slider-one .pbmit-slider-content .pbmit-desc { max-width: 60ch; } }
.pbmit-slider-area .transform-left,
.pbmit-slider-area .transform-bottom { transition-duration: 750ms; transition-timing-function: cubic-bezier(.2, .7, .2, 1); }
.pbmit-slider-area .transform-left { transform: translateX(-60px); }
.pbmit-slider-area .swiper-slide-active .transform-left,
.pbmit-slider-area .swiper-slide-active .transform-bottom { transform: none; opacity: 1; }
.swiper-slide-active .transform-delay-1 { transition-delay: 150ms; }
.swiper-slide-active .transform-delay-2 { transition-delay: 300ms; }
.swiper-slide-active .transform-delay-3 { transition-delay: 500ms; }
.swiper-slide-active .transform-delay-4 { transition-delay: 650ms; }
@media (prefers-reduced-motion: reduce) {
  .pbmit-slider-area .transform-left, .pbmit-slider-area .transform-bottom { transition: none; opacity: 1; transform: none; }
}

/* Newsletter: align button with the input baseline */
.site-footer .webform-submission-newsletter-form-form { align-items: flex-end; }
.site-footer .webform-submission-newsletter-form-form .form-actions { align-self: flex-end; }
.site-footer .webform-submission-newsletter-form-form .form-submit { position: static !important; margin: 0 !important; transform: none; }

/* Featured products: every CRM product shares one placeholder photo, so a grid
   of 8 identical buckets looked broken -> compact text cards here instead. */
.sj-featured-products .sj-product-card__media { aspect-ratio: auto !important; height: auto !important; padding: 24px 24px 0; background: none !important; display: block; }
.sj-featured-products .sj-product-card__media img { display: none; }
.sj-featured-products .sj-product-card__cat { position: static !important; display: inline-block; }
.sj-featured-products .sj-product-card { border-radius: 14px; border: 1px solid var(--sj-line); box-shadow: none; transition: transform .25s ease, box-shadow .25s ease, border-color .25s; }
.sj-featured-products .sj-product-card:hover { transform: translateY(-3px); box-shadow: var(--sj-shadow-hover); border-color: transparent; }
.sj-featured-products .sj-product-card__body { padding: 16px 24px 22px; }
.sj-featured-products .sj-product-card__title { font-size: 20px; line-height: 1.25; margin-bottom: 10px; }
.sj-featured-products .pager, .sj-featured-products nav.pager, .sj-featured-products .pagination { display: none; }
@media (min-width: 1200px) { .sj-featured-products .sj-product-grid { grid-template-columns: repeat(4, 1fr); } }

/* viewsreference ignores the 8-item limit on this display -> cap visually */
.sj-featured-products .sj-product-grid > .views-row:nth-child(n+9) { display: none; }
.site-footer .webform-submission-newsletter-form-form .form-submit { line-height: 52px; padding-top: 0; padding-bottom: 0; }
.site-footer .sj-copyright { margin: 0; font-size: 14px; opacity: .75; }
.pbmit-slider-one .pbmit-slider-content { overflow: visible; }
@media (max-width: 767px) { .sj-featured-products .sj-product-grid > .views-row:nth-child(n+5) { display: none; } }
