/* ===== CSS RESET & VARIABLES ===== */
*, *::before, *::after { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
}

:root {
    /* Brand Colors */
    --warm-beige: #D4A574;
    --warm-beige-dark: #9B7A4F;
    --warm-beige-darker: #96632E;
    --light-beige: #E5D4B1;
    --warm-taupe: #8B7355;
    --taupe-aa: #7A6449;
    --rich-brown: #5C4033;
    --sand: #F5E6D3;
    --cream: #FBF7F0;
    --espresso: #3C2415;
    --pure-white: #FFFFFF;
    --accent-gold: #FFD700;
    --accent-copper: #B87333;
    --emerald: #10B981;
    --amber: #F59E0B;
    --gold: #FFD700;
    --danger-red: #DC2626;
    --yelp-red: #D32323;
    --linkedin-blue: #0077B5;
    --trust-blue: #1E40AF;
    --camel: #C19A6B;

    /* Warm premium palette for page body */
    --golden:#D4A574;
    --golden-dark:#9B7A4F;
    --bronze:#96632E;
    --amber:#E6B87D;
    --champagne:#F7E7CE;
    --warm-sand:#F5E6D3;
    --pearl:#FBF7F0;
    --ivory:#FFFEF9;
    --cognac:#8B5A2B;
    --mahogany:#6B4423;
    --walnut:#5C4033;
    --sienna:#A0522D;
    --caramel:#C19A6B;
    --honey:#DDB67C;


    /* Grays */
    --gray-50: #FAFAFA;
    --gray-100: #F7F7F7;
    --gray-200: #E5E5E5;
    --gray-300: #D4D4D4;
    --gray-400: #A3A3A3;
    --gray-500: #737373;
    --gray-600: #525252;
    --gray-700: #404040;
    --gray-800: #262626;
    --gray-900: #171717;

    /* Grays with warm undertones */
    --warm-gray-50:#FAF9F7;--warm-gray-100:#F5F3F0;--warm-gray-200:#E8E4DD;
    --warm-gray-300:#D6CFC4;--warm-gray-400:#B3A89A;--warm-gray-500:#8B7F70;
    --warm-gray-600:#6B5D50;--warm-gray-700:#4A3F33;--warm-gray-800:#3A312A;--warm-gray-900:#2B2520;
    
    /* Semantic */
    --text-primary: var(--espresso);
    --text-secondary: var(--gray-600);
    --text-muted: var(--gray-500);
    --text-taupe: #7A6449;
    --text-hover: #5C4033;

    /* Semantic Colors */
    --success:#22C55E;
    --success-green: #22C55E;
    --success-light-green: #d9f8e0;
    --success-bg: #F0FDF4;
    --warning-amber: #F59E0B;   
    --warning-bg: #FFFBEB;
    --error-red: #EF4444;
    --info-blue: #3B82F6;
    --info-bg: #EFF6FF;
    --danger-red: #DC2626;
    --focus-ring: #9B7A4F; /* WCAG-compliant contrast */
    
    /* Layout */
    --header-height: 72px;
    --header-h: 72px; /* Variation */
    --max-width: 1600px;
    --content-width: 1400px;
    --article-width: 900px;
    --toc-width: 280px;
    
    /* Transitions */
    --transition-base: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
    --transition-smooth: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    --transition-bounce: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);

    /* Gradients */
    --gradient-warm: linear-gradient(135deg, var(--warm-beige-darker) 0%, var(--warm-beige) 100%);
    --gradient-sand: linear-gradient(180deg, var(--cream) 0%, var(--sand) 100%);
    --gradient-espresso: linear-gradient(135deg, var(--espresso) 0%, var(--rich-brown) 100%);
    
    /* Shadows */
    --shadow-glow: 0 0 40px rgba(212, 165, 116, 0.3);
    --shadow-sm: 0 4px 20px rgba(0,0,0,0.03);
    --shadow-md: 0 8px 30px rgba(212, 165, 116, 0.15);
    --shadow-lg: 0 20px 40px rgba(0,0,0,0.1);
    --shadow-xl: 0 30px 60px rgba(0,0,0,0.15);
    --shadow-2xl: 0 40px 80px rgba(0,0,0,0.2);
    --shadow-xs: 0 1px 3px rgba(0,0,0,0.05);
    
    /* Animations */
    --ease-out-expo: cubic-bezier(0.19, 1, 0.22, 1);
    --ease-in-out-expo: cubic-bezier(0.87, 0, 0.13, 1);
    --spring: cubic-bezier(0.68, -0.55, 0.265, 1.55);
    
    /* Z-index Scale */
    --z-base: 1;
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-overlay: 900;
    --z-modal: 1000;
    --z-popover: 1100;
    --z-toc: 300;
    --z-tooltip: 1200;
    --z-max: 10000;
}

/* ===== BASE STYLES ===== */
html { 
    scroll-behavior: smooth; 
    /*overflow-x: hidden;*/
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

@supports (scroll-behavior: smooth) {
    html {
        scroll-behavior: smooth;
    }
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--text-primary);
    background: var(--cream);
    overflow-x: hidden;
    letter-spacing: 0.02em;
    font-weight: 500;
    text-rendering: optimizeLegibility;
    /*line-height: 1.6;*/
}

/* Subtle page-top glow - disabled on mobile */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 100vh;
    background: linear-gradient(180deg, rgba(251,247,240,0.5) 0%, transparent 40%);
    pointer-events: none;
    z-index: -1;
}

@media (max-width: 768px) {
    body::before {
        display: none;
    }
}

/* Typography */
/*h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
}*/

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-base);
}

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

button {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    cursor: pointer;
}

/* Variable fonts */
/*@supports (font-variation-settings: normal) {
    body { font-variation-settings: 'wght' 500; }
    h1,h2,h3,h4,h5,h6 { font-variation-settings: 'wght' 800; }
}*/

/* ===== UTILITIES ===== */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
        
[hidden],
.d-none {
    display: none !important;
}

.container {
    width: 100%;
    max-width: var(--content-width);
    margin: 0 auto;
    padding: 0 2rem;
}

.text-center {
    text-align: center;
}

@media (max-width: 768px) {
    .container {
        padding: 0 1.5rem;
    }
}

/* Focus Styles */
:focus-visible {
    outline: 2px solid var(--warm-beige);
    outline-offset: 2px;
}

.site-header{
    position: sticky; top:0; z-index:1000;
    background: rgba(251,247,240,0.95);
    backdrop-filter: blur(10px);
    border-bottom:1px solid #E5D4B1;
}

/* Anchor offset so content isn't hidden under sticky header */
[id]{ scroll-margin-top: 90px; }

/* ===== SKIP NAVIGATION ===== */
.skip-nav {
    position: absolute;
    left: 0;
    top: -40px;
    background: var(--espresso);
    color: var(--pure-white);
    padding: 0.5rem 1rem;
    z-index: var(--z-max);
    border-radius: 0 0 4px 0;
}

.skip-nav:focus {
    top: 0;
}

/* ===== PROGRESS BAR ===== */
.progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: rgba(212, 165, 116, 0.15);
    z-index: 999;
    pointer-events: none;
}

.progress-fill {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, var(--warm-beige), var(--warm-beige-dark));
    transition: width 0.15s ease;
    box-shadow: 0 0 10px rgba(212, 165, 116, 0.4),
                0 2px 4px rgba(212, 165, 116, 0.2);
    will-change: width;
}

/* ===== GLOBAL NAVIGATION ===== */
.global-nav {
    position: sticky;
    top: 0;
    z-index: var(--z-modal);
    backdrop-filter: blur(20px) saturate(150%);
    -webkit-backdrop-filter: blur(20px) saturate(150%);
    background: linear-gradient(180deg, rgba(251,247,240,0.96) 0%, rgba(251,247,240,0.88) 100%);
    border-bottom: 1px solid rgba(212, 165, 116, 0.12);
    transition: var(--transition-smooth);
    padding-top: env(safe-area-inset-top);
    line-height: 1.6;
}

.global-nav.scrolled {
    box-shadow: 0 12px 40px rgba(212, 165, 116, 0.08);
    background: linear-gradient(180deg, rgba(251,247,240,0.98) 0%, rgba(251,247,240,0.92) 100%);
}

.global-nav .current-menu-item > a,
.global-nav a[aria-current="page"]{ color:var(--warm-beige); }

.global-nav .nav-link[aria-current="page"] {
    color: var(--warm-beige-dark);
}

.global-nav .nav-link[aria-current="page"]::after {
    width: 100%;
}

.nav-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 2rem;
    gap: 2rem;
}

.nav-left, .nav-right {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.nav-center {
    display: flex;
    align-items: center;
    gap: 2.5rem;
}

.brand {
    display: inline-block;
    line-height: 1;
    transition: transform 0.3s ease;
}

.brand:hover {
    transform: translateX(2px);
}

.brand svg {
    width: 160px;
    height: 30px;
    display: block;
}

/* Nav Links */
.nav-link {
    font-size: 0.93rem;
    font-weight: 600;
    color: var(--text-taupe);
    letter-spacing: 0.02em;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--warm-beige);
    transition: width 0.3s ease;
}

.nav-link:hover {
    color: var(--text-hover);
}

.nav-link:hover::after {
    width: 100%;
}

/* Dropdowns */
.dropdown {
    position: relative;
}

.dropdown-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
    padding: 0.25rem 0.25rem 0.25rem 0;
}

.caret {
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid var(--text-taupe);
    transform: translateY(1px);
    transition: transform 0.3s ease;
    position: relative;
    cursor: pointer;
}

/* Make caret hit area larger and more obvious */
.caret::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    cursor: pointer;
}

.dropdown-toggle:hover .caret {
    border-top-color: var(--text-hover);
}

.dropdown.open .caret {
    transform: translateY(1px) rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 1rem);
    left: 50%;
    min-width: 260px;
    background: var(--pure-white);
    border: 1px solid rgba(212, 165, 116, 0.15);
    border-radius: 12px;
    box-shadow: 0 24px 60px rgba(60, 36, 21, 0.12);
    padding: 0.5rem;
    opacity: 0;
    visibility: hidden;
    transform: translateX(-50%) translateY(-10px);
    transition: var(--transition-base);
    z-index: var(--z-popover);
    will-change: transform, opacity;
}

.dropdown.open .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* Graceful fallback if JS fails - focus reveals menu */
@media (hover: hover) and (pointer: fine) {
    .dropdown:focus-within .dropdown-menu {
        opacity: 1;
        visibility: visible;
        transform: translateX(-50%) translateY(0);
    }
}

.dropdown-item {
    display: block;
    padding: 0.85rem 1.25rem;
    border-radius: 8px;
    font-weight: 600;
    color: var(--espresso);
    font-size: 0.93rem;
    transition: all 0.2s ease;
}

.dropdown-item:hover {
    background: linear-gradient(135deg, var(--sand) 0%, var(--cream) 100%);
    color: var(--warm-beige-dark);
    transform: translateX(2px);
}

.dropdown-menu.mega {
    min-width: 380px;
    padding: 0.75rem;
}

.dropdown-menu.mega .dropdown-item {
    padding: 0.9rem 1.1rem;
}

.item-title {
    display: block;
    font-weight: 800;
    font-size: 0.95rem;
    letter-spacing: 0.01em;
    color: var(--espresso);
}

.item-subtitle {
    display: block;
    margin-top: 0.15rem;
    font-size: 0.85rem;
    color: var(--gray-600);
    font-weight: 600;
    letter-spacing: 0.01em;
    hyphens: none;
}

.dropdown-item[aria-current="page"] {
    background: linear-gradient(135deg, var(--sand) 0%, var(--cream) 100%);
}

.dropdown-item[aria-current="page"] .item-title {
    color: var(--warm-beige-dark);
}

/* CTA Button */
.nav-cta {
    display: inline-block;
    background: linear-gradient(135deg, #96632E, #7A5530);
    color: var(--pure-white);
    padding: 0.85rem 1.75rem;
    border-radius: 50px;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    font-size: 0.85rem;
    border: none;
    box-shadow: 0 10px 25px rgba(212, 165, 116, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.15);
    transition: var(--transition-base);
    position: relative;
    overflow: hidden;
}
.nav-cta.no-text-transform {
    text-transform: none;
}

.nav-cta::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent, rgba(255, 255, 255, 0.1));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.nav-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 35px rgba(212, 165, 116, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.nav-cta:hover::before {
    opacity: 1;
}

.nav-phone {
    color: var(--pure-white);
    background: var(--warm-beige-darker);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    padding: 0.8rem 2.2rem;
    border-radius: 50px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(212, 165, 116, 0.2);
    position: relative;
    overflow: hidden;
}

.nav-phone::before { content: ''; position: absolute; top: 50%; left: 50%; width: 0; height: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.1); transform: translate(-50%, -50%); transition: width 0.5s ease, height 0.5s ease; }
.nav-phone:hover::before { width: 300%; height: 300%; }
.nav-phone:hover { background: var(--warm-taupe); transform: translateY(-2px); box-shadow: 0 6px 20px rgba(139, 115, 85, 0.3); }


/* Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: transparent;
    border: 0;
    cursor: pointer;
    padding: 4px;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
}

.hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--espresso);
    transition: all 0.3s ease;
}

.hamburger:hover span {
    background: var(--warm-beige-dark);
}

.hamburger[aria-expanded="true"] span {
    opacity: 0.6;
}

/* Mobile Panel */
.mobile-panel {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    background: var(--cream);
    transform: translate3d(100%, 0, 0);
    transition: transform 0.35s cubic-bezier(0.23, 1, 0.32, 1);
    z-index: var(--z-popover);
    padding: calc(var(--header-height) + 1rem) 1.5rem calc(2rem + env(safe-area-inset-bottom));
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

.mobile-panel.open {
    transform: translate3d(0, 0, 0);
}

.mobile-close {
    position: absolute;
    top: calc(env(safe-area-inset-top) + 0.75rem);
    right: 1rem;
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(60, 36, 21, 0.06);
    border: 1px solid rgba(60, 36, 21, 0.12);
    color: var(--espresso);
    box-shadow: 0 6px 18px rgba(60, 36, 21, 0.08);
    cursor: pointer;
    transition: background 0.2s ease;
}

.mobile-close:hover {
    background: rgba(60, 36, 21, 0.10);
}

.mobile-links {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.mobile-links a:not(.nav-cta) {
    padding: 1rem 1.25rem;
    border-radius: 12px;
    background: var(--pure-white);
    border: 1px solid rgba(212, 165, 116, 0.12);
    font-weight: 700;
    transition: all 0.2s ease;
    display: block;
    color: var(--espresso);
}

.mobile-links a:not(.nav-cta):hover {
    background: var(--sand);
    transform: translateX(4px);
}

.mobile-links a[aria-current="page"] {
    background: linear-gradient(135deg, var(--sand) 0%, var(--cream) 100%);
    color: var(--warm-beige-dark);
}

.mobile-group-title {
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    font-size: 0.8rem;
    letter-spacing: 0.12em;
    color: var(--gray-600);
    text-transform: uppercase;
    font-weight: 800;
}

.mobile-cta {
    margin-top: 1.5rem;
}

.mobile-cta .nav-cta {
    display: block;
    text-align: center;
}

.mobile-cta .phone-link {
    display: block;
    text-align: center;
    margin-top: 1rem;
    color: var(--text-taupe);
    font-weight: 600;
    padding: 0.75rem;
}

/* ===== FOOTER ===== */
/*footer {
    background: linear-gradient(180deg, #2a1810 0%, var(--espresso) 100%);
    color: var(--sand);
    padding: 4rem 2rem 2rem;
    border-top: 1px solid rgba(212, 165, 116, 0.1);
        line-height: 1.6;
}

.footer-wrap {
    max-width: var(--content-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(260px, 2fr) repeat(4, minmax(170px, 1fr));
    gap: clamp(1.5rem, 3vw, 3rem);
    margin-bottom: clamp(1.25rem, 2vw, 2rem);
}

.footer-brand svg {
    width: 180px;
    height: auto;
    display: block;
    margin-bottom: 1.25rem;
}

.footer-brand p {
    opacity: 0.85;
    line-height: 1.7;
    font-size: 0.95rem;
}

.footer-col h4 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--warm-beige);
    margin-bottom: 0.9rem;
    font-weight: 900;
    white-space: nowrap;
    line-height: 1.2;
}

.footer-links {
    list-style: none;
    display: grid;
    gap: 0.6rem;
    
}

.footer-links a {
    color: var(--sand);
    opacity: 0.8;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    display: inline-block;
    padding: 2px 0;
}

.footer-links a:hover {
    opacity: 1;
    color: var(--warm-beige);
    transform: translateX(2px);
}

.footer-links a[aria-current="page"] {
    color: var(--warm-beige);
    opacity: 1;
}

.footer-bottom {
    border-top: 1px solid rgba(212, 165, 116, 0.08);
    text-align: center;
    padding-top: clamp(0.75rem, 1.2vw, 1.25rem);
    opacity: 0.75;
    font-size: 0.9rem;
    letter-spacing: 0.02em;
}*/


  .site-footer {
    background: linear-gradient(135deg, #2a1810 0%, #3C2415 100%);
    color: #F5E6D3;
    padding: 4rem 2rem 0;
  }
  .footer-inner { max-width: 1400px; margin: 0 auto; }
  .footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
  }
  .footer-brand .logo {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.75rem; color: #F5E6D3;
    letter-spacing: 0.08em; text-decoration: none; display: block;
    margin-bottom: 1rem;
  }
  .footer-brand .logo span { color: #D4A574; }
  .footer-brand p {
    font-size: 0.875rem; line-height: 1.7;
    color: rgba(245, 230, 211, 0.7);
  }
  .footer-column h4 {
    font-size: 0.75rem; font-weight: 600; text-transform: uppercase;
    letter-spacing: 0.15em; color: #D4A574; margin-bottom: 1.25rem;
  }
  .footer-column ul { list-style: none; }
  .footer-column li { margin-bottom: 0.75rem; }
  .footer-column a {
    color: rgba(245, 230, 211, 0.75); text-decoration: none;
    font-size: 0.875rem; transition: color 0.2s;
  }
  .footer-column a:hover { color: #D4A574; }

  .footer-bottom {
    padding: 1.5rem 0;
    border-top: 1px solid rgba(245, 230, 211, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8125rem;
    color: rgba(245, 230, 211, 0.4);
  }
  .footer-legal-links {
    display: flex;
    gap: 0.5rem;
    align-items: center;
  }
  .footer-legal-links a {
    color: rgba(245, 230, 211, 0.4);
    text-decoration: none;
    font-size: 0.8125rem;
    transition: color 0.2s;
  }
  .footer-legal-links a:hover { color: #D4A574; }
  .footer-legal-links .sep {
    color: rgba(245, 230, 211, 0.2);
    font-size: 0.75rem;
  }

  /* Old stacked version */
  .footer-bottom-old {
    padding: 1.5rem 0;
    border-top: 1px solid rgba(245, 230, 211, 0.1);
    text-align: center;
    font-size: 0.8125rem;
    color: rgba(245, 230, 211, 0.4);
  }

  @media (max-width: 900px) {
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
    .footer-brand { grid-column: 1 / -1; }
    .footer-bottom { flex-direction: column; gap: 0.75rem; text-align: center; }
  }
  @media (max-width: 600px) {
    .footer-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  }

/* ===== RESPONSIVE ===== */

@media (max-width: 1200px) {
    .nav-center { gap: 2.5rem; }
}
@media (max-width: 1100px) {
    .nav-center {
        display: none;
    }
    
    .nav-right .nav-cta {
        display: none;
    }
    
    .hamburger {
        display: flex;
    }
    
    .footer-wrap {
        grid-template-columns: 1fr 1fr;
    }
    
    .footer-brand {
        grid-column: 1 / -1;
    }
}

@media (max-width: 1024px) {
    .hamburger { display: flex; }
    .nav-center { display: none; }
    .nav-phone {
        display: none;
    }

    .featured-article {
        grid-template-columns: 1fr;
        min-height: auto;
    }
    
    .featured-image {
        height: 300px;
    }
    
    .featured-content {
        padding: 3rem;
    }
    
    .articles-grid {
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    }
}

@media (max-width: 768px) {

    /*nav { padding: 1.5rem 2rem; }
    nav.scrolled { padding: 1rem 2rem; }*/

    .nav-inner {
        padding: 1rem 1.5rem;
    }
    
    .knowledge-hero {
        min-height: 80vh;
    }
    
    .hero-title {
        font-size: 3.5rem;
    }
    
    .hero-stats {
        gap: 2rem;
        flex-wrap: wrap;
    }
    
    .filter-section {
        padding: 2rem 0;
        top: 60px;
    }
    
    .filter-container {
        padding: 0 1.5rem;
    }
    
    .articles-section {
        padding: 3rem 0;
    }
    
    .articles-container {
        padding: 0 1.5rem;
    }
    
    .articles-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .featured-content {
        padding: 2rem;
    }
    
    .featured-title {
        font-size: 1.75rem;
    }
    
    .newsletter-form {
        flex-direction: column;
    }
    
    .footer-wrap {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .nav-inner {
        padding: 1rem 1.5rem;
    }
}

/* iOS/touch seam hardening */
@media (pointer: coarse), (max-width: 1024px) {
    .hero-grain {
        display: none !important;
    }
    
    .guide-hero {
        overflow: visible !important;
    }
    
    body::before {
        display: none !important;
    }
    
    .stat-card {
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
    }
}

/* Disable navbar blur on touch devices */
@media (pointer: coarse) {
    nav.global-nav {
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        background: linear-gradient(180deg, rgba(251,247,240,0.98) 0%, rgba(251,247,240,0.92) 100%) !important;
    }
}

/* ===== REDUCED MOTION ===== */
@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;
    }
    
    .article-card {
        transition: none !important;
    }
    
    .hero-pattern,
    .hero-title .accent,
    .scroll-indicator,
    .newsletter-section::before {
        animation: none !important;
    }

    .progress-fill {
        transition: none;
    }
    
    .back-to-top {
        transition: none;
    }
}

/* ===== PRINT STYLES ===== */
@media print {
    nav,
    footer,
    .global-nav,
    .mobile-panel,
    .filter-section,
    .newsletter-section,
    .load-more-container,
    .scroll-indicator,
    .toc-wrapper, {
        display: none !important;
    }
    
    .articles-grid {
        grid-template-columns: 1fr;
    }
    
    .article-card {
        page-break-inside: avoid;
    }

    .article-wrapper,
    .article-content {
        box-shadow: none !important;
        border: 0 !important;
    }
    
    a[href]:after {
        content: " (" attr(href) ")";
        font-weight: 400;
        font-size: 0.9em;
    }
}

/* ===== REDUCED MOTION ===== */
@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;
    }
}

 /* Brand utility */
.brand { 
    font-weight: 800; 
    letter-spacing: 0.08em; 
    text-transform: uppercase;
}

/* ===== ACCESSIBILITY UTILITIES ===== */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: -999px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.skip-link:focus { left: 1rem; top: 1rem; width: auto; height: auto; padding: 0.75rem 1.5rem; background: var(--espresso); color: var(--pure-white); z-index: 10000; border-radius: 6px; text-decoration: none; font-weight: 600; }


/* ===== AOS (lite) ===== */
[data-aos] { transition: all 0.8s ease-out; }
[data-aos="fade-up"] { opacity: 0; transform: translateY(30px); }
[data-aos="fade-right"] { opacity: 0; transform: translateX(-30px); }
.aos-animate { opacity: 1; transform: translate(0); }

/* ===== ACCESSIBILITY & REDUCED MOTION ===== */
/*a:focus, button:focus { outline: 3px solid var(--warm-beige); outline-offset: 2px; }*/
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

/* ===== FAQ SECTION ===== */
.faq-section { padding: 5rem 4rem; background: var(--pure-white); }
.faq-container { max-width: 900px; margin: 0 auto; }
.faq-grid { margin-top: 3rem; }
.faq-item { border-bottom: 1px solid var(--gray-200); padding: 1.5rem 0; }
.faq-item:last-child { border-bottom: none; }
.faq-question { display: flex; justify-content: space-between; align-items: center; cursor: pointer; width: 100%; background: none; border: none; padding: 0.5rem 0; transition: color 0.3s ease; text-align: left; }
.faq-question:hover { color: var(--warm-beige-dark); }
.faq-question h3 { font-size: 1.1rem; font-weight: 600; color: var(--espresso); margin: 0; flex: 1; }
.faq-toggle { width: 24px; height: 24px; background: var(--warm-beige); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--pure-white); transition: transform 0.3s ease; flex-shrink: 0; font-weight: bold; }
.faq-item.active .faq-toggle { transform: rotate(45deg); background: var(--warm-beige-dark); }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.3s ease, padding 0.3s ease; }
.faq-answer[hidden] { display: block !important; max-height: 0; padding: 0; }
.faq-item.active .faq-answer { max-height: 500px; padding-top: 1rem; }
.faq-answer p { font-size: 0.95rem; color: var(--gray-600); line-height: 1.7; }


/* ===== TOC (Table of Contents) ===== */
.toc-wrapper {
    position: sticky;
    top: calc(var(--header-h) + 2rem);
    height: calc(100vh - var(--header-h) - 4rem);
    min-height: 0;
}

.toc {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: linear-gradient(135deg, #fff 0%, rgba(251,247,240,0.5) 100%);
    border-radius: 24px;
    padding: 2rem;
    border: 1px solid rgba(212,165,116,0.08);
    box-shadow: var(--shadow-xl);
    position: relative;
    overflow: hidden;
    min-width: 0;
}

.toc::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(212,165,116,0.05) 0%, transparent 70%);
    pointer-events: none;
}

.toc-header {
    position: relative;
    z-index: 1;
    margin-bottom: 1.5rem;
    flex-shrink: 0;
}

.toc-title {
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--warm-beige-dark);
    margin-bottom: 0.4rem;
}

.toc-subtitle {
    font-size: 1.6rem;
    font-weight: 900;
    color: var(--espresso);
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.toc-nav-wrapper {
    position: relative;
    flex: 1;
    min-height: 0;
    overflow: hidden;
    min-width: 0;
}

/* Top fade */
.toc-nav-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 20px;
    background: linear-gradient(to bottom, rgba(255,255,255,1) 0%, transparent 100%);
    z-index: 2;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* Bottom fade */
.toc-nav-wrapper::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 20px;
    background: linear-gradient(to top, rgba(255,255,255,1) 0%, transparent 100%);
    z-index: 2;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.toc-nav-wrapper.scrolled-down::before {
    opacity: 1;
}

.toc-nav-wrapper.scrolled-up::after {
    opacity: 1;
}

.toc-nav {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    height: 100%;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding-right: 20px;
    margin-right: -20px;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
    min-width: 0;
}

.toc-nav::-webkit-scrollbar {
    display: none;
}

/* Show thin scrollbar on mobile */
@media (max-width: 1100px) {
    .toc-nav {
        padding-right: 0 !important;
        margin-right: 0 !important;
        scrollbar-width: thin;
    }
    
    .toc-nav::-webkit-scrollbar {
        display: initial;
        width: 6px;
        height: 6px;
    }
    
    .toc-nav::-webkit-scrollbar-track {
        background: rgba(212,165,116,0.05);
        border-radius: 3px;
    }
    
    .toc-nav::-webkit-scrollbar-thumb {
        background: rgba(212,165,116,0.3);
        border-radius: 3px;
    }
    
    .toc-nav::-webkit-scrollbar-thumb:hover {
        background: rgba(212,165,116,0.5);
    }
}

.toc-link {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--gray-600);
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    text-decoration: none;
}

.toc-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--warm-beige);
    transform: scaleY(0);
    transition: transform 0.3s cubic-bezier(0.23,1,0.32,1);
}

.toc-link:hover {
    background: rgba(212,165,116,0.05);
    color: var(--espresso);
    transform: translateX(3px);
}

.toc-link.active {
    background: linear-gradient(135deg, rgba(212,165,116,0.1) 0%, rgba(212,165,116,0.05) 100%);
    color: var(--espresso);
    font-weight: 700;
    box-shadow: 0 3px 10px rgba(212,165,116,0.1);
}

.toc-link.active::before {
    transform: scaleY(1);
}

.toc-link:focus-visible {
    outline: 2px solid var(--warm-beige);
    outline-offset: 2px;
    box-shadow: 0 0 0 3px rgba(212,165,116,0.25);
}

.toc-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    background: rgba(60,36,21,0.05);
    border-radius: 7px;
    font-weight: 800;
    font-size: 0.8rem;
    color: var(--gray-500);
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.toc-link:hover .toc-number,
.toc-link.active .toc-number {
    background: var(--warm-beige);
    color: #fff;
}


/* ===== BACK TO TOP ===== */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 64px;
    height: 64px;
    border-radius: 999px;
    background: linear-gradient(135deg, #fff 0%, var(--cream) 100%);
    border: 1px solid rgba(212,165,116,0.1);
    box-shadow: var(--shadow-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s cubic-bezier(0.23,1,0.32,1);
    color: var(--warm-beige-dark);
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    transform: translateY(-6px) scale(1.1);
    box-shadow: var(--shadow-2xl);
    background: linear-gradient(135deg, var(--warm-beige) 0%, var(--warm-beige-dark) 100%);
    color: #fff;
}

.back-to-top svg {
    width: 28px;
    height: 28px;
    fill: none;
}

.back-to-top svg path {
    stroke-width: 2.5;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
}

/* WP related */
/*.wp-site-blocks,*/
.wp-block-template-part {
    all: unset;
    display: contents;
}


/* ===== 404 ===== */
/* ===== HERO ===== */
.hero-404{
  min-height:100vh;
  background:linear-gradient(135deg,var(--mahogany) 0%,var(--walnut) 50%,var(--cognac) 100%);
  display:flex;align-items:center;position:relative;overflow:hidden;
  padding-top:var(--header-height);
}
.hero-404::before{
  content:'';position:absolute;inset:0;opacity:.03;
  background-image:repeating-linear-gradient(45deg,transparent,transparent 35px,rgba(212,165,116,.4) 35px,rgba(212,165,116,.4) 70px);
}
.hero-404 .hero-glow{position:absolute;top:20%;left:50%;transform:translateX(-50%);width:800px;height:800px;background:radial-gradient(circle,rgba(212,165,116,.15) 0%,transparent 50%);filter:blur(100px)}
.hero-404 .content{position:relative;z-index:1;text-align:center;padding:6rem 2rem;width:100%;max-width:1200px;margin:0 auto;animation:fadeInUp 1.2s ease-out}

.hero-404 .badge{
  display:inline-block;font-size:.75rem;letter-spacing:.35em;text-transform:uppercase;color:var(--champagne);font-weight:700;margin-bottom:2.5rem;
  padding:.5rem 1.5rem;border:1px solid rgba(247,231,206,.2);border-radius:50px;background:rgba(212,165,116,.08);backdrop-filter:blur(10px)
}
.hero-404 .title{font-family:'Bebas Neue',sans-serif;font-size:clamp(4.5rem,10vw,8rem);line-height:.88;color:var(--ivory);letter-spacing:-.03em;margin-bottom:1.5rem;font-weight:400;text-shadow:0 5px 25px rgba(139,90,43,.3),0 2px 10px rgba(107,68,35,.5)}
.hero-404 .accent{
  background:linear-gradient(92deg,var(--champagne) 0%,var(--amber) 20%,var(--golden) 40%,var(--honey) 60%,var(--amber) 80%,var(--champagne) 100%);
  background-size:300% 100%;-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent;animation:liquidGold 6s ease-in-out infinite;display:inline-block;filter:brightness(1.2)
}
.hero-404 .subtitle{font-size:1.3rem;color:var(--champagne);max-width:760px;margin:1rem auto 4rem;opacity:.95;line-height:1.65}

.notfound-actions{
  display:flex;
  justify-content:center;
  gap:1rem;
  flex-wrap:wrap;
  margin-bottom:2.5rem;
}

.btn-secondary{
  display:inline-block;
  padding:1.2rem 2.75rem;
  border-radius:50px;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.1em;
  border:1px solid rgba(255,255,255,.25);
  color:var(--champagne);
  background:rgba(255,255,255,.06);
  backdrop-filter:blur(10px);
  transition:var(--transition);
  font-size:.9rem;
}

.btn-secondary:hover{
  background:rgba(255,255,255,.12);
  transform:translateY(-2px);
}

.notfound-links{
  margin-top:2rem;
}

.notfound-links p{
  color:var(--champagne);
  margin-bottom:1rem;
  opacity:.9;
}

.quick-links{
  display:flex;
  flex-wrap:wrap;
  gap:1rem;
  justify-content:center;
}

.quick-links a{
  padding:.7rem 1.4rem;
  border-radius:30px;
  font-weight:600;
  font-size:.9rem;
  border:1px solid rgba(230,184,125,.35);
  color:var(--champagne);
  background:rgba(212,165,116,.08);
  transition:var(--transition);
}

.quick-links a:hover{
  background:rgba(212,165,116,.18);
  transform:translateY(-2px);
}

main.og-content,
main.og-faqs-content {
    max-width: 1200px;
    margin: 0 auto;
}

main.og-content .wp-block-post-title,
main.og-faqs-content .wp-block-post-title {
    margin-top: 1rem;
}

/* Container */
main.og-content .faqs.ui-accordion {
  /*max-width: 900px;*/
  margin: 40px auto;
  border-top: 1px solid #e5e5e5;
  font-family: inherit;
}

/* Each header (question) */
main.og-content .faqs .ui-accordion-header.title {
  background: #ffffff;
  border: none;
  border-bottom: 1px solid #e5e5e5;
  padding: 18px 50px 18px 20px;
  font-size: 16px;
  font-weight: 600;
  color: #0a0a0a;
  cursor: pointer;
  position: relative;
  transition: all 0.25s ease;
}

/* Hover effect */
main.og-content .faqs .ui-accordion-header.title:hover {
  background: #f7f7f7;
  color: var(--espresso);
}

/* Active (open) state */
main.og-content .faqs .ui-accordion-header.ui-state-active {
  background: #0a0a0a;
  color: #ffffff;
}

/* Remove jQuery UI default icons */
main.og-content .faqs .ui-accordion-header .ui-icon {
  display: none;
}

/* Custom + / − icon */
main.og-content .faqs .ui-accordion-header::after {
  content: "+";
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
  transition: all 0.3s ease;
}

/* Active icon becomes minus */
main.og-content .faqs .ui-accordion-header.ui-state-active::after {
  content: "−";
}

/* Content panel */
main.og-content .faqs .ui-accordion-content {
  background: #fafafa;
  border: none;
  padding: 0 20px;
  color: #333;
  line-height: 1.6;
}

/* Inner spacing */
main.og-content .faqs .ui-accordion-content p,
main.og-content .faqs .ui-accordion-content ul {
  margin: 15px 0;
}

/* Lists */
main.og-content .faqs .ui-accordion-content ul {
  padding-left: 18px;
}

main.og-content .faqs .ui-accordion-content li {
  margin-bottom: 10px;
}

/* Smooth feel (optional enhancement) */
main.og-content .faqs .ui-accordion-content {
  transition: all 0.3s ease;
}

/* Optional: Section headings inside (like "S Corporation") */
/*.faqs h1 {
  font-size: 22px;
  margin: 40px 0 10px;
  color: #0a0a0a;
  border-bottom: 2px solid #0a0a0a;
  padding-bottom: 5px;
}*/

/* Override inline display:none */
main.og-content .faqs .ui-accordion-content {
  display: block !important;
  max-height: 0;
  overflow: hidden;
  padding-top: 0;
  padding-bottom: 0;
  transition: max-height 0.3s ease, padding 0.3s ease;
}


/** OG FAQs with different HTML structure **/
.og-faqs-content .faqs.ui-accordion {
  margin: 40px auto;
  border-radius: 8px;
  overflow: hidden;
  font-family: Arial, sans-serif;
  border: 1px solid #e0e0e0;
}

.og-faqs-content .faqs.ui-accordion .title {
  background-color: #f7f9fc;
  padding: 16px 20px;
  cursor: pointer;
  font-weight: 600;
  font-size: 1.05rem;
  border-bottom: 1px solid #e0e0e0;
  position: relative;
  transition: background 0.2s ease;
}

.og-faqs-content .faqs.ui-accordion .title::after {
  content: '+';
  position: absolute;
  right: 20px;
  font-size: 1.2rem;
  transition: transform 0.2s ease;
}

.og-faqs-content .faqs.ui-accordion .title.active {
  /*background-color: #e1f0ff;*/
    background: #0a0a0a;
  color: #ffffff;
}

.og-faqs-content .faqs.ui-accordion .title.active::after {
  content: '-';
  transform: rotate(180deg);
}

.og-faqs-content .faqs.ui-accordion > div[style] {
  display: none;
  padding: 16px 20px;
  background-color: #ffffff;
  font-size: 0.95rem;
  line-height: 1.5;
  animation: fadeIn 0.3s ease-in-out;
  transition: all 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.wp-embedded-content p {
    margin: 0 !important;
    padding: 0 !important;
}