html,
body {
    /* Shared Buga brand tokens used by the child theme overrides below. */
    --buga-ink: hsl(150 60% 12%);
    --buga-leaf: hsl(150 58% 18%);
    --buga-gold: hsl(42 86% 60%);
    --buga-coral: hsl(16 74% 58%);
    --buga-sky: hsl(194 52% 46%);
    --buga-paper: hsl(42 40% 97%);
    --buga-line: hsl(42 26% 84%);
    /* Reusable page texture: two grid layers over a soft paper gradient. */
    --buga-grid-background:
      linear-gradient(90deg, hsl(150 40% 20% / 0.08) 1px, transparent 1px),
      linear-gradient(0deg, hsl(150 40% 20% / 0.07) 1px, transparent 1px),
      linear-gradient(115deg, hsl(42 54% 96%) 0%, hsl(84 34% 94%) 48%, hsl(194 42% 94%) 100%);
    background: var(--buga-grid-background);
    background-attachment: fixed;
    background-size: 72px 72px, 72px 72px, auto;
    color: var(--text-main);
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  }

  body {
    min-height: 100vh;
  }

  /* Fixed grid overlay keeps the texture visible even when Elementor adds white section backgrounds. */
  body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background:
      linear-gradient(90deg, hsl(150 40% 20% / 0.08) 1px, transparent 1px),
      linear-gradient(0deg, hsl(150 40% 20% / 0.07) 1px, transparent 1px);
    background-size: 72px 72px;
  }

  .site,
  #wrapper,
  #inner-wrap,
  #page,
  #main,
  .site-main,
  .content-bg,
  .content-area,
  .entry,
  .entry-content-wrap,
  .site-container,
  .content-container {
    background: transparent;
  }

  .entry-content,
  .wp-site-blocks,
  .site-footer {
    position: relative;
  }

  .entry-content,
  .elementor,
  .elementor-section,
  .elementor-section-wrap,
  .elementor-widget-wrap,
  .e-con {
    /* Repeat the grid on common content wrappers so editor-built sections inherit the site texture. */
    background-image: var(--buga-grid-background);
    background-attachment: fixed;
    background-size: 72px 72px, 72px 72px, auto;
  }

  .entry-content .elementor-section,
  .entry-content .elementor-top-section,
  .entry-content .e-con,
  .entry-content .e-container {
    /* Elementor often writes solid section backgrounds; keep them transparent unless a card/panel sets its own color. */
    background-color: transparent !important;
  }

  /* Force Kadence header rows to use the solid green brand bar instead of transparent header styling. */
  #masthead,
  .site-header,
  .site-header-wrap,
  .site-main-header-wrap,
  .site-bottom-header-wrap,
  .mobile-header-wrap,
  .mobile-main-header-wrap,
  #masthead .site-header-row-container-inner,
  #masthead .site-container {
    background: var(--buga-leaf);
  }

  #masthead,
  .site-header {
    position: relative;
    z-index: 30;
    border-bottom: 1px solid hsl(150 42% 24%);
    box-shadow: 0 18px 38px -34px hsl(150 60% 8%);
  }

  body.transparent-header #masthead,
  body.mobile-transparent-header #masthead,
  body.header-is-fixed #masthead,
  body.transparent-header .site-header,
  body.mobile-transparent-header .site-header,
  body.transparent-header .site-main-header-wrap,
  body.mobile-transparent-header .site-main-header-wrap,
  body.transparent-header .site-header-row-container-inner,
  body.mobile-transparent-header .site-header-row-container-inner {
    /* Safety net for pages where Kadence still outputs transparent-header body classes. */
    position: relative !important;
    background: var(--buga-leaf) !important;
  }

  .site-header .custom-logo,
  .site-header img.custom-logo,
  .site-branding img,
  .site-logo img,
  .site-title-wrap img {
    /* Keep the wide logo readable in the narrow in-app/mobile header. */
    width: min(230px, 58vw) !important;
    max-width: min(230px, 58vw) !important;
    max-height: 72px !important;
    object-fit: contain;
  }

  .site-header a.brand img.custom-logo:nth-of-type(n+2),
  .site-header a.custom-logo-link img.custom-logo:nth-of-type(n+2) {
    /* Kadence can output duplicate logo images for sticky/transparent states; hide extras in this child theme. */
    display: none !important;
  }

  header.site-header img.custom-logo {
    width: 230px !important;
    max-width: 58vw !important;
    height: auto !important;
  }

  .site-header .site-branding,
  .site-header .site-logo,
  .site-header .site-branding a {
    min-width: 0;
  }

  .site-header a.brand,
  .site-header a.custom-logo-link {
    display: inline-flex !important;
    align-items: center;
    max-width: min(260px, 62vw) !important;
    overflow: hidden;
  }

  .mobile-toggle-open-container .menu-toggle-open,
  .mobile-navigation-toggle,
  .menu-toggle-open {
    color: #fff;
  }

  .site-header a,
  .site-header .menu-toggle-open,
  .site-header .menu-toggle-open .menu-toggle-icon,
  .site-header .drawer-toggle {
    color: #fff;
  }

  .site-header .main-navigation a,
  .site-header .header-navigation a,
  .site-header .primary-menu-container a,
  .site-header .menu > li > a,
  .site-header .menu-item > a,
  .site-header .current-menu-item > a,
  .site-header .current_page_item > a {
    /* Parent theme palette made menu text grey on green; force full contrast for navigation. */
    color: #fff !important;
    opacity: 1;
  }

  .site-header .main-navigation a:hover,
  .site-header .header-navigation a:hover,
  .site-header .primary-menu-container a:hover,
  .site-header .menu-item > a:hover,
  .site-header .main-navigation a:focus,
  .site-header .header-navigation a:focus,
  .site-header .primary-menu-container a:focus,
  .site-header .menu-item > a:focus {
    color: var(--buga-gold) !important;
  }

  .site-header .menu-toggle-open,
  .mobile-toggle-open-container .menu-toggle-open {
    background: transparent;
    border: 0;
    box-shadow: none;
  }

  .site-footer,
  #colophon {
    /* Match the header with a dark footer while keeping the body grid visible above it. */
    margin-top: clamp(2rem, 5vw, 4rem);
    background:
      linear-gradient(135deg, hsl(150 58% 16%), hsl(150 46% 23%));
    color: #fff;
  }

  #colophon p,
  #colophon li,
  #colophon a,
  #colophon .widget-title,
  #colophon h1,
  #colophon h2,
  #colophon h3,
  #colophon h4,
  #colophon h5,
  #colophon h6 {
    color: hsl(0 0% 100% / 0.9);
  }

  #colophon a:hover {
    color: var(--buga-gold);
  }

  #colophon .widget-title,
  #colophon h4 {
    color: #fff;
  }

  #colophon ul,
  #colophon ol {
    padding-left: 0;
  }

  #colophon li {
    list-style: none;
    margin-bottom: 0.4rem;
  }

  #colophon a {
    text-decoration: none;
    text-underline-offset: 0.18em;
  }

  .entry-content > .wp-block-group.alignfull:not(.buga-detail-page),
  .entry-content > .wp-block-cover.alignfull {
    background-color: hsl(0 0% 100% / 0.66);
  }
  
  h1, h2, h3 {
    color: var(--text-main);
    line-height: 1.2;
  }
  
  p {
    color: color-mix(in srgb, var(--text-main) 75%, transparent);
  }

  .entry-content h6,
  .widget-title,
  .buga-eyebrow {
    color: var(--buga-coral);
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0;
    text-transform: uppercase;
  }

  .entry-content > .wp-block-group:not(.alignfull):not(.buga-detail-page),
  .entry-content > .wp-block-cover:not(.alignfull),
  .entry-content > .wp-block-columns:not(.alignfull) {
    border-radius: var(--radius-md);
  }

  .entry-content .wp-block-column,
  .entry-content .wp-block-media-text,
  .entry-content .wp-block-kadence-column,
  .entry-content .kt-inside-inner-col {
    border-radius: var(--radius-md);
  }

  .entry-content .has-background:not(.buga-detail-page) {
    border-radius: var(--radius-md);
  }

  .entry-content h6::before,
  .widget-title::before {
    content: "";
    display: inline-block;
    width: 0.8rem;
    height: 0.8rem;
    margin-right: 0.45rem;
    border-radius: 50%;
    background: var(--buga-gold);
    vertical-align: -0.08rem;
  }

  .wp-block-button__link {
    border-radius: var(--radius-sm);
    font-weight: 800;
  }

  .wp-block-button:not(.is-style-outline) .wp-block-button__link {
    background: var(--buga-leaf);
    color: #fff;
  }

  .wp-block-button.is-style-outline .wp-block-button__link {
    border-color: var(--buga-gold);
    color: var(--buga-leaf);
  }

  @media (max-width: 1024px) {
    #masthead,
    .site-header {
      position: relative !important;
    }

    .site-header .custom-logo,
    .site-header img.custom-logo,
    .site-branding img,
    .site-logo img,
    .site-title-wrap img {
      width: min(220px, 58vw) !important;
      max-width: min(220px, 58vw) !important;
      max-height: 70px !important;
    }

    .site-header .site-branding,
    .site-header .site-logo,
    .site-header .site-branding a,
    .site-header a.brand {
      width: min(220px, 58vw);
      overflow: hidden;
    }

    .site-header-row,
    .site-main-header-inner-wrap,
    .mobile-main-header-inner-wrap {
      min-height: 72px;
    }

    .site-header-row-container-inner > .site-container,
    .site-main-header-inner-wrap,
    .mobile-main-header-inner-wrap {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 0.75rem;
    }

    #colophon {
      text-align: left;
    }

    #colophon .site-footer-row,
    #colophon .footer-widget-area,
    #colophon .widget {
      min-width: 0;
    }
  }
  
