/* ==========================================================================
   STYLE DEDYKOWANE: BLOG & SINGLE POST (ATLANTIC DEPTH)
   ========================================================================== */

/* --- 1. HERO --- */
.blog-hero {
    padding: 160px 20px 60px;
    text-align: center;
    background: radial-gradient(circle at 50% 100%, rgba(52, 99, 153, 0.08) 0%, transparent 60%);
}
.hero-title { font-size: clamp(2.5rem, 5vw, 4rem); margin-bottom: 20px; line-height: 1.2; color: var(--color-accent-1); }
.hero-desc { font-size: 1.1rem; color: #64748b; max-width: 650px; margin: 0 auto; }

/* --- 2. KATEGORIE --- */
.category-bar { padding: 20px 0 40px; text-align: center; }
.cat-wrapper {
    display: inline-flex; flex-wrap: wrap; justify-content: center; gap: 10px;
    background: #fff; padding: 10px 15px; border-radius: 50px;
    border: 1px solid rgba(15, 42, 74, 0.05); box-shadow: 0 5px 20px rgba(0,0,0,0.03);
}
.cat-link {
    padding: 8px 20px; border-radius: 40px; font-size: 0.85rem; font-weight: 600;
    color: #64748b; transition: 0.3s; border: 1px solid transparent;
}
.cat-link:hover, .cat-link.active {
    background: #f0f7ff; color: var(--color-accent-1); border-color: rgba(52, 99, 153, 0.2);
}

/* --- 3. WYRÓŻNIONY WPIS --- */
.featured-post {
    display: grid; grid-template-columns: 1.3fr 1fr;
    background: #fff; border-radius: 24px; overflow: hidden;
    box-shadow: 0 20px 50px -10px rgba(15, 42, 74, 0.1);
    border: 1px solid rgba(15, 42, 74, 0.05); text-decoration: none; transition: 0.4s; color: inherit;
}
.featured-post:hover { transform: translateY(-5px); box-shadow: 0 30px 60px -10px rgba(15, 42, 74, 0.15); }
.fp-image { position: relative; height: 100%; min-height: 400px; overflow: hidden; }
.fp-image img { width: 100%; height: 100%; object-fit: cover; transition: 0.6s; border-radius: 0; }
.featured-post:hover .fp-image img { transform: scale(1.05); }
.fp-category {
    position: absolute; top: 25px; left: 25px; background: var(--color-accent-1); color: #fff;
    padding: 6px 15px; border-radius: 20px; font-size: 0.7rem; font-weight: 700; text-transform: uppercase; z-index: 2;
}
.fp-content { padding: 50px; display: flex; flex-direction: column; justify-content: center; }
.fp-meta { font-size: 0.85rem; color: #94a3b8; margin-bottom: 15px; display: flex; align-items: center; gap: 8px; }
.fp-content h2 { font-size: 2rem; color: var(--color-accent-1); margin-bottom: 20px; line-height: 1.3; }
.fp-content p { font-size: 1.05rem; color: #64748b; margin-bottom: 30px; line-height: 1.6; }
.read-more-btn { font-size: 0.9rem; font-weight: 700; color: var(--color-accent-2); text-transform: uppercase; }

/* --- 4. GRID WPISÓW --- */
.blog-list-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; margin-bottom: 60px; }
.b-card {
    background: #fff; border-radius: 20px; overflow: hidden;
    border: 1px solid rgba(15, 42, 74, 0.05); display: flex; flex-direction: column;
    text-decoration: none; color: inherit; transition: 0.4s;
}
.b-card:hover { transform: translateY(-8px); box-shadow: 0 15px 40px rgba(15, 42, 74, 0.1); }
.b-card-img { height: 220px; position: relative; overflow: hidden; }
.b-card-img img { width: 100%; height: 100%; object-fit: cover; transition: 0.6s; border-radius: 0; }
.b-card:hover .b-card-img img { transform: scale(1.05); }
.b-category {
    position: absolute; top: 15px; right: 15px; background: rgba(255,255,255,0.95); color: var(--color-accent-1);
    padding: 5px 12px; border-radius: 15px; font-size: 0.65rem; font-weight: 700; text-transform: uppercase;
}
.b-card-content { padding: 25px; display: flex; flex-direction: column; flex-grow: 1; }
.b-meta { font-size: 0.8rem; color: #cbd5e1; margin-bottom: 10px; }
.b-card-content h3 { font-size: 1.3rem; margin-bottom: 12px; color: var(--color-accent-1); line-height: 1.4; }
.b-card-content p { font-size: 0.9rem; color: #64748b; margin-bottom: 20px; flex-grow: 1; }
.b-link { font-size: 0.8rem; font-weight: 700; color: var(--color-accent-2); text-transform: uppercase; margin-top: auto; }

.single-post-container { 
    max-width: 900px; 
    margin: 0 auto; 
    /* ZMIANA: Dodajemy marginesy wewnętrzne, żeby tekst nie dotykał krawędzi */
    padding: 160px 25px 0 25px; 
    overflow-x: hidden; /* Zabezpieczenie przed przesuwaniem na boki */
}
.post-header { margin-bottom: 50px; text-align: center; }
.post-meta { margin-bottom: 20px; text-transform: uppercase; font-size: 0.85rem; letter-spacing: 1px; color: #94a3b8; }
.post-cat { color: var(--color-accent-2); font-weight: 700; margin-right: 15px; }
.post-title { font-size: clamp(2rem, 5vw, 3.5rem); line-height: 1.2; color: var(--color-accent-1); margin-bottom: 25px; }
.post-lead { font-size: 1.2rem; color: #475569; line-height: 1.6; max-width: 750px; margin: 0 auto; }

.post-main-image {
    width: 100%; height: auto; border-radius: 20px; overflow: hidden; margin-bottom: 60px;
    box-shadow: 0 20px 40px rgba(15, 42, 74, 0.1);
}
.post-main-image img { width: 100%; display: block; }

.post-content {
    font-size: 1.1rem; line-height: 1.8; color: #334155; margin-bottom: 60px;
    max-width: 750px; margin-left: auto; margin-right: auto;
}
/* Style dla treści z edytora */
.post-content h2 { font-size: 1.8rem; color: var(--color-accent-1); margin-top: 50px; margin-bottom: 20px; }
.post-content h3 { font-size: 1.4rem; color: var(--color-accent-1); margin-top: 40px; margin-bottom: 15px; }
.post-content p { margin-bottom: 25px; }
.post-content ul, .post-content ol { margin-bottom: 25px; padding-left: 20px; }
.post-content li { margin-bottom: 10px; }
.post-content blockquote {
    border-left: 4px solid var(--color-accent-2); padding-left: 25px; margin: 40px 0;
    font-style: italic; color: var(--color-accent-1); font-size: 1.2rem;
}

.post-footer { text-align: center; border-top: 1px solid #f1f5f9; padding-top: 50px; margin-bottom: 80px; }

/* ==========================================================================
   5. NEWSLETTER "OCEANIC CARD" (POPRAWIONY WYGLĄD)
   ========================================================================== */

.newsletter-stripe {
    /* Ustawiamy to jako sekcję kontenerową, a nie sam pasek */
    background: transparent; 
    padding: 40px 0 80px; /* Odstęp od dołu, żeby karta nie dotykała stopki */
    position: relative;
    z-index: 5;
}

/* Właściwa karta newslettera */
.newsletter-card {
    background: var(--color-accent-1); /* Ciemny Granat */
    /* Głęboki, elegancki gradient */
    background: radial-gradient(circle at 10% 50%, #2a4d75 0%, #0f2a4a 60%, #081220 100%);
    border-radius: 24px;
    padding: 50px 60px;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 50px;
    box-shadow: 0 30px 60px -15px rgba(15, 42, 74, 0.35); /* Mocny, miękki cień */
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1); /* Delikatna jasna obwódka */
}

/* Dekoracja tła (Subtelna poświata) */
.newsletter-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255,255,255,0.05) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

/* Lewa strona (Tekst) */
.ns-content {
    flex: 1;
    position: relative;
    z-index: 2;
}

.ns-content h3 {
    color: #fff;
    margin-bottom: 10px;
    font-size: 1.8rem;
    font-family: var(--font-head);
    font-weight: 700;
    letter-spacing: -0.5px;
}

.ns-content p {
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
    font-size: 1rem;
    line-height: 1.6;
    max-width: 500px;
}

/* Prawa strona (Formularz) */
.ns-form {
    flex: 1.2;
    display: flex;
    gap: 15px;
    position: relative;
    z-index: 2;
    background: rgba(255, 255, 255, 0.05); /* Przezroczyste tło pod inputy */
    padding: 8px;
    border-radius: 60px; /* Kształt pigułki */
    border: 1px solid rgba(255, 255, 255, 0.15);
    max-width: 550px;
}

.ns-form input {
    flex: 1;
    background: transparent;
    border: none;
    padding: 15px 25px;
    color: #fff;
    font-size: 1rem;
    font-family: var(--font-body);
    outline: none;
}

.ns-form input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.ns-form button {
    background: #fff;
    color: var(--color-accent-1);
    font-weight: 800;
    padding: 15px 35px;
    border-radius: 50px;
    border: none;
    cursor: pointer;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
    transition: 0.3s ease;
    white-space: nowrap;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.ns-form button:hover {
    background: var(--color-accent-2); /* Błękit */
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

/* --- RWD --- */
@media (max-width: 992px) {
    .newsletter-card {
        flex-direction: column;
        text-align: center;
        padding: 40px 30px;
        gap: 30px;
    }
    
    .ns-content p {
        margin: 0 auto;
    }

    .ns-form {
        width: 100%;
        flex-direction: column; /* Na mobile przycisk pod spodem lub razem */
        background: transparent;
        border: none;
        padding: 0;
    }

    .ns-form input {
        background: #fff;
        color: var(--color-dark);
        border-radius: 50px;
        width: 100%;
        margin-bottom: 15px;
        border: 1px solid #e2e8f0;
    }
    
    .ns-form input::placeholder {
        color: #94a3b8;
    }

    .ns-form button {
        width: 100%;
        background: var(--color-accent-2); /* Błękit na mobile */
        color: #fff;
    }
}

/* RWD */
@media (max-width: 992px) {
    .featured-post { grid-template-columns: 1fr; }
    .fp-image { min-height: 250px; }
    .fp-content { padding: 30px; }
    .blog-list-grid { grid-template-columns: repeat(2, 1fr); }
    .newsletter-stripe .container { flex-direction: column; text-align: center; }
    .ns-form { width: 100%; }
}
@media (max-width: 600px) {
    .blog-list-grid { grid-template-columns: 1fr; }
}
/* ==========================================================================
   RWD - POPRAWKI DLA POJEDYNCZEGO WPISU (MOBILE)
   ========================================================================== */
@media (max-width: 768px) {
    .single-post-container {
        /* Zmniejszamy odstęp od góry na telefonie, bo 160px to za dużo */
        padding-top: 110px; 
        padding-left: 20px;
        padding-right: 20px;
    }

    .post-header {
        margin-bottom: 30px; /* Zbliżamy tytuł do treści */
    }

    .post-title {
        font-size: 2.2rem; /* Tytuł odrobinę mniejszy, żeby nie łamał się brzydko */
    }

    .post-content {
        font-size: 1rem; /* Czytelniejszy rozmiar fontu bazowego na małym ekranie */
        line-height: 1.7;
    }
    
    /* Zdjęcie główne na pełną szerokość z małymi marginesami */
    .post-main-image {
        border-radius: 15px;
        margin-bottom: 40px;
    }
}