* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    background: #ECF2F2;
    min-height: 100vh;
    padding: 20px;
}

/* ── Language Selection Screen ── */
.lang-screen {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 40px);
    animation: langFadeIn 0.6s ease;
}

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

.lang-card {
    background: linear-gradient(135deg, var(--wasser-blue) 0%, var(--lake-reflection) 100%);
    color: var(--pure-white);
    border-radius: 24px;
    padding: 48px 36px 40px;
    text-align: center;
    max-width: 480px;
    width: 100%;
    box-shadow: 0 12px 40px rgba(30, 61, 50, 0.22);
}



.lang-welcome {
    font-size: 2em;
    margin-bottom: 10px;
    font-weight: 700;
}

.lang-prompt {
    font-size: 1.05em;
    opacity: 0.93;
    line-height: 1.6;
    margin-bottom: 32px;
}

.lang-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.lang-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.18);
    border: 2px solid rgba(255,255,255,0.45);
    color: var(--pure-white);
    border-radius: 14px;
    padding: 20px 36px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, background 0.2s, box-shadow 0.2s;
    min-width: 150px;
}

.lang-btn:hover,
.lang-btn:focus-visible {
    background: rgba(255,255,255,0.32);
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(30, 61, 50, 0.18);
}

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

.lang-btn-flag {
    font-size: 2em;
    line-height: 1;
}

@media (max-width: 480px) {
    .lang-card { padding: 36px 20px 32px; }
    .lang-welcome { font-size: 1.6em; }
    .lang-btn { padding: 16px 28px; min-width: 130px; }
}


/* Add a responsive centered page container */
.container {
    width: 100%;
    max-width: 1000px;     /* desktop cap */
    margin: 0 auto;        /* center with side margins on wide screens */
    padding: 0 16px;       /* comfortable side padding on small screens */
    box-sizing: border-box;
}

/* Slightly larger horizontal padding on tablet+ */
@media (min-width: 768px) {
    .container { padding: 0 24px; }
}


.header {
    background: linear-gradient(135deg, var(--wasser-blue) 0%, var(--lake-reflection) 100%);
    color: var(--pure-white);
    padding: 24px 20px;
    box-shadow: 0 4px 12px rgba(30, 61, 50, 0.18);
    border-radius: 20px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    text-align: left;
}

.header-text {
    flex: 1;
    text-align: left;
}

.header-logo {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 10px 12px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.14);
    box-shadow: 0 6px 18px rgba(30, 61, 50, 0.18);
}

.klagenfurt-flag {
    width: auto;
    height: 120px;
    max-height: 140px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    object-fit: contain;
}

@media (max-width: 640px) {
    .header {
        flex-direction: column;
        text-align: center;
    }
    .header-text {
        text-align: center;
    }
    .header-logo {
        width: 100%;
        justify-content: center;
    }
}

h1 {
    font-size: 1.8em;
    margin-bottom: 10px;
}

.subtitle {
    font-size: 1.20em;
    opacity: 0.95;
    display: block;
    max-width: 90%;
    margin: 6px auto 0;
    line-height: 0.8;
}


.survey-intro {
    background: rgba(207, 230, 228, 0.9);
    border: 2px solid rgba(136, 183, 181, 0.6);
    border-radius: 16px;
    padding: 24px 22px;
    margin: 0 0 20px 0;
    color: var(--deep-pine);
    line-height: 1.6;
    box-shadow: 0 10px 24px rgba(30, 61, 50, 0.08);
}

.survey-intro h2 {
    font-size: 1.35em;
    margin-bottom: 12px;
    color: var(--forest-green);
}

.survey-intro p {
    margin-bottom: 10px;
}

.survey-intro a {
    color: var(--wasser-blue);
    font-weight: 600;
}

.section {
    padding: 20px;
    display: none;
    background: transparent;
    color: var(--deep-pine);
}

.section.active {
    display: block;
}

/* Make Section 2 full-bleed so it uses the full viewport width when visible.
   This avoids the centered `.container` cap for heavy content like the budget
   allocation grid while keeping inner padding for readability. */
#section2 {
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    width: 100vw;
    box-sizing: border-box;
    padding-left: 20px; /* retain comfortable inner padding */
    padding-right: 20px;
    background: transparent; /* keep the page background consistent */
}

/* Constrain wide children (like the budget tracker or the criteria grid) if desired
   by giving them a max-width and centering — this keeps very long lines readable.
   Remove or adjust the max-width if you want truly edge-to-edge content. */
#section2 > div[style],
#section2 .budget-tracker,
#section2 #criteriaContainer {
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

@media (max-width: 920px) {
    /* On smaller screens revert to normal flow to avoid horizontal scrolling */
    #section2 {
        position: static;
        margin-left: 0;
        margin-right: 0;
        width: 100%;
        padding-left: 16px;
        padding-right: 16px;
    }
}

.section-title {
    font-size: 1.3em;
    font-weight: bold;
    color: var(--forest-green);
    margin-bottom: 15px;
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    font-weight: 600;
    color: var(--deep-pine);
    margin-bottom: 8px;
    font-size: 0.95em;
}

select,
input[type="text"] {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--urban-gray);
    border-radius: 8px;
    font-size: 1em;
    background: var(--pure-white);
    transition: border-color 0.3s, box-shadow 0.3s;
}

select:focus,
input[type="text"]:focus {
    outline: none;
    border-color: var(--wasser-blue);
    box-shadow: 0 0 0 3px rgba(92, 164, 169, 0.25);
}

.radio-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.radio-option {
    display: flex;
    align-items: center;
    padding: 12px;
    border: 2px solid var(--urban-gray);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    background: rgba(255, 255, 255, 0.65);
}

.radio-option:hover,
.radio-option:focus-visible,
.radio-option:active {
    border-color: var(--lake-reflection);
    background: rgba(136, 183, 181, 0.2);
}

@media (hover: none) {
    .radio-option:hover {
            border-color: var(--urban-gray);
            background: rgba(255, 255, 255, 0.65);
        }
        .radio-option:active {
            border-color: var(--lake-reflection);
            background: rgba(136, 183, 181, 0.2);
    }
}

.radio-option input[type="radio"] {
    margin-right: 12px;
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.radio-option.selected {
    border-color: var(--forest-green);
    background: rgba(59, 110, 77, 0.15);
}

.btn-primary {
    background: var(--forest-green);
    color: var(--pure-white);
    border: none;
    padding: 16px;
    font-size: 1.1em;
    border-radius: 12px;
    cursor: pointer;
    width: 100%;
    font-weight: bold;
    margin-top: 20px;
    box-shadow: 0 4px 15px rgba(30, 61, 50, 0.25);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-primary:hover:not(:disabled),
.btn-primary:focus-visible:not(:disabled) {
    background: var(--deep-pine);
    box-shadow: 0 6px 18px rgba(30, 61, 50, 0.28);
    transform: translateY(-1px);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}



/* Results Section - Bar Chart */
.bar-chart {
    background: var(--alpine-sky);
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 30px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    height: 100%;
    border: 2px solid rgba(59, 110, 77, 0.35);
    box-shadow: 0 4px 14px rgba(30, 61, 50, 0.14);
}

.bar-chart h2 {
    font-size: 28px;
    margin-bottom: 12px;
    font-weight: 700;
    color: var(--forest-green);
}

.results-column .bar-chart {
    margin-bottom: 0;
}

.results-priority {
    margin-bottom: 28px;
}

.results-priority:last-child {
    margin-bottom: 0;
}

.results-priority-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
    font-weight: 600;
    color: var(--deep-pine);
    font-size: 1.1em;
}

.results-rank {
    background: var(--forest-green);
    color: var(--pure-white);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95em;
    font-weight: 700;
    box-shadow: 0 3px 8px rgba(30, 61, 50, 0.24);
}

.results-priority-title {
    flex: 1;
    font-weight: 600;
}

.results-bar {
    background: rgba(255, 255, 255, 0.7);
    height: 44px;
    border-radius: 22px;
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(136, 183, 181, 0.5);
}

.results-bar-fill {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--pure-white);
    font-weight: 600;
    font-size: 0.95em;
    border-radius: 22px;
    transition: width 0.4s ease;
    padding: 0 14px;
    white-space: nowrap;
    background: linear-gradient(90deg, var(--forest-green) 0%, var(--wasser-blue) 100%);
}

.results-bar-fill.narrow {
    font-size: 0.8em;
    padding: 0 10px;
}

/* Small explanatory text under each priority in the preview */
.results-priority-explain {
    margin-top: 8px;
    color: rgba(30,61,50,0.85);
    font-size: 0.95em;
}

.results-priority-note {
    margin-top: 6px;
    color: rgba(30,61,50,0.65);
    font-size: 0.9em;
    font-style: italic;
}

/* Profile Section */
.profile-section {
    margin-top: 40px;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    height: 100%;
}

.results-column .profile-section {
    padding: 0;
}

.profile-card h2 {
    color: var(--forest-green);
    font-size: 28px;
    font-weight: 700;
    text-align: center;
    margin: 0;
}

.profile-card {
    /* Harmonize card background with the page's blue palette */
    background: var(--alpine-sky);
    border-radius: 12px;
    padding: 30px;
    border: 1px solid rgba(136, 183, 181, 0.18);
    box-shadow: 0 4px 12px rgba(30, 61, 50, 0.06);
    display: flex;
    flex-direction: column;
    gap: 22px;
    height: 100%;
}

.profile-badge {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: var(--forest-green);
    color: var(--pure-white);
    padding: 12px 24px;
    border-radius: 30px;
}

.badge-emoji {
    font-size: 24px;
}

.badge-title {
    font-size: 18px;
    font-weight: 700;
}

.profile-desc {
    font-size: 18px;
    color: rgba(30, 61, 50, 0.85);
    line-height: 1.75;
}

.profile-desc strong {
    color: var(--forest-green);
}

.profile-strategy {
    background: rgba(255, 255, 255, 0.92);
    padding: 18px;
    border-radius: 8px;
    color: rgba(30, 61, 50, 0.8);
    font-size: 16px;
    border-left: 4px solid var(--wasser-blue);
}

.profile-strategy strong {
    color: var(--forest-green);
}
.btn-primary:active:not(:disabled) {
    transform: scale(0.98);
}

.btn-secondary {
    background: var(--pure-white);
    color: var(--forest-green);
    border: 2px solid var(--forest-green);
    padding: 16px;
    font-size: 1.1em;
    border-radius: 12px;
    cursor: pointer;
    width: 100%;
    font-weight: bold;
    margin-top: 20px;
    transition: all 0.3s;
}

.btn-secondary:hover {
    background: rgba(136, 183, 181, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(30, 61, 50, 0.18);
}

.btn-secondary:active {
    transform: scale(0.98);
}

.budget-tracker {
  background: linear-gradient(135deg, rgb(93, 137, 133) 0%, rgb(127, 181, 176) 100%);
  color: var(--pure-white);
  padding: 14px 20px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 6px 18px rgba(30, 61, 50, 0.16);
  border-radius: 20px;
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  }

.budget-bar {
    position: relative;
    background: rgba(255,255,255,0.14);
    height: 32px; /* taller so the gradient has more visual area */
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.35);
}

.budget-fill {
    height: 100%;
    width: 60%;
    /* Much stronger, darker gradient for clear contrast */
    background: linear-gradient(90deg, #043a33 0%, #0f6a56 60%, var(--forest-green) 100%);
    color: var(--pure-white);
    box-shadow: inset 0 -6px 18px rgba(0,0,0,0.28), 0 2px 6px rgba(0,0,0,0.06);
    transition: width 300ms ease, background 250ms ease;
}

/* When there is truly 0% allocated, hide the fill so it appears empty.
   JS will toggle the `empty` class when percent === 0. */
.budget-fill.empty {
    width: 0 !important;
    opacity: 0;
    box-shadow: none;
}

.percent-label {
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    font-weight: 700;
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0,0,0,0.45);
}

.criteria-item {
    /* Lower-contrast card: soft off-white, subtler border and shadow */
    background: rgba(255,255,255,0.98);
    border-radius: 10px;
    padding: 10px 12px;
    margin: 0;
    border: 1px solid rgba(136, 183, 181, 0.16);
    position: relative;
    box-shadow: 0 1px 6px rgba(30, 61, 50, 0.04);
}

.criteria-item.has-value {
    /* Gentle highlight when a value exists; use a low-opacity bleu/teal tint */
    border-color: rgba(92, 164, 169, 0.24);
    background: rgba(197, 219, 217, 0.11);
}

.criteria-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.criteria-title {
    font-weight: bold;
    color: var(--deep-pine);
    font-size: 1em;
    flex: 1;
    padding-right: 10px;
    line-height: 1.3;
}

.criteria-value {
    font-size: 1.3em;
    font-weight: bold;
    color: var(--forest-green);
    white-space: nowrap;
}

.category-tag {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 0.7em;
    font-weight: bold;
    margin-bottom: 8px;
}

.tag-equity { background: rgba(92, 164, 169, 0.18); color: var(--forest-green); }
.tag-environment { background: rgba(59, 110, 77, 0.18); color: var(--forest-green); }
.tag-urban { background: rgba(229, 229, 229, 0.8); color: var(--deep-pine); }

.criteria-description {
    color: rgba(30, 61, 50, 0.75);
    font-size: 0.85em;
    margin-bottom: 12px;
    line-height: 1.4;
}

input[type="range"] {
    width: 100%;
    height: 8px;
    border-radius: 5px;
    background: rgba(229, 229, 229, 0.7);
    outline: none;
    appearance: none;
    -webkit-appearance: none;
}

input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    -webkit-appearance: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--forest-green);
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(30, 61, 50, 0.28);
}

input[type="range"]::-moz-range-thumb {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--forest-green);
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 5px rgba(30, 61, 50, 0.28);
}

.progress-bar {
    height: 6px;
    background: rgba(229, 229, 229, 0.7);
    border-radius: 3px;
    overflow: hidden;
    margin-top: 8px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--forest-green) 0%, var(--wasser-blue) 100%);
    transition: width 0.3s ease;
}

.warning {
    background: #fed7d7;
    color: #c53030;
    padding: 18px 22px;
    border-radius: 14px;
    font-size: 1.05em;
    font-weight: 700;
    display: none;
    position: fixed;
    top: 45%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.92);
    z-index: 500;
    width: min(90%, 360px);
    text-align: center;
    box-shadow: 0 18px 36px rgba(197, 48, 48, 0.28);
    opacity: 0;
    transition: opacity 180ms ease, transform 180ms ease;
    pointer-events: none;
}

.warning.show {
    display: block;
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

@media (hover: none) {
    .warning {
        position: sticky;
        top: 120px;
        left: auto;
        transform: none;
        width: auto;
        margin: 18px 20px;
        text-align: left;
        box-shadow: none;
        opacity: 1;
        transition: none;
        pointer-events: auto;
    }

    .warning.show {
        display: block;
        transform: none;
    }
}

.warning.show { display: block; }

.scenario-preview {
    padding: 24px;
    background: var(--alpine-sky);
    border-radius: 24px;
    box-shadow: 0 12px 28px rgba(30, 61, 50, 0.06);
}

.results-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    margin-bottom: 28px;
}

.results-column {
    min-width: 0;
}

.results-footer {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.results-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

@media (min-width: 720px) {
    .results-actions {
        flex-direction: row;
    }

    .results-actions .btn-primary,
    .results-actions .btn-secondary {
        flex: 1;
    }
}

@media (min-width: 920px) {
    .results-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: stretch;
    }

    .results-column {
        display: flex;
    }

    .results-column > * {
        flex: 1;
    }

    .results-column .profile-section {
        margin-top: 0;
    }

    .bar-chart {
        margin-bottom: 0;
    }
}

@media (max-width: 600px) {
    .scenario-preview {
        padding: 20px 16px;
    }
}

/* Mobile: make criteria cards wider by reducing page side padding and ensuring single-column full-width cards */
@media (max-width: 600px) {
    .container {
        padding-left: 8px;
        padding-right: 8px;
    }

    /* Section 2 already reverts to normal flow at <=920px; reduce its inner padding here */
    #section2 {
        padding-left: 12px;
        padding-right: 12px;
    }

    /* Ensure single-column layout and larger card padding so each card appears wider */
    #criteriaContainer {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .criteria-item {
        width: 100%;
        max-width: 100%;
        padding: 14px 16px; /* slightly more inner space for readability */
        box-sizing: border-box;
    }

    /* Keep header spacing compact on small screens */
    .header { padding: 18px 12px; }
}

/* Distribution intro callout for budget allocation examples */
.distribution-intro {
  background: #f5eedc;
  border: 1px solid rgba(104,120,100,0.14);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 16px;
  color: #020201;
}

.distribution-title {
    font-weight: 700;
    font-size: 1.03em;
    margin-bottom: 6px;
    color: #1f3a2c;
}

.distribution-lead {
    margin: 0 0 8px 0;
    font-size: 0.95em;
    color: #33523e;
}

.distribution-examples {
    margin: 0;
    padding-left: 1.1rem;
    color: #334e3a;
}

.distribution-examples li {
    margin-bottom: 6px;
    line-height: 1.5;
    font-size: 0.95em;
}

.scenario-title {
    font-size: 1.8em;
    font-weight: 800;
    font-family: sans-serif;
    color: var(--forest-green);
    margin-bottom: 24px;
    text-align: center;
    letter-spacing: 0.8px;
}

.chart-container {
    background: rgba(255, 255, 255, 0.82);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid rgba(136, 183, 181, 0.45);
}

.scenario-text {
    background: rgba(207, 230, 228, 0.7);
    border-left: 4px solid var(--wasser-blue);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    line-height: 1.6;
    font-size: 0.95em;
}

.success-message {
    background: var(--soft-moss);
    color: var(--deep-pine);
    text-align: center;
    padding: 40px 20px;
}

.success-icon {
    font-size: 4em;
    margin-bottom: 20px;
}

.success-title {
    font-size: 1.5em;
    font-weight: bold;
    color: var(--forest-green);
    margin-bottom: 10px;
}

.success-text {
    color: rgba(30, 61, 50, 0.78);
    line-height: 1.6;
}

.thank-you-page {
    background: linear-gradient(180deg, rgba(207, 230, 228, 0.95) 0%, rgba(167, 196, 160, 0.9) 65%, rgba(135, 183, 181, 0.85) 100%);
    border-radius: 24px;
    padding: 32px 28px;
    color: var(--deep-pine);
    box-shadow: 0 16px 40px rgba(30, 61, 50, 0.2);
    text-align: left;
    line-height: 1.7;
}

/* Two-column grid: text left, photo right */
.thank-you-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 24px;
    align-items: start;
}

.thank-you-content {
    min-width: 0;
}

/* Photo card */
.thank-you-photo {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(31, 58, 44, 0.14);
    border-radius: 14px;
    padding: 10px;
    margin: 0;
}

.thank-you-photo img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 10px;
    object-fit: cover;
}

.thank-you-photo figcaption {
    margin-top: 8px;
    text-align: center;
    color: #2a4d3b;
    line-height: 1.35;
}

.thank-you-photo figcaption strong {
    display: block;
}

.thank-you-photo figcaption span {
    display: block;
    font-size: 0.9em;
}

.thank-you-page h2 {
    font-size: 1.8em;
    margin-bottom: 18px;
    color: var(--forest-green);
}

.thank-you-page h3 {
    font-size: 1.2em;
    margin: 24px 0 12px;
    color: var(--deep-pine);
}

.thank-you-page a {
    color: var(--wasser-blue);
    font-weight: 600;
}

.thank-you-page .results-info {
    margin-top: 24px;
    color: rgba(30, 61, 50, 0.75);
}

/* Logos row: project + partner side by side */
.all-logos {
    margin-top: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 32px;
    flex-wrap: wrap;
}

.project-logos {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}

.project-logo {
    max-width: 220px;
    max-height: 80px;
    height: auto;
    object-fit: contain;
    transition: opacity 0.2s ease;
}

.project-logo:hover {
    opacity: 0.8;
}

.partner-logos {
    text-align: center;
}

.partner-logos h3 {
    margin-bottom: 8px;
    font-size: 1.05em;
}

.partner-logo {
    max-width: 150px;
    max-height: 60px;
    height: auto;
    object-fit: contain;
    transition: opacity 0.2s ease;
}

.partner-logo:hover {
    opacity: 0.8;
}

@media (max-width: 900px) {
    .thank-you-layout {
        grid-template-columns: 1fr;
    }
    .thank-you-photo {
        max-width: 300px;
        margin: 0 auto;
    }
}

@media (max-width: 600px) {
    .thank-you-page {
        padding: 26px 20px;
    }

    .project-logo {
        max-width: 160px;
        max-height: 60px;
    }

    .partner-logo {
        max-width: 120px;
        max-height: 50px;
    }

    .all-logos {
        gap: 20px;
    }
}

canvas {
    max-width: 100%;
    height: auto;
}

.info-box {
    background: none;
    border: 2px solid currentColor;
    color: var(--deep-pine);
    font-weight: bold;
    padding: 12px 18px;
    border-radius: 10px;
    margin-bottom: 20px;
}

/* Scenario role-play callout — visually distinct from the info sheet */
.scenario-callout {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    background: linear-gradient(135deg, #e8f5e9 0%, #f1f8e9 100%);
    border-left: 5px solid var(--forest-canopy, #2e7d32);
    border-radius: 12px;
    padding: 20px 22px;
    margin-bottom: 28px;
    color: var(--deep-pine);
    line-height: 1.5;
    font-size: 1.05em;
    text-align: justify;
    box-shadow: 0 2px 8px rgba(46, 125, 50, 0.10);
}

.scenario-callout-icon {
    font-size: 1.8em;
    flex-shrink: 0;
    margin-top: 2px;
}

.scenario-callout-body {
    flex: 1;
}

.scenario-callout-label {
    display: block;
    font-size: 0.85em;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--forest-canopy, #2e7d32);
    margin-bottom: 6px;
}

.scenario-callout p {
    margin: 0;
    font-style: italic;
}

.consent-card {
    background: rgba(255, 255, 255, 0.92);
    border: 2px solid rgba(136, 183, 181, 0.45);
    border-radius: 14px;
    padding: 18px 20px;
    margin-bottom: 24px;
    color: var(--deep-pine);
  line-height: 1.3;
  font-size: 1.05em;
  text-align: justify;
}

.consent-card p {
    margin-bottom: 12px;
}

.consent-card p:last-of-type {
    margin-bottom: 16px;
}

.consent-checkbox {
    display: flex;
    /* align to top so checkbox stays same size when the label wraps onto multiple lines */
    align-items: flex-start;
    gap: 10px;
    /* use same font as surrounding consent card text */
    font-weight: normal;
    font-size: inherit;
    color: var(--deep-pine);
    margin-bottom: 14px;
    cursor: pointer;
}

.consent-checkbox input[type="checkbox"] {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    border: 2px solid var(--forest-green);
    accent-color: var(--forest-green);
}

.consent-checkbox span {
    /* let text wrap normally; font-size inherited already above */
    white-space: normal;
}
.consent-points {
    list-style: disc;
    padding-left: 24px;
    color: rgba(30, 61, 50, 0.7);
    font-size: 1.0em;
}

.consent-points li {
    margin-bottom: 6px;
}

/* Klagenfurt-inspired color palette */
:root {
    --wasser-blue: #5CA4A9;        /* Wörthersee Blue */
    /* Shift greens slightly toward blue/teal to harmonize with blue palette */
    --forest-green: #2F7B6F;       /* Teal-tinted Green (was #3B6E4D) */
    --soft-moss: #B7DAD6;          /* Softer blue-green (was #A7C4A0) */
    --alpine-sky: #CFE6E4;         /* Alpine Sky */
    --urban-gray: #E5E5E5;         /* Urban Gray */
    --deep-pine: #1E3D32;          /* Deep Pine */
    --lake-reflection: #88B7B5;    /* Lake Reflection */
    --pure-white: #FFFFFF;
}

/* Grid layout: responsive auto-fit/minmax so cards adapt to available width */
#criteriaContainer {
    display: grid;
    /* Default: responsive cards that wrap on small screens */
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px;
    align-items: start;
    justify-items: stretch;
}

/* Keep smaller adjustments for extremely small screens if needed */
@media (max-width: 380px) {
    #criteriaContainer { grid-template-columns: 1fr; }
    .criteria-item { height: auto; }
}

/* Desktop: force a fixed number of cards per row so rows remain balanced (e.g. 3 per row)
   This ensures layouts like 3+3 instead of 4+2 on wide screens when you have 6 items. */
@media (min-width: 920px) {
    #criteriaContainer {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Make cards compact so more items fit without scrolling on larger screens */
.criteria-item {
    height: 140px;
    overflow: visible;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Hidden overlay description that appears on hover */

.criteria-item .criteria-description {
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 48px;
    background: rgba(30, 61, 50, 0.92);
    color: var(--pure-white);
    padding: 10px;
    border-radius: 8px;
    font-size: 0.85em;
    line-height: 1.3;
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 160ms ease, transform 160ms ease;
    pointer-events: none;
}

.criteria-item:hover .criteria-description {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* Mobile / touch: allow tapping to toggle description and show it in-flow */
.criteria-item.desc-visible .criteria-description {
    position: static;
    left: auto;
    right: auto;
    bottom: auto;
    background: rgba(30, 61, 50, 0.92);
    color: var(--pure-white);
    padding: 10px;
    border-radius: 8px;
    font-size: 0.85em;
    line-height: 1.3;
    opacity: 1;
    transform: none;
    transition: none;
    pointer-events: auto;
    margin-top: 8px;
}

/* On touch devices, reveal descriptions only for focused or tapped cards */
@media (hover: none) {
    #criteriaContainer {
        grid-template-columns: 1fr;
    }

    .criteria-item {
        height: auto;
        min-height: 0;
    }

    .criteria-item .criteria-description {
        position: static;
        background: rgba(30, 61, 50, 0.92);
        color: var(--pure-white);
        padding: 10px;
        border-radius: 8px;
        font-size: 0.85em;
        line-height: 1.3;
        opacity: 1;
        transform: none;
        transition: none;
        pointer-events: auto;
        margin-top: 8px;
        display: none;
    }

    .criteria-item.in-focus .criteria-description,
    .criteria-item.desc-visible .criteria-description {
        display: block;
    }

    .criteria-item:hover .criteria-description {
        opacity: 1;
        transform: none;
    }
}

/* Larger slider thumb on small screens for easier touch interaction */
@media (max-width: 600px) {
    input[type="range"]::-webkit-slider-thumb {
        width: 36px;
        height: 36px;
    }
    input[type="range"]::-moz-range-thumb {
        width: 36px;
        height: 36px;
    }
}

.criteria-description {
    font-size: 0.8em;
    margin-bottom: 8px;
}

.criteria-emoji {
    display: inline-block;
    font-size: 1.25em;
    margin-right: 8px;
    vertical-align: middle;
}

.criteria-title {
    font-size: 0.95em;
}

.slider-container {
    margin-top: 6px;
}

.priorities-container {
    /* Softer, blue-leaning background to harmonize with the page palette */
    background: linear-gradient(140deg, rgba(207,230,228,0.92), rgba(172,210,206,0.9));
    border-radius: 18px;
    padding: 24px 22px;
    margin-bottom: 26px;
    box-shadow: 0 8px 20px rgba(30, 61, 50, 0.06);
    border: 1px solid rgba(136,183,181,0.12);
}

.priorities-container h3 {
    color: var(--forest-green);
    margin-bottom: 18px;
    font-size: 1.35em;
    letter-spacing: 0.4px;
}

.priority-item {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.priority-rank {
    font-size: 1.4em;
    font-weight: bold;
    color: #eeeeee;
    min-width: 36px;
}

.priority-info { flex: 1; }

.priority-title {
    font-weight: bold;
    color: var(--deep-pine);
    margin-bottom: 4px;
}

.priority-bar {
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid rgba(136, 183, 181, 0.45);
    height: 32px;
    border-radius: 16px;
    overflow: visible;
    position: relative;
    margin: 0;
    padding: 0;
}

.priority-bar-fill {
    background: linear-gradient(90deg, var(--forest-green) 0%, var(--wasser-blue) 100%);
    color: var(--pure-white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9em;
    padding: 0 8px;
    transition: width 0.3s ease;
    height: 100%;
    box-sizing: border-box;
    overflow: visible;
    border-radius: inherit;
}



.priority-bar-fill .priority-label {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}

.priority-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.priority-label.compact {
    font-size: 0.75em;
    letter-spacing: 0.01em;
}

/* Results Section - Bar Chart */
/* (moved earlier in file) */

/* Profile Section */
/* (moved earlier in file) */


.impact-banner {
    padding: 22px 24px;
    /* Use blue palette for impact banner to harmonize with page colors */
    background: linear-gradient(135deg, var(--wasser-blue), var(--lake-reflection));
    border-radius: 18px;
    color: var(--pure-white);
    font-size: 1.05em;
    line-height: 1.6;
    box-shadow: 0 12px 28px rgba(30, 61, 50, 0.12);
}

.impact-banner span {
    display: block;
    margin-top: 6px;
    font-size: 0.92em;
    color: rgba(255, 255, 255, 0.85);
}



/* Disabled slider styling when budget is exhausted */
input[type="range"].disabled-slider {
    opacity: 0.7;
    cursor: not-allowed;
}

input[type="range"].disabled-slider::-webkit-slider-thumb {
    cursor: not-allowed;
    background: rgba(229, 229, 229, 0.8);
}

input[type="range"].disabled-slider::-moz-range-thumb {
    cursor: not-allowed;
    background: rgba(229, 229, 229, 0.8);
}

/* Enhanced warning message animation */
.warning {
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Visual feedback when trying to exceed budget */
.criteria-item.budget-exceeded input[type="range"] {
    animation: shake 0.3s;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-3px); }
    75% { transform: translateX(3px); }
}

/* Optional: Highlight the criteria that has remaining capacity when budget is full */
.criteria-item.can-increase {
    border-color: var(--wasser-blue);
    background: rgba(92, 164, 169, 0.12);
}

/* Header logo sizing: keep it large and unclipped */
.klagenfurt-flag {
    display: inline-block;
    height: 112px;
    max-height: 128px;
    width: auto;
    max-width: 200px;
    margin-right: 0;
    vertical-align: middle;
    border-radius: 12px;
    box-shadow: 0 6px 18px rgba(30, 61, 50, 0.22);
    border: none;
    background: none;
    object-fit: contain;
}

/* Ensure the <img> preserves aspect ratio without cropping */
img.klagenfurt-flag {
    display: inline-block;
    height: 112px;
    max-height: 128px;
    width: auto;
    max-width: 200px;
    object-fit: contain;
    vertical-align: middle;
    border-radius: 12px;
}

/* Fallback decorative span that shows the original gradient if the image isn't available */
.klagenfurt-flag-fallback {
    display: none; /* toggled via onerror handler on the <img> */
    width: 125px;
    height: 80px;
    margin-right: 0;
    vertical-align: middle;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--wasser-blue), var(--lake-reflection));
    box-shadow: 0 6px 18px rgba(30, 61, 50, 0.22);
}

@media (max-width: 600px) {
    .survey-intro {
        margin-bottom: 16px;
        padding: 20px 18px;
    }
}
/* ── GDPR Additions ── */
.gdpr-summary {
    background: #f0f7ed;
    border: 1.5px solid #7fb069;
    border-radius: 10px;
    padding: 1.2rem 1.4rem;
    margin-bottom: 1.4rem;
}
.gdpr-summary h3 {
    font-size: 0.95rem;
    color: #2d5a27;
    margin-bottom: 0.9rem;
}
.gdpr-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.6rem;
}
.gdpr-summary-item {
    background: #fff;
    border-radius: 7px;
    padding: 0.55rem 0.8rem;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}
.gdpr-summary-label {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #4a8c3f;
    font-weight: 600;
}
.gdpr-summary-value {
    font-size: 0.85rem;
    color: #3d2b1f;
}
.gdpr-anonymity-warning {
    background: #fff8e1;
    border: 1.5px solid #f0c040;
    border-radius: 8px;
    padding: 0.9rem 1rem;
    margin: 1.1rem 0;
    font-size: 0.88rem;
    color: #5a4000;
    display: flex;
    gap: 0.6rem;
    align-items: flex-start;
    line-height: 1.6;
}
.gdpr-warn-icon { font-size: 1.1rem; flex-shrink: 0; margin-top: 1px; }
.consent-groups-intro {
    font-size: 0.88rem;
    color: #555;
    margin-bottom: 1rem;
}
.consent-group-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #4a8c3f;
    font-weight: 600;
    margin: 1.1rem 0 0.5rem;
}
