@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;1,400&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;
    --ziel-jasna:    #7a9e5a;
    --tlo:           #eef5e8;
    --tlo-karta:     #f7faf4;
    --zloto:         #c9a227;
    --zloto-jasne:   rgba(201,162,39,0.55);
    --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: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}
 
/* ==========================================================
   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);
}

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

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

/* BANNER */
.history-banner {
    background: linear-gradient(135deg, var(--ziel-ciemna), var(--ziel-glowna));
    border-radius: var(--radius);
    padding: 36px 48px;
    border: 1px solid rgba(201,162,39,0.2);
    box-shadow: var(--cien-karta);
    position: relative;
    overflow: hidden;
}

.history-banner::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(201,162,39,0.55) 40%, rgba(201,162,39,0.55) 60%, transparent);
}

.history-banner-inner {
    display: flex;
    align-items: center;
    gap: 28px;
}

.history-banner-icon {
    font-size: 3rem;
    flex-shrink: 0;
}

.history-motto {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.3rem;
    font-style: italic;
    font-weight: 400;
    color: rgba(255,255,255,0.9);
    line-height: 1.6;
    border: none;
    padding: 0;
}

/* SIATKA TREŚCI */
.history-content-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 24px;
    align-items: start;
}

@media (max-width: 768px) {
    .history-content-grid { grid-template-columns: 1fr; }
    .history-banner { padding: 24px; }
    .history-banner-inner { flex-direction: column; gap: 14px; text-align: center; }
    .history-motto { font-size: 1.05rem; }
}

/* GŁÓWNA SEKCJA TEKSTU */
.history-main {
    background: var(--tlo-karta);
    border-radius: var(--radius);
    padding: 40px 44px;
    box-shadow: var(--cien-karta);
    border: 1px solid rgba(94,126,66,0.18);
    position: relative;
    overflow: hidden;
}

.history-main::before {
    content: '';
    position: absolute;
    top: 0; left: 0; bottom: 0;
    width: 4px;
    background: linear-gradient(to bottom, var(--zloto), rgba(201,162,39,0.1));
    border-radius: 4px 0 0 4px;
}

.history-label {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: var(--zloto);
    margin-bottom: 8px;
    opacity: 0.85;
}

.history-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 2.1rem;
    font-weight: 600;
    color: var(--tekst-ciemny);
    line-height: 1.2;
    margin-bottom: 14px;
}

.history-divider {
    width: 56px;
    height: 2px;
    background: linear-gradient(90deg, var(--zloto), transparent);
    margin-bottom: 24px;
    border-radius: 2px;
}

.history-text {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.history-text p {
    font-size: 1rem;
    line-height: 1.85;
    color: rgba(42,62,26,0.82);
    font-weight: 300;
}

.history-text strong {
    font-weight: 700;
    color: var(--tekst-ciemny);
}

/* OŚ CZASU */
.history-timeline {
    background: var(--tlo-karta);
    border-radius: var(--radius);
    padding: 30px 28px;
    box-shadow: var(--cien-karta);
    border: 1px solid rgba(94,126,66,0.18);
}

.timeline-label {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: var(--zloto);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(201,162,39,0.25);
    opacity: 0.85;
}

.timeline-items {
    display: flex;
    flex-direction: column;
    gap: 0;
    position: relative;
}

.timeline-items::before {
    content: '';
    position: absolute;
    left: 38px;
    top: 8px; bottom: 8px;
    width: 1px;
    background: linear-gradient(to bottom,
        rgba(201,162,39,0.5),
        rgba(201,162,39,0.1) 85%,
        transparent);
}

.timeline-item {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    padding: 12px 0;
    position: relative;
}

.timeline-year {
    flex-shrink: 0;
    width: 56px;
    text-align: right;
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--ziel-glowna);
    padding-top: 2px;
    position: relative;
}

.timeline-year::after {
    content: '';
    position: absolute;
    right: -22px;
    top: 7px;
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--zloto);
    border: 2px solid var(--tlo-karta);
    box-shadow: 0 0 0 2px rgba(201,162,39,0.25);
}

.timeline-desc {
    font-size: 0.87rem;
    line-height: 1.6;
    color: rgba(42,62,26,0.72);
    font-weight: 300;
    padding-top: 2px;
    padding-left: 16px;
}

/* 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; max-height: 90vh;
    object-fit: contain; border-radius: 4px;
    box-shadow: 0 8px 48px rgba(0,0,0,0.6);
}
img:not(#lightbox-img) { cursor: zoom-in; }

@media (max-width: 480px) {
    .main-header { padding: 0 16px; height: 80px; }
    .logo-box { padding: 5px 12px; height: 60px; font-size: 1rem; }
    .nav-btn { padding: 6px 12px; font-size: 0.72rem; letter-spacing: 1.5px; }
    .history-main { padding: 24px 20px; }
    .history-title { font-size: 1.65rem; }
    .history-timeline { padding: 22px 18px; }
}

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

.logo-img {
    height: 160px;
    width: 160px;
    object-fit: cover;
    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;
    cursor: default;
}

.logo-img:hover {
    box-shadow: none;
}