/* ========================================= */
/* --- 1. STRONA GŁÓWNA BLOGA (LAYOUT) --- */
/* ========================================= */

.blog-page {
    /* Padding uwzględniający fixed/solid header */
    padding: 120px 20px 80px 20px;
    background-color: #161616; /* Głęboka, elegancka czerń */
    color: #f0f0f0;
    position: relative;
    z-index: 2;
    flex-grow: 1;
    display: flex;
    justify-content: center;
}

.blog-container {
    max-width: 1200px;
    width: 100%;
}

/* --- HERO SECTION --- */
.blog-hero {
    text-align: center;
    margin-bottom: 80px;
}

.blog-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 4.5rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 15px;
    letter-spacing: 1px;
    line-height: 1;
    text-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.blog-subtitle {
    font-size: 1.2rem;
    font-weight: 300;
    color: #b0b0b0;
    max-width: 600px;
    margin: 0 auto;
    letter-spacing: 0.5px;
}

/* --- FEATURED SECTION (Wyróżniony wpis) --- */
/* Naprawiono problem z szarym paskiem pod zdjęciem */

.featured-section {
    margin-bottom: 100px;
}

.featured-card {
    display: grid;
    grid-template-columns: 1.5fr 1fr; /* Obrazek szerszy od tekstu */
    gap: 0; /* Elementy stykają się */
    align-items: stretch; /* WAŻNE: Rozciąga elementy do tej samej wysokości */
    text-decoration: none;
    background: #1e1e1e;
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 4px;
    overflow: hidden;
    transition: border-color 0.3s ease, transform 0.3s ease;
    box-shadow: 0 20px 50px rgba(0,0,0,0.3);
}

.featured-card:hover {
    border-color: rgba(255,255,255,0.2);
    transform: translateY(-5px);
}

.featured-image-wrapper {
    height: 100%; /* Wypełnia całą wysokość kolumny gridu */
    min-height: 450px; /* Minimalna wysokość dla bezpieczeństwa */
    overflow: hidden;
    position: relative;
}

.featured-image {
    width: 100%; 
    height: 100%; /* Wypełnia wrapper */
    object-fit: cover; /* Skaluje się bez deformacji */
    transition: transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.featured-card:hover .featured-image { 
    transform: scale(1.05); 
}

.featured-content {
    padding: 60px;
    display: flex; 
    flex-direction: column; 
    justify-content: center;
    border-left: 1px solid rgba(255,255,255,0.05);
}

.featured-badge {
    text-transform: uppercase; letter-spacing: 3px;
    color: var(--c-accent, #d4af37);
    font-size: 0.8rem; font-weight: 700;
    margin-bottom: 20px;
}

.featured-post-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 3rem;
    color: #fff;
    margin-bottom: 25px;
    line-height: 1.1;
}

.featured-excerpt {
    color: #ccc;
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 40px;
    font-weight: 300;
}

/* --- GRID POSTÓW (Reszta wpisów) --- */

.posts-grid-wrapper {
    margin-top: 60px;
}

.section-heading {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2rem; 
    color: #fff; 
    margin-bottom: 40px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 15px;
    display: inline-block;
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 40px;
    text-align: left;
}

/* Stylizacja pojedynczej karty (używanej przez JS) */
.post-preview-card {
    background-color: #1e1e1e;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    
    /* Animacje Scroll Reveal (JS) */
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out, box-shadow 0.3s ease, border-color 0.3s ease;
}

.post-preview-card.is-visible { 
    opacity: 1; 
    transform: translateY(0); 
}

.post-preview-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.5);
    border-color: rgba(255,255,255,0.2);
}

.post-preview-link {
    text-decoration: none; 
    color: inherit; 
    display: flex; 
    flex-direction: column; 
    height: 100%;
}

.post-preview-image-wrapper {
    height: 280px; 
    overflow: hidden; 
    position: relative;
}

.post-preview-image {
    width: 100%; 
    height: 100%; 
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.post-preview-card:hover .post-preview-image { 
    transform: scale(1.1); 
}

.post-preview-content {
    padding: 30px;
    flex-grow: 1; 
    display: flex; 
    flex-direction: column;
}

.post-preview-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.8rem; 
    color: #fff; 
    margin-bottom: 12px; 
    line-height: 1.2;
    transition: color 0.3s ease;
}

.post-preview-card:hover .post-preview-title { 
    color: var(--c-accent, #d4af37); 
}

.post-preview-meta {
    font-size: 0.8rem; 
    color: #777; 
    margin-bottom: 15px; 
    text-transform: uppercase; 
    letter-spacing: 1px;
}

.post-preview-excerpt {
    font-size: 0.95rem; 
    color: #bbb; 
    margin-bottom: 25px; 
    flex-grow: 1; 
    line-height: 1.6;
}

.read-more-link {
    font-size: 0.85rem; 
    color: #fff; 
    text-transform: uppercase; 
    letter-spacing: 2px;
    font-weight: 700; 
    transition: 0.3s; 
    display: flex; 
    align-items: center; 
    gap: 8px;
}

.read-more-link i { 
    font-size: 0.9em; 
    transition: transform 0.3s; 
}

.post-preview-card:hover .read-more-link i { 
    transform: translateX(5px); 
}

/* Placeholder ładowania */
.loading-placeholder, .no-posts { 
    color: #666; 
    font-style: italic; 
    grid-column: 1/-1; 
    text-align: center; 
    padding: 40px; 
}


/* ========================================= */
/* --- 2. STRONA POJEDYNCZEGO POSTA --- */
/* ========================================= */

.post-page {
    padding: 140px 20px 80px 20px;
    background-color: #161616; /* Spójne ciemne tło */
    display: flex; 
    flex-direction: column; 
    align-items: center;
}

.post-container {
    max-width: 900px;
    width: 100%;
    /* POPRAWKA: Usunięto tło, aby tekst był czysty i kontrastowy */
    background-color: transparent;
    padding: 0;
    margin-bottom: 40px;
}

.post-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 4rem;
    color: #fff;
    line-height: 1.05;
    margin-bottom: 20px;
    text-align: center;
}

.post-meta {
    font-size: 0.9rem; 
    color: #999; 
    letter-spacing: 1px;
    text-align: center; 
    margin-bottom: 60px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 30px; 
    display: block;
}

/* --- TREŚĆ ARTYKUŁU --- */
.post-content {
    font-size: 1.25rem;
    line-height: 1.9;
    /* POPRAWKA: Jasny kolor tekstu dla lepszej czytelności */
    color: #e6e6e6; 
    font-weight: 300;
}

.post-content p { 
    margin-bottom: 30px; 
}

/* Drop Cap (Inicjał) */
.drop-cap::first-letter {
    font-family: 'Cormorant Garamond', serif;
    font-size: 5.5rem;
    float: left;
    margin: 8px 15px 0 0;
    line-height: 1;
    color: #fff;
}

.post-content h2, .post-content h3 {
    font-family: 'Cormorant Garamond', serif;
    color: #fff; 
    margin: 60px 0 25px; 
    line-height: 1.2;
}

.post-content h2 { font-size: 2.5rem; }
.post-content h3 { font-size: 1.8rem; }

.post-content a {
    color: #fff;
    text-decoration: underline;
    text-underline-offset: 4px;
    text-decoration-color: var(--c-accent, #d4af37);
    transition: opacity 0.3s;
}
.post-content a:hover { opacity: 0.8; }

.post-content blockquote {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2.2rem;
    font-style: italic;
    color: #fff;
    border-left: 2px solid var(--c-accent, #d4af37);
    padding-left: 40px;
    margin: 80px 0;
    line-height: 1.4;
}

/* Galeria w poście */
.post-gallery {
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 20px; 
    margin: 60px 0;
    padding-top: 40px; 
    border-top: 1px solid rgba(255,255,255,0.05);
}

.post-gallery-image {
    width: 100%; 
    border-radius: 4px; 
    border: 1px solid rgba(255,255,255,0.1);
    transition: transform 0.3s ease; 
    cursor: zoom-in;
}

.post-gallery-image:hover { 
    transform: scale(1.02); 
}

/* Animacje elementów treści (Klasy dodawane przez JS) */
.post-content p, 
.post-content h2, 
.post-content h3, 
.post-content blockquote, 
.post-gallery-image {
    opacity: 0; 
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.is-revealed { 
    opacity: 1 !important; 
    transform: translateY(0) !important; 
}


/* ========================================= */
/* --- 3. PRZYCISKI AKCJI (Facebook, Powrót) --- */
/* ========================================= */

.post-actions-container { 
    max-width: 900px; 
    width: 100%; 
    margin: 0 auto; 
}

.post-actions {
    display: flex; 
    justify-content: space-between; 
    align-items: center;
    padding-top: 40px; 
    border-top: 1px solid rgba(255,255,255,0.1);
}

.btn-arrow-left {
    display: inline-flex; 
    align-items: center; 
    gap: 15px; 
    text-decoration: none; 
    min-width: auto;
}

.btn-arrow-left svg {
    width: 1.5rem; 
    fill: none; 
    stroke: currentColor; 
    stroke-width: 2; 
    transition: 0.3s;
    position: static; 
    opacity: 1; 
    transform: none;
}

.btn-arrow-left:hover svg { 
    transform: translateX(-5px); 
}

.btn-arrow-left span { 
    transform: none; 
    display: flex; 
    align-items: center; 
    gap: 10px; 
}

.facebook-link-btn {
    text-decoration: none; 
    display: inline-flex; 
    align-items: center; 
    gap: 10px;
    color: #fff; 
    border: 1px solid #fff; 
    padding: 12px 30px; 
    transition: 0.3s; 
    min-width: auto;
}

.facebook-link-btn:hover { 
    background: #3b5998; 
    border-color: #3b5998; 
}


/* ========================================= */
/* --- 4. OVERLAY PEŁNOEKRANOWY (Poprawiony) --- */
/* ========================================= */

#fullscreen-overlay {
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%;
    background-color: rgba(0, 0, 0, 0.98); /* Bardzo ciemne tło */
    display: flex; 
    flex-direction: column; 
    justify-content: center; 
    align-items: center;
    z-index: 9999; 
    visibility: hidden; 
    opacity: 0; 
    transition: 0.4s;
    /* WAŻNE: Zapobiega blokowaniu kliknięć gdy niewidoczny */
    pointer-events: none; 
}

#fullscreen-overlay.visible { 
    visibility: visible; 
    opacity: 1; 
    pointer-events: auto; /* Przywraca klikanie */
}

#fullscreen-overlay img {
    max-width: 90%; 
    max-height: 85%; 
    object-fit: contain;
    border-radius: 4px; 
    box-shadow: 0 30px 60px rgba(0,0,0,0.5);
}

#close-overlay-btn {
    margin-top: 30px; 
    background: transparent; 
    border: 1px solid #fff;
    color: #fff; 
    padding: 10px 30px; 
    cursor: pointer; 
    text-transform: uppercase; 
    letter-spacing: 2px;
}

#close-overlay-btn:hover { 
    background: #fff; 
    color: #000; 
}

/* ========================================= */
/* --- 5. RESPONSYWNOŚĆ --- */
/* ========================================= */

@media (max-width: 900px) {
    .featured-card { 
        grid-template-columns: 1fr; /* Jedna kolumna na mobilkach */
    }
    
    .featured-image-wrapper { 
        height: 350px; /* Sztywna wysokość na mobilkach */
        min-height: auto;
    }
    
    .featured-content { 
        padding: 40px 30px; 
        border-left: none; 
        border-top: 1px solid rgba(255,255,255,0.05); 
    }
    
    .post-title { 
        font-size: 3rem; 
    }
    
    .post-actions { 
        flex-direction: column; 
        gap: 20px; 
        width: 100%; 
    }
    
    .btn-arrow-left, .facebook-link-btn { 
        width: 100%; 
        justify-content: center; 
    }
}