/* GTR Lux Okna — Blog Custom Theme */
/* Light + Steel Cyan — spojny ze strona glowna (theme-light.css) */

/* === Fonts (preconnect w HTML) === */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400&family=Inter:wght@300;400;500;600&display=swap');

/* === Tokens lokalne — dziedziczone z theme-light.css === */
.theme-active-light {
    --blog-text:        hsl(var(--foreground));        /* 222 47% 11% */
    --blog-text-muted:  hsl(var(--muted-foreground));  /* 215 16% 47% */
    --blog-text-soft:   hsl(215 25% 27%);              /* body content */
    --blog-bg:          hsl(var(--background));        /* white */
    --blog-bg-alt:      hsl(var(--surface-1));         /* 210 40% 98% */
    --blog-card:        hsl(var(--card));              /* 210 40% 99% */
    --blog-border:      hsl(var(--border));            /* 214 32% 88% */
    --blog-border-soft: hsl(214 32% 92%);
    --blog-primary:     hsl(var(--primary));           /* cyan #0EA5E9 */
    --blog-primary-soft: hsl(199 89% 48% / 0.08);
    --blog-primary-glow: hsl(199 89% 48% / 0.18);
    --blog-cyan-grad:   linear-gradient(135deg, #0EA5E9 0%, #38BDF8 50%, #0369A1 100%);
    --blog-radius:      0.875rem;
    --blog-shadow-sm:   0 2px 8px -2px hsl(214 32% 50% / 0.08);
    --blog-shadow:      0 12px 32px -16px hsl(214 32% 30% / 0.18);
    --blog-shadow-lg:   0 24px 60px -24px hsl(214 32% 30% / 0.22);
    --blog-shadow-glow: 0 0 40px -8px hsl(199 89% 48% / 0.28);
    --blog-max:         860px;
    --blog-max-post:    720px;
}

/* === Base — reset koloru, body bialy === */
.theme-active-light body {
    background: var(--blog-bg);
    color: var(--blog-text);
    font-family: 'Inter', system-ui, sans-serif;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    margin: 0;
}

/* Container z blog.css — szerokosc i padding */
.theme-active-light main.container {
    max-width: var(--blog-max);
    margin: 0 auto;
    padding: 4rem 1.5rem 2rem;
}
.theme-active-light main.container-narrow {
    max-width: var(--blog-max-post);
    margin: 0 auto;
    padding: 4rem 1.5rem 2rem;
}

/* === Hero — sekcja powitalna === */
.theme-active-light .blog-hero {
    min-height: 30vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: linear-gradient(135deg, hsl(var(--surface-deeper)) 0%, hsl(var(--surface-1)) 100%);
    border-bottom: 1px solid hsl(var(--border));
    padding: 3rem 1.5rem;
    position: relative;
    overflow: hidden;
}
.theme-active-light .blog-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 50% 120%, hsl(var(--primary) / 0.08) 0%, transparent 70%);
}
.theme-active-light .blog-hero > * {
    position: relative;
    z-index: 1;
    margin: 0;
}
.theme-active-light .blog-hero-label {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--blog-primary);
    margin-bottom: 0.85rem;
}
.theme-active-light .blog-hero h1 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(2rem, 5vw, 3.25rem);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.01em;
    background: var(--gradient-gold);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.65rem;
}
.theme-active-light .blog-hero-subtitle {
    color: var(--blog-text-muted);
    font-size: 1rem;
    max-width: 520px;
    line-height: 1.6;
}

/* === Search === */
.theme-active-light .search-form {
    margin: 0 0 2.5rem;
    position: relative;
}
.theme-active-light .search-input {
    width: 100%;
    padding: 0.95rem 1.1rem 0.95rem 3rem;
    background: var(--blog-card);
    border: 1px solid var(--blog-border);
    border-radius: var(--blog-radius);
    color: var(--blog-text);
    font-size: 0.95rem;
    font-family: 'Inter', system-ui, sans-serif;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
    box-shadow: var(--blog-shadow-sm);
}
.theme-active-light .search-input::placeholder {
    color: var(--blog-text-muted);
}
.theme-active-light .search-input:focus {
    outline: none;
    border-color: var(--blog-primary);
    background: var(--blog-bg);
    box-shadow: 0 0 0 4px var(--blog-primary-soft), var(--blog-shadow-sm);
}
.theme-active-light .search-form::before {
    content: '';
    position: absolute;
    left: 1.05rem;
    top: 50%;
    transform: translateY(-50%);
    width: 1.1rem;
    height: 1.1rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.3-4.3'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    pointer-events: none;
    opacity: 0.85;
}

.theme-active-light .search-info {
    color: var(--blog-text-muted);
    font-size: 0.9rem;
    margin: -1rem 0 1.75rem;
}
.theme-active-light .search-info a {
    color: var(--blog-primary);
    text-decoration: none;
    font-weight: 500;
}
.theme-active-light .search-info a:hover {
    text-decoration: underline;
}

/* === Post Cards (lista) === */
.theme-active-light .post-card {
    background: var(--blog-card);
    border: 1px solid var(--blog-border-soft);
    border-radius: var(--blog-radius);
    padding: 1.75rem 1.75rem 1.5rem;
    margin-bottom: 1.25rem;
    box-shadow: var(--blog-shadow-sm);
    transition: border-color 0.3s, box-shadow 0.3s, transform 0.3s;
    position: relative;
    overflow: hidden;
}
.theme-active-light .post-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 3px;
    height: 100%;
    background: var(--blog-cyan-grad);
    opacity: 0;
    transition: opacity 0.3s;
}
.theme-active-light .post-card:hover {
    border-color: hsl(199 89% 48% / 0.35);
    box-shadow: var(--blog-shadow-lg);
    transform: translateY(-3px);
}
.theme-active-light .post-card:hover::before {
    opacity: 1;
}

.theme-active-light .post-card h2 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.45rem;
    font-weight: 600;
    margin: 0 0 0.5rem;
    line-height: 1.3;
}
.theme-active-light .post-card h2 a {
    color: var(--blog-text);
    text-decoration: none;
    transition: color 0.2s;
    background-image: linear-gradient(var(--blog-primary), var(--blog-primary));
    background-position: 0 100%;
    background-repeat: no-repeat;
    background-size: 0% 1.5px;
    transition: background-size 0.3s ease, color 0.2s;
    padding-bottom: 1px;
}
.theme-active-light .post-card h2 a:hover {
    color: var(--blog-primary);
    background-size: 100% 1.5px;
}

.theme-active-light .post-meta {
    color: var(--blog-text-muted);
    font-size: 0.78rem;
    margin-bottom: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.55rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 500;
}
.theme-active-light .post-meta::before {
    content: '';
    display: inline-block;
    width: 0.4rem;
    height: 0.4rem;
    background: var(--blog-cyan-grad);
    border-radius: 50%;
    flex-shrink: 0;
}

.theme-active-light .post-excerpt {
    color: var(--blog-text-soft);
    font-size: 0.98rem;
    line-height: 1.65;
    margin: 0;
}

.theme-active-light .post-image {
    display: block;
    width: calc(100% + 3.5rem);
    margin: -1.75rem -1.75rem 1.25rem;
    border-radius: var(--blog-radius) var(--blog-radius) 0 0;
    object-fit: cover;
    max-height: 320px;
    aspect-ratio: 16 / 9;
}

.theme-active-light .read-more {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 1rem;
    color: var(--blog-primary);
    text-decoration: none;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    transition: gap 0.2s, color 0.2s;
}
.theme-active-light .read-more::after {
    content: '→';
    transition: transform 0.2s;
}
.theme-active-light .read-more:hover {
    gap: 0.65rem;
    color: hsl(199 89% 38%);
}
.theme-active-light .read-more:hover::after {
    transform: translateX(2px);
}

/* === Article Header (single post) === */
.theme-active-light .article-header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--blog-border-soft);
}

.theme-active-light .article-header h1 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(1.75rem, 4vw, 2.75rem);
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 0.75rem;
    color: var(--blog-text);
    letter-spacing: -0.01em;
}

.theme-active-light .article-meta {
    color: var(--blog-text-muted);
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.55rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 500;
}
.theme-active-light .article-meta::before {
    content: '';
    display: inline-block;
    width: 0.4rem;
    height: 0.4rem;
    background: var(--blog-cyan-grad);
    border-radius: 50%;
    flex-shrink: 0;
}

.theme-active-light .featured-image {
    width: 100%;
    border-radius: var(--blog-radius);
    margin-bottom: 2rem;
    object-fit: cover;
    max-height: 420px;
    box-shadow: var(--blog-shadow);
}

/* === Post Content Typography === */
.theme-active-light .post-content {
    font-size: 1.04rem;
    line-height: 1.8;
    color: var(--blog-text-soft);
    max-width: var(--blog-max-post);
}

.theme-active-light .post-content h2 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.65rem;
    font-weight: 600;
    margin: 2.5rem 0 0.85rem;
    color: var(--blog-text);
    line-height: 1.3;
    letter-spacing: -0.005em;
}
.theme-active-light .post-content h3 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.3rem;
    font-weight: 600;
    margin: 2rem 0 0.65rem;
    color: var(--blog-text);
}
.theme-active-light .post-content h4 {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 0.78rem;
    font-weight: 600;
    margin: 1.5rem 0 0.5rem;
    color: var(--blog-primary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.theme-active-light .post-content p {
    margin-bottom: 1.15rem;
}

.theme-active-light .post-content ul,
.theme-active-light .post-content ol {
    margin: 1.15rem 0;
    padding-left: 1.5rem;
}
.theme-active-light .post-content li {
    margin-bottom: 0.5rem;
}
.theme-active-light .post-content li::marker {
    color: var(--blog-primary);
}

.theme-active-light .post-content a {
    color: var(--blog-primary);
    text-decoration: underline;
    text-decoration-color: hsl(199 89% 48% / 0.35);
    text-underline-offset: 0.2em;
    transition: color 0.2s, text-decoration-color 0.2s;
    font-weight: 500;
}
.theme-active-light .post-content a:hover {
    color: hsl(199 89% 38%);
    text-decoration-color: hsl(199 89% 48%);
}

.theme-active-light .post-content blockquote {
    border-left: 3px solid var(--blog-primary);
    padding: 0.85rem 1.4rem;
    margin: 1.5rem 0;
    background: var(--blog-primary-soft);
    border-radius: 0 var(--blog-radius) var(--blog-radius) 0;
    color: var(--blog-text);
    font-style: italic;
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.05em;
}

.theme-active-light .post-content pre {
    background: hsl(222 47% 11%);
    color: hsl(210 40% 96%);
    border: 1px solid hsl(222 47% 18%);
    padding: 1.1rem 1.25rem;
    border-radius: var(--blog-radius);
    overflow-x: auto;
    margin: 1.25rem 0;
    font-size: 0.88rem;
    line-height: 1.55;
}

.theme-active-light .post-content code {
    background: var(--blog-bg-alt);
    color: hsl(199 89% 35%);
    padding: 0.12rem 0.45rem;
    border-radius: 4px;
    font-size: 0.88em;
    border: 1px solid var(--blog-border-soft);
    font-family: 'JetBrains Mono', ui-monospace, monospace;
}
.theme-active-light .post-content pre code {
    background: none;
    padding: 0;
    border: none;
    color: inherit;
    font-size: inherit;
}

.theme-active-light .post-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--blog-radius);
    box-shadow: var(--blog-shadow);
    margin: 1.5rem 0;
}

.theme-active-light .post-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: 0.92rem;
    border-radius: var(--blog-radius);
    overflow: hidden;
    box-shadow: var(--blog-shadow-sm);
}
.theme-active-light .post-content th,
.theme-active-light .post-content td {
    padding: 0.75rem 0.95rem;
    border: 1px solid var(--blog-border-soft);
    text-align: left;
}
.theme-active-light .post-content th {
    background: var(--blog-bg-alt);
    color: var(--blog-text);
    font-weight: 600;
    font-family: 'Inter', system-ui, sans-serif;
    text-transform: uppercase;
    font-size: 0.78rem;
    letter-spacing: 0.06em;
}
.theme-active-light .post-content tr:hover td {
    background: var(--blog-primary-soft);
}

/* === Tags === */
.theme-active-light .post-tag,
.theme-active-light .tag {
    display: inline-block;
    background: var(--blog-primary-soft);
    color: hsl(199 89% 38%);
    border: 1px solid hsl(199 89% 48% / 0.25);
    border-radius: 6px;
    padding: 0.15rem 0.65rem;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-decoration: none;
    transition: background 0.2s, border-color 0.2s;
}
.theme-active-light .post-tag:hover,
.theme-active-light .tag:hover {
    background: hsl(199 89% 48% / 0.16);
    border-color: hsl(199 89% 48% / 0.45);
}

/* === Back link === */
.theme-active-light .back-to-blog {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 2.5rem;
    padding: 0.7rem 1.4rem;
    background: var(--blog-bg);
    color: var(--blog-text);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 500;
    border: 1px solid var(--blog-border);
    border-radius: var(--blog-radius);
    transition: all 0.2s;
    box-shadow: var(--blog-shadow-sm);
}
.theme-active-light .back-to-blog::before {
    content: '←';
    transition: transform 0.2s;
}
.theme-active-light .back-to-blog:hover {
    border-color: var(--blog-primary);
    color: var(--blog-primary);
    transform: translateX(-2px);
    box-shadow: var(--blog-shadow);
}
.theme-active-light .back-to-blog:hover::before {
    transform: translateX(-2px);
}

/* === Pagination === */
.theme-active-light .pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.4rem;
    padding: 3rem 0 1.5rem;
}

.theme-active-light .page-link {
    padding: 0.55rem 0.95rem;
    border-radius: 8px;
    text-decoration: none;
    color: var(--blog-text);
    font-size: 0.88rem;
    font-weight: 500;
    border: 1px solid var(--blog-border);
    background: var(--blog-bg);
    transition: all 0.2s;
    min-width: 2.5rem;
    text-align: center;
}
.theme-active-light .page-link:hover {
    color: var(--blog-primary);
    border-color: var(--blog-primary);
    background: var(--blog-primary-soft);
}
.theme-active-light .page-link.active {
    background: var(--blog-cyan-grad);
    color: #fff;
    border-color: transparent;
    font-weight: 600;
    box-shadow: var(--blog-shadow-glow);
}

/* === Empty / 404 === */
.theme-active-light .empty {
    text-align: center;
    padding: 4rem 1.25rem;
    color: var(--blog-text-muted);
    background: var(--blog-card);
    border: 1px solid var(--blog-border-soft);
    border-radius: var(--blog-radius);
}
.theme-active-light .empty p {
    margin: 0;
    font-size: 1rem;
}

.theme-active-light .not-found {
    text-align: center;
    padding: 5rem 1.25rem;
}
.theme-active-light .not-found h1 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 4.5rem;
    font-weight: 700;
    background: var(--blog-cyan-grad);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0 0 0.65rem;
    line-height: 1;
}
.theme-active-light .not-found p {
    color: var(--blog-text-muted);
    margin: 0 0 1.5rem;
    font-size: 1rem;
}

/* === Preview banner === */
.theme-active-light .preview-banner {
    background: var(--blog-primary-soft);
    color: hsl(199 89% 35%);
    border-bottom: 1px solid hsl(199 89% 48% / 0.3);
    padding: 0.7rem 1.25rem;
    text-align: center;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

/* === Selection === */
.theme-active-light ::selection {
    background: hsl(199 89% 48% / 0.22);
    color: var(--blog-text);
}

/* === Scrollbar (subtle) === */
.theme-active-light ::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
.theme-active-light ::-webkit-scrollbar-track {
    background: var(--blog-bg-alt);
}
.theme-active-light ::-webkit-scrollbar-thumb {
    background: hsl(214 32% 80%);
    border-radius: 4px;
}
.theme-active-light ::-webkit-scrollbar-thumb:hover {
    background: var(--blog-primary);
}

/* === Responsive === */
@media (max-width: 640px) {
    .theme-active-light main.container,
    .theme-active-light main.container-narrow {
        padding: 2.5rem 1.25rem 1.5rem;
    }
    .theme-active-light .post-card {
        padding: 1.4rem 1.25rem;
    }
    .theme-active-light .post-card h2 {
        font-size: 1.25rem;
    }
    .theme-active-light .post-image {
        width: calc(100% + 2.5rem);
        margin: -1.4rem -1.25rem 1rem;
        max-height: 220px;
    }
    .theme-active-light .article-header h1 {
        font-size: 1.65rem;
    }
    .theme-active-light .post-content {
        font-size: 1rem;
    }
    .theme-active-light .post-content h2 {
        font-size: 1.4rem;
    }
    .theme-active-light .post-content h3 {
        font-size: 1.15rem;
    }
    .theme-active-light .pagination {
        gap: 0.25rem;
    }
    .theme-active-light .page-link {
        padding: 0.45rem 0.7rem;
        min-width: 2.25rem;
        font-size: 0.82rem;
    }
    .theme-active-light .not-found h1 {
        font-size: 3.25rem;
    }
}
