/* =============================================================
   Bigfoot Builders AK — main.css
   ============================================================= */

/* ---- SVG Icon System -------------------------------------- */
/* All icons served from /public/icons/sprite.svg (inline-injected by server.js).
   Usage: <svg class="icon" aria-hidden="true"><use href="#ti-NAME"></use></svg> */
.icon {
  display: inline-block;
  width: 1em;
  height: 1em;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: -0.125em;
  overflow: visible;
}
.icon--filled {
  fill: currentColor;
  stroke: none;
}

/* ---- CSS Custom Properties -------------------------------- */

:root {
  --background: #F5F3F0;
  --surface: #ECEAE6;
  --foreground: #171717;
  --accent: #007bf5;
  --accent-muted: #AAAAAA;
  --accent-prominent: #007bf5;
  --text-muted: #595959;
  --border: rgba(0,0,0,0.12);
  --radius: 8px;
  --shadow: 0 1px 4px rgba(0,0,0,0.08);
  --checkbox-mark: #fff;
}

html[data-theme="dark"] {
  --background: #101828;
  --surface: #1a2438;
  --foreground: #ededed;
  --accent: #90B4FD;
  --accent-muted: #5C677E;
  --accent-prominent: #90B4FD;
  --text-muted: #9BAABB;
  --border: rgba(255,255,255,0.12);
  --checkbox-mark: #1a1a1a;
}

/* ---- Reset & Base ----------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  max-width: 100vw;
  overflow-x: hidden;
  background: var(--background);
}

body {
  font-family: 'Public Sans', Arial, Helvetica, sans-serif;
  font-size: 18px;
  line-height: 1.4;
  color: var(--foreground);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

#main-content { flex: 1; }

[data-theme="light"] body {
  background: radial-gradient(circle, #F5F3F0, #EDE9E6);
}
[data-theme="dark"] body {
  background: radial-gradient(circle, #002244, #000000);
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Public Sans', Arial, Helvetica, sans-serif;
  line-height: 1.2;
  margin: 0 0 0.5em;
}
h1 { font-size: clamp(1.5rem, 4vw, 2.5rem); }
h2 { font-size: clamp(1.25rem, 3vw, 1.875rem); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1em; line-height: 1.5; }

a { color: var(--accent-prominent); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; height: auto; display: block; }

hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 0.5rem 0;
}

details summary { cursor: pointer; }
details summary::-webkit-details-marker { display: none; }

:focus-visible {
  outline: 2px solid var(--accent-prominent);
  outline-offset: 2px;
}

/* ---- Buttons ---------------------------------------------- */

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 2rem;
  background: #2563eb;
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s;
  line-height: 1.4;
}
.btn-primary:hover { background: #1d4ed8; text-decoration: none; color: #fff; }
.btn-primary:disabled { background: var(--accent-muted); cursor: not-allowed; opacity: 0.7; }
[data-theme="dark"] .btn-primary { background: color-mix(in srgb, var(--accent-prominent) 65%, #000); }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1.5rem;
  background: transparent;
  color: var(--accent-prominent);
  font-size: 1rem;
  font-weight: 600;
  border: 2px solid var(--accent-prominent);
  border-radius: var(--radius);
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s;
  line-height: 1.4;
}
.btn-secondary:hover { background: var(--accent-prominent); color: #fff; text-decoration: none; }

/* ---- Form Elements ---------------------------------------- */

.form-group {
  margin-bottom: 1rem;
}

.form-field {
  margin-bottom: 1rem;
}

.form-label {
  display: block;
  font-size: 1rem;
  font-weight: 500;
  margin-bottom: 0.25rem;
  color: var(--foreground);
}

.form-error {
  color: #dc2626;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

/* Bare form — no extra spacing, for inline forms like drawer logout */
.form--bare { margin: 0; }

.input-text {
  display: block;
  width: 100%;
  padding: 0.375rem 0.75rem;
  font-size: 1.125rem;
  color: var(--foreground);
  background-color: var(--background);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  transition: border-color 0.15s;
  line-height: 1.5;
}
[data-theme="light"] .input-text { background-color: #FCFAF7; }
.input-text:focus {
  border-color: var(--accent-prominent);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent-prominent) 20%, transparent);
}

/* Prevent yellow/blue autofill tint in Chrome/Safari */
.input-text:-webkit-autofill,
.input-text:-webkit-autofill:hover,
.input-text:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px var(--background) inset;
  -webkit-text-fill-color: var(--foreground);
  caret-color: var(--foreground);
}
[data-theme="light"] .input-text:-webkit-autofill,
[data-theme="light"] .input-text:-webkit-autofill:hover,
[data-theme="light"] .input-text:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px #FCFAF7 inset;
}

textarea.input-text { font-family: inherit; }

select.input-text {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none'%3E%3Cpath d='M6 8l4 4 4-4' stroke='%23888' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.6rem center;
  background-size: 1.1rem;
  padding-right: 2rem;
}

/* Hide number input spinner arrows */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Custom checkbox */
.checkbox,
input[type="checkbox"][x-model] {
  appearance: none;
  -webkit-appearance: none;
  width: 1.2rem;
  height: 1.2rem;
  min-width: 1.2rem;
  border: 2px solid var(--border);
  border-radius: 4px;
  background: var(--background);
  cursor: pointer;
  flex-shrink: 0;
  position: relative;
  vertical-align: middle;
  transition: background-color 0.15s, border-color 0.15s;
}
.checkbox:checked,
input[type="checkbox"][x-model]:checked {
  background-color: var(--accent-prominent);
  border-color: var(--accent-prominent);
}
.checkbox:checked::after,
input[type="checkbox"][x-model]:checked::after {
  content: '';
  position: absolute;
  left: 5px;
  top: 1px;
  width: 5px;
  height: 9px;
  border: 2px solid var(--checkbox-mark);
  border-top: none;
  border-left: none;
  transform: rotate(45deg) scale(1.6);
}

/* ---- Text Utilities --------------------------------------- */

/* Plain link — inherits parent color */
.link { color: inherit; text-decoration: none; }
.link:hover { text-decoration: underline; }

.text--muted { color: var(--text-muted); }
.text--small { font-size: 0.875rem; }

/* ---- Navigation Bar --------------------------------------- */

.site-header {
  /* Height is handled by the .nav-spacer below the fixed bar */
}

.nav-spacer {
  height: 3.25rem;
}

.nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 1rem 0.5rem 1rem;
  background: var(--background);
  color: var(--foreground);
  height: 3.25rem;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9999;
}

.nav-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: var(--foreground);
  position: relative;
  margin-left: -0.5rem;
  flex-shrink: 0;
}
.nav-logo:hover { text-decoration: none; }

/* Nav bar logo image dimensions */
.bf-nav-logo { height: 40px; width: auto; }
.bf-nav-logo-img { height: 56px; width: auto; transition: transform 0.3s ease-in-out; }
.nav-logo:hover .bf-nav-logo-img { transform: rotateZ(8deg); }

.nav-brand {
  font-family: 'Public Sans', Arial, Helvetica, sans-serif;
  font-size: clamp(1.5rem, 2.75vw, 1.75rem);
  font-weight: 700;
  margin-left: 0.6rem;
  white-space: nowrap;
}

/* Light mode: slanted black background behind nav logo image only ─────────── */
/* nav-bar is position:fixed → containing block for the absolute ::before.      */
/* z-index:-1 paints above the nav-bar's own background but below flex children */
:root[data-theme="light"] .nav-bar::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 64px;
  background: #101828;
  /* Right edge slants: top is wider (more right) than bottom */
  clip-path: polygon(0 0, 100% 0, calc(100% - 14px) 100%, 0 100%);
  z-index: -1;
}
/* Give brand text a touch more left margin so it clears the slant */
:root[data-theme="light"] .nav-brand { margin-left: 1.25rem; }

/* Light mode: dark slanted band at the top of the nav drawer ────────────── */
/* nav-drawer-panel has transform → creates stacking context; z-index:-1 on   */
/* ::before sits above the panel background but below all normal flow children */
:root[data-theme="light"] .nav-drawer-panel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6rem;
  background: #101828;
  /* Bottom edge slants up left-to-right — same lean as the nav bar shape */
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 20px), 0 100%);
  z-index: -1;
  pointer-events: none;
}
/* Brand text and close btn should be light on the dark header bg */
:root[data-theme="light"] .nav-drawer-brand { color: #f9fafb; }
:root[data-theme="light"] .nav-drawer-close { color: #f9fafb; }
:root[data-theme="light"] .nav-drawer-close:hover { background: rgba(249,250,251,0.12); }

@media screen and (min-width: 640px) {
  .nav-logo { margin-top: -0.25rem; }
}

/* Desktop nav links — hidden below xl breakpoint */
.nav-links {
  display: none;
  align-items: center;
  gap: 1rem;
  flex: 1;
  margin: 0 1.5rem;
}
@media (min-width: 1280px) {
  .nav-links { display: flex; }
}

.nav-link {
  font-family: 'Public Sans', Arial, Helvetica, sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--foreground);
  text-decoration: none;
  white-space: nowrap;
  opacity: 0.85;
  transition: opacity 0.15s, transform 0.15s;
}
.nav-link:hover { opacity: 1; text-decoration: none; transform: scale(1.04); }

.nav-right {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  flex-shrink: 0;
}

.nav-icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: var(--radius);
  text-decoration: none;
  font-size: 1.1rem;
  color: var(--foreground);
  transition: background 0.15s, transform 0.15s;
}
.nav-icon-btn:hover {
  background: color-mix(in srgb, var(--foreground) 8%, transparent);
  transform: scale(1.1);
  text-decoration: none;
}
.nav-icon-btn--mail { color: var(--accent-prominent); }
.nav-icon-btn--mail:hover { color: var(--accent-prominent); }

/* Auth-state nav icons — toggled by data-admin attribute on <html> */
.nav-icons { display: contents; }
.nav-icons--admin { display: none; }
[data-admin="1"] .nav-icons--admin { display: contents; }
[data-admin="1"] .nav-icons--guest { display: none; }
.nav-drawer-admin { display: none; }
[data-admin="1"] .nav-drawer-admin { display: block; }

.theme-switcher {
  display: none;
  flex-direction: row;
}
@media (min-width: 640px) {
  .theme-switcher { display: flex; }
}

.theme-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  font-size: 1rem;
  color: var(--foreground);
  opacity: 0.4;
  transition: background 0.1s, color 0.1s, opacity 0.1s, transform 0.1s;
}
.theme-btn .icon { color: inherit; }
.theme-btn:hover { opacity: 0.75; background: color-mix(in srgb, var(--foreground) 6%, transparent); transform: translateY(-1px); }
.theme-btn:active { transform: translateY(1px) scale(0.92); background: color-mix(in srgb, var(--foreground) 12%, transparent); }
.theme-btn--left  { border-radius: var(--radius) 0 0 var(--radius); }
.theme-btn--right { border-radius: 0 var(--radius) var(--radius) 0; }
.theme-btn--active { opacity: 1; }
.theme-btn--active:hover { background: color-mix(in srgb, var(--foreground) 6%, transparent); transform: translateY(-1px); }

.nav-hamburger {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  color: var(--foreground);
  font-size: 1.4rem;
  transition: background 0.15s, transform 0.15s;
  padding: 0;
}
.nav-hamburger:hover { background: color-mix(in srgb, var(--foreground) 8%, transparent); transform: scale(1.05); }

/* ---- Nav Drawer ------------------------------------------- */

.nav-drawer {
  position: fixed;
  inset: 0;
  z-index: 10000;
  pointer-events: none;
}
.nav-drawer.is-open { pointer-events: all; }

.nav-drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(100, 116, 139, 0.6);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.nav-drawer.is-open .nav-drawer-backdrop { opacity: 1; }

.nav-drawer-panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(400px, 90vw);
  background: var(--background);
  box-shadow: -4px 0 24px rgba(0,0,0,0.2);
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  padding: 0.25rem 1.5rem 5rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.nav-drawer.is-open .nav-drawer-panel { transform: translateX(0); }

.nav-drawer-header {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.nav-drawer-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--foreground);
}
.nav-drawer-logo:hover { text-decoration: none; }

.nav-drawer-brand {
  font-family: 'Public Sans', Arial, Helvetica, sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--foreground);
  text-decoration: none;
  white-space: nowrap;
}
.nav-drawer-brand:hover { text-decoration: none; }

.nav-drawer-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--foreground);
  border-radius: var(--radius);
  transition: background 0.15s;
  flex-shrink: 0;
}
.nav-drawer-close .icon { font-size: 1.25rem; }
.nav-drawer-close:hover { background: color-mix(in srgb, var(--foreground) 8%, transparent); }

.nav-drawer-email {
  display: block;
  font-size: 0.75rem;
  font-weight: 400;
  color: color-mix(in srgb, var(--foreground) 55%, transparent);
  text-decoration: none;
}
.nav-drawer-email:hover { color: var(--foreground); }

.nav-drawer-links {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  margin-bottom: 1rem;
}
.nav-drawer-links--contact { margin-top: 0.5rem; margin-bottom: 0.5rem; }

.nav-drawer-hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 0.5rem 0;
}

.drawer-link {
  display: flex;
  align-items: center;
  padding: 0.35rem 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--foreground);
  text-decoration: none;
  border-radius: var(--radius);
  transition: background 0.15s;
}
.drawer-link:hover { background: color-mix(in srgb, var(--accent-prominent) 8%, transparent); text-decoration: none; }
.drawer-link--highlight { color: var(--accent-prominent); }

/* Secondary (lighter weight) drawer links */
.drawer-link--sm {
  font-weight: 400;
  font-size: 0.9rem;
  padding: 0.3rem 0.5rem;
  color: var(--foreground);
  opacity: 0.9;
}

/* SVG icon sizing inside drawer links */
.drawer-link .icon {
  width: 1.5rem;
  height: 1.5rem;
  margin-right: 0.5rem;
  color: var(--accent-prominent);
  flex-shrink: 0;
}
.drawer-link--highlight .icon { color: inherit; }
.drawer-link--sm .icon { width: 1rem; height: 1rem; }

.drawer-section-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 0.4rem 0.5rem 0.2rem;
}

/* Logout button — reset browser defaults, inherits .drawer-link base */
.drawer-link--logout {
  width: 100%;
  background: none;
  border: none;
  cursor: pointer;
  font: inherit;
  text-align: left;
}

/* Theme switcher variants — always visible in drawer and footer contexts */
.theme-switcher--drawer,
.theme-switcher--footer { display: flex !important; }

/* COTW attribution at the bottom of the drawer */
.nav-drawer-cotw {
  margin-top: auto;
  padding: 1rem 0.5rem 0;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
}
.nav-drawer-cotw-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s;
}
.nav-drawer-cotw-link:hover { color: var(--foreground); text-decoration: none; }
.nav-drawer-cotw-link .icon { width: 0.9rem; height: 0.9rem; color: var(--accent-prominent); }

/* ---- Footer ----------------------------------------------- */

.bf-footer {
  width: 100%;
  padding: 1.5rem 0 2.5rem;
  margin-top: 5rem;
}

.bf-footer-brand {
  text-align: center;
  margin-bottom: 2.5rem;
  position: relative;
}

/* Light mode: full-width slanted dark band behind footer brand section ────── */
:root[data-theme="light"] .bf-footer-brand::before {
  content: '';
  position: absolute;
  inset: 0;
  background: #101828;
  /* Bottom edge slants left-to-right, same lean direction as the nav bar */
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 32px), 0 100%);
  z-index: 0;
  pointer-events: none;
}
/* Lift content above the ::before layer */
:root[data-theme="light"] .bf-footer-brand > * { position: relative; z-index: 1; }
/* Give the brand section vertical breathing room so text clears the diagonal */
:root[data-theme="light"] .bf-footer-brand { padding: 2rem 1.5rem 3.5rem; }
/* Company name and tagline should be light on the dark band */
:root[data-theme="light"] .bf-footer-company { color: #f9fafb; }
:root[data-theme="light"] .bf-footer-tagline { color: rgba(249, 250, 251, 0.7); }

.bf-footer-art {
  width: 100%;
  max-width: 384px;
  height: auto;
  margin: 0 auto 0.75rem;
  display: block;
}

.bf-footer-company {
  font-size: clamp(1.25rem, 4vw, 2rem);
  font-weight: 900;
  letter-spacing: -0.02em;
}

.bf-footer-tagline {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
}

.bf-footer-cols {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2.5rem;
  max-width: 900px;
  margin: 0 auto 5rem;
}
@media (min-width: 1024px) {
  .bf-footer-cols {
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
  }
}

.bf-footer-col {
  width: 100%;
  max-width: 20rem;
}
.bf-footer-col--center {
  text-align: center;
  order: -1;
}
@media (min-width: 1024px) {
  .bf-footer-col--center { order: 0; }
  .bf-footer-col--right { text-align: right; }
}

.bf-footer-col-title {
  font-size: clamp(1.1rem, 3vw, 1.75rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
}

.bf-footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.bf-footer-links a {
  text-decoration: none;
  font-size: 0.95rem;
  opacity: 0.75;
}
.bf-footer-links a:hover { opacity: 1; }

.bf-footer-info-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.95rem;
}
.bf-footer-info-list a { color: inherit; text-decoration: none; }
.bf-footer-info-list a:hover { opacity: 0.75; }

.bf-footer-phone {
  font-size: 1.4rem;
  font-weight: 700;
  display: block;
  margin: 0.25rem 0;
}

.bf-footer-trex-logo {
  width: 192px;
  height: auto;
  margin-top: 1rem;
}
@media (min-width: 1024px) {
  .bf-footer-col--right .bf-footer-trex-logo { margin-left: auto; display: block; }
}
:root:not([data-theme="dark"]) .bf-footer-trex-logo {
  background: #1f2937;
  padding: 4px;
  border-radius: 4px;
}

.bf-footer-bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(128,128,128,0.2);
  max-width: 900px;
  margin: 0 auto;
  font-size: 0.9rem;
}
.bf-footer-bottom-line { margin: 0; }
.bf-footer-bottom-line a { color: #0891b2; text-decoration: none; }
.bf-footer-copy-url {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  cursor: pointer;
  color: #0891b2;
  text-decoration: none;
}

.bf-footer-legal-links {
  display: flex;
  flex-direction: row;
  gap: 0.75rem;
}
.bf-footer-legal-links a { color: #0891b2; text-decoration: none; }

.bf-footer-theme-row {
  margin: 0.25rem 0;
  display: flex;
  flex-direction: row;
}

.bf-footer-copy { opacity: 0.7; line-height: 1.7; }

.bf-footer-cotw-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  text-decoration: none;
  font-size: 0.85rem;
  opacity: 0.65;
}
.bf-footer-cotw-link:hover { opacity: 1; }
.bf-footer-cotw-icon { width: 16px; height: 16px; }
[data-theme="dark"] .bf-footer-cotw-icon { filter: brightness(200%); }

/* ---- Page Wrapper ----------------------------------------- */

.bf-page { min-height: 100vh; }

/* ---- Hero ------------------------------------------------- */

.bf-hero {
  position: relative;
  min-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  text-align: center;
  padding: 4rem 1.5rem 6rem;
}

/* Non-video hero pages: don't waste 90vh — content-height only */
.bf-hero--about,
.bf-hero--services,
.bf-hero--locations,
.bf-hero--our-work,
.bf-hero--decking,
.bf-hero--faq,
.bf-hero--service {
  min-height: auto;
  padding: 5rem 1.5rem 4rem;
}

@media (max-width: 640px) {
  .bf-hero {
    padding: 3rem 1.25rem 4rem;
  }
  .bf-hero--about,
  .bf-hero--services,
  .bf-hero--locations,
  .bf-hero--our-work,
  .bf-hero--decking,
  .bf-hero--faq,
  .bf-hero--service {
    padding: 3rem 1.25rem 2.5rem;
  }
}

.bf-hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.bf-hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(245, 243, 240, 0.90);
  z-index: 1;
}
:root[data-theme="dark"] .bf-hero-overlay {
  background: rgba(16, 24, 40, 0.90);
}

/* Non-video hero variants — hide the full-bleed overlay */
.bf-hero--about .bf-hero-overlay,
.bf-hero--services .bf-hero-overlay,
.bf-hero--locations .bf-hero-overlay,
.bf-hero--location .bf-hero-overlay,
.bf-hero--our-work .bf-hero-overlay,
.bf-hero--decking .bf-hero-overlay,
.bf-hero--faq .bf-hero-overlay,
.bf-hero--service .bf-hero-overlay {
  display: none;
}

.bf-hero-inner {
  position: relative;
  z-index: 2;
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.bf-hero-logo {
  margin-bottom: 0;
  display: block;
}

/* Hero logo pennant badge wrapper — visible styling only in light mode ──── */
.bf-hero-logo-badge {
  display: inline-flex;
  margin-top: -1.25rem;
  margin-bottom: 0.5rem;
  border-radius: 1rem;
}

/* Light mode: pennant/downward-pointed banner behind the hero logo ────────── */
/* Pentagon shape — flat top, vertical sides, pointed bottom centre.           */
:root[data-theme="light"] .bf-hero-logo-badge {
  background: #101828;
  padding: 0.25rem 2.5rem 1.5rem;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 22px), 50% 100%, 0 calc(100% - 22px));
}

.bf-hero-title {
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1.05;
  margin: 0;
}

/* Interior page hero titles — shorter max so long names don't crowd on mobile */
.bf-hero--service .bf-hero-title,
.bf-hero--location .bf-hero-title,
.bf-hero--services .bf-hero-title,
.bf-hero--locations .bf-hero-title,
.bf-hero--decking .bf-hero-title,
.bf-hero--faq .bf-hero-title,
.bf-hero--our-work .bf-hero-title {
  font-size: clamp(1.75rem, 5vw, 3rem);
}

.bf-gradient-text {
  background: linear-gradient(to right, #0891b2, #3b82f6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.bf-hero-sub1 {
  font-size: clamp(1rem, 2.5vw, 1.4rem);
  font-weight: 600;
  opacity: 0.9;
  margin: 0;
}

.bf-hero-sub2 {
  font-size: clamp(1rem, 2vw, 1.2rem);
  opacity: 0.75;
  margin: 0;
}

.bf-hero-desc {
  font-size: clamp(0.9rem, 1.5vw, 1.05rem);
  opacity: 0.8;
  max-width: 700px;
  line-height: 1.65;
  margin: 0;
}

/* ---- Sections --------------------------------------------- */

.bf-section {
  padding: 4rem 1.5rem;
}

@media (max-width: 640px) {
  .bf-section { padding: 2.5rem 1rem; }
}

.bf-section--muted { background: var(--surface, #f8f9fa); }
:root[data-theme="dark"] .bf-section--muted { background: rgba(255,255,255,0.03); }

.bf-section--narrow { max-width: 800px; margin: 0 auto; }
.bf-section--center { text-align: center; }
.bf-section-inner { max-width: 800px; margin: 2rem auto; }

.bf-section-title {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  text-align: center;
  margin: 0 0 2rem;
}
.bf-section-title--left { text-align: left; }

.bf-subsection-title {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  text-align: center;
  margin: 0 0 1rem;
}

/* ---- Body Text -------------------------------------------- */

.bf-body-text { line-height: 1.7; }
.bf-body-text--center { text-align: center; }
.bf-body-text--max { max-width: 760px; margin-left: auto; margin-right: auto; }

/* ---- Spacing Helpers -------------------------------------- */

.bf-mb-sm { margin-bottom: 0.5rem; }
.bf-mb    { margin-bottom: 1.5rem; }
.bf-mb-lg { margin-bottom: 2rem; }
.bf-mb-xl { margin-bottom: 3rem; }
.bf-mt    { margin-top: 1.5rem; }
.bf-mt-lg { margin-top: 2rem; }

/* ---- Card Grid -------------------------------------------- */

.bf-card-grid {
  display: grid;
  gap: 1.5rem;
  max-width: 1200px;
  margin: 3rem auto;
}

.bf-card-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.bf-card-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.bf-card-grid--comparison { max-width: 900px; margin: 0 auto; }

@media (max-width: 900px) {
  .bf-card-grid--3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .bf-card-grid--2,
  .bf-card-grid--3 { grid-template-columns: 1fr; }
}

/* ---- Cards ------------------------------------------------ */

.bf-card {
  padding: 1.5rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(0,0,0,0.08);
  background: var(--card-bg, #fff);
  transition: box-shadow 0.2s, transform 0.2s;
}
:root[data-theme="dark"] .bf-card { background: rgba(255,255,255,0.05); border-color: rgba(255,255,255,0.08); }
.bf-card:hover { box-shadow: 0 8px 30px rgba(0,0,0,0.12); transform: translateY(-2px); }

.bf-card--link { text-decoration: none !important; color: inherit; display: block; }
.bf-card--center { text-align: center; }

.bf-card-title { font-size: 1.15rem; font-weight: 700; margin: 0 0 0.5rem; }
.bf-card-title--accent { color: #0891b2; }
.bf-card-title--danger { color: #dc2626; }
.bf-card-body { font-size: 0.95rem; opacity: 0.8; margin: 0 0 0.75rem; line-height: 1.6; }
.bf-card-cta { font-size: 0.9rem; color: #0891b2; font-weight: 600; }
.bf-card-meta { font-size: 0.875rem; margin-top: 0.5rem; }
.bf-card-strong { font-weight: 600; }

/* ---- Text Cards ------------------------------------------- */

.bf-text-card {
  padding: 1.5rem;
  border-radius: 0.75rem;
  border-left: 3px solid #0891b2;
  background: var(--card-bg, #fff);
}
:root[data-theme="dark"] .bf-text-card { background: rgba(255,255,255,0.04); }

.bf-text-card-heading { font-size: 1.05rem; font-weight: 700; margin: 0 0 0.5rem; color: #0891b2; }
.bf-text-card--center { text-align: center; }

/* ---- Stats ------------------------------------------------ */

.bf-stats-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem 4rem;
  max-width: 900px;
  margin: 0 auto;
}

.bf-stat { text-align: center; }
.bf-stat-num { font-size: clamp(2.5rem, 5vw, 4rem); font-weight: 900; color: #0891b2; line-height: 1; }
.bf-stat-label { font-size: 0.95rem; opacity: 0.7; margin-top: 0.25rem; font-weight: 600; }

/* ---- Reviews ---------------------------------------------- */

.bf-review-card {
  padding: 1.5rem;
  border-radius: 0.75rem;
  background: var(--card-bg, #fff);
  border: 1px solid rgba(0,0,0,0.06);
}
:root[data-theme="dark"] .bf-review-card { background: rgba(255,255,255,0.05); border-color: rgba(255,255,255,0.08); }

.bf-stars { font-size: 1.25rem; color: #f59e0b; margin-bottom: 0.5rem; }
.bf-review-name { font-size: 1rem; font-weight: 700; margin: 0 0 0.5rem; }
.bf-review-body { font-size: 0.9rem; line-height: 1.6; opacity: 0.85; margin: 0; }

/* ---- About Grid ------------------------------------------- */

.bf-about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  max-width: 1100px;
  margin: 0 auto;
}
.bf-about-grid--reverse { direction: rtl; }
.bf-about-grid--reverse > * { direction: ltr; }

@media (max-width: 768px) {
  .bf-about-grid,
  .bf-about-grid--reverse { grid-template-columns: 1fr; direction: ltr; }
}

.bf-about-text p { margin-bottom: 1rem; line-height: 1.7; }
.bf-about-img img { width: 100%; border-radius: 0.75rem; object-fit: cover; aspect-ratio: 4/3; }

/* ---- Process Steps ---------------------------------------- */

.bf-process-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr));
  gap: 1.5rem;
  max-width: 1000px;
  margin: 0 auto;
}

@media (max-width: 480px) {
  .bf-process-steps { grid-template-columns: 1fr; }
}

.bf-process-step { text-align: center; padding: 1.5rem; }

.bf-process-num {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: #0891b2;
  color: #fff;
  font-size: 1.25rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
}

.bf-process-title { font-weight: 700; margin-bottom: 0.5rem; }

/* ---- CTA Box ---------------------------------------------- */

.bf-cta-box {
  background: linear-gradient(135deg, rgba(8,145,178,0.08) 0%, rgba(59,130,246,0.08) 100%);
  border-radius: 1rem;
  padding: 3rem 2rem;
  max-width: 900px;
  margin: 3rem auto;
  text-align: center;
}

@media (max-width: 640px) {
  .bf-cta-box { padding: 2rem 1.25rem; border-radius: 0.75rem; }
}
.bf-cta-title { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 800; margin: 0 0 0.75rem; }
.bf-cta-desc {
  opacity: 0.8;
  max-width: 600px;
  margin: 0 auto 1.5rem;
}

/* ---- FAQ -------------------------------------------------- */

.bf-faq-list { display: flex; flex-direction: column; gap: 1rem; }

.bf-faq-item {
  padding: 1.5rem;
  border-radius: 0.75rem;
  background: var(--card-bg, #fff);
  border: 1px solid rgba(0,0,0,0.07);
}
:root[data-theme="dark"] .bf-faq-item { background: rgba(255,255,255,0.05); border-color: rgba(255,255,255,0.08); }

.bf-faq-q { font-size: 1.05rem; font-weight: 700; color: #0891b2; margin: 0 0 0.75rem; }
.bf-faq-a { margin: 0; line-height: 1.7; opacity: 0.85; }

/* ---- Tags ------------------------------------------------- */

.bf-tag-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  max-width: 800px;
  margin: 0 auto;
}

.bf-tag {
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  background: rgba(8,145,178,0.1);
  color: #0891b2;
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
}
.bf-tag:hover { background: rgba(8,145,178,0.18); text-decoration: none; }

/* ---- Feature List ----------------------------------------- */

.bf-feature-list {
  list-style: none;
  padding: 0;
  display: grid;
  /* min(240px, 100%) prevents the track minimum from exceeding the container,
     eliminating overflow when the list lives inside a narrow card. */
  grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr));
  gap: 0.5rem;
  max-width: 800px;
  margin: 1.5rem auto;
}

@media (max-width: 640px) {
  .bf-feature-list { grid-template-columns: 1fr; }
}

.bf-feature-item {
  padding: 0.5rem 0.75rem 0.5rem 2rem;
  position: relative;
}
.bf-feature-item::before {
  content: "✓";
  position: absolute;
  left: 0.5rem;
  color: #0891b2;
  font-weight: 700;
}

/* ---- Swiper ----------------------------------------------- */

/* Card-effect swiper for gallery / our-work pages */
.bf-swiper {
  width: 300px;
  max-width: 100%;
  margin: 0 auto 1.5rem;
  border-radius: 0.75rem;
  overflow: visible;
}
.bf-swiper .swiper-slide {
  height: 400px;
  border-radius: 0.75rem;
  overflow: hidden;
}
.bf-swiper .swiper-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
@media (max-width: 600px) {
  .bf-swiper { width: 260px; }
  .bf-swiper .swiper-slide { height: 320px; }
}

/* ---- Trex Visualizer -------------------------------------- */

.bf-trex-visualizer {
  max-width: 700px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.bf-trex-boards {
  display: flex;
  gap: 3px;
  background: #111;
  border-radius: 0.5rem;
  overflow: hidden;
  width: 100%;
}

.bf-trex-board { flex: 1; }
.bf-trex-board img { width: 100%; display: block; transition: all 0.5s ease; }

.bf-trex-labels {
  display: flex;
  gap: 2rem;
  font-size: 0.9rem;
  text-align: center;
}
.bf-trex-label { display: flex; flex-direction: column; gap: 0.25rem; }
.bf-trex-label-sm { font-size: 0.75rem; opacity: 0.6; font-weight: 600; text-transform: uppercase; }

.bf-trex-pickers {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.bf-trex-picker-group { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; }
.bf-trex-picker-label { font-size: 0.9rem; font-weight: 600; }

.bf-trex-swatch-row { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; width: 100%; max-width: 24rem; }

.bf-trex-swatch {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2px solid rgba(0,0,0,0.2);
  cursor: pointer;
  transition: transform 0.15s, border-color 0.15s;
}
.bf-trex-swatch:hover { transform: scale(1.2); border-color: #0891b2; }

/* ---- Icon Sizes ------------------------------------------- */

.bf-icon { font-size: 2rem; margin-bottom: 0.5rem; }
.bf-icon--lg { font-size: 2.5rem; margin-bottom: 0.75rem; }

/* ---- BF Buttons ------------------------------------------- */

.bf-btn {
  display: inline-block;
  padding: 0.75rem 1.75rem;
  background: #0891b2;
  color: #fff;
  font-weight: 600;
  border-radius: 0.5rem;
  text-decoration: none;
  transition: background 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 14px rgba(8,145,178,0.4);
}
.bf-btn:hover { background: #0e7490; box-shadow: 0 4px 18px rgba(8,145,178,0.6); color: #fff; text-decoration: none; }

.bf-btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin-top: 0.5rem;
}

@media (max-width: 400px) {
  .bf-btn-row { flex-direction: column; align-items: center; }
  .bf-btn-row .bf-btn,
  .bf-btn-row .btn-primary,
  .bf-btn-row .btn-secondary { width: 100%; max-width: 280px; text-align: center; justify-content: center; }
}

/* ---- Phone & Email Links ---------------------------------- */

.bf-link--phone { font-size: 1.1rem; font-weight: 600; }
.bf-link--email { font-size: 0.9rem; font-weight: 600; word-break: break-all; }

/* ---- Form Fields (BF) ------------------------------------- */

.bf-form-field { margin-bottom: 1rem; }
.bf-form-field--last { margin-bottom: 1.25rem; }

/* ---- Iframe Embed ----------------------------------------- */

.bf-iframe-wrap { max-width: 900px; margin: 0 auto; }
.bf-iframe { border-radius: 0.75rem; width: 100%; }

/* ---- Page Templates --------------------------------------- */

/* Static / prose pages (e.g. privacy-policy) */
.static-page {
  max-width: 48rem;
  margin: 0 auto;
  padding: 2.5rem 1rem;
}
.static-page--prose { padding-top: 2.5rem; padding-bottom: 5rem; }
.static-page__prose-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
}
@media (min-width: 768px) {
  .static-page__prose-title { font-size: 1.875rem; }
}

/* Error page */
.error-page {
  max-width: 36rem;
  margin: 0 auto;
  padding: 5rem 1rem 2rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.error-page__code {
  font-size: 6rem;
  font-weight: 900;
  color: var(--border);
  margin-bottom: 1rem;
}
.error-page__title {
  font-size: clamp(1.5rem, 3vw, 1.875rem);
  font-weight: 600;
  margin-bottom: 1rem;
}
.error-page__text {
  color: var(--text-muted);
  margin-bottom: 2rem;
  font-size: 1.0625rem;
}
.error-page__actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
}
@media (min-width: 640px) {
  .error-page__actions { flex-direction: row; }
}

/* 404 page */
.not-found-page {
  max-width: 28rem;
  margin: 0 auto;
  padding: 5rem 1rem;
  text-align: center;
}
.not-found-page__code {
  font-size: 6rem;
  font-weight: 900;
  color: var(--border);
  margin-bottom: 1rem;
}
.not-found-page__title {
  font-size: clamp(1.5rem, 4vw, 1.875rem);
  font-weight: 700;
  margin-bottom: 1rem;
}
.not-found-page__text {
  margin-bottom: 2rem;
  color: var(--text-muted);
}
.not-found-page__actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  justify-content: center;
}
@media (min-width: 640px) {
  .not-found-page__actions { flex-direction: row; }
}

/* ---- Contact --------------------------------------------- */

.contact-form-wrap {
  width: 100%;
  max-width: 30rem;
  margin: 0 auto 0.5rem;
}
.contact-form-wrap textarea.input-text {
  width: 100%;
  resize: vertical;
}

/* ---- WordPress Content ------------------------------------ */

/* Used in static/privacy-policy.ejs */
body .wp-content a,
body .wp-content a:visited {
  color: inherit;
  text-decoration: none;
  border-bottom: 2px solid var(--accent-prominent);
}

/* ---- Jodit RTE Theme Overrides ---------------------------- */
/* --jd-* variables cascade from <html> into both .jodit-container (in DOM)
   and .jodit-popup (appended to <body>). */

:root {
  --jd-color-background-default:  #FCFAF7;
  --jd-color-text:                var(--foreground);
  --jd-color-panel:               #EEEAE5;
  --jd-color-border:              rgba(0,0,0,0.15);
  --jd-color-gray:                rgba(0,0,0,0.15);
  --jd-color-gray-dark:           rgba(0,0,0,0.35);
  --jd-color-label:               #595959;
  --jd-color-placeholder:         rgba(0,0,0,0.3);
  --jd-color-background-button-hover:           rgba(0,0,0,0.06);
  --jd-color-button-background-hover:           rgba(0,0,0,0.08);
  --jd-color-button-background-hover-opacity40: rgba(0,0,0,0.06);
  --jd-color-text-icons:          rgba(0,0,0,0.75);
  --jd-color-icon:                rgba(0,0,0,0.65);
  --jd-color-dark:                rgba(0,0,0,0.75);
  --jd-color-separator:           rgba(0,0,0,0.12);
  --jd-color-background-active:   #007bf5;
  --jd-color-background-selection:           rgba(0,123,245,0.18);
  --jd-color-background-selection-opacity50:  rgba(0,123,245,0.12);
}
html[data-theme="dark"] {
  --jd-color-background-default:  #101828;
  --jd-color-text:                #ededed;
  --jd-color-panel:               #192334;
  --jd-color-border:              rgba(255,255,255,0.12);
  --jd-color-gray:                rgba(255,255,255,0.12);
  --jd-color-gray-dark:           rgba(255,255,255,0.45);
  --jd-color-label:               #9BAABB;
  --jd-color-placeholder:         rgba(155,170,187,0.55);
  --jd-color-background-button-hover:           rgba(255,255,255,0.08);
  --jd-color-button-background-hover:           rgba(255,255,255,0.1);
  --jd-color-button-background-hover-opacity40: rgba(255,255,255,0.08);
  --jd-color-text-icons:          rgba(255,255,255,0.85);
  --jd-color-icon:                rgba(255,255,255,0.75);
  --jd-color-dark:                rgba(255,255,255,0.85);
  --jd-color-separator:           rgba(255,255,255,0.12);
  --jd-color-background-active:   #90B4FD;
  --jd-color-background-selection:           rgba(144,180,253,0.25);
  --jd-color-background-selection-opacity50:  rgba(144,180,253,0.15);
  --jd-dark-background-color:     #192334;
  --jd-dark-background-darknes:   #101828;
  --jd-dark-background-ligher:    #253347;
  --jd-dark-border-color:         rgba(255,255,255,0.12);
  --jd-dark-text-color:           #ededed;
  --jd-dark-text-color-opacity80: rgba(237,237,237,0.8);
  --jd-dark-text-color-opacity50: rgba(237,237,237,0.5);
  --jd-dark-icon-color:           rgba(255,255,255,0.75);
  --jd-dark-toolbar-color:        #192334;
  --jd-dark-toolbar-seperator-color1:  rgba(255,255,255,0.08);
  --jd-dark-toolbar-seperator-color2:  rgba(255,255,255,0.15);
}

.jodit-container:not(.jodit_inline) {
  background: var(--background) !important;
  border: 2px solid var(--border) !important;
  border-radius: var(--radius) !important;
  box-shadow: none !important;
}
[data-theme="light"] .jodit-container:not(.jodit_inline) { background: #FCFAF7 !important; }

.jodit-container .jodit-wysiwyg {
  background: var(--background) !important;
  color: var(--foreground) !important;
  caret-color: var(--accent-prominent);
  min-height: 100px;
}
[data-theme="light"] .jodit-container .jodit-wysiwyg { background: #FCFAF7 !important; }

.jodit-popup {
  background: var(--background) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius) !important;
  box-shadow: 0 4px 24px rgba(0,0,0,0.25) !important;
}
.jodit-popup__content {
  background: var(--background) !important;
  border-radius: var(--radius) !important;
}

.jodit-context-menu__content {
  background: var(--background) !important;
  color: var(--foreground) !important;
}
.jodit-context-menu__content .jodit-button {
  color: var(--foreground) !important;
  background: transparent !important;
}
.jodit-context-menu__content .jodit-button:hover:not([disabled]) {
  background: color-mix(in srgb, var(--foreground) 8%, transparent) !important;
}

.jodit-popup .jodit-toolbar-button__button,
.jodit-popup .jodit-button {
  color: var(--foreground) !important;
  background: transparent !important;
}
.jodit-popup .jodit-toolbar-button__button:hover:not([disabled]),
.jodit-popup .jodit-button:hover:not([disabled]) {
  background: color-mix(in srgb, var(--foreground) 8%, transparent) !important;
}
.jodit-popup .jodit-toolbar-button_variant_initial.jodit-toolbar-button_state_activated .jodit-toolbar-button__button {
  background: color-mix(in srgb, var(--accent-prominent) 15%, transparent) !important;
  color: var(--accent-prominent) !important;
}
.jodit-popup .jodit-toolbar-button__icon svg,
.jodit-popup .jodit-icon svg { fill: var(--foreground) !important; }
.jodit-popup .jodit-toolbar-button_variant_initial.jodit-toolbar-button_state_activated .jodit-toolbar-button__icon svg {
  fill: var(--accent-prominent) !important;
}
.jodit-popup .jodit-toolbar-button__trigger svg {
  fill: var(--text-muted) !important;
  opacity: 1;
}
.jodit-popup .jodit-toolbar__separator,
.jodit-popup .jodit-ui-separator,
.jodit-popup [data-ref="dots"],
.jodit-popup [data-ref="strikethrough"],
.jodit-popup [data-ref="align"],
.jodit-popup [data-ref="lineHeight"] { display: none !important; }
.jodit-add-new-line { display: none !important; }

.jodit-popup .jodit-ui-input__wrapper {
  background: var(--background) !important;
  border-color: var(--border) !important;
}
[data-theme="light"] .jodit-popup .jodit-ui-input__wrapper { background: #FCFAF7 !important; }
.jodit-popup .jodit-ui-input__input {
  background: transparent !important;
  color: var(--foreground) !important;
}
.jodit-popup .jodit-ui-input_focused_true .jodit-ui-input__wrapper {
  border-color: var(--accent-prominent) !important;
}
.jodit-popup .jodit-ui-input__label { color: var(--text-muted) !important; }
.jodit-popup .jodit-ui-checkbox,
.jodit-popup label { color: var(--foreground) !important; opacity: 1 !important; }

.jodit-popup .jodit-ui-button-variants_variant_primary {
  background: var(--accent-prominent) !important;
  color: #fff !important;
  border-radius: var(--radius) !important;
}
.jodit-popup .jodit-ui-button-variants_variant_primary:hover:not([disabled]) {
  background: color-mix(in srgb, var(--accent-prominent) 85%, #000) !important;
}

.jodit-popup .jodit-ui-input:has([name="className"]),
.jodit-popup .jodit-ui-input:has([data-ref="className"]) { display: none !important; }

.jodit-dialog__panel {
  background-color: var(--background) !important;
  color: var(--foreground) !important;
}
.jodit-dialog__header { border-bottom-color: var(--border) !important; }
.jodit-dialog__header-title { color: var(--foreground) !important; }
.jodit-dialog__panel .jodit-toolbar-button__button {
  background: transparent !important;
  color: var(--foreground) !important;
}
.jodit-dialog__panel .jodit-toolbar-button__icon svg,
.jodit-dialog__panel .jodit-icon svg { fill: var(--foreground) !important; }
.jodit-dialog__content,
.jodit-dialog_prompt label,
.jodit-dialog_prompt div { color: var(--foreground) !important; }
.jodit-dialog__footer {
  background-color: var(--background) !important;
  border-top: 1px solid var(--border) !important;
}
.jodit-dialog__footer .jodit-ui-button_variant_initial {
  background: transparent !important;
  color: var(--foreground) !important;
  border: 1px solid var(--border) !important;
}
.jodit-dialog__footer .jodit-ui-button_variant_initial:hover:not([disabled]) {
  background: color-mix(in srgb, var(--foreground) 8%, transparent) !important;
}
.jodit-dialog__footer .jodit-ui-button_variant_primary {
  background: var(--accent-prominent) !important;
  color: #fff !important;
}
.jodit-dialog__footer .jodit-ui-button_variant_primary:hover:not([disabled]) {
  background: color-mix(in srgb, var(--accent-prominent) 85%, #000) !important;
}
.jodit-dialog__resizer svg { fill: var(--text-muted) !important; }

/* ---- Animations & Utilities ------------------------------- */

@keyframes spin { to { transform: rotate(360deg); } }
.animate-spin { animation: spin 0.7s linear infinite; }

/* ---- Print ------------------------------------------------ */

@media print {
  .site-header,
  .nav-drawer,
  .bf-footer { display: none; }
}
