/* Główne style FoxBrew: paleta kolorów (tryb jasny i nocny), preloader, strona główna, FAQ, kontakt i stopka */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    overflow-y: scroll;
}

:root {
    --bg-color: #f7f3eb;
    --text-primary: #2c221e;
    --text-secondary: #5c4738;

    /* Kolory główne (karmelowy akcent ma kontrast >= 4.5:1 na białym i kremowym tle zgodnie z WCAG 2.1 AA) */
    --accent-orange: #b45309;
    --accent-dark: #261810;

    /* Tła i ramki szkła */
    --glass-bg: rgba(255, 255, 255, 0.65);
    --glass-bg-compact: rgba(247, 243, 235, 0.72);
    --glass-bg-compact-hover: rgba(255, 255, 255, 0.92);
    --glass-border: rgba(255, 255, 255, 0.85);
    --hairline-border: rgba(44, 34, 30, 0.08);
    --subtle-pill-bg: rgba(44, 34, 30, 0.06);
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    transition: background-color 0.5s ease, color 0.5s ease;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* Preloader i górny pasek ładowania */
#route-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 100%;
    z-index: 99998;
    pointer-events: none;
    opacity: 0;
    transform-origin: left center;
    transform: scaleX(0);
    background: linear-gradient(90deg, var(--accent-orange), #f59e0b, var(--accent-orange));
    transition: opacity 0.2s ease, transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}

#route-progress-bar.is-active {
    opacity: 1;
    transform: scaleX(0.84);
}

body.dark-mode #route-progress-bar {
    background: linear-gradient(90deg, #00c3ff, #00f0ff, #00c3ff);
}

html.is-preloading,
body.is-preloading {
    overflow: hidden !important;
    overscroll-behavior: none;
    touch-action: none;
}

#preloader {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bg-color);
    opacity: 1;
    visibility: visible;
    overscroll-behavior: none;
    touch-action: none;
    transition: opacity 0.42s cubic-bezier(0.22, 1, 0.36, 1), visibility 0.42s;
}

#preloader.is-skipped {
    display: none !important;
}

#preloader.fade-out {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 0 20px;
    transition: transform 0.38s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.38s ease;
}

#preloader.fade-out .loader-content {
    transform: translateY(-6px) scale(0.985);
    opacity: 0;
}

.loader-stage {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
}

.loader-aura {
    position: absolute;
    width: 210px;
    height: 210px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(217, 119, 36, 0.24) 0%, rgba(217, 119, 36, 0) 70%);
    animation: loaderAuraPulse 2.6s ease-in-out infinite;
    pointer-events: none;
}

body.dark-mode .loader-aura {
    background: radial-gradient(circle, rgba(0, 240, 255, 0.22) 0%, rgba(0, 240, 255, 0) 70%);
}

.loader-mascot {
    position: relative;
    width: min(350px, 80vw);
    max-height: 220px;
    height: auto;
    object-fit: contain;
    display: block;
}

@keyframes loaderAuraPulse {
    0%, 100% { transform: scale(0.94); opacity: 0.72; }
    50%      { transform: scale(1.08); opacity: 1; }
}

.loader-bar {
    width: min(240px, 62vw);
    height: 4px;
    background: rgba(44, 34, 30, 0.12);
    border-radius: 999px;
    overflow: hidden;
    position: relative;
}

body.dark-mode .loader-bar {
    background: rgba(255, 255, 255, 0.12);
}

.loader-progress {
    position: absolute;
    top: 0;
    left: -45%;
    height: 100%;
    width: 45%;
    background: var(--accent-orange);
    border-radius: 999px;
    animation: loadingIndeterminate 1.05s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

.loader-caption {
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 0.01em;
    opacity: 0.86;
    text-align: center;
}

@keyframes loadingIndeterminate {
    0% { left: -45%; }
    100% { left: 100%; }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }

    .loader-mascot,
    .loader-aura {
        animation: none;
    }
}

/* Zapobiega opóźnieniu 300ms i niechcianemu double-tap zoomowi na elementach klikalnych,
   nie blokując świadomego gestu powiększania strony dwoma palcami (WCAG 1.4.4) */
a,
button,
summary,
[role="button"],
input,
select,
textarea {
    touch-action: manipulation;
}

/* Globalne zabezpieczenie dla ekranów dotykowych (w tym iPhone'a zarówno w pionie, jak i w poziomie):
   iOS Safari robi auto-zoom po stuknięciu w pole formularza tylko wtedy, gdy font-size < 16px.
   Używamy max(16px, 1rem), żeby nigdy nie zejść poniżej 16px, a jednocześnie pozwolić na dalsze powiększanie z opcji dostępności. */
@media (pointer: coarse) {
    input,
    textarea,
    select {
        font-size: max(16px, 1rem);
    }
}

/* Sekcja powitalna */
.hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    max-width: 1100px;
    margin: 0 auto;
    padding: 140px 20px 40px;
}

.hero-text {
    flex: 1;
    max-width: 560px;
}

.hero-text h1 {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    line-height: 1.05;
    letter-spacing: -0.05em;
    margin-bottom: 18px;
    color: var(--text-primary);
}

.hero-text p {
    max-width: 540px;
    font-size: 1.08rem;
    line-height: 1.7;
    color: var(--text-secondary);
}

.hero-btn {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 28px;
    flex-wrap: wrap;
}

/* Główny przycisk z przejściami pod płynny efekt paska */
.btn-primary {
    background-color: var(--accent-dark);
    color: #fff;
    text-decoration: none;
    font-size: 1rem;
    padding: 10px 20px;
    border-radius: 12px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: 
        transform 0.2s ease,
        background-color 0.25s ease,
        color 0.25s ease,
        padding 0.35s cubic-bezier(0.22, 1, 0.36, 1),
        font-size 0.35s ease,
        border-radius 0.35s ease,
        box-shadow 0.25s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    background-color: var(--accent-orange);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.4);
    color: var(--text-primary);
    border: 1px solid rgba(38, 24, 16, 0.1);
    text-decoration: none;
    font-size: 1rem;
    padding: 10px 20px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, background-color 0.3s ease, border-color 0.3s ease;
}

.btn-secondary:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.7);
    border-color: rgba(38, 24, 16, 0.2);
}

.btn-large {
    font-size: 1.15rem;
    padding: 14px 28px;
}

.hero-img {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.hero-img img {
    width: 100%;
    max-width: 460px;
    height: auto;
    display: block;
    animation: foxBreathe 4.5s ease-in-out infinite;
    filter: drop-shadow(0 20px 40px rgba(217, 102, 2, 0.462));
}

@keyframes foxBreathe {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-12px) scale(1.02, 1.03); }
}
/* Sekcja podglądu kodu na stronie głównej */
.editor-section {
    max-width: 1100px;
    margin: 0 auto;
    padding: 100px 20px 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.editor-section h2 {
    font-size: 2.5rem;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.editor-section p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.editor-window {
    background-color: #1e1e1e;
    border-radius: 12px;
    overflow: hidden;
    width: 100%;
    max-width: 800px;
    margin: 40px auto 0;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4);
    text-align: left;
}

.editor-header {
    display: flex;
    align-items: center;
    background-color: #2d2d2d;
    padding: 12px 16px;
    gap: 8px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.dot.red { background-color: #ff5f56; }
.dot.yellow { background-color: #ffbd2e; }
.dot.green { background-color: #27c93f; }

.filename {
    color: #858585;
    font-family: monospace;
    font-size: 0.9rem;
    margin-left: auto;
    margin-right: auto;
    transform: translateX(-24px);
}

.editor-body {
    background-color: #1e1e1e;
}

.editor-body pre {
    margin: 0;
    padding: 24px;
    overflow-x: auto;
}

.editor-body pre code {
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 1rem;
    line-height: 1.5;
    color: #abb2bf;
}

/* Syntax Highlighting (Kolorowanie Javy) */
.keyword { color: #c678dd; font-weight: bold; }
.class-name { color: #e5c07b; }
.method-name { color: #61afef; }
.string { color: #98c379; }
.variable { color: #e06c75; }

/* Karty funkcji */
.features-section {
    max-width: 1100px;
    margin: 0 auto;
    padding: 100px 20px 60px;
    text-align: center;
}

.features-section h2 {
    font-size: 2.5rem;
    color: var(--text-primary);
    margin-bottom: 40px;
}

.features-grid {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.feature-card {
    flex: 1;
    min-width: 280px;
    max-width: 350px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 16px;
    padding: 40px 20px;
    transition: transform 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-8px);
}

.feature-icon {
    display: block;
    font-size: 3rem;
    margin-bottom: 20px;
}

.feature-card h3 {
    color: var(--text-primary);
    font-size: 1.3rem;
    margin-bottom: 12px;
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.6;
}

/* Sekcja FAQ */
.faq-section {
    max-width: 800px;
    margin: 0 auto;
    padding: 100px 20px 40px;
    overflow-anchor: none;
}

.faq-section h2 {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 40px;
    color: var(--text-primary);
}

.faq-item {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    box-shadow: 0 10px 30px -15px rgba(0, 0, 0, 0.06);
    border-radius: 18px;
    margin-bottom: 14px;
    overflow: hidden;
    transition: 
        background-color 0.35s ease,
        border-color 0.35s ease,
        box-shadow 0.4s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Subtelna reakcja karty przed kliknięciem */
.faq-item:hover {
    border-color: rgba(217, 119, 36, 0.35);
    transform: translateY(-2px);
    box-shadow: 0 14px 32px -12px rgba(0, 0, 0, 0.1);
}

/* Stan otwartej karty (wyraźniejsza tafla szkła) */
.faq-item.active {
    background: var(--glass-bg-compact-hover);
    border-color: rgba(217, 119, 36, 0.45);
    box-shadow: 
        0 20px 40px -15px rgba(0, 0, 0, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    transform: translateY(-2px);
}

/* Zerujemy domyślne marginesy nagłówka h3 otaczającego przycisk FAQ dla spójnego wyglądu akordeonu */
.faq-item h3 {
    margin: 0;
    font-size: inherit;
    font-weight: inherit;
}

.faq-question {
    width: 100%;
    border: none;
    background: transparent;
    font-family: inherit;
    text-align: left;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 22px 26px;
    cursor: pointer;
    user-select: none;
}

.faq-question-text,
.faq-question h3 {
    color: var(--text-primary);
    font-size: 1.08rem;
    font-weight: 650;
    letter-spacing: -0.01em;
    transition: color 0.25s ease, transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.faq-item:hover .faq-question-text,
.faq-item:hover .faq-question h3 {
    transform: translateX(3px);
}

.faq-item.active .faq-question-text,
.faq-item.active .faq-question h3 {
    color: var(--accent-orange);
}

/* Szklana kapsułka dla ikony '+' */
.faq-question .icon {
    width: 34px;
    height: 34px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--subtle-pill-bg);
    border: 1px solid var(--hairline-border);
    font-size: 1.25rem;
    line-height: 1;
    color: var(--text-secondary);
    font-weight: 500;
    transition: 
        transform 0.5s cubic-bezier(0.22, 1, 0.36, 1),
        background-color 0.3s ease,
        color 0.3s ease,
        border-color 0.3s ease;
}

.faq-item:hover .faq-question .icon {
    background: rgba(217, 119, 36, 0.12);
    color: var(--accent-orange);
    border-color: rgba(217, 119, 36, 0.25);
}

.faq-item.active .faq-question .icon {
    transform: rotate(135deg);
    background: var(--accent-orange);
    color: #fff;
    border-color: var(--accent-orange);
}

/* Animacja otwierania odpowiedzi co do piksela bez sztucznych opóźnień */
.faq-answer {
    display: grid;
    grid-template-rows: 0fr;
    padding: 0 26px;
    transition: grid-template-rows 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.faq-answer p {
    min-height: 0;
    overflow: hidden;
    color: var(--text-secondary);
    line-height: 1.65;
    font-size: 0.98rem;
    margin: 0;
    padding-bottom: 0;
    opacity: 0;
    filter: blur(6px);
    transform: translateY(-6px);
    /* Szybkie wygaszenie przy zamknięciu */
    transition: 
        opacity 0.2s ease,
        filter 0.2s ease,
        transform 0.25s ease,
        padding-bottom 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.faq-item.active .faq-answer {
    grid-template-rows: 1fr;
}

.faq-item.active .faq-answer p {
    padding-bottom: 24px;
    opacity: 1;
    filter: blur(0px);
    transform: translateY(0);
    /* Płynne wyostrzanie przy otwieraniu */
    transition: 
        opacity 0.4s ease 0.08s,
        filter 0.4s cubic-bezier(0.22, 1, 0.36, 1) 0.08s,
        transform 0.4s cubic-bezier(0.22, 1, 0.36, 1) 0.06s,
        padding-bottom 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.faq-answer code {
    padding: 2px 6px;
    border-radius: 6px;
    background: var(--subtle-pill-bg);
    border: 1px solid var(--hairline-border);
    color: var(--text-primary);
    font-size: 0.88em;
}

/* Sekcja kontaktu */
.contact-section {
    max-width: 1100px;
    margin: 0 auto;
    padding: 100px 20px 60px;
    text-align: center;
}

.contact-section h2 {
    font-size: 2.5rem;
    color: var(--text-primary);
    margin-bottom: 15px;
}

.contact-section > p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 50px;
}

.contact-container {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    text-align: left;
}

.contact-info, .contact-form {
    flex: 1;
    min-width: 320px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.1);
}

.contact-info h3 {
    font-size: 1.8rem;
    color: var(--text-primary);
    margin-bottom: 15px;
}

.contact-info > p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 30px;
}

.contact-details p {
    margin-bottom: 15px;
    font-size: 1.05rem;
    color: var(--text-secondary);
}

.contact-details strong {
    color: var(--text-primary);
    display: inline-block;
    width: 80px;
}

.contact-details a {
    color: var(--accent-orange);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.contact-details a:hover {
    color: var(--text-primary);
}

.contact-form form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-group label {
    font-weight: 600;
    color: var(--text-primary);
}

.input-group input,
.input-group textarea {
    width: 100%;
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.5);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.3s ease;
    outline: none;
}

.input-group input:focus,
.input-group textarea:focus {
    background: rgba(255, 255, 255, 0.9);
    border-color: var(--accent-orange);
    box-shadow: 0 0 0 4px rgba(217, 119, 36, 0.15);
}

.contact-form .btn-primary {
    margin-top: 10px;
}

.contact-rodo-note {
    margin-top: 12px;
    font-size: 0.8rem;
    line-height: 1.5;
    color: var(--text-secondary);
}

.contact-rodo-note a {
    color: var(--accent-orange);
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* Stopka */
.main-footer {
    margin-top: 100px;
    padding: 60px 20px 20px;
    background: transparent;
    border-top: 1px solid var(--glass-border);
}

.footer-container {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 30px;
}

.footer-logo {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
    opacity: 0.8;
}

.footer-links {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}

.footer-links a,
.footer-links-btn {
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-family: inherit;
    background: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
    display: inline-block;
    transition: color 0.3s ease, transform 0.2s ease, text-shadow 0.3s ease;
}

.footer-links a:hover,
.footer-links-btn:hover {
    color: var(--accent-orange);
    transform: scale(1.08);
    text-shadow: 0 0 12px rgba(217, 119, 36, 0.5);
}

.footer-bottom {
    max-width: 1100px;
    margin: 40px auto 0 auto;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* Tryb nocny */
body.dark-mode {
    --bg-color: #0b0f19;
    --text-primary: #f0f6fc;
    --text-secondary: #a3b0c2;

    --accent-orange: #00f0ff;
    --accent-dark: #00c3ff;

    --glass-bg: rgba(15, 20, 32, 0.72);
    --glass-bg-compact: rgba(11, 15, 25, 0.75);
    --glass-bg-compact-hover: rgba(15, 22, 36, 0.94);
    --glass-border: rgba(255, 255, 255, 0.12);
    --hairline-border: rgba(255, 255, 255, 0.07);
    --subtle-pill-bg: rgba(255, 255, 255, 0.07);
}

body.dark-mode .btn-primary {
    color: #0b0f19;
    font-weight: 800;
}

body.dark-mode .btn-secondary {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-primary);
    border-color: rgba(0, 240, 255, 0.3);
}

body.dark-mode .btn-secondary:hover {
    background: rgba(0, 240, 255, 0.1);
    border-color: var(--accent-orange);
}

body.dark-mode .hero-img img {
    filter: drop-shadow(0 20px 40px rgba(0, 240, 255, 0.15));
}

body.dark-mode .main-footer {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

body.dark-mode .footer-links a:hover {
    color: var(--accent-orange);
    text-shadow: 0 0 15px rgba(0, 240, 255, 0.7);
}

body.dark-mode .input-group input,
body.dark-mode .input-group textarea {
    background: rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

body.dark-mode .input-group input:focus,
body.dark-mode .input-group textarea:focus {
    background: rgba(0, 0, 0, 0.5);
    border-color: var(--accent-orange);
    box-shadow: 0 0 0 4px rgba(0, 240, 255, 0.15);
}

body.dark-mode .contact-details a {
    color: var(--accent-orange);
}

body.dark-mode .loader-bar {
    background: rgba(255, 255, 255, 0.1);
}

body.dark-mode .loader-mascot {
    filter: drop-shadow(0 15px 25px rgba(41, 128, 185, 0.3)); 
}

body.dark-mode .faq-item:hover {
    border-color: rgba(0, 240, 255, 0.35);
    box-shadow: 0 14px 32px -12px rgba(0, 0, 0, 0.5);
}

body.dark-mode .faq-item.active {
    border-color: rgba(0, 240, 255, 0.45);
    box-shadow: 
        0 20px 40px -15px rgba(0, 0, 0, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

body.dark-mode .faq-item:hover .faq-question .icon {
    background: rgba(0, 240, 255, 0.12);
    border-color: rgba(0, 240, 255, 0.3);
}

body.dark-mode .faq-item.active .faq-question .icon {
    color: #0b0f19;
}

/* Wersja tabletowa i mobilna */
@media (max-width: 1040px) {
    .hero {
        padding: 132px 28px 64px;
        gap: 36px;
    }

    .hero-text h1 {
        font-size: clamp(2.2rem, 5.2vw, 3.2rem);
    }

    .hero-img {
        width: min(360px, 40vw);
    }

    .editor-section,
    .features-section,
    .faq-section,
    .contact-section {
        padding: 40px 24px;
    }

    .features-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .contact-info,
    .contact-form {
        min-width: 0;
        padding: 32px 28px;
    }
}

@media (max-width: 820px) {
    .hero {
        flex-direction: column-reverse;
        text-align: center;
        padding: 106px 18px 42px;
        gap: 24px;
    }

    .hero-text p {
        margin-left: auto;
        margin-right: auto;
        font-size: 1.04rem;
    }

    .hero-img {
        width: min(270px, 66vw);
    }

    .editor-section,
    .features-section,
    .faq-section,
    .contact-section {
        padding: 36px 16px;
    }

    .editor-body pre {
        white-space: pre-wrap;
        overflow-wrap: anywhere;
    }

    .contact-container {
        flex-direction: column;
        border-radius: 22px;
    }

    .contact-info,
    .contact-form {
        min-width: 0;
        width: 100%;
        padding: 26px 20px;
    }

    .loader-aura {
        width: 190px;
        height: 190px;
    }

    .loader-mascot {
        width: min(290px, 78vw);
        max-height: 170px;
    }

    .loader-bar {
        width: min(200px, 56vw);
    }

    .main-footer {
        padding: 34px 18px 112px;
        margin-top: 56px;
    }
}

@media (max-width: 580px) {
    .hero-text h1 {
        font-size: 2rem;
    }

    .editor-window {
        border-radius: 18px;
        margin-top: 26px;
    }

    .editor-header {
        padding: 12px 14px;
        gap: 8px;
    }

    .editor-body {
        padding: 0;
        overflow-x: hidden;
    }

    .editor-body pre {
        padding: 16px 14px;
        overflow-x: visible;
        white-space: pre-wrap;
        overflow-wrap: anywhere;
    }

    .editor-body pre code {
        font-size: 0.78rem;
        line-height: 1.55;
        white-space: pre-wrap;
        overflow-wrap: anywhere;
    }

    .features-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .feature-card {
        padding: 24px 20px;
    }

    /* Zerujemy domyślne marginesy nagłówka h3 otaczającego przycisk FAQ dla spójnego wyglądu akordeonu */
.faq-item h3 {
    margin: 0;
    font-size: inherit;
    font-weight: inherit;
}

.faq-question {
        padding: 16px 18px;
        gap: 14px;
    }

    .faq-question h3 {
        font-size: 0.98rem;
        line-height: 1.38;
    }

    .faq-answer,
    .faq-item.active .faq-answer {
        padding: 0 18px;
    }

    .faq-item.active .faq-answer p {
        padding-bottom: 18px;
        font-size: 0.94rem;
    }

    .footer-container {
        flex-direction: column;
        text-align: center;
        gap: 16px;
    }

    .footer-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 12px 18px;
    }
}

.contact-alert {
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.45;
    margin-bottom: 18px;
    border: 1px solid transparent;
}

.contact-alert.success {
    background: rgba(39, 201, 63, 0.14);
    border-color: rgba(39, 201, 63, 0.35);
    color: #166534;
}

body.dark-mode .contact-alert.success {
    color: #86efac;
}

.contact-alert.error {
    background: rgba(255, 95, 86, 0.14);
    border-color: rgba(255, 95, 86, 0.35);
    color: #b42318;
}

body.dark-mode .contact-alert.error {
    color: #ff9c96;
}

.site-announcement-wrap {
    max-width: 1200px;
    margin: 98px auto -56px;
    padding: 0 24px;
    position: relative;
    z-index: 4;
}

.site-announcement-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 11px 18px;
    border-radius: 16px;
    background: color-mix(in srgb, var(--accent-orange) 12%, var(--glass-bg, rgba(255, 255, 255, 0.72)));
    border: 1px solid color-mix(in srgb, var(--accent-orange) 35%, transparent);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    font-size: 0.92rem;
    color: var(--text-primary);
    text-align: center;
}

.site-announcement-banner p {
    margin: 0;
    line-height: 1.45;
}

.site-announcement-icon {
    font-size: 1.15rem;
    flex-shrink: 0;
}

@media (max-width: 820px) {
    .site-announcement-wrap {
        margin: 86px auto -44px;
        padding: 0 16px;
    }

    .site-announcement-banner {
        font-size: 0.85rem;
        padding: 10px 14px;
        text-align: left;
    }
}