/* ============================================
   QR Wandelroute — Mobiel-first stylesheet
   ============================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --green-dark:   #2d6a4f;
    --green-mid:    #40916c;
    --green-light:  #74c69d;
    --green-pale:   #d8f3dc;
    --brown-dark:   #645443;
    --brown-mid:    #7B6A59;
    --brown-light:  #af9984;
    --brown-pale:   #D3B574;
    --orange:       #e07b39;
    --red:          #c0392b;
    --red-pale:     #fdecea;
    --correct:      #27ae60;
    --correct-pale: #eafaf1;
    --incorrect:    #c0392b;
    --incorrect-pale:#fdecea;
    --text:         #1a1a2e;
    --text-muted:   #6b7280;
    --bg:           #f4f7f4;
    --white:        #ffffff;
    --border:       #e2e8e4;
    --radius:       12px;
    --radius-sm:    8px;
    --shadow:       0 2px 12px rgba(0,0,0,.08);
    --shadow-md:    0 4px 20px rgba(0,0,0,.12);
    --font:         -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}



html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body { font-family: var(--font); background: var(--bg); color: var(--text); line-height: 1.6; min-height: 100dvh; }
.evContainer:not(.showed) { display: none; }

/* ---- Header ---- */
.questionClick { position: absolute; right: 10px; bottom: 10px; z-index: 2; width: auto;
    padding: 0 10px;
    height: 32px;
    line-height: 30px;
    text-align: center;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 16px;
    color: var(--green-dark); }

.questionClick i { display: inline-block; line-height: 32px; background: var(--green-dark); width: 32px; border-radius: 0 var(--radius) var(--radius) 0; font-size: 14px; color: #fff; margin-left: 10px; margin-right: -10px; }
/* ---- Header ---- */
.site-header {
    background: var(--green-dark);
    color: var(--white);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,.2);
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .75rem 1rem;
    max-width: 680px;
    margin: 0 auto;
}
.site-title {
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: .02em;
}
.stop-counter { font-size: .85rem; color: var(--green-pale); }
.back-link {
    color: var(--green-pale);
    text-decoration: none;
    font-size: .9rem;
    padding: .25rem .5rem;
    border-radius: var(--radius-sm);
    transition: background .15s;
}
.back-link:hover { background: rgba(255,255,255,.15); }
.logo { height: 36px; width: auto; }

/* Progress bar */
.progress-bar-wrap { background: rgba(0,0,0,.2); height: 4px; }
.progress-bar { height: 4px; background: var(--green-light); transition: width .4s ease; }

/* ---- Main content ---- */
.main-content {
    max-width: 680px;
    margin: 0 auto;
    padding: 1rem;
    margin-bottom: 76px;
}

/* ---- Cards ---- */
.card {
    position: relative;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 1rem;
    overflow: hidden;
}

/* ---- Route list ---- */
.page-intro { padding: 1rem 0; }
.page-intro h2 { font-size: 1.4rem; color: var(--green-dark); margin-bottom: .25rem; }
.page-intro p { color: var(--text-muted); }

.route-list { display: flex; flex-direction: column; gap: .75rem; }
.route-card {
    display: block;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.25rem;
    text-decoration: none;
    color: var(--text);
    border: 2px solid transparent;
    transition: border-color .2s, box-shadow .2s;
}
.route-card:hover { border-color: var(--green-mid); box-shadow: var(--shadow-md); }
.route-card h3 { font-size: 1.15rem; color: var(--green-dark); margin-bottom: .35rem; }
.route-card p { font-size: .9rem; color: var(--text-muted); margin-bottom: .75rem; }

/* ---- Start pagina ---- */
.start-card { padding: 1.5rem; text-align: center; }
.start-icon { font-size: 3rem; margin-bottom: .75rem; }
.start-card h2 { font-size: 1.4rem; color: var(--green-dark); margin-bottom: .5rem; }
.route-desc { color: var(--text-muted); font-size: .95rem; margin-bottom: 1rem; }
.route-meta { display: flex; gap: .5rem; justify-content: center; flex-wrap: wrap; margin-bottom: 1.5rem; }
.meta-badge {
    background: var(--green-pale);
    color: var(--green-dark);
    border-radius: 99px;
    padding: .25rem .75rem;
    font-size: .8rem;
    font-weight: 600;
}
.meta-badge-type {
    background: var(--green-dark);
    color: var(--white);
}
.start-form-wrap { text-align: left; margin-top: 1rem; }
.start-form-wrap h3 { font-size: 1rem; margin-bottom: .75rem; color: var(--text); }
.start-hint { font-size: .8rem; color: var(--text-muted); margin-top: 1rem; text-align: center; }

/* ---- Stop pagina ---- */
.stop-image-wrap { width: 100%; max-height: 280px; overflow: hidden; position: relative; }
.stop-image { width: 100%; height: 100%; object-fit: cover; display: block; }

.stop-body { padding: 1.25rem 1.25rem .75rem; }
.stop-title { font-size: 1.3rem; color: var(--green-dark); margin-bottom: .75rem; font-weight: 700; }
.stop-text p {
    margin-bottom: .75rem;
    font-size: .95rem;
    line-height: 1.7;
    color: var(--text);
}

/* Question section */
.question-section {
    border-top: 2px solid var(--green-pale);
    padding: 1rem 1.25rem;
    background: #fafffe;
}
.question-header { display: flex; gap: .75rem; align-items: flex-start; margin-bottom: 1rem; }
.question-icon { font-size: 1.4rem; flex-shrink: 0; margin-top: .1rem; }
.question-text { font-size: 1rem; font-weight: 600; color: var(--text); line-height: 1.4; }

.answers-list { display: flex; flex-direction: column; gap: .6rem; }
.answer-btn {
    width: 100%;
    padding: .9rem 1rem;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--white);
    font-size: .95rem;
    text-align: left;
    cursor: pointer;
    transition: border-color .15s, background .15s, transform .1s;
    font-family: var(--font);
    color: var(--text);
    min-height: 48px;
    line-height: 1.4;
}
.answer-btn:hover:not(:disabled) {
    border-color: var(--green-mid);
    background: var(--green-pale);
    transform: translateX(2px);
}
.answer-btn:disabled { cursor: default; }
.answer-btn.correct, .answer-btn.correct-reveal {
    border-color: var(--correct);
    background: var(--correct-pale);
    color: var(--correct);
    font-weight: 600;
}
.answer-btn.incorrect.selected {
    border-color: var(--incorrect);
    background: var(--incorrect-pale);
    color: var(--incorrect);
}

/* Feedback */
.answer-feedback {
    margin-top: .75rem;
    padding: .9rem 1rem;
    border-radius: var(--radius-sm);
    font-size: .95rem;
    font-weight: 500;
    display: flex;
    align-items: flex-start;
    gap: .5rem;
    line-height: 1.5;
}
.answer-feedback.hidden { display: none; }
.feedback-correct { background: var(--correct-pale); color: var(--correct); border: 1.5px solid var(--correct); }
.feedback-incorrect { background: var(--incorrect-pale); color: var(--incorrect); border: 1.5px solid var(--incorrect); }
.feedback-icon { font-size: 1.1rem; flex-shrink: 0; }

/* Stop nav */
.stop-nav { padding: 1rem 1.25rem 1.25rem; }

/* ---- Score pagina ---- */
.score-card { padding: 1.5rem; }
.score-header { text-align: center; margin-bottom: 1.25rem; }
.score-trophy { font-size: 3.5rem; margin-bottom: .5rem; }
.score-header h2 { font-size: 1.3rem; color: var(--green-dark); }
.score-route { color: var(--text-muted); font-size: .9rem; margin-top: .25rem; }

.score-display { text-align: center; margin-bottom: 1rem; }
.score-number { font-size: 3rem; font-weight: 800; color: var(--green-dark); line-height: 1; margin-bottom: .25rem; }
.score-correct { color: var(--correct); }
.score-divider { color: var(--text-muted); font-weight: 400; }
.score-total { color: var(--text-muted); }
.score-label { font-size: .85rem; color: var(--text-muted); margin-bottom: .75rem; }
.score-bar-wrap { background: var(--border); border-radius: 99px; height: 10px; margin: .5rem auto; max-width: 220px; overflow: hidden; }
.score-bar { height: 10px; background: var(--green-mid); border-radius: 99px; transition: width .8s ease; }
.score-pct { font-size: 1.1rem; font-weight: 700; color: var(--green-dark); }
.score-comment { text-align: center; color: var(--text-muted); font-size: .9rem; padding: 0 1rem; }

.stops-overview { padding: 1.25rem; }
.stops-overview h3 { font-size: 1rem; font-weight: 700; margin-bottom: .75rem; color: var(--green-dark); }
.stops-list { list-style: none; display: flex; flex-direction: column; gap: .4rem; }
.stop-list-item {}
.stop-list-link {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .65rem .75rem;
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: var(--text);
    transition: background .15s;
    font-size: .9rem;
}
.stop-list-link:hover { background: var(--bg); }
.stop-num {
    width: 24px; height: 24px;
    background: var(--green-pale);
    color: var(--green-dark);
    border-radius: 50%;
    font-size: .75rem;
    font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.stop-name { flex: 1; }
.stop-status { flex-shrink: 0; font-size: 1rem; }
.status-icon.pending-icon { color: var(--border); }

.no-session-card { padding: 2rem; text-align: center; }
.no-session-icon { font-size: 3rem; margin-bottom: 1rem; }
.no-session-card h2 { margin-bottom: .5rem; color: var(--green-dark); }
.no-session-card p { color: var(--text-muted); margin-bottom: 1.25rem; }
.session-restore { padding: 1.25rem; }
.session-restore h3 { margin-bottom: .5rem; font-size: .95rem; }
.session-restore p { font-size: .85rem; color: var(--text-muted); margin-bottom: .75rem; }

/* ---- Buttons ---- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .35rem;
    padding: .65rem 1.25rem;
    border-radius: var(--radius-sm);
    font-size: .9rem;
    font-weight: 600;
    border: 2px solid transparent;
    cursor: pointer;
    text-decoration: none;
    transition: all .15s;
    font-family: var(--font);
    line-height: 1;
}
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--green-dark); color: var(--white); }
.btn-primary:hover:not(:disabled) { background: var(--green-mid); }
.btn-secondary { background: var(--bg); color: var(--text); border-color: var(--border); }
.btn-secondary:hover { background: var(--border); }
.btn-success { background: var(--correct); color: var(--white); }
.btn-success:hover { background: #1e8449; }
.btn-outline { border-color: var(--green-dark); color: var(--green-dark); background: transparent; }
.btn-outline:hover { background: var(--green-pale); }
.btn-large { padding: .9rem 1.5rem; font-size: 1rem; min-height: 52px; }
.btn-full { width: 100%; }
.btn-sm { padding: .35rem .75rem; font-size: .8rem; }

/* ---- Forms ---- */
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; font-size: .9rem; font-weight: 600; margin-bottom: .35rem; color: var(--text); }
.form-input {
    width: 100%;
    padding: .75rem 1rem;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-family: var(--font);
    color: var(--text);
    background: var(--white);
    transition: border-color .15s;
}
.form-input:focus { outline: none; border-color: var(--green-mid); }
.form-textarea { resize: vertical; min-height: 100px; }
.form-hint { font-size: .78rem; color: var(--text-muted); font-weight: 400; display: block; margin-top: .2rem; }
.error-msg { color: var(--red); font-size: .85rem; padding: .5rem 0; }

/* ---- Footer ---- */
.site-footer {
    text-align: center;
    padding: 1.5rem 1rem;
    color: var(--text-muted);
    font-size: .8rem;
    margin-top: 1rem;

    background-color: var(--brown-mid);
    position: fixed;
    left: 0;
    bottom: 0;
    width: 100%;
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
}
.site-footer p {
    display: inline-block;
    margin-right: 10px;
}
.site-footer img {
    margin-left: 10px;
    width: auto;
    height: 40px;
}

/* ---- Scan reminder ---- */
.scan-reminder {
    background: var(--green-pale);
    border: 2px solid var(--green-light);
    border-radius: var(--radius);
    padding: 1.25rem 1rem;
    text-align: center;
    animation: fadeIn .25s ease;
}
.scan-reminder-icon { font-size: 2.5rem; margin-bottom: .5rem; }
.scan-reminder-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--green-dark);
    margin-bottom: .4rem;
}
.scan-reminder-sub {
    font-size: .88rem;
    color: var(--text-muted);
    margin-bottom: .85rem;
    line-height: 1.5;
}
.scan-reminder-skip {
    display: inline-block;
    font-size: .8rem;
    color: var(--text-muted);
    text-decoration: underline;
    text-underline-offset: 2px;
    padding: .25rem .5rem;
}
.scan-reminder-skip:hover { color: var(--text); }

@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---- Empty state ---- */
.empty-state { padding: 2rem; text-align: center; color: var(--text-muted); }
