:root {
    --background-color: #ffffff;
    --text-color: #000000;
    --primary-color: #000000;
    --secondary-color: #757575;
    --border-color: #eeeeee;
    --header-bg: rgba(255, 255, 255, 0.9);
    --footer-bg: #000000;
    --footer-text: #ffffff;
    --service-item-bg: transparent;
}

body.dark-mode {
    --background-color: #121212;
    --text-color: #ffffff;
    --primary-color: #ffffff;
    --secondary-color: #a0a0a0;
    --border-color: #2e2e2e;
    --header-bg: rgba(18, 18, 18, 0.9);
    --footer-bg: #121212;
    --footer-text: #ffffff;
    --service-item-bg: #1e1e1e;
}

/* Podstawowe style */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { overflow-x: hidden; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.7;
    font-weight: 400;
    cursor: default;
    transition: background-color 0.3s ease, color 0.3s ease;
}
body.mobile-nav-open { overflow: hidden; }

a, button { cursor: pointer; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* EFEKT ŚLADU KURSORA */
.trail-particle { position: fixed; z-index: 9999; width: 15px; height: 15px; border-radius: 50%; pointer-events: none; transform: translate(-50%, -50%); animation: particle-fade 500ms forwards; }
@keyframes particle-fade { from { opacity: 1; transform: translate(-50%, -50%) scale(1); } to { opacity: 0; transform: translate(-50%, -50%) scale(0); } }

/* Nagłówki */
h1, h2, h3, p { overflow-wrap: break-word; word-wrap: break-word; }
h1, h2, h3 { font-weight: 600; line-height: 1.2; color: var(--primary-color); }
h1 { font-size: 4rem; margin-bottom: 1rem; }
h2 { font-size: 3rem; margin-bottom: 1rem; }
p { margin-bottom: 1rem; color: var(--secondary-color); font-size: 1.1rem; }

/* Nawigacja */
header {
    position: fixed;
    width: 100%;
    z-index: 10000 !important;
    background-color: var(--header-bg);
    /* backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px); */
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.3s ease, border-color 0.3s ease;
}
nav { display: flex; justify-content: space-between; align-items: center; height: 80px; }
.logo-container { z-index: 1000; }
.nav-logo { height: 30px; }
.logo-light { display: none; }
body.dark-mode .logo-dark { display: none; }
body.dark-mode .logo-light { display: block; }

.nav-controls { display: flex; align-items: center; gap: 1rem; }
.nav-links { list-style: none; display: flex; gap: 2.5rem; }
.nav-links a { color: var(--text-color); text-decoration: none; font-weight: 500; position: relative; padding: 5px 0; }
.nav-links a::after { content: ''; position: absolute; width: 0; height: 2px; background-color: var(--primary-color); left: 0; bottom: 0; transition: width 0.3s ease; }
.nav-links a:hover::after { width: 100%; }

.burger-menu { display: none; cursor: pointer; z-index: 1001; position: relative; }
.burger-menu div { width: 25px; height: 2px; background-color: var(--text-color); margin: 6px 0; transition: all 0.3s ease; }

#theme-toggle, #lang-toggle {
    background-color: var(--border-color);
    border: none;
    color: var(--text-color);
    font-size: 1rem;
    font-weight: 600;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease, color 0.3s ease;
}
#theme-toggle:hover, #lang-toggle:hover { background-color: var(--secondary-color); }

/* Główny content */
main { padding-top: 80px; }
section { padding: 6rem 0; }
.section-title { text-align: center; margin-bottom: 4rem; }
.section-title h2 { margin-bottom: 0.5rem; }
.section-title p { max-width: 600px; margin: 0 auto; font-size: 1.2rem; }

/* Sekcja Hero */
#hero { display: flex; align-items: center; min-height: calc(100vh - 80px); text-align: center; padding: 4rem 0; }
.hero-content { max-width: 900px; margin: 0 auto; }
.hero-content h1 { font-size: 4.5rem; min-height: 12rem; }
.typed-cursor { font-weight: 100; opacity: 1; animation: typedjsBlink 0.7s infinite; }
@keyframes typedjsBlink { 50% { opacity: 0.0; } }

/* Pozostałe sekcje */
.cta-button { display: inline-block; background-color: var(--primary-color); color: var(--background-color); padding: 1rem 3rem; text-decoration: none; border-radius: 50px; font-weight: 600; margin-top: 2rem; transition: transform 0.3s ease, background-color 0.3s ease, color 0.3s ease; border: 2px solid var(--primary-color); }
.cta-button:hover { transform: translateY(-3px); background-color: #333; }
body.dark-mode .cta-button:hover { background-color: #ddd; }
.cta-button.secondary { background-color: transparent; color: var(--primary-color); }
.cta-button.secondary:hover { background-color: var(--primary-color); color: var(--background-color); }

.about-content { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; }
.about-text p { font-size: 1.2rem; line-height: 1.8; }
.about-stats { display: flex; gap: 2rem; text-align: center; }
.stat-item h3 { font-size: 3rem; font-weight: 700; }

.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; }
.service-item { border: 1px solid var(--border-color); padding: 2.5rem; border-radius: 10px; transition: border-color 0.3s ease, transform 0.3s ease, background-color 0.3s ease; background-color: var(--service-item-bg); }
.service-item:hover { border-color: var(--primary-color); transform: translateY(-5px); }
.service-number { font-size: 1.5rem; font-weight: 600; color: var(--secondary-color); margin-bottom: 1rem; }
.service-item h3 { font-size: 1.5rem; margin-bottom: 0.5rem; }

#blog { margin-top: 4rem; }
.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; margin-bottom: 3rem; }
.blog-tile { position: relative; aspect-ratio: 1 / 1; overflow: hidden; border-radius: 10px; background-color: #f5f5f5; }
body.dark-mode .blog-tile { background-color: #222; }
.blog-tile-image { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.blog-tile:hover .blog-tile-image { transform: scale(1.05); }
.blog-tile-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.6); color: #fff; display: flex; align-items: center; justify-content: center; text-align: center; padding: 1.5rem; opacity: 0; transition: opacity 0.4s ease; }
.blog-tile:hover .blog-tile-overlay { opacity: 1; }
.blog-tile-title { font-size: 1.5rem; font-weight: 600; transform: translateY(10px); transition: transform 0.4s ease; color: #ffffff; }
.blog-tile:hover .blog-tile-title { transform: translateY(0); }
.blog-button-wrapper { text-align: center; margin-top: 2rem; }

.contact-wrapper { display: grid; grid-template-columns: 1fr 1.5fr; gap: 4rem; text-align: left; }
.contact-info p { font-size: 1rem; margin-bottom: 0.8rem; display: flex; align-items: center; gap: 10px; }
.contact-info a { color: var(--secondary-color); text-decoration: none; }
.contact-info a:hover { color: var(--primary-color); }
#contact-form { display: flex; flex-direction: column; gap: 1.5rem; }
#contact-form input, #contact-form textarea { width: 100%; padding: 1rem; border: 1px solid var(--border-color); border-radius: 5px; font-family: 'Poppins', sans-serif; font-size: 1rem; background-color: var(--background-color); color: var(--text-color); transition: background-color 0.3s ease; }
#contact-form input:focus, #contact-form textarea:focus { outline: 2px solid var(--primary-color); }
#form-status { margin-top: 1rem; font-weight: 500; }

footer { margin-top: 2rem; background-color: var(--footer-bg); color: var(--footer-text); padding: 4rem 0 2rem; transition: background-color 0.3s ease; border-top: 1px solid var(--border-color);}
.footer-content { display: flex; flex-direction: column; align-items: center; }
.footer-logo { margin-bottom: 2rem; }
.footer-logo img { height: 35px; }
footer .logo-light { display: block; } 
footer .logo-dark { display: none; }
.footer-links { margin-bottom: 2rem; display: flex; justify-content: center; gap: 2rem; flex-wrap: wrap; }
.footer-links a { color: var(--footer-text); text-decoration: none; }
.social-links { margin-bottom: 2rem; display: flex; justify-content: center; gap: 1.5rem; }
.social-links a { color: var(--footer-text); font-size: 1.5rem; }
.footer-copy p { color: var(--secondary-color); font-size: 0.9rem; }
.animate-fade-in, .animate-slide-up { opacity: 0; transition: opacity 0.6s ease-out, transform 0.6s ease-out; }
.animate-fade-in { transform: translateY(20px); }
.animate-slide-up { transform: translateY(50px); }

/* --- RESPONSIVE DESIGN --- */
@media (max-width: 992px) { h1, .hero-content h1 { font-size: 3.5rem; } h2 { font-size: 2.5rem; } .hero-content h1 { min-height: auto; } .about-stats { flex-direction: column; } }

/* ---- Telefony (do 768px) ---- */
@media (max-width: 768px) {
    .about-content, .contact-wrapper, .blog-grid, .services-grid { grid-template-columns: 1fr; }
    .blog-grid, .services-grid { gap: 3rem; }
    h1, .hero-content h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }
    section { padding: 4rem 0; }
    .about-text { text-align: center; }

    .nav-links { display: none; }
    #theme-toggle { display: none; }
    #lang-toggle { display: none; }
    .burger-menu { display: block; 
	z-index: 10002 !important;
        position: relative;}
    
    .nav-controls {
        position: fixed; top: 0; left: 0; width: 100%; height: 100%;
        background-color: var(--background-color) !important;
        display: flex; flex-direction: column; justify-content: center; align-items: center;
        z-index: 10001 !important;
        transform: translateX(100%);
        transition: transform 0.4s cubic-bezier(0.77, 0, 0.175, 1), background-color 0.3s ease;
        padding: 2rem; overflow-y: auto;
    }
    .nav-controls.nav-active { opacity: 1; pointer-events: auto; transform: translateY(0); }
    
    .nav-controls .nav-links { display: flex; flex-direction: column; gap: 2rem; text-align: center; margin-bottom: 3rem; }
    .nav-controls .nav-links a { font-size: 1.8rem; }
    
    .nav-controls #theme-toggle,
    .nav-controls #lang-toggle { display: flex; font-size: 1.2rem; width: 50px; height: 50px; margin-top: 0; }

    .burger-menu.toggle .line1 { transform: rotate(-45deg) translate(-7px, 7px); }
    .burger-menu.toggle .line2 { opacity: 0; }
    .burger-menu.toggle .line3 { transform: rotate(45deg) translate(-6px, -6px); }
}

/* --- GLOBALNE STYLE BLOGA --- */
#blog-filters { margin-bottom: 4rem; padding-bottom: 2rem; border-bottom: 1px solid var(--border-color); display: flex; flex-direction: column; gap: 1.5rem; }
.filter-group { display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; }
.filter-group h4 { margin: 0; font-size: 1.1rem; white-space: nowrap; color: var(--primary-color); }
.filter-buttons { display: flex; gap: 0.8rem; flex-wrap: wrap; }
.filter-button { background-color: transparent; border: 1px solid var(--border-color); color: var(--secondary-color); padding: 0.5rem 1.2rem; border-radius: 50px; font-family: 'Poppins', sans-serif; font-weight: 500; font-size: 0.9rem; cursor: pointer; transition: all 0.3s ease; }
.filter-button:hover { border-color: var(--primary-color); color: var(--primary-color); }
.filter-button.active { background-color: var(--primary-color); color: var(--background-color); border-color: var(--primary-color); }

/* --- POPRAWIONE STYLE DLA POJEDYNCZEGO WPISU --- */
#single-post-page {
    padding-top: 120px; /* Odstęp od przyklejonego menu */
    padding-bottom: 6rem;
    max-width: 800px; /* Optymalna szerokość do czytania */
    margin: 0 auto;
}

#post-header { 
    text-align: center; 
    margin-bottom: 2.5rem; 
	position: static;
}

#post-title { 
    font-size: 2.8rem; 
    line-height: 1.2; 
    margin-top: 1rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.post-meta { 
    font-size: 0.9rem; 
    color: var(--secondary-color); 
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 500;
}

/* TO JEST NAPRAWA OBRAZKA */
#post-header-image {
    width: 100%;
    margin-bottom: 3rem;
    border-radius: 12px;
    overflow: hidden;
    /* Usunąłem max-height, żeby zdjęcie było całe */
    background-color: var(--service-item-bg); /* Tło pod spodem w razie ładowania */
}

#post-header-image img {
    display: block;
    width: 100%;
    height: auto; /* Zachowuje proporcje */
    object-fit: contain; /* Gwarantuje, że nic nie zostanie ucięte */
}

/* Treść wpisu */
.post-content-styles {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-color);
    
    /* To zabezpiecza zwykły tekst przed wylewaniem się */
    overflow-wrap: break-word;
    word-wrap: break-word; 
    word-break: break-word;
}

/* Styl dla bloków kodu / promptów (To naprawi Twój problem) */
.post-content-styles pre {
    white-space: pre-wrap; /* KLUCZOWE: Zmusza kod do zawijania wierszy! */
    background-color: var(--service-item-bg); /* Lekkie tło */
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    font-family: 'Courier New', Courier, monospace; /* Czcionka techniczna */
    font-size: 0.95rem;
    margin: 2rem 0;
    color: var(--text-color);
    max-width: 100%; /* Nie może być szersze niż kontener */
}

/* Styl dla pojedynczych fragmentów kodu w tekście */
.post-content-styles code {
    background-color: var(--service-item-bg);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.9em;
    border: 1px solid var(--border-color);
}
.post-content-styles p { margin-bottom: 1.5rem; }
.post-content-styles h2 { font-size: 1.8rem; margin-top: 3rem; margin-bottom: 1rem; color: var(--primary-color); }
.post-content-styles h3 { font-size: 1.5rem; margin-top: 2.5rem; margin-bottom: 1rem; color: var(--primary-color); }
.post-content-styles img { max-width: 100%; height: auto; border-radius: 8px; margin: 2rem 0; }
.post-content-styles ul { margin-left: 20px; margin-bottom: 20px; }
.post-content-styles li { margin-bottom: 10px; }
.post-content-styles a { color: var(--primary-color); text-decoration: underline; }
.post-content-styles blockquote { border-left: 4px solid var(--primary-color); padding-left: 1.5rem; margin: 2rem 0; font-style: italic; color: var(--secondary-color); }

.post-footer-nav { margin-top: 4rem; padding-top: 2rem; border-top: 1px solid var(--border-color); }
.back-link { color: var(--secondary-color); font-weight: 500; text-decoration: none; transition: color 0.3s; }
.back-link:hover { color: var(--primary-color); }

@media (max-width: 768px) { 
    #post-title { font-size: 2rem; } 
    #single-post-page { padding-top: 100px; }
}