/* =========================================
   1. ZMIENNE I RESET
   ========================================= */
:root {
    --primary: #4c6603;       /* Główny zielony */
    --primary-light: #6a8a05; /* Jaśniejszy zielony dla hover */
    --text-main: #333;
    --bg-body: #f4f6f8;
    --white: #fff;
    --wcag-blue: #3b5998;     /* Kolor ikony dostępności */
}

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

body {
    font-family: 'Open Sans', sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.6;
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    font-size: 16px;
}

/* =========================================
   2. GLOBALNE ANIMACJE I PRZEJŚCIA
   ========================================= */
a, button, .c-btn, .wcag-toggle, input, .banner, .card {
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

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

.page-header, .content-box, .banner, .savings-box, .highlight-box {
    opacity: 0;
    animation: fadeInUp 0.8s ease-out forwards;
}

/* =========================================
   3. GÓRNY PASEK I HEADER
   ========================================= */
.top-bar {
    background-color: #222;
    padding: 10px 0;
    text-align: center;
}

.top-bar img {
    height: 60px;
    max-width: 95%;
    object-fit: contain;
    transition: filter 0.3s;
}

.top-bar img:hover {
    filter: brightness(1.1);
}

header {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-cont {
    max-width: 1400px;
    margin: 0 auto;
    padding: 10px 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    min-height: 60px;
}

.nav {
    display: flex;
    list-style: none;
    align-items: center;
    gap: 5px;
    margin: 0;
    padding: 0;
}

.nav a {
    display: block;
    padding: 12px 18px;
    text-decoration: none;
    color: #333;
    font-weight: 600;
    font-size: 1rem;
    border-radius: 25px;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.nav a.active {
    background-color: var(--primary);
    color: #fff;
    box-shadow: 0 4px 10px rgba(91, 33, 80, 0.3);
}

.nav a:not(.active):hover {
    background-color: rgba(91, 33, 80, 0.08);
    transform: translateY(-2px);
    color: var(--primary);
}

.nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 3px;
    background-color: var(--primary);
    transition: width 0.3s ease, left 0.3s ease;
}

.nav a:not(.active):hover::after {
    width: 60%;
    left: 20%;
}

.hamburger {
    display: none;
    background: none;
    border: none;
    font-size: 35px;
    cursor: pointer;
    color: #000;
    padding: 5px;
    position: absolute;
    right: 20px;
    top: 15px;
    z-index: 1001;
}

/* =========================================
   4. GŁÓWNA TREŚĆ I KOMPONENTY
   ========================================= */
main {
    flex: 1;
    padding-bottom: 60px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.page-header {
    background-color: var(--primary);
    color: #fff;
    text-align: center;
    padding: 50px 20px;
    margin-bottom: 40px;
    background-image: linear-gradient(135deg, var(--primary) 0%, #3a1033 100%);
}

.page-header h2 {
    margin: 0 0 15px;
    font-size: 2.5rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.page-header p {
    font-size: 1.1rem;
    max-width: 800px;
    margin: 0 auto;
    opacity: 0.9;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.card {
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    border: 1px solid #eee;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    opacity: 0;
    animation: fadeInUp 0.6s ease-out forwards;
    position: relative;
    top: 0;
}

.card:nth-child(1) { animation-delay: 0.1s; }
.card:nth-child(2) { animation-delay: 0.2s; }
.card:nth-child(3) { animation-delay: 0.3s; }
.card:nth-child(4) { animation-delay: 0.4s; }
.card:nth-child(5) { animation-delay: 0.5s; }
.card:nth-child(6) { animation-delay: 0.6s; }

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    border-color: var(--primary-light);
}

.card-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
    display: block;
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.card:hover .card-icon {
    transform: scale(1.2) rotate(5deg);
}

.card h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: #222;
}

.card p {
    color: #555;
    margin-bottom: 0;
    flex: 1;
    text-align: left;
}

.content-box {
    background: #fff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    margin-bottom: 30px;
    border: 1px solid #f0f0f0;
}

.banner {
    display: block;
    background: #fff;
    padding: 25px;
    border-left: 6px solid var(--primary);
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    text-decoration: none;
    color: inherit;
    border-radius: 0 8px 8px 0;
}

.banner:hover {
    transform: scale(1.02);
    border-left-width: 12px;
    background-color: #fafafa;
    box-shadow: 0 10px 20px rgba(0,0,0,0.08);
}

.banner h4 {
    margin: 0 0 10px;
    color: #222;
    font-size: 1.2rem;
    font-weight: 700;
}

.check-list, ul {
    list-style-type: disc;
    padding-left: 20px;
}
.check-list li {
    margin-bottom: 8px;
    color: #444;
}

/* =========================================
   5. WIDGET WCAG
   ========================================= */
.wcag-container {
    position: fixed;
    top: 160px;
    left: 0;
    z-index: 99999;
}

.wcag-toggle {
    width: 50px;
    height: 50px;
    background-color: var(--wcag-blue);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 28px;
    border: none;
    border-radius: 0 4px 4px 0;
    box-shadow: 2px 2px 5px rgba(0,0,0,0.2);
}

.wcag-toggle:hover {
    background-color: #2a407a;
    width: 60px;
}

.wcag-panel {
    display: none;
    position: absolute;
    top: 0;
    left: 50px;
    width: 260px;
    background: #fff;
    border: 1px solid #ccc;
    box-shadow: 5px 5px 15px rgba(0,0,0,0.2);
    text-align: left;
    border-radius: 4px;
}

.wcag-panel.active {
    display: block;
    animation: fadeIn 0.3s;
}

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

.wcag-header {
    padding: 15px;
    font-weight: bold;
    border-bottom: 1px solid #eee;
    color: #333;
    background: #f9f9f9;
}

.wcag-option {
    display: block;
    width: 100%;
    text-align: left;
    padding: 12px 15px;
    background: #fff;
    border: none;
    border-bottom: 1px solid #f5f5f5;
    cursor: pointer;
    color: #333;
    font-size: 14px;
}

.wcag-option:hover {
    background: #f0f0f0;
    color: var(--wcag-blue);
    font-weight: bold;
}

/* =========================================
   6. SKALOWANIE CZCIONKI I TRYBY WCAG
   ========================================= */
html.fs-inc-1 { font-size: 18px; }
html.fs-inc-2 { font-size: 20px; }
html.fs-inc-3 { font-size: 22px; }
html.fs-dec-1 { font-size: 14px; }
html.fs-dec-2 { font-size: 13px; }
html.fs-dec-3 { font-size: 12px; }

body.mode-contrast { filter: contrast(150%); background: #000; color: #fff; }
body.mode-contrast header, body.mode-contrast footer, body.mode-contrast .card, body.mode-contrast .content-box { background: #000; border: 1px solid #ff0; color: #ff0; }
body.mode-contrast a { color: #0ff; text-decoration: underline; }
body.mode-contrast .banner { background: #000; border: 1px solid #ff0; }

body.mode-gray { filter: grayscale(100%); }
body.mode-negative { filter: invert(100%); }
body.mode-light { background: #fff; color: #000; }
body.mode-links a { text-decoration: underline !important; font-weight: bold !important; }
body.mode-readable { font-family: Arial, Helvetica, sans-serif !important; letter-spacing: 0.5px; word-spacing: 2px; }

/* =========================================
   7. STOPKA
   ========================================= */
footer {
    background: #f9f9f9;
    border-top: 1px solid #eee;
    padding: 40px 0;
    text-align: center;
    margin-top: auto;
}

.footer-cont {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    color: #666;
    font-size: 0.9rem;
}

/* =========================================
   8. MEDIA QUERIES (RWD)
   ========================================= */
@media (max-width: 1150px) {
    .hamburger { display: block; }
    .header-cont { justify-content: flex-end; }
    .nav {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 70px;
        left: 0;
        width: 100%;
        background: #fff;
        padding: 20px;
        box-shadow: 0 5px 15px rgba(0,0,0,0.1);
        align-items: center;
        border-top: 1px solid #eee;
    }
    .nav.active { display: flex; animation: slideDown 0.3s ease-out; }
    @keyframes slideDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }
    
    .nav li { width: 100%; margin-bottom: 5px; text-align: center; }
    .nav a { display: block; width: 100%; padding: 15px; }
    .nav a::after { display: none; }
    .nav a:hover { transform: none; background: #f5f5f5; }
}

/* =========================================
   9. POPUP COOKIES & MODAL (NOWY STYL)
   ========================================= */

/* --- BANNER DOLNY --- */
.cookie-overlay {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #fff;
    border-top: 4px solid var(--primary);
    z-index: 9999;
    box-shadow: 0 -5px 25px rgba(0,0,0,0.15);
    padding: 20px;
    display: none; /* JS to zmieni na flex */
    flex-direction: column;
}

.cookie-container-center {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

@media (min-width: 768px) {
    .cookie-container-center {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
    }
    .cookie-content {
        max-width: 60%;
        margin-right: 20px;
    }
    .cookie-buttons {
        display: flex;
        gap: 10px;
        flex-shrink: 0;
    }
}

.cookie-content p { margin: 0 0 15px 0; font-size: 0.95rem; color: #333; line-height: 1.4; }
@media (min-width: 768px) { .cookie-content p { margin: 0; } }

/* Przyciski */
.c-btn { padding: 10px 20px; cursor: pointer; border: none; font-weight: 600; border-radius: 6px; font-size: 0.9rem; transition: 0.2s; margin: 5px 0; }
.c-accept { background: var(--primary); color: #fff; }
.c-accept:hover { background: var(--primary-light); transform: translateY(-2px); }
.c-reject { background: #eaeaea; color: #333; }
.c-reject:hover { background: #dcdcdc; }
.c-settings { background: transparent; border: 2px solid #ccc; color: #555; }
.c-settings:hover { border-color: var(--primary); color: var(--primary); }

/* --- OKNO MODALNE (Poprawione) --- */
.cookie-modal-backdrop {
    position: fixed !important;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.7);
    z-index: 10000;
    display: flex; /* Centrowanie */
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.cookie-modal-box {
    background: #fff;
    width: 95%;
    max-width: 500px;
    border-radius: 12px;
    box-shadow: 0 25px 50px rgba(0,0,0,0.5);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    max-height: 90vh;
}

.modal-header { background: #f9f9f9; padding: 15px 20px; border-bottom: 1px solid #eee; display: flex; justify-content: space-between; align-items: center; }
.modal-header h3 { margin: 0; font-size: 1.2rem; color: #333; }
.close-modal { background: none; border: none; font-size: 28px; cursor: pointer; color: #666; line-height: 1; }
.modal-body { padding: 20px; overflow-y: auto; text-align: left; }
.modal-footer { padding: 15px 20px; border-top: 1px solid #eee; background: #f9f9f9; }

/* Suwaki - NAPRAWIONE */
.cookie-option { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; padding-bottom: 15px; border-bottom: 1px solid #f0f0f0; }
.cookie-option:last-child { border-bottom: none; margin-bottom: 0; }
.option-info { max-width: 75%; text-align: left; }
.option-info strong { display: block; margin-bottom: 4px; color: #222; }
.option-info span { font-size: 0.85rem; color: #666; }

/* KLUCZ: label z cursor: pointer */
.option-switch { position: relative; width: 50px; height: 26px; cursor: pointer; display: inline-block; }
.option-switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #ccc; border-radius: 34px; transition: .4s; }
.slider:before { position: absolute; content: ""; height: 18px; width: 18px; left: 4px; bottom: 4px; background-color: white; border-radius: 50%; transition: .4s; }
input:checked + .slider { background-color: var(--primary); }
input:checked + .slider:before { transform: translateX(24px); }
.slider.disabled { background-color: #c19a4b; opacity: 0.7; cursor: not-allowed; } 

/* =========================================
   10. QUIZ BUTTONS
   ========================================= */
#quiz-box button:not(#nx) { transition: transform 0.2s, background-color 0.2s, border-color 0.2s; }
#quiz-box button:not(#nx):hover { transform: translateX(10px); border-color: var(--primary); background-color: #f9f9f9; }
/* =========================================
   11. REALIZACJE (BESTWINA)
   ========================================= */
.real-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}
.real-stat {
    background: #fff;
    border-radius: 10px;
    border-top: 5px solid var(--primary);
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    padding: 20px;
    text-align: center;
}
.real-stat strong { display: block; font-size: 1.8rem; color: var(--primary); line-height: 1.2; }
.real-stat span { color: #555; font-size: 0.95rem; }

.tts-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    background: rgba(91, 33, 80, 0.07);
    border-left: 5px solid var(--primary);
    border-radius: 8px;
    padding: 15px 20px;
    margin-bottom: 30px;
}
.tts-bar p { margin: 0; flex: 1 1 300px; }
.tts-bar-btns { display: flex; gap: 10px; flex-wrap: wrap; }

.real-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}
.real-card {
    margin: 0;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #eee;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    opacity: 0;
    animation: fadeInUp 0.6s ease-out forwards;
    transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
}
.real-card:hover { transform: translateY(-6px); box-shadow: 0 20px 40px rgba(0,0,0,0.1); }
.real-card.speaking { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(91, 33, 80, 0.35); }

.real-img { position: relative; aspect-ratio: 4 / 3; background: #e8eef2; }
.real-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.real-sample {
    display: none;
    position: absolute; left: 10px; bottom: 10px;
    background: rgba(0,0,0,0.65); color: #fff;
    font-size: 0.75rem; padding: 3px 8px; border-radius: 4px;
}
.real-img.is-sample .real-sample { display: inline-block; }
.real-badge {
    position: absolute; right: 10px; top: 10px;
    background: var(--primary); color: #fff;
    font-size: 0.8rem; font-weight: 600;
    padding: 4px 10px; border-radius: 20px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.real-card figcaption { padding: 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.real-caption { margin: 0; font-weight: 600; color: #222; flex: 1; }
.real-addr { margin: 0; color: #666; font-size: 0.9rem; }

.tts-btn {
    align-self: flex-start;
    display: inline-flex; align-items: center; gap: 6px;
    background: #fff;
    color: var(--primary);
    border: 2px solid var(--primary);
    border-radius: 20px;
    padding: 6px 16px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    font-family: inherit;
}
.tts-btn:hover, .tts-btn:focus-visible { background: var(--primary); color: #fff; }
.tts-btn.is-playing { background: var(--primary); color: #fff; }
.tts-unsupported .tts-btn, .tts-unsupported .tts-bar { display: none; }

.real-note { margin-top: 30px; color: #666; font-size: 0.9rem; text-align: center; }

body.mode-contrast .real-card, body.mode-contrast .real-stat, body.mode-contrast .tts-bar { background: #000; border: 1px solid #ff0; color: #ff0; }
body.mode-contrast .real-caption, body.mode-contrast .real-addr { color: #ff0; }
body.mode-contrast .tts-btn { background: #000; color: #0ff; border-color: #0ff; }

/* =========================================
   12. MOTYW „BESTWINA” – BUTELKOWA ZIELEŃ + ZŁOTO
   ========================================= */
:root {
    --primary: #0f4d3a;          /* butelkowa zieleń – kontrast z bielą 10:1 */
    --primary-light: #2f7a5c;
    --primary-dark: #08301f;
    --accent: #c9a24a;           /* złoto */
    --accent-soft: #f1e3b8;
    --gold-text: #8a6a1f;
    --ink: #0d1f18;
    --bg-body: #f5f7f3;
    --text-main: #1d2a24;
    --glass: rgba(255, 255, 255, 0.84);
    --ring: #c9a24a;
    --wcag-blue: #0f4d3a;
    --grad: linear-gradient(125deg, #052419 0%, #0f4d3a 55%, #1b5e45 100%);
}

body {
    background:
        radial-gradient(1200px 500px at 110% -10%, rgba(47,122,92,0.08), transparent 60%),
        radial-gradient(900px 400px at -10% 30%, rgba(201,162,74,0.06), transparent 60%),
        var(--bg-body);
}

/* --- Pasek logotypów --- */
.top-bar { background: #fff; border-bottom: 1px solid #e2ece6; }

/* --- Nawigacja w stylu „glass” --- */
header {
    background: var(--glass);
    -webkit-backdrop-filter: saturate(160%) blur(12px);
    backdrop-filter: saturate(160%) blur(12px);
    border-bottom: 1px solid rgba(15,77,58,0.12);
}
.nav a { color: var(--ink); }
.nav a.active {
    background: var(--grad);
    box-shadow: 0 6px 18px rgba(15,77,58,0.35);
}
.nav a:not(.active):hover { background-color: rgba(15,77,58,0.08); color: var(--primary); }
.nav a::after { background: linear-gradient(90deg, var(--primary-light), var(--accent)); }

/* --- Nagłówek strony: animowana zorza + słońce --- */
.page-header {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    background: var(--grad) !important;
    background-size: 200% 200% !important;
    animation: fadeInUp 0.8s ease-out forwards, heroShift 16s ease-in-out infinite;
    padding: 70px 20px 80px;
    clip-path: polygon(0 0, 100% 0, 100% 88%, 0 100%);
}
.page-header::before,
.page-header::after {
    content: "";
    position: absolute;
    z-index: -1;
    border-radius: 50%;
    filter: blur(2px);
    pointer-events: none;
}
.page-header::before {           /* delikatna poświata */
    width: 700px; height: 700px;
    right: -220px; top: -420px;
    background: radial-gradient(circle, rgba(241,227,184,0.22), rgba(241,227,184,0) 65%);
}
.page-header::after {            /* złota poświata */
    width: 620px; height: 620px;
    left: -180px; bottom: -380px;
    background: radial-gradient(circle, rgba(201,162,74,0.28), rgba(201,162,74,0) 65%);
    animation: floatBlob 14s ease-in-out infinite;
}
.page-header h2 {
    letter-spacing: -0.5px;
    background: linear-gradient(90deg, #ffffff 0%, #f1e3b8 100%);
    -webkit-background-clip: text; background-clip: text;
    color: transparent;
    text-shadow: none;
}
.page-header h3 { color: var(--accent-soft); font-weight: 600; }

@keyframes heroShift { 0%,100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
@keyframes sunPulse { 0%,100% { transform: scale(1); opacity: .9; } 50% { transform: scale(1.12); opacity: 1; } }
@keyframes floatBlob { 0%,100% { transform: translate(0,0); } 50% { transform: translate(60px,-30px); } }

/* --- Karty i boksy --- */
.card, .content-box, .banner, .real-card, .real-stat {
    border-radius: 16px;
    border: 1px solid rgba(15,77,58,0.10);
    box-shadow: 0 10px 30px -12px rgba(6,42,31,0.18);
}
.card { position: relative; overflow: hidden; }
.card::before {                  /* gradientowy pasek u góry */
    content: "";
    position: absolute; left: 0; top: 0; right: 0; height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--primary-light), var(--accent));
    transform: scaleX(0); transform-origin: left;
    transition: transform .45s ease;
}
.card:hover::before, .card:focus-within::before, .card:focus::before { transform: scaleX(1); }
.card:hover { border-color: rgba(15,77,58,0.35); }
.card-icon {
    width: 64px; height: 64px;
    display: grid; place-items: center;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(47,122,92,0.14), rgba(201,162,74,0.14));
    font-size: 2rem;
}
.card-link {
    margin-top: 15px;
    color: var(--primary);
    font-weight: 700;
    text-decoration: none;
}
.card-link:hover { color: var(--primary-dark); letter-spacing: .3px; }

.content-box h3, .card h3 { color: var(--ink); }
.step-heading, .blue-heading { color: var(--primary) !important; }

.banner { border-left: 6px solid var(--primary); }
.banner:hover { border-left-color: var(--accent); }

.real-stat strong {
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.real-stat { border-top: 0; position: relative; overflow: hidden; }
.real-stat::after {
    content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
}
.real-badge { background: rgba(6,42,31,0.85); color: #fff; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.tts-bar { background: linear-gradient(90deg, rgba(15,77,58,0.08), rgba(201,162,74,0.06)); }
.real-img img { transition: transform .6s ease; }
.real-card:hover .real-img img, .real-card:focus-within .real-img img { transform: scale(1.06); }
.real-img { overflow: hidden; }

/* --- Przyciski --- */
.c-accept { background: var(--grad); }
.c-accept:hover { background: var(--primary-dark); }

/* --- Stopka --- */
footer {
    background: var(--ink);
    color: #cfe7df;
    border-top: 4px solid transparent;
    border-image: linear-gradient(90deg, var(--primary), var(--accent)) 1;
}
.footer-cont { color: #cfe7df; }

/* --- Animacja pojawiania przy przewijaniu --- */
html.js .reveal { opacity: 0; transform: translateY(28px); animation: none !important; transition: opacity .7s ease, transform .7s ease; }
html.js .reveal.in { opacity: 1; transform: none; }

/* --- Pasek postępu przewijania --- */
#scroll-progress {
    position: fixed; left: 0; top: 0; height: 4px; width: 100%;
    transform: scaleX(0); transform-origin: left;
    background: linear-gradient(90deg, var(--primary-light), var(--accent));
    z-index: 100000; pointer-events: none;
}

/* =========================================
   13. DOSTĘPNOŚĆ KLAWIATUROWA + AUDIODESKRYPCJA
   ========================================= */
.skip-link {
    position: absolute !important;
    left: 12px !important; top: -60px;
    z-index: 100001;
    background: var(--ink); color: #fff;
    padding: 10px 18px; border-radius: 8px;
    font-weight: 700; text-decoration: none;
}
.skip-link:focus { top: 12px; }

:focus-visible {
    outline: 3px solid var(--ring) !important;
    outline-offset: 3px !important;
    border-radius: 6px;
}
.ad-on [data-ad-target]:focus { box-shadow: 0 0 0 4px rgba(201,162,74,0.45), 0 10px 30px -12px rgba(6,42,31,0.25); }

.ad-toggle {
    position: fixed;
    right: 18px; bottom: 18px;
    z-index: 9998;
    display: inline-flex; align-items: center; gap: 8px;
    padding: 12px 18px;
    border: 0; border-radius: 999px;
    background: var(--ink); color: #fff;
    font: 700 0.95rem 'Open Sans', sans-serif;
    box-shadow: 0 12px 30px -8px rgba(6,42,31,0.55);
    cursor: pointer;
}
.ad-toggle .ad-dot { width: 10px; height: 10px; border-radius: 50%; background: #9ca3af; }
.ad-toggle[aria-pressed="true"] { background: var(--grad); }
.ad-toggle[aria-pressed="true"] .ad-dot { background: #e8cf8a; animation: adPulse 1.4s ease-in-out infinite; }
.ad-toggle kbd { font: 600 .75rem monospace; background: rgba(255,255,255,.15); padding: 2px 6px; border-radius: 4px; }
@keyframes adPulse { 0%,100% { box-shadow: 0 0 0 0 rgba(201,162,74,.7); } 50% { box-shadow: 0 0 0 6px rgba(201,162,74,0); } }

.ad-panel {
    position: fixed; right: 18px; bottom: 80px;
    z-index: 9998;
    width: min(360px, calc(100vw - 36px));
    background: #fff; color: var(--text-main);
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(6,42,31,0.45);
    border: 1px solid rgba(15,77,58,0.15);
    padding: 18px;
    display: none;
}
.ad-on .ad-panel { display: block; animation: fadeIn .3s; }
.ad-on.ad-collapsed .ad-panel { display: none; }
.ad-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.ad-collapse { background: #eef4f0; border: 1px solid #cfe0d6; border-radius: 8px; padding: 4px 10px; font: 600 .8rem 'Open Sans', sans-serif; cursor: pointer; color: var(--ink); }
.ad-collapse:hover { background: #dfece4; }
.ad-panel h2 { font-size: 1.05rem; margin-bottom: 8px; color: var(--ink); }
.ad-panel p { font-size: .88rem; margin-bottom: 8px; }
.ad-panel ul { font-size: .85rem; margin: 6px 0 12px; padding-left: 18px; }
.ad-panel kbd { font: 600 .78rem monospace; background: #eef4f0; border: 1px solid #cfe0d6; padding: 1px 6px; border-radius: 4px; }
.ad-panel label { display: block; font-size: .85rem; font-weight: 600; margin: 6px 0 4px; }
.ad-panel select, .ad-panel input[type=range] { width: 100%; }
.ad-panel select { padding: 6px; border-radius: 8px; border: 1px solid #cfe0d6; font: inherit; }
.ad-row { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.ad-row .c-btn { flex: 1; margin: 0; }
.ad-now {
    margin-top: 10px; font-size: .82rem; color: #4b5b57;
    max-height: 4.5em; overflow: hidden;
    border-left: 3px solid var(--primary-light); padding-left: 8px;
}
.ad-speaking { box-shadow: 0 0 0 4px rgba(201,162,74,0.45) !important; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

body.mode-contrast .ad-panel { background: #000; color: #ff0; border-color: #ff0; }
body.mode-contrast footer { background: #000; }

@media (max-width: 600px) {
    .ad-toggle .ad-label-long, .ad-toggle kbd { display: none; }
    .page-header { padding: 50px 16px 60px; }
    .page-header h2 { font-size: 1.9rem; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
    html.js .reveal { opacity: 1; transform: none; }
}

.wcag-toggle:hover { background-color: var(--primary); }
.wcag-option:hover { color: var(--primary); }

.page-header::before { background: radial-gradient(circle, rgba(201,162,74,0.20), rgba(201,162,74,0) 65%) !important; }

/* Gradient w tle strony */
body {
    background:
        radial-gradient(1100px 600px at 100% 0%, rgba(47,122,92,0.12), transparent 60%),
        radial-gradient(900px 600px at 0% 100%, rgba(201,162,74,0.14), transparent 60%),
        linear-gradient(180deg, #f4f7f2 0%, #eef4ef 45%, #f7f2e6 100%) fixed;
    background-attachment: fixed;
}

/* --- Ikony SVG --- */
.card-icon { color: var(--primary); }
.card-icon .ico { width: 34px; height: 34px; display: block; }
.real-addr { display: flex; align-items: center; gap: 6px; }
.real-addr .ico { width: 16px; height: 16px; color: var(--gold-text); flex-shrink: 0; }
.wcag-toggle { background: var(--primary); }
.wcag-toggle .ico { width: 28px; height: 28px; }
.wcag-toggle:hover { background: var(--primary-dark); }
.wcag-option:hover { color: var(--primary); }
.ad-toggle .ico { width: 20px; height: 20px; }
.ad-toggle .ad-dot { display: none; }
.ad-toggle[aria-pressed="true"] { background: var(--grad); }
.ad-toggle[aria-pressed="true"] .ico { color: var(--accent); }
.page-header h2 { background: linear-gradient(90deg, #ffffff 0%, #ffffff 55%, #f1e3b8 100%); -webkit-background-clip: text; background-clip: text; }
.page-header h3 { color: var(--accent-soft); }
.nav a.active { color: #fff; }
.nav a.active::after { display: none; }
footer { border-image: linear-gradient(90deg, var(--primary-light), var(--accent)) 1; }

/* --- Linki w treści --- */
main a:not(.card-link):not(.banner):not(.c-btn):not(.skip-link) { color: var(--primary); text-decoration-color: var(--accent); text-underline-offset: 3px; }

@media (max-width: 600px) {
    .wcag-container { top: auto; bottom: 18px; }
    .wcag-panel { top: auto; bottom: 0; }
}

/* Powiększanie czcionki z panelu ułatwień działa na całym tekście */
html { font-size: 16px; }
body { font-size: 1rem; }
.wcag-option { font-size: 0.875rem; }

/* Tryb wysokiego kontrastu – czytelne nagłówki i elementy motywu */
body.mode-contrast h2, body.mode-contrast h3, body.mode-contrast h4, body.mode-contrast strong,
body.mode-contrast .real-stat strong, body.mode-contrast .card-icon, body.mode-contrast .step-heading { color: #ff0 !important; background: none !important; -webkit-text-fill-color: #ff0; }
body.mode-contrast .page-header { background: #000 !important; border-bottom: 2px solid #ff0; }
body.mode-contrast .page-header h2, body.mode-contrast .page-header h3, body.mode-contrast .page-header p { color: #fff !important; -webkit-text-fill-color: #fff; }
body.mode-contrast .page-header::before, body.mode-contrast .page-header::after { display: none; }
body.mode-contrast .card-icon { background: #000 !important; border: 1px solid #ff0; }
body.mode-contrast .real-stat, body.mode-contrast .savings-box, body.mode-contrast .content-box[style] { background: #000 !important; color: #ff0; border-color: #ff0 !important; }
body.mode-contrast .card p, body.mode-contrast .real-stat span, body.mode-contrast .real-addr, body.mode-contrast .real-caption { color: #ff0 !important; }
body.mode-contrast .nav a.active { background: #ff0 !important; color: #000 !important; }
body.mode-light { background: #fff !important; }
