/* ============================================
   How Scottish Are You? Quiz — Tool Styles
   ============================================ */

/* ============================================
   Quiz Section
   ============================================ */
.scotquiz {
    max-width: 680px;
    margin: 0 auto 3rem;
}

.scotquiz-progress {
    background: rgba(26, 58, 92, 0.08);
    border-radius: 20px;
    height: 6px;
    margin-bottom: 0.5rem;
    overflow: hidden;
}

.scotquiz-progress-bar {
    background: linear-gradient(90deg, var(--scottish-blue), var(--heather));
    height: 100%;
    border-radius: 20px;
    transition: width 0.4s ease;
}

.scotquiz-progress-text {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.8rem;
    color: var(--stone-grey);
    text-align: center;
    margin: 0 0 1.5rem;
}

/* Question Cards */
.scotquiz-question {
    background: var(--scottish-blue-deep);
    border-radius: 16px;
    padding: 2.5rem 2rem;
    text-align: center;
    color: var(--saltire-white);
    animation: scotquizFadeIn 0.35s ease;
}

@keyframes scotquizFadeIn {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.scotquiz-question-icon {
    color: var(--heather);
    margin-bottom: 1rem;
    line-height: 1;
}

.scotquiz-question-icon svg {
    display: inline-block;
}

.scotquiz-question-text {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.7rem;
    font-weight: 400;
    color: var(--saltire-white);
    margin: 0 0 0.4rem;
}

.scotquiz-question-subtitle {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    margin: 0 0 1.75rem;
}

/* Answer Buttons */
.scotquiz-answers {
    max-width: 460px;
    margin: 0 auto;
}

.scotquiz-answer-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 1rem 1.25rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1.5px solid rgba(139, 126, 184, 0.25);
    border-radius: 10px;
    color: var(--saltire-white);
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    margin-bottom: 0.6rem;
    font-family: 'DM Sans', sans-serif;
}

.scotquiz-answer-btn:hover {
    border-color: var(--heather);
    background: rgba(139, 126, 184, 0.1);
    transform: translateY(-1px);
}

.scotquiz-answer-btn:active {
    transform: translateY(0);
}

.scotquiz-answer-btn.selected {
    border-color: var(--heather);
    background: rgba(139, 126, 184, 0.15);
    box-shadow: 0 0 0 2px var(--heather);
}

/* Correct/Wrong feedback */
.scotquiz-answer-btn.correct {
    border-color: #22c55e;
    background: rgba(34, 197, 94, 0.15);
    box-shadow: 0 0 0 2px #22c55e;
}

.scotquiz-answer-btn.wrong {
    border-color: #ef4444;
    background: rgba(239, 68, 68, 0.15);
    box-shadow: 0 0 0 2px #ef4444;
}

.scotquiz-answer-letter {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.08);
    font-size: 0.75rem;
    font-weight: 700;
    flex-shrink: 0;
    transition: background 0.2s ease;
}

.scotquiz-answer-btn:hover .scotquiz-answer-letter {
    background: rgba(139, 126, 184, 0.2);
}

.scotquiz-answer-btn.correct .scotquiz-answer-letter {
    background: rgba(34, 197, 94, 0.3);
}

.scotquiz-answer-btn.wrong .scotquiz-answer-letter {
    background: rgba(239, 68, 68, 0.3);
}

.scotquiz-answer-content {
    flex: 1;
    min-width: 0;
}

.scotquiz-answer-text {
    display: block;
    font-size: 0.95rem;
    font-weight: 500;
}

.scotquiz-answer-sub {
    display: block;
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 2px;
}


/* ============================================
   Results Section
   ============================================ */
.scotquiz-results {
    max-width: 800px;
    margin: 0 auto 3rem;
}

/* Score Card */
.scotquiz-score-card {
    background: linear-gradient(135deg, var(--scottish-blue-deep), var(--scottish-blue));
    border-radius: 16px;
    padding: 2.5rem 2rem;
    text-align: center;
    color: var(--saltire-white);
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

.scotquiz-score-card::before {
    content: '';
    position: absolute;
    top: -40px;
    right: -40px;
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: rgba(139, 126, 184, 0.08);
    pointer-events: none;
}

.scotquiz-score-card::after {
    content: '';
    position: absolute;
    bottom: -60px;
    left: -30px;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: rgba(139, 126, 184, 0.05);
    pointer-events: none;
}

.scotquiz-score-emoji {
    font-size: 3rem;
    margin-bottom: 0.75rem;
    line-height: 1;
}

.scotquiz-score-label {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.5);
    margin: 0 0 0.5rem;
}

.scotquiz-score-title {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 2.2rem;
    font-weight: 400;
    color: var(--heather);
    margin: 0 0 0.4rem;
    line-height: 1.2;
    position: relative;
}

.scotquiz-score-tagline {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.7);
    margin: 0 0 1.25rem;
    font-style: italic;
}

.scotquiz-score-number {
    font-family: 'DM Sans', sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--saltire-white);
    margin: 0 0 0.25rem;
    position: relative;
}

.scotquiz-score-number span {
    font-size: 1.2rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.5);
}

.scotquiz-score-desc {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.65);
    margin: 0;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
    position: relative;
}

/* Score Visual Bar */
.scotquiz-score-visual {
    background: var(--saltire-white);
    border: 1px solid rgba(26, 58, 92, 0.08);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.scotquiz-score-bar-label {
    display: flex;
    justify-content: space-between;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--stone-grey);
    margin-bottom: 0.5rem;
}

.scotquiz-score-bar-track {
    background: rgba(26, 58, 92, 0.06);
    border-radius: 8px;
    height: 12px;
    overflow: hidden;
    margin-bottom: 0.75rem;
}

.scotquiz-score-bar-fill {
    height: 100%;
    border-radius: 8px;
    transition: width 0.8s ease;
    width: 0;
}

.scotquiz-score-bar-fill.tier-1 {
    background: linear-gradient(90deg, #ef4444, #f97316);
}

.scotquiz-score-bar-fill.tier-2 {
    background: linear-gradient(90deg, #f97316, #eab308);
}

.scotquiz-score-bar-fill.tier-3 {
    background: linear-gradient(90deg, #eab308, #22c55e);
}

.scotquiz-score-bar-fill.tier-4 {
    background: linear-gradient(90deg, #22c55e, var(--scottish-blue));
}

.scotquiz-score-bar-fill.tier-5 {
    background: linear-gradient(90deg, var(--scottish-blue), var(--heather));
}

.scotquiz-score-tiers {
    display: flex;
    justify-content: space-between;
    gap: 0.25rem;
}

.scotquiz-tier-marker {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.65rem;
    color: var(--stone-grey);
    text-align: center;
    flex: 1;
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

.scotquiz-tier-marker.active {
    opacity: 1;
    font-weight: 700;
    color: var(--scottish-blue-deep);
}


/* ============================================
   Question Breakdown
   ============================================ */
.scotquiz-breakdown-heading {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--scottish-blue-deep);
    margin: 0 0 1rem;
    text-align: center;
}

.scotquiz-breakdown-item {
    background: var(--saltire-white);
    border: 1px solid rgba(26, 58, 92, 0.08);
    border-radius: 10px;
    padding: 1.25rem;
    margin-bottom: 0.6rem;
    border-left: 4px solid var(--stone-grey);
    transition: box-shadow 0.2s ease;
}

.scotquiz-breakdown-item:hover {
    box-shadow: 0 2px 12px rgba(26, 58, 92, 0.06);
}

.scotquiz-breakdown-item.is-correct {
    border-left-color: #22c55e;
}

.scotquiz-breakdown-item.is-wrong {
    border-left-color: #ef4444;
}

.scotquiz-breakdown-header {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.scotquiz-breakdown-icon {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    margin-top: 2px;
}

.scotquiz-breakdown-icon.icon-correct {
    color: #22c55e;
}

.scotquiz-breakdown-icon.icon-wrong {
    color: #ef4444;
}

.scotquiz-breakdown-q {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--scottish-blue-deep);
    margin: 0;
    flex: 1;
}

.scotquiz-breakdown-answer {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.85rem;
    color: var(--peat);
    margin: 0 0 0.4rem;
    padding-left: 2.2rem;
}

.scotquiz-breakdown-answer strong {
    font-weight: 600;
}

.scotquiz-breakdown-explanation {
    font-size: 0.82rem;
    line-height: 1.6;
    color: var(--stone-grey);
    margin: 0;
    padding-left: 2.2rem;
    font-style: italic;
}


/* ============================================
   Actions Bar
   ============================================ */
.scotquiz-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 2rem 0;
    justify-content: center;
}

.scotquiz-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.55rem 1rem;
    background: var(--saltire-white);
    border: 1px solid rgba(26, 58, 92, 0.15);
    border-radius: 8px;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--scottish-blue-deep);
    cursor: pointer;
    transition: all 0.2s ease;
}

.scotquiz-action-btn:hover {
    border-color: var(--scottish-blue);
    background: var(--highland-mist);
}

.scotquiz-action-btn svg {
    flex-shrink: 0;
}


/* ============================================
   SEO Content
   ============================================ */
.scotquiz-info-section {
    max-width: 800px;
    margin: 0 auto 3rem;
    padding: 2rem 0;
}

.scotquiz-info-section h2 {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.6rem;
    color: var(--scottish-blue-deep);
    margin-bottom: 1rem;
}

.scotquiz-info-section h3 {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.2rem;
    color: var(--scottish-blue-deep);
    margin: 1.5rem 0 0.75rem;
}

.scotquiz-info-section p {
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--peat);
    margin-bottom: 1rem;
}


/* ============================================
   FAQ
   ============================================ */
.scotquiz-faq {
    max-width: 800px;
    margin: 0 auto 3rem;
}

.scotquiz-faq h2 {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.6rem;
    color: var(--scottish-blue-deep);
    margin-bottom: 1.25rem;
    text-align: center;
}

.scotquiz-faq-item {
    border: 1px solid rgba(26, 58, 92, 0.08);
    border-radius: 8px;
    margin-bottom: 0.5rem;
    overflow: hidden;
}

.scotquiz-faq-item summary {
    padding: 1rem 1.25rem;
    font-weight: 500;
    color: var(--scottish-blue-deep);
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.2s ease;
}

.scotquiz-faq-item summary::-webkit-details-marker {
    display: none;
}

.scotquiz-faq-item summary::after {
    content: '+';
    font-size: 1.2rem;
    color: var(--stone-grey);
    flex-shrink: 0;
    margin-left: 1rem;
    transition: transform 0.2s ease;
}

.scotquiz-faq-item[open] summary::after {
    content: '\2212';
}

.scotquiz-faq-item summary:hover {
    background: var(--highland-mist);
}

.scotquiz-faq-item p {
    padding: 0 1.25rem 1rem;
    font-size: 0.9rem;
    line-height: 1.7;
    color: var(--peat);
    margin: 0;
}


/* ============================================
   Print Styles
   ============================================ */
@media print {
    .nav, .nav-homepage, .mobile-menu, .mobile-menu-overlay,
    .page-hero, .scotquiz, .scotquiz-actions,
    .scotquiz-info-section, .scotquiz-faq, .page-cta,
    .footer, .footer-bottom,
    [class*="mediavine"], [id*="mediavine"] {
        display: none !important;
    }

    .scotquiz-results {
        display: block !important;
        max-width: 100%;
        margin: 0;
    }

    .scotquiz-score-card {
        background: #1a3a5c !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .scotquiz-breakdown-item {
        break-inside: avoid;
        border: 1px solid #ddd;
    }

    body::before {
        content: 'LiveBreatheScotland.com \2014 How Scottish Are You?';
        display: block;
        font-size: 1.1rem;
        font-weight: 600;
        padding: 1rem 0;
        border-bottom: 2px solid #1a3a5c;
        margin-bottom: 1.5rem;
    }
}


/* ============================================
   Mobile Responsive
   ============================================ */
@media (max-width: 640px) {
    .scotquiz-question {
        padding: 2rem 1.25rem;
    }

    .scotquiz-question-text {
        font-size: 1.35rem;
    }

    .scotquiz-answer-btn {
        padding: 0.85rem 1rem;
    }

    .scotquiz-answer-text {
        font-size: 0.88rem;
    }

    .scotquiz-score-card {
        padding: 2rem 1.25rem;
    }

    .scotquiz-score-title {
        font-size: 1.8rem;
    }

    .scotquiz-score-number {
        font-size: 2rem;
    }

    .scotquiz-breakdown-item {
        padding: 1rem;
    }

    .scotquiz-breakdown-answer,
    .scotquiz-breakdown-explanation {
        padding-left: 0;
    }

    .scotquiz-actions {
        gap: 0.4rem;
    }

    .scotquiz-action-btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.75rem;
    }
}
