@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);
}

/* GALERIA */
.gallery-wrapper {
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin-top: 32px;
    animation: fadeUp 0.45s cubic-bezier(0.22,0.61,0.36,1) both;
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Filtry */
.gallery-filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.gallery-filter-btn {
    background: var(--biel);
    border: 1px solid rgba(94,126,66,0.25);
    color: var(--tekst-mid);
    padding: 7px 18px;
    border-radius: 30px;
    font-family: 'Lato', sans-serif;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.18s, border-color 0.18s, color 0.18s;
}
.gallery-filter-btn:hover {
    background: rgba(94,126,66,0.08);
    border-color: rgba(94,126,66,0.4);
    color: var(--tekst-ciemny);
}
.gallery-filter-btn.active {
    background: var(--ziel-glowna);
    border-color: var(--ziel-glowna);
    color: var(--biel);
}

/* Siatka masonry */
.gallery-grid {
    columns: 3;
    column-gap: 12px;
}

@media (max-width: 900px) { .gallery-grid { columns: 2; } }
@media (max-width: 500px) { .gallery-grid { columns: 1; } }

/* Kafelek */
.gallery-item {
    break-inside: avoid;
    margin-bottom: 12px;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    background: var(--ziel-glowna);
    border: 1px solid rgba(94,126,66,0.15);
    box-shadow: var(--cien-karta);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s;
}

.gallery-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--cien-duzy);
    border-color: rgba(201,162,39,0.35);
}

.gallery-item img {
    width: 100%;
    display: block;
    transition: transform 0.4s ease;
}

.gallery-item:hover img { transform: scale(1.04); }

/* Badge VIDEO */
.gallery-item .video-badge {
    position: absolute;
    top: 10px; left: 10px;
    background: rgba(0,0,0,0.6);
    color: var(--biel);
    font-size: 0.64rem;
    font-weight: 700;
    letter-spacing: 1px;
    padding: 3px 9px;
    border-radius: 4px;
    pointer-events: none;
}

/* Ikona Play */
.gallery-item .play-icon {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 50px; height: 50px;
    background: rgba(0,0,0,0.5);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.35rem;
    pointer-events: none;
    transition: background 0.2s, transform 0.2s;
    border: 2px solid rgba(255,255,255,0.45);
}

.gallery-item:hover .play-icon {
    background: rgba(201,162,39,0.75);
    transform: translate(-50%, -50%) scale(1.1);
}

/* Overlay */
.gallery-item .item-overlay {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.6));
    padding: 26px 12px 10px;
    opacity: 0;
    transition: opacity 0.22s ease;
}

.gallery-item:hover .item-overlay { opacity: 1; }

.item-overlay-title {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--biel);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Video thumb */
.video-thumb {
    width: 100%;
    aspect-ratio: 16/9;
    background: #1a2a14;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.video-thumb img {
    width: 100%; height: 100%;
    object-fit: cover;
    opacity: 0.7;
}

/* LIGHTBOX */
.gallery-lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.93);
    justify-content: center;
    align-items: center;
    flex-direction: column;
    gap: 14px;
    cursor: default;
    animation: lbFadeIn 0.2s ease both;
}

@keyframes lbFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.gallery-lightbox.active { display: flex; }

.lightbox-close {
    position: fixed;
    top: 18px; right: 22px;
    background: none;
    border: none;
    color: rgba(255,255,255,0.5);
    font-size: 1.8rem;
    cursor: pointer;
    z-index: 10001;
    line-height: 1;
    transition: color 0.18s, transform 0.18s;
}
.lightbox-close:hover { color: var(--biel); transform: scale(1.15); }

.lightbox-nav {
    position: fixed;
    top: 50%; transform: translateY(-50%);
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.15);
    color: rgba(255,255,255,0.7);
    width: 46px; height: 46px;
    border-radius: 50%;
    font-size: 1.3rem;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.18s, color 0.18s, transform 0.18s;
    z-index: 10001;
}
.lightbox-nav:hover {
    background: rgba(201,162,39,0.25);
    color: var(--biel);
    transform: translateY(-50%) scale(1.1);
}
.lightbox-prev { left: 16px; }
.lightbox-next { right: 16px; }

.lightbox-media {
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 90vw;
    max-height: 80vh;
}

#lightbox-img {
    max-width: 88vw;
    max-height: 78vh;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 8px 48px rgba(0,0,0,0.7);
    animation: mediaIn 0.22s ease both;
}

#lightbox-video {
    width: 82vw;
    height: 46.1vw;
    max-width: 1100px;
    max-height: 72vh;
    border-radius: 6px;
    border: none;
    box-shadow: 0 8px 48px rgba(0,0,0,0.7);
    animation: mediaIn 0.22s ease both;
}

@keyframes mediaIn {
    from { opacity: 0; transform: scale(0.96); }
    to   { opacity: 1; transform: scale(1); }
}

.lightbox-caption {
    font-size: 0.88rem;
    color: rgba(255,255,255,0.65);
    text-align: center;
    max-width: 600px;
    font-style: italic;
}

.lightbox-counter {
    font-size: 0.74rem;
    color: rgba(201,162,39,0.6);
    letter-spacing: 1px;
}

@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; }
    .lightbox-prev { left: 6px; }
    .lightbox-next { right: 6px; }
    #lightbox-video { width: 96vw; height: 54vw; }
}

/* 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);
}