/* structural and presentation styles for Hoba Quiz Builder */
.hoba-quiz-container {
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    padding: 60px 40px;
    background-color: #f3efe8; /* Elegant light beige background like the mockup */
    border: none;
    box-sizing: border-box;
    transition: all 0.3s ease;
    font-family: inherit;
}

.hq-screen {
    display: none;
}

.hq-screen.active {
    display: block;
}

/* Intro Screen */
.hq-quiz-title {
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: 12px;
    text-align: center;
}

.hq-quiz-subtitle {
    font-size: 1.25rem;
    font-weight: 400;
    color: #6b7280;
    margin-bottom: 25px;
    text-align: center;
}

.hq-quiz-intro-text {
    margin-bottom: 30px;
    line-height: 1.6;
    text-align: center;
}

/* Steps Screen Layout */
.hq-steps-header {
    margin-bottom: 40px;
}

.hq-progressbar {
    background: rgba(2, 44, 34, 0.1);
    border-radius: 9999px;
    height: 4px;
    overflow: hidden;
    margin-bottom: 12px;
}

.hq-progress-fill {
    height: 100%;
    transition: width 0.3s ease;
}

.hq-progress-segmented {
    display: flex;
    gap: 12px;
    margin-bottom: 15px;
    max-width: 200px;
}

.hq-progress-segment {
    flex: 1;
    height: 3px;
    background: rgba(21, 65, 77, 0.3); /* Base line color matching the dark tone */
    border-radius: 2px;
    transition: background-color 0.3s ease;
}

.hq-progress-segment.filled {
    background: #15414d;
}

.hq-step-counter {
    font-size: 0.9rem;
    color: #15414d;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-align: left;
    margin-bottom: 5px;
}

/* Question body and media integration */
.hq-question-body {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.hq-media-layout-top {
    flex-direction: column;
}

.hq-media-layout-left {
    flex-direction: row !important;
}

.hq-media-layout-right {
    flex-direction: row-reverse !important;
}

.hq-question-media {
    max-width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.hq-question-media img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.hq-question-media svg {
    max-width: 100%;
    height: auto;
}

.hq-question-content {
    flex: 1;
}

.hq-question-text {
    font-family: "Playfair Display", "Times New Roman", serif; /* Elegant serif look like the mockup */
    font-size: 2.75rem;
    font-weight: 400;
    line-height: 1.25;
    margin-top: 0;
    margin-bottom: 15px;
    color: #0f2933;
}

.hq-help-text {
    font-size: 1.1rem;
    color: #4b5563;
    margin-bottom: 30px;
}

/* Questionnaire Split (Left/Right Question column, Answers grid column) Layout */
.hq-question-body-split {
    display: flex;
    gap: 60px;
    align-items: flex-start;
}

.hq-split-quest-column {
    display: flex;
    flex-direction: column;
}

.hq-split-answ-column {
    flex: 1;
}

@media (max-width: 991px) {
    .hq-question-body-split {
        flex-direction: column !important;
        gap: 30px;
    }
    .hq-split-quest-column {
        width: 100% !important;
    }
}

/* Answers grid configurations */
.hq-answers-grid {
    display: grid;
    gap: 20px;
    width: 100%;
}

/* Einspaltig / List */
.hq-layout-list .hq-answers-grid {
    grid-template-columns: 1fr;
}

/* Manual Column counts */
.hq-layout-manual.hq-grid-cols-1 .hq-answers-grid { grid-template-columns: 1fr; }
.hq-layout-manual.hq-grid-cols-2 .hq-answers-grid { grid-template-columns: repeat(2, 1fr); }
.hq-layout-manual.hq-grid-cols-3 .hq-answers-grid { grid-template-columns: repeat(3, 1fr); }
.hq-layout-manual.hq-grid-cols-4 .hq-answers-grid { grid-template-columns: repeat(4, 1fr); }
.hq-layout-manual.hq-grid-cols-5 .hq-answers-grid { grid-template-columns: repeat(5, 1fr); }
.hq-layout-manual.hq-grid-cols-6 .hq-answers-grid { grid-template-columns: repeat(6, 1fr); }

/* Auto Columns depending on answers count */
.hq-layout-auto.hq-auto-grid-cols-1 .hq-answers-grid { grid-template-columns: 1fr; }
.hq-layout-auto.hq-auto-grid-cols-2 .hq-answers-grid { grid-template-columns: repeat(2, 1fr); }
.hq-layout-auto.hq-auto-grid-cols-3 .hq-answers-grid { grid-template-columns: repeat(3, 1fr); }
.hq-layout-auto.hq-auto-grid-cols-4 .hq-answers-grid { grid-template-columns: repeat(4, 1fr); }
.hq-layout-auto.hq-auto-grid-cols-5 .hq-answers-grid { grid-template-columns: repeat(5, 1fr); }
.hq-layout-auto.hq-auto-grid-cols-6 .hq-answers-grid { grid-template-columns: repeat(6, 1fr); }

@media (max-width: 1024px) {
    .hq-layout-manual .hq-answers-grid,
    .hq-layout-auto .hq-answers-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 600px) {
    .hq-layout-manual .hq-answers-grid,
    .hq-layout-auto .hq-answers-grid {
        grid-template-columns: 1fr !important;
    }
}

/* Answer Cards styles */
.hq-answer-card {
    border: 1px solid #d1d5db;
    cursor: pointer;
    background-color: #ffffff;
    display: flex;
    flex-direction: column;
    padding: 0;
    border-radius: 4px;
    overflow: hidden;
    transition: all 0.3s ease;
    user-select: none;
    position: relative;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

/* Fixed display issues when there is NO Image or Icon inside an answer card */
.hq-answer-card.hq-no-media {
    padding: 24px;
    min-height: 120px; /* robust min-height fallback */
    display: flex;
    justify-content: center;
    align-items: center;
}

.hq-answer-card.hq-no-media .hq-answer-text {
    position: static !important;
    background: none !important;
    padding: 0 !important;
    color: #0f2933 !important;
    width: 100%;
}

.hq-answer-card.hq-no-media .hq-answer-label {
    color: #0f2933 !important;
}

.hq-answer-card.hq-no-media .hq-answer-desc {
    color: #4b5563 !important;
}

/* Make image fill card and place text overlay at the bottom as shown in the mockup */
.hq-answer-card .hq-answer-img {
    width: 100%;
    height: 380px;
    overflow: hidden;
    flex-shrink: 0;
    background-color: #e5e7eb;
}

.hq-answer-card .hq-answer-img img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* This gets dynamically overridden by inline styles */
    transition: transform 0.5s ease;
}

/* Force Square Layout Logic */
.hq-answer-card .hq-answer-img.hq-force-square {
    height: 0;
    padding-bottom: 100%;
    position: relative;
}

.hq-answer-card .hq-answer-img.hq-force-square img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}


.hq-answer-card:hover .hq-answer-img img {
    transform: scale(1.03);
}

/* Support for answers with icons only or icons+text */
.hq-answer-card.hq-has-icon {
    padding: 24px;
    gap: 15px;
    align-items: center;
}

.hq-answer-card.hq-has-icon .hq-answer-icon-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 50px;
    height: 50px;
    font-size: 24px;
    color: #15414d;
    background-color: rgba(21, 65, 77, 0.05);
    border-radius: 50%;
}

.hq-answer-card.hq-has-icon .hq-answer-icon-wrapper.hq-force-square {
    border-radius: 0;
}

.hq-answer-card.hq-has-icon .hq-answer-icon-wrapper svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

.hq-answer-card.hq-has-icon .hq-answer-text {
    position: static !important;
    background: none !important;
    padding: 0 !important;
    color: #0f2933 !important;
    width: 100%;
    text-align: center;
}

.hq-answer-card.hq-has-icon .hq-answer-label {
    color: #0f2933 !important;
}

.hq-answer-card.hq-has-icon .hq-answer-desc {
    color: #4b5563 !important;
}

/* Text Overlay positioning for answer images */
.hq-answer-card.hq-has-image .hq-answer-text {
    padding: 30px 20px 20px 20px;
    text-align: left;
    background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.9) 100%);
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    box-sizing: border-box;
    color: #ffffff;
}

.hq-answer-card.hq-has-image .hq-answer-label {
    font-family: "Playfair Display", "Times New Roman", serif;
    font-weight: 400;
    font-size: 1.4rem;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.hq-answer-card.hq-has-image .hq-answer-desc {
    font-size: 0.9rem;
    color: #d1d5db;
    margin-top: 8px;
    line-height: 1.4;
}

/* Support for textless image-only card flow */
.hq-only-image-card .hq-answer-img {
    height: 380px;
}

.hq-only-image-card .hq-answer-text {
    display: none !important;
}

/* Selected state matching the mockup */
.hq-answer-card.selected {
    border-color: #15414d;
    box-shadow: 0 0 0 3px rgba(21, 65, 77, 0.2);
}

.hq-answer-card.selected::after {
    content: "✓";
    position: absolute;
    top: 15px;
    right: 15px;
    background-color: #15414d;
    color: #ffffff;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.9rem;
    z-index: 5;
}

/* Navigation footer */
.hq-steps-footer {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 50px;
    padding-top: 20px;
}

/* High Fidelity Result Split Section (Dark Colored) */
.hq-screen-result {
    margin: -60px -40px -40px -40px; /* pull result canvas to full limits */
}

.hq-result-split-layout {
    display: flex;
    background-color: #0d363b; /* Deep Premium Dark Green/Teal like the mockup */
    color: #ffffff;
    min-height: 600px;
}

@media (max-width: 768px) {
    .hq-result-split-layout {
        flex-direction: column;
    }
    .hq-result-left-col, .hq-result-right-col {
        width: 100% !important;
    }
}

.hq-result-left-col {
    width: 45%;
    position: relative;
    overflow: hidden;
    background-color: #082225;
}

.hq-result-media {
    width: 100%;
    height: 100%;
    min-height: 400px;
}

.hq-result-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.hq-result-right-col {
    width: 55%;
    padding: 80px 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-sizing: border-box;
}

.hq-result-meta-eyebrow {
    font-size: 0.8rem;
    font-weight: 400;
    letter-spacing: 0.05em;
    color: #a5b4b6;
    margin-bottom: 12px;
    display: block;
    text-transform: uppercase;
}

.hq-result-headline {
    font-family: "Playfair Display", "Times New Roman", serif;
    font-size: 3.5rem;
    font-weight: 400;
    line-height: 1.1;
    margin: 0 0 20px 0;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.hq-result-subline {
    font-size: 1.15rem;
    color: #cbd5e1;
    font-weight: 400;
    margin-top: 0;
    margin-bottom: 25px;
    line-height: 1.6;
}

.hq-result-short-desc {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 20px;
    color: #e5e7eb;
}

.hq-result-full-desc {
    margin-bottom: 30px;
    line-height: 1.6;
    color: #d1d5db;
}

/* Breakdown / Attributes */
.hq-result-breakdown {
    margin-bottom: 40px;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 25px;
}

/* Actions */
.hq-result-actions {
    display: flex;
    gap: 15px;
    align-items: center;
}

@media (max-width: 480px) {
    .hq-result-actions {
        flex-direction: column;
        align-items: stretch;
    }
}

/* CSS-based Visibility Toggles for Result Screen */
.hq-screen-result.hq-hide-res-media .hq-result-left-col {
    display: none !important;
}
.hq-screen-result.hq-hide-res-media .hq-result-right-col {
    width: 100% !important;
}
.hq-screen-result.hq-hide-res-eyebrow .hq-result-meta-eyebrow {
    display: none !important;
}
.hq-screen-result.hq-hide-res-headline .hq-result-headline {
    display: none !important;
}
.hq-screen-result.hq-hide-res-subline .hq-result-subline {
    display: none !important;
}
.hq-screen-result.hq-hide-res-desc .hq-result-short-desc {
    display: none !important;
}
.hq-screen-result.hq-hide-res-full-desc .hq-result-full-desc {
    display: none !important;
}
.hq-screen-result.hq-hide-res-breakdown .hq-result-breakdown {
    display: none !important;
}
.hq-screen-result.hq-hide-res-cta #hq-result-cta-btn {
    display: none !important;
}
.hq-screen-result.hq-hide-res-reset #hq-btn-reset {
    display: none !important;
}

/* Buttons style defaults */
.hq-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    border-radius: 4px;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
    text-transform: uppercase;
}

.btn-hq-primary {
    background-color: transparent;
    color: #15414d;
    font-weight: 700;
}

.btn-hq-primary:hover {
    color: #0f2933;
    opacity: 0.8;
}

.hq-result-actions .btn-hq-primary {
    background-color: #f7f6f2;
    color: #0d363b;
    padding: 16px 32px;
}

.hq-result-actions .btn-hq-primary:hover {
    background-color: #ffffff;
}

.btn-hq-secondary {
    background-color: transparent;
    color: #15414d;
    border: 1px solid #15414d;
    margin-right: auto; /* push left */
}

.btn-hq-secondary:hover {
    background-color: rgba(21, 65, 77, 0.05);
}

.hq-result-actions .btn-hq-secondary {
    background-color: transparent;
    color: #ffffff;
    border: 1px solid rgba(255,255,255,0.25);
    margin-right: 0;
}

.hq-result-actions .btn-hq-secondary:hover {
    background-color: rgba(255,255,255,0.05);
    border-color: #ffffff;
}

.btn-hq-start {
    width: auto;
    margin-top: 10px;
    background-color: #15414d;
    color: #fff;
}

.btn-hq-start:hover {
    background-color: #0f2933;
    color: #fff;
}

.btn-hq-cta {
    flex: 1;
    text-decoration: none;
    text-align: center;
}
