/* ============================================
   KITSAP BIZ — Clean Modern News Theme
   ============================================ */

:root {
    --color-primary: #1A1A2E;
    --color-accent: #E94560;
    --color-accent-hover: #D63D56;
    --color-surface: #FFFFFF;
    --color-surface-alt: #F8F9FA;
    --color-border: #E9ECEF;
    --color-text: #2D3436;
    --color-text-light: #636E72;
    --color-text-muted: #B2BEC3;
    --font-heading: 'DM Serif Display', Georgia, serif;
    --font-body: 'DM Sans', -apple-system, sans-serif;
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 2rem;
    --space-lg: 3rem;
    --space-xl: 5rem;
    --max-width: 1200px;
    --transition: 0.2s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-font-smoothing: antialiased; scroll-behavior: smooth; }
body { font-family: var(--font-body); font-size: 16px; line-height: 1.6; color: var(--color-text); background: var(--color-surface); }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; transition: color var(--transition); }
ul { list-style: none; }

h1, h2, h3, h4 { font-family: var(--font-heading); font-weight: 400; line-height: 1.2; color: var(--color-primary); }
h1 { font-size: clamp(2rem, 4vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); }
h3 { font-size: clamp(1.125rem, 2vw, 1.5rem); }

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 1.5rem; }

/* ============ BUTTONS ============ */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 0.75rem 1.75rem; font-family: var(--font-body); font-size: 0.875rem;
    font-weight: 600; border: none; border-radius: 6px; cursor: pointer; transition: var(--transition);
}
.btn-primary { background: var(--color-accent); color: #fff; }
.btn-primary:hover { background: var(--color-accent-hover); transform: translateY(-1px); }

/* ============ HEADER ============ */
.site-header { border-bottom: 1px solid var(--color-border); background: var(--color-surface); position: sticky; top: 0; z-index: 100; }
.header-inner { max-width: var(--max-width); margin: 0 auto; padding: 0.875rem 1.5rem; display: flex; align-items: center; justify-content: space-between; }
.site-logo img { height: 36px; width: auto; }
.logo-text { font-family: var(--font-heading); font-size: 1.5rem; color: var(--color-primary); }
.logo-text span { color: var(--color-accent); }
.site-nav ul { display: flex; gap: 1.75rem; }
.site-nav a { font-size: 0.875rem; font-weight: 500; color: var(--color-text-light); }
.site-nav a:hover { color: var(--color-accent); }
.menu-toggle { display: none; background: none; border: none; cursor: pointer; padding: 5px; }
.menu-toggle span { display: block; width: 22px; height: 2px; background: var(--color-primary); margin: 4px 0; transition: var(--transition); }
.mobile-nav { display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: var(--color-surface); z-index: 99; flex-direction: column; align-items: center; justify-content: center; gap: 2rem; opacity: 0; pointer-events: none; transition: opacity var(--transition); }
.mobile-nav.active { opacity: 1; pointer-events: all; }
.mobile-nav a { font-family: var(--font-heading); font-size: 1.75rem; color: var(--color-primary); }

/* ============ HERO ============ */
.hero-section { padding: var(--space-xl) 0 var(--space-lg); background: var(--color-surface-alt); border-bottom: 1px solid var(--color-border); }
.hero-content { max-width: 700px; }
.hero-title { margin-bottom: 1rem; }
.hero-title em { color: var(--color-accent); font-style: italic; }
.hero-subtitle { font-size: 1.125rem; color: var(--color-text-light); line-height: 1.7; }

/* ============ TAG BADGE ============ */
.tag-badge {
    display: inline-block; font-size: 0.6875rem; font-weight: 600;
    letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-accent);
    margin-bottom: 0.5rem;
}

/* ============ FEATURED POST ============ */
.featured-section { padding: var(--space-xl) 0; }
.featured-card { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-lg); align-items: center; }
.featured-image { border-radius: 8px; overflow: hidden; }
.featured-image img { width: 100%; aspect-ratio: 16/10; object-fit: cover; transition: transform 0.4s ease; }
.featured-image:hover img { transform: scale(1.02); }
.featured-content h2 { margin-bottom: 0.75rem; }
.featured-content h2 a:hover { color: var(--color-accent); }
.featured-content p { color: var(--color-text-light); font-size: 1.0625rem; line-height: 1.7; margin-bottom: 1rem; }

/* ============ POST META ============ */
.post-meta { font-size: 0.8125rem; color: var(--color-text-muted); display: flex; align-items: center; gap: 0.5rem; }

/* ============ POSTS GRID ============ */
.posts-section { padding: var(--space-xl) 0; }
.section-header { margin-bottom: var(--space-lg); padding-bottom: var(--space-sm); border-bottom: 2px solid var(--color-primary); display: inline-block; }
.section-header h2 { font-size: 1.25rem; }
.posts-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.post-card { border-radius: 8px; overflow: hidden; border: 1px solid var(--color-border); transition: transform var(--transition), box-shadow var(--transition); }
.post-card:hover { transform: translateY(-3px); box-shadow: 0 12px 32px rgba(0,0,0,0.06); }
.post-card-image { display: block; overflow: hidden; }
.post-card-image img { width: 100%; aspect-ratio: 16/10; object-fit: cover; transition: transform 0.4s ease; }
.post-card:hover .post-card-image img { transform: scale(1.03); }
.post-card-content { padding: 1.25rem; }
.post-card-content h3 { margin-bottom: 0.5rem; font-size: 1.125rem; }
.post-card-content h3 a:hover { color: var(--color-accent); }
.post-card-content p { color: var(--color-text-light); font-size: 0.9375rem; margin-bottom: 0.75rem; }

/* ============ PAGINATION ============ */
.pagination { display: flex; align-items: center; justify-content: center; gap: 1.5rem; padding: var(--space-lg) 0 0; }
.pagination-link { font-size: 0.875rem; font-weight: 600; color: var(--color-accent); }
.pagination-link:hover { color: var(--color-accent-hover); }
.pagination-info { font-size: 0.8125rem; color: var(--color-text-muted); }

/* ============ POST FULL ============ */
.post-header { padding: var(--space-xl) 0 var(--space-md); text-align: center; }
.post-header .tag-badge { margin-bottom: 0.75rem; }
.post-title { margin-bottom: 1rem; }
.post-excerpt { font-size: 1.25rem; color: var(--color-text-light); margin-bottom: 1.5rem; max-width: 700px; margin-left: auto; margin-right: auto; }
.post-author { font-weight: 600; }

.post-feature-image { max-width: 1000px; margin: 0 auto var(--space-lg); padding: 0 1.5rem; }
.post-feature-image img { border-radius: 8px; }
.post-feature-image figcaption { text-align: center; font-size: 0.8125rem; color: var(--color-text-muted); margin-top: 0.75rem; }

.post-content { max-width: 720px; margin: 0 auto; padding: 0 1.5rem var(--space-xl); }
.post-content p { font-size: 1.0625rem; line-height: 1.85; margin-bottom: 1.5rem; }
.post-content h2 { margin: 2.5rem 0 1rem; }
.post-content h3 { margin: 2rem 0 0.75rem; }
.post-content img { border-radius: 8px; margin: 2rem 0; }
.post-content a { color: var(--color-accent); text-decoration: underline; text-underline-offset: 2px; }
.post-content a:hover { color: var(--color-accent-hover); }
.post-content blockquote { border-left: 3px solid var(--color-accent); padding-left: 1.5rem; margin: 2rem 0; font-style: italic; color: var(--color-text-light); }
.post-content ul, .post-content ol { padding-left: 1.5rem; margin-bottom: 1.5rem; }
.post-content li { list-style: disc; margin-bottom: 0.5rem; line-height: 1.8; }
.post-content ol li { list-style: decimal; }

.post-tags { max-width: 720px; margin: 0 auto; padding: 0 1.5rem var(--space-lg); display: flex; flex-wrap: wrap; gap: 0.5rem; }
.post-tag-link { font-size: 0.8125rem; padding: 0.375rem 0.875rem; background: var(--color-surface-alt); border: 1px solid var(--color-border); border-radius: 20px; color: var(--color-text-light); }
.post-tag-link:hover { border-color: var(--color-accent); color: var(--color-accent); }

/* ============ PAGE FULL ============ */
.page-header { padding: var(--space-xl) 0 var(--space-md); text-align: center; }
.page-title { margin-bottom: 0.75rem; }
.page-excerpt { font-size: 1.125rem; color: var(--color-text-light); }
.page-content { padding: 0 0 var(--space-xl); }
.page-content-inner { max-width: 800px; margin: 0 auto; padding: 0 1.5rem; }
.page-content-inner p { font-size: 1.0625rem; line-height: 1.85; margin-bottom: 1.5rem; }
.page-content-inner h2 { margin: 2.5rem 0 1rem; }
.page-content-inner h3 { margin: 2rem 0 0.75rem; }
.page-content-inner img { border-radius: 8px; margin: 2rem 0; }

/* ============ TAG / AUTHOR PAGES ============ */
.tag-header, .author-header { padding: var(--space-xl) 0 var(--space-md); text-align: center; background: var(--color-surface-alt); border-bottom: 1px solid var(--color-border); }
.tag-description, .author-bio { font-size: 1.0625rem; color: var(--color-text-light); margin-top: 0.75rem; max-width: 600px; margin-left: auto; margin-right: auto; }
.author-avatar { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; margin: 0 auto 1rem; }

/* ============ RELATED ============ */
.related-section { padding: var(--space-xl) 0; background: var(--color-surface-alt); border-top: 1px solid var(--color-border); }
.related-title { text-align: center; margin-bottom: var(--space-lg); }

/* ============ ERROR ============ */
.error-page { padding: var(--space-xl) 0; text-align: center; }
.error-code { font-size: 6rem; color: var(--color-text-muted); margin-bottom: 0.5rem; }
.error-message { font-size: 1.25rem; color: var(--color-text-light); margin-bottom: 2rem; }

/* ============ FOOTER ============ */
.site-footer { background: var(--color-primary); padding: var(--space-xl) 0 var(--space-md); margin-top: var(--space-xl); }
.footer-inner { max-width: var(--max-width); margin: 0 auto; padding: 0 1.5rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 3rem; margin-bottom: var(--space-lg); }
.footer-logo { font-family: var(--font-heading); font-size: 1.5rem; color: #fff; display: block; margin-bottom: 0.75rem; }
.footer-logo span { color: var(--color-accent); }
.footer-col p { color: rgba(255,255,255,0.5); font-size: 0.9375rem; line-height: 1.7; }
.footer-col h4 { font-family: var(--font-body); font-size: 0.75rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(255,255,255,0.35); margin-bottom: 1rem; }
.footer-col li { margin-bottom: 0.5rem; }
.footer-col a { color: rgba(255,255,255,0.5); font-size: 0.875rem; display: block; }
.footer-col a:hover { color: var(--color-accent); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.08); padding-top: var(--space-md); }
.footer-bottom p { font-size: 0.8125rem; color: rgba(255,255,255,0.25); }

/* ============ RESPONSIVE ============ */
@media (max-width: 1024px) {
    .posts-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    .site-nav { display: none; }
    .menu-toggle { display: block; }
    .mobile-nav { display: flex; }
    .featured-card { grid-template-columns: 1fr; }
    .posts-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
}
