:root {
  --primary-color: #ff0000;
  --secondary-color: ;
  --heading-font: 'Inter', sans-serif;
  --body-font: 'Inter', sans-serif;
  --button-bg: #000000;
  --button-text: #ffffff;
}

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

:root {
    --max-width: 1140px;
    --radius: 0.5rem;
    --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
    --shadow-lg: 0 10px 30px rgba(0,0,0,0.08);
}

/* Typography */
body { font-family: var(--body-font); color: var(--secondary-color); line-height: 1.7; font-size: clamp(1rem, 0.9rem + 0.3vw, 1.075rem); -webkit-font-smoothing: antialiased; }
h1 { font-family: var(--heading-font); color: var(--primary-color); font-size: clamp(2rem, 1.4rem + 2vw, 3.25rem); line-height: 1.15; font-weight: 700; }
h2 { font-family: var(--heading-font); color: var(--primary-color); font-size: clamp(1.5rem, 1.1rem + 1.2vw, 2.25rem); margin-bottom: 1rem; font-weight: 600; }
h3 { font-family: var(--heading-font); color: var(--primary-color); font-size: clamp(1.25rem, 1rem + 0.7vw, 1.5rem); margin-bottom: 0.75rem; font-weight: 600; }
h4 { font-family: var(--heading-font); color: var(--primary-color); font-size: 1.125rem; margin-bottom: 0.5rem; font-weight: 600; }
p { margin-bottom: 1rem; }
a { color: var(--primary-color); text-decoration: none; transition: opacity 0.15s; }
a:hover { opacity: 0.8; }
img { max-width: 100%; height: auto; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 100; background: rgba(255,255,255,0.95); backdrop-filter: blur(8px); border-bottom: 1px solid #e5e7eb; }
.header-inner { max-width: var(--max-width); margin: 0 auto; display: flex; align-items: center; justify-content: space-between; padding: 0.75rem 1.5rem; }
.logo { max-height: 40px; width: auto; }
.logo-text { font-family: var(--heading-font); font-size: 1.25rem; font-weight: 700; color: var(--primary-color); }
.site-nav { display: flex; gap: 0.25rem; }
.site-nav a { padding: 0.5rem 0.875rem; border-radius: var(--radius); color: var(--secondary-color); font-weight: 500; font-size: 0.95rem; }
.site-nav a:hover, .site-nav a.active { background: var(--primary-color); color: #fff; opacity: 1; }

/* Burger */
.nav-toggle { display: none; }
.nav-burger { display: none; cursor: pointer; flex-direction: column; gap: 4px; padding: 4px; }
.nav-burger span { width: 24px; height: 3px; background: var(--secondary-color); border-radius: 2px; transition: 0.2s; }

/* Main */
.site-main { max-width: var(--max-width); margin: 0 auto; padding: 2.5rem 1.5rem; min-height: 50vh; }
.site-main.home { max-width: 100%; padding: 0; }
.site-main.home > section { max-width: var(--max-width); margin: 0 auto; padding: 2.5rem 1.5rem; }

/* Hero */
.hero { text-align: center; padding: 4rem 1.5rem; background: linear-gradient(135deg, color-mix(in srgb, var(--primary-color) 8%, transparent), transparent); border-bottom: 1px solid #f0f0f0; }
.hero h1 { margin-bottom: 1rem; }
.hero p { font-size: 1.2rem; color: #666; max-width: 600px; margin: 0 auto 2rem; }

/* Buttons */
.btn, a.btn { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.75rem 1.75rem; background: var(--button-bg); color: var(--button-text); border: none; border-radius: var(--radius); font-weight: 600; font-size: 1rem; cursor: pointer; text-decoration: none; transition: transform 0.1s, box-shadow 0.15s; }
.btn:hover, a.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow); opacity: 1; }

/* Columns */
.columns { display: grid; gap: 1.75rem; margin: 1.5rem 0; }
.column { background: #fff; border: 1px solid #e5e7eb; border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow); }
.column img { border-radius: var(--radius); margin-bottom: 1rem; }
.column h3 { margin-bottom: 0.5rem; }

/* FAQ */
.faq { margin: 1.5rem 0; }
.faq details { border: 1px solid #e5e7eb; border-radius: var(--radius); padding: 1rem 1.25rem; margin-bottom: 0.75rem; background: #fff; }
.faq summary { cursor: pointer; font-weight: 600; color: var(--primary-color); font-family: var(--heading-font); }
.faq details[open] { box-shadow: var(--shadow); }
.faq p { margin-top: 0.5rem; color: #555; }

/* Highlight */
.highlight { border-left: 4px solid var(--primary-color); padding: 1.25rem 1.5rem; margin: 1.5rem 0; border-radius: var(--radius); background: #f9fafb; }
.highlight-positive { border-color: #10b981; background: #ecfdf5; }
.highlight-warning { border-color: #f59e0b; background: #fffbeb; }
.highlight-info { border-color: var(--primary-color); }

/* Wide content */
.wide-content { margin: 1.5rem 0; }
.wide-content p { margin-bottom: 1rem; }

/* Footer */
.site-footer { background: #111827; color: #9ca3af; margin-top: 4rem; }
.footer-inner { max-width: var(--max-width); margin: 0 auto; display: grid; grid-template-columns: 2fr 1fr; gap: 2rem; padding: 3rem 1.5rem 1.5rem; }
.footer-logo { max-height: 36px; margin-bottom: 0.75rem; filter: brightness(0) invert(1); }
.footer-col h4 { color: #fff; margin-bottom: 0.75rem; font-size: 0.95rem; }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 0.4rem; }
.footer-col a { color: #9ca3af; font-size: 0.9rem; }
.footer-col a:hover { color: #fff; opacity: 1; }
.footer-bottom { max-width: var(--max-width); margin: 0 auto; padding: 1rem 1.5rem; border-top: 1px solid #374151; font-size: 0.85rem; }

/* Article */
article h1 { margin-bottom: 0.5rem; }
article h2 { margin-top: 2rem; }
article ul { margin: 0 0 1rem 1.5rem; }
article li { margin-bottom: 0.25rem; }
article img { border-radius: var(--radius); margin-bottom: 1.5rem; width: 100%; }
.post-featured-image { width: 100%; max-height: 400px; object-fit: cover; border-radius: var(--radius); margin-bottom: 1.5rem; }
.post-date { font-size: 0.9rem; color: #9ca3af; display: block; margin-bottom: 0.5rem; }

/* Blog */
.blog-list h1 { margin-bottom: 2rem; }
.posts-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1.5rem; }
.post-card { background: #fff; border: 1px solid #e5e7eb; border-radius: var(--radius); padding: 1.75rem; box-shadow: var(--shadow); transition: box-shadow 0.15s; overflow: hidden; }
.post-card:hover { box-shadow: var(--shadow-lg); }
.post-thumb { display: block; margin: -1.75rem -1.75rem 1rem; overflow: hidden; border-radius: var(--radius) var(--radius) 0 0; }
.post-thumb img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.post-card h2 { font-size: 1.3rem; margin-bottom: 0.5rem; }
.post-card h2 a { color: var(--primary-color); }
.post-meta { display: flex; gap: 0.75rem; align-items: center; margin-bottom: 0.75rem; font-size: 0.85rem; color: #9ca3af; }
.post-tag { background: color-mix(in srgb, var(--primary-color) 12%, transparent); color: var(--primary-color); padding: 0.15rem 0.6rem; border-radius: 1rem; font-size: 0.8rem; font-weight: 500; }
.post-date { font-size: 0.85rem; }
.read-more { font-weight: 600; font-size: 0.95rem; }
.post-category { display: inline-block; margin-bottom: 1rem; font-size: 0.85rem; color: var(--primary-color); font-weight: 500; }
.post-category a, .post-tag { color: var(--primary-color); text-decoration: none; }
.post-category a:hover, .post-tag:hover { text-decoration: underline; }
.post-author a { color: inherit; text-decoration: none; font-weight: 500; }
.post-author a:hover { color: var(--primary-color); }

/* Blog category navigation (filter pills) */
.blog-categories { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 1.5rem 0 2rem; }
.blog-categories a { padding: 0.35rem 0.9rem; border-radius: 1rem; font-size: 0.85rem; font-weight: 500; background: #f3f4f6; color: #374151; text-decoration: none; transition: background 0.15s, color 0.15s; }
.blog-categories a:hover { background: #e5e7eb; }
.blog-categories a.active { background: var(--primary-color); color: #fff; }

/* Archive (category) header */
.archive-header { margin-bottom: 2rem; }
.archive-header h1 { margin-bottom: 0.25rem; }
.archive-count { color: #9ca3af; font-size: 0.9rem; }

/* Author page header */
.author-header { display: flex; align-items: center; gap: 1.25rem; margin-bottom: 2.5rem; padding-bottom: 1.5rem; border-bottom: 1px solid #e5e7eb; }
.author-avatar { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.author-header h1 { margin: 0 0 0.25rem; }
.author-title { color: var(--primary-color); font-weight: 600; font-size: 0.95rem; margin: 0 0 0.5rem; }
.author-bio { color: #6b7280; font-size: 0.95rem; margin: 0; max-width: 60ch; }

/* Home latest posts section (page_blog sites) */
.home-latest-posts { max-width: var(--max-width); margin: 0 auto; padding: 3rem 1.5rem; }
.home-latest-posts h2 { margin-bottom: 1.5rem; }
.see-all { text-align: center; margin-top: 2rem; }

/* Responsive */
@media (max-width: 768px) {
    .nav-toggle { display: none; }
    .nav-burger { display: flex; }
    .nav-toggle:checked ~ .site-nav { display: flex; }
    .site-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; background: #fff; padding: 1rem; border-bottom: 1px solid #e5e7eb; gap: 0.25rem; }
    .nav-toggle:checked ~ .site-nav a { width: 100%; }
    .columns { grid-template-columns: 1fr !important; }
    .footer-inner { grid-template-columns: 1fr; }
    .hero { padding: 2.5rem 1.5rem; }
}