/* Inspirations Page Styles */

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

/* Main Container */
.inspirations-container {
    min-height: 100vh;
    background: #fff;
    display: grid;
    place-items: center;
    padding: 0;
    position: relative;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
}

/* Equal strip spacing */
:root .inspirations-page { --strip-offset: 16px; }

/* Hide site navbar on Inspirations (popup-style) */
.inspirations-page .navbar { display: none !important; }

/* Questionnaire Steps */
.questionnaire-step {
    display: none;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}

.questionnaire-step.active {
    display: block;
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Step Content */
.step-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 2rem;
}

/* Progress Bar */
.progress-bar { width: min(90vw, 640px); height: 6px; background: #eee; border-radius: 999px; overflow: hidden; margin: 0 auto 1rem auto; }
.progress-fill { height: 100%; width: 0%; background: linear-gradient(90deg, #1e4329, #2c5f41); border-radius: 999px; transition: width .4s ease; }

/* Step Main Content */
.step-main {
    width: min(90vw, 640px);
    margin: 0 auto;
}

/* Hero Strips (infinite carousels) */
.hero-strips { position: absolute; inset: 0; pointer-events: none; }
.strip { position: absolute; filter: blur(0.15px); opacity: .98; }
/* pull off the edge slightly */
.strip--vertical { top: 0; bottom: 0; width: 146px; }
.strip--left { left: var(--strip-offset); }
.strip--right { right: var(--strip-offset); }
.strip--horizontal { left: 12px; right: 12px; height: 112px; display: none; }
.strip--top { top: 0; }
.strip--bottom { bottom: 0; }

.strip-track { position: absolute; display: flex; gap: .6rem; will-change: transform; }
/* Start at edge (no jump) and translate continuously; list is doubled for seamless wrap */
.strip--vertical .strip-track { flex-direction: column; top: 0; animation: scrollY 22s linear infinite; }
.strip--horizontal .strip-track { left: 0; animation: scrollX 22s linear infinite; }
.strip-track--reverse { animation-direction: reverse !important; }

.strip img { width: 124px; height: 164px; object-fit: cover; border-radius: 10px; box-shadow: 0 8px 20px rgba(0,0,0,.08); }
.strip--horizontal img { width: 140px; height: 96px; }

/* Move by half-length because sequence is duplicated, making the loop seamless */
@keyframes scrollY { 0% { transform: translateY(0); } 100% { transform: translateY(-50%); } }
@keyframes scrollX { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

/* Typography */
.step-title {
    font-family: 'Alliance', sans-serif;
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 400;
    color: #000;
    margin-bottom: 1rem;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.step-question {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 400;
    color: #000;
    margin-bottom: 2rem;
    line-height: 1.3;
}

.step-description {
    font-size: 1.125rem;
    color: #666;
    margin-bottom: 2rem;
    line-height: 1.6;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.step-instruction {
    font-size: 0.875rem;
    color: #999;
    margin-bottom: 1.5rem;
    font-style: italic;
}

/* Options */
.step-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.option-item {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.option-item:hover {
    border-color: #333;
    background: #f9f9f9;
}

.option-item--checkbox {
    padding: 1rem 1.5rem;
}

.option-input {
    margin-right: 1rem;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.option-input[type="radio"] {
    appearance: none;
    border: 2px solid #ddd;
    border-radius: 50%;
    position: relative;
}

.option-input[type="radio"]:checked {
    border-color: #333;
    background: #333;
}

.option-input[type="radio"]:checked::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 6px;
    height: 6px;
    background: #fff;
    border-radius: 50%;
}

.option-input[type="checkbox"] {
    appearance: none;
    border: 2px solid #ddd;
    border-radius: 4px;
    position: relative;
}

.option-input[type="checkbox"]:checked {
    border-color: #333;
    background: #333;
}

.option-input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 12px;
    font-weight: bold;
}

.option-text {
    font-size: 1rem;
    color: #000;
    font-weight: 400;
    flex: 1;
    text-align: left;
}

.option-examples {
    font-size: 0.875rem;
    color: #999;
    margin-left: 0.5rem;
    font-style: italic;
}

/* Buttons */
.step-button {
    padding: 0.875rem 2rem;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
}

.step-button--primary {
    background: #2c5f41;
    color: #fff;
}

.step-button--primary:hover:not(:disabled) {
    background: #000000;
    transform: translateY(-2px);
}

.step-button--primary:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.step-button--secondary {
    background: #fff;
    color: #2c5f41;
    border: 1px solid #2c5f41;
}

.step-button--secondary:hover {
    background: #000000;
    color: #fff;
}

/* Navigation */
.step-navigation {
    display: flex;
    justify-content: space-between;
    width: min(90vw, 640px);
    margin: 0 auto;
    gap: 1rem;
}

/* Close Button */
.close-button {
    position: fixed;
    top: 2rem;
    right: 2rem;
    width: 40px;
    height: 40px;
    border: none;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 1000;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.close-button:hover {
    background: rgba(255, 255, 255, 1);
    transform: scale(1.1);
}

.close-button svg {
    color: #333;
}

/* Exit confirmation modal */
.confirm-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1200;
}
.confirm-overlay.active { display: flex; }
.confirm-dialog {
    background: #fff;
    width: min(92vw, 460px);
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0,0,0,.25);
    padding: 1.25rem 1.25rem 1rem 1.25rem;
}
.confirm-title { margin: 0 0 .5rem 0; font-weight: 700; color: #000; font-size: 1.125rem; }
.confirm-text { margin: 0 0 1rem 0; color: #333; opacity: .85; }
.confirm-actions { display: flex; gap: .75rem; justify-content: flex-end; }

/* Responsive Design */
@media (max-width: 768px) {
    .inspirations-container {
        padding: 0.5rem;
    }
    
    .step-content {
        gap: 1.5rem;
    }
    
    /* scatter positions for tablet */
    .inspiration-image { width: clamp(80px, 22vw, 120px); height: clamp(100px, 28vw, 160px); }
    .inspiration-image:nth-child(1) { top: 6vh;  left: 4vw; }
    .inspiration-image:nth-child(2) { top: 3vh;  right: 8vw; }
    .inspiration-image:nth-child(3) { top: 22vh; left: 8vw; }
    .inspiration-image:nth-child(4) { top: 18vh; right: 6vw; }
    .inspiration-image:nth-child(5) { bottom: 20vh; left: 10vw; }
    .inspiration-image:nth-child(6) { bottom: 22vh; right: 10vw; }
    .inspiration-image:nth-child(7) { bottom: 8vh; left: 28vw; }
    .inspiration-image:nth-child(8) { top: 40vh; right: 38vw; }
    
    .step-title {
        font-size: 1.75rem;
        margin-bottom: 0.75rem;
    }
    
    .step-question {
        font-size: 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    .step-description {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .option-item {
        padding: 0.875rem 1rem;
    }
    
    .option-text {
        font-size: 0.9rem;
    }
    
    .option-examples {
        font-size: 0.8rem;
    }
    
    .step-button {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
        min-width: 100px;
    }
    
    .step-navigation {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .step-navigation .step-button {
        width: 100%;
    }
    
    .close-button {
        top: 1rem;
        right: 1rem;
        width: 36px;
        height: 36px;
    }

    /* use horizontal strips on tablet/mobile */
    .strip--vertical { display: none; }
    .strip--horizontal { display: block; }
}

@media (max-width: 480px) {
    .inspirations-container {
        padding: 0.5rem;
    }
    
    .step-content {
        gap: 1rem;
    }
    
    .inspiration-image { width: clamp(72px, 28vw, 108px); height: clamp(90px, 32vw, 140px); }
    
    .step-title {
        font-size: 1.5rem;
    }
    
    .step-question {
        font-size: 1.25rem;
    }
    
    .step-description {
        font-size: 0.9rem;
    }
    
    .option-item {
        padding: 0.75rem;
    }
    
    .option-text {
        font-size: 0.85rem;
    }
    
    .option-examples {
        font-size: 0.75rem;
    }
    
    .step-button {
        padding: 0.625rem 1.25rem;
        font-size: 0.85rem;
    }
    
    .close-button {
        width: 32px;
        height: 32px;
    }
    
    .close-button svg {
        width: 18px;
        height: 18px;
    }
}

/* Focus states for accessibility */
.option-input:focus,
.step-button:focus,
.close-button:focus {
    outline: 2px solid #2c5f41;
    outline-offset: 2px;
}

/* Loading state */
.questionnaire-step.loading {
    opacity: 0.7;
    pointer-events: none;
}

.questionnaire-step.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #2c5f41;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Smooth transitions between steps */
.questionnaire-step {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.questionnaire-step:not(.active) {
    opacity: 0;
    transform: translateX(20px);
    pointer-events: none;
}

/* Custom scrollbar for options if needed */
.step-options::-webkit-scrollbar {
    width: 4px;
}

.step-options::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 2px;
}

.step-options::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 2px;
}

.step-options::-webkit-scrollbar-thumb:hover {
    background: #999;
}

/* Hidden elements (previously inline styles) */
.subview-back,
.subview-title {
    display: none;
}

.country-content {
    display: none;
}
