/*
Theme Name: EduBlogi
Theme URI: https://edublogi.pl
Description: Custom magazine theme for EduBlogi - portal edukacyjny
Version: 1.0.0
Author: Marcin Siwonia
Text Domain: edublogi
*/

/* ===== CSS VARIABLES ===== */
:root {
    --primary: #1B3A5C;
    --primary-light: #264D73;
    --primary-dark: #0F2640;
    --secondary: #2D9B6E;
    --secondary-light: #3DB87F;
    --accent: #E8A838;
    --accent-light: #F0BD5E;
    --danger: #E74C3C;
    --text: #1E293B;
    --text-light: #64748B;
    --text-lighter: #94A3B8;
    --bg: #FFFFFF;
    --bg-alt: #F1F5F9;
    --bg-card: #FFFFFF;
    --border: #E2E8F0;
    --border-light: #F1F5F9;
    --shadow-sm: 0 1px 3px rgba(27,58,92,0.06), 0 1px 2px rgba(27,58,92,0.04);
    --shadow-md: 0 4px 12px rgba(27,58,92,0.08), 0 2px 4px rgba(27,58,92,0.04);
    --shadow-lg: 0 12px 32px rgba(27,58,92,0.1), 0 4px 8px rgba(27,58,92,0.06);
    --shadow-card: 0 2px 8px rgba(27,58,92,0.06), 0 0 1px rgba(27,58,92,0.08);
    --radius-sm: 6px;
    --radius: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --font-display: 'Plus Jakarta Sans', sans-serif;
    --font-body: 'Inter', sans-serif;
    --transition: 0.2s ease;
    --max-width: 1240px;
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    color: var(--text);
    background: var(--bg-alt);
    line-height: 1.7;
    overflow-x: hidden;
}

a { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--secondary); }

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

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.25;
    color: var(--text);
}

h1 { font-size: 2.5rem; letter-spacing: -0.03em; }
h2 { font-size: 1.875rem; letter-spacing: -0.02em; }
h3 { font-size: 1.375rem; letter-spacing: -0.01em; }
h4 { font-size: 1.125rem; }

p { margin-bottom: 1rem; }

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

/* ===== HEADER ===== */
.site-header {
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(12px);
    background: rgba(255,255,255,0.95);
}

.header-top {
    background: var(--primary);
    color: #fff;
    padding: 6px 0;
    font-size: 0.8125rem;
}

.header-top .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-top a {
    color: rgba(255,255,255,0.8);
    transition: color var(--transition);
}

.header-top a:hover { color: #fff; }

.header-main {
    padding: 16px 0;
}

.header-main .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
}

.site-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--primary);
    letter-spacing: -0.03em;
}

.site-logo .logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.25rem;
    font-weight: 900;
}

.site-logo span.accent { color: var(--secondary); }

/* Navigation */
.main-nav { display: flex; align-items: center; }

.main-nav ul {
    list-style: none;
    display: flex;
    gap: 4px;
}

.main-nav a {
    display: block;
    padding: 8px 16px;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text);
    border-radius: var(--radius-sm);
    transition: all var(--transition);
}

.main-nav a:hover,
.main-nav .current-menu-item a {
    background: var(--bg-alt);
    color: var(--primary);
}

/* Header search */
.header-search {
    display: flex;
    align-items: center;
}

.header-search form {
    display: flex;
    align-items: center;
    background: var(--bg-alt);
    border-radius: 100px;
    padding: 6px 16px;
    border: 1px solid transparent;
    transition: all var(--transition);
}

.header-search form:focus-within {
    border-color: var(--primary);
    background: var(--bg);
    box-shadow: 0 0 0 3px rgba(27,58,92,0.1);
}

.header-search input[type="search"] {
    border: none;
    background: none;
    outline: none;
    font-size: 0.875rem;
    width: 180px;
    font-family: var(--font-body);
    color: var(--text);
}

.header-search button {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-light);
    padding: 4px;
    display: flex;
}

/* Mobile menu toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    color: var(--text);
}

.menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: currentColor;
    margin: 5px 0;
    transition: all var(--transition);
    border-radius: 2px;
}

/* ===== HERO / FEATURED ===== */
.hero-section {
    padding: 40px 0;
    background: var(--bg);
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 24px;
}

.hero-main {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    min-height: 420px;
}

.hero-main .hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    inset: 0;
}

.hero-main .hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(15,38,64,0.9) 0%, rgba(15,38,64,0.3) 50%, transparent 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 32px;
}

.hero-main .hero-overlay .cat-badge {
    align-self: flex-start;
}

.hero-main .hero-overlay h2 {
    color: #fff;
    font-size: 1.75rem;
    margin: 12px 0 8px;
    line-height: 1.3;
}

.hero-main .hero-overlay p {
    color: rgba(255,255,255,0.75);
    font-size: 0.9375rem;
    margin: 0;
    line-height: 1.6;
}

.hero-sidebar {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.hero-sidebar-card {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    flex: 1;
    min-height: 195px;
}

.hero-sidebar-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    inset: 0;
}

.hero-sidebar-card .hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(15,38,64,0.85) 0%, transparent 60%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 20px;
}

.hero-sidebar-card .hero-overlay h3 {
    color: #fff;
    font-size: 1.0625rem;
    margin-top: 8px;
    line-height: 1.35;
}

/* ===== CATEGORY BADGE ===== */
.cat-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.cat-badge--szkoly { background: rgba(45,155,110,0.15); color: var(--secondary); }
.cat-badge--studia { background: rgba(27,58,92,0.12); color: var(--primary); }
.cat-badge--kursy { background: rgba(232,168,56,0.15); color: #C48A20; }
.cat-badge--rankingi { background: rgba(231,76,60,0.12); color: var(--danger); }
.cat-badge--poradniki { background: rgba(142,68,173,0.12); color: #8E44AD; }
.cat-badge--kariera { background: rgba(52,152,219,0.12); color: #2980B9; }
.cat-badge--online { background: rgba(26,188,156,0.12); color: #16A085; }
.cat-badge--nauka { background: rgba(243,156,18,0.12); color: #D4880A; }

/* White variant for overlays */
.hero-overlay .cat-badge {
    background: rgba(255,255,255,0.2);
    color: #fff;
    backdrop-filter: blur(4px);
}

/* ===== SECTION HEADERS ===== */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--border);
}

.section-header h2 {
    font-size: 1.375rem;
    position: relative;
    padding-left: 16px;
}

.section-header h2::before {
    content: '';
    position: absolute;
    left: 0;
    top: 2px;
    bottom: 2px;
    width: 4px;
    background: var(--secondary);
    border-radius: 4px;
}

.section-header .view-all {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--secondary);
    display: flex;
    align-items: center;
    gap: 4px;
}

.section-header .view-all:hover { color: var(--primary); }

/* ===== POST CARDS ===== */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.post-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    transition: all 0.3s ease;
    border: 1px solid var(--border-light);
}

.post-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.post-card__image {
    position: relative;
    aspect-ratio: 16/10;
    overflow: hidden;
}

.post-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.post-card:hover .post-card__image img {
    transform: scale(1.05);
}

.post-card__image .cat-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
}

.post-card__body {
    padding: 20px;
}

.post-card__title {
    font-size: 1.0625rem;
    line-height: 1.4;
    margin-bottom: 8px;
}

.post-card__title a {
    color: var(--text);
    transition: color var(--transition);
}

.post-card__title a:hover { color: var(--primary); }

.post-card__excerpt {
    font-size: 0.875rem;
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-card__meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.8125rem;
    color: var(--text-lighter);
}

.post-card__meta svg { width: 14px; height: 14px; opacity: 0.6; }

/* ===== LIST POSTS (sidebar / horizontal) ===== */
.post-list-item {
    display: flex;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid var(--border-light);
}

.post-list-item:last-child { border-bottom: none; }

.post-list-item__image {
    width: 100px;
    min-width: 100px;
    aspect-ratio: 1;
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.post-list-item__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-list-item__body { flex: 1; }

.post-list-item__title {
    font-size: 0.9375rem;
    line-height: 1.4;
    margin-bottom: 4px;
}

.post-list-item__title a { color: var(--text); }
.post-list-item__title a:hover { color: var(--primary); }

.post-list-item__meta {
    font-size: 0.8125rem;
    color: var(--text-lighter);
}

/* Numbered list */
.post-list-numbered { counter-reset: post-counter; }

.post-list-numbered .post-list-item {
    counter-increment: post-counter;
    position: relative;
    padding-left: 40px;
}

.post-list-numbered .post-list-item::before {
    content: counter(post-counter, decimal-leading-zero);
    position: absolute;
    left: 0;
    top: 20px;
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--border);
}

/* ===== MAIN CONTENT LAYOUT ===== */
.content-section { padding: 48px 0; }

.content-with-sidebar {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 40px;
    align-items: start;
}

/* ===== SIDEBAR ===== */
.sidebar {}

.widget {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-light);
}

.widget-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border);
    position: relative;
}

.widget-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 40px;
    height: 2px;
    background: var(--secondary);
}

/* Categories widget */
.widget-categories ul { list-style: none; }

.widget-categories li {
    border-bottom: 1px solid var(--border-light);
}

.widget-categories li:last-child { border-bottom: none; }

.widget-categories a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    color: var(--text);
    font-size: 0.9375rem;
    transition: all var(--transition);
}

.widget-categories a:hover {
    color: var(--primary);
    padding-left: 8px;
}

.widget-categories .count {
    background: var(--bg-alt);
    padding: 2px 8px;
    border-radius: 100px;
    font-size: 0.75rem;
    color: var(--text-lighter);
}

/* Newsletter widget */
.widget-newsletter {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: #fff;
}

.widget-newsletter .widget-title {
    color: #fff;
    border-bottom-color: rgba(255,255,255,0.2);
}

.widget-newsletter .widget-title::after {
    background: var(--accent);
}

.widget-newsletter p {
    font-size: 0.875rem;
    opacity: 0.85;
    margin-bottom: 16px;
}

.widget-newsletter input[type="email"] {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: var(--radius-sm);
    background: rgba(255,255,255,0.1);
    color: #fff;
    font-size: 0.875rem;
    margin-bottom: 10px;
    font-family: var(--font-body);
}

.widget-newsletter input[type="email"]::placeholder {
    color: rgba(255,255,255,0.5);
}

.widget-newsletter button {
    width: 100%;
    padding: 12px;
    background: var(--accent);
    color: var(--primary-dark);
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all var(--transition);
    font-family: var(--font-body);
}

.widget-newsletter button:hover {
    background: var(--accent-light);
}

/* ===== CATEGORY STRIP ===== */
.category-strip {
    padding: 32px 0;
    background: var(--bg);
}

.category-strip__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.category-card {
    background: var(--bg-alt);
    border-radius: var(--radius);
    padding: 24px 20px;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.category-card:hover {
    background: var(--bg);
    border-color: var(--border);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.category-card__icon {
    width: 52px;
    height: 52px;
    margin: 0 auto 12px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.category-card__name {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.9375rem;
    margin-bottom: 4px;
}

.category-card__count {
    font-size: 0.8125rem;
    color: var(--text-lighter);
}

/* ===== RANKINGS SECTION ===== */
.rankings-section {
    background: var(--bg);
    padding: 48px 0;
}

.rankings-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.ranking-card {
    background: var(--bg-alt);
    border-radius: var(--radius);
    padding: 24px;
    border: 1px solid var(--border-light);
    transition: all 0.3s ease;
}

.ranking-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--border);
}

.ranking-card__header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.ranking-card__icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    background: rgba(232,168,56,0.12);
}

.ranking-card__title {
    font-size: 1.0625rem;
    font-weight: 700;
}

.ranking-card__list {
    list-style: none;
}

.ranking-card__list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-light);
    font-size: 0.875rem;
}

.ranking-card__list li:last-child { border-bottom: none; }

.ranking-card__list .rank {
    font-weight: 700;
    color: var(--accent);
    min-width: 24px;
}

/* ===== SINGLE POST ===== */
.single-header {
    padding: 40px 0 0;
}

.single-header .cat-badge { margin-bottom: 12px; }

.single-header h1 {
    max-width: 780px;
    margin-bottom: 16px;
}

.single-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    color: var(--text-light);
    font-size: 0.875rem;
    margin-bottom: 32px;
}

.single-featured-image {
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 40px;
    aspect-ratio: 21/9;
}

.single-featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.single-content {
    max-width: 780px;
    font-size: 1.0625rem;
    line-height: 1.8;
}

.single-content h2 {
    margin: 40px 0 16px;
    font-size: 1.5rem;
}

.single-content h3 {
    margin: 32px 0 12px;
}

.single-content p { margin-bottom: 1.25rem; }

.single-content ul, .single-content ol {
    margin: 0 0 1.25rem 1.5rem;
}

.single-content li { margin-bottom: 0.5rem; }

.single-content blockquote {
    border-left: 4px solid var(--secondary);
    padding: 16px 24px;
    margin: 24px 0;
    background: var(--bg-alt);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-style: italic;
    color: var(--text-light);
}

.single-content img {
    border-radius: var(--radius);
    margin: 24px 0;
}

/* ===== BREADCRUMBS ===== */
.breadcrumbs {
    font-size: 0.85rem;
    color: var(--text-light);
    padding: 12px 0;
    margin-bottom: 8px;
}
.breadcrumbs a {
    color: var(--primary);
    text-decoration: none;
}
.breadcrumbs a:hover {
    text-decoration: underline;
}
.breadcrumbs .breadcrumb_last {
    color: var(--text);
    font-weight: 500;
}
.archive-header .breadcrumbs {
    margin-bottom: 12px;
    color: rgba(255,255,255,0.7);
}
.archive-header .breadcrumbs a {
    color: rgba(255,255,255,0.85);
}

/* ===== FAQ ACCORDION ===== */
.faq-section {
    margin-top: 48px;
    padding-top: 32px;
    border-top: 2px solid var(--border);
}
.faq-section > h2 {
    font-size: 1.375rem;
    margin-bottom: 20px;
    padding-left: 16px;
    position: relative;
}
.faq-section > h2::before {
    content: '';
    position: absolute;
    left: 0;
    top: 2px;
    bottom: 2px;
    width: 4px;
    background: var(--secondary);
    border-radius: 4px;
}
.faq-item {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 10px;
    overflow: hidden;
    background: var(--bg-card);
    transition: box-shadow 0.2s ease;
}
.faq-item:hover {
    box-shadow: var(--shadow-sm);
}
.faq-question {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 20px;
    background: none;
    border: none;
    cursor: pointer;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1rem;
    color: var(--text);
    text-align: left;
    line-height: 1.4;
    transition: color 0.2s ease;
}
.faq-question:hover {
    color: var(--primary);
}
.faq-question::after {
    content: '';
    width: 10px;
    min-width: 10px;
    height: 10px;
    border-right: 2px solid var(--text-light);
    border-bottom: 2px solid var(--text-light);
    transform: rotate(45deg);
    transition: transform 0.25s ease;
    margin-top: -4px;
}
.faq-item.active .faq-question::after {
    transform: rotate(-135deg);
    margin-top: 4px;
}
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}
.faq-item.active .faq-answer {
    max-height: 600px;
}
.faq-answer-inner {
    padding: 0 20px 20px;
    font-size: 0.9375rem;
    line-height: 1.7;
    color: var(--text-light);
    border-top: 1px solid var(--border-light);
    padding-top: 16px;
}
.faq-answer-inner p:last-child {
    margin-bottom: 0;
}

/* ===== PAGINATION ===== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 48px;
}

.pagination .page-numbers {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text);
    background: var(--bg-card);
    border: 1px solid var(--border);
    transition: all var(--transition);
}

.pagination .page-numbers:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.pagination .page-numbers.current {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

/* ===== FOOTER ===== */
.site-footer {
    background: var(--primary-dark);
    color: rgba(255,255,255,0.7);
    padding: 64px 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 48px;
    margin-bottom: 48px;
}

.footer-about .site-logo {
    color: #fff;
    margin-bottom: 16px;
}

.footer-about p {
    font-size: 0.875rem;
    line-height: 1.7;
    opacity: 0.7;
}

.footer-heading {
    color: #fff;
    font-size: 0.9375rem;
    font-weight: 700;
    margin-bottom: 20px;
    font-family: var(--font-display);
}

.footer-links { list-style: none; }

.footer-links li { margin-bottom: 10px; }

.footer-links a {
    color: rgba(255,255,255,0.6);
    font-size: 0.875rem;
    transition: all var(--transition);
}

.footer-links a:hover {
    color: #fff;
    padding-left: 4px;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 20px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8125rem;
}

/* ===== ARCHIVE PAGE ===== */
.archive-header {
    padding: 40px 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
}

.archive-header h1 { font-size: 2rem; }

.archive-header p {
    color: var(--text-light);
    max-width: 600px;
    margin-top: 8px;
}

/* ===== SEARCH ===== */
.search-form {
    display: flex;
    max-width: 600px;
}

.search-form input[type="search"] {
    flex: 1;
    padding: 14px 20px;
    border: 2px solid var(--border);
    border-right: none;
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
    font-size: 1rem;
    font-family: var(--font-body);
    outline: none;
}

.search-form input[type="search"]:focus {
    border-color: var(--primary);
}

.search-form button {
    padding: 14px 24px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    cursor: pointer;
    font-weight: 600;
    font-family: var(--font-body);
    transition: background var(--transition);
}

.search-form button:hover { background: var(--primary-light); }

/* ===== 404 ===== */
.page-404 {
    text-align: center;
    padding: 80px 0;
}

.page-404 h1 {
    font-size: 6rem;
    color: var(--border);
    line-height: 1;
}

.page-404 p {
    font-size: 1.125rem;
    color: var(--text-light);
    margin: 16px 0 32px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .content-with-sidebar {
        grid-template-columns: 1fr;
    }
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 32px;
    }
}

@media (max-width: 768px) {
    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.375rem; }

    .header-search { display: none; }
    .menu-toggle { display: block; }

    .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg);
        border-bottom: 1px solid var(--border);
        box-shadow: var(--shadow-lg);
        padding: 16px;
    }

    .main-nav.active { display: block; }

    .main-nav ul {
        flex-direction: column;
        gap: 0;
    }

    .main-nav a {
        padding: 12px 16px;
        border-radius: var(--radius-sm);
    }

    .hero-grid {
        grid-template-columns: 1fr;
    }

    .hero-main { min-height: 300px; }

    .hero-sidebar {
        flex-direction: row;
    }

    .hero-sidebar-card { min-height: 160px; }

    .posts-grid {
        grid-template-columns: 1fr;
    }

    .category-strip__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .rankings-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .container { padding: 0 16px; }

    .hero-sidebar { flex-direction: column; }

    .category-strip__grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .category-card { padding: 16px 12px; }
}
