/* ZeroBloat Templates CSS */

/* Box Sizing Reset */
*, ::before, ::after {
    box-sizing: border-box;
}

/* Base Styles */
:root {
    --primary-color: #c44c34;
    --text-color: #374151;
    --zb-section-pad-y: 40px;
    --zb-section-pad-y-compact: 24px;
    --bg-color: #ffffff;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --black: #000000;
    --white: #ffffff;
}

body {
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
    color: var(--text-color);
    background-color: var(--bg-color);
    margin: 0;
    line-height: 1.5;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    color: var(--gray-900);
    margin-top: 0;
    margin-bottom: 0.5em;
}

p {
    margin-top: 0;
    margin-bottom: 1rem;
}

a {
    color: inherit;
    text-decoration: inherit;
}

.font-sans { font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif; }
.font-serif { font-family: ui-serif, Georgia, Cambria, "Times New Roman", Times, serif; }

.text-xs { font-size: 0.75rem; line-height: 1rem; }
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.text-base { font-size: 1rem; line-height: 1.5rem; }
.text-lg { font-size: 1.125rem; line-height: 1.75rem; }
.text-xl { font-size: 1.25rem; line-height: 1.75rem; }
.text-2xl { font-size: 1.5rem; line-height: 2rem; }
.text-3xl { font-size: 1.875rem; line-height: 2.25rem; }
.text-4xl { font-size: 2.25rem; line-height: 2.5rem; }
.text-5xl { font-size: 3rem; line-height: 1; }

.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.font-extrabold { font-weight: 800; }

.leading-tight { line-height: 1.25; }
.leading-snug { line-height: 1.375; }
.leading-normal { line-height: 1.5; }

.uppercase { text-transform: uppercase; }
.capitalize { text-transform: capitalize; }
.tracking-wide { letter-spacing: 0.025em; }
.tracking-wider { letter-spacing: 0.05em; }

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

.line-clamp-2 {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
}

/* Lists */
ul, ol {
    list-style: none;
    margin: 0;
    padding: 0;
}
.list-disc { list-style: disc; margin-left: 1.5rem; }
.list-decimal { list-style: decimal; margin-left: 1.5rem; }
.list-none { list-style: none; }

/* Prose / Content Lists */
.prose ul { list-style: disc; margin-left: 1.5rem; margin-bottom: 1rem; }
.prose ol { list-style: decimal; margin-left: 1.5rem; margin-bottom: 1rem; }
.prose li { margin-bottom: 0.5rem; }

/* Colors */
.text-primary { color: var(--primary-color); }
.text-white { color: var(--white); }
.text-white\/90 { color: rgba(255, 255, 255, 0.9); }
.text-black { color: var(--black); }
.bg-black\/20 { background-color: rgba(0, 0, 0, 0.2); }
.hover\:bg-black\/30:hover { background-color: rgba(0, 0, 0, 0.3); }
.text-gray-400 { color: var(--gray-400); }
.text-gray-500 { color: var(--gray-500); }
.text-gray-600 { color: var(--gray-600); }
.text-gray-700 { color: var(--gray-700); }
.text-gray-800 { color: var(--gray-800); }
.text-gray-900 { color: var(--gray-900); }
.text-red-500 { color: #ef4444; }

.bg-primary { background-color: var(--primary-color); }
.bg-white { background-color: var(--white); }
.bg-black { background-color: var(--black); }
.bg-gray-50 { background-color: var(--gray-50); }
.bg-gray-100 { background-color: var(--gray-100); }
.bg-gray-200 { background-color: var(--gray-200); }
.bg-gray-800 { background-color: var(--gray-800); }
.bg-blue-600 { background-color: #2563eb; }

.hover\:text-primary:hover { color: var(--primary-color); }
.hover\:text-gray-900:hover { color: var(--gray-900); }
.hover\:text-white:hover { color: var(--white); }
.hover\:bg-gray-50:hover { background-color: var(--gray-50); }
.hover\:bg-gray-100:hover { background-color: var(--gray-100); }
.hover\:bg-primary:hover { background-color: var(--primary-color); }
.hover\:bg-opacity-90:hover { opacity: 0.9; }

/* Focus & Form */
.focus\:outline-none:focus { outline: 2px solid transparent; outline-offset: 2px; }
.focus\:ring-1:focus { box-shadow: 0 0 0 1px var(--primary-color); }

.group:hover .group-hover\:text-primary { color: var(--primary-color); }
.group:hover .group-hover\:scale-105 { transform: scale(1.05); }
.group:hover .group-hover\:block { display: block; }
.group:hover .group-hover\:text-\[\#c44c34\] { color: #c44c34; }
.group-hover\:border-\[\#c44c34\]:hover { border-color: #c44c34; }

/* Layout */
.container {
    width: 100%;
    margin-right: auto;
    margin-left: auto;
    padding-right: 1rem;
    padding-left: 1rem;
}
@media (min-width: 640px) { .container { max-width: 640px; } }
@media (min-width: 768px) { .container { max-width: 768px; } }
@media (min-width: 1024px) { .container { max-width: 1024px; } }
@media (min-width: 1280px) { .container { max-width: 1280px; } }

.block { display: block; }
.inline-block { display: inline-block; }
.flex { display: flex; }
.inline-flex { display: inline-flex; }
.hidden { display: none; }

.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.flex-1 { flex: 1 1 0%; }
.flex-shrink-0 { flex-shrink: 0; }
.flex-grow { flex-grow: 1; }

.grid { display: grid; }
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }
.gap-12 { gap: 3rem; }

@media (min-width: 640px) {
    .sm\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .sm\:flex { display: flex; }
    .sm\:hidden { display: none; }
    .sm\:block { display: block; }
}
@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 { display: flex; }
    .md\:hidden { display: none; }
    .md\:block { display: block; }
    .md\:w-1\/3 { width: 33.333333%; }
    .md\:w-1\/2 { width: 50%; }
}
@media (min-width: 1024px) {
    .lg\:grid { display: grid; }
    .lg\:flex { display: flex; }
    .lg\:hidden { display: none; }
    .lg\:block { display: block; }
    .lg\:inline-block { display: inline-block; }
    
    .lg\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .lg\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .lg\:grid-cols-12 { grid-template-columns: repeat(12, minmax(0, 1fr)); }
    .lg\:col-span-3 { grid-column: span 3 / span 3; }
    .lg\:col-span-4 { grid-column: span 4 / span 4; }
    .lg\:col-span-6 { grid-column: span 6 / span 6; }
    .lg\:col-span-8 { grid-column: span 8 / span 8; }
    .lg\:col-span-9 { grid-column: span 9 / span 9; }
    .lg\:gap-12 { gap: 3rem; }
    .lg\:sticky { position: sticky; position: -webkit-sticky; }
    .lg\:top-24 { top: 6rem; }
    .lg\:mt-0 { margin-top: 0; }
}

/* Spacing */
.m-0 { margin: 0; }
.mt-0\.5 { margin-top: 0.125rem; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }
.mt-12 { margin-top: 3rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.my-6 { margin-top: 1.5rem; margin-bottom: 1.5rem; }
.my-8 { margin-top: 2rem; margin-bottom: 2rem; }
.my-12 { margin-top: 3rem; margin-bottom: 3rem; }
.mr-1 { margin-right: 0.25rem; }
.mr-2 { margin-right: 0.5rem; }
.ml-1 { margin-left: 0.25rem; }
.ml-2 { margin-left: 0.5rem; }
.ml-3 { margin-left: 0.75rem; }
.ml-4 { margin-left: 1rem; }
.mx-auto { margin-left: auto; margin-right: auto; }

.p-2 { padding: 0.5rem; }
.p-3 { padding: 0.75rem; }
.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }
.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.py-0\.5 { padding-top: 0.125rem; padding-bottom: 0.125rem; }
.py-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; }
.py-1\.5 { padding-top: 0.375rem; padding-bottom: 0.375rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.py-6 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.py-8 { padding-top: 2rem; padding-bottom: 2rem; }
.py-16 { padding-top: 4rem; padding-bottom: 4rem; }
.pb-2 { padding-bottom: 0.5rem; }
.pt-2 { padding-top: 0.5rem; }
.pt-3 { padding-top: 0.75rem; }
.pt-12 { padding-top: 3rem; }
.pl-2 { padding-left: 0.5rem; }

/* Sizing */
.w-full { width: 100%; }
.h-full { height: 100%; }
.w-6 { width: 1.5rem; }
.h-6 { height: 1.5rem; }
.w-8 { width: 2rem; }
.h-8 { height: 2rem; }
.w-9 { width: 2.25rem; }
.h-9 { height: 2.25rem; }
.w-12 { width: 3rem; }
.h-12 { height: 3rem; }
.w-24 { width: 6rem; }
.w-auto { width: auto; }
.h-20 { height: 5rem; }
.max-w-md { max-width: 28rem; }
.max-w-xl { max-width: 36rem; }
.max-w-4xl { max-width: 56rem; }
.max-w-7xl { max-width: 80rem; }

/* Borders */
.border { border-width: 1px; border-style: solid; border-color: var(--gray-200); }
.border-b { border-bottom-width: 1px; border-bottom-style: solid; border-color: var(--gray-200); }
.border-b-2 { border-bottom-width: 2px; }
.border-t { border-top-width: 1px; border-top-style: solid; border-color: var(--gray-200); }
.border-l { border-left-width: 1px; border-left-style: solid; border-color: var(--gray-200); }
.border-gray-100 { border-color: var(--gray-100); }
.border-gray-200 { border-color: var(--gray-200); }
.border-gray-300 { border-color: var(--gray-300); }
.border-gray-800 { border-color: var(--gray-800); }

/* Mobile Responsive Fixes */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Fix Single Post Image on Mobile */
.single-hero-image {
    max-height: 300px;
    width: 100%;
    object-fit: cover;
}
@media (min-width: 768px) {
    .single-hero-image {
        max-height: none;
    }
}

/* Force Grid to Stack on Mobile */
@media (max-width: 640px) {
    .grid:not(.grid-cols-2):not(.grid-cols-3) {
        grid-template-columns: 1fr !important;
    }
    
    .lg\:col-span-6,
    .lg\:col-span-3, 
    .lg\:col-span-4,
    .lg\:col-span-8,
    .lg\:col-span-9,
    .lg\:col-span-12 {
        grid-column: span 1 !important;
    }
    
    /* Fix text sizes */
    .text-3xl { font-size: 1.5rem; line-height: 1.2; }
    .text-2xl { font-size: 1.25rem; line-height: 1.3; }
    .text-xl { font-size: 1.125rem; }
    
    /* Fix padding */
    .px-4 { padding-left: 0.75rem; padding-right: 0.75rem; }
    
    /* Fix aspect ratios */
    .aspect-video {
        aspect-ratio: 16 / 9;
        max-height: 250px;
    }
}
.border-primary { border-color: var(--primary-color); }

.rounded { border-radius: 0.25rem; }
.rounded-sm { border-radius: 0.125rem; }
.rounded-md { border-radius: 0.375rem; }
.rounded-lg { border-radius: 0.5rem; }
.rounded-xl { border-radius: 0.75rem; }
.rounded-full { border-radius: 9999px; }
.rounded-l-md { border-top-left-radius: 0.375rem; border-bottom-left-radius: 0.375rem; }
.rounded-r-md { border-top-right-radius: 0.375rem; border-bottom-right-radius: 0.375rem; }

.divide-y > :not([hidden]) ~ :not([hidden]) {
    border-top-width: 1px;
    border-top-style: solid;
    border-color: var(--gray-200);
}

/* Effects */
.shadow-sm { box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05); }
.shadow-md { box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06); }
.shadow-xl { box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04); }
.opacity-90 { opacity: 0.9; }

/* Transforms & Transitions */
.transform { transform: translateX(0) translateY(0) rotate(0) skewX(0) skewY(0) scaleX(1) scaleY(1); }
.transition-colors { transition-property: background-color, border-color, color, fill, stroke; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms; }
.transition-opacity { transition-property: opacity; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms; }
.transition-transform { transition-property: transform; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms; }
.duration-200 { transition-duration: 200ms; }
.duration-300 { transition-duration: 300ms; }
.duration-500 { transition-duration: 500ms; }

/* Positioning */
.relative { position: relative; }
.absolute { position: absolute; }
.fixed { position: fixed; }
.sticky { position: sticky; position: -webkit-sticky; }
.top-0 { top: 0; }
.top-24 { top: 6rem; }
.bottom-0 { bottom: 0; }
.left-0 { left: 0; }
.right-0 { right: 0; }
.top-full { top: 100%; }
.left-1\/2 { left: 50%; }
.z-10 { z-index: 10; }
.z-20 { z-index: 20; }
.z-30 { z-index: 30; }
.z-40 { z-index: 40; }
.z-50 { z-index: 50; }

/* JIT Compatibility Classes */
.text-\[\#c44c34\] { color: #c44c34; }
.bg-\[\#c44c34\] { background-color: #c44c34; }
.border-\[\#c44c34\] { border-color: #c44c34; }
.hover\:text-\[\#c44c34\]:hover { color: #c44c34; }
.hover\:border-\[\#c44c34\]:hover { border-color: #c44c34; }
.group:hover .group-hover\:text-\[\#c44c34\] { color: #c44c34; }
.focus\:ring-\[\#c44c34\]:focus { box-shadow: 0 0 0 2px #c44c34; }
.focus\:border-\[\#c44c34\]:focus { border-color: #c44c34; }

/* Button Improvements */
.btn-primary, button[type="submit"], .button, input[type="submit"] {
    background-color: var(--primary-color);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 9999px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    text-transform: uppercase;
    font-size: 0.875rem;
    letter-spacing: 0.05em;
}
.btn-primary:hover, button[type="submit"]:hover, .button:hover, input[type="submit"]:hover {
    opacity: 1;
    background-color: #a33c28; /* Darker shade of primary */
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* WordPress Pagination */
.page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    border: 1px solid var(--gray-200);
    background-color: white;
    color: var(--gray-700);
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s;
    text-decoration: none;
}
.page-numbers:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}
.page-numbers.current {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}
.page-numbers.dots {
    border: none;
    background: transparent;
}

/* Misc */
.overflow-hidden { overflow: hidden; }
.overflow-auto { overflow: auto; }
.cursor-pointer { cursor: pointer; }
.object-cover { object-fit: cover; }

/* Aspect Ratio */
.aspect-video { aspect-ratio: 16 / 9; }
.aspect-\[4\/3\] { aspect-ratio: 4 / 3; }

/* Gradients */
.bg-gradient-to-t { background-image: linear-gradient(to top, var(--tw-gradient-stops)); }
.from-black\/80 { --tw-gradient-from: rgba(0, 0, 0, 0.8); --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to); }
.via-black\/50 { --tw-gradient-to: rgba(0, 0, 0, 0); --tw-gradient-stops: var(--tw-gradient-from), rgba(0, 0, 0, 0.5), var(--tw-gradient-to); }
.to-transparent { --tw-gradient-to: transparent; }

/* Custom Decorations */
.decoration-primary { text-decoration-color: var(--primary-color); }
.decoration-2 { text-decoration-thickness: 2px; }
.underline-offset-4 { text-underline-offset: 4px; }
.decoration-0 { text-decoration-thickness: 0px; }

/* Space Utilities */
.space-y-2 > :not([hidden]) ~ :not([hidden]) { margin-top: 0.5rem; }
.space-y-3 > :not([hidden]) ~ :not([hidden]) { margin-top: 0.75rem; }
.space-y-4 > :not([hidden]) ~ :not([hidden]) { margin-top: 1rem; }
.space-y-6 > :not([hidden]) ~ :not([hidden]) { margin-top: 1.5rem; }
.space-y-8 > :not([hidden]) ~ :not([hidden]) { margin-top: 2rem; }
.space-y-12 > :not([hidden]) ~ :not([hidden]) { margin-top: 3rem; }
.space-x-2 > :not([hidden]) ~ :not([hidden]) { margin-left: 0.5rem; }
.space-x-3 > :not([hidden]) ~ :not([hidden]) { margin-left: 0.75rem; }
.space-x-4 > :not([hidden]) ~ :not([hidden]) { margin-left: 1rem; }
.space-x-6 > :not([hidden]) ~ :not([hidden]) { margin-left: 1.5rem; }
.space-x-8 > :not([hidden]) ~ :not([hidden]) { margin-left: 2rem; }

/* Custom Breadcrumbs Overrides (preserving existing) */
.tp-breadcrumb-list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #6b7280;
    list-style: none;
    padding: 0;
    margin: 0;
}

/* Footer Color Contrast Fixes */
footer a {
    color: #111827;
}

footer a:hover {
    color: #c44c34;
}

footer p {
    color: #111827;
}

/* ============================================================
   UNIVERSAL DESIGN SYSTEM
   Every component and section uses these classes + CSS vars.
   Vars come from dna.json → renderer → :root{} injection.
   ============================================================ */

/* ── Container ────────────────────────────────────────────── */
.zb-container {
    max-width: var(--zb-layout-container-max, 1360px);
    margin-inline: auto;
    padding-inline: var(--zb-layout-container-pad, clamp(16px, 3vw, 40px));
    width: 100%;
    box-sizing: border-box;
}

/* ── Section wrapper ──────────────────────────────────────── */
.zb-section {
    padding-block: var(--zb-section-pad-y, 56px);
    border-top: 1px solid var(--zb-section-sep-color, #e2e8f0);
    background: var(--zb-color-surface, #fff);
}

.zb-section:first-of-type {
    border-top: none;
}

.zb-section--compact {
    padding-block: var(--zb-section-pad-y-compact, 36px);
}

.zb-section--flush {
    padding-block: 0;
    border-top: none;
}

.zb-section--alt {
    background: var(--zb-section-alt-bg, #f8fafc);
}

.zb-section--dark {
    background: var(--zb-color-dark-bg, #0f172a);
    border-top-color: transparent;
}

.zb-section--dark .zb-section-title,
.zb-section--dark .zb-card-title,
.zb-section--dark .zb-excerpt {
    color: #fff;
}

/* ── Section header (title row + See All) ─────────────────── */
.zb-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: var(--zb-section-header-pb, 20px);
    padding-bottom: var(--zb-section-header-pb, 20px);
    border-bottom: 1px solid var(--zb-section-sep-color, #e2e8f0);
}

.zb-section-title {
    font-family: var(--zb-font-heading, Georgia, serif);
    font-size: var(--zb-section-title-size, 22px);
    font-weight: var(--zb-section-title-weight, 800);
    letter-spacing: var(--zb-font-ls-heading, -0.02em);
    color: var(--zb-color-text, #0f172a);
    line-height: 1.1;
    margin: 0;
    padding-left: calc(var(--zb-section-accent-width, 4px) + 10px);
    border-left: var(--zb-section-accent-width, 4px) solid var(--zb-section-accent-color, #c44c34);
}

.zb-section--dark .zb-section-title {
    color: #fff;
    border-left-color: var(--zb-section-accent-color, #c44c34);
}

.zb-see-all {
    font-family: var(--zb-font-body, system-ui, sans-serif);
    font-size: 12px;
    font-weight: 700;
    color: var(--zb-color-primary, #c44c34);
    text-decoration: none;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    transition: opacity var(--zb-motion-normal, 200ms);
    flex-shrink: 0;
}

.zb-see-all:hover {
    opacity: 0.75;
    color: var(--zb-color-primary, #c44c34);
}

/* ── Grid ─────────────────────────────────────────────────── */
.zb-grid {
    display: grid;
    grid-template-columns: repeat(var(--zb-grid-cols, 3), 1fr);
    gap: var(--zb-grid-gap, 24px);
    row-gap: var(--zb-grid-row-gap, 28px);
}

@media (max-width: 1024px) {
    .zb-grid {
        grid-template-columns: repeat(var(--zb-grid-cols-tablet, 2), 1fr);
    }
}

@media (max-width: 640px) {
    .zb-grid {
        grid-template-columns: repeat(var(--zb-grid-cols-mobile, 1), 1fr);
        gap: 16px;
        row-gap: 20px;
    }
}

.zb-grid--2 { --zb-grid-cols: 2; --zb-grid-cols-tablet: 2; }
.zb-grid--4 { --zb-grid-cols: 4; --zb-grid-cols-tablet: 2; }
.zb-grid--compact { gap: 12px; row-gap: 12px; }

/* ── Card ─────────────────────────────────────────────────── */
.zb-card {
    display: flex;
    flex-direction: column;
    border-radius: var(--zb-card-radius, 10px);
    background: var(--zb-color-surface, #fff);
    overflow: hidden;
    transition:
        transform var(--zb-motion-normal, 200ms) var(--zb-motion-ease, ease),
        box-shadow var(--zb-motion-normal, 200ms) var(--zb-motion-ease, ease);
    box-shadow: var(--zb-card-shadow, 0 1px 4px rgba(0,0,0,.07));
}

.zb-card:hover {
    transform: translateY(var(--zb-card-hover-lift, -4px));
    box-shadow: var(--zb-card-shadow-hover, 0 8px 28px rgba(0,0,0,.13));
}

/* ── Card image ───────────────────────────────────────────── */
.zb-card-img {
    overflow: hidden;
    border-radius: var(--zb-card-img-radius, 6px) var(--zb-card-img-radius, 6px) 0 0;
    flex-shrink: 0;
}

.zb-card-img a {
    display: block;
    overflow: hidden;
}

.zb-card-img img {
    width: 100%;
    aspect-ratio: 3 / 2;
    object-fit: cover;
    display: block;
    transition: transform var(--zb-motion-slow, 300ms) var(--zb-motion-ease, ease);
}

.zb-card:hover .zb-card-img img {
    transform: scale(1.04);
}

/* Image ratio variants */
.zb-card-img--hero img    { aspect-ratio: 16 / 9; }
.zb-card-img--featured img { aspect-ratio: 16 / 9; }
.zb-card-img--primary img  { aspect-ratio: 3 / 2; }
.zb-card-img--secondary img { aspect-ratio: 4 / 3; }
.zb-card-img--square img  { aspect-ratio: 1 / 1; }
.zb-card-img--wide img    { aspect-ratio: 21 / 9; }
.zb-card-img--thumb img   { aspect-ratio: 1 / 1; width: 80px; height: 80px; flex-shrink: 0; }

/* ── Card body ────────────────────────────────────────────── */
.zb-card-body {
    padding: var(--zb-card-pad, 16px);
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

/* ── Category pill ────────────────────────────────────────── */
.zb-pill {
    display: inline-block;
    font-family: var(--zb-font-body, system-ui, sans-serif);
    font-size: var(--zb-meta-pill-size, 10px);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: #fff;
    background: var(--zb-color-primary, #c44c34);
    padding: 3px 9px;
    border-radius: var(--zb-radius-pill, 999px);
    text-decoration: none;
    line-height: 1.5;
    white-space: nowrap;
    transition: opacity var(--zb-motion-fast, 100ms);
}

.zb-pill:hover {
    opacity: 0.85;
    color: #fff;
}

/* ── Card titles ──────────────────────────────────────────── */
.zb-card-title {
    font-family: var(--zb-font-heading, Georgia, serif);
    font-weight: 700;
    line-height: var(--zb-font-lh-heading, 1.2);
    color: var(--zb-color-text, #0f172a);
    margin: 0;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
    letter-spacing: var(--zb-font-ls-heading, -0.02em);
    transition: color var(--zb-motion-fast, 100ms);
}

.zb-card-title a {
    color: inherit;
    text-decoration: none;
}

.zb-card-title a:hover {
    color: var(--zb-color-primary, #c44c34);
}

.zb-card-title--featured {
    font-size: var(--zb-card-title-featured, clamp(22px, 2.4vw, 30px));
    -webkit-line-clamp: 3;
    font-weight: 800;
}

.zb-card-title--primary {
    font-size: var(--zb-card-title-primary, 18px);
    -webkit-line-clamp: var(--zb-card-title-clamp, 2);
}

.zb-card-title--secondary {
    font-size: var(--zb-card-title-secondary, 15px);
    -webkit-line-clamp: var(--zb-card-title-clamp, 2);
}

.zb-card-title--small {
    font-size: var(--zb-card-title-small, 13px);
    -webkit-line-clamp: 2;
    font-weight: 600;
}

/* ── Excerpt ──────────────────────────────────────────────── */
.zb-excerpt {
    font-family: var(--zb-font-body, system-ui, sans-serif);
    font-size: var(--zb-card-excerpt-size, 14px);
    color: var(--zb-color-text-muted, #64748b);
    line-height: var(--zb-font-lh-body, 1.65);
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: var(--zb-card-excerpt-clamp, 3);
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ── Meta row (author / date / read-time) ─────────────────── */
.zb-meta {
    font-family: var(--zb-font-body, system-ui, sans-serif);
    font-size: var(--zb-meta-size, 12px);
    color: var(--zb-color-text-muted, #64748b);
    display: flex;
    align-items: center;
    gap: var(--zb-meta-gap, 8px);
    flex-wrap: wrap;
    margin: 0;
}

.zb-meta a {
    color: inherit;
    text-decoration: none;
    font-weight: var(--zb-meta-author-weight, 600);
}

.zb-meta a:hover {
    color: var(--zb-color-primary, #c44c34);
}

.zb-meta-dot {
    opacity: 0.35;
}

/* ── Horizontal card (thumbnail left, text right) ─────────── */
.zb-card--horizontal {
    flex-direction: row;
    align-items: flex-start;
    gap: 12px;
    border-radius: var(--zb-card-radius, 10px);
    box-shadow: none;
}

.zb-card--horizontal:hover {
    transform: none;
    box-shadow: none;
}

.zb-card--horizontal .zb-card-img {
    width: 90px;
    flex-shrink: 0;
    border-radius: var(--zb-card-img-radius, 6px);
}

.zb-card--horizontal .zb-card-img img {
    width: 90px;
    height: 70px;
    aspect-ratio: unset;
    object-fit: cover;
    border-radius: var(--zb-card-img-radius, 6px);
}

.zb-card--horizontal .zb-card-body {
    padding: 0;
    gap: 4px;
}

/* ── Numbered list card ───────────────────────────────────── */
.zb-card--numbered {
    flex-direction: row;
    align-items: flex-start;
    gap: 12px;
    box-shadow: none;
    border-radius: 0;
    border-bottom: 1px solid var(--zb-section-sep-color, #e2e8f0);
    padding-bottom: 12px;
}

.zb-card--numbered:hover { transform: none; box-shadow: none; }
.zb-card--numbered:last-child { border-bottom: none; padding-bottom: 0; }

.zb-card-number {
    font-family: var(--zb-font-heading, Georgia, serif);
    font-size: 28px;
    font-weight: 800;
    color: var(--zb-section-sep-color, #e2e8f0);
    line-height: 1;
    flex-shrink: 0;
    min-width: 32px;
}

/* ── Hero overlay card (text over image) ──────────────────── */
.zb-card--overlay {
    position: relative;
    border-radius: var(--zb-card-radius, 10px);
    overflow: hidden;
}

.zb-card--overlay .zb-card-img {
    position: absolute;
    inset: 0;
    border-radius: 0;
}

.zb-card--overlay .zb-card-img img {
    width: 100%;
    height: 100%;
    aspect-ratio: unset;
    object-fit: cover;
}

.zb-card--overlay::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,.75) 0%, rgba(0,0,0,.2) 50%, transparent 100%);
    pointer-events: none;
}

.zb-card--overlay .zb-card-body {
    position: relative;
    z-index: 2;
    margin-top: auto;
    padding: var(--zb-card-pad, 16px);
    background: none;
}

.zb-card--overlay .zb-card-title,
.zb-card--overlay .zb-meta {
    color: #fff;
}

.zb-card--overlay .zb-card-title a:hover { color: rgba(255,255,255,.8); }

/* ── Responsive section title ─────────────────────────────── */
@media (max-width: 640px) {
    .zb-section-title { font-size: calc(var(--zb-section-title-size, 22px) * 0.82); }
    .zb-card-title--featured { font-size: clamp(18px, 5vw, 24px); }
    .zb-card-body { padding: 12px; }
    .zb-section { padding-block: calc(var(--zb-section-pad-y, 56px) * 0.65); }
}

@media (max-width: 400px) {
    .zb-card--horizontal .zb-card-img { width: 72px; }
    .zb-card--horizontal .zb-card-img img { width: 72px; height: 56px; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   AUTO-ADDED BY fix-components.py — Shared utility classes
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Section header (grid/list section headings) ─── */
.zb-section__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--zb-color-primary, #c44c34);
}
.zb-section__header-left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}
.zb-section__title {
    font-size: var(--zb-section-title-size, 1.125rem);
    font-weight: 700;
    color: var(--zb-color-text, #1e293b);
    margin: 0;
    font-family: var(--zb-font-heading, Georgia, serif);
    letter-spacing: -0.01em;
    line-height: 1.3;
}
.zb-section__badge {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--zb-color-primary, #c44c34);
    background: color-mix(in srgb, var(--zb-color-primary, #c44c34) 10%, white);
    padding: 2px 8px;
    border-radius: 20px;
}
.zb-section__view-all {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--zb-color-primary, #c44c34);
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
    transition: opacity 0.2s ease;
}
.zb-section__view-all:hover { opacity: 0.75; }

/* Dark section overrides */
.zb-section--dark .zb-section__header {
    border-bottom-color: var(--zb-color-dark-border, rgba(255,255,255,0.12));
}
.zb-section--dark .zb-section__title {
    color: var(--zb-color-dark-text, #f8fafc);
}

/* ── Aspect ratio containers ─── */
.zb-aspect {
    position: relative;
    overflow: hidden;
    display: block;
}
.zb-aspect__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.zb-aspect--1-1   { aspect-ratio: 1 / 1; }
.zb-aspect--4-3   { aspect-ratio: 4 / 3; }
.zb-aspect--16-9  { aspect-ratio: 16 / 9; }
.zb-aspect-16-9   { aspect-ratio: 16 / 9; }

/* ── Empty state — no posts / admin hint ─── */
.zb-empty-state {
    padding: 48px 24px;
    text-align: center;
    color: var(--zb-color-text-muted, #64748b);
    background: var(--zb-section-alt-bg, #f8fafc);
    border: 1px dashed var(--zb-color-border, #e2e8f0);
    border-radius: var(--zb-radius-md, 8px);
    font-size: 0.9rem;
}
.zb-empty-state--admin {
    border-color: #fbbf24;
    background: #fffbeb;
    color: #92400e;
    font-size: 0.85rem;
    font-weight: 600;
}

/* ── Shared card parts — card-standard, card-minimal, card-numbered etc. ─── */
.zb-card__badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--zb-color-primary, #c44c34);
    text-decoration: none;
    margin-bottom: 6px;
    transition: opacity 0.15s ease;
}
.zb-card__badge:hover { opacity: 0.75; }
.zb-card__title {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.4;
    color: var(--zb-color-text, #1e293b);
    margin: 0 0 8px;
    font-family: var(--zb-font-heading, Georgia, serif);
}
.zb-card__title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}
.zb-card__title a:hover { color: var(--zb-color-primary, #c44c34); }
.zb-card__excerpt {
    font-size: 0.875rem;
    line-height: 1.6;
    color: var(--zb-color-text-muted, #64748b);
    margin: 0 0 12px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.zb-card__meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.75rem;
    color: var(--zb-color-text-muted, #64748b);
    margin-top: auto;
    flex-wrap: wrap;
}
.zb-card__author {
    font-weight: 600;
    color: var(--zb-color-text, #1e293b);
}

/* Dark section card overrides */
.zb-section--dark .zb-card__title { color: var(--zb-color-dark-text, #f8fafc); }
.zb-section--dark .zb-card__excerpt,
.zb-section--dark .zb-card__meta   { color: var(--zb-color-dark-text-muted, #94a3b8); }

/* ── Article prose — wp_the_content() output styling ─── */
.prose {
    max-width: 72ch;
    color: var(--zb-color-text, #1e293b);
    line-height: 1.75;
    font-size: 1rem;
}
.prose > * + * { margin-top: 1.25em; }
.prose h1,.prose h2,.prose h3,.prose h4,.prose h5,.prose h6 {
    font-family: var(--zb-font-heading, Georgia, serif);
    font-weight: 700;
    color: var(--zb-color-text, #1e293b);
    line-height: 1.3;
    margin-top: 1.75em;
    margin-bottom: 0.5em;
}
.prose h2 { font-size: 1.5rem; }
.prose h3 { font-size: 1.25rem; }
.prose h4 { font-size: 1.1rem; }
.prose a  { color: var(--zb-color-primary, #c44c34); }
.prose a:hover { text-decoration: underline; }
.prose ul,.prose ol { padding-left: 1.5em; }
.prose li { margin-bottom: 0.4em; }
.prose blockquote {
    border-left: 4px solid var(--zb-color-primary, #c44c34);
    padding: 0.5em 1.25em;
    margin: 1.5em 0;
    color: var(--zb-color-text-muted, #64748b);
    font-style: italic;
}
.prose img  { max-width: 100%; height: auto; border-radius: var(--zb-radius-md, 8px); display: block; }
.prose code { background: #f1f5f9; padding: 0.15em 0.4em; border-radius: 4px; font-size: 0.88em; }
.prose pre  { background: #1e293b; color: #f1f5f9; padding: 1.25em; border-radius: var(--zb-radius-md, 8px); overflow-x: auto; }
.prose pre code { background: none; padding: 0; font-size: 0.9em; }
.prose table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.prose th { font-weight: 700; text-align: left; padding: 8px 12px; border-bottom: 2px solid var(--zb-color-border, #e2e8f0); }
.prose td { padding: 8px 12px; border-bottom: 1px solid var(--zb-color-border, #e2e8f0); }
.prose-gray   { color: #4b5563; }
.prose-slate  { color: #475569; }
.prose-lg     { font-size: 1.125rem; line-height: 1.8; }
.max-w-none   { max-width: none !important; }
.not-prose    { /* reset prose */ }
.entry-content { line-height: 1.75; }
.page-links { display: flex; gap: 8px; margin-top: 24px; }

/* ── Accessibility ─── */
.screen-reader-text {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0,0,0,0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* ── Tailwind utility gaps ─── */
.break-inside-avoid { break-inside: avoid; -webkit-column-break-inside: avoid; }
.italic            { font-style: italic; }
.select-none       { user-select: none; -webkit-user-select: none; }
.whitespace-nowrap { white-space: nowrap; }
.divide-gray-100 > * + * { border-top: 1px solid #f3f4f6; }
.left-2 { left: 8px; }
.top-2  { top: 8px; }
.inset-0 { inset: 0; }
.from-black\/80, .via-black\/80, .via-black\/50, .via-black\/30,
.from-black\/60 { /* gradient stops handled inline */ }


/* ============================================================
   LAYOUT SYSTEM - Added by zb-final-fix.php
   Components have NO outer spacing. Layout controls spacing.
   ============================================================ */
.zb-layout {
    max-width: var(--zb-layout-container-max, 1360px);
    margin: 0 auto;
    padding: 0 var(--zb-layout-container-pad, 24px);
    width: 100%;
    box-sizing: border-box;
}

.zb-layout__block {
    margin-bottom: var(--zb-section-pad-y, 56px);
}

.zb-layout__block:last-child {
    margin-bottom: 0;
}

/* Prevent theme styles from constraining or adding margin to section ROOT elements.
   Only targets root elements — NOT child elements like .zb-section__header or inner grids.
   [class*=...] is intentionally NOT used here: it matches child utility classes
   (e.g. .zb-section__header, .zb-fb-grid) and zeroes their margins incorrectly. */
.zb-section:not(.zb-layout) {
    max-width: none !important;
    margin: 0 !important;
}

.zb-layout { max-width: 1360px; margin: 0 auto; padding: 0 24px; }
.zb-layout__block { margin-bottom: 56px; }
.zb-layout__block:last-child { margin-bottom: 0; }
