/* --- Import czcionek --- */
@import url('https://fonts.googleapis.com/css2?family=Crimson+Text:ital,wght@0,400;0,600;1,400&family=Space+Grotesk:wght@300;400;500;600;700&display=swap');

/* --- Zmienne (paleta kolorów i style) --- */
:root {
    --cream: #FDF8F2;
    --warm-gray: #6B660;
    --forest: #1D2E30;
    --sage: #889580;
    --rust: #B74D2A;
    --soft-white: #FEFCFA;
    --charcoal: #0A0A0A;
    --light-border: rgba(107, 102, 96, 0.3);
    --dark-border: rgba(253, 248, 242, 0.3);
    --neon-glow: rgba(183, 77, 42, 0.4);
}

body.dark-mode {
    --cream: #121212;
    --warm-gray: #A8B5A0;
    --forest: #FDF8F2;
    --sage: #8B8680;
    --rust: #C75D3A;
    --soft-white: #1A1A1A;
    --charcoal: #FDF8F2;
    --light-border: rgba(168, 181, 160, 0.6);
    --dark-border: rgba(253, 248, 242, 0.3);
    --neon-glow: rgba(199, 93, 58, 0.6);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--cream);
    color: var(--charcoal);
    line-height: 1.6;
    overflow-x: hidden;
    letter-spacing: -0.01em;
    transition: background-color 0.3s ease, color 0.3s ease;
    padding-top: 70px; /* Dla sticky nav */
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

section {
    padding: clamp(4rem, 10vh, 6rem) 0;
    position: relative;
}

/* Sekcje naprzemiennie */
section:nth-of-type(even) {
    background-color: var(--soft-white);
}

/* --- Nawigacja --- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: var(--soft-white);
    z-index: 1000;
    border-bottom: 1px solid var(--light-border);
    transition: background-color 0.3s ease, border-color 0.3s ease;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.navbar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.navbar-logo {
    font-family: 'Crimson Text', serif;
    font-size: 1.8rem;
    color: var(--forest);
    text-decoration: none;
    font-weight: 600;
}

.navbar-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.navbar-link {
    color: var(--warm-gray);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.3s ease;
    position: relative;
}

.navbar-link:hover {
    color: var(--forest);
}

.navbar-link.active {
    color: var(--forest);
    font-weight: 600;
}

.navbar-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--rust);
    transition: width 0.3s ease;
}

.navbar-link:hover::after {
    width: 100%;
}

.nav-cta {
    padding: 0.5rem 1.5rem;
    font-size: 0.9rem;
    box-shadow: none;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .nav-cta {
        padding: 0.4rem 1rem;
        font-size: 0.85rem;
    }
}

@media (max-width: 768px) {
    .navbar-container {
        flex-wrap: wrap;
    }
    
    .navbar-links {
        width: 100%;
        justify-content: center;
        margin-top: 0.5rem;
        gap: 1rem;
    }
    
    .navbar-link {
        font-size: 0.85rem;
    }
    
    .nav-cta {
        display: inline-block;
        margin-top: 0.5rem;
    }
}

@media (max-width: 600px) {
    .navbar-links {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .navbar-link {
        font-size: 0.9rem;
        padding: 0.5rem 1rem;
    }
    
    .nav-cta {
        margin-top: 1rem;
    }
}

/* --- Pasek postępu --- */
#progress-bar {
    position: fixed;
    top: 70px; /* Pod nawigacją */
    left: 0;
    height: 4px;
    background: var(--rust);
    width: 0%;
    z-index: 999;
    transition: width 0.1s linear;
}

/* --- Przełącznik motywu --- */
.theme-toggle {
    position: fixed;
    top: 1rem;
    right: 1.5rem;
    z-index: 1001;
    background: var(--soft-white);
    border: 2px solid var(--light-border);
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.theme-toggle:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.theme-toggle svg {
    width: 22px;
    height: 22px;
    color: var(--forest);
}

/* --- Sekcja Hero --- */
.hero {
    padding: 2rem 0;
    text-align: center;
    min-height: calc(80vh - 70px);
    display: flex;
    align-items: center;
    position: relative; 
    overflow: hidden; 
}

.hero .container {
    position: relative;
    z-index: 3;
}

/* --- Animacja tła w Hero --- */
@keyframes subtle-pan {
    0% { transform: scale(1.1) translate(2%, -2%); }
    50% { transform: scale(1.1) translate(-2%, 2%); }
    100% { transform: scale(1.1) translate(2%, -2%); }
}

.hero::before {
    content: '';
    position: absolute;
    top: -5%;
    left: -5%;
    width: 110%;
    height: 110%;
    z-index: 1;
    background-image: radial-gradient(circle, var(--sage) 0%, transparent 70%);
    opacity: 0.15;
    animation: subtle-pan 45s infinite linear alternate;
    transition: opacity 0.3s ease;
}

body.dark-mode .hero::before {
    opacity: 0.1;
}

.hero h1 {
    font-size: clamp(2.5rem, 6vw, 4rem);
    margin-bottom: 1rem;
    letter-spacing: -0.03em;
    color: var(--forest);
}

.hero .subtitle {
    font-size: 1.25rem;
    color: var(--warm-gray);
    margin-bottom: 2rem;
    max-width: 65ch;
    margin-left: auto;
    margin-right: auto;
}

/* --- Style Typografii --- */
h1, h2, h3 {
    font-family: 'Crimson Text', serif;
    color: var(--forest);
    line-height: 1.2;
    font-weight: 600;
}

h2 {
    font-size: clamp(2rem, 5vw, 2.8rem);
    text-align: center;
    margin-bottom: 1rem;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-subtitle {
    text-align: center;
    color: var(--warm-gray);
    max-width: 70ch;
    margin: 0 auto 3rem auto;
    font-size: 1.1rem;
}

/* --- Style Przycisków --- */
.cta-button {
    display: inline-block;
    background: var(--forest);
    color: var(--cream);
    padding: 1rem 2.5rem;
    border-radius: 2rem;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 5px 20px rgba(29, 46, 48, 0.3);
    border: 2px solid var(--forest);
}

.cta-button:hover {
    background: var(--rust);
    border-color: var(--rust);
    transform: translateY(-4px);
    box-shadow: 0 10px 25px var(--neon-glow);
}

.cta-button.secondary {
    background: transparent;
    color: var(--forest);
    border-color: var(--light-border);
    box-shadow: none;
}

.cta-button.secondary:hover {
    background: var(--soft-white);
    border-color: var(--forest);
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}

.cta-button.inverted {
    background: transparent;
    border: 2px solid var(--cream);
}

.cta-button.inverted:hover {
    background: var(--rust);
    border-color: var(--rust);
    color: var(--cream);
}

/* --- Dekoracyjne Przejście (Fala) --- */
.wave-divider {
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
    transform: rotate(180deg);
    z-index: 2;
}

.wave-divider svg {
    position: relative;
    display: block;
    width: calc(100% + 1.3px);
    height: 120px;
}

.wave-divider .shape-fill {
    fill: var(--soft-white);
    transition: fill 0.3s ease;
}

/* --- Sekcja Problem i Rozwiązanie --- */
.problem-solution {
    padding-top: 8rem;
}

.problem-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    align-items: stretch; 
}

@media (min-width: 768px) { 
    .problem-grid { 
        grid-template-columns: 1fr 1fr; 
    } 
}

.problem-text-box, .problem-visual-box {
    text-align: center;
    border: 1px solid var(--light-border);
    padding: 2rem;
    border-radius: 1rem;
    height: 100%;
}

.problem-visual-box {
    background-color: #f0fdf2;
}

body.dark-mode .problem-visual-box {
    background-color: #1c2b1e;
}

.problem-image {
    width: 100%;
    max-width: 400px;
    height: auto;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 1rem;
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
    margin: 0 auto 1.5rem auto;
    display: block;
}

.problem-text-box h3, .problem-visual-box h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.problem-text-box h3 {
     color: var(--warm-gray);
}

.problem-visual-box h3 {
    color: var(--rust);
}

.problem-text-box p, .problem-visual-box p { 
    color: var(--warm-gray); 
}

/* --- Tabela Porównawcza --- */
.comparison-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 2rem;
    background: var(--soft-white);
    border-radius: 1.5rem;
    overflow: hidden;
    border: 1px solid var(--light-border);
    box-shadow: 0 10px 30px rgba(0,0,0,0.07);
}

.comparison-table th, .comparison-table td {
    padding: 1rem 1.5rem;
    text-align: left;
    border-bottom: 1px solid var(--light-border);
}

.comparison-table th {
    font-family: 'Crimson Text', serif;
    background-color: var(--cream);
    font-size: 1.2rem;
}

.comparison-table tbody td:first-child {
    font-weight: 600;
    color: var(--forest);
}

.comparison-table tr:last-child td { 
    border-bottom: none; 
}

.comparison-table td:nth-child(3) { 
    background-color: #f0fdf2; 
}

body.dark-mode .comparison-table td:nth-child(3) { 
    background-color: #1c2b1e; 
}

.comparison-table .check-icon { 
    color: var(--sage); 
    font-weight: bold; 
}

.comparison-table .cross-icon { 
    color: var(--rust); 
    font-weight: bold; 
}

.table-footnote {
    text-align: center;
    margin-top: 2rem;
    font-style: italic;
    color: var(--warm-gray);
}

@media (max-width: 600px) {
    .comparison-table thead { 
        display: none; 
    }
    .comparison-table, .comparison-table tbody, .comparison-table tr, .comparison-table td {
        display: block; 
        width: 100%;
    }
    .comparison-table tr { 
        margin-bottom: 1rem; 
        border: 1px solid var(--light-border); 
        border-radius: 1rem; 
    }
    .comparison-table td { 
        text-align: right; 
        padding-left: 50%; 
        position: relative; 
        border-bottom: 1px solid var(--light-border); 
    }
    .comparison-table td:last-child { 
        border-bottom: none; 
    }
    .comparison-table td::before {
        content: attr(data-label);
        position: absolute; 
        left: 1.5rem; 
        width: calc(50% - 3rem);
        text-align: left; 
        font-weight: 600; 
        color: var(--forest);
    }
}

/* --- Sekcja Jak Działam --- */
.steps-tabs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.step-tab {
    background-color: var(--soft-white);
    border: 2px solid var(--light-border);
    border-radius: 1rem;
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.step-tab:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.08);
}

.step-tab.active {
    border-color: var(--rust);
    box-shadow: 0 8px 25px rgba(183, 77, 42, 0.2);
    transform: translateY(-5px);
}

.step-tab .step-number {
    font-size: 2.5rem;
    font-family: 'Crimson Text', serif;
    color: var(--warm-gray);
    transition: color 0.3s ease;
}

.step-tab.active .step-number {
    color: var(--rust);
}

.step-tab .step-title {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--forest);
    margin: 0.5rem 0;
}

.step-tab .step-subtitle {
    font-size: 0.95rem;
    color: var(--warm-gray);
}

.steps-content-wrapper {
    background: var(--soft-white);
    border: 1px solid var(--light-border);
    border-radius: 1rem;
    padding: clamp(1.5rem, 5vw, 2.5rem);
    min-height: 150px;
}

.step-content {
    display: none;
}

.step-content.active {
    display: block;
}

.step-content h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    text-align: center;
}

.step-content p {
    color: var(--warm-gray);
    font-size: 1.1rem;
    text-align: center;
    max-width: 65ch;
    margin: 0 auto;
}

/* --- Sekcja Korzyści --- */
.benefits-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); 
    gap: 2rem; 
}

.benefit-card { 
    background: var(--soft-white); 
    padding: 2rem; 
    border-radius: 1.5rem; 
    border: 1px solid var(--light-border); 
}

.benefit-card .icon {
    width: 40px;
    height: 40px;
    color: var(--rust);
    margin-bottom: 1rem;
}

.benefit-card h3 { 
    font-size: 1.4rem; 
    margin-bottom: 0.5rem; 
}

.benefit-card p { 
    color: var(--warm-gray); 
    font-size: 0.95rem; 
}

/* --- Sekcja Zaufanie --- */
.trust-box {
    background: var(--soft-white);
    border: 1px solid var(--light-border);
    border-radius: 1.5rem;
    padding: clamp(2rem, 5vw, 3rem);
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    align-items: center;
    max-width: 900px;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .trust-box {
        grid-template-columns: auto 1fr;
        text-align: left;
    }
}

.trust-photo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--cream);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    margin: 0 auto;
}

.trust-content h3 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.trust-content p {
    color: var(--warm-gray);
    margin-bottom: 1.5rem;
}

.trust-content .cta-button {
    font-size: 1rem;
}

/* --- Sekcja Dowód Społeczny (Testimonials) --- */
.testimonial-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); 
    gap: 2rem; 
}

.testimonial-card { 
    background: var(--cream); 
    padding: 2rem; 
    border-radius: 1.5rem; 
    border: 1px solid var(--light-border); 
    display: flex; 
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.testimonial-card .quote {
    font-family: 'Crimson Text', serif;
    font-size: 1.1rem;
    font-style: italic;
    flex-grow: 1;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 1.5rem;
}

.testimonial-author .avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--light-border);
}

.author-info .author-name {
    font-weight: 600;
    color: var(--rust);
    margin: 0;
}

.author-info .author-title {
    font-size: 0.9rem;
    color: var(--warm-gray);
    margin: 0;
}

.testimonial-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(29, 46, 48, 0.95);
    color: var(--cream);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 1.5rem;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    pointer-events: none;
}

.testimonial-card:hover .testimonial-overlay {
    opacity: 1;
    pointer-events: auto;
}

.testimonial-overlay h4 {
    color: var(--cream);
    font-family: 'Crimson Text', serif;
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.testimonial-overlay p {
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    color: var(--cream);
    opacity: 0.9;
}

.testimonial-overlay .cta-button {
    padding: 0.6rem 1.6rem;
    font-size: 0.9rem;
}

/* --- Sekcja Cennik --- */
.pricing-grid { 
    display: grid; 
    grid-template-columns: 1fr; 
    gap: 2rem; 
}

@media (min-width: 992px) { 
    .pricing-grid { 
        grid-template-columns: repeat(3, 1fr); 
    } 
}

.pricing-card { 
    background: var(--soft-white); 
    padding: 2.5rem 2rem; 
    border-radius: 1.5rem; 
    border: 1px solid var(--light-border); 
    text-align: center; 
    display: flex; 
    flex-direction: column; 
}

.pricing-card.recommended { 
    border: 2px solid var(--rust); 
    transform: scale(1.05); 
}

.pricing-card.recommended .badge { 
    position: absolute; 
    top: -15px; 
    left: 50%; 
    transform: translateX(-50%); 
    background: var(--rust); 
    color: var(--cream); 
    padding: 0.3rem 1rem; 
    border-radius: 1rem; 
    font-size: 0.8rem; 
    font-weight: 600; 
}

.pricing-card .package-name { 
    font-weight: 600; 
    font-size: 1.2rem; 
    margin-bottom: 0.5rem; 
}

.pricing-card .price { 
    font-family: 'Crimson Text', serif; 
    font-size: 3rem; 
    font-weight: 600; 
    color: var(--forest); 
    margin-bottom: 1.5rem; 
}

.pricing-card .features { 
    list-style: none; 
    padding: 0; 
    margin-bottom: 2rem; 
    text-align: left; 
    flex-grow: 1; 
}

.pricing-card .features li { 
    margin-bottom: 0.8rem; 
    display: flex; 
    align-items: flex-start; 
    gap: 0.5rem; 
    color: var(--warm-gray); 
}

.pricing-card .features li svg {
    width: 18px;
    height: 18px;
    color: var(--sage);
    flex-shrink: 0;
    margin-top: 4px;
}

/* --- Sekcja Gwarancja --- */
.guarantee { 
    background: var(--soft-white); 
    border-radius: 1.5rem; 
    padding: 3rem 2rem; 
    text-align: center; 
    max-width: 800px; 
    margin: 0 auto; 
    border: 1px solid var(--light-border); 
}

.guarantee .icon { 
    width: 60px; 
    height: 60px; 
    color: var(--sage); 
    margin-bottom: 1rem; 
}

.guarantee h3 { 
    font-size: 1.8rem; 
    margin-bottom: 1rem; 
}

/* --- Sekcja FAQ --- */
.faq-item { 
    background: var(--soft-white); 
    border: 1px solid var(--light-border); 
    border-radius: 1rem; 
    margin-bottom: 1rem; 
    overflow: hidden; 
}

body.dark-mode .faq-item {
    background: #2D2D2D; /* Ciemniejsze tło dla lepszego kontrastu */
    border-color: rgba(168, 181, 160, 0.6); /* Lepszy kontrast obramowania */
}

.faq-question { 
    width: 100%; 
    text-align: left; 
    background: transparent; 
    border: none; 
    padding: 1.5rem; 
    font-size: 1.1rem; 
    font-weight: 500; 
    cursor: pointer; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    color: var(--forest); /* Kolor pytań w trybie jasnym */
}

body.dark-mode .faq-question {
    color: #FFFFFF; /* Białe pytania w trybie ciemnym dla maksymalnej widoczności */
}

.faq-answer { 
    max-height: 0; 
    overflow: hidden; 
    transition: max-height 0.4s ease-out, padding 0.4s ease-out; 
}

.faq-answer p {
    color: var(--warm-gray);
    padding: 0 1.5rem 1rem 1.5rem;
}

body.dark-mode .faq-answer p {
    color: #D0D0D0; /* Jaśniejszy kolor tekstu odpowiedzi dla lepszej widoczności */
}

/* Ikona +/- przy pytaniach FAQ */
.faq-question svg {
    width: 24px;
    height: 24px;
    color: var(--forest);
    transition: transform 0.3s ease;
}

body.dark-mode .faq-question svg {
    color: #FFFFFF; /* Biała ikona w trybie ciemnym */
}

.faq-item.active .faq-question svg {
    transform: rotate(45deg);
}

/* --- Final CTA --- */
.final-cta {
    background-color: var(--forest);
    color: var(--cream);
    text-align: center;
    padding: clamp(4rem, 10vh, 6rem) 0;
    background-size: cover;
    background-position: center;
    position: relative;
}

body.dark-mode .final-cta {
    background-color: #1D2E30; /* Zachowaj oryginalny kolor lasu w trybie ciemnym */
    color: var(--cream);
}

.final-cta .container {
    position: relative;
    z-index: 2;
}

.final-cta h2 { 
    color: var(--cream); 
}

.final-cta p {
    color: var(--cream);
    opacity: 0.9;
    font-size: 1.1rem;
    margin-bottom: 2.5rem;
}

/* --- Formularz kontaktowy --- */
.contact-form {
    background-color: var(--soft-white);
    padding: clamp(4rem, 10vh, 6rem) 0;
}

.form-wrapper {
    max-width: 700px;
    margin: 0 auto;
    background: var(--cream);
    padding: 2.5rem;
    border-radius: 1.5rem;
    border: 1px solid var(--light-border);
    box-shadow: 0 10px 30px rgba(0,0,0,0.07);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--forest);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid var(--light-border);
    border-radius: 0.5rem;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1rem;
    background-color: var(--soft-white);
    color: var(--charcoal);
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--rust);
    box-shadow: 0 0 0 3px rgba(183, 77, 42, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--warm-gray);
    opacity: 0.7;
}

/* Styl dla przycisku w formularzu */
.contact-form .cta-button {
    width: 100%;
    padding: 1.2rem;
    font-size: 1.1rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 20px rgba(29, 46, 48, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.contact-form .cta-button:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px var(--neon-glow);
}

/* Styl dla animacji ładowania */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--cream);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* --- CTA po formularzu --- */
.final-cta-after-form {
    background-color: var(--soft-white);
    padding: clamp(3rem, 8vh, 5rem) 0;
    text-align: center;
    border-top: 1px solid var(--light-border);
    border-bottom: 1px solid var(--light-border);
}

.cta-box {
    max-width: 700px;
    margin: 0 auto;
    padding: 2rem;
}

.cta-box h2 {
    font-size: clamp(1.5rem, 4vw, 2.2rem);
    margin-bottom: 1.5rem;
    color: var(--forest); /* Kolor tekstu w trybie jasnym */
    line-height: 1.3;
}

body.dark-mode .cta-box h2 {
    color: #FFFFFF; /* Biały tekst w trybie ciemnym dla maksymalnej widoczności */
}

.cta-box .cta-button.secondary {
    background: transparent;
    color: var(--forest);
    border: 2px solid var(--forest);
    padding: 0.8rem 2rem;
    font-size: 1rem;
}

.cta-box .cta-button.secondary:hover {
    background: var(--forest);
    color: var(--cream);
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(29, 46, 48, 0.3);
}

/* Tryb ciemny dla CTA po formularzu */
body.dark-mode .final-cta-after-form {
    background-color: #1A1A1A;
    border-color: rgba(168, 181, 160, 0.6);
}

body.dark-mode .cta-box .cta-button.secondary {
    color: #FFFFFF; /* Biały kolor tekstu przycisku w trybie ciemnym */
    border-color: #FFFFFF; /* Biała ramka przycisku w trybie ciemnym */
}

body.dark-mode .cta-box .cta-button.secondary:hover {
    background: #FFFFFF; /* Biale tło po najechaniu w trybie ciemnym */
    color: var(--forest); /* Ciemny kolor tekstu po najechaniu w trybie ciemnym */
}

/* Tryb ciemny dla formularza */
body.dark-mode .form-wrapper {
    background-color: #1A1A1A;
    border-color: rgba(168, 181, 160, 0.6);
}

body.dark-mode .form-group input,
body.dark-mode .form-group select,
body.dark-mode .form-group textarea {
    background-color: #2D2D2D;
    border-color: rgba(168, 181, 160, 0.6);
    color: var(--cream);
}

body.dark-mode .form-group input:focus,
body.dark-mode .form-group select:focus,
body.dark-mode .form-group textarea:focus {
    border-color: var(--rust);
    box-shadow: 0 0 0 3px rgba(199, 93, 58, 0.2);
}

body.dark-mode .form-group input::placeholder,
body.dark-mode .form-group textarea::placeholder {
    color: var(--warm-gray);
}

/* Responsywność */
@media (max-width: 768px) {
    .form-wrapper {
        padding: 1.5rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

@media (max-width: 480px) {
    .form-wrapper {
        padding: 1rem;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 0.7rem 0.9rem;
    }
}

/* --- Footer --- */
footer { 
    background: var(--charcoal); 
    color: var(--cream); 
    padding: 2rem 0; 
    text-align: center; 
}

/* --- Pływający Widget --- */
.chat-widget { 
    position: fixed; 
    bottom: 20px; 
    right: 20px; 
    width: 60px; 
    height: 60px; 
    background: #25D366; 
    border-radius: 50%; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    cursor: pointer; 
    box-shadow: 0 5px 15px rgba(37, 211, 102, 0.3); 
    z-index: 1000; 
}

.chat-widget:hover { 
    transform: translateY(-5px); 
    box-shadow: 0 10px 20px rgba(37, 211, 102, 0.4); 
}

.chat-widget svg { 
    width: 28px; 
    height: 28px; 
    color: white; 
}

/* --- Animacje --- */
.fade-in-section {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in-section.animate {
    opacity: 1;
    transform: translateY(0);
}

/* Efekty hover dla kart */
.benefit-card, .pricing-card:not(.recommended) {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.benefit-card:hover, .pricing-card:not(.recommended):hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

/* --- Cookie Consent Banner --- */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: var(--soft-white);
    border-top: 1px solid var(--light-border);
    box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
    padding: clamp(1rem, 2vw, 1.5rem);
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 1100;
    gap: 1rem;
    font-family: 'Space Grotesk', sans-serif;
    transition: transform 0.3s ease-in-out;
    transform: translateY(100%);
}

body.dark-mode .cookie-banner {
    background: #1A1A1A;
    border-color: var(--dark-border);
    box-shadow: 0 -2px 10px rgba(0,0,0,0.2);
}

.cookie-banner.show {
    transform: translateY(0);
}

.cookie-banner-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    width: 100%;
    max-width: 900px;
}

@media (min-width: 768px) {
    .cookie-banner-content {
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-start;
    }
}

.cookie-text {
    text-align: center;
    max-width: 600px;
}

@media (min-width: 768px) {
    .cookie-text {
        text-align: left;
    }
}

.cookie-text h3 {
    font-family: 'Crimson Text', serif;
    font-size: clamp(1.2rem, 3vw, 1.5rem);
    color: var(--forest);
    margin-bottom: 0.5rem;
}

.cookie-text p {
    font-size: 0.9rem;
    color: var(--warm-gray);
}

.cookie-text a {
    color: var(--rust);
    text-decoration: underline;
    transition: color 0.2s ease;
}

.cookie-text a:hover {
    color: var(--forest);
}

.cookie-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    width: 100%;
    max-width: 300px;
}

@media (min-width: 768px) {
    .cookie-buttons {
        flex-direction: row;
        width: auto;
        justify-content: flex-end;
    }
}

.cookie-btn {
    padding: 0.8rem 1.2rem;
    border-radius: 2rem;
    font-weight: 600;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.cookie-accept {
    background: var(--forest);
    color: var(--cream);
    border-color: var(--forest);
}

.cookie-accept:hover {
    background: var(--rust);
    border-color: var(--rust);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(183, 77, 42, 0.3);
}

.cookie-preferences {
    background: transparent;
    color: var(--forest);
    border: 2px solid var(--light-border);
}

body.dark-mode .cookie-preferences {
    color: var(--cream);
    border-color: var(--dark-border);
}

/* Upewnij się, że przycisk "Ustawienia" jest widoczny w trybie ciemnym */
#show-preferences-btn.cookie-btn {
    color: var(--forest);
    border-color: var(--light-border);
}

body.dark-mode #show-preferences-btn.cookie-btn {
    color: #FFFFFF; /* Biały tekst */
    border-color: #FFFFFF; /* Biała ramka */
}

.cookie-preferences:hover {
    background: var(--soft-white);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

body.dark-mode .cookie-preferences:hover {
    background: rgba(255,255,255,0.05);
}

.cookie-preferences-menu {
    width: 100%;
    max-width: 600px;
    background: var(--cream);
    border: 1px solid var(--light-border);
    border-radius: 1rem;
    padding: 1.5rem;
    margin-top: 1rem;
}

body.dark-mode .cookie-preferences-menu {
    background: #1A1A1A;
    border-color: var(--dark-border);
}

.cookie-preferences-menu h4 {
    font-family: 'Crimson Text', serif;
    color: var(--forest);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.cookie-preferences-menu p {
    color: var(--warm-gray);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.cookie-options-group {
    margin-bottom: 1.5rem;
}

.cookie-options-group:last-child {
    margin-bottom: 0;
}

.cookie-option {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 0.5rem;
}

.cookie-option input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--rust);
}

.cookie-option label {
    font-weight: 500;
    color: var(--forest);
}

body.dark-mode .cookie-option label {
    color: var(--cream);
}

.cookie-option-desc {
    font-size: 0.85rem;
    color: var(--warm-gray);
    margin-left: 1.5rem;
    margin-top: 0.2rem;
    line-height: 1.4;
}

.cookie-preferences-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    justify-content: flex-end;
    margin-top: 1rem;
}

.cookie-accept-selected {
    background: var(--forest);
    color: var(--cream);
    border: 2px solid var(--forest);
}

.cookie-accept-selected:hover {
    background: var(--rust);
    border-color: var(--rust);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(183, 77, 42, 0.3);
}

.cookie-reject {
    background: transparent;
    color: var(--rust);
    border: 2px solid var(--rust);
}

.cookie-reject:hover {
    background: rgba(183, 77, 42, 0.1);
    transform: translateY(-2px);
}

/* --- Jak działam? (Steps) --- */
.steps-tabs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.step-tab {
    background-color: var(--soft-white);
    border: 2px solid var(--light-border);
    border-radius: 1rem;
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.step-tab:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.08);
}

.step-tab.active {
    border-color: var(--rust);
    box-shadow: 0 8px 25px rgba(183, 77, 42, 0.2);
    transform: translateY(-5px);
}

.step-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem auto;
    color: var(--rust);
}

.step-tab.active .step-icon {
    color: var(--rust);
}

.step-tab .step-title {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--forest);
    margin: 0.5rem 0;
}

.step-tab .step-subtitle {
    font-size: 0.95rem;
    color: var(--warm-gray);
}

.steps-content-wrapper {
    background: var(--soft-white);
    border: 1px solid var(--light-border);
    border-radius: 1rem;
    padding: clamp(1.5rem, 5vw, 2.5rem);
    min-height: 150px;
}

.step-content {
    display: none;
}

.step-content.active {
    display: block;
}

.step-content h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    text-align: center;
}

.step-content p {
    color: var(--warm-gray);
    font-size: 1.1rem;
    text-align: center;
    max-width: 65ch;
    margin: 0 auto;
}

/* --- Portfolio --- */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.portfolio-item {
    background: var(--soft-white);
    border-radius: 1.5rem;
    overflow: hidden;
    border: 1px solid var(--light-border);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.portfolio-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.portfolio-image-placeholder {
    height: 200px;
    background: linear-gradient(135deg, var(--sage), var(--rust));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--cream);
    font-weight: 600;
}

.placeholder-text {
    text-align: center;
    padding: 1rem;
}

.portfolio-content {
    padding: 1.5rem;
}

.portfolio-title {
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
    color: var(--forest);
}

.portfolio-desc {
    color: var(--warm-gray);
    font-size: 0.95rem;
}

/* --- Sekcja Korzyści (dwie kolumny) --- */
.benefits-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    align-items: start;
}

@media (min-width: 768px) {
    .benefits-layout {
        grid-template-columns: 1fr 1fr;
    }
}

.benefits-cards {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.benefits-image img {
    width: 100%;
    height: auto;
    border-radius: 1.5rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    object-fit: cover;
    max-width: 400px; /* Maksymalna szerokość zdjęcia */
    margin: 0 auto; /* Wyśrodkowanie zdjęcia na mniejszych ekranach */
}

@media (min-width: 768px) {
    .benefits-image {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .benefits-image img {
        max-width: none;
        margin: 0;
    }
}

/* --- Analysis Page Styles --- */
.analysis-form-section .form-wrapper {
    max-width: 600px;
    margin: 0 auto;
}

.form-hint {
    font-size: 0.9rem;
    color: var(--warm-gray);
    text-align: center;
    margin-top: 1rem;
}

.analysis-results-section .results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.analysis-results-section .result-card {
    background: var(--soft-white);
    border: 1px solid var(--light-border);
    border-radius: 1rem;
    padding: 1.5rem;
    text-align: center;
}

.result-card h4 {
    font-size: 1.2rem;
    color: var(--rust);
    margin-bottom: 0.5rem;
}

.result-card .result-value {
    font-size: 2.5rem;
    font-weight: 600;
    color: var(--forest);
    margin-bottom: 0.5rem;
}

.result-card .result-desc {
    font-size: 0.9rem;
    color: var(--warm-gray);
}

.analysis-results-section .results-details {
    background: var(--soft-white);
    border: 1px solid var(--light-border);
    border-radius: 1rem;
    padding: 2rem;
    margin-top: 2rem; /* Add margin between details sections */
}

.results-details h4 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.results-details ul {
    list-style: none;
    padding: 0;
    margin-bottom: 1.5rem;
}

.results-details ul li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--light-border);
}

.results-details ul li:last-child {
    border-bottom: none;
}

.results-details p {
    margin-bottom: 1rem;
}

/* --- Ranking Gauge (PRO) --- */
.ranking-gauge-wrapper {
    display: flex;
    justify-content: center;
    padding: 1rem;
}

.ranking-summary-text p {
    font-size: 1.1rem;
    line-height: 1.7;
    text-align: center;
    margin: 1.5rem auto 0 auto;
    max-width: 60ch;
    color: var(--warm-gray);
}

.ranking-gauge-container {
    position: relative;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    transition: box-shadow 0.5s ease-out;
}

.ranking-gauge-container.score-low {
    box-shadow: 0 0 25px -5px #B74D2A;
}
.ranking-gauge-container.score-medium {
    box-shadow: 0 0 25px -5px #f5b700;
}
.ranking-gauge-container.score-high {
    box-shadow: 0 0 25px -5px var(--sage);
}

.ranking-gauge-svg {
    transform: rotate(-90deg);
    width: 100%;
    height: 100%;
}

.ranking-gauge-track,
.ranking-gauge-fill {
    fill: none;
    stroke-width: 18;
}

.ranking-gauge-track {
    stroke: var(--light-border);
    opacity: 0.3;
}

.ranking-gauge-fill {
    stroke-linecap: round;
    transition: stroke-dashoffset 2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.ranking-gauge-fill.score-low {
    stroke: var(--rust);
}

.ranking-gauge-fill.score-medium {
    stroke: #f5b700;
}

.ranking-gauge-fill.score-high {
    stroke: var(--sage);
}

.ranking-score-text {
    position: absolute;
    top: 12px;
    left: 12px;
    right: 12px;
    bottom: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    border-radius: 50%;
    background: rgba(253, 248, 242, 0.7);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: inset 0 3px 10px rgba(0,0,0,0.05);
}

body.dark-mode .ranking-score-text {
    background: rgba(30, 46, 48, 0.7);
    border-color: rgba(255, 255, 255, 0.1);
}

#ranking-score-value {
    font-family: 'Crimson Text', serif;
    font-size: 3.5rem;
    font-weight: 600;
    color: var(--forest);
    line-height: 1;
}

#ranking-score-value::after {
    content: '/100';
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1rem;
    font-weight: 500;
    color: var(--warm-gray);
    margin-left: 4px;
}

.ranking-score-label {
    font-size: 1rem;
    font-weight: 500;
    color: var(--warm-gray);
    margin-top: 0.25rem;
}

/* --- Keywords Table --- */
.keywords-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 2rem;
    font-size: 0.95rem;
}

.keywords-table th,
.keywords-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--light-border);
}

.keywords-table th {
    font-weight: 600;
    background-color: var(--soft-white);
}

.keywords-table tbody tr:hover {
    background-color: var(--cream);
}

/* --- Recommendation Table & Cards --- */
.recommendation-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 2rem;
}

.recommendation-table th,
.recommendation-table td {
    padding: 1rem;
    border: 1px solid var(--light-border);
    vertical-align: top;
    text-align: left;
}

.recommendation-table th {
    width: 50%;
    font-size: 1.1rem;
}

.recommendation-table th:first-child {
    color: var(--sage);
}

.recommendation-table th:last-child {
    color: var(--rust);
}

.what-to-do {
    margin-top: 3rem;
    text-align: center;
}

.what-to-do h5 {
    font-size: 1.8rem;
    margin-bottom: 2rem;
    font-family: 'Crimson Text', serif;
}

.recommendation-cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    text-align: left;
}

.recommendation-card {
    background: var(--soft-white);
    border: 1px solid var(--light-border);
    border-radius: 1rem;
    padding: 2rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.recommendation-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.08);
}

.recommendation-card-icon {
    width: 48px;
    height: 48px;
    color: var(--rust);
    margin-bottom: 1rem;
}

.recommendation-card-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.recommendation-card-text {
    font-size: 0.95rem;
    color: var(--warm-gray);
    margin: 0;
}