/* ==========================================================
   FLAVOR THEME — BlogCMS
   Nowoczesny motyw magazynowy z kafelkowym layoutem
   ========================================================== */

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    /* Kolory */
    --color-bg: #f0f1f3;
    --color-surface: #ffffff;
    --color-text: #1a1a1a;
    --color-text-secondary: #5f6368;
    --color-text-muted: #9aa0a6;
    --color-accent: #1a73e8;
    --color-accent-hover: #1557b0;
    --color-badge-bg: #1a1a1a;
    --color-badge-text: #ffffff;
    --color-border: #e0e0e0;
    --color-header-bg: #ffffff;
    --color-footer-bg: #1a1a2e;
    --color-footer-text: #b0b3b8;
    --color-overlay: rgba(0,0,0,0.55);

    /* Typografia */
    --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-serif: Georgia, 'Times New Roman', serif;

    /* Rozmiary */
    --container-max: 1200px;
    --radius: 6px;
    --radius-lg: 10px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 2px 8px rgba(0,0,0,0.1);
    --shadow-lg: 0 4px 20px rgba(0,0,0,0.12);
    --transition: 0.2s ease;
}

html { font-size: 16px; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
    font-family: var(--font-sans);
    color: var(--color-text);
    background: var(--color-bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a { color: var(--color-accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--color-accent-hover); }
img { max-width: 100%; height: auto; display: block; }
h1,h2,h3,h4,h5,h6 { line-height: 1.25; font-weight: 700; color: var(--color-text); }

/* --- Container --- */
.container { max-width: var(--container-max); margin: 0 auto; padding: 0 20px; }

/* ==========================================================
   HEADER & NAWIGACJA
   ========================================================== */
.site-header {
    background: var(--color-header-bg);
    border-bottom: 1px solid var(--color-border);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 85px;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 20px;
}

.site-logo a {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--color-text);
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.site-logo a:hover { color: var(--color-accent); }
.site-logo img { max-height: 85px; width: auto; }

/* Nawigacja */
.main-nav { display: flex; align-items: center; gap: 0; }
.main-nav a {
    color: var(--color-text);
    font-size: 0.875rem;
    font-weight: 500;
    padding: 6px 14px;
    border-radius: var(--radius);
    transition: background var(--transition), color var(--transition);
    white-space: nowrap;
}
.main-nav a:hover {
    background: var(--color-bg);
    color: var(--color-accent);
}

/* Hamburger */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    flex-direction: column;
    gap: 5px;
}
.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--color-text);
    border-radius: 2px;
    transition: transform var(--transition), opacity var(--transition);
}
.nav-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ==========================================================
   HERO GRID — Strona główna (kafelki)
   ========================================================== */
.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    grid-template-rows: auto auto;
    gap: 6px;
    margin-bottom: 6px;
}

/* Duży kafelek — pierwszy wpis */
.hero-grid .tile-featured {
    grid-column: 1;
    grid-row: 1 / 3;
}

/* Średnie kafelki — drugi i trzeci */
.hero-grid .tile-medium:nth-child(2) { grid-column: 2; grid-row: 1; }
.hero-grid .tile-medium:nth-child(3) { grid-column: 2; grid-row: 2; }

/* Małe kafelki — czwarty i piąty */
.hero-grid .tile-small:nth-child(4) { grid-column: 3; grid-row: 1; }
.hero-grid .tile-small:nth-child(5) { grid-column: 3; grid-row: 2; }

/* --- Tile (kafelek) bazowy --- */
.tile {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
    background: #222;
    display: block;
    color: #fff;
}
.tile:hover { color: #fff; }

.tile-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}
.tile:hover .tile-image { transform: scale(1.04); }

.tile-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: linear-gradient(to top, rgba(0,0,0,0.75) 0%, rgba(0,0,0,0.3) 60%, transparent 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.tile-featured { min-height: 420px; }
.tile-featured .tile-image { position: absolute; inset: 0; }
.tile-featured .tile-overlay { padding: 28px; }
.tile-featured .tile-title { font-size: 1.45rem; line-height: 1.3; }
.tile-featured .tile-meta { font-size: 0.82rem; }

.tile-medium { min-height: 207px; }
.tile-medium .tile-image { position: absolute; inset: 0; }
.tile-medium .tile-title { font-size: 1rem; line-height: 1.35; }

.tile-small { min-height: 207px; }
.tile-small .tile-image { position: absolute; inset: 0; }
.tile-small .tile-title { font-size: 0.92rem; line-height: 1.35; }
.tile-small .tile-overlay { padding: 14px; }

.tile-badge {
    display: inline-block;
    background: var(--color-badge-bg);
    color: var(--color-badge-text);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 3px 10px;
    border-radius: 3px;
    margin-bottom: 8px;
    width: fit-content;
}

.tile-title {
    color: #fff;
    font-weight: 700;
    margin: 0;
    text-shadow: 0 1px 4px rgba(0,0,0,0.3);
}
.tile-title a { color: inherit; }
.tile-title a:hover { color: inherit; opacity: 0.9; }

.tile-meta {
    color: rgba(255,255,255,0.75);
    font-size: 0.78rem;
    margin-top: 6px;
}

/* Placeholder gdy brak obrazka */
.tile-noimg {
    background: linear-gradient(135deg, #2c3e50, #3498db);
}

/* ==========================================================
   SEKCJA WPISÓW — Karty poniżej hero (styl horyzontalny)
   ========================================================== */
.posts-section {
    padding: 0;
}

.section-title {
    font-size: 1.1rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--color-text);
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 3px solid var(--color-text);
    display: inline-block;
}

/* Karty horyzontalne (obrazek po lewej, tekst po prawej) */
.hcard {
    display: flex;
    gap: 18px;
    background: var(--color-surface);
    border-radius: var(--radius);
    overflow: hidden;
    transition: box-shadow var(--transition);
    margin-bottom: 6px;
}
.hcard:hover { box-shadow: var(--shadow-md); }

.hcard-image {
    flex: 0 0 280px;
    min-height: 180px;
    overflow: hidden;
    position: relative;
}
.hcard-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.hcard:hover .hcard-image img { transform: scale(1.04); }

.hcard-image-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.4);
    font-size: 3rem;
}

.hcard-body {
    flex: 1;
    padding: 20px 20px 20px 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hcard-badge {
    display: inline-block;
    background: var(--color-badge-bg);
    color: var(--color-badge-text);
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 3px 9px;
    border-radius: 3px;
    margin-bottom: 8px;
    width: fit-content;
}

.hcard-title {
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.35;
    margin-bottom: 8px;
}
.hcard-title a { color: var(--color-text); }
.hcard-title a:hover { color: var(--color-accent); }

.hcard-excerpt {
    font-size: 0.88rem;
    color: var(--color-text-secondary);
    line-height: 1.55;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hcard-meta {
    font-size: 0.78rem;
    color: var(--color-text-muted);
}
.hcard-more {
    color: var(--color-accent);
    font-weight: 600;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.hcard-more:hover { color: var(--color-accent-hover); }

/* ==========================================================
   GRID KAFELKÓW — kategoria + dalsze wpisy
   ========================================================== */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
}

/* Karta w gridzie (pionowa) */
.vcard {
    background: var(--color-surface);
    border-radius: var(--radius);
    overflow: hidden;
    transition: box-shadow var(--transition), transform var(--transition);
    display: flex;
    flex-direction: column;
}
.vcard:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.vcard-image {
    position: relative;
    aspect-ratio: 16/10;
    overflow: hidden;
}
.vcard-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.vcard:hover .vcard-image img { transform: scale(1.05); }

.vcard-image-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #a8edea, #fed6e3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(0,0,0,0.15);
    font-size: 2.5rem;
}

.vcard-image .tile-badge {
    position: absolute;
    bottom: 10px;
    left: 10px;
    margin: 0;
    z-index: 2;
}

.vcard-body {
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.vcard-title {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.35;
    margin-bottom: 8px;
}
.vcard-title a { color: var(--color-text); }
.vcard-title a:hover { color: var(--color-accent); }

.vcard-excerpt {
    font-size: 0.84rem;
    color: var(--color-text-secondary);
    line-height: 1.5;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 10px;
}

.vcard-meta {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    margin-top: auto;
}

/* ==========================================================
   STRONA KATEGORII
   ========================================================== */
.category-header {
    padding: 32px 0 24px;
}
.category-header h1 {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 6px;
}
.category-header p {
    color: var(--color-text-secondary);
    font-size: 0.95rem;
    max-width: 640px;
}
.category-count {
    display: inline-block;
    background: var(--color-bg);
    color: var(--color-text-secondary);
    font-size: 0.8rem;
    font-weight: 500;
    padding: 4px 12px;
    border-radius: 20px;
    margin-top: 10px;
}

/* ==========================================================
   LAYOUT Z SIDEBAR
   ========================================================== */
.content-layout {
    display: flex;
    gap: 30px;
    padding: 24px 0 40px;
}
.content-layout.with-sidebar .main-content { flex: 1; min-width: 0; }
.content-layout.with-sidebar .sidebar { flex: 0 0 300px; }
.content-layout.full-width .main-content { flex: 1; }

/* ==========================================================
   POJEDYNCZY WPIS
   ========================================================== */
.single-post { padding-bottom: 20px; }

.post-hero {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 28px;
    aspect-ratio: 21/9;
    max-height: 420px;
}
.post-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-header { margin-bottom: 28px; }
.post-header .tile-badge { margin-bottom: 12px; }

.post-header h1 {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.25;
    margin-bottom: 14px;
    letter-spacing: -0.3px;
}

.post-meta-bar {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 0.85rem;
    color: var(--color-text-muted);
    padding-bottom: 20px;
    border-bottom: 1px solid var(--color-border);
}
.post-meta-bar svg { width: 14px; height: 14px; opacity: 0.5; }
.post-meta-item { display: flex; align-items: center; gap: 5px; }

/* Treść wpisu */
.post-content {
    font-family: var(--font-serif);
    font-size: 1.08rem;
    line-height: 1.8;
    color: #2d2d2d;
}
.post-content h2 {
    font-family: var(--font-sans);
    font-size: 1.5rem;
    margin: 36px 0 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--color-border);
}
.post-content h3 {
    font-family: var(--font-sans);
    font-size: 1.2rem;
    margin: 28px 0 12px;
}
.post-content p { margin-bottom: 18px; }
.post-content img {
    border-radius: var(--radius);
    margin: 24px 0;
}
.post-content ul, .post-content ol {
    margin: 16px 0;
    padding-left: 28px;
}
.post-content li { margin-bottom: 6px; }
.post-content blockquote {
    border-left: 4px solid var(--color-accent);
    padding: 16px 20px;
    margin: 24px 0;
    background: var(--color-bg);
    border-radius: 0 var(--radius) var(--radius) 0;
    font-style: italic;
    color: var(--color-text-secondary);
}
.post-content a { color: var(--color-accent); border-bottom: 1px solid transparent; }
.post-content a:hover { border-bottom-color: var(--color-accent); }
.post-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 24px 0;
}
.post-content th, .post-content td {
    padding: 10px 14px;
    border: 1px solid var(--color-border);
    text-align: left;
}
.post-content th { background: var(--color-bg); font-family: var(--font-sans); font-weight: 600; }

/* ==========================================================
   AUTHOR BOX
   ========================================================== */
.author-box {
    display: flex;
    gap: 18px;
    padding: 24px;
    background: var(--color-bg);
    border-radius: var(--radius-lg);
    margin: 36px 0;
    align-items: center;
}
.author-box-avatar {
    flex: 0 0 72px;
}
.author-box-avatar img {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--color-surface);
    box-shadow: var(--shadow-sm);
}
.author-box-label {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--color-accent);
    margin-bottom: 2px;
}
.author-box-name {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 4px;
}
.author-box-name a { color: var(--color-text); }
.author-box-name a:hover { color: var(--color-accent); }
.author-box-bio {
    font-size: 0.85rem;
    color: var(--color-text-secondary);
    line-height: 1.5;
}

/* ==========================================================
   KOMENTARZE
   ========================================================== */
.comments-section {
    margin-top: 36px;
    padding-top: 28px;
    border-top: 2px solid var(--color-border);
}
.comments-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 20px;
}
.comment {
    padding: 18px 0;
    border-bottom: 1px solid var(--color-border);
}
.comment:last-child { border-bottom: none; }

.comment-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}
.comment-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--color-accent);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    flex-shrink: 0;
}
.comment-author {
    font-weight: 600;
    font-size: 0.9rem;
}
.comment-author a { color: var(--color-text); }
.comment-author a:hover { color: var(--color-accent); }
.comment-date {
    font-size: 0.78rem;
    color: var(--color-text-muted);
}
.comment-body {
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--color-text-secondary);
    padding-left: 46px;
}

/* ==========================================================
   BREADCRUMBS
   ========================================================== */
.breadcrumbs {
    padding: 14px 0;
    font-size: 0.8rem;
    color: var(--color-text-muted);
}
.breadcrumbs a { color: var(--color-text-secondary); }
.breadcrumbs a:hover { color: var(--color-accent); }
.breadcrumbs-sep {
    margin: 0 8px;
    color: var(--color-text-muted);
    font-size: 0.7rem;
}

/* ==========================================================
   SIDEBAR
   ========================================================== */
.sidebar { position: sticky; top: 72px; }

.widget {
    background: var(--color-surface);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 16px;
}
.widget-title {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--color-text);
}

/* Widget: About */
.widget-about img {
    width: 100%;
    border-radius: var(--radius);
    margin-bottom: 12px;
}
.widget-about p {
    font-size: 0.88rem;
    color: var(--color-text-secondary);
    line-height: 1.5;
}

/* Widget: Categories */
.widget-categories { list-style: none; }
.widget-categories li {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.widget-categories li a {
    display: block;
    padding: 7px 0;
    color: var(--color-text);
    font-size: 0.88rem;
    flex: 1;
    border-bottom: 1px solid var(--color-bg);
    transition: padding-left var(--transition);
}
.widget-categories li a:hover { color: var(--color-accent); padding-left: 4px; }
.widget-categories .count {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    background: var(--color-bg);
    padding: 2px 8px;
    border-radius: 10px;
}

/* Widget: Recent Posts */
.widget-recent-posts .recent-post {
    display: flex;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid var(--color-bg);
}
.widget-recent-posts .recent-post:last-child { border-bottom: none; }
.widget-recent-posts .rp-title {
    font-size: 0.84rem;
    font-weight: 600;
    line-height: 1.35;
}
.widget-recent-posts .rp-title a { color: var(--color-text); }
.widget-recent-posts .rp-title a:hover { color: var(--color-accent); }
.widget-recent-posts .rp-date {
    font-size: 0.72rem;
    color: var(--color-text-muted);
    margin-top: 3px;
}

/* Widget: Links */
.widget-links { list-style: none; }
.widget-links li a {
    display: block;
    padding: 6px 0;
    font-size: 0.88rem;
    color: var(--color-accent);
    border-bottom: 1px solid var(--color-bg);
}
.widget-links li a:hover { color: var(--color-accent-hover); }

/* Widget: Search */
.widget-search { position: relative; }
.widget-search input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    font-size: 0.88rem;
    background: var(--color-bg);
    transition: border-color var(--transition);
}
.widget-search input:focus {
    outline: none;
    border-color: var(--color-accent);
}

/* Widget: Custom HTML */
.widget-custom-html {
    font-size: 0.88rem;
    line-height: 1.6;
}

/* ==========================================================
   PAGINACJA
   ========================================================== */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 32px 0;
}
.pagination a, .pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 12px;
    border-radius: var(--radius);
    font-size: 0.88rem;
    font-weight: 500;
    transition: background var(--transition), color var(--transition);
}
.pagination a {
    color: var(--color-text);
    background: var(--color-surface);
}
.pagination a:hover {
    background: var(--color-text);
    color: #fff;
}
.pagination .current {
    background: var(--color-text);
    color: #fff;
    font-weight: 700;
}
.pagination .dots { color: var(--color-text-muted); background: none; }
.pagination .prev, .pagination .next { font-weight: 600; }

/* ==========================================================
   STOPKA
   ========================================================== */
.site-footer {
    background: var(--color-footer-bg);
    color: var(--color-footer-text);
    padding: 32px 0 24px;
    margin-top: 40px;
}
.footer-inner {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}
.footer-copy {
    font-size: 0.82rem;
}
.footer-links {
    display: flex;
    gap: 20px;
}
.footer-links a {
    color: var(--color-footer-text);
    font-size: 0.8rem;
    transition: color var(--transition);
}
.footer-links a:hover { color: #fff; }

/* ==========================================================
   STRONA STATYCZNA
   ========================================================== */
.page-content {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    padding: 40px;
    max-width: 780px;
    margin: 0 auto 40px;
}
.page-content h1 {
    font-size: 1.8rem;
    margin-bottom: 20px;
}
.page-content-body {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--color-text-secondary);
}
.page-content-body h2 { margin: 28px 0 12px; font-size: 1.3rem; }
.page-content-body p { margin-bottom: 16px; }
.page-content-body ul, .page-content-body ol { padding-left: 24px; margin-bottom: 16px; }

/* ==========================================================
   STRONA 404
   ========================================================== */
.error-page {
    text-align: center;
    padding: 80px 20px;
}
.error-code {
    font-size: 7rem;
    font-weight: 900;
    color: var(--color-border);
    line-height: 1;
    margin-bottom: 12px;
}
.error-page h1 {
    font-size: 1.5rem;
    margin-bottom: 12px;
}
.error-page p {
    color: var(--color-text-secondary);
    margin-bottom: 24px;
}
.btn-home {
    display: inline-block;
    padding: 12px 28px;
    background: var(--color-text);
    color: #fff;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.9rem;
    transition: background var(--transition);
}
.btn-home:hover { background: var(--color-accent); color: #fff; }

/* ==========================================================
   STRONY PRAWNE (regulamin, polityka, kontakt)
   ========================================================== */
.legal-page {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    padding: 40px;
    max-width: 780px;
    margin: 30px auto 40px;
}
.legal-page h1 {
    font-size: 1.6rem;
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--color-border);
}
.legal-page h2 {
    font-size: 1.15rem;
    margin: 24px 0 10px;
}
.legal-page p, .legal-page li {
    font-size: 0.92rem;
    line-height: 1.7;
    color: var(--color-text-secondary);
}
.legal-page ul { padding-left: 24px; margin-bottom: 14px; }

/* Kontakt */
.contact-form { max-width: 480px; }
.form-group { margin-bottom: 18px; }
.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 5px;
}
.form-group input, .form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-family: var(--font-sans);
    transition: border-color var(--transition);
}
.form-group input:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--color-accent);
}
.form-group textarea { min-height: 120px; resize: vertical; }
.btn-submit {
    display: inline-block;
    padding: 11px 32px;
    background: var(--color-text);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background var(--transition);
}
.btn-submit:hover { background: var(--color-accent); }

.contact-info {
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid var(--color-border);
    font-size: 0.9rem;
    color: var(--color-text-secondary);
}
.contact-info a { color: var(--color-accent); }

.success-msg {
    padding: 14px 20px;
    background: #d4edda;
    color: #155724;
    border-radius: var(--radius);
    font-size: 0.9rem;
    display: none;
}

/* ==========================================================
   RESPONSIVE
   ========================================================== */

/* Tablet landscape */
@media (max-width: 1024px) {
    .hero-grid { grid-template-columns: 1fr 1fr; }
    .hero-grid .tile-featured { grid-row: 1 / 3; }
    .hero-grid .tile-medium:nth-child(2) { grid-column: 2; grid-row: 1; }
    .hero-grid .tile-medium:nth-child(3) { grid-column: 2; grid-row: 2; }
    .hero-grid .tile-small { display: none; }

    .posts-grid { grid-template-columns: repeat(2, 1fr); }
    .content-layout.with-sidebar .sidebar { flex: 0 0 260px; }
}

/* Tablet portrait */
@media (max-width: 768px) {
    .header-inner { height: 70px; }
    .nav-toggle { display: flex; }

    .main-nav {
        display: none;
        position: absolute;
        top: 50px;
        left: 0;
        right: 0;
        background: var(--color-header-bg);
        flex-direction: column;
        padding: 10px 20px 20px;
        border-bottom: 1px solid var(--color-border);
        box-shadow: var(--shadow-lg);
    }
    .main-nav.open { display: flex; }
    .main-nav a { padding: 10px 0; font-size: 0.95rem; border-radius: 0; border-bottom: 1px solid var(--color-bg); }

    .hero-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }
    .hero-grid .tile-featured { grid-column: 1; grid-row: auto; min-height: 280px; }
    .hero-grid .tile-medium { grid-column: 1; grid-row: auto; min-height: 180px; }
    .hero-grid .tile-small { display: block; grid-column: 1; grid-row: auto; min-height: 160px; }

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

    .hcard { flex-direction: column; }
    .hcard-image { flex: none; min-height: 200px; }
    .hcard-body { padding: 16px; }

    .content-layout { flex-direction: column; gap: 24px; }
    .content-layout.with-sidebar .sidebar { flex: none; }
    .sidebar { position: static; }

    .post-header h1 { font-size: 1.5rem; }
    .post-hero { aspect-ratio: 16/9; }

    .page-content, .legal-page { padding: 24px; margin: 20px auto 30px; }
    .footer-inner { flex-direction: column; text-align: center; }
}

/* Mobile */
@media (max-width: 480px) {
    .container { padding: 0 14px; }
    .tile-featured { min-height: 240px; }
    .tile-featured .tile-title { font-size: 1.15rem; }
    .post-header h1 { font-size: 1.3rem; }
    .category-header h1 { font-size: 1.4rem; }
    .error-code { font-size: 5rem; }
    .page-content, .legal-page { padding: 18px; }
    .author-box { flex-direction: column; text-align: center; }
    .author-box-avatar { flex: none; }
}

/* ==========================================================
   UTILITY
   ========================================================== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    border: 0;
}
.no-posts-msg {
    text-align: center;
    padding: 60px 20px;
    color: var(--color-text-muted);
    font-size: 1.1rem;
}
