/*
Theme Name: Szpont Theme
Theme URI: https://test.hackflow.pl
Author: Hackflow
Author URI: https://hackflow.pl
Description: Motyw blogowy dla test.hackflow.pl
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: szpont-theme
Tags: blog, custom-logo, featured-images, threaded-comments
*/

/* ==========================================================================
   Reset & Base
   ========================================================================== */

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

:root {
    --color-primary: #1a1a2e;
    --color-accent: #e94560;
    --color-bg: #f5f5f5;
    --color-surface: #ffffff;
    --color-text: #333333;
    --color-text-muted: #777777;
    --color-border: #e0e0e0;
    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
    --radius: 6px;
    --shadow: 0 2px 8px rgba(0,0,0,0.08);
    --max-width: 1100px;
    --content-width: 720px;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.7;
}

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

a {
    color: var(--color-accent);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* ==========================================================================
   Layout
   ========================================================================== */

.site {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.site-content {
    flex: 1;
}

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

.content-area {
    max-width: var(--content-width);
    margin: 0 auto;
}

/* ==========================================================================
   Header
   ========================================================================== */

.site-header {
    background: var(--color-primary);
    color: #fff;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.site-branding a {
    color: #fff;
    text-decoration: none;
}

.site-title {
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

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

.site-description {
    font-size: 0.8rem;
    opacity: 0.6;
    margin-top: 0.15rem;
}

/* ==========================================================================
   Navigation
   ========================================================================== */

.main-navigation ul {
    list-style: none;
    display: flex;
    gap: 0.25rem;
}

.main-navigation a {
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    padding: 0.4rem 0.8rem;
    border-radius: var(--radius);
    font-size: 0.9rem;
    transition: background 0.2s, color 0.2s;
}

.main-navigation a:hover,
.main-navigation .current-menu-item > a {
    background: rgba(255,255,255,0.1);
    color: #fff;
}

/* ==========================================================================
   Posts List
   ========================================================================== */

.posts-wrap {
    padding: 3rem 0;
}

.posts-grid {
    display: grid;
    gap: 1.5rem;
}

.post-card {
    background: var(--color-surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.post-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.12);
}

.post-card-thumbnail img {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.post-card-body {
    padding: 1.5rem;
}

.post-card-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.8rem;
    color: var(--color-text-muted);
    margin-bottom: 0.75rem;
}

.post-card-title {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 0.75rem;
}

.post-card-title a {
    color: var(--color-text);
    text-decoration: none;
}

.post-card-title a:hover {
    color: var(--color-accent);
}

.post-card-excerpt {
    color: var(--color-text-muted);
    font-size: 0.95rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.read-more {
    display: inline-block;
    margin-top: 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-accent);
}

/* ==========================================================================
   Single Post
   ========================================================================== */

.post-single {
    padding: 3rem 0;
}

.post-header {
    margin-bottom: 2rem;
}

.post-header .post-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.85rem;
    color: var(--color-text-muted);
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.post-header .entry-title {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.03em;
}

.post-thumbnail {
    margin-bottom: 2rem;
    border-radius: var(--radius);
    overflow: hidden;
}

.post-thumbnail img {
    width: 100%;
    max-height: 480px;
    object-fit: cover;
}

/* Entry content typography */
.entry-content {
    font-size: 1.05rem;
    line-height: 1.8;
}

.entry-content h2,
.entry-content h3,
.entry-content h4 {
    font-weight: 700;
    line-height: 1.3;
    margin: 2rem 0 0.75rem;
}

.entry-content h2 { font-size: 1.6rem; }
.entry-content h3 { font-size: 1.3rem; }
.entry-content h4 { font-size: 1.1rem; }

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

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

.entry-content li {
    margin-bottom: 0.4rem;
}

.entry-content blockquote {
    border-left: 4px solid var(--color-accent);
    padding: 0.75rem 1.25rem;
    margin: 1.5rem 0;
    background: rgba(233,69,96,0.05);
    border-radius: 0 var(--radius) var(--radius) 0;
    font-style: italic;
    color: var(--color-text-muted);
}

.entry-content pre,
.entry-content code {
    font-family: var(--font-mono);
    font-size: 0.9rem;
}

.entry-content code {
    background: #f0f0f0;
    padding: 0.15em 0.4em;
    border-radius: 3px;
}

.entry-content pre {
    background: var(--color-primary);
    color: #e8e8e8;
    padding: 1.25rem;
    border-radius: var(--radius);
    overflow-x: auto;
    margin-bottom: 1.25rem;
}

.entry-content pre code {
    background: none;
    padding: 0;
    color: inherit;
}

.entry-content img {
    border-radius: var(--radius);
    margin: 1.5rem 0;
}

.entry-content a {
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

/* Post tags */
.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--color-border);
}

.tag-badge {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    padding: 0.25rem 0.75rem;
    border-radius: 99px;
    font-size: 0.8rem;
    color: var(--color-text-muted);
    text-decoration: none;
}

.tag-badge:hover {
    background: var(--color-accent);
    border-color: var(--color-accent);
    color: #fff;
    text-decoration: none;
}

/* Post navigation */
.post-navigation {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--color-border);
}

.nav-previous,
.nav-next {
    background: var(--color-surface);
    padding: 1rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.nav-next {
    text-align: right;
}

.nav-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-text-muted);
    display: block;
    margin-bottom: 0.25rem;
}

.nav-title {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--color-text);
    text-decoration: none;
}

.nav-title:hover {
    color: var(--color-accent);
    text-decoration: none;
}

/* ==========================================================================
   Categories / Tags Archive
   ========================================================================== */

.archive-header {
    padding: 2.5rem 0 0;
}

.archive-title {
    font-size: 1.75rem;
    font-weight: 800;
}

.archive-description {
    color: var(--color-text-muted);
    margin-top: 0.5rem;
}

/* ==========================================================================
   Pagination
   ========================================================================== */

.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    padding: 2rem 0 3rem;
}

.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-text);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    text-decoration: none;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}

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

/* ==========================================================================
   Comments
   ========================================================================== */

.comments-area {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--color-border);
}

.comments-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.comment-list {
    list-style: none;
    margin-bottom: 2rem;
}

.comment {
    padding: 1rem 0;
    border-bottom: 1px solid var(--color-border);
}

.comment-author-name {
    font-weight: 600;
    font-size: 0.95rem;
}

.comment-date {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    margin-left: 0.5rem;
}

.comment-content {
    margin-top: 0.5rem;
    font-size: 0.95rem;
}

/* Comment form */
.comment-form label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.35rem;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 0.6rem 0.9rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    font-family: var(--font-sans);
    font-size: 0.95rem;
    background: var(--color-surface);
    margin-bottom: 1rem;
    transition: border-color 0.2s;
}

.comment-form input:focus,
.comment-form textarea:focus {
    outline: none;
    border-color: var(--color-accent);
}

.comment-form textarea {
    height: 140px;
    resize: vertical;
}

.comment-form .submit,
.btn {
    background: var(--color-accent);
    color: #fff;
    border: none;
    padding: 0.6rem 1.4rem;
    border-radius: var(--radius);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
}

.comment-form .submit:hover,
.btn:hover {
    opacity: 0.88;
}

/* ==========================================================================
   Sidebar / Widgets
   ========================================================================== */

.widget-area {
    padding: 2rem 0;
}

.widget {
    background: var(--color-surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

.widget-title {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-text-muted);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--color-border);
}

.widget ul {
    list-style: none;
}

.widget ul li {
    padding: 0.35rem 0;
    border-bottom: 1px solid var(--color-border);
    font-size: 0.9rem;
}

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

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
    background: var(--color-primary);
    color: rgba(255,255,255,0.7);
    text-align: center;
    padding: 1.5rem 0;
    font-size: 0.85rem;
}

.site-footer a {
    color: var(--color-accent);
}

/* ==========================================================================
   404 / No Results
   ========================================================================== */

.not-found-wrap,
.no-results-wrap {
    padding: 5rem 0;
    text-align: center;
}

.not-found-wrap h1,
.no-results-wrap h2 {
    font-size: 4rem;
    font-weight: 800;
    color: var(--color-accent);
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (min-width: 768px) {
    .posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .site-layout-sidebar {
        display: grid;
        grid-template-columns: 1fr 300px;
        gap: 2rem;
        align-items: start;
    }
}

@media (min-width: 1024px) {
    .posts-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 600px) {
    .site-header .container {
        flex-direction: column;
        align-items: flex-start;
    }

    .post-navigation {
        grid-template-columns: 1fr;
    }

    .post-header .entry-title {
        font-size: 1.5rem;
    }
}
