@import url('https://fonts.googleapis.com/css2?family=Forum&display=swap');

:root {
    --primary-dark: #030303;
    --accent-gold: #FBBC4E;
    --body-text: #363636;
    --bg-light: #F9F7F2;
    --white: #FFFFFF;
    --font-main: 'Forum', serif;
    --transition: all 0.3s ease;
}

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

body {
    font-family: var(--font-main);
    background-color: var(--bg-light);
    color: var(--body-text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
header {
    background-color: var(--white);
    height: 64px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 0 20px;
}

.logo img {
    max-width: 320px;
    height: 64px;
    width: auto;
    display: block;
}

/* Main Container */
.container {
    max-width: 800px;
    /* Uniform width for quiz */
    margin: 40px auto;
    padding: 0 20px;
    flex: 1;
    transition: max-width 0.5s ease;
}

.container.results-view {
    max-width: 1200px;
    /* Wider for results */
}

/* Quiz Card */
.quiz-card {
    background-color: var(--white);
    padding: 60px 80px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.03);
    min-height: auto;
    /* Allow card to shrink if no buttons */
    width: 100%;
    opacity: 1;
    transition: opacity 0.3s ease-in-out;
}

.quiz-card.fade-out {
    opacity: 0;
}

h1,
h2 {
    color: #BE5705;
    letter-spacing: 0.05em;
    font-weight: 400;
    margin-bottom: 30px;
}

h1 {
    font-size: 36px;
    text-align: center;
}

.instruction-text {
    font-size: 16px;
    color: var(--body-text);
    margin-bottom: 30px;
    text-transform: none;
    font-style: normal;
}

.subtitle {
    text-align: center;
    color: var(--body-text);
    margin-bottom: 40px;
}

/* Form Elements */
.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    font-size: 18px;
}

input[type="text"],
input[type="email"] {
    width: 100%;
    padding: 15px;
    border: 1px solid #E0E0E0;
    font-family: var(--font-main);
    font-size: 16px;
    background-color: transparent;
    transition: var(--transition);
}

input:focus {
    outline: none;
    border-color: var(--accent-gold);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 15px 40px;
    font-family: var(--font-main);
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    text-decoration: none;
    text-align: center;
}

.btn-primary {
    background-color: var(--primary-dark);
    color: var(--white);
}

.intro-btn-container {
    text-align: center;
    margin-top: 40px;
}

.btn-primary:hover {
    background-color: var(--accent-gold);
}

/* Progress Bar */
.progress-container {
    width: 100%;
    height: 4px;
    background-color: #E0E0E0;
    margin-bottom: 40px;
}

.progress-bar {
    height: 100%;
    background-color: var(--accent-gold);
    width: 0%;
    transition: width 0.5s ease;
}

/* Question Section */
.options-list {
    list-style: none;
}

.option-item {
    margin-bottom: 15px;
}

.option-btn {
    width: 100%;
    text-align: left;
    padding: 20px;
    background-color: transparent;
    border: 1px solid #E0E0E0;
    font-family: var(--font-main);
    font-size: 18px;
    cursor: pointer;
    transition: var(--transition);
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
    max-width: 100%;
    line-height: 1.4;
}

.option-btn:hover {
    border-color: var(--accent-gold);
}

.option-btn.selected {
    background-color: var(--primary-dark);
    color: var(--white);
    border-color: var(--primary-dark);
}

.quiz-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 40px;
    align-items: center;
    min-height: 50px;
}

.quiz-nav.hidden {
    display: none;
    margin-top: 0;
}

.quiz-nav.centered-nav {
    justify-content: center;
}

/* Footer */
footer {
    background-color: var(--white);
    padding: 20px 40px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    margin-top: auto;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    color: var(--body-text);
}

.footer-left,
.footer-center,
.footer-right {
    display: flex;
    align-items: center;
    flex: 1;
}

.footer-left {
    justify-content: flex-start;
}

.footer-center {
    justify-content: center;
    text-align: center;
}

.footer-right {
    justify-content: flex-end;
}

/* Unified Link Styling */
.footer-link,
.webisko-link,
.privacy-link,
.consent-text a {
    color: #8B1D1D;
    text-decoration: none;
    transition: var(--transition);
    font-weight: normal;
}

.footer-link:hover,
.webisko-link:hover,
.privacy-link:hover,
.consent-text a:hover {
    color: var(--accent-gold);
    text-decoration: underline;
    opacity: 1;
}

.webisko-link {
    font-weight: bold;
}

/* Responsive */
@media (max-width: 768px) {
    header {
        padding: 0 20px;
    }

    .logo img {
        max-width: none;
        height: 64px;
    }

    .container {
        margin: 20px auto;
    }

    .quiz-card {
        padding: 30px 20px;
        min-height: auto;
    }

    h1 {
        font-size: 28px;
    }

    h2 {
        font-size: 24px;
    }

    .footer-content {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }

    .footer-left,
    .footer-center,
    .footer-right {
        justify-content: center;
        flex: auto;
    }

    .product-grid {
        grid-template-columns: 1fr !important;
    }

    /* Stack Nav Buttons on Mobile */
    .quiz-nav {
        flex-direction: column-reverse;
        /* Wstecz na dole, Dalej na górze */
        gap: 15px;
    }

    .quiz-nav .btn {
        width: 100%;
        /* Przyciski na pelna szerokosc */
        margin: 0;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 24px;
    }

    .instruction-text {
        font-size: 14px;
    }
}