/* ===========================================
   Site-Wide Design Fixes — March 2026
   Addresses: nav logo size, checkbox visibility,
   CTA arrow glyph, content centering, section spacing
   =========================================== */

/* ---- 1. NAVIGATION FIXES ---- */

/* Hide checkbox tick on ALL viewports — hard override */
.mobile-menu-checkbox,
input.mobile-menu-checkbox,
#mobile-menu-toggle {
  display: none !important;
  visibility: hidden !important;
  width: 0 !important;
  height: 0 !important;
  opacity: 0 !important;
  position: absolute !important;
  pointer-events: none !important;
}

/* Enlarge desktop logo — was 40px, now 48px */
.logo img,
.site-header .logo img {
  height: 48px;
  width: auto;
}

/* At desktop, ensure proper nav alignment */
@media (min-width: 768px) {
  .header-container {
    gap: 16px;
    align-items: center;
  }
  
  /* Logo sits properly in flow */
  .logo {
    position: relative !important;
    left: auto !important;
    transform: none !important;
    flex-shrink: 0;
  }
  
  .logo img {
    height: 48px;
  }
}

/* Remove the SVG arrow from Free signup button everywhere */
.nav-cta .btn-icon,
.site-header .nav-cta svg,
.header-container .nav-cta svg {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

/* Tighten the nav-cta button so it looks clean without the arrow */
.nav-cta {
  gap: 0 !important;
}


/* ---- 2. SECTION SPACING — REDUCE VERTICAL PADDING ---- */

/* Global: reduce from 96px to 64px desktop, 48px mobile */
.section,
.trust-bar,
.product-showcase,
.comparison-section,
.benefits-section,
.how-it-works,
.scenarios-section,
.testimonials-section,
.trust-us-section,
.who-section,
.final-cta {
  padding-top: 64px;
  padding-bottom: 64px;
}

@media (max-width: 809px) {
  .section,
  .trust-bar,
  .product-showcase,
  .comparison-section,
  .benefits-section,
  .how-it-works,
  .scenarios-section,
  .testimonials-section,
  .trust-us-section,
  .who-section,
  .final-cta {
    padding-top: 48px;
    padding-bottom: 48px;
  }
}

/* Hero: slightly tighter */
.hero {
  min-height: 55vh;
  min-height: 480px;
  max-height: 720px;
  padding-top: 64px;
  padding-bottom: 64px;
}

@media (max-width: 809px) {
  .hero {
    min-height: 50vh;
    min-height: 400px;
    max-height: 600px;
    padding-top: 48px;
    padding-bottom: 48px;
  }
}

/* Email capture: less vertical margin */
.email-capture-section {
  margin-top: 32px !important;
  margin-bottom: 32px !important;
}

/* Social proof strip: tighter */
.social-proof-strip {
  padding-top: 24px;
  padding-bottom: 24px;
}


/* ---- 3. CONTENT CENTERING FIXES ---- */

/* Ensure all major section headings are centred */
.trust-bar h2,
.trust-bar .section-heading,
.comparison-section h2,
.benefits-section h2,
.how-it-works h2,
.scenarios-section h2,
.testimonials-section h2,
.trust-us-section h2,
.who-section h2,
.final-cta h2,
.product-showcase h2 {
  text-align: center;
}

/* Trust bar: centre the grid content */
.trust-bar .grid {
  justify-items: center;
}

.trust-card {
  text-align: center;
  max-width: 360px;
  margin: 0 auto;
}

/* Make sure grid items in 3-col layout are evenly distributed */
.grid.grid-3 {
  justify-content: center;
}

/* Benefits section cards — centre alignment */
.benefits-section .card,
.benefits-section .trust-card {
  text-align: center;
}

/* Product showcase — properly centre the two-col layout */
.product-showcase-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

@media (max-width: 809px) {
  .product-showcase-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

.product-showcase-content {
  text-align: left;
}

/* Comparison section — centre the table within container */
.comparison-section .container {
  max-width: 900px;
  margin: 0 auto;
}

.comparison-section h2 {
  margin-bottom: 32px;
}

/* How it works steps — ensure even distribution */
.how-it-works .grid-4 {
  justify-items: center;
  text-align: center;
}

.how-it-works .grid-4 > * {
  text-align: center;
  max-width: 280px;
}

/* Scenarios cards — even grid */
.scenarios-section .grid {
  justify-items: center;
}

.scenarios-section .grid > * {
  max-width: 100%;
}


/* ---- 4. MOBILE NAV REFINEMENTS ---- */

/* Mobile: bigger logo, proper 3-column layout */
@media (max-width: 767px) {
  .logo img {
    height: 56px !important;
  }
  
  /* Ensure hamburger is visible and properly positioned */
  .mobile-hamburger {
    display: flex !important;
    order: 1;
    flex-shrink: 0;
  }
  
  /* Centre logo */
  .logo {
    order: 2;
  }
  
  /* Compact signup button */
  .nav-cta {
    order: 3;
    font-size: 12px !important;
    padding: 6px 12px !important;
    min-height: 36px !important;
    min-width: auto !important;
    white-space: nowrap !important;
  }
  
  /* Desktop nav hidden */
  .main-nav {
    display: none !important;
  }
}

/* Tablet: slightly smaller logo */
@media (min-width: 768px) and (max-width: 1023px) {
  .logo img {
    height: 44px;
  }
}


/* ---- 5. NAV LINK HOVER/ACTIVE STATE FIX ---- */

/* Override aggressive global touch-target padding on nav links */
.site-header .nav-link {
  padding: 8px 10px !important;
  min-height: 40px !important;
  height: auto !important;
  min-width: auto !important;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: transparent !important;
  box-shadow: none !important;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.site-header .nav-link:hover {
  color: #1F7063; /* WCAG AA fix */
  border-bottom-color: #1F7063; /* WCAG AA fix */
  background: transparent !important;
  box-shadow: none !important;
}

.site-header .nav-link.active {
  color: #1F7063; /* WCAG AA fix */
  border-bottom-color: #1F7063; /* WCAG AA fix */
  font-weight: 600;
}

.site-header .nav-link:focus-visible {
  outline: 2px solid #1F7063;
  outline-offset: 2px;
  border-radius: 4px;
  border-bottom-color: transparent;
}

/* Prevent global a tag styles from bleeding into nav */
.site-header a:not(.btn):not(.nav-cta):not(.logo) {
  min-height: auto !important;
  min-width: auto !important;
}

/* Fix footer links inheriting button-like padding */
.site-footer a {
  min-height: auto !important;
  min-width: auto !important;
  padding: 4px 0 !important;
}

.site-footer .footer-links a {
  padding: 4px 0 !important;
}

/* Fix body text links inheriting button padding */
main a:not(.btn):not(.btn-primary):not(.btn-secondary):not(.nav-cta):not(.pricing-card__cta) {
  min-height: auto;
  min-width: auto;
  padding: initial;
}

/* ---- 6. GENERAL POLISH ---- */

/* Ensure containers are properly centred with max-width */
.container {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 24px;
  padding-right: 24px;
}

@media (min-width: 1248px) {
  .container {
    padding-left: 0;
    padding-right: 0;
  }
}

/* Fix any content overflow */
html, body {
  overflow-x: hidden;
}

/* Tighten card gap slightly */
.grid {
  gap: 24px;
}

@media (max-width: 809px) {
  .grid {
    gap: 16px;
  }
}

/* ---- 7. CANONICAL FOOTER STYLES ---- */

.site-footer {
  background: #1A365D;
  color: rgba(255, 255, 255, 0.8);
  padding: 64px 24px 32px;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

.site-footer .footer-content {
  max-width: 1200px;
  margin: 0 auto;
}

.site-footer .footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

@media (max-width: 809px) {
  .site-footer .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
}

@media (max-width: 480px) {
  .site-footer .footer-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

.site-footer .footer-brand {
  font-size: 24px;
  font-weight: 700;
  color: #FFFFFF;
  margin-bottom: 8px;
}

.site-footer .footer-tagline {
  font-size: 14px;
  margin-bottom: 4px;
  color: rgba(255, 255, 255, 0.85);
}

.site-footer .footer-trust {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.85);
}

.site-footer .footer-heading {
  color: #FFFFFF;
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 16px;
}

.site-footer .footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.site-footer .footer-links li {
  margin-bottom: 8px;
}

.site-footer .footer-links a {
  color: rgba(255, 255, 255, 0.7) !important;
  text-decoration: none;
  font-size: 14px;
  transition: color 0.2s ease;
  padding: 4px 0 !important;
  min-height: auto !important;
  min-width: auto !important;
}

.site-footer .footer-links a:hover {
  color: #FFFFFF !important;
}

.site-footer .footer-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.15);
  margin-bottom: 24px;
}

.site-footer .footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.75);
}

.site-footer .footer-bottom p {
  margin: 0;
}

.site-footer .footer-legal {
  display: flex;
  gap: 24px;
}

.site-footer .footer-legal a {
  color: rgba(255, 255, 255, 0.8) !important; /* WCAG AA fix: was 0.7 (4.14:1), now ~5.1:1 on navy */
  text-decoration: none;
  padding: 4px 0 !important;
  min-height: auto !important;
  min-width: auto !important;
}

.site-footer .footer-legal a:hover {
  color: #FFFFFF !important;
}

/* ---- 8. CTA BUTTON STANDARDISATION ---- */

/* Primary CTA (teal, used for "Start your free plan" / "Get started free") */
/* WCAG AA fix: #2D9B87 with white text = 3.41:1 FAIL. #227A6A = 5.17:1 PASS */
.cta-btn-primary,
a.cta-btn-primary,
.about-cta-btn,
.btn-teal,
.btn-teal-on-dark,
.blog-cta-button,
.cta-btn[href*="signup"],
a.cta-btn[href*="signup"] {
  display: inline-block;
  background: #227A6A !important;
  color: #FFFFFF !important;
  padding: 14px 32px !important;
  border-radius: 8px !important;
  font-size: 16px !important;
  font-weight: 600 !important;
  text-decoration: none !important;
  text-align: center !important;
  transition: background 0.2s ease, transform 0.1s ease !important;
  border: none !important;
  cursor: pointer;
  min-height: auto !important;
  min-width: auto !important;
  line-height: 1.4 !important;
}

.cta-btn-primary:hover,
a.cta-btn-primary:hover,
.about-cta-btn:hover,
.btn-teal:hover,
.btn-teal-on-dark:hover,
.blog-cta-button:hover,
.cta-btn[href*="signup"]:hover,
a.cta-btn[href*="signup"]:hover {
  background: #1B6E5D !important;
  transform: translateY(-1px);
}

/* Secondary CTA (transparent with white text — for use on dark backgrounds) */
.cta-btn-secondary,
a.cta-btn-secondary {
  display: inline-block;
  background: rgba(255,255,255,0.12) !important;
  color: #FFFFFF !important;
  padding: 14px 32px !important;
  border-radius: 8px !important;
  font-size: 16px !important;
  font-weight: 600 !important;
  text-decoration: none !important;
  text-align: center !important;
  transition: background 0.2s ease, transform 0.1s ease !important;
  border: 2px solid rgba(255,255,255,0.4) !important;
  cursor: pointer;
  min-height: auto !important;
  line-height: 1.4 !important;
}

.cta-btn-secondary:hover,
a.cta-btn-secondary:hover {
  background: rgba(255,255,255,0.22) !important;
  transform: translateY(-1px);
}

/* "Get Started" footer CTA buttons — same teal style */
.cta-button,
a.cta-button {
  display: inline-block;
  background: #227A6A !important;
  color: #FFFFFF !important;
  padding: 14px 32px !important;
  border-radius: 8px !important;
  font-size: 16px !important;
  font-weight: 600 !important;
  text-decoration: none !important;
  text-align: center !important;
  transition: background 0.2s ease, transform 0.1s ease !important;
  border: none !important;
  min-height: auto !important;
  min-width: auto !important;
  line-height: 1.4 !important;
}

.cta-button:hover,
a.cta-button:hover {
  background: #1B6E5D !important;
  transform: translateY(-1px);
}

/* Nav CTA (compact version for header) */
.nav-cta,
a.nav-cta,
.btn.btn-primary.nav-cta {
  display: inline-flex !important;
  align-items: center;
  background: #227A6A !important;
  color: #FFFFFF !important;
  padding: 10px 20px !important;
  border-radius: 6px !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  text-decoration: none !important;
  transition: background 0.2s ease !important;
  border: none !important;
  min-height: auto !important;
  min-width: auto !important;
  white-space: nowrap;
  line-height: 1.4 !important;
}

.nav-cta:hover,
a.nav-cta:hover,
.btn.btn-primary.nav-cta:hover {
  background: #1B6E5D !important;
}

/* Old-style button classes that need normalisation */
.btn-blue,
a.btn-blue {
  display: inline-block;
  background: #227A6A !important;
  color: #FFFFFF !important;
  padding: 10px 20px !important;
  border-radius: 6px !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  text-decoration: none !important;
  transition: background 0.2s ease !important;
  border: none !important;
  min-height: auto !important;
  min-width: auto !important;
  line-height: 1.4 !important;
}

.btn-blue:hover,
a.btn-blue:hover {
  background: #1B6E5D !important;
}

/* Mobile CTA button */
.mobile-cta-btn,
a.mobile-cta-btn {
  display: inline-block;
  background: #227A6A !important;
  color: #FFFFFF !important;
  padding: 10px 20px !important;
  border-radius: 6px !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  text-decoration: none !important;
  transition: background 0.2s ease !important;
  border: none !important;
  min-height: auto !important;
  min-width: auto !important;
  line-height: 1.4 !important;
}

/* Pricing card CTA */
.pricing-card__cta,
a.pricing-card__cta {
  display: inline-block;
  background: #227A6A !important;
  color: #FFFFFF !important;
  padding: 14px 32px !important;
  border-radius: 8px !important;
  font-size: 16px !important;
  font-weight: 600 !important;
  text-decoration: none !important;
  text-align: center !important;
  transition: background 0.2s ease, transform 0.1s ease !important;
  border: none !important;
  width: 100%;
  min-height: auto !important;
  min-width: auto !important;
  line-height: 1.4 !important;
}

.pricing-card__cta:hover,
a.pricing-card__cta:hover {
  background: #1B6E5D !important;
  transform: translateY(-1px);
}

/* Buyer segment CTAs on homepage */
.buyer-segment-cta,
a.buyer-segment-cta {
  display: inline-block;
  background: #227A6A !important;
  color: #FFFFFF !important;
  padding: 12px 24px !important;
  border-radius: 8px !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  text-decoration: none !important;
  text-align: center !important;
  transition: background 0.2s ease, transform 0.1s ease !important;
  border: none !important;
  min-height: auto !important;
  min-width: auto !important;
  line-height: 1.4 !important;
}

.buyer-segment-cta:hover,
a.buyer-segment-cta:hover {
  background: #1B6E5D !important;
  transform: translateY(-1px);
}

/* Signup page button */
.btn-signup {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #227A6A !important;
  color: #FFFFFF !important;
  padding: 14px 32px !important;
  border-radius: 8px !important;
  font-size: 16px !important;
  font-weight: 600 !important;
  text-decoration: none !important;
  text-align: center !important;
  transition: background 0.2s ease !important;
  border: none !important;
  cursor: pointer;
  width: 100%;
  min-height: 48px !important;
  line-height: 1.4 !important;
}

.btn-signup:hover {
  background: #1B6E5D !important;
}

/* ---- 9. FOOTER BRAND STRONG FIX ---- */
/* The <strong>MOVE</strong> in footer brand inherits dark text color on navy bg */
.site-footer .footer-brand strong {
  color: #FFFFFF !important;
}

/* ---- 10. COOKIEBOT CONTRAST FIX ---- */
/* Third-party Cookiebot "Allow all" button fails WCAG AA: #1a365d on #2d9b87 = 3.55:1 */
/* Override to use white text which passes at 5.17:1 on our darkened teal */
#CybotCookiebotDialogBodyLevelButtonLevelOptinAllowAll {
  background-color: #227A6A !important;
  color: #FFFFFF !important;
}

#CybotCookiebotDialogBodyLevelButtonLevelOptinAllowAll:hover {
  background-color: #1B6E5D !important;
}

/* Also fix any other Cookiebot buttons that might fail */
#CybotCookiebotDialogBodyButtonDecline,
#CybotCookiebotDialogBodyLevelButtonLevelOptinDeclineAll {
  color: #1A365D !important;
  border-color: #1A365D !important;
}


/* ---- 11. PORTAL FOOTER FIX — Stop sidebar overlapping footer ---- */
/* The fixed sidebar covers the footer. On portal pages, the footer must
   clear the sidebar by starting with margin-left equal to sidebar width. */
.portal-container + footer.site-footer,
.portal-container ~ footer.site-footer {
  margin-left: var(--sidebar-width, 260px);
  position: relative;
  z-index: 10;
}

@media (max-width: 768px) {
  .portal-container + footer.site-footer,
  .portal-container ~ footer.site-footer {
    margin-left: 0;
  }
}

/* ENHANCED: Sidebar should not visually overlap the footer */
/* Give footer a background and z-index so it sits on top of the fixed sidebar */
.portal-container + footer.site-footer,
.portal-container ~ footer.site-footer {
  position: relative;
  z-index: 1001;  /* Higher than sidebar which is typically z-index: auto on fixed */
  background: #1A365D;
}

/* Portal sidebar must not render over the footer */
.sidebar {
  z-index: 40 !important;
}

/* Override: the footer must layer above the fixed sidebar */
footer.site-footer {
  position: relative;
  z-index: 50 !important;
}
