/* ==========================================================================
   Rejonowy Związek Spółek Wodnych w Lesznie — arkusz stylów
   Typografia: Merriweather (nagłówki) + Public Sans (tekst)
   Paleta: leśna zieleń instytucjonalna + złoty akcent
   ========================================================================== */

:root {
    --color-primary: #1b6b3a;
    --color-primary-dark: #0f4a27;
    --color-primary-darker: #0a331b;
    --color-accent-cyan: #2f8f5b;
    --color-accent-gold: #d9a441;
    --color-accent-green: #2e7d32;
    --color-accent-green-dark: #205a24;
    --color-text: #262b24;
    --color-text-muted: #5a6258;
    --color-bg: #f4f7f4;
    --color-surface: #ffffff;
    --color-border: #e1e6e0;

    --font-display: 'Merriweather', Georgia, 'Times New Roman', serif;
    --font-body: 'Public Sans', 'Segoe UI', Arial, sans-serif;

    --radius: 10px;
    --shadow-sm: 0 2px 8px rgba(15, 40, 25, 0.06);
    --shadow-md: 0 6px 20px rgba(15, 40, 25, 0.10);
    --shadow-lg: 0 10px 30px rgba(15, 40, 25, 0.16);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    font-size: 18px;
    line-height: 1.75;
    color: var(--color-text);
    background: var(--color-bg);
    -webkit-font-smoothing: antialiased;
}

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 24px; }
a { color: var(--color-primary); }
:focus-visible { outline: 3px solid var(--color-accent-gold); outline-offset: 2px; }

/* Nagłówek */
.site-header {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    color: white;
    padding: 18px 0;
    border-bottom: 4px solid var(--color-accent-gold);
    box-shadow: var(--shadow-md);
    position: relative;
    z-index: 10;
}
.header-flex { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 20px; }

.main-nav ul { list-style: none; display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.main-nav a {
    color: white;
    text-decoration: none;
    font-weight: 600;
    font-size: 16.5px;
    letter-spacing: 0.02em;
    padding: 11px 16px;
    border-radius: 6px;
    transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease;
    display: inline-block;
}
.main-nav a:hover, .main-nav a:focus-visible {
    background: rgba(255, 255, 255, 0.15);
    color: var(--color-accent-gold);
    transform: translateY(-1px);
}
@media (max-width: 768px) {
    .main-nav a { font-size: 14.5px; padding: 9px 12px; }
}

/* Baner ze zdjęciem na górze każdej strony */
.hero-banner {
    width: 100%;
    height: 340px;
    background-image: url('zdjecia/pt6.jpg');
    background-size: cover;
    background-position: center 45%;
    background-repeat: no-repeat;
}
.hero-title-bar {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    border-bottom: 4px solid var(--color-accent-gold);
    padding: 22px 24px;
    text-align: center;
}
.hero-title-bar h1 {
    font-family: var(--font-display);
    font-weight: 900;
    color: #ffffff;
    font-size: 26px;
    line-height: 1.3;
    margin: 0;
}
@media (max-width: 768px) {
    .hero-banner { height: 200px; }
    .hero-title-bar { padding: 14px 20px; }
    .hero-title-bar h1 { font-size: 19px; }
}

/* Zawartość stron */
.main-content {
    padding: 48px 44px;
    background: var(--color-surface);
    min-height: 500px;
    box-shadow: var(--shadow-md);
    margin-top: 28px;
    margin-bottom: 40px;
    border-radius: var(--radius);
}

h2 {
    font-family: var(--font-display);
    font-weight: 900;
    color: var(--color-primary-darker);
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 3px solid var(--color-bg);
    position: relative;
    font-size: 28px;
    line-height: 1.3;
}
h2::after {
    content: "";
    position: absolute;
    left: 0; bottom: -3px;
    width: 64px; height: 3px;
    background: var(--color-accent-gold);
}
h3 {
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--color-primary);
    margin: 32px 0 16px 0;
    font-size: 22px;
    line-height: 1.4;
}
h4 { font-family: var(--font-display); font-size: 17px; }

p { margin-bottom: 17px; text-align: justify; text-indent: 2em; color: var(--color-text); }
h2 + p, .lead-paragraph { font-size: 20px; line-height: 1.7; color: var(--color-text); }

ul, ol { margin-bottom: 20px; padding-left: 26px; }
li { margin-bottom: 10px; }
strong { color: var(--color-primary-darker); }

/* Ramki wyróżniające */
.alert-box { padding: 20px 24px; margin: 24px 0; border-radius: 8px; box-shadow: var(--shadow-sm); }
.alert-blue   { background: #e9f3ec; border-left: 5px solid var(--color-primary); color: #0d3d1e; }
.alert-yellow { background: #fbf3e3; border-left: 5px solid var(--color-accent-gold); color: #6b4e00; }
.alert-green  { background: #e8f7ec; border-left: 5px solid var(--color-accent-green); color: #175229; }
.alert-box p, .alert-box strong { color: inherit; text-indent: 0; }
.alert-box p:last-child { margin-bottom: 0; }
.alert-box h3 { margin-top: 0; color: inherit; }

/* Tabele */
table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 24px 0;
    font-size: 15.5px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-border);
}
th, td { border-bottom: 1px solid var(--color-border); padding: 11px 14px; text-align: left; }
th {
    background-color: var(--color-primary);
    color: white;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    font-size: 12.5px;
}
tr:last-child td { border-bottom: none; }
tr:nth-child(even) { background-color: #f5f8f5; }
tbody tr:hover { background-color: #eaf3ec; }
.text-center { text-align: center; }
.text-right { text-align: right; }

/* Przyciski pobierania */
.download-button {
    display: inline-block;
    background: var(--color-accent-green);
    color: white;
    padding: 12px 24px;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 700;
    margin-top: 8px;
    box-shadow: var(--shadow-sm);
    transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}
.download-button:hover { background: var(--color-accent-green-dark); transform: translateY(-2px); box-shadow: var(--shadow-md); }

/* Lista dokumentów do pobrania */
.doc-list { list-style: none; padding-left: 0; margin: 24px 0; }
.doc-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    padding: 16px 20px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    margin-bottom: 14px;
    box-shadow: var(--shadow-sm);
}
.doc-item-name { font-weight: 700; color: var(--color-primary-darker); text-indent: 0; }
.doc-item-desc { font-size: 14.5px; color: var(--color-text-muted); margin-top: 4px; }

/* Siatka galerii */
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 22px; margin-top: 28px; }
.gallery-item {
    border: 1px solid var(--color-border);
    border-radius: 8px;
    overflow: hidden;
    background: #fafbfa;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.gallery-item:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.gallery-item img { width: 100%; height: 220px; object-fit: cover; display: block; }
.gallery-item p { padding: 12px 14px; font-size: 13.5px; color: var(--color-text-muted); margin: 0; text-align: center; text-indent: 0; }

/* Zdjęcia przed / po (jeśli kiedyś potrzebne) */
.before-after-item { margin-bottom: 36px; }
.before-after-item h4 { font-family: var(--font-display); color: var(--color-primary); font-size: 18px; margin-bottom: 14px; }
.before-after-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.ba-photo { position: relative; border-radius: 8px; overflow: hidden; border: 1px solid var(--color-border); box-shadow: var(--shadow-sm); transition: box-shadow 0.2s ease, transform 0.2s ease; }
.ba-photo:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.ba-photo img { width: 100%; height: 280px; object-fit: cover; display: block; }
.ba-label { position: absolute; top: 12px; left: 12px; padding: 4px 14px; border-radius: 20px; font-size: 12px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: white; box-shadow: 0 2px 6px rgba(0,0,0,0.25); z-index: 2; }
.ba-before { background: #c0392b; }
.ba-after { background: var(--color-accent-green); }
@media (max-width: 640px) { .before-after-grid { grid-template-columns: 1fr; } .ba-photo img { height: 220px; } }

/* Stopka */
.site-footer {
    background: linear-gradient(135deg, #16201a 0%, #0c120d 100%);
    color: #c8d0c6;
    padding: 36px 0;
    font-size: 14.5px;
    border-top: 3px solid var(--color-accent-cyan);
}
.footer-flex { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 20px; }
.site-footer h3 { font-family: var(--font-display); color: white; margin: 0 0 10px 0; font-size: 18px; }
.site-footer p { margin-bottom: 4px; color: #c8d0c6; text-align: left; text-indent: 0; }
.site-footer strong { color: #ffffff; }
.site-footer a { color: #ffffff; }
.site-credit { margin-top: 10px; font-size: 12.5px; color: #9aa89a; }
.site-credit a { color: #c8d0c6; text-decoration: underline; }
.site-credit a:hover { color: #ffffff; }

/* Responsywność */
@media (max-width: 768px) {
    body { font-size: 16.5px; }
    .main-content { padding: 32px 22px; }
    h2 { font-size: 22px; }
    h2 + p, .lead-paragraph { font-size: 17px; }
    h3 { font-size: 19px; }
    .footer-flex { text-align: center; justify-content: center; }
    .doc-item { flex-direction: column; align-items: flex-start; }
}
