/*
Theme Name: Rindx Smart Brands
Theme URI: https://example.com/rindx-smart-brands
Author: Senior WP Engineer
Author URI: https://example.com
Description: A premium, highly optimized, mobile-first WordPress theme. "Google-grade" UX, Gutenberg ready, and ultra-fast.
Version: 1.1.7
Requires at least: 6.0
Tested up to: 6.4
Requires PHP: 7.4
Text Domain: rindx-smart-brands
License: GPLv2 or later
*/

/* ==========================================================================
   1. CSS Variables & Theming (Global Brand Architecture)
   ========================================================================== */
:root {
    /* Core Brand Colors (Overridden by Customizer) */
    --primary-color: #0F172A; 
    --primary-color-rgb: 15, 23, 42;
    --accent-color: #3B82F6; 
    --accent-color-rgb: 59, 130, 246;
    
    /* Sophisticated Greyscale & Backgrounds */
    --text-main: #334155; 
    --text-muted: #64748B; 
    --text-heading: #0F172A;
    --bg-body: #F8FAFC; 
    --bg-surface: #FFFFFF;
    --bg-alt: #F1F5F9; 
    --border-color: #E2E8F0; 
    --border-hover: #CBD5E1; 
    
    /* Semantic Feedback Colors */
    --color-success: #10B981;
    --color-warning: #F59E0B;
    --color-danger: #EF4444;
    --color-info: #3B82F6;
    
    /* Typography System */
    --font-main: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    
    /* Fluid Layouts */
    --container-width: 1240px;
    --content-width: 840px;
    --header-height: 80px;
    --page-spacing: clamp(3rem, 6vw, 6rem);
    
    /* Premium Shadows (Layered for depth) */
    --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --shadow-inner: inset 0 2px 4px 0 rgba(0, 0, 0, 0.06);
    --shadow-focus: 0 0 0 3px rgba(var(--accent-color-rgb), 0.5);
    
    /* Border Radii */
    --radius-none: 0;
    --radius-sm: 0.375rem;
    --radius-md: 0.75rem;
    --radius-lg: 1.25rem;
    --radius-xl: 2rem;
    --radius-2xl: 3rem;
    --radius-full: 9999px;
    
    /* Refined Transitions (Cubic Bezier for Apple/Google feel) */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 400ms cubic-bezier(0.34, 1.56, 0.64, 1);
    
    /* Z-Index Layers */
    --z-below: -1;
    --z-base: 1;
    --z-sticky: 50;
    --z-header: 100;
    --z-dropdown: 200;
    --z-overlay: 300;
    --z-modal: 400;
    --z-popover: 500;
    --z-toast: 600;
}

/* ==========================================================================
   2. Modern Reset & Accessibility Base
   ========================================================================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body { 
    overflow-x: clip; 
}

html {
    font-size: 100%;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    scroll-padding-top: calc(var(--header-height) + 2rem); 
}

body {
    font-family: var(--font-main);
    color: var(--text-main);
    background-color: var(--bg-body);
    line-height: 1.75; 
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    word-wrap: break-word;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.site { flex-grow: 1; display: flex; flex-direction: column; }
.site-main { flex-grow: 1; }

/* Accessible Focus States - The Google Way */
:focus { outline: none; }
:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 3px;
    box-shadow: 0 0 0 4px rgba(var(--accent-color-rgb), 0.15);
    border-radius: 2px;
}
a:focus-visible, button:focus-visible { border-radius: var(--radius-sm); }
input:focus-visible, textarea:focus-visible, select:focus-visible {
    outline: none;
    box-shadow: var(--shadow-focus);
    border-color: var(--accent-color);
}

.screen-reader-text, .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;
}

/* Fluid Typography Defaults */
h1, h2, h3, h4, h5, h6 {
    color: var(--text-heading); font-weight: 700; line-height: 1.15;
    margin-bottom: 1.25rem; clear: both; letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.25rem, 5vw, 3.5rem); letter-spacing: -0.03em; }
h2 { font-size: clamp(1.875rem, 4vw, 2.5rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2rem); }
h4 { font-size: clamp(1.25rem, 2vw, 1.5rem); letter-spacing: -0.01em; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; text-transform: uppercase; letter-spacing: 0.05em; font-weight: 600; color: var(--text-muted); }

p { margin-bottom: 1.5rem; }

a { color: var(--accent-color); text-decoration: none; transition: color var(--transition-fast); }
a:hover { color: var(--primary-color); }

img, video, canvas, iframe { max-width: 100%; height: auto; display: block; }
svg { display: block; }

figure { margin: 0 0 2rem 0; }
figcaption { font-size: 0.875rem; color: var(--text-muted); text-align: center; margin-top: 0.75rem; }

::selection { background-color: rgba(var(--accent-color-rgb), 0.2); color: var(--text-heading); }

@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;
    }
}

/* ==========================================================================
   3. Fluid Layout Systems (Grid/Flexbox)
   ========================================================================== */
.container { width: 100%; max-width: var(--container-width); margin: 0 auto; padding: 0 clamp(1.25rem, 4vw, 2rem); }
.container-narrow { width: 100%; max-width: var(--content-width); margin: 0 auto; padding: 0 clamp(1.25rem, 4vw, 2rem); }

/* Utility Classes */
.w-full { width: 100%; }
.h-full { height: 100%; }
.m-0 { margin: 0 !important; }
.mt-0 { margin-top: 0 !important; }
.mb-0 { margin-bottom: 0 !important; }
.p-0 { padding: 0 !important; }
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.text-muted { color: var(--text-muted); }
.font-bold { font-weight: 700; }
.font-medium { font-weight: 500; }
.invisible { visibility: hidden; }
.hidden { display: none; }
.block { display: block; }
.inline-block { display: inline-block; }
.relative { position: relative; }
.absolute { position: absolute; }

/* Flexbox Engine */
.d-flex { display: flex; }
.flex-column { flex-direction: column; }
.flex-row { flex-direction: row; }
.align-center { align-items: center; }
.align-start { align-items: flex-start; }
.align-end { align-items: flex-end; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.justify-start { justify-content: flex-start; }
.justify-end { justify-content: flex-end; }
.flex-wrap { flex-wrap: wrap; }
.flex-nowrap { flex-wrap: nowrap; }
.flex-1 { flex: 1 1 0%; }
.flex-auto { flex: 1 1 auto; }
.flex-none { flex: none; }

/* Gap Utilities */
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }
.gap-10 { gap: 2.5rem; }
.gap-12 { gap: 3rem; }

/* Grid Engine */
.grid { display: grid; }
.grid-gap { gap: clamp(1.5rem, 3vw, 2.5rem); }
.grid-gap-sm { gap: 1rem; }
.grid-gap-lg { gap: 3rem; }
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* Responsive Layout Adjustments */
@media (min-width: 640px) {
    .sm-grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 768px) {
    .md-grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .md-grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .md-flex-row { flex-direction: row; }
}

@media (min-width: 1024px) {
    .lg-grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .lg-grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .layout-with-sidebar { display: grid; grid-template-columns: 1fr 320px; gap: 4rem; align-items: start; }
}

@media (min-width: 1280px) {
    .xl-grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .layout-with-sidebar { grid-template-columns: 1fr 360px; gap: 5rem; }
}

/* ==========================================================================
   4. UI Components & Icon Enforcement
   ========================================================================== */
/* Bulletproof Icon Enforcement: Explicitly dark to contrast white backgrounds */
.search-trigger svg,
.mobile-menu-toggle svg,
.mobile-icon-cta svg,
.drawer-close svg,
.close-search svg,
.submenu-toggle svg {
    flex-shrink: 0 !important;
    stroke: var(--text-heading) !important;
    fill: none !important;
    stroke-width: 2 !important;
    stroke-linecap: round !important;
    stroke-linejoin: round !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    transition: stroke 0.2s ease !important;
}

.search-trigger:hover svg,
.mobile-menu-toggle:hover svg,
.mobile-icon-cta:hover svg,
.submenu-toggle:hover svg,
.drawer-close:hover svg,
.close-search:hover svg {
    stroke: var(--accent-color) !important;
}

.search-trigger svg, .drawer-close svg, .mobile-icon-cta svg { width: 22px !important; height: 22px !important; }
.mobile-menu-toggle svg { width: 26px !important; height: 26px !important; }
.close-search svg { width: 32px !important; height: 32px !important; }
.submenu-toggle svg { width: 20px !important; height: 20px !important; pointer-events: none; }

/* Buttons */
.btn, .button, input[type="submit"], button {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 0.875rem 1.75rem; border-radius: var(--radius-md);
    font-weight: 600; font-family: var(--font-main); font-size: 1rem;
    line-height: 1.2; border: 1px solid transparent; cursor: pointer;
    transition: all var(--transition-normal); text-align: center;
    text-decoration: none; user-select: none;
}
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }

.btn-primary, input[type="submit"] { background-color: var(--primary-color); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover:not(:disabled), input[type="submit"]:hover:not(:disabled) { background-color: rgba(var(--primary-color-rgb), 0.85); color: #fff; transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn-accent { background-color: var(--accent-color); color: #fff; box-shadow: 0 4px 14px 0 rgba(var(--accent-color-rgb), 0.3); }
.btn-accent:hover:not(:disabled) { background-color: #2563EB; color: #fff; transform: translateY(-2px); box-shadow: 0 6px 20px rgba(var(--accent-color-rgb), 0.4); }

.btn-outline { background-color: transparent; color: var(--primary-color); border: 2px solid var(--primary-color); }
.btn-outline:hover:not(:disabled) { background-color: var(--primary-color); color: #fff; }
.btn-outline-accent { background-color: transparent; color: var(--accent-color); border: 2px solid var(--accent-color); }
.btn-outline-accent:hover:not(:disabled) { background-color: var(--accent-color); color: #fff; }

/* Premium Form Inputs */
input[type="text"], input[type="email"], input[type="url"], input[type="password"], 
input[type="search"], input[type="number"], input[type="tel"], textarea, select {
    width: 100%; padding: 0.875rem 1.25rem; font-size: 1rem; font-family: var(--font-main);
    color: var(--text-heading); background-color: var(--bg-surface);
    border: 1px solid var(--border-color); border-radius: var(--radius-md);
    transition: all var(--transition-fast); max-width: 100%; box-shadow: var(--shadow-sm); appearance: none; 
}
textarea { min-height: 160px; resize: vertical; line-height: 1.6; }
input::placeholder, textarea::placeholder { color: #94A3B8; opacity: 1; }
input:hover:not(:disabled), textarea:hover:not(:disabled), select:hover:not(:disabled) { border-color: var(--border-hover); }
input:focus, textarea:focus, select:focus {
    border-color: var(--accent-color); outline: none; background-color: #fff;
    box-shadow: var(--shadow-focus);
}
input:disabled, textarea:disabled, select:disabled { background-color: var(--bg-alt); cursor: not-allowed; opacity: 0.7; }

/* Advanced Checkboxes & Radios */
input[type="checkbox"], input[type="radio"] {
    width: 1.25rem; height: 1.25rem; margin-right: 0.5rem; cursor: pointer;
    accent-color: var(--accent-color); position: relative; top: 2px; border: 1px solid var(--border-color);
}

/* Custom Search Pill - Macro UI */
.search-pill-wrapper {
    display: flex; align-items: center; background: var(--bg-surface);
    border: 1px solid var(--border-color); border-radius: var(--radius-full);
    padding: 0.375rem; transition: all var(--transition-normal); box-shadow: var(--shadow-sm);
}
.search-pill-wrapper:focus-within { border-color: var(--accent-color); box-shadow: var(--shadow-focus); transform: translateY(-1px); }
.search-pill-wrapper input[type="search"] { border: none; background: transparent; padding: 0.5rem 1rem 0.5rem 1.25rem; flex-grow: 1; font-size: 1rem; color: var(--text-heading); outline: none; box-shadow: none; }
.search-pill-submit { background: var(--accent-color); color: #fff; border: none; border-radius: var(--radius-full); padding: 0.625rem 1.5rem; cursor: pointer; display: flex; align-items: center; justify-content: center; font-weight: 600; transition: all var(--transition-normal); }
.search-pill-submit:hover { background: #2563EB; box-shadow: 0 4px 12px rgba(var(--accent-color-rgb), 0.3); }
@media (max-width: 767px) { .search-pill-submit span { display: none; } .search-pill-submit { padding: 0.625rem; width: 44px; height: 44px; } }

/* Labels and Helper Text */
label { display: block; font-weight: 600; margin-bottom: 0.5rem; color: var(--text-heading); font-size: 0.9375rem; }
.help-text { font-size: 0.875rem; color: var(--text-muted); margin-top: 0.25rem; }

/* ==========================================================================
   5. Premium Header & Navigation
   ========================================================================== */
.site-header {
    position: sticky;
    top: 0;
    z-index: var(--z-header);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    transition: box-shadow 0.3s ease, background-color 0.3s ease;
}
.site-header.is-scrolled {
    box-shadow: 0 4px 20px rgba(0,0,0,0.04);
    background: rgba(255, 255, 255, 0.98);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-height);
    flex-wrap: nowrap;
}

/* Logo */
.site-branding { flex: 0 0 auto; display: flex; align-items: center; z-index: 10; }
.site-logo { font-size: 1.5rem; font-weight: 800; color: var(--text-heading); letter-spacing: -0.04em; text-decoration: none; line-height: 1; display: flex; align-items: center; }
.site-logo:hover { color: var(--accent-color); }
.site-branding img { max-height: 36px; width: auto; object-fit: contain; }

/* Desktop Navigation */
.desktop-nav { display: none; }
@media (min-width: 1024px) {
    .desktop-nav { display: flex; flex: 1 1 auto; justify-content: center; min-width: 0; height: 100%; align-items: center; }
    .mobile-menu-toggle { display: none !important; }
}

.primary-menu { display: flex; gap: 2.5rem; list-style: none; margin: 0; padding: 0; height: 100%; align-items: center; }
.primary-menu > li { position: relative; display: flex; align-items: center; height: 100%; }
.primary-menu a {
    font-size: 0.9375rem; font-weight: 500; color: var(--text-main);
    padding: 0; transition: color 0.2s; display: flex; align-items: center; text-decoration: none; height: 100%;
}
.primary-menu > li:hover > a, .primary-menu > li.current-menu-item > a, .primary-menu > li:focus-within > a { color: var(--text-heading); }

/* Elegant Hover Dot */
.primary-menu > li > a::before {
    content: ''; position: absolute; bottom: 1.25rem; left: 50%;
    transform: translateX(-50%) scale(0); width: 4px; height: 4px;
    border-radius: 50%; background-color: var(--accent-color); transition: transform 0.2s cubic-bezier(0.2, 0, 0, 1);
}
.primary-menu > li:hover > a::before, .primary-menu > li.current-menu-item > a::before, .primary-menu > li:focus-within > a::before { transform: translateX(-50%) scale(1); }

/* Pure CSS Arrow for Desktop Dropdown */
.primary-menu .menu-item-has-children > a::after {
    content: ""; display: inline-block; margin-left: 6px; width: 6px; height: 6px;
    border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
    transform: translateY(-2px) rotate(45deg); transition: transform 0.2s ease;
}
.primary-menu .menu-item-has-children:hover > a::after, .primary-menu .menu-item-has-children:focus-within > a::after { transform: translateY(2px) rotate(225deg); color: var(--accent-color); }

/* Premium Floating Dropdown Box */
.primary-menu .sub-menu {
    position: absolute; top: calc(100% - 10px); left: 50%;
    transform: translateX(-50%) translateY(15px) scale(0.97);
    min-width: 240px; background: #fff; border: 1px solid rgba(0,0,0,0.05);
    border-radius: 16px; box-shadow: 0 20px 40px -10px rgba(0,0,0,0.1), 0 10px 15px -5px rgba(0,0,0,0.05);
    padding: 0.75rem; list-style: none; opacity: 0; visibility: hidden;
    transition: all 0.3s cubic-bezier(0.2, 0, 0, 1); transform-origin: top center; z-index: var(--z-dropdown); pointer-events: none;
}
.primary-menu > li:hover > .sub-menu, .primary-menu > li:focus-within > .sub-menu, .primary-menu .sub-menu li:hover > .sub-menu, .primary-menu .sub-menu li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0) scale(1); pointer-events: auto; }
.primary-menu .sub-menu li { position: relative; height: auto; }
.primary-menu .sub-menu a { padding: 0.75rem 1rem; border-radius: 10px; color: var(--text-main); font-weight: 500; transition: background-color 0.2s, color 0.2s; line-height: 1.4; height: auto; display: block; }
.primary-menu .sub-menu a:hover, .primary-menu .sub-menu a:focus-visible { background-color: var(--bg-alt); color: var(--accent-color); }
.primary-menu .sub-menu .sub-menu { top: -0.75rem; left: calc(100% + 10px); transform: translateX(10px) translateY(0) scale(0.97); }
.primary-menu .sub-menu li:hover > .sub-menu, .primary-menu .sub-menu li:focus-within > .sub-menu { transform: translateX(0) translateY(0) scale(1); }

/* Header Actions */
.header-actions { display: flex; align-items: center; gap: 0.25rem; flex: 0 0 auto; white-space: nowrap; z-index: 10; }

/* Background-less Raw Icons */
.search-trigger, .mobile-menu-toggle, .mobile-icon-cta {
    background: transparent !important;
    border: none !important;
    width: 44px; height: 44px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; padding: 0; outline: none;
    color: var(--text-heading); text-decoration: none;
}
.search-trigger:focus-visible, .mobile-menu-toggle:focus-visible, .mobile-icon-cta:focus-visible { border-radius: var(--radius-md); box-shadow: var(--shadow-focus); }

/* Mobile Icon specific styles (for FontAwesome compatibility) */
.mobile-icon-cta i { font-size: 1.25rem; transition: color 0.2s ease; }
.mobile-icon-cta:hover i { color: var(--accent-color); }

/* Header CTA Buttons Setup */
.header-cta { display: none !important; }

@media (min-width: 1024px) {
    /* Swap mobile icon for desktop button on large screens */
    .mobile-icon-cta { display: none !important; }
    .header-cta { display: inline-flex !important; margin-left: 1rem; }
    .header-actions { gap: 0.5rem; }
}

/* ==========================================================================
   6. Premium Off-Canvas Mobile Drawer
   ========================================================================== */
.drawer-overlay {
    position: fixed; inset: 0; background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    opacity: 0; visibility: hidden; z-index: var(--z-overlay); transition: opacity 0.4s ease;
}
.drawer-overlay.is-active { opacity: 1; visibility: visible; }

.off-canvas-drawer {
    position: fixed; top: 0; right: -100%; width: 100%; max-width: 400px; height: 100vh;
    background: var(--bg-surface); box-shadow: -20px 0 50px rgba(0,0,0,0.15);
    z-index: var(--z-modal); transition: right 0.5s cubic-bezier(0.2, 0, 0, 1); display: flex; flex-direction: column;
}
.off-canvas-drawer.is-active { right: 0; }

.off-canvas-header {
    display: flex; align-items: center; justify-content: space-between; padding: 1.5rem; border-bottom: 1px solid var(--border-color); background: var(--bg-surface); z-index: 2;
}
.drawer-title { font-weight: 800; font-size: 1.25rem; color: var(--text-heading); letter-spacing: -0.02em; }

/* Clean Close Button - No Background */
.drawer-close {
    background: transparent !important; border: none !important; width: 44px; height: 44px;
    display: flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; outline: none;
}
.drawer-close:focus-visible { border-radius: var(--radius-md); box-shadow: var(--shadow-focus); }

.off-canvas-body {
    padding: 1.5rem; overflow-y: auto; flex: 1; display: flex; flex-direction: column; gap: 1.5rem; -webkit-overflow-scrolling: touch;
}

/* Mobile Nav Accordion */
.mobile-menu-list { list-style: none; padding: 0; margin: 0; }
.mobile-menu-list li { border-bottom: 1px solid var(--border-color); position: relative; }
.mobile-menu-list li:last-child { border-bottom: none; }
.mobile-menu-list a { display: block; padding: 1.25rem 0; font-size: 1.125rem; font-weight: 600; color: var(--text-heading); text-decoration: none; padding-right: 3.5rem; transition: color 0.2s; }
.mobile-menu-list a:hover { color: var(--accent-color); }

/* Perfect Background-less Submenu Toggles (Just the Chevron) */
.submenu-toggle {
    position: absolute; right: 0; top: 0.5rem;
    width: 3.5rem; height: 3.5rem;
    background: transparent !important; border: none !important;
    cursor: pointer; display: flex; align-items: center; justify-content: center; outline: none;
}
.submenu-toggle:focus-visible { border-radius: var(--radius-md); box-shadow: var(--shadow-focus); }

.mobile-submenu {
    max-height: 0; overflow: hidden; transition: max-height 0.4s cubic-bezier(0.2, 0, 0, 1);
    padding-left: 1rem; margin-top: -0.5rem; border-left: 2px solid var(--border-color);
}
.mobile-submenu.is-expanded { max-height: 2000px; padding-bottom: 1rem; margin-bottom: 1rem; }
.mobile-submenu li { border: none; }
.mobile-submenu a { padding: 0.75rem 0; font-size: 1rem; font-weight: 500; color: var(--text-main); }
.mobile-submenu a:hover { color: var(--accent-color); }

.mobile-cta-wrapper { padding-top: 0.5rem; padding-bottom: 1rem; }

/* ==========================================================================
   7. Cinematic Search Overlay
   ========================================================================== */
#search-overlay {
    position: fixed; inset: 0; background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); z-index: 9999;
    display: flex; flex-direction: column; align-items: center; justify-content: flex-start;
    padding-top: 15vh; opacity: 0; visibility: hidden; transition: opacity 0.4s ease, visibility 0.4s ease;
}
#search-overlay.is-active { opacity: 1; visibility: visible; }

.search-overlay-content {
    width: 100%; max-width: 800px; padding: 0 1.5rem; transform: translateY(20px); opacity: 0;
    transition: transform 0.5s cubic-bezier(0.2, 0, 0, 1), opacity 0.5s ease;
}
#search-overlay.is-active .search-overlay-content { transform: translateY(0); opacity: 1; transition-delay: 0.1s; }
.search-overlay-content h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); text-align: center; margin-bottom: 2.5rem; color: var(--text-heading); font-weight: 800; letter-spacing: -0.03em; }
.search-overlay-content .search-pill-wrapper { padding: 0.5rem; box-shadow: 0 20px 40px rgba(0,0,0,0.1); border-color: transparent; }
.search-overlay-content input[type="search"] { font-size: 1.25rem; padding: 1rem; }
.search-overlay-content input[type="search"]::placeholder { color: #CBD5E1; }

/* Clean Background-less Close Button */
.close-search {
    position: absolute; top: 2rem; right: 2rem;
    background: transparent !important; border: none !important; width: 48px; height: 48px;
    display: flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; outline: none;
}
.close-search:focus-visible { border-radius: var(--radius-md); box-shadow: var(--shadow-focus); }

/* ==========================================================================
   8. Deep Typography, Tables, and Content Formatting
   ========================================================================== */
.entry-content { font-size: 1.125rem; line-height: 1.85; color: var(--text-main); }
.entry-content > * { margin-bottom: 1.75rem; }
.entry-content > *:last-child { margin-bottom: 0; }
.entry-content h1, .entry-content h2, .entry-content h3, .entry-content h4, .entry-content h5, .entry-content h6 { color: var(--text-heading); font-weight: 700; margin-top: 2em; margin-bottom: 1em; line-height: 1.3; }
.entry-content h1 { font-size: 2.5rem; letter-spacing: -0.03em; }
.entry-content h2 { font-size: 2rem; letter-spacing: -0.02em; border-bottom: 1px solid var(--border-color); padding-bottom: 0.5rem; }
.entry-content h3 { font-size: 1.5rem; letter-spacing: -0.01em; }
.entry-content h4 { font-size: 1.25rem; }
.entry-content ul, .entry-content ol { padding-left: 1.5rem; margin-bottom: 1.75rem; }
.entry-content li { margin-bottom: 0.5rem; }
.entry-content li::marker { color: var(--accent-color); font-weight: 600; }
.entry-content li > ul, .entry-content li > ol { margin-top: 0.5rem; margin-bottom: 0; }

.entry-content a { color: var(--accent-color); text-decoration: underline; text-decoration-color: rgba(var(--accent-color-rgb), 0.3); text-underline-offset: 2px; transition: text-decoration-color 0.2s; }
.entry-content a:hover { text-decoration-color: var(--accent-color); }

.entry-content blockquote {
    margin: 2.5rem 0; padding: 1.5rem 2rem; background-color: var(--bg-alt);
    border-left: 4px solid var(--accent-color); border-radius: 0 var(--radius-lg) var(--radius-lg) 0; position: relative;
}
.entry-content blockquote p { font-size: 1.25rem; font-style: italic; color: var(--text-heading); line-height: 1.6; margin-bottom: 0; }
.entry-content blockquote cite { font-size: 0.875rem; font-style: normal; font-weight: 700; display: block; margin-top: 1rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }

pre, code, kbd, samp { font-family: var(--font-mono); font-size: 0.9em; }
code { background-color: rgba(var(--accent-color-rgb), 0.1); padding: 0.2em 0.4em; border-radius: var(--radius-sm); color: #BE185D; word-break: break-word; }
pre { background-color: #0F172A; color: #F8FAFC; padding: 1.5rem; border-radius: var(--radius-lg); overflow-x: auto; margin: 2rem 0; box-shadow: var(--shadow-md); }
pre code { background: transparent; color: inherit; padding: 0; line-height: 1.6; word-break: normal; }

.entry-content table { width: 100%; border-collapse: separate; border-spacing: 0; margin-bottom: 2rem; text-align: left; border: 1px solid var(--border-color); border-radius: var(--radius-md); overflow: hidden; }
.entry-content th, .entry-content td { padding: 0.75rem 1rem; border-bottom: 1px solid var(--border-color); border-right: 1px solid var(--border-color); }
.entry-content th:last-child, .entry-content td:last-child { border-right: none; }
.entry-content tr:last-child td { border-bottom: none; }
.entry-content th { background-color: var(--bg-alt); font-weight: 600; color: var(--text-heading); font-size: 0.875rem; text-transform: uppercase; letter-spacing: 0.05em; }
.entry-content tr:nth-child(even) { background-color: rgba(241, 245, 249, 0.4); }

hr { border: 0; height: 1px; background: var(--border-color); margin: 3rem 0; }

/* Dynamic TOC Container Styling */
#toc-container { background: var(--bg-surface); border: 1px solid var(--border-color); border-radius: var(--radius-lg); padding: 1.5rem; margin-bottom: 2.5rem; box-shadow: var(--shadow-sm); }
#toc-container h3 { margin-top: 0; font-size: 1.125rem; font-weight: 700; color: var(--text-heading); display: flex; align-items: center; gap: 0.5rem; margin-bottom: 1rem; border-bottom: none; padding-bottom: 0; text-transform: uppercase; letter-spacing: 0.05em; }
#toc-container ul { list-style: none; padding: 0; margin: 0; }
#toc-container li { margin-bottom: 0.5rem; }
#toc-container a { color: var(--text-main); text-decoration: none; display: inline-block; transition: color 0.2s; }
#toc-container a:hover { color: var(--accent-color); }

/* ==========================================================================
   9. Extensive Gutenberg Block Support
   ========================================================================== */
.alignleft { float: left; margin: 0.5rem 2rem 1.5rem 0; max-width: 50%; }
.alignright { float: right; margin: 0.5rem 0 1.5rem 2rem; max-width: 50%; }
.aligncenter { clear: both; display: block; margin-left: auto; margin-right: auto; margin-bottom: 2rem; text-align: center; }

.alignwide { margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw); max-width: 100vw; width: 100vw; }
.alignfull { margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw); max-width: 100vw; width: 100vw; }
@media (min-width: 1024px) { 
    .alignwide { margin-left: -10vw; margin-right: -10vw; max-width: calc(100% + 20vw); width: auto; }
    /* alignfull stays 100vw */
}

/* Specific Core Blocks */
.wp-block-button__link { border-radius: var(--radius-md); font-weight: 600; text-decoration: none; padding: 0.875rem 1.75rem; transition: background-color 0.2s, color 0.2s, transform 0.2s, box-shadow 0.2s; }
.wp-block-button.is-style-outline .wp-block-button__link { border: 2px solid currentColor; background: transparent; }
.wp-block-button__link:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

.wp-block-quote { border-left: 4px solid var(--accent-color); padding-left: 1.5rem; margin-bottom: 2rem; }
.wp-block-quote p { font-size: 1.25rem; font-style: italic; color: var(--text-heading); }
.wp-block-quote.is-large, .wp-block-quote.is-style-large { font-size: 1.75rem; font-style: italic; border-left: none; padding: 0; text-align: center; color: var(--text-heading); }

.wp-block-pullquote { padding: 3rem 0; margin: 3rem 0; text-align: center; border-top: 2px solid var(--border-color); border-bottom: 2px solid var(--border-color); }
.wp-block-pullquote blockquote p { font-size: 2rem; font-weight: 800; line-height: 1.3; letter-spacing: -0.02em; color: var(--text-heading); }

.wp-block-separator { margin: 3rem auto; border-top: 1px solid var(--border-color); }
.wp-block-separator.is-style-dots { background: none; border: none; text-align: center; height: auto; }
.wp-block-separator.is-style-dots::before { content: "···"; font-size: 2rem; color: var(--border-hover); letter-spacing: 1em; padding-left: 1em; }

.wp-block-image { margin-bottom: 2rem; }
.wp-block-image img { border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.wp-block-image figcaption { margin-top: 0.75rem; font-size: 0.875rem; color: var(--text-muted); text-align: center; }

.wp-block-gallery { gap: 1rem; margin-bottom: 2rem; }
.wp-block-gallery .wp-block-image img { border-radius: var(--radius-md); box-shadow: none; }

.has-drop-cap:not(:focus)::first-letter { float: left; font-size: 4rem; line-height: 0.8; font-weight: 800; margin: 0.1em 0.1em 0 0; color: var(--accent-color); }

.has-background { padding: 2rem; border-radius: var(--radius-lg); }
.wp-block-cover { border-radius: var(--radius-xl); overflow: hidden; margin-bottom: 2.5rem; box-shadow: var(--shadow-md); min-height: 400px; }

/* Core Columns */
.wp-block-columns { margin-bottom: 2rem; }

/* ==========================================================================
   10. Native Threaded Comments
   ========================================================================== */
.comments-area { margin-top: 5rem; padding-top: 4rem; border-top: 1px solid var(--border-color); }
.comments-title, .comment-reply-title { font-size: 1.75rem; font-weight: 800; margin-bottom: 2rem; letter-spacing: -0.02em; color: var(--text-heading); }

.comment-list { list-style: none; padding: 0; margin: 0 0 4rem 0; }
.comment-list > li { margin-bottom: 2.5rem; position: relative; }
.comment-list .children { list-style: none; padding-left: 2.5rem; margin-top: 2rem; position: relative; }
.comment-list .children::before { content: ''; position: absolute; top: -2rem; bottom: 0; left: 1rem; width: 2px; background: var(--border-color); border-radius: 2px; }
@media (max-width: 767px) { .comment-list .children { padding-left: 1.5rem; } .comment-list .children::before { left: 0.5rem; } }

.comment-body { background: var(--bg-surface); padding: 1.5rem; border-radius: var(--radius-lg); border: 1px solid var(--border-color); position: relative; box-shadow: var(--shadow-sm); transition: box-shadow 0.2s ease; }
.comment-body:hover { box-shadow: var(--shadow-md); }

.comment-meta { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; flex-wrap: wrap; gap: 1rem; }
.comment-author { display: flex; align-items: center; font-weight: 700; font-size: 1rem; color: var(--text-heading); }
.comment-author img.avatar { border-radius: 50%; margin-right: 1rem; width: 48px; height: 48px; box-shadow: var(--shadow-xs); }

.comment-metadata { font-size: 0.875rem; color: var(--text-muted); }
.comment-metadata a { color: var(--text-muted); text-decoration: none; }
.comment-metadata a:hover { color: var(--accent-color); text-decoration: underline; }

.comment-content { font-size: 1rem; line-height: 1.6; color: var(--text-main); }
.comment-content > *:last-child { margin-bottom: 0; }

.reply { margin-top: 1.25rem; }
.reply a { display: inline-flex; align-items: center; font-size: 0.875rem; font-weight: 600; color: var(--text-main); background: var(--bg-alt); padding: 0.4rem 0.8rem; border-radius: var(--radius-full); transition: background-color 0.2s, color 0.2s; text-decoration: none; }
.reply a:hover { background-color: var(--accent-color); color: #fff; }

.comment-respond { background: var(--bg-surface); padding: 2.5rem; border-radius: var(--radius-xl); border: 1px solid var(--border-color); box-shadow: var(--shadow-sm); }
@media (max-width: 767px) { .comment-respond { padding: 1.5rem; } }
.comment-form-comment, .comment-form-author, .comment-form-email, .comment-form-url { margin-bottom: 1.5rem; }
.comment-form label { display: block; font-weight: 600; font-size: 0.9375rem; margin-bottom: 0.5rem; color: var(--text-heading); }
.comment-notes, .logged-in-as { font-size: 0.9375rem; color: var(--text-muted); margin-bottom: 1.5rem; line-height: 1.5; }
.comment-form-cookies-consent { display: flex; align-items: flex-start; gap: 0.5rem; font-size: 0.875rem; color: var(--text-muted); margin-bottom: 1.5rem; }
.comment-form-cookies-consent input { margin-top: 0.2rem; }

/* ==========================================================================
   11. Sidebar & Widgets 
   ========================================================================== */
.widget-area { margin-top: 2rem; }
@media (min-width: 1024px) { .widget-area { margin-top: 0; } }

.widget { margin-bottom: 2.5rem; background: var(--bg-surface); padding: 1.5rem; border: 1px solid var(--border-color); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.widget-title { font-size: 1.125rem; font-weight: 800; margin-bottom: 1.25rem; border-bottom: 2px solid var(--border-hover); padding-bottom: 0.5rem; letter-spacing: -0.01em; color: var(--text-heading); }

.widget ul { list-style: none; padding: 0; margin: 0; }
.widget ul li { padding: 0.6rem 0; border-bottom: 1px dashed var(--border-color); display: flex; justify-content: space-between; align-items: center; }
.widget ul li:last-child { border-bottom: none; padding-bottom: 0; }
.widget ul li a { color: var(--text-main); font-weight: 500; display: block; flex-grow: 1; text-decoration: none; font-size: 0.95rem; }
.widget ul li a::before { content: '›'; color: var(--accent-color); font-weight: bold; margin-right: 0.5rem; font-size: 1.2em; line-height: 1; display: inline-block; transition: transform 0.2s; }
.widget ul li a:hover { color: var(--accent-color); }
.widget ul li a:hover::before { transform: translateX(3px); }

.widget_search .search-form { margin: 0; }
.widget_search .search-pill-wrapper { border-radius: var(--radius-md); padding: 0.25rem; }

.widget_calendar table { margin: 0; text-align: center; width: 100%; border-collapse: collapse; }
.widget_calendar th { background: var(--bg-alt); padding: 0.5rem; font-weight: 600; font-size: 0.875rem; }
.widget_calendar td { padding: 0.5rem; border: 1px solid var(--border-color); font-size: 0.875rem; }
.widget_calendar caption { font-weight: 700; margin-bottom: 1rem; color: var(--text-heading); font-size: 1rem; text-align: left; }
.widget_calendar tbody td a { font-weight: bold; color: #fff; background: var(--accent-color); display: block; border-radius: 50%; width: 24px; height: 24px; line-height: 24px; margin: 0 auto; text-decoration: none; }

.widget_tag_cloud .tagcloud { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.widget_tag_cloud a { display: inline-flex; align-items: center; padding: 0.25rem 0.75rem; background: var(--bg-alt); border: 1px solid var(--border-color); border-radius: var(--radius-full); font-size: 0.8125rem !important; font-weight: 500; color: var(--text-main); text-decoration: none; transition: background-color 0.2s, color 0.2s, border-color 0.2s; }
.widget_tag_cloud a:hover { background-color: var(--accent-color); color: #fff; border-color: var(--accent-color); }

/* Customizer CTA Widget */
.sidebar-cta { background: var(--primary-color); color: #fff; padding: 2rem; border-radius: var(--radius-xl); text-align: center; border: none; box-shadow: var(--shadow-md); }
.sidebar-cta h3 { color: #fff; margin-bottom: 1rem; font-size: 1.5rem; border: none; padding: 0; }
.sidebar-cta p { font-size: 1rem; opacity: 0.9; margin-bottom: 1.5rem; color: #E2E8F0; }

/* ==========================================================================
   12. Footer Architecture (Responsive Built)
   ========================================================================== */
.site-footer { background-color: var(--primary-color); color: rgba(255, 255, 255, 0.7); padding-top: 4rem; padding-bottom: 2rem; margin-top: 4rem; }
.site-footer .widget { background: transparent; border: none; padding: 0; box-shadow: none; margin-bottom: 2rem; }
.site-footer .widget-title { color: #fff; border-color: rgba(255, 255, 255, 0.1); font-size: 1.125rem; letter-spacing: 0.05em; margin-bottom: 1.5rem; padding-bottom: 0.5rem; }
.site-footer .widget ul li { border-color: rgba(255, 255, 255, 0.1); padding: 0.5rem 0; }
.site-footer .widget ul li a { color: rgba(255, 255, 255, 0.7); font-size: 0.95rem; text-decoration: none; }
.site-footer .widget ul li a::before { color: rgba(255, 255, 255, 0.3); }
.site-footer .widget ul li a:hover { color: #fff; padding-left: 0.25rem; }

.site-footer-bottom {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    text-align: center;
}

@media (min-width: 768px) {
    .site-footer-bottom {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
    }
}

.site-info { font-size: 0.875rem; }
.site-info a { color: #fff; font-weight: 600; text-decoration: none; }
.site-info a:hover { text-decoration: underline; }

.footer-nav ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 1.5rem; justify-content: center; }
.footer-nav a { color: rgba(255, 255, 255, 0.7); font-size: 0.875rem; font-weight: 500; text-decoration: none; transition: color 0.2s; }
.footer-nav a:hover { color: #fff; }

/* ==========================================================================
   13. Archive & Loop Grid (Post Cards)
   ========================================================================== */
.page-header { margin-bottom: 3rem; text-align: center; }
.page-title { font-size: clamp(2rem, 4vw, 3rem); font-weight: 800; letter-spacing: -0.02em; color: var(--text-heading); margin-bottom: 0.5rem; }
.archive-description { font-size: 1.125rem; color: var(--text-muted); max-width: 600px; margin: 0 auto; }

.post-card { 
    background: var(--bg-surface); border: 1px solid var(--border-color); border-radius: var(--radius-xl); 
    overflow: hidden; display: flex; flex-direction: column; 
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease; 
}
.post-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--border-hover); }

.post-thumbnail { position: relative; overflow: hidden; aspect-ratio: 16/9; background: var(--bg-alt); }
.post-thumbnail img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.post-card:hover .post-thumbnail img { transform: scale(1.05); }

.post-card-content { padding: 1.5rem; flex-grow: 1; display: flex; flex-direction: column; }
.post-category { font-size: 0.75rem; text-transform: uppercase; font-weight: 700; color: var(--accent-color); margin-bottom: 0.5rem; display: inline-block; letter-spacing: 0.05em; }
.post-card .entry-title { font-size: 1.25rem; line-height: 1.4; margin-bottom: 0.75rem; }
.post-card .entry-title a { color: var(--text-heading); text-decoration: none; transition: color 0.2s; }
.post-card .entry-title a:hover { color: var(--accent-color); }
.post-card .entry-summary { font-size: 0.95rem; color: var(--text-muted); margin-bottom: 1.5rem; flex-grow: 1; line-height: 1.6; }

.post-card .entry-footer { border-top: 1px solid var(--border-color); padding-top: 1rem; font-size: 0.875rem; display: flex; align-items: center; justify-content: space-between; }
.post-card .posted-on { color: var(--text-muted); }
.read-more-link { display: inline-flex; align-items: center; color: var(--accent-color); font-weight: 600; font-size: 0.875rem; text-transform: uppercase; letter-spacing: 0.05em; text-decoration: none; }
.read-more-link:hover { color: var(--primary-color); }

/* Pagination */
.pagination-wrapper { margin-top: 4rem; text-align: center; }
.pagination-wrapper .nav-links { display: inline-flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; justify-content: center; }
.pagination-wrapper .page-numbers { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; height: 40px; padding: 0 0.5rem; border: 1px solid var(--border-color); border-radius: var(--radius-md); color: var(--text-main); font-weight: 600; text-decoration: none; transition: background-color 0.2s, color 0.2s, border-color 0.2s; background: var(--bg-surface); }
.pagination-wrapper .page-numbers.current, .pagination-wrapper .page-numbers:hover { background-color: var(--primary-color); color: #fff; border-color: var(--primary-color); }
.pagination-wrapper .dots { border: none; background: transparent; pointer-events: none; }

/* ==========================================================================
   14. Single Post & Page Specifics
   ========================================================================== */
.single-post-header { margin-bottom: 3rem; }
.single-post-meta { display: flex; align-items: center; gap: 1rem; font-size: 0.9rem; color: var(--text-muted); margin-bottom: 1.5rem; flex-wrap: wrap; }
.single-post-meta .author { font-weight: 600; color: var(--text-heading); }
.single-post-meta .separator { color: var(--border-color); }

.single-post-funnel { background: var(--primary-color); color: #fff; padding: 3rem 2rem; border-radius: var(--radius-xl); text-align: center; margin-top: 4rem; box-shadow: var(--shadow-lg); }
.single-post-funnel h2 { color: #fff; margin-bottom: 1rem; font-size: 1.75rem; border: none; padding: 0; }
.single-post-funnel p { font-size: 1.125rem; opacity: 0.9; margin-bottom: 2rem; max-width: 600px; margin-left: auto; margin-right: auto; color: #E2E8F0; }

.error-404 { text-align: center; max-width: 600px; margin: 0 auto; padding: 4rem 0; }
.error-404 .error-code { font-size: clamp(6rem, 15vw, 10rem); font-weight: 800; color: var(--primary-color); line-height: 1; letter-spacing: -0.05em; margin-bottom: 1rem; }
.error-404 .page-title { font-size: 2rem; margin-bottom: 1rem; }
.error-404 .page-content p { font-size: 1.125rem; color: var(--text-muted); margin-bottom: 2rem; }

/* ==========================================================================
   15. Helper Classes & State Formatting
   ========================================================================== */
.is-hidden { display: none !important; }
.is-visible { display: block !important; }
.is-flex { display: flex !important; }
.opacity-0 { opacity: 0; }
.opacity-100 { opacity: 1; }
.pointer-events-none { pointer-events: none; }
.pointer-events-auto { pointer-events: auto; }
.overflow-hidden { overflow: hidden; }

/* Focus outlines for custom interactions */
.focus-ring { transition: box-shadow 0.2s; }
.focus-ring:focus-visible { outline: none; box-shadow: var(--shadow-focus); border-radius: var(--radius-sm); }