/* Australian White Card Practice Test - Styles */
/* Construction Industry Theme - Mobile First */

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #f5f5f5;
    color: #212121;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

/* Header */
body > header {
    background: linear-gradient(135deg, #FFC107 0%, #FFD54F 40%, #FFCA28 100%);
    color: #212121;
    padding: 18px 0 16px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
    position: sticky;
    top: 0;
    z-index: 100;
}

body > header::after {
    content: "";
    display: block;
    height: 3px;
    background-image: repeating-linear-gradient(
        -45deg,
        rgba(0, 0, 0, 0.18),
        rgba(0, 0, 0, 0.18) 8px,
        transparent 8px,
        transparent 16px
    );
    opacity: 0.55;
}

body > header h1 {
    font-size: 24px;
    font-weight: 800;
    text-align: center;
    margin-bottom: 12px;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

/* State Selector Navigation */
.state-selector {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
}

.state-link {
    display: inline-block;
    padding: 8px 16px;
    background-color: #212121;
    color: #ffffff;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    transition: background-color 0.3s ease;
}

.state-link:hover {
    background-color: #424242;
}

.state-link:active {
    background-color: #616161;
}

/* Main Content */
main {
    flex: 1;
    padding: 30px 0;
}

/* Screen Management */
.screen {
    display: none;
}

.screen.active {
    display: block;
}

/* Start Screen */
.intro-content {
    text-align: center;
    background: white;
    padding: 24px 18px 22px;
    border-radius: 14px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.intro-content h2 {
    font-size: 22px;
    color: #212121;
    margin-bottom: 20px;
}

.intro-text {
    font-size: 16px;
    color: #424242;
    margin-bottom: 15px;
    text-align: left;
}

.intro-list {
    list-style: none;
    margin: 8px 0 10px;
    padding: 0;
    text-align: left;
}

.intro-list li {
    font-size: 15px;
    color: #424242;
    margin-bottom: 6px;
    padding-left: 20px;
    position: relative;
}

.intro-list li::before {
    content: "✔";
    position: absolute;
    left: 0;
    top: 0;
    color: #28a745;
    font-size: 13px;
    line-height: 1.6;
}

.intro-meta {
    font-size: 13px;
    color: #757575;
    margin-bottom: 18px;
    text-align: left;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 16px 32px;
    font-size: 18px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 60px;
    width: 100%;
    max-width: 300px;
}

.btn-primary {
    background-color: #FFC107;
    color: #212121;
}

.btn-primary:hover {
    background-color: #FFB300;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.btn-primary:active {
    transform: translateY(0);
}

/* Quiz Screen */
.progress-container {
    background: white;
    padding: 18px 18px 16px;
    border-radius: 12px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
    margin-bottom: 18px;
}

.progress-bar {
    width: 100%;
    height: 12px;
    background-color: #e0e0e0;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background-color: #FFC107;
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 6px;
}

.progress-text {
    font-size: 14px;
    color: #424242;
    text-align: center;
    font-weight: 600;
}

.question-container {
    background: white;
    padding: 20px 16px 18px;
    border-radius: 12px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
    border: 1px solid rgba(0, 0, 0, 0.03);
}

.question-text {
    font-size: 18px;
    font-weight: 600;
    color: #212121;
    margin-bottom: 25px;
    line-height: 1.5;
}

/* Options Container */
.options-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.option-btn {
    min-height: 60px;
    padding: 16px 20px;
    font-size: 16px;
    text-align: left;
    background-color: #fafafa;
    color: #212121;
    border: 2px solid #e0e0e0;
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    word-wrap: break-word;
}

.option-btn:hover:not(:disabled) {
    background-color: #eeeeee;
    border-color: #FFC107;
    transform: translateX(4px);
}

.option-btn:active:not(:disabled) {
    transform: translateX(2px);
}

.option-btn:disabled {
    cursor: not-allowed;
    opacity: 0.8;
}

.option-btn.correct {
    background-color: #28a745;
    color: white;
    border-color: #28a745;
}

.option-btn.incorrect {
    background-color: #dc3545;
    color: white;
    border-color: #dc3545;
}

/* Explanation */
.explanation {
    display: none;
    padding: 15px;
    background-color: #e8f5e9;
    border-left: 4px solid #28a745;
    border-radius: 4px;
    margin-bottom: 20px;
    font-size: 15px;
    color: #2e7d32;
    line-height: 1.6;
}

/* Result Screen */
.result-content {
    text-align: center;
    background: white;
    padding: 28px 18px 24px;
    border-radius: 12px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.result-content h2 {
    font-size: 24px;
    color: #212121;
    margin-bottom: 30px;
}

.score-display {
    margin-bottom: 30px;
}

.score-circle {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 8px solid #FFC107;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 36px;
    font-weight: 700;
    color: #FFC107;
    transition: all 0.3s ease;
}

.score-text {
    font-size: 18px;
    color: #424242;
    margin-bottom: 15px;
}

.pass-fail-message {
    font-size: 18px;
    font-weight: 600;
    padding: 15px;
    border-radius: 6px;
    margin-top: 15px;
}

.pass-fail-message.pass {
    background-color: #e8f5e9;
    color: #2e7d32;
}

.pass-fail-message.warning {
    background-color: #fff3cd;
    color: #856404;
}

.pass-fail-message.fail {
    background-color: #f8d7da;
    color: #721c24;
}

/* Affiliate Box */
.affiliate-box {
    margin: 30px 0;
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    min-height: 100px;
}

/* SEO Text Block */
.seo-text {
    background-color: #f5f5f5;
    padding: 28px 0 32px;
    margin-top: 28px;
    border-top: 1px solid #e0e0e0;
}

.seo-text .container {
    max-width: 800px;
}

.seo-text h2 {
    font-size: 22px;
    color: #212121;
    margin-bottom: 0;
    font-weight: 700;
    text-align: center;
}

.seo-text h3 {
    font-size: 18px;
    color: #212121;
    margin-top: 25px;
    margin-bottom: 15px;
    font-weight: 600;
    text-align: left;
}

.seo-text p {
    font-size: 15px;
    color: #424242;
    line-height: 1.8;
    text-align: left;
    margin-bottom: 15px;
}

.seo-text ul,
.seo-text ol {
    margin: 10px 0 10px 24px;
    padding: 0;
}

.seo-text li {
    font-size: 15px;
    color: #424242;
    line-height: 1.8;
    margin-bottom: 10px;
}

.seo-text dl {
    margin: 20px 0;
}

.seo-text dt {
    font-size: 16px;
    color: #212121;
    font-weight: 600;
    margin-top: 16px;
    margin-bottom: 6px;
}

.seo-text dd {
    font-size: 15px;
    color: #424242;
    line-height: 1.8;
    margin-left: 20px;
    margin-bottom: 15px;
}

.seo-text header {
    margin-bottom: 25px;
    background: linear-gradient(135deg, #FFC107 0%, #FFD54F 40%, #FFCA28 100%);
    padding: 14px 18px 12px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    position: relative;
}

.seo-text header::after {
    content: "";
    position: absolute;
    left: 10px;
    right: 10px;
    bottom: 6px;
    height: 2px;
    background-image: repeating-linear-gradient(
        -45deg,
        rgba(0, 0, 0, 0.18),
        rgba(0, 0, 0, 0.18) 8px,
        transparent 8px,
        transparent 16px
    );
    opacity: 0.4;
}

/* FAQ Accordion */
.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    padding: 10px 12px;
    background-color: #fffde7;
    border-radius: 8px;
    border: 1px solid #ffecb3;
}

.faq-question span:first-child {
    flex: 1;
}

.faq-toggle {
    margin-left: 12px;
    font-size: 18px;
    font-weight: 700;
    color: #FFC107;
}

.faq-answer {
    margin-left: 8px;
    margin-top: 4px;
}

.seo-text strong {
    color: #212121;
    font-weight: 600;
}

@media (min-width: 768px) {
    .seo-text {
        padding: 50px 0;
    }
    
    .seo-text h2 {
        font-size: 28px;
    }
    
    .seo-text h3 {
        font-size: 22px;
    }
    
    .seo-text p {
        font-size: 17px;
    }
}

/* Footer */
.footer {
    background-color: #212121;
    color: #ffffff;
    padding: 30px 0;
    text-align: center;
    margin-top: auto;
    font-size: 0.9rem;
}

.footer .container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.footer p {
    font-size: 0.9rem;
    color: #bdbdbd;
    margin: 0;
}

.footer-links {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin: 10px 0;
}

.footer-links a {
    color: #ffffff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #FFC107;
}

.footer-links .separator {
    color: #757575;
    margin: 0 5px;
}

.footer-disclaimer {
    font-size: 0.85rem;
    color: #9e9e9e;
    margin: 5px 0;
}

/* Cookie Banner */
.cookie-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 200;
    background-color: rgba(33, 33, 33, 0.96);
    color: #ffffff;
    padding: 12px 0;
}

.cookie-banner__content {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cookie-banner p {
    font-size: 13px;
    line-height: 1.6;
    margin: 0;
}

.cookie-banner a {
    color: #FFC107;
    text-decoration: underline;
}

.cookie-banner__actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 4px;
}

.cookie-btn {
    max-width: none;
    width: auto;
    padding-inline: 20px;
    font-size: 14px;
}

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

    .cookie-banner p {
        font-size: 14px;
    }
}

/* Responsive Design - Tablet & Desktop */
@media (min-width: 768px) {
    .container {
        max-width: 700px;
        padding: 0 30px;
    }

    header h1 {
        font-size: 28px;
    }

    .state-link {
        font-size: 16px;
        padding: 10px 20px;
    }

    .intro-content h2 {
        font-size: 26px;
    }

    .question-text {
        font-size: 20px;
    }

    .option-btn {
        font-size: 17px;
        padding: 18px 24px;
    }

    .btn {
        max-width: 350px;
    }

    .score-circle {
        width: 180px;
        height: 180px;
        font-size: 42px;
    }
}

@media (min-width: 1024px) {
    .container {
        max-width: 800px;
    }

    .option-btn:hover:not(:disabled) {
        transform: translateX(6px);
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus States for Accessibility */
.option-btn:focus,
.btn:focus,
.state-link:focus,
.footer-links a:focus {
    outline: 3px solid #FFC107;
    outline-offset: 2px;
}

/* Legal Page Styles */
.legal-page {
    max-width: 800px;
}

.legal-content {
    background: white;
    padding: 40px 30px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    text-align: left;
}

.legal-section {
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 1px solid #e0e0e0;
}

.legal-section:last-of-type {
    border-bottom: none;
    margin-bottom: 30px;
}

.legal-section h2 {
    font-size: 24px;
    color: #212121;
    margin-bottom: 20px;
    font-weight: 700;
}

.legal-section p {
    font-size: 16px;
    color: #424242;
    line-height: 1.8;
    margin-bottom: 15px;
}

.contact-email {
    font-size: 18px;
    margin: 20px 0;
}

.contact-email a {
    color: #FFC107;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.contact-email a:hover {
    color: #FFB300;
    text-decoration: underline;
}

.legal-address {
    color: #757575;
    font-style: italic;
    margin-top: 10px;
}

.back-button-container {
    text-align: center;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid #e0e0e0;
}

@media (min-width: 768px) {
    .legal-content {
        padding: 50px 40px;
    }

    .legal-section h2 {
        font-size: 28px;
    }

    .legal-section p {
        font-size: 17px;
    }
}

