/*
Theme Name:  Savor Tampa Bay
Theme URI:   https://savortampabay.com
Description: Luxury dark editorial child theme for Savor Tampa Bay, built on Kadence.
Author:      John Byrne
Version:     1.3.2
Template:    kadence
*/

/* ==========================================================================
   1. DESIGN TOKENS
   All brand decisions live here — color, type, spacing, motion.
   Change here; the rest of the system inherits.
   ========================================================================== */

:root {
  /* Color Primitives */
  --stb-color-black:          #111111;
  --stb-color-card:           #1A1A1A;
  --stb-color-text-primary:   #F8F5F0;
  --stb-color-text-secondary: #C9C5BD;
  --stb-color-gold:           #C9A66B;
  --stb-color-gold-hover:     #E5D4B8;
  --stb-color-gold-dark:      #B8955A;
  --stb-color-gold-border:        rgba(201, 166, 107, 0.15);
  --stb-color-gold-border-hover:  rgba(201, 166, 107, 0.3);
  --stb-color-teal:           #0A3D4C;

  /* Semantic Aliases — use these in components */
  --stb-color-bg-primary:   var(--stb-color-black);
  --stb-color-bg-card:      var(--stb-color-card);
  --stb-color-accent:       var(--stb-color-gold);
  --stb-color-accent-hover: var(--stb-color-gold-hover);
  --stb-color-text:         var(--stb-color-text-primary);

  /* Typography */
  --stb-font-heading: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --stb-font-body:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Spacing Scale (minor third × 2) */
  --stb-space-xs:  0.5rem;   /*  8px */
  --stb-space-sm:  1rem;     /* 16px */
  --stb-space-md:  1.5rem;   /* 24px */
  --stb-space-lg:  2.5rem;   /* 40px */
  --stb-space-xl:  4rem;     /* 64px */
  --stb-space-2xl: 6rem;     /* 96px */

  /* Animation */
  --stb-transition-base: 300ms ease;
  --stb-card-lift:       translateY(-4px);
}


/* ==========================================================================
   2. @FONT-FACE DECLARATIONS
   Self-hosted WOFF2 only — zero external font requests.
   Playfair Display: font-display: optional (prevents CLS from dramatic serif
   fallback reflow). Inter: font-display: swap (sans fallback is close enough).
   ========================================================================== */

/* --- Playfair Display 400 --- */
@font-face {
  font-family: 'Playfair Display';
  font-style:  normal;
  font-weight: 400;
  font-display: optional;
  src: url('fonts/playfair-display-v37-latin-400.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
                 U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122,
                 U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* --- Playfair Display 400 Italic --- */
@font-face {
  font-family: 'Playfair Display';
  font-style:  italic;
  font-weight: 400;
  font-display: optional;
  src: url('fonts/playfair-display-v37-latin-400italic.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
                 U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122,
                 U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* --- Playfair Display 700 --- */
@font-face {
  font-family: 'Playfair Display';
  font-style:  normal;
  font-weight: 700;
  font-display: optional;
  src: url('fonts/playfair-display-v37-latin-700.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
                 U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122,
                 U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* --- Playfair Display 900 --- */
@font-face {
  font-family: 'Playfair Display';
  font-style:  normal;
  font-weight: 900;
  font-display: optional;
  src: url('fonts/playfair-display-v37-latin-900.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
                 U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122,
                 U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* --- Inter 400 --- */
@font-face {
  font-family: 'Inter';
  font-style:  normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/inter-v13-latin-400.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
                 U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122,
                 U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* --- Inter 600 --- */
@font-face {
  font-family: 'Inter';
  font-style:  normal;
  font-weight: 600;
  font-display: swap;
  src: url('fonts/inter-v13-latin-600.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
                 U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122,
                 U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}


/* ==========================================================================
   3. RESET / KADENCE OVERRIDES
   Override Kadence's default light theme without !important.
   We use specificity: Kadence's own class hooks beat bare element selectors.
   ========================================================================== */

html,
body {
  background-color: var(--stb-color-bg-primary);
  color:            var(--stb-color-text);
}

.site,
.site-container,
.wp-site-blocks,
.wp-block-group,
#page {
  background-color: var(--stb-color-bg-primary);
}

/* Kadence header & footer */
.site-header,
.site-footer,
.footer-container {
  background-color: var(--stb-color-bg-primary);
}

/* Kadence content areas */
.entry-content,
.content-wrap,
.article-content {
  color: var(--stb-color-text);
}

/* Preserve Kadence nav specificity — target via own hooks */
.site-container h1,
.site-container h2,
.site-container h3,
.site-container h4,
.site-container h5,
.site-container h6,
.entry-content h1,
.entry-content h2,
.entry-content h3,
.entry-content h4,
.entry-content h5,
.entry-content h6 {
  color: var(--stb-color-text);
}

/* Kadence meta / comment text */
.site-container .entry-meta,
.site-container .comment-content,
.site-container .post-navigation {
  color: var(--stb-color-text-secondary);
}


/* ==========================================================================
   4. TYPOGRAPHY
   Responsive modular scale (major third ×1.25).
   Playfair Display for all editorial headings — the voice of the publication.
   Inter for body copy — optically steady, readable at 1.1rem.
   ========================================================================== */

body,
.site-container {
  font-family:  var(--stb-font-body);
  font-size:    1.1rem;
  line-height:  1.75;
  color:        var(--stb-color-text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* --- Headings --- */
.site-container h1,
.entry-content h1 {
  font-family:    var(--stb-font-heading);
  font-size:      4rem;
  font-weight:    700;
  line-height:    1.1;
  letter-spacing: -0.01em;
  color:          var(--stb-color-text);
  margin-bottom:  var(--stb-space-md);
}

.site-container h2,
.entry-content h2 {
  font-family:    var(--stb-font-heading);
  font-size:      2.5rem;
  font-weight:    700;
  line-height:    1.2;
  letter-spacing: -0.005em;
  color:          var(--stb-color-text);
  margin-bottom:  var(--stb-space-sm);
}

.site-container h3,
.entry-content h3 {
  font-family:    var(--stb-font-heading);
  font-size:      1.75rem;
  font-weight:    700;
  line-height:    1.3;
  color:          var(--stb-color-text);
  margin-bottom:  var(--stb-space-sm);
}

.site-container h4,
.entry-content h4 {
  font-family:    var(--stb-font-heading);
  font-size:      1.35rem;
  font-weight:    700;
  line-height:    1.4;
  color:          var(--stb-color-text);
  margin-bottom:  var(--stb-space-xs);
}

.site-container h5,
.entry-content h5,
.site-container h6,
.entry-content h6 {
  font-family:    var(--stb-font-body);
  font-size:      1.1rem;
  font-weight:    600;
  line-height:    1.5;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color:          var(--stb-color-text-secondary);
  margin-bottom:  var(--stb-space-xs);
}

/* --- Body copy rhythm --- */
.entry-content p {
  margin-bottom: var(--stb-space-md);
  max-width:     68ch; /* optimal reading measure */
}

/* Drop cap on first article paragraph — editorial distinction */
.entry-content > p:first-of-type::first-letter {
  font-family:  var(--stb-font-heading);
  font-size:    3.6em;
  font-weight:  700;
  line-height:  0.75;
  float:        left;
  margin-right: 0.1em;
  margin-top:   0.1em;
  color:        var(--stb-color-accent);
}

/* --- Links — gold throughout --- */
.site-container a,
.entry-content a {
  color:           var(--stb-color-accent);
  text-decoration: underline;
  text-underline-offset: 0.2em;
  text-decoration-thickness: 1px;
  text-decoration-color: var(--stb-color-gold-border);
}

.site-container a:hover,
.entry-content a:hover {
  color:                  var(--stb-color-accent-hover);
  text-decoration-color:  var(--stb-color-accent-hover);
}

/* --- Mobile breakpoint --- */
@media (max-width: 768px) {
  .site-container h1,
  .entry-content h1 {
    font-size: 2.5rem;
  }

  .site-container h2,
  .entry-content h2 {
    font-size: 1.8rem;
  }

  .site-container h3,
  .entry-content h3 {
    font-size: 1.4rem;
  }

  .site-container h4,
  .entry-content h4 {
    font-size: 1.2rem;
  }
}

/* --- Blockquote — editorial pull-quote feel --- */
.site-container blockquote,
.entry-content blockquote {
  margin:        var(--stb-space-lg) 0;
  padding:       var(--stb-space-md) var(--stb-space-lg);
  border-left:   3px solid var(--stb-color-accent);
  background:    rgba(201, 166, 107, 0.04);
  font-family:   var(--stb-font-heading);
  font-size:     1.35rem;
  font-style:    italic;
  line-height:   1.5;
  color:         var(--stb-color-text-primary);
}

.site-container blockquote cite,
.entry-content blockquote cite {
  display:        block;
  margin-top:     var(--stb-space-xs);
  font-family:    var(--stb-font-body);
  font-style:     normal;
  font-size:      0.85rem;
  font-weight:    600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color:          var(--stb-color-text-secondary);
}


/* ==========================================================================
   5. COMPONENTS
   ========================================================================== */

/* --------------------------------------------------------------------------
   5a. Cards — .stb-card
   The core content atom: restaurant listings, articles, chef profiles.
   Dark background, gold border that brightens on hover, editorial lift.
   -------------------------------------------------------------------------- */

.stb-card {
  background:    var(--stb-color-bg-card);
  border:        1px solid var(--stb-color-gold-border);
  border-radius: 2px;
  overflow:      hidden;
  transform:     translateY(0); /* explicit default — safe for reduced motion */
}

.stb-card__image {
  width:       100%;
  aspect-ratio: 16 / 9;
  object-fit:  cover;
  display:     block;
}

.stb-card__body {
  padding: var(--stb-space-md);
}

.stb-card__kicker {
  display:        block;
  margin-bottom:  var(--stb-space-xs);
  font-family:    var(--stb-font-body);
  font-size:      0.72rem;
  font-weight:    600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color:          var(--stb-color-accent);
}

.stb-card__title {
  font-family:   var(--stb-font-heading);
  font-size:     1.35rem;
  font-weight:   700;
  line-height:   1.25;
  color:         var(--stb-color-text);
  margin:        0 0 var(--stb-space-xs);
}

.stb-card__excerpt {
  font-size:   0.95rem;
  line-height: 1.65;
  color:       var(--stb-color-text-secondary);
  margin:      0;
}

/* Motion: only animate when user hasn't requested reduced motion */
@media (prefers-reduced-motion: no-preference) {
  .stb-card {
    transition: transform var(--stb-transition-base),
                box-shadow var(--stb-transition-base),
                border-color var(--stb-transition-base);
  }

  .stb-card:hover {
    transform:    var(--stb-card-lift);
    box-shadow:   0 8px 25px rgba(0, 0, 0, 0.3);
    border-color: var(--stb-color-gold-border-hover);
  }
}


/* --------------------------------------------------------------------------
   5b. Buttons — .stb-btn, .stb-btn-primary, .stb-btn-secondary
   Padding: 12px 28px. Min-height 48px (WCAG touch target).
   Letter-spacing on uppercase — creates premium, measured feel.
   -------------------------------------------------------------------------- */

.stb-btn {
  display:         inline-block;
  padding:         12px 28px;
  min-height:      48px;
  font-family:     var(--stb-font-body);
  font-weight:     600;
  font-size:       0.85rem;
  text-transform:  uppercase;
  letter-spacing:  0.08em;
  border-radius:   2px;
  cursor:          pointer;
  text-decoration: none;
  text-align:      center;
  border:          1px solid transparent;
  line-height:     1;
  vertical-align:  middle;
  /* No transition in base — add only when motion is allowed */
}

@media (prefers-reduced-motion: no-preference) {
  .stb-btn {
    transition: all var(--stb-transition-base);
  }
}

/* Primary — solid gold, dark text */
.stb-btn-primary {
  background-color: var(--stb-color-accent);
  color:            var(--stb-color-bg-primary);
  border-color:     var(--stb-color-accent);
}

.stb-btn-primary:hover,
.stb-btn-primary:focus-visible {
  background-color: var(--stb-color-gold-dark);
  border-color:     var(--stb-color-gold-dark);
  color:            var(--stb-color-bg-primary);
  text-decoration:  none;
}

/* Secondary — transparent, gold outline */
.stb-btn-secondary {
  background-color: transparent;
  color:            var(--stb-color-accent);
  border:           1px solid var(--stb-color-accent);
}

.stb-btn-secondary:hover,
.stb-btn-secondary:focus-visible {
  background-color: rgba(201, 166, 107, 0.1);
  color:            var(--stb-color-accent-hover);
  text-decoration:  none;
}


/* --------------------------------------------------------------------------
   5c. Gold Accent System
   Links already styled in §4. Additional accent utilities below.
   -------------------------------------------------------------------------- */

/* Underline accent for section headings, pull quotes */
.stb-gold-underline {
  border-bottom: 2px solid var(--stb-color-accent);
  padding-bottom: 0.15em;
}

/* Taxonomy / cuisine / neighborhood tags */
.stb-tag {
  display:        inline-block;
  padding:        4px 12px;
  background:     rgba(201, 166, 107, 0.1);
  color:          var(--stb-color-accent);
  border:         1px solid var(--stb-color-gold-border);
  border-radius:  2px;
  font-family:    var(--stb-font-body);
  font-size:      0.72rem;
  font-weight:    600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-decoration: none;
  line-height:    1.4;
}

@media (prefers-reduced-motion: no-preference) {
  .stb-tag {
    transition: background-color var(--stb-transition-base),
                border-color var(--stb-transition-base);
  }

  .stb-tag:hover {
    background:  rgba(201, 166, 107, 0.18);
    border-color: var(--stb-color-gold-border-hover);
    color:        var(--stb-color-accent-hover);
  }
}

/* Rating — inline gold stars / score display */
.stb-rating {
  color:       var(--stb-color-accent);
  font-weight: 600;
  font-size:   0.9rem;
  letter-spacing: 0.02em;
}

/* Section title bar — gold rule beneath section headers */
.stb-section-title {
  font-family:    var(--stb-font-heading);
  font-size:      0.8rem;
  font-weight:    700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color:          var(--stb-color-accent);
  margin-bottom:  var(--stb-space-md);
  padding-bottom: var(--stb-space-xs);
  border-bottom:  1px solid var(--stb-color-gold-border);
}


/* --------------------------------------------------------------------------
   5d. Damask Texture + Ornate Logo
   Hero sections use damask at 5-8% visibility over #111111.
   Achieved via background-blend-mode: soft-light — the texture "shows through"
   the dark overlay without the image dominating the composition.
   -------------------------------------------------------------------------- */

.stb-hero-damask {
  position:         relative;
  background-image: url('assets/damask.webp');
  background-size:  cover;
  background-position: center;
  background-blend-mode: soft-light;
  background-color: var(--stb-color-bg-primary);
}

/* Semi-opaque overlay brings the texture back down to 5-8% visibility */
.stb-hero-damask::before {
  content:  '';
  position: absolute;
  inset:    0;
  background-color: var(--stb-color-bg-primary);
  opacity:  0.93; /* 93% solid = ~7% texture shows through */
  pointer-events: none;
  z-index:  0;
}

/* All direct children sit above the overlay */
.stb-hero-damask > * {
  position: relative;
  z-index:  1;
}

/* Section divider — ornate logo between homepage sections */
.stb-section-divider {
  text-align:  center;
  padding:     var(--stb-space-lg) 0;
  user-select: none;
}

.stb-section-divider img {
  max-width:  120px;
  height:     auto;
  display:    inline-block;
  opacity:    0.3;
  /* Subtle gold tint: sepia → slight warm hue-shift → desaturated → brightened */
  filter:     sepia(1) hue-rotate(5deg) saturate(0.5) brightness(1.2);
}


/* --------------------------------------------------------------------------
   5e. Skip Link (accessibility)
   Visually hidden until :focus — then appears as a gold banner.
   -------------------------------------------------------------------------- */

.skip-to-content {
  position:  absolute;
  left:      -9999px;
  top:       auto;
  width:     1px;
  height:    1px;
  overflow:  hidden;
  z-index:   9999;
}

.skip-to-content:focus {
  position:    fixed;
  top:         10px;
  left:        10px;
  width:       auto;
  height:      auto;
  padding:     12px 28px;
  background:  var(--stb-color-accent);
  color:       var(--stb-color-bg-primary);
  font-family: var(--stb-font-body);
  font-weight: 600;
  font-size:   0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-decoration: none;
  border-radius: 2px;
  z-index:     100000;
}


/* ==========================================================================
   6. ACCESSIBILITY
   Focus rings, touch targets, reduced-motion guard.
   WCAG AA 4.5:1 contrast is met by design:
     #F8F5F0 on #111111 ≈ 19:1 | #C9A66B on #111111 ≈ 5.74:1 (both PASS AA)
   ========================================================================== */

/* Gold focus ring — visible on all dark backgrounds */
*:focus-visible {
  outline:        2px solid var(--stb-color-accent);
  outline-offset: 2px;
}

/* Touch target minimums (WCAG 2.5.5) */
.stb-btn,
button,
[role="button"],
input[type="submit"],
input[type="button"],
input[type="reset"],
select {
  min-height: 48px;
  min-width:  48px;
}

/* Form inputs — dark theme baseline */
.site-container input[type="text"],
.site-container input[type="email"],
.site-container input[type="search"],
.site-container textarea {
  background:  var(--stb-color-card);
  color:       var(--stb-color-text);
  border:      1px solid var(--stb-color-gold-border);
  border-radius: 2px;
  padding:     10px 14px;
}

.site-container input[type="text"]:focus,
.site-container input[type="email"]:focus,
.site-container input[type="search"]:focus,
.site-container textarea:focus {
  border-color: var(--stb-color-accent);
  outline:      2px solid var(--stb-color-accent);
  outline-offset: 2px;
}

/* Belt-and-suspenders reduced-motion kill-switch.
   Works in tandem with the no-preference guards above.
   Aggressively stops all animation for users who need it.
   !important is permitted in this block only. */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration:       0.01ms !important;
    animation-iteration-count: 1     !important;
    transition-duration:      0.01ms !important;
    scroll-behavior:          auto   !important;
  }
}


/* ==========================================================================
   7. UTILITIES
   Single-purpose helper classes — composable, never over-specific.
   ========================================================================== */

/* Screen reader only — hides visually, exposed to assistive tech */
.stb-visually-hidden {
  position:   absolute;
  width:      1px;
  height:     1px;
  padding:    0;
  margin:     -1px;
  overflow:   hidden;
  clip:       rect(0, 0, 0, 0);
  white-space: nowrap;
  border:     0;
}

/* Color utilities */
.stb-text-gold     { color: var(--stb-color-accent); }
.stb-text-muted    { color: var(--stb-color-text-secondary); }

/* Background utilities */
.stb-bg-card       { background-color: var(--stb-color-bg-card); }
.stb-bg-dark       { background-color: var(--stb-color-bg-primary); }

/* Spacing utilities */
.stb-mt-lg         { margin-top: var(--stb-space-lg); }
.stb-mb-lg         { margin-bottom: var(--stb-space-lg); }
.stb-py-xl         { padding-top: var(--stb-space-xl); padding-bottom: var(--stb-space-xl); }

/* Layout */
.stb-container {
  width:    100%;
  max-width: 1200px;
  margin:   0 auto;
  padding:  0 var(--stb-space-md);
}

/* Grid for card layouts — auto-fill ensures responsive wrapping */
.stb-grid-cards {
  display:               grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap:                   var(--stb-space-md);
}

/* Divider line */
.stb-divider {
  border: none;
  border-top: 1px solid var(--stb-color-gold-border);
  margin: var(--stb-space-lg) 0;
}


/* ==========================================================================
   8. HEADER, FOOTER & NAVIGATION
   Phase 2 — persistent publication chrome.
   All overrides target Kadence's own CSS classes; use --stb-* design tokens.
   ========================================================================== */

/* --- 8a. Header Shell — solid dark, sticky with blur --- */
/* Block header (Kadence Header Adv Block) uses header.wp-block-kadence-header */
/* Classic header fallback: .site-header — kept for compatibility */
header.wp-block-kadence-header,
header.wp-block-kadence-header .wp-block-kadence-header-row,
header.wp-block-kadence-header .wp-block-kadence-header-section,
header.wp-block-kadence-header .kadence-header-row-inner,
.site-header,
.site-header .site-header-row,
.site-header .site-header-row-container {
  background-color: var(--stb-color-black) !important;
}

/* Sticky header — stays fixed, shrinks, adds backdrop-blur */
/* Block header sticky: Kadence adds header-desktop-sticky / item-is-fixed classes */
header.wp-block-kadence-header.header-desktop-sticky,
header.wp-block-kadence-header.item-is-fixed,
.site-header.item-is-fixed {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background-color: rgba(17, 17, 17, 0.95) !important;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* Desktop header height: 80px default, 64px when scrolled/sticky */
header.wp-block-kadence-header .wp-block-kadence-header-row,
.site-header .site-header-row {
  min-height: 80px;
}

header.wp-block-kadence-header.item-is-fixed .wp-block-kadence-header-row,
.site-header.item-is-fixed .site-header-row {
  min-height: 64px;
  transition: min-height var(--stb-transition-base);
}

/* Mobile header height: 70px default, 56px when scrolled */
@media (max-width: 768px) {
  header.wp-block-kadence-header .wp-block-kadence-header-row,
  .site-header .site-header-row {
    min-height: 70px;
  }
  header.wp-block-kadence-header.item-is-fixed .wp-block-kadence-header-row,
  .site-header.item-is-fixed .site-header-row {
    min-height: 56px;
  }
}

/* --- 8b. Logo — 72px desktop, 62px mobile --- */
header.wp-block-kadence-header .wp-block-site-logo img,
header.wp-block-kadence-header .custom-logo,
.site-header .site-branding img,
.site-header .custom-logo {
  max-height: 72px;
  width: auto;
  transition: max-height var(--stb-transition-base);
}

header.wp-block-kadence-header.item-is-fixed .wp-block-site-logo img,
header.wp-block-kadence-header.item-is-fixed .custom-logo,
.site-header.item-is-fixed .site-branding img,
.site-header.item-is-fixed .custom-logo {
  max-height: 56px;
}

@media (max-width: 768px) {
  header.wp-block-kadence-header .wp-block-site-logo img,
  header.wp-block-kadence-header .custom-logo,
  .site-header .site-branding img,
  .site-header .custom-logo {
    max-height: 62px;
  }
  header.wp-block-kadence-header.item-is-fixed .wp-block-site-logo img,
  header.wp-block-kadence-header.item-is-fixed .custom-logo,
  .site-header.item-is-fixed .site-branding img,
  .site-header.item-is-fixed .custom-logo {
    max-height: 48px;
  }
}

/* --- 8b-fix. Logo sizing — prevent Kadence header flex from shrinking logo --- */
/* Fix: Kadence block header section is a flex row; the identity block (logo) is a direct
   child and gets flex-shrunk to ~20px. Give it explicit flex and min-width so it renders
   at the correct size. The logo block has width:120 set; max-height:72px controls desktop. */
header.wp-block-kadence-header .wp-block-kadence-identity,
header.wp-block-kadence-header .wp-block-site-logo {
  flex: 0 0 auto;
  min-width: 72px;
}

header.wp-block-kadence-header .wp-block-kadence-identity img,
header.wp-block-kadence-header .wp-block-site-logo img,
header.wp-block-kadence-header img.custom-logo {
  width: auto !important;
  max-height: 72px !important;
  height: auto !important;
}

/* Keep column fix as fallback for layouts that DO use header-column wrapper */
header.wp-block-kadence-header .wp-block-kadence-header-column[data-location="left"],
header.wp-block-kadence-header .wp-block-kadence-header-column:first-child {
  min-width: 150px;
  flex: 0 0 auto;
}

/* --- 8c. Navigation Links — uppercase, gold hover underline --- */
/* Target both block nav (.wp-block-kadence-navigation) and classic nav (.kb-navigation) */
.wp-block-kadence-navigation .kb-nav-link-content,
.header-navigation .menu-container > ul > li > a,
.kb-navigation .kb-nav-link-content {
  text-transform: uppercase !important;
  letter-spacing: 0.08em;
  font-family: var(--stb-font-body);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--stb-color-text-primary);
  text-decoration: none;
  position: relative;
  padding-bottom: 4px;
}

/* Gold underline animation on hover */
.wp-block-kadence-navigation .kb-nav-link-content::after,
.header-navigation .menu-container > ul > li > a::after,
.kb-navigation .kb-nav-link-content::after {
  content: '';
  display: block;
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--stb-color-gold);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform var(--stb-transition-base);
}

.wp-block-kadence-navigation .menu-item:hover > .kb-link-wrap > .kb-nav-link-content::after,
.wp-block-kadence-navigation .menu-item.current-menu-item > .kb-link-wrap > .kb-nav-link-content::after,
.header-navigation .menu-container > ul > li:hover > a::after,
.header-navigation .menu-container > ul > li.current-menu-item > a::after,
.kb-navigation .kb-nav-link-content:hover::after,
.kb-navigation li.current-menu-item .kb-nav-link-content::after {
  transform: scaleX(1);
}

/* Active/current page link gold color */
.wp-block-kadence-navigation .menu-item.current-menu-item > .kb-link-wrap > .kb-nav-link-content,
.header-navigation .menu-container > ul > li.current-menu-item > a,
.kb-navigation li.current-menu-item > .kb-nav-link-content {
  color: var(--stb-color-gold);
}

/* Dropdown sub-menu styling */
.wp-block-kadence-navigation .kb-nav-sub-menu,
.header-navigation .sub-menu,
.kb-navigation .kb-nav-sub-menu {
  background-color: var(--stb-color-card);
  border: 1px solid var(--stb-color-gold-border);
  border-top: 2px solid var(--stb-color-gold);
}

.wp-block-kadence-navigation .kb-nav-sub-menu a,
.header-navigation .sub-menu a,
.kb-navigation .kb-nav-sub-menu a {
  color: var(--stb-color-text-primary);
  font-size: 0.85rem;
  text-transform: none;
  letter-spacing: normal;
  padding: 8px 16px;
}

.wp-block-kadence-navigation .kb-nav-sub-menu a:hover,
.header-navigation .sub-menu a:hover,
.kb-navigation .kb-nav-sub-menu a:hover {
  color: var(--stb-color-gold);
  background-color: rgba(201, 166, 107, 0.05);
}

/* --- 8d. Subscribe Button — gold outline in header --- */
header.wp-block-kadence-header .kb-button,
header.wp-block-kadence-header .wp-block-kadence-advancedbtn a.kb-button,
.site-header .kb-button,
.site-header .wp-block-kadence-advancedbtn .kt-btn-wrap a {
  background-color: transparent;
  color: var(--stb-color-gold);
  border: 1px solid var(--stb-color-gold);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-family: var(--stb-font-body);
  font-weight: 600;
  font-size: 0.8rem;
  padding: 8px 20px;
  min-height: 40px;
  border-radius: 2px;
  text-decoration: none;
}

header.wp-block-kadence-header .kb-button:hover,
header.wp-block-kadence-header .wp-block-kadence-advancedbtn a.kb-button:hover,
.site-header .kb-button:hover,
.site-header .wp-block-kadence-advancedbtn .kt-btn-wrap a:hover {
  background-color: rgba(201, 166, 107, 0.1);
  color: var(--stb-color-gold-hover);
  border-color: var(--stb-color-gold-hover);
}

/* --- 8e. Mobile Menu — hamburger tap target, slide-from-right panel --- */

/* Hamburger trigger: minimum 48px tap target */
header.wp-block-kadence-header .kb-off-canvas-trigger,
header.wp-block-kadence-header .menu-toggle-open,
.site-header .menu-toggle-open,
.site-header .kb-off-canvas-trigger {
  min-width: 48px;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--stb-color-text-primary);
}

header.wp-block-kadence-header .kb-off-canvas-trigger:hover,
header.wp-block-kadence-header .menu-toggle-open:hover,
.site-header .menu-toggle-open:hover,
.site-header .kb-off-canvas-trigger:hover {
  color: var(--stb-color-gold);
}

/* Off-canvas panel — dark background, slide from right */
.kb-off-canvas-panel,
.mobile-navigation-container {
  background-color: var(--stb-color-black);
  color: var(--stb-color-text-primary);
}

/* Mobile nav links */
.kb-off-canvas-panel .kb-navigation a,
.mobile-navigation-container .menu-container a {
  color: var(--stb-color-text-primary);
  font-family: var(--stb-font-body);
  font-size: 1rem;
  padding: 12px 24px;
  min-height: 48px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--stb-color-gold-border);
}

.kb-off-canvas-panel .kb-navigation a:hover,
.mobile-navigation-container .menu-container a:hover {
  color: var(--stb-color-gold);
  background-color: rgba(201, 166, 107, 0.05);
}

/* Close button in off-canvas panel */
.kb-off-canvas-panel .kb-off-canvas-close,
.mobile-navigation-container .menu-toggle-close {
  color: var(--stb-color-text-primary);
  min-width: 48px;
  min-height: 48px;
}

.kb-off-canvas-panel .kb-off-canvas-close:hover,
.mobile-navigation-container .menu-toggle-close:hover {
  color: var(--stb-color-gold);
}

/* --- 8f. Search Element — dark theme styling --- */
header.wp-block-kadence-header .kb-search-bar,
header.wp-block-kadence-header .search-toggle-open,
header.wp-block-kadence-header .wp-block-kadence-advancedsearch,
.site-header .kb-search-bar,
.site-header .search-toggle-open {
  color: var(--stb-color-text-primary);
  min-width: 48px;
  min-height: 48px;
}

header.wp-block-kadence-header .kb-search-bar:hover,
header.wp-block-kadence-header .search-toggle-open:hover,
header.wp-block-kadence-header .wp-block-kadence-advancedsearch:hover,
.site-header .kb-search-bar:hover,
.site-header .search-toggle-open:hover {
  color: var(--stb-color-gold);
}

/* Search overlay/dropdown styling */
.kb-search-bar-modal,
.header-search-modal {
  background-color: var(--stb-color-black);
  border: 1px solid var(--stb-color-gold-border);
}

.kb-search-bar-modal input[type="search"],
.header-search-modal input[type="search"] {
  background: var(--stb-color-card);
  color: var(--stb-color-text-primary);
  border: 1px solid var(--stb-color-gold-border);
  font-family: var(--stb-font-body);
  font-size: 1rem;
  padding: 12px 16px;
}

.kb-search-bar-modal input[type="search"]:focus,
.header-search-modal input[type="search"]:focus {
  border-color: var(--stb-color-gold);
}

/* --- 8g. Footer — dark chrome with gold accents --- */

/* Footer shell — solid dark background */
.site-footer {
  background-color: var(--stb-color-black);
  color: var(--stb-color-text-primary);
}

/* Gold top border on footer wrapper */
.site-footer-wrap {
  border-top: 2px solid var(--stb-color-gold);
  padding-top: var(--stb-space-xl);
}

/* Footer widget area links */
.footer-widget-area a,
.site-footer a {
  color: var(--stb-color-text-secondary);
  text-decoration: none;
  transition: color var(--stb-transition-base);
}

.footer-widget-area a:hover,
.site-footer a:hover {
  color: var(--stb-color-gold);
}

/* Footer widget headings */
.footer-widget-area .widget-title,
.site-footer .widget-title {
  font-family: var(--stb-font-body);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--stb-color-gold);
  margin-bottom: var(--stb-space-sm);
  padding-bottom: var(--stb-space-xs);
  border-bottom: 1px solid var(--stb-color-gold-border);
}

/* Footer middle row — 4-column layout handled by Kadence Customizer */
.site-footer .site-middle-footer-wrap {
  padding: var(--stb-space-lg) 0;
}

/* Footer about blurb text */
.site-footer .footer-widget-area:first-child p {
  color: var(--stb-color-text-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* Footer logo sizing */
.site-footer .footer-widget-area img {
  max-width: 120px;
  height: auto;
  margin-bottom: var(--stb-space-sm);
}

/* Footer navigation menu links */
.site-footer .widget_nav_menu a {
  display: block;
  padding: 4px 0;
  font-size: 0.9rem;
}

/* Footer social icons */
.site-footer .footer-social-wrap .social-button {
  color: var(--stb-color-text-secondary);
  transition: color var(--stb-transition-base);
  min-width: 44px;
  min-height: 44px;
}

.site-footer .footer-social-wrap .social-button:hover {
  color: var(--stb-color-gold);
}

/* Footer bottom bar (FOOT-03) */
.site-footer .site-bottom-footer-wrap {
  border-top: 1px solid var(--stb-color-gold-border);
  padding: var(--stb-space-sm) 0;
  font-size: 0.8rem;
  color: var(--stb-color-text-secondary);
}

.site-footer .site-bottom-footer-wrap a {
  color: var(--stb-color-text-secondary);
}

.site-footer .site-bottom-footer-wrap a:hover {
  color: var(--stb-color-gold);
}

/* Footer mobile stacking (FOOT-04) */
@media (max-width: 768px) {
  .site-footer .site-middle-footer-inner-wrap {
    flex-direction: column;
  }
  .site-footer .footer-widget-area {
    width: 100%;
    margin-bottom: var(--stb-space-lg);
    text-align: center;
  }
}

/* --- 8h. Mega Menu Panels — dark dropdown with article cards --- */
.kb-navigation .kb-nav-drop-wrap,
.kb-navigation .mega-menu-panel {
  background-color: var(--stb-color-card);
  border: 1px solid var(--stb-color-gold-border);
  border-top: 2px solid var(--stb-color-gold);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

/* Article preview cards inside mega menu */
.kb-navigation .mega-menu-panel .kb-posts-block .entry {
  background: transparent;
  border-bottom: 1px solid var(--stb-color-gold-border);
  padding: var(--stb-space-xs) 0;
}

.kb-navigation .mega-menu-panel .kb-posts-block .entry-title {
  font-family: var(--stb-font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--stb-color-text-primary);
  line-height: 1.3;
}

.kb-navigation .mega-menu-panel .kb-posts-block .entry-title:hover {
  color: var(--stb-color-gold);
}

.kb-navigation .mega-menu-panel .kb-posts-block img {
  border-radius: 2px;
  aspect-ratio: 16/9;
  object-fit: cover;
}

/* ==========================================================================
   8i. LAYOUT FIXES — Desktop 3-column header, mobile logo, footer polish
   Added v1.0.5 — fixes broken flex distribution and mobile visibility issues.
   ========================================================================== */

/* --- Desktop header: force 3-column flex distribution --- */
header.wp-block-kadence-header .wp-block-kadence-header-section {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--stb-space-md);
}

/* Left column — logo, don't grow */
header.wp-block-kadence-header .wp-block-kadence-header-column[data-location="left"] {
  flex: 0 0 auto;
  min-width: 80px;
}

/* Center column — nav, take remaining space */
header.wp-block-kadence-header .wp-block-kadence-header-column[data-location="center"] {
  flex: 1 1 auto;
  display: flex;
  justify-content: center;
}

/* Right column — CTA, don't grow */
header.wp-block-kadence-header .wp-block-kadence-header-column[data-location="right"] {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: var(--stb-space-sm);
}

/* --- Force horizontal nav — all 7 items in one row --- */
.wp-block-kadence-navigation .menu {
  display: flex !important;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0;
}

.wp-block-kadence-navigation .menu > .menu-item {
  white-space: nowrap;
}

/* Slightly smaller nav text to fit 7 items without wrapping */
.wp-block-kadence-navigation .kb-nav-link-content {
  font-size: 0.75rem !important;
  padding: 4px 8px;
}

/* --- Mobile header — show logo --- */
@media (max-width: 768px) {
  .wp-block-kadence-header-container-tablet .wp-block-kadence-identity {
    display: flex !important;
  }
  .wp-block-kadence-header-container-tablet .wp-block-kadence-identity img,
  .wp-block-kadence-header-container-tablet .custom-logo {
    max-height: 50px;
    width: auto;
  }
}

/* --- Mobile footer readability fixes --- */
@media (max-width: 768px) {
  .site-footer .footer-widget-area {
    font-size: 0.95rem;
    line-height: 1.7;
  }

  /* Remove default bullets from Topics list */
  .site-footer .footer-widget-area ul {
    list-style: none;
    padding-left: 0;
    margin-left: 0;
  }

  /* Fix excessive whitespace below footer */
  .site-footer {
    padding-bottom: 0;
  }
  .site-footer-wrap {
    padding-bottom: var(--stb-space-sm);
  }
}

/* Desktop footer — also remove bullets from widget lists */
.site-footer .footer-widget-area ul {
  list-style: none;
  padding-left: 0;
}

/* Fix: Kadence sets min-height on .wp-site-blocks to fill viewport,
   which creates a black gap below the footer when content is short.
   Let the footer sit naturally at the bottom of content instead. */
.site.wp-site-blocks {
  min-height: auto !important;
}

/* ==========================================================================
   8j. DARK THEME OVERRIDES — content areas, dropdowns, mobile menu, search
   Added v1.0.7 — eliminates white/light backgrounds leaking through Kadence defaults.
   ========================================================================== */

/* --- Fix 1: White content area boxes --- */
#inner-wrap,
.content-wrap,
.hero-section-overlay,
.entry-content-wrap,
.content-bg,
.content-area,
.site-main,
.site-inner,
#primary,
#main,
.wp-block-post-content {
  background-color: var(--stb-color-bg-primary) !important;
}

/* Kadence page content container */
.entry.content-bg {
  background-color: var(--stb-color-bg-primary) !important;
  box-shadow: none !important;
}

/* --- Fix 2: Dropdown / mega menu white backgrounds --- */
.wp-block-kadence-navigation .kb-nav-drop-wrap,
.wp-block-kadence-navigation .kb-nav-dropdown-container,
.wp-block-kadence-navigation .sub-menu,
.wp-block-kadence-navigation .kb-nav-sub-menu,
.wp-block-kadence-navigation .kadence-mega-menu-panel,
.wp-block-kadence-navigation .kb-nav-sub-wrap {
  background-color: var(--stb-color-card) !important;
  border: 1px solid var(--stb-color-gold-border) !important;
  border-top: 2px solid var(--stb-color-gold) !important;
}

/* Dropdown link text color */
.wp-block-kadence-navigation .kb-nav-drop-wrap a,
.wp-block-kadence-navigation .kb-nav-dropdown-container a,
.wp-block-kadence-navigation .sub-menu a,
.wp-block-kadence-navigation .kb-nav-sub-menu a {
  color: var(--stb-color-text-primary) !important;
}

.wp-block-kadence-navigation .kb-nav-drop-wrap a:hover,
.wp-block-kadence-navigation .kb-nav-dropdown-container a:hover {
  color: var(--stb-color-gold) !important;
  background-color: rgba(201, 166, 107, 0.05) !important;
}

/* --- Fix 3: Mobile header off-center --- */
@media (max-width: 1024px) {
  /* Mobile header row — override Kadence grid to flex for full-width distribution */
  .wp-block-kadence-header-tablet .kadence-header-row-inner {
    display: flex !important;
    width: 100% !important;
  }

  /* Mobile header section — spread logo and hamburger across full width */
  .wp-block-kadence-header-tablet .wp-block-kadence-header-section {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    width: 100% !important;
    flex: 1 !important;
    padding: 0 var(--stb-space-sm) !important;
  }

  /* Mobile header row full width */
  .wp-block-kadence-header-tablet .wp-block-kadence-header-row {
    width: 100% !important;
  }
}

/* --- Fix 4: Mobile off-canvas panel — dark theme and proper slide-out --- */
/* The actual panel wrapper — must be full-height slide-from-right */
.kb-off-canvas-inner-wrap {
  background-color: var(--stb-color-black) !important;
  color: var(--stb-color-text-primary) !important;
  height: 100vh !important;
  min-height: 100vh !important;
  overflow-y: auto !important;
}

.wp-block-kadence-off-canvas {
  background-color: transparent !important;
}

/* Off-canvas inner content area */
.wp-block-kadence-off-canvas .kb-off-canvas-inner {
  background-color: var(--stb-color-black) !important;
  color: var(--stb-color-text-primary) !important;
}

/* Off-canvas links */
.wp-block-kadence-off-canvas .wp-block-kadence-navigation a,
.wp-block-kadence-off-canvas .kb-nav-link-content {
  color: var(--stb-color-text-primary) !important;
}

.wp-block-kadence-off-canvas .wp-block-kadence-navigation .menu-item {
  border-bottom: 1px solid var(--stb-color-gold-border) !important;
}

.wp-block-kadence-off-canvas .wp-block-kadence-navigation a:hover,
.wp-block-kadence-off-canvas .kb-nav-link-content:hover {
  color: var(--stb-color-gold) !important;
}

/* Off-canvas close button */
.wp-block-kadence-off-canvas .kb-off-canvas-close {
  color: var(--stb-color-text-primary) !important;
}

/* Off-canvas overlay */
.kb-off-canvas-overlay {
  background-color: rgba(0, 0, 0, 0.7) !important;
}

/* Off-canvas nav dropdown toggles */
.wp-block-kadence-off-canvas .kb-nav-dropdown-toggle-btn {
  color: var(--stb-color-text-primary) !important;
}

/* Force vertical nav layout inside off-canvas panel.
   Must override Kadence's .kb-nav-*-horizontal-layout-standard specificity. */
.wp-block-kadence-off-canvas .kb-nav-desktop-horizontal-layout-standard .kb-navigation.menu,
.wp-block-kadence-off-canvas .kb-nav-tablet-horizontal-layout-standard .kb-navigation.menu,
.wp-block-kadence-off-canvas .kb-nav-mobile-horizontal-layout-standard .kb-navigation.menu,
.wp-block-kadence-off-canvas .wp-block-kadence-navigation .kb-navigation,
.wp-block-kadence-off-canvas .wp-block-kadence-navigation .menu,
.wp-block-kadence-off-canvas ul.kb-navigation {
  display: flex !important;
  flex-direction: column !important;
  flex-wrap: nowrap !important;
  width: 100% !important;
  align-items: stretch !important;
}

.wp-block-kadence-off-canvas .wp-block-kadence-navigation .navigation,
.wp-block-kadence-off-canvas .wp-block-kadence-navigation nav {
  flex-direction: column !important;
  width: 100% !important;
}

.wp-block-kadence-off-canvas .menu > .menu-item {
  width: 100% !important;
  white-space: normal !important;
  border-bottom: 1px solid var(--stb-color-gold-border) !important;
}

.wp-block-kadence-off-canvas .menu > .menu-item > .kb-link-wrap {
  padding: 14px 24px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
}

/* Off-canvas sub-menus also vertical */
.wp-block-kadence-off-canvas .kb-nav-drop-wrap,
.wp-block-kadence-off-canvas .kb-nav-dropdown-container {
  position: relative !important;
  width: 100% !important;
  background-color: rgba(201, 166, 107, 0.03) !important;
  border: none !important;
  border-top: none !important;
  box-shadow: none !important;
}

/* --- Fix 5: Search button sizing — match Subscribe button --- */
header.wp-block-kadence-header .wp-block-kadence-search .kb-button,
header.wp-block-kadence-header .kb-search-modal-container .kb-button {
  font-size: 0.8rem !important;
  padding: 8px 20px !important;
  min-height: 40px !important;
  min-width: auto !important;
}

/* Bump version to 1.0.7 for cache bust — see header comment */

/* ==========================================================================
   8k. GAP CLOSURE FIXES — v1.1.0
   Closes 4 remaining visual QA issues: off-canvas overlay, mega menu containment,
   search icon fallback, and footer mobile compactness.
   ========================================================================== */

/* 8k-1: Mobile off-canvas — full-viewport fixed overlay */
.wp-block-kadence-off-canvas {
  position: fixed !important;
  top: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  height: 100dvh !important;
  z-index: 100000 !important;
}

/* Mobile: full-width panel covers entire viewport */
@media (max-width: 1024px) {
  .kb-off-canvas-inner-wrap {
    position: fixed !important;
    top: 0 !important;
    right: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    max-width: 100vw !important;
    height: 100vh !important;
    height: 100dvh !important;
    z-index: 100001 !important;
    overflow-y: auto !important;
    background-color: var(--stb-color-black) !important;
  }
}

.kb-off-canvas-overlay {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  height: 100dvh !important;
  z-index: 99999 !important;
  background-color: rgba(0, 0, 0, 0.9) !important;
}

/* 8k-2: Desktop mega menu — contained panel styling */
/* Mega menu parent needs relative positioning for dropdown anchor */
@media (min-width: 1025px) {
  /* Make the navigation row the positioning context for mega panels */
  .wp-block-kadence-navigation .navigation {
    position: static !important;
  }

  .kadence-menu-mega-enabled {
    position: static !important;
  }

  .kadence-menu-mega-enabled > ul.sub-menu.mega-menu {
    background-color: var(--stb-color-card) !important;
    border: 1px solid var(--stb-color-gold-border) !important;
    border-top: 2px solid var(--stb-color-gold) !important;
    border-radius: 0 0 4px 4px !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4) !important;
    padding: var(--stb-space-lg) !important;
    /* Full width of header, positioned from left edge */
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    transform: none !important;
  }

  /* Row layout blocks inside mega panels */
  .kadence-menu-mega-enabled > ul.sub-menu.mega-menu .kt-row-column-wrap {
    gap: var(--stb-space-md) !important;
    max-width: 1200px !important;
    margin: 0 auto !important;
  }

  /* All text and links inside mega panels — ensure visibility on dark bg */
  .kadence-menu-mega-enabled > ul.sub-menu.mega-menu,
  .kadence-menu-mega-enabled > ul.sub-menu.mega-menu * {
    color: var(--stb-color-text-primary) !important;
  }

  .kadence-menu-mega-enabled > ul.sub-menu.mega-menu a {
    color: var(--stb-color-text-primary) !important;
  }

  .kadence-menu-mega-enabled > ul.sub-menu.mega-menu a:hover {
    color: var(--stb-color-gold) !important;
  }

  /* Sub-item links — vertical list with padding */
  .kadence-menu-mega-enabled > ul.sub-menu.mega-menu .menu-item > .kb-link-wrap > a {
    display: block !important;
    padding: 8px 16px !important;
    border-radius: 2px !important;
    transition: background-color 0.2s ease !important;
  }

  .kadence-menu-mega-enabled > ul.sub-menu.mega-menu .menu-item > .kb-link-wrap > a:hover {
    background-color: rgba(201, 166, 107, 0.08) !important;
  }

  /* "No posts" and "View All" text styling */
  .kadence-menu-mega-enabled > ul.sub-menu.mega-menu p {
    color: var(--stb-color-text-secondary, #C9C5BD) !important;
    padding: 4px 16px !important;
    font-size: 0.9rem !important;
  }
}

/* Non-mega sub-menus (regular dropdowns) */
@media (min-width: 1025px) {
  .wp-block-kadence-navigation .menu-item:not(.kadence-menu-mega-enabled) > ul.sub-menu {
    background-color: var(--stb-color-card) !important;
    border: 1px solid var(--stb-color-gold-border) !important;
    border-top: 2px solid var(--stb-color-gold) !important;
    border-radius: 0 0 4px 4px !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4) !important;
    min-width: 220px !important;
    padding: var(--stb-space-sm) !important;
  }

  .wp-block-kadence-navigation .menu-item:not(.kadence-menu-mega-enabled) > ul.sub-menu a {
    color: var(--stb-color-text-primary) !important;
  }

  .wp-block-kadence-navigation .menu-item:not(.kadence-menu-mega-enabled) > ul.sub-menu a:hover {
    color: var(--stb-color-gold) !important;
  }
}

/* 8k-3: Search icon — ensure visibility with CSS fallback */
header.wp-block-kadence-header .wp-block-kadence-search .kb-svg-icon-wrap {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 20px !important;
  min-height: 20px !important;
}

header.wp-block-kadence-header .wp-block-kadence-search .kb-svg-icon-wrap svg {
  width: 20px !important;
  height: 20px !important;
  fill: none !important;
  stroke: var(--stb-color-text-primary) !important;
  stroke-width: 2 !important;
}

/* If no SVG rendered inside the button, show a magnifying glass via background-image */
header.wp-block-kadence-header .wp-block-kadence-search .kb-button:empty,
header.wp-block-kadence-header .wp-block-kadence-search .kt-btn-wrap:empty {
  min-width: 40px !important;
  min-height: 40px !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23F8F5F0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
  background-size: 20px 20px !important;
}

/* 8k-4: Footer mobile — compact stacked layout */
@media (max-width: 768px) {
  /* Tighter padding on footer rows */
  .site-footer .site-footer-row-container-inner {
    padding-top: var(--stb-space-sm) !important;
    padding-bottom: var(--stb-space-sm) !important;
  }

  /* Tighter widget area spacing when stacked */
  .site-footer .footer-widget-area {
    padding: var(--stb-space-sm) 0 !important;
    margin-bottom: 0 !important;
  }

  /* Reduce footer middle row column gap */
  .site-footer .site-middle-footer-wrap .site-footer-row-container-inner {
    gap: 0 !important;
    row-gap: var(--stb-space-sm) !important;
  }

  /* Compact the about blurb section */
  .site-footer .footer-widget-area .textwidget,
  .site-footer .footer-widget-area .custom-html-widget {
    font-size: 0.85rem !important;
    line-height: 1.5 !important;
  }

  /* Reduce footer section titles */
  .site-footer .footer-widget-area .widget-title,
  .site-footer .footer-widget-area h2 {
    font-size: 1rem !important;
    margin-bottom: var(--stb-space-sm) !important;
  }

  /* Footer nav list items — tighter */
  .site-footer .footer-widget-area li {
    padding: 2px 0 !important;
    margin: 0 !important;
  }

  /* Footer bottom bar — compact */
  .site-footer .site-bottom-footer-wrap {
    padding: var(--stb-space-sm) 0 !important;
    font-size: 0.8rem !important;
  }
}

/* ==========================================================================
   9. HOMEPAGE TEMPLATE STYLES
   Hero section, latest stories grid, category modules, newsletter section.
   Homepage is a static WordPress page with Kadence Blocks.
   ========================================================================== */

/* 9a. Homepage hero section — full-bleed with damask texture */
.stb-homepage-hero {
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.stb-homepage-hero .kt-row-layout-inner {
  position: relative;
  z-index: 2;
}

.stb-homepage-hero h1,
.stb-homepage-hero .kadence-advancedheading-text {
  font-family: var(--stb-font-heading);
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  color: var(--stb-color-text-primary);
  line-height: 1.15;
  margin-bottom: var(--stb-space-md);
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
}

.stb-homepage-hero .stb-hero-subtitle {
  font-family: var(--stb-font-body);
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--stb-color-text-secondary);
  margin-bottom: var(--stb-space-lg);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* 9b. Section titles with gold underline */
.stb-section-title {
  font-family: var(--stb-font-heading);
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  color: var(--stb-color-text-primary);
  text-align: center;
  margin-bottom: var(--stb-space-lg);
  position: relative;
  padding-bottom: var(--stb-space-sm);
}

.stb-section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 2px;
  background: var(--stb-color-gold);
  margin: var(--stb-space-xs) auto 0;
}

/* 9c. Latest stories and category post grids */
.stb-latest-stories .kb-post-list-items.grid-cols,
.stb-category-section .kb-post-list-items.grid-cols {
  gap: var(--stb-space-md);
}

.stb-latest-stories .kb-post-list-item,
.stb-category-section .kb-post-list-item {
  background: var(--stb-color-card);
  border: 1px solid var(--stb-color-gold-border);
  border-radius: 2px;
  overflow: hidden;
  transition: transform var(--stb-transition-base), border-color var(--stb-transition-base);
}

.stb-latest-stories .kb-post-list-item:hover,
.stb-category-section .kb-post-list-item:hover {
  transform: var(--stb-card-lift);
  border-color: var(--stb-color-gold-border-hover);
}

/* Card images — consistent aspect ratio */
.kb-post-list-item .post-thumbnail img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  display: block;
}

/* Card content padding */
.kb-post-list-item .entry-content-wrap {
  padding: var(--stb-space-sm) var(--stb-space-md) var(--stb-space-md);
}

/* Category pill on cards */
.kb-post-list-item .entry-taxonomies a {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--stb-color-gold);
  background: rgba(201, 166, 107, 0.1);
  padding: 0.2rem 0.6rem;
  border-radius: 2px;
}

/* Card titles and excerpts */
.kb-post-list-item .entry-title {
  font-family: var(--stb-font-heading);
  color: var(--stb-color-text-primary);
  font-size: 1.15rem;
  line-height: 1.35;
}

.kb-post-list-item .entry-title a {
  color: inherit;
  text-decoration: none;
}

.kb-post-list-item .entry-title a:hover {
  color: var(--stb-color-gold);
}

.kb-post-list-item .entry-summary p,
.kb-post-list-item .entry-content p {
  color: var(--stb-color-text-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Gold "Read" link */
.kb-post-list-item .entry-readmore a {
  color: var(--stb-color-gold);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-decoration: none;
  transition: color var(--stb-transition-base);
}

.kb-post-list-item .entry-readmore a:hover {
  color: var(--stb-color-gold-hover);
}

/* 9d. Featured spotlight layout — alternating category sections */
.stb-category-featured .kb-post-list-items.grid-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.stb-category-featured .kb-post-list-items.grid-cols .kb-post-list-item:first-child {
  grid-column: 1 / -1;
}

.stb-category-featured .kb-post-list-items.grid-cols .kb-post-list-item:first-child .post-thumbnail img {
  aspect-ratio: 16 / 7;
  object-fit: cover;
  width: 100%;
}

/* 9e. Editor's Picks overlay cards */
.stb-editors-picks .kb-post-list-item {
  position: relative;
}

.stb-editors-picks .kb-post-list-item .post-thumbnail {
  min-height: 300px;
}

.stb-editors-picks .kb-post-list-item .post-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.stb-editors-picks .kb-post-list-item .entry-content-wrap {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: var(--stb-space-md);
  background: linear-gradient(to top, rgba(17, 17, 17, 0.9) 0%, transparent 100%);
}

.stb-editors-picks .kb-post-list-item .entry-title {
  font-size: clamp(1.25rem, 2vw, 1.75rem);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.6);
}

/* 9f. Hide empty category sections — Kadence outputs "No posts" when empty */
.stb-category-section .kb-posts:empty,
.stb-category-section .kadence-posts-list:not(:has(.kb-post-list-item)) {
  display: none;
}

/* Also hide the parent section + spacer when no posts found */
.stb-category-section:has(.kadence-posts-list:not(:has(.kb-post-list-item))) {
  display: none;
}

/* Hide spacers that follow hidden sections */
.stb-category-section:has(.kadence-posts-list:not(:has(.kb-post-list-item))) + .wp-block-spacer {
  display: none;
}

/* 9g. Newsletter section */
.stb-newsletter-section {
  text-align: center;
  padding: var(--stb-space-2xl) var(--stb-space-md);
  position: relative;
}

.stb-newsletter-section h2 {
  font-family: var(--stb-font-heading);
  color: var(--stb-color-text-primary);
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  margin-bottom: var(--stb-space-xs);
}

.stb-newsletter-section p {
  color: var(--stb-color-text-secondary);
  max-width: 500px;
  margin: 0 auto var(--stb-space-md);
}

.stb-newsletter-placeholder {
  display: flex;
  gap: var(--stb-space-xs);
  max-width: 400px;
  margin: 0 auto;
  justify-content: center;
}

.stb-email-input {
  background: var(--stb-color-card);
  border: 1px solid var(--stb-color-gold-border);
  color: var(--stb-color-text-primary);
  padding: 0.75rem 1rem;
  font-family: var(--stb-font-body);
  font-size: 0.9rem;
  border-radius: 2px;
  flex: 1;
  min-height: 48px;
}

.stb-email-input::placeholder {
  color: var(--stb-color-text-secondary);
}

/* ==========================================================================
   10. SINGLE POST TEMPLATE STYLES
   Featured image hero, content area typography, editorial touches,
   tag pills, related posts grid.
   ========================================================================== */

/* 10a. Post hero — featured image with overlaid title + byline */
.post-hero-section .entry-hero-container-inner {
  background-size: cover;
  background-position: center;
  min-height: 60vh;
  display: flex;
  align-items: flex-end;
  position: relative;
}

.post-hero-section .hero-section-overlay {
  background: linear-gradient(
    to top,
    rgba(17, 17, 17, 0.92) 0%,
    rgba(17, 17, 17, 0.5) 50%,
    rgba(17, 17, 17, 0.2) 100%
  ) !important;
}

.post-hero-section .post-title .entry-title {
  font-family: var(--stb-font-heading);
  font-size: clamp(2rem, 5vw, 3.5rem);
  color: var(--stb-color-text-primary);
  line-height: 1.2;
  margin-bottom: 0.5rem;
}

.post-hero-section .post-title .entry-meta {
  color: var(--stb-color-text-secondary);
  font-size: 0.9rem;
}

.post-hero-section .post-title .entry-meta a {
  color: var(--stb-color-gold);
}

/* 10b. Read time display */
.stb-read-time-wrap {
  color: var(--stb-color-text-secondary);
  font-size: 0.85rem;
  margin-bottom: var(--stb-space-sm);
}

.stb-read-time {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.stb-read-time::before {
  content: '';
  display: inline-block;
  width: 14px;
  height: 14px;
  background: currentColor;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpolyline points='12 6 12 12 16 14'/%3E%3C/svg%3E") no-repeat center;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpolyline points='12 6 12 12 16 14'/%3E%3C/svg%3E") no-repeat center;
}

/* 10c. Content area — 780px max-width, editorial typography */
/* Scope to single posts only — NOT pages (homepage is a page) */
.single-post .entry-content {
  max-width: 780px;
  font-family: var(--stb-font-body);
  font-size: 1.1rem;
  line-height: 1.75;
  color: var(--stb-color-text-primary);
}

/* Homepage page — full-width content, centered */
.page .entry-content.single-content {
  max-width: 1200px;
  margin: 0 auto;
}

/* Homepage hero goes full-bleed — only the hero */
.page .entry-content.single-content .stb-homepage-hero {
  width: 100vw;
  margin-left: calc(-50vw + 50%);
}

/* Drop cap on first paragraph */
.single-post .entry-content > p:first-of-type::first-letter {
  font-family: var(--stb-font-heading);
  font-size: 4rem;
  float: left;
  line-height: 0.8;
  margin-right: 0.1em;
  margin-top: 0.1em;
  color: var(--stb-color-gold);
  font-weight: 700;
}

/* Gold pull-quotes with left border */
.single-post .entry-content .wp-block-pullquote,
.single-post .entry-content blockquote {
  border-left: 3px solid var(--stb-color-gold);
  border-top: none;
  border-right: none;
  border-bottom: none;
  padding: var(--stb-space-sm) var(--stb-space-md);
  margin: var(--stb-space-lg) 0;
  background: var(--stb-color-card);
}

.single-post .entry-content .wp-block-pullquote p,
.single-post .entry-content blockquote p {
  font-family: var(--stb-font-heading);
  font-size: 1.25rem;
  font-style: italic;
  color: var(--stb-color-text-primary);
  line-height: 1.5;
}

.single-post .entry-content .wp-block-pullquote cite,
.single-post .entry-content blockquote cite {
  color: var(--stb-color-gold);
  font-size: 0.9rem;
  font-style: normal;
}

/* Styled subheadings inside content */
.single-post .entry-content h2 {
  font-family: var(--stb-font-heading);
  font-size: clamp(1.5rem, 3vw, 2rem);
  color: var(--stb-color-text-primary);
  margin-top: var(--stb-space-xl);
  margin-bottom: var(--stb-space-sm);
  padding-bottom: var(--stb-space-xs);
  border-bottom: 1px solid var(--stb-color-gold-border);
}

.single-post .entry-content h3 {
  font-family: var(--stb-font-heading);
  font-size: clamp(1.25rem, 2.5vw, 1.5rem);
  color: var(--stb-color-gold);
  margin-top: var(--stb-space-lg);
  margin-bottom: var(--stb-space-xs);
}

/* Content links */
.single-post .entry-content a {
  color: var(--stb-color-gold);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color var(--stb-transition-base);
}

.single-post .entry-content a:hover {
  color: var(--stb-color-gold-hover);
}

/* 10d. Tag pills at bottom of post */
.post-tags .tag-links a,
.entry-tags a,
.wp-block-post-terms a {
  display: inline-block;
  background: rgba(201, 166, 107, 0.1);
  color: var(--stb-color-gold);
  padding: 0.3rem 0.75rem;
  border-radius: 2px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-decoration: none;
  margin: 0.25rem;
  transition: background var(--stb-transition-base);
}

.post-tags .tag-links a:hover,
.entry-tags a:hover,
.wp-block-post-terms a:hover {
  background: rgba(201, 166, 107, 0.2);
  color: var(--stb-color-gold-hover);
}

/* 10e. "You May Also Like" related posts grid */
.stb-related-posts {
  margin-top: var(--stb-space-2xl);
  padding-top: var(--stb-space-lg);
  border-top: 1px solid var(--stb-color-gold-border);
}

.stb-related-posts h2 {
  font-family: var(--stb-font-heading);
  font-size: 1.5rem;
  color: var(--stb-color-text-primary);
  text-align: center;
  margin-bottom: var(--stb-space-md);
}

.stb-related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--stb-space-md);
}

.stb-related-card {
  background: var(--stb-color-card);
  border: 1px solid var(--stb-color-gold-border);
  border-radius: 2px;
  overflow: hidden;
  transition: transform var(--stb-transition-base), border-color var(--stb-transition-base);
}

.stb-related-card:hover {
  transform: var(--stb-card-lift);
  border-color: var(--stb-color-gold-border-hover);
}

.stb-related-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.stb-related-category {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--stb-color-gold);
  background: rgba(201, 166, 107, 0.1);
  padding: 0.2rem 0.6rem;
  margin: var(--stb-space-xs);
}

.stb-related-title {
  font-family: var(--stb-font-heading);
  font-size: 1rem;
  padding: 0 var(--stb-space-xs) var(--stb-space-xs);
}

.stb-related-title a {
  color: var(--stb-color-text-primary);
  text-decoration: none;
}

.stb-related-title a:hover {
  color: var(--stb-color-gold);
}

@media (max-width: 767px) {
  .stb-related-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   11. ARCHIVE / CATEGORY TEMPLATE STYLES
   Category hero banner, featured-first grid, pagination.
   ========================================================================== */

/* 11a. Archive hero banner — dark with gold title */
.post-archive-hero-section .entry-hero-container-inner {
  background-color: var(--stb-color-card) !important;
  border-bottom: 2px solid var(--stb-color-gold);
  min-height: 200px;
  display: flex;
  align-items: center;
}

.wp-site-blocks .post-archive-title h1 {
  font-family: var(--stb-font-heading);
  color: var(--stb-color-gold) !important;
  font-size: clamp(2.5rem, 5vw, 4rem);
}

.post-archive-title .archive-description {
  color: var(--stb-color-text-secondary) !important;
  font-size: 1rem;
  max-width: 600px;
}

/* 11b. Featured-first archive grid */
.post-archive.grid-cols .loop-entry:first-child {
  grid-column: 1 / -1;
}

.post-archive.grid-cols .loop-entry:first-child .entry-title {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
}

.post-archive.grid-cols .loop-entry:first-child .entry-thumbnail img {
  aspect-ratio: 16 / 7;
  object-fit: cover;
  width: 100%;
}

/* Archive loop entries — card style with image-first layout */
.post-archive .loop-entry {
  background: var(--stb-color-card);
  border: 1px solid var(--stb-color-gold-border);
  border-radius: 2px;
  overflow: hidden;
  transition: transform var(--stb-transition-base), border-color var(--stb-transition-base);
}

.post-archive .loop-entry:hover {
  transform: var(--stb-card-lift);
  border-color: var(--stb-color-gold-border-hover);
}

.post-archive .loop-entry .post-thumbnail img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  display: block;
}

.post-archive .loop-entry .entry-content-wrap {
  padding: var(--stb-space-sm) var(--stb-space-md);
}

/* Truncate archive excerpts to 2 lines */
.post-archive .loop-entry .entry-summary p {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 0.9rem;
  color: var(--stb-color-text-secondary);
}

.post-archive .loop-entry .entry-title {
  font-family: var(--stb-font-heading);
  color: var(--stb-color-text-primary);
}

.post-archive .loop-entry .entry-title a {
  color: inherit;
  text-decoration: none;
}

.post-archive .loop-entry .entry-title a:hover {
  color: var(--stb-color-gold);
}

.post-archive .loop-entry .entry-summary,
.post-archive .loop-entry .entry-content {
  color: var(--stb-color-text-secondary);
}

.post-archive .loop-entry .entry-meta {
  color: var(--stb-color-text-secondary);
  font-size: 0.85rem;
}

.post-archive .loop-entry .entry-meta a {
  color: var(--stb-color-gold);
}

/* 11c. Pagination — Load More button in gold */
.pagination .nav-links,
.kadence-pagination {
  display: flex;
  justify-content: center;
  gap: var(--stb-space-xs);
  margin-top: var(--stb-space-lg);
}

.pagination .nav-links a,
.pagination .nav-links .current,
.kadence-pagination a,
.kadence-pagination .current {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  min-height: 48px;
  padding: 0.5rem 1rem;
  border: 1px solid var(--stb-color-gold-border);
  color: var(--stb-color-text-primary);
  text-decoration: none;
  transition: all var(--stb-transition-base);
}

.pagination .nav-links a:hover,
.kadence-pagination a:hover {
  background: var(--stb-color-gold);
  color: var(--stb-color-black);
  border-color: var(--stb-color-gold);
}

.pagination .nav-links .current,
.kadence-pagination .current {
  background: var(--stb-color-gold);
  color: var(--stb-color-black);
  border-color: var(--stb-color-gold);
  font-weight: 600;
}

/* ==========================================================================
   12. SIDEBAR STYLES
   Widget area styling, newsletter placeholder, sidebar visibility.
   Kadence handles sticky via sidebar_sticky theme_mod — no CSS sticky.
   ========================================================================== */

/* 12a. Sidebar widget area base */
#secondary.primary-sidebar,
.primary-sidebar.widget-area {
  color: var(--stb-color-text-primary);
}

#secondary .widget {
  background: var(--stb-color-card);
  border: 1px solid var(--stb-color-gold-border);
  padding: var(--stb-space-md);
  margin-bottom: var(--stb-space-md);
  border-radius: 2px;
}

#secondary .widget-title,
#secondary .widgettitle {
  font-family: var(--stb-font-heading);
  font-size: 1.1rem;
  color: var(--stb-color-gold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--stb-space-sm);
  padding-bottom: var(--stb-space-xs);
  border-bottom: 1px solid var(--stb-color-gold-border);
}

/* 12b. Popular Posts widget */
#secondary .widget_recent_entries ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

#secondary .widget_recent_entries li {
  padding: var(--stb-space-xs) 0;
  border-bottom: 1px solid var(--stb-color-gold-border);
}

#secondary .widget_recent_entries li:last-child {
  border-bottom: none;
}

#secondary .widget_recent_entries a {
  color: var(--stb-color-text-primary);
  text-decoration: none;
  font-size: 0.95rem;
  line-height: 1.4;
  transition: color var(--stb-transition-base);
}

#secondary .widget_recent_entries a:hover {
  color: var(--stb-color-gold);
}

/* 12c. Categories/Topics widget */
#secondary .widget_categories ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

#secondary .widget_categories li {
  padding: var(--stb-space-xs) 0;
  border-bottom: 1px solid var(--stb-color-gold-border);
}

#secondary .widget_categories li:last-child {
  border-bottom: none;
}

#secondary .widget_categories a {
  color: var(--stb-color-text-primary);
  text-decoration: none;
  transition: color var(--stb-transition-base);
}

#secondary .widget_categories a:hover {
  color: var(--stb-color-gold);
}

#secondary .widget_categories .count,
#secondary .widget_categories .cat-item .post-count {
  color: var(--stb-color-text-secondary);
  font-size: 0.85rem;
}

/* 12d. Newsletter widget placeholder */
.stb-sidebar-newsletter-text {
  color: var(--stb-color-text-secondary);
  font-size: 0.9rem;
  margin-bottom: var(--stb-space-xs);
}

/* 12e. Sidebar ad slots — hide in sidebar, ads belong inline */
#secondary .stb-ad-300x250,
#secondary .stb-ad-300x600,
#secondary .stb-ad-slot {
  display: none;
}

/* 12f. Sidebar hidden on mobile/tablet */
@media (max-width: 1024px) {
  #secondary.primary-sidebar,
  .primary-sidebar.widget-area {
    display: none;
  }

  /* Main content takes full width when sidebar hidden */
  .has-sidebar .content-container {
    grid-template-columns: 1fr !important;
  }
}

/* ==========================================================================
   13. AD SLOT PLACEHOLDERS
   Reserved-height containers for future ad network integration.
   Dark luxury aesthetic — no jarring white boxes.
   min-height prevents CLS when real ads load.
   ========================================================================== */

.stb-ad-slot {
  display: block;
  background-color: var(--stb-color-card);
  border: 1px solid var(--stb-color-gold-border);
  border-radius: 2px;
  position: relative;
  overflow: hidden;
}

.stb-ad-slot::before {
  content: 'Advertisement';
  display: block;
  text-align: center;
  font-size: 0.7rem;
  color: var(--stb-color-text-secondary);
  padding: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* Sidebar ad slots — fixed dimensions */
.stb-ad-300x250 {
  min-height: 250px;
  width: 300px;
  max-width: 100%;
}

.stb-ad-300x600 {
  min-height: 600px;
  width: 300px;
  max-width: 100%;
}

/* Mobile between-section ad */
.stb-ad-mobile {
  min-height: 100px;
  width: 100%;
  margin: var(--stb-space-md) 0;
}

/* Inline ad between content sections */
.stb-ad-inline {
  min-height: 90px;
  width: 728px;
  max-width: 100%;
  margin: var(--stb-space-lg) auto;
  background-color: var(--stb-color-card);
  border: 1px solid var(--stb-color-gold-border);
  border-radius: 2px;
  position: relative;
}

.stb-ad-inline::before {
  content: 'Advertisement';
  display: block;
  text-align: center;
  font-size: 0.7rem;
  color: var(--stb-color-text-secondary);
  padding: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* Footer banner ad */
.stb-ad-footer-banner {
  min-height: 90px;
  width: 728px;
  max-width: 100%;
  margin: var(--stb-space-md) auto;
}

/* Mobile: show mobile ad slots, hide between post sections */
@media (max-width: 767px) {
  .stb-ad-300x250,
  .stb-ad-300x600 {
    display: none;
  }

  .stb-ad-footer-banner {
    width: 320px;
    min-height: 50px;
  }
}

/* Desktop: hide mobile-only ad slots */
@media (min-width: 768px) {
  .stb-ad-mobile {
    display: none;
  }
}

/* ==========================================================================
   14. MOBILE RESPONSIVE OVERRIDES
   Touch targets, horizontal scroll, stacking, image optimization.
   ========================================================================== */

/* 14a. Touch target minimum 48px on all interactive elements */
@media (max-width: 1024px) {
  .pagination a,
  .kadence-pagination a,
  .stb-btn-primary,
  .stb-btn-secondary,
  .entry-readmore a,
  .tag-links a,
  .entry-tags a {
    min-height: 48px;
    min-width: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}

/* 14b. Horizontal scroll for card rows on mobile */
@media (max-width: 767px) {
  .stb-latest-stories .kb-post-list-items.grid-cols,
  .stb-category-section .kb-post-list-items.grid-cols {
    display: flex !important;
    flex-wrap: nowrap;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    gap: 1rem;
    padding-bottom: 1rem;
  }

  .stb-latest-stories .kb-post-list-items.grid-cols .kb-post-list-item,
  .stb-category-section .kb-post-list-items.grid-cols .kb-post-list-item {
    flex: 0 0 280px;
    scroll-snap-align: start;
  }
}

/* 14c. All sections stack at 375px */
@media (max-width: 767px) {
  .stb-homepage-hero {
    min-height: 70vh;
  }

  .stb-homepage-hero h1,
  .stb-homepage-hero .kadence-advancedheading-text {
    font-size: clamp(2rem, 8vw, 2.5rem);
  }

  /* Archive featured-first revert to single column */
  .post-archive.grid-cols {
    grid-template-columns: 1fr !important;
  }

  .post-archive.grid-cols .loop-entry:first-child {
    grid-column: 1;
  }

  /* Single post hero smaller on mobile */
  .post-hero-section .entry-hero-container-inner {
    min-height: 40vh;
  }

  /* Newsletter form stacks */
  .stb-newsletter-placeholder {
    flex-direction: column;
  }

  /* Category featured grid single column */
  .stb-category-featured .kb-post-list-items.grid-cols {
    grid-template-columns: 1fr;
  }
}

/* 14d. Reduced image sizes — WordPress srcset handles this natively.
   Kadence Posts Block outputs responsive images automatically.
   This rule ensures post thumbnails don't exceed container. */
img {
  max-width: 100%;
  height: auto;
}
