/* Pacific Agriscience - site-wide styles (header, footer, overrides) */

/* === Font & base consistency === */
html {
  font-size: 16px;
}
body,
.ProseMirror,
.css-6uzl6m,
.site-header,

.chakra-ui-light {
  font-family: 'Source Sans 3', 'MuseoModerno', system-ui, sans-serif !important;
}
body {
  font-size: 1rem;
  line-height: 1.5;
}

/* === Hide Gamma editor icons === */
.card-divider,
.card-divider-button-group {
  display: none !important;
}

/* === Fix content clipping - allow full page to display at 100% zoom === */
/* Gamma sets html height: 100vh and doc-node-root height:100% which clips overflow */
/* Override so height varies with content and a scrollbar appears on the right */
html {
  height: auto !important;
  min-height: auto !important;
  overflow-y: scroll !important;
}
body {
  overflow-y: visible !important;
}
#__next,
#__next .css-6rnmr9,
#__next .css-6uzl6m,
#__next .simple-editor-root,
#__next .css-1kxonj9,
#__next .ProseMirror,
#__next [data-testid="doc-node-root"],
#__next .node-document,
#__next .doc-content-wrapper,
#__next .document-content,
#__next .css-10klw3m,
#__next .css-6s09y6 {
  overflow: visible !important;
  overflow-x: visible !important;
  overflow-y: visible !important;
  height: auto !important;
  min-height: auto !important;
  max-height: none !important;
}
/* Override inline style height:100% on doc-node-root */
div[data-testid="doc-node-root"] {
  height: auto !important;
}

/* === Footer - attached at end of content (not floating) === */
/* Override footer-force: make footer flow with page instead of position:fixed */
.fsite-footer, footer.fsite-footer, body .fsite-footer {
  position: relative !important;
  bottom: auto !important;
  margin-top: auto !important;
}
/* Body layout for footer at end of page */
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
#__next {
  flex: 1;
}


/* === Light background pages === */
body.page-light-bg {
  background: #f5f7fa !important;
}
body.page-light-bg .css-6uzl6m {
  background: #f5f7fa !important;
}

/* === Contact page - form grid, ensure full content visible at 100% zoom === */
/* Ensure contact page scrolls at 100% zoom - form stays accessible */
html.contact-page-html {
  height: auto !important;
  min-height: auto !important;
  overflow-y: scroll !important;
}
body.contact-page {
  overflow-x: visible !important;
  overflow-y: auto !important;
  display: block !important;
}
/* Normal document flow - footer follows content, no sticky/floating */
body.contact-page #__next {
  display: block !important;
  flex: none !important;
  min-height: auto !important;
}
body.contact-page #__next,
body.contact-page .contact-page-grid,
body.contact-page .contact-gamma-left,
body.contact-page .contact-form-section {
  overflow: visible !important;
  min-height: auto !important;
  max-height: none !important;
}
/* Contact page: footer same as thank-you/china-products - direct child of body, normal flow at bottom */
body.contact-page .fsite-footer,
body.contact-page footer.fsite-footer {
  display: block !important;
  visibility: visible !important;
  position: relative !important;
}
body.contact-page #__next {
  padding-bottom: 0 !important;
}
body.contact-page .contact-page-grid {
  width: 100% !important;
  max-width: 1280px !important;
  margin-left: auto !important;
  margin-right: auto !important;
}
body.contact-page .contact-form-section.inquiry-form-box {
  display: block !important;
  visibility: visible !important;
}
/* Hide Gamma's Inquiry Form placeholder entirely – replace with real form */
body.contact-page .contact-gamma-left .block-smartLayout .node-smartLayoutCell:nth-child(2) {
  display: none !important;
}
/* Form inside content layer - grid places it beside content, not below */
body.contact-page .contact-gamma-left {
  display: grid !important;
  grid-template-columns: 1fr minmax(380px, 500px) !important;
  gap: 2rem !important;
  align-items: start !important;
}
/* Wider form when injected into Gamma right cell - prevent stretching over footer */
body.contact-page .contact-form-cell,
body.contact-page .contact-form-cell .contact-form-section {
  min-width: 380px !important;
  max-width: 500px !important;
  align-self: start !important;
  height: auto !important;
  max-height: none !important;
}
body.contact-page .contact-gamma-left > .simple-editor-root {
  grid-column: 1;
  min-width: 0;
}
body.contact-page .contact-gamma-left .contact-form-section.inquiry-form-box {
  grid-column: 2;
  position: relative !important;
  z-index: 1;
}
@media (max-width: 900px) {
  body.contact-page .contact-gamma-left {
    grid-template-columns: 1fr !important;
  }
  body.contact-page .contact-gamma-left .contact-form-section.inquiry-form-box {
    grid-column: 1;
  }
}
body.contact-page .contact-gamma-left,
body.contact-page .contact-gamma-left > .simple-editor-root {
  min-width: 0;
  overflow: visible !important;
}

/* === Header / navbar === */
.site-header.gamma-navbar-style {
  position: sticky;
  top: 0;
  z-index: 1000;
  padding: 1rem 2rem;
  font-family: 'Source Sans 3', 'MuseoModerno', system-ui, sans-serif;
}
.site-header.gamma-navbar-style .navbar-view-backdrop {
  position: absolute;
  inset: 0;
  border-radius: 0;
  background: #2B4150;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06), 0 0 0 1px rgba(0, 0, 0, 0.05);
}
.site-header.gamma-navbar-style .header-nav {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1100px;
  margin: 0 auto;
}
.site-header.gamma-navbar-style .logo {
  font-size: 1.375rem;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
}
.site-header.gamma-navbar-style .logo:hover {
  opacity: 0.92;
}
.site-header.gamma-navbar-style .nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  align-items: center;
}
.site-header.gamma-navbar-style .nav-link {
  color: rgba(255, 255, 255, 0.95);
  text-decoration: none;
  font-weight: 500;
  font-size: 1rem;
  transition: opacity 0.2s;
}
.site-header.gamma-navbar-style .nav-link:hover {
  opacity: 0.85;
  text-decoration: underline;
}
/* Products page - regional section heading links */
.products-region-link {
  color: inherit;
  text-decoration: none;
}
.products-region-link:hover {
  text-decoration: underline;
  opacity: 0.92;
}

/* Products dropdown */
.nav-dropdown {
  position: relative;
}
.nav-dropdown .nav-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  background: #2B4150;
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  padding: 0.5rem 0;
  padding-top: 0.5rem; /* padding bridges gap - keeps hover when moving mouse down */
  margin-top: 0;
  z-index: 1001;
}
/* Invisible bridge so mouse never leaves hover area when moving from Products to menu */
.nav-dropdown .nav-dropdown-menu::before {
  content: '';
  position: absolute;
  bottom: 100%;
  left: 0;
  right: 0;
  height: 0.5rem;
}
.nav-dropdown:hover .nav-dropdown-menu {
  display: block;
}
.nav-dropdown-menu a {
  display: block;
  padding: 0.5rem 1rem;
  color: rgba(255, 255, 255, 0.95);
  text-decoration: none;
  font-size: 0.9375rem;
  white-space: nowrap;
}
.nav-dropdown-menu a:hover {
  background: rgba(255,255,255,0.1);
  color: #fff;
}
@media (max-width: 700px) {
  .site-header.gamma-navbar-style .header-nav {
    flex-direction: column;
    gap: 1rem;
  }
  .site-header.gamma-navbar-style .nav-links {
    justify-content: center;
  }
}

/* === Footer === */
.site-footer {
  font-family: 'Source Sans 3', 'MuseoModerno', system-ui, sans-serif;
  background: #1a1b1d;
  color: #ececed;
  margin-top: auto;
  padding: 2rem 2rem 1rem;
}
.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 2rem;
  align-items: flex-start;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.footer-brand strong {
  display: block;
  font-size: 1.125rem;
  margin-bottom: 0.4rem;
  color: #fff;
}
.footer-brand .footer-company {
  font-size: 1.25rem;
}
.footer-brand p {
  font-size: 0.875rem;
  opacity: 0.8;
  margin: 0;
}
.footer-tagline {
  font-size: 0.8125rem;
  opacity: 0.7;
  margin-top: 0.5rem;
}
.footer-website,
.ffooter-website {
  margin-top: 0.5rem;
}
.footer-website a,
.ffooter-website a {
  color: #84c1fa;
  text-decoration: none;
  white-space: nowrap !important;
}
.footer-website a:hover {
  text-decoration: underline;
}
.footer-contact strong {
  display: block;
  font-size: 0.9375rem;
  margin-bottom: 0.35rem;
  color: #fff;
}
.footer-contact p {
  font-size: 0.8125rem;
  opacity: 0.8;
  margin: 0;
}
.footer-contact a {
  color: #84c1fa;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  justify-content: flex-end;
}
.site-footer .footer-links a {
  color: #84c1fa;
  text-decoration: none;
}
.site-footer .footer-links a:hover {
  text-decoration: underline;
}
.footer-bottom {
  max-width: 1100px;
  margin: 0 auto;
  padding-top: 1rem;
  text-align: center;
  font-size: 0.8125rem;
  opacity: 0.85;
  line-height: 1.5;
}
.footer-bottom .footer-company-name {
  font-weight: 600;
  color: #fff;
}
@media (max-width: 700px) {
  .footer-inner {
    grid-template-columns: 1fr;
    flex-direction: column;
    gap: 1.5rem;
  }
}