/*
 Theme Name:   Bricks Child Theme
 Theme URI:    https://bricksbuilder.io/
 Description:  Use this child theme to extend Bricks.
 Author:       Bricks
 Author URI:   https://bricksbuilder.io/
 Template:     bricks
 Version:      1.1
 Text Domain:  bricks
*/

/* JiurunCut Global Responsive Design System — 2026-08-10 */
:root {
  --jr-container: 1320px;
  --jr-gutter-desktop: 32px;
  --jr-gutter-laptop: 24px;
  --jr-gutter-tablet: 20px;
  --jr-gutter-mobile: 16px;
  --jr-gutter-compact: 14px;
  --jr-section-space: clamp(56px, 7vw, 120px);
  --jr-navy: #0B2E59;
  --jr-yellow: #F5B400;
  --jr-soft: #F5F8FC;
}

html { scroll-padding-top: 120px; }
body { min-width: 0; }
#brx-content.wordpress { width: 100%; max-width: none; margin-inline: 0; padding-inline: 0; }
#brx-content *, #brx-header *, #brx-footer * { min-width: 0; }
#brx-content :where(p, li, td, th, a, h1, h2, h3, h4) { overflow-wrap: break-word; }
#brx-content :where(img, video, iframe, svg) { max-width: 100%; }
#brx-content img { display: block; height: auto; }

/* Shared container contract */
:where(.jr-container,.jr-products-container,.jr-wrap,.jr-faq-wrap,.jr-blog-shell,.jrc-shell,.jr-global-header__inner,.jr-main-header__inner,.jr-global-footer__inner) {
  width: calc(100% - 64px) !important;
  max-width: var(--jr-container) !important;
  margin-inline: auto !important;
}

/* Archive/search/404 shells */
:where(body.archive,body.search,body.error404) #brx-content > .brxe-container {
  width: calc(100% - 64px);
  max-width: var(--jr-container);
  margin-inline: auto;
}

/* Fluid type: one DOM, one semantic heading */
#brx-content h1 { font-size: clamp(38px, 4.3vw, 68px) !important; line-height: 1.05 !important; letter-spacing: -.02em !important; }
#brx-content main h2 { font-size: clamp(30px, 3vw, 48px); line-height: 1.12; letter-spacing: -.02em; }
#brx-content main h3 { line-height: 1.25; }

/* Shared interaction and media rules */
:where(#brx-content,#brx-header,#brx-footer) :where(button,input[type="submit"],input[type="button"],.jr-btn,.jrc-btn,.jr-products-btn,.jr-blog-button) {
  min-height: 48px;
  border-radius: 10px;
}
@media (hover:hover) {
  :where(#brx-content,#brx-header,#brx-footer) :where(button,input[type="submit"],.jr-btn,.jrc-btn,.jr-products-btn,.jr-blog-button):hover { transform: translateY(-2px); }
}
:where(#home-inquiry-top,#contact,[id*="inquiry"],[id*="quote"],[id*="form"],.fluentform) { scroll-margin-top: 120px; }

/* Fluent Forms */
.fluentform :where(input:not([type="checkbox"]):not([type="radio"]),select,textarea,.ff_upload_btn) { max-width: 100%; }
.fluentform :where(input:not([type="checkbox"]):not([type="radio"]),select) { min-height: 48px; }
.fluentform textarea { min-height: 132px; }
.fluentform :where(.ff-el-group,.ff-el-input--content,.ff_upload_btn) { min-width: 0; max-width: 100%; }
.fluentform .ff-message-success,.fluentform .error { overflow-wrap: anywhere; }

/* Tables stay inside their own scroller, never the page */
:where(.jr-table-wrap,.jr-products-table-wrap,.wp-block-table) { width: 100%; max-width: 100%; overflow-x: auto !important; -webkit-overflow-scrolling: touch; }
:where(.jr-table-wrap,.jr-products-table-wrap,.wp-block-table) table { max-width: none; }

/* Remove the duplicate theme title on custom single-post layouts */
.single-post #brx-content > .bricks-post-header { display: none !important; }

/* Home */
.home-trust__grid { grid-template-columns: repeat(6,minmax(0,1fr)) !important; }
.home-products__grid,.home-solutions__grid,.home-cases__grid { grid-template-columns: repeat(3,minmax(0,1fr)) !important; }
.home-advantages__grid { grid-template-columns: repeat(3,minmax(0,1fr)) !important; }

/* Products */
.jr-products-grid--three { grid-template-columns: repeat(3,minmax(0,1fr)) !important; }
.jr-products-grid--four,.jr-products-proof-grid { grid-template-columns: repeat(4,minmax(0,1fr)) !important; }
.jr-products-quick-nav__inner { min-width: 0; }

/* Solutions */
.jr-industry-grid,.jr-challenge-grid,.jr-evidence-grid { grid-template-columns: repeat(3,minmax(0,1fr)) !important; }
.jr-process-grid { grid-template-columns: repeat(4,minmax(0,1fr)) !important; }

/* FAQ / Blog / About */
.jr-faq-trust-grid { width: calc(100% - 64px); max-width: var(--jr-container); margin-inline: auto; grid-template-columns: repeat(6,minmax(0,1fr)) !important; }
.jr-faq-answer-wrap { width: 100%; max-width: 960px; }
.jr-blog-topic-scroll { width: 100%; max-width: 100%; overflow-x: auto !important; overscroll-behavior-inline: contain; scrollbar-width: thin; }
.jrc-proof__grid { grid-template-columns: repeat(5,minmax(0,1fr)) !important; }

/* Floating contact is an overlay, never a layout column */
.jr-floating-contact { position: fixed !important; }
.jr-mobile-cta { position: fixed; }

@media (max-width: 1199px) {
  :where(.jr-container,.jr-products-container,.jr-wrap,.jr-faq-wrap,.jr-blog-shell,.jrc-shell,.jr-global-header__inner,.jr-main-header__inner,.jr-global-footer__inner) {
    width: calc(100% - 48px) !important;
  }
  :where(body.archive,body.search,body.error404) #brx-content > .brxe-container { width: calc(100% - 48px); }
  .home-trust__grid { grid-template-columns: repeat(3,minmax(0,1fr)) !important; }
  .home-products__grid,.home-advantages__grid,.home-solutions__grid,.home-cases__grid { grid-template-columns: repeat(2,minmax(0,1fr)) !important; }
  .jr-products-grid--three,.jr-products-grid--four,.jr-products-proof-grid { grid-template-columns: repeat(2,minmax(0,1fr)) !important; }
  .jr-industry-grid,.jr-challenge-grid,.jr-evidence-grid,.jr-process-grid { grid-template-columns: repeat(2,minmax(0,1fr)) !important; }
  .jr-faq-trust-grid { width: calc(100% - 48px); grid-template-columns: repeat(3,minmax(0,1fr)) !important; }
  .jr-floating-contact { display: none !important; }
}

@media (max-width: 991px) {
  :where(.jr-container,.jr-products-container,.jr-wrap,.jr-faq-wrap,.jr-blog-shell,.jrc-shell,.jr-global-header__inner,.jr-main-header__inner,.jr-global-footer__inner) {
    width: calc(100% - 40px) !important;
  }
  :where(body.archive,body.search,body.error404) #brx-content > .brxe-container { width: calc(100% - 40px); }
  :where(.home-hero__container,.home-nev-solution__grid,.home-factory__grid,.home-final-cta__grid,
    .jr-products-hero__grid,.jr-products-split__grid,
    .jr-hero-grid,.jr-finder,.jr-inquiry-grid,
    .jr-faq-hero-grid,.jr-faq-reference,.jr-faq-decision,.jr-faq-performance-grid,
    .jrc-hero__grid,.jrc-grid-2,.jrc-grid-2--wide-visual,.jrc-grid-2--wide-copy) {
    grid-template-columns: minmax(0,1fr) !important;
  }
  .jr-faq-trust-grid { width: calc(100% - 40px); }
  .jr-global-footer__grid { grid-template-columns: repeat(2,minmax(0,1fr)) !important; }
}

@media (max-width: 767px) {
  :where(.jr-container,.jr-products-container,.jr-wrap,.jr-faq-wrap,.jr-blog-shell,.jrc-shell,.jr-global-header__inner,.jr-main-header__inner,.jr-global-footer__inner) {
    width: calc(100% - 32px) !important;
  }
  :where(body.archive,body.search,body.error404) #brx-content > .brxe-container { width: calc(100% - 32px); }
  .home-products__grid,.home-advantages__grid,.home-solutions__grid,.home-cases__grid,
  .jr-products-grid--three,.jr-products-grid--four,.jr-products-proof-grid,
  .jr-industry-grid,.jr-challenge-grid,.jr-evidence-grid,.jr-process-grid,
  .jr-blog-featured-grid,.jr-blog-article,
  .jrc-capabilities,.jrc-apps,.jrc-team-grid {
    grid-template-columns: minmax(0,1fr) !important;
  }
  .home-trust__grid,.jr-faq-trust-grid,.jrc-proof__grid { grid-template-columns: repeat(2,minmax(0,1fr)) !important; }
  .jr-faq-trust-grid { width: calc(100% - 32px); }
  .jrc-proof__item:last-child { grid-column: 1 / -1; }
  .jr-products-quick-nav__inner { overflow-x: auto; flex-wrap: nowrap !important; overscroll-behavior-inline: contain; }
  .jr-products-quick-nav__inner > * { flex: 0 0 auto; white-space: nowrap; }
  .jr-global-footer__grid { grid-template-columns: minmax(0,1fr) !important; }
  .fluentform .ff-t-container { display: grid !important; grid-template-columns: minmax(0,1fr) !important; gap: 0 !important; }
  .fluentform .ff-t-cell { width: 100% !important; flex-basis: 100% !important; }
  .fluentform :where(input[type="submit"],button[type="submit"],.ff-btn-submit,.ff_upload_btn) { width: 100%; }
  .brxe-post-navigation { display: grid !important; grid-template-columns: minmax(0,1fr) !important; gap: 16px; }
}

@media (max-width: 477px) {
  :where(.jr-container,.jr-products-container,.jr-wrap,.jr-faq-wrap,.jr-blog-shell,.jrc-shell,.jr-global-header__inner,.jr-main-header__inner,.jr-global-footer__inner) {
    width: calc(100% - 28px) !important;
  }
  :where(body.archive,body.search,body.error404) #brx-content > .brxe-container { width: calc(100% - 28px); }
  .jr-faq-trust-grid { width: calc(100% - 28px); }
  :where(.jr-actions,.jrc-actions,.jr-products-actions,.jr-blog-actions) { display: grid !important; grid-template-columns: minmax(0,1fr) !important; }
  :where(.jr-actions,.jrc-actions,.jr-products-actions,.jr-blog-actions) > :where(a,button) { width: 100% !important; }
}

@media (prefers-reduced-motion: reduce) {
  *,*::before,*::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
