@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600&family=Lato:wght@300;400;700&display=swap');

* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --ziel-ciemna:   #3a5626;
    --ziel-glowna:   #4e6b36;
    --ziel-srednia:  #5e7e42;
    --tlo:           #eef5e8;
    --tlo-karta:     #f7faf4;
    --zloto:         #c9a227;
    --tekst-ciemny:  #2b3e1e;
    --tekst-mid:     #4a6035;
    --biel:          #ffffff;
    --cien-karta:    0 2px 12px rgba(58,86,38,0.10);
    --cien-duzy:     0 6px 28px rgba(58,86,38,0.16);
    --radius:        10px;
}

body {
    font-family: 'Lato', Arial, sans-serif;
    background-color: var(--tlo);
    background-image:
        radial-gradient(ellipse at 20% 0%, rgba(94,126,66,0.08) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 100%, rgba(58,86,38,0.06) 0%, transparent 50%);
    min-height: 100vh;
    padding: 0;
    color: var(--tekst-ciemny);
}

.page-wrapper {
    max-width: 1240px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 0 20px 40px;
}

/* NAGŁÓWEK */
.main-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--ziel-ciemna);
    padding: 0 60px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 120px;
    box-shadow: 0 2px 16px rgba(30,50,15,0.22);
    /* pełna szerokość ekranu niezależnie od wrappera */
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
    cursor: pointer;
}

.main-header::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent 5%, var(--zloto) 40%, var(--zloto) 60%, transparent 95%);
    opacity: 0.5;
}

.logo-box {
    background: rgba(255,255,255,0.08);
    border: 1.5px solid rgba(201,162,39,0.4);
    padding: 6px 18px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--biel);
    border-radius: 6px;
    letter-spacing: 1px;
    flex-shrink: 0;
    white-space: nowrap;
}

.main-nav { display: flex; flex-direction: row; gap: 6px; align-items: center; }

.nav-btn {
    display: block;
    background-color: transparent;
    color: rgba(255,255,255,0.82);
    text-decoration: none;
    text-align: center;
    padding: 8px 20px;
    font-family: 'Lato', sans-serif;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    border-radius: 5px;
    border: 1px solid transparent;
    transition: background-color 0.18s, color 0.18s, border-color 0.18s;
}

.nav-btn:hover {
    background-color: rgba(255,255,255,0.12);
    color: var(--biel);
    border-color: rgba(201,162,39,0.35);
}

.nav-btn.active {
    background-color: rgba(201,162,39,0.15);
    border-color: rgba(201,162,39,0.55);
    color: var(--biel);
}

/* LISTA POSTÓW */
.main-container {
    max-width: 1200px;
    width: 100%;
    margin: 32px auto 0;
}

.posts-page-title {
    font-family: 'Playfair Display', Georgia, serif;
    color: var(--tekst-ciemny);
    font-size: 1.9rem;
    font-weight: 600;
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 2px solid rgba(201,162,39,0.3);
}

.posts-list-wrapper {
    display: flex;
    flex-direction: column;
    gap: 18px;
    width: 100%;
}

/* KAFELEK */
.post-list-item {
    display: flex;
    background-color: var(--biel);
    border-radius: var(--radius);
    text-decoration: none;
    color: var(--tekst-ciemny);
    overflow: hidden;
    min-height: 200px;
    border: 1px solid rgba(94,126,66,0.15);
    box-shadow: var(--cien-karta);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s;
}

.post-list-item:hover {
    transform: translateX(5px);
    box-shadow: var(--cien-duzy);
    border-color: rgba(201,162,39,0.3);
}

/* Lewa strona */
.post-left-side {
    width: 36%;
    min-width: 150px;
    position: relative;
    overflow: hidden;
    background-color: var(--ziel-glowna);
    flex-shrink: 0;
}

.post-mini-carousel-wrap {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.post-mini-carousel-track {
    display: flex;
    height: 100%;
    transition: transform 0.4s ease-in-out;
}

.post-carousel-slide {
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
}

.post-carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.post-mini-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0,0,0,0.35);
    color: #fff;
    border: none;
    width: 28px; height: 44px;
    font-size: 0.85rem;
    cursor: pointer;
    z-index: 5;
    display: flex; align-items: center; justify-content: center;
    border-radius: 2px;
    transition: background-color 0.2s;
    padding: 0;
}

.post-mini-btn:hover { background-color: rgba(0,0,0,0.6); }
.post-mini-prev { left: 0; }
.post-mini-next { right: 0; }

/* Prawa strona */
.post-right-side {
    width: 64%;
    padding: 26px 30px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border-left: 2px solid rgba(201,162,39,0.2);
}

.post-right-side.no-image {
    width: 100%;
    border-left: none;
}

.post-list-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--tekst-ciemny);
    line-height: 1.25;
    margin-bottom: 10px;
}

.post-list-excerpt {
    font-size: 0.95rem;
    line-height: 1.65;
    color: rgba(42,62,26,0.72);
    font-weight: 300;
    flex-grow: 1;
}

.post-list-date {
    font-size: 0.8rem;
    color: var(--zloto);
    text-align: right;
    font-style: italic;
    margin-top: 12px;
    opacity: 0.85;
}

/* LIGHTBOX */
.lightbox {
    display: none; position: fixed; z-index: 9999;
    top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.9);
    justify-content: center; align-items: center;
    cursor: zoom-out; opacity: 0; transition: opacity 0.25s ease;
}
.lightbox.active { display: flex; opacity: 1; }
.lightbox img {
    max-width: 92vw !important; max-height: 90vh !important;
    object-fit: contain !important; border-radius: 4px;
    box-shadow: 0 8px 48px rgba(0,0,0,0.6);
}
img:not(#lightbox-img) { cursor: zoom-in; }

@media (max-width: 640px) {
    .post-list-item { flex-direction: column; min-height: auto; }
    .post-left-side { width: 100%; min-width: unset; height: 190px; }
    .post-right-side { width: 100%; border-left: none; border-top: 2px solid rgba(201,162,39,0.2); padding: 18px; }
}

@media (max-width: 480px) {
    .main-header { padding: 0 20px; height: 90px; width: 100vw; margin-left: calc(-50vw + 50%); }
    .logo-box { padding: 5px 12px; height: 60px; font-size: 1rem; }
    .nav-btn { padding: 6px 12px; font-size: 0.72rem; letter-spacing: 1.5px; }
    .posts-page-title { font-size: 1.5rem; }
}

/* LOGO IMG */
.logo-link {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.logo-img {
    height: 160px;
    width: 160px;
    object-fit: cover;
    cursor: default;
    border-radius: 50%;
    border: 2px solid rgba(201,162,39,0.5);
    box-shadow: 0 2px 12px rgba(0,0,0,0.25);
    display: block;
    transition: transform 0.2s ease, box-shadow 0.2s;
}

.logo-img:hover {
    box-shadow: 0 4px 18px rgba(0,0,0,0.35);
}