:root {
    --bg-color: #f4f7f6;
    --sidebar-bg: #6d1212; /* Twój nowy kolor przewodni */
    --sidebar-text: #ffffff;
    --primary-color: #6d1212; /* Przyciski też będą w tym kolorze */
    --danger-color: #e74c3c;
    --text-color: #333;
    --card-bg: #fff;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; background-color: var(--bg-color); color: var(--text-color); display: flex; min-height: 100vh; }

/* --- NOWOCZESNY PANEL BOCZNY --- */
/* --- NOWOCZESNY PANEL BOCZNY --- */
.sidebar { 
    width: 260px; 
    background-color: var(--sidebar-bg); 
    color: var(--sidebar-text); 
    padding: 30px 20px 20px 20px; 
    flex-shrink: 0; 
    display: flex; 
    flex-direction: column; 
    box-shadow: 4px 0 15px rgba(0,0,0,0.15); /* Mocniejszy cień oddzielający menu */
    z-index: 10;
    
    /* MAGIA: Przyklejone menu */
    position: sticky;
    top: 0;
    height: 100vh; /* Zawsze zajmuje dokładnie 100% wysokości okna przeglądarki */
    overflow-y: auto; /* Pozwala na przewijanie samego menu, jeśli dodasz w nim za dużo linków */
}

/* Nowoczesny, cienki pasek przewijania dla menu (widoczny tylko gdy menu jest bardzo długie) */
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 10px; }

/* Wygląd Logo */
.sidebar-logo {
    text-align: center;
    margin-bottom: 40px;
}
.sidebar-logo img {
    height: auto;
    margin-bottom: 15px;
}
.sidebar-logo h2 {
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* Wygląd Menu i linków */
.sidebar nav ul { list-style: none; }
.sidebar nav ul li { margin-bottom: 8px; }
.sidebar nav ul li a { 
    color: rgba(255, 255, 255, 0.85); /* Lekko przeźroczysty biały */
    text-decoration: none; 
    display: block; 
    padding: 12px 15px; 
    border-radius: 8px; 
    transition: all 0.3s ease; 
    font-weight: 500;
}

/* Efekt najechania na link (Hover) */
.sidebar nav ul li a:hover { 
    background-color: rgba(255, 255, 255, 0.1); /* Delikatne rozjaśnienie tła */
    color: #fff;
    transform: translateX(5px); /* Nowoczesne przesunięcie tekstu w prawo */
}

/* Stopka na samym dole ze sponsorem */
.sidebar-footer {
    margin-top: auto; /* Magiczna komenda - wypycha ten element na sam dół paska! */
    text-align: center;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    line-height: 1.5;
}
.sidebar-footer strong {
    color: #fff;
    font-size: 0.95rem;
    display: block;
    margin-top: 5px;
    letter-spacing: 0.5px;
}

/* --- Reszta kodu bez zmian --- */
.content { flex-grow: 1; padding: 40px; overflow-y: auto; width: calc(100% - 260px); }
/* --- Układ poziomy wpisów (Lista) --- */
.post-grid { 
    display: flex;
    flex-direction: column;
    gap: 40px; 
}

.post-card { 
    background: var(--card-bg); 
    border-radius: 8px; 
    overflow: hidden; 
    box-shadow: 0 4px 6px rgba(0,0,0,0.1); 
    transition: transform 0.2s; 
    display: flex;
    flex-direction: column; 
}

.post-card:hover { 
    transform: translateY(-3px); 
}

/* Style dla zdjęć w postach */
.post-image { 
    width: 100%; 
    height: 250px; 
    object-fit: cover; 
    cursor: zoom-in; 
    transition: opacity 0.3s; 
}
.post-image:hover { 
    opacity: 0.85; 
}

/* Wewnętrzny margines dla treści posta */
.post-content { 
    padding: 30px; 
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.post-date { font-size: 0.8rem; color: #7f8c8d; margin-bottom: 10px; display: block; }
.post-title { margin-bottom: 15px; font-size: 1.25rem; }
.post-desc { font-style: italic; color: #555; margin-bottom: 15px; font-size: 0.9rem; }
.post-text { line-height: 1.6; }

/* --- Układ na komputerach (Zdjęcie po lewej, tekst po prawej) --- */
@media (min-width: 900px) {
    .post-card {
        flex-direction: row; 
        align-items: stretch; 
    }
    
    .post-image {
        flex: 0 0 40%; /* Zdjęcie zajmuje 40% szerokości */
        max-width: 40%;
        height: auto;
        min-height: 300px;
    }
    
    .post-content {
        flex: 1; /* Treść zajmuje pozostałe 60% */
        padding: 40px;
    }
}

/* --- Formularze i tabele (Panel Admina) --- */
.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 8px; font-weight: bold; }
.form-control { width: 100%; padding: 10px; border: 1px solid #ccc; border-radius: 4px; font-family: inherit; }
.btn { display: inline-block; padding: 10px 20px; background-color: var(--primary-color); color: #fff; text-decoration: none; border: none; border-radius: 4px; cursor: pointer; font-size: 1rem; }
.btn-danger { background-color: var(--danger-color); }
.btn:hover { opacity: 0.9; }

.admin-table { width: 100%; border-collapse: collapse; margin-top: 20px; background: var(--card-bg); box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
.admin-table th, .admin-table td { padding: 15px; text-align: left; border-bottom: 1px solid #eee; }
.admin-table img { width: 80px; height: 50px; object-fit: cover; border-radius: 4px; }
.actions a { margin-right: 10px; font-size: 0.9rem; }

/* --- Responsywność dla małych ekranów (Nawigacja) --- */
@media (max-width: 768px) {
    body { flex-direction: column; }
    .sidebar { width: 100%; height: auto; padding: 15px; }
    .content { width: 100%; padding: 20px; }
}