/* ==========================================================================
   1. ZMIENNE I PODSTAWA
   ========================================================================== */
:root { 
    --gold: #d4af37;
    --dark: #121212;
    --grey: #f4f4f4;
    --card-bg: #ffffff;
    --text: #333;
}

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

body { 
    font-family: 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6; margin: 0; color: var(--text);
    background: var(--grey); display: flex; flex-direction: column;
    min-height: 100vh;
}

main { flex: 1; }

.container { 
    width: 95%; 
    max-width: 1200px;
    margin: 0 auto !important;
    padding: 10px;
}

/* ==========================================================================
   2. ELEMENTY INTERFEJSU
   ========================================================================== */

#reading-progress {
    position: fixed; 
    top: 0;
    left: 0; 
    width: 0%;
    height: 4px; 
    background: var(--gold);
    z-index: 10001;
    transition: width 0.1s ease;
}

header { 
    background: var(--dark); 
    color: #fff; 
    padding: 10px 0; 
    border-bottom: 2px solid var(--gold); 
    position: relative; 
    z-index: 1000;
}

.header-top { 
    display: flex; 
    justify-content: 
    space-between;
    align-items: center;
    flex-wrap: wrap; gap: 15px; 
}

.logo-area h1 { 
font-size: 1.5rem; 
margin: 0; 
line-height: 1; 
letter-spacing: -1px;
}
.logo-area h1 span {
color: var(--gold); 
}
.logo-area p { 
font-size: 0.75rem;
margin: 2px 0 0 0; 
color: #bbb; 
}

.search-mini { 
display: flex;
max-width: 250px;
width: 100%; 
}
.search-mini input { 
    flex: 1;
    border: 1px solid var(--gold); 
    border-radius: 4px 0 0 4px; 
    outline: none; 
    background: #fff;
    padding: 6px 10px; 
    font-size: 0.85rem; 
}
.search-mini button { 
    padding: 0 12px;
    background: var(--gold);
    color: #1a1a1a; 
    border: none; 
    font-weight: bold;
    cursor: pointer; 
    border-radius: 0 4px 4px 0; 
    text-transform: uppercase;
    font-size: 0.75rem; 
}

/* ==========================================================================
   3. TREŚĆ I ARTYKUŁY
   ========================================================================== */

.hero {
    background: linear-gradient(rgba(0,0,0,0.85), rgba(0,0,0,0.85)), url('https://images.unsplash.com/photo-1505664194779-8beaceb93744?q=80&w=2070&auto=format&fit=crop'); 
    background-size: cover; background-position: center; color: #fff; 
    padding: 80px 20px; text-align: center; border-bottom: 4px solid var(--gold); margin-bottom: 50px;
}

.hero-title {
    font-size: clamp(1.8rem, 8vw, 3.5rem);
    margin-bottom: 15px; text-transform: uppercase; font-weight: 900; line-height: 1.1;
}

.articles-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px; justify-content: center;
}

.article-card {
    background: var(--card-bg); padding: 25px; border-radius: 8px;
    border-left: 5px solid var(--gold); box-shadow: 0 4px 15px rgba(0,0,0,0.05); 
    display: flex; flex-direction: column; transition: 0.3s;
}
.article-card:hover { transform: translateY(-5px); }

.single-article-title, .article-content h1 {
    font-size: clamp(1.5rem, 7vw, 3rem); line-height: 1.2;
    word-wrap: break-word; overflow-wrap: break-word; hyphens: auto; margin-bottom: 20px;
}

.category-header h2, .category-title {
    font-size: clamp(1.2rem, 5vw, 2rem); text-transform: uppercase; 
    border-bottom: 3px solid var(--gold); display: inline-block; padding-bottom: 8px; margin-bottom: 30px;
}

/* ==========================================================================
   4. NAWIGACJA KOMPUTEROWA (> 768px)
   ========================================================================== */
@media (min-width: 769px) {
    .menu-toggle { display: none !important; }

    .main-menu {
        display: block !important;
        position: fixed; left: 0; top: 0; height: 100vh; width: 180px;
        background: var(--dark); border-right: 2px solid var(--gold);
        padding-top: 0px; z-index: 999; overflow-y: auto;
    }

    /* POPRAWKA: Main musi być elastycznym kontenerem, żeby wycentrować artykuł */
    main {
        margin-left: 180px !important;
        width: calc(100% - 180px) !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important; /* To centruje dzieci (artykuł) w poziomie */
        min-height: 100vh;
    }

    header, footer, .hero {
        margin-left: 180px !important;
        width: calc(100% - 180px) !important;
    }

    .main-menu ul { 
        list-style: none;
        padding: 0; 
        display: flex; 
        flex-direction: column; 
    }

    .main-menu a {
        display: block; 
        padding: 10px 20px; 
        color: #fff; 
        text-decoration: none;
        text-transform: uppercase;
        font-size: 0.85rem;
        border-bottom: 1px solid #222;
        transition: 0.3s;
    }

    .main-menu a:hover { 
        background: #1a1a1a; 
        color: var(--gold);
        padding-left: 35px; 
    }

    /* Kontener artykułu wewnątrz wycentrowanego main */
    .container {
        width: 95%;
        max-width: 1000px;
        margin: 20px auto !important;
    }
}
/* ==========================================================================
   5. NAWIGACJA MOBILNA (<= 768px)
   ========================================================================== */
@media (max-width: 768px) {
    /* Ukrywamy marginesy, które są na komputerze */
    header, main, footer, .hero, .content-wrapper { 
        margin-left: 0 !important; 
        width: 100% !important; 
    }
    
    
    /* PRZYCISK HAMBURGERA - Naprawa widoczności */
    .menu-toggle { 
        display: flex !important; 
        flex-direction: column; 
        justify-content: center;
        align-items: center;
        gap: 4px; 
        background: #222 !important; /* Ciemne tło dla kontrastu */
        border: 1px solid var(--gold) !important; 
        cursor: pointer; 
        z-index: 100000 !important; /* Musi być na samym wierzchu */
        width: 45px !important;
        height: 45px !important;
        padding: 5px !important;
        border-radius: 4px;
        position: relative;
    }
    
/* MENU MOBILNE */
    .main-menu {
        display: none !important;
        position: fixed !important; 
        top: 0 !important; 
        left: 0 !important; 
        width: 100% !important;
        height: 100vh !important;
        background-color: rgba(18, 18, 18, 0.98) !important; /* Prawie czarne */
        z-index: 99999 !important;
        padding-top: 120px !important; /* Obniżamy linki, żeby nie podchodziły pod logo */
        overflow-y: auto !important;
    }
    
    /* Ta klasa MUSI być pod .main-menu w pliku CSS */
    .main-menu.active { 
        display: block !important; 
    }

    /* Stylizacja listy wewnątrz menu mobilnego */
    .main-menu ul {
        display: flex !important;
        flex-direction: column !important;
        padding: 0 !important;
        margin: 0 !important;
        list-style: none !important;
        align-items: center !important;
    }

   .main-menu ul li a {
        padding: 15px 25px !important;
        font-size: 1.3rem !important;
        color: #fff !important;
        text-decoration: none !important;
        border-bottom: 1px solid #333 !important;
        width: 100%;
        text-align: center;
    }
}
/* ==========================================================================
   6. STOPKA I DODATKI
   ========================================================================== */
footer {
    background: var(--dark); color: #fff; padding: 40px 0;
    border-top: 4px solid var(--gold); margin-top: 50px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    width: 95%;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-col { display: flex; flex-direction: column; gap: 10px; }
.footer-col h4, .footer-col h5 { color: var(--gold); margin-bottom: 10px; text-transform: uppercase; }
.footer-col a { color: #bbb; text-decoration: none; transition: 0.3s; }
.footer-col a:hover { color: var(--gold); }

@media (max-width: 600px) {
    .footer-grid { grid-template-columns: 1fr; text-align: center; }
    .footer-col { align-items: center; }
}

#back-to-top {
    position: fixed; bottom: 20px; right: 20px;
    background: var(--gold); color: #1a1a1a; border: none;
    width: 40px; height: 40px; border-radius: 50%; cursor: pointer;
    display: none; align-items: center; justify-content: center;
    font-weight: bold; z-index: 1000; box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.auth-container {
    max-width: 400px; margin: 50px auto; background: #fff;
    padding: 30px; border-radius: 8px; border-top: 5px solid var(--gold);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.page-content {
    background: #fff; padding: 20px; border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05); margin-top: 30px;
}

.support-box {
    text-align: center; margin-top: 50px; padding: 20px;
    background: #fff; border-radius: 8px; border: 2px dashed var(--gold);
}

.coffee-buttons { flex-wrap: wrap; justify-content: center; }



/* --- STYLIZACJA ARTYKUŁU --- */
.full-article {
    background: #fff;
    padding: 40px;
    border-radius: 8px;
    margin-top: 20px !important;
    margin-bottom: 40px !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    /* To zapewnia idealne centrowanie na komputerze */
    max-width: 900px !important; 
    width: 100%;
}

.article-header {
    background: none !important;
    color: inherit !important;
    padding: 0 !important;
    border: none !important;
    margin-bottom: 20px;
}

.article-featured-image {
    margin: 30px auto;
    text-align: center;
    max-width: 600px; /* Nieco większe dla lepszego efektu */
}

.article-featured-image img {
    width: 100%;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border: 1px solid #ddd;
}

/* Responsywność dla telefonów */
@media (max-width: 768px) {
    .full-article {
        padding: 20px;
        margin-top: 10px !important;
    }
    .article-header h1 {
        font-size: 1.8rem !important;
    }
}
