/* ==========================================================================
   Gminna Spółka Wodna w Łaniętach — arkusz stylów
   Typografia: Merriweather (nagłówki) + Public Sans (tekst)
   Paleta: granat instytucjonalny + błękit z herbu + złoty akcent
   ========================================================================== */

:root {
    --color-primary: #0056b3;
    --color-primary-dark: #003d82;
    --color-primary-darker: #002a5c;
    --color-accent-cyan: #00a8c2;
    --color-accent-gold: #ffc107;
    --color-accent-green: #28a745;
    --color-accent-green-dark: #1e7e34;
    --color-text: #2a2e35;
    --color-text-muted: #5a6270;
    --color-bg: #f4f7fa;
    --color-surface: #ffffff;
    --color-border: #e2e6ec;

    --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, 80, 0.06);
    --shadow-md: 0 6px 20px rgba(15, 40, 80, 0.10);
    --shadow-lg: 0 10px 30px rgba(15, 40, 80, 0.16);
}

/* Reset i style ogólne */
* { 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;
}

/* Baner ze zdjęciem na górze każdej strony — zdjęcie jako główny, niezasłonięty motyw */
.hero-banner {
    width: 100%;
    height: 340px;
    background-image: url('zdjecia/tlo-krajobraz.jpg');
    background-size: cover;
    background-position: center 30%;
    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; }
}

.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 i Logo */
.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; }

/* Menu Nawigacyjne */
.main-nav ul { list-style: none; display: flex; gap: 6px; flex-wrap: wrap; }
.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);
}

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

/* Bez wcięcia tam, gdzie nie pasuje typograficznie: ramki, stopka, galeria */
.alert-box p,
.gallery-item p,
.site-footer p,
.ba-photo p {
    text-indent: 0;
}

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 (Alerty) */
.alert-box {
    padding: 20px 24px;
    margin: 24px 0;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
}
.alert-blue   { background: #e9f2fc; border-left: 5px solid var(--color-primary); color: #063868; }
.alert-yellow { background: #fff8e1; 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 { color: inherit; }
.alert-box strong { color: inherit; }
.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: 16px;
    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: 13px 15px; text-align: left; }
th {
    background-color: var(--color-primary);
    color: white;
    font-weight: 700;
    font-family: var(--font-body);
    letter-spacing: 0.02em;
    text-transform: uppercase;
    font-size: 13.5px;
}
tr:last-child td { border-bottom: none; }
tr:nth-child(even) { background-color: #f7f9fc; }
tbody tr:hover { background-color: #eef4fb; }
.text-center { text-align: center; }
.text-right { text-align: right; }

/* Przyciski i pliki do pobrania */
.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);
}

/* 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: #fafbfd;
    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: 200px; 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; }

/* Zdjęcia przed / po */
.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, #1a1d24 0%, #101216 100%);
    color: #c9ccd3;
    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: #c9ccd3 !important; text-align: left; }
.site-footer strong { color: #ffffff !important; }
.site-footer a { color: #ffffff !important; }
.site-credit { margin-top: 10px; font-size: 12.5px; color: #9aa0ab !important; }
.site-credit a { color: #c9ccd3 !important; text-decoration: underline; }
.site-credit a:hover { color: #ffffff !important; }

/* 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; }
    .main-nav a { font-size: 14.5px; padding: 9px 12px; }
    .footer-flex { text-align: center; justify-content: center; }
}
