/* ==========================================
   HERO RESULTADOS
========================================== */
.hero.hero-result {
    position: relative;
    color: #fff;
    text-align: center;
    padding: 60px 0;
    background:
        linear-gradient(to bottom, rgba(11, 36, 71, .9), rgba(11, 36, 71, .9)),
        url('../img/mapaFundo.png') center/cover no-repeat;
}

.hero-result .hero-content {
    position: relative;
    z-index: 2;
    max-width: 760px;
    margin: 0 auto;
    padding: 0 20px;
}

.hero-result h1 {
    font-size: 2.2rem;
    margin: 8px 0 10px;
}

.hero-result p {
    opacity: .95;
    margin: 0;
}

/* ==========================================
   CARDS GERAIS
========================================== */
.result-overview,
.result-card {
    background: #fff;
    border: 1px solid var(--ring);
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 8px 30px rgba(2, 8, 23, .04);
    margin-bottom: 24px;
}

/* grid com espaçamento equilibrado */
.overview-grid {
    display: grid;
    grid-template-columns: 1.1fr 1.1fr;
    gap: 32px;
    align-items: flex-start;
}

.overview-map img {
    width: 100%;
    max-width: 420px;
    /* controla o tamanho */
    height: auto;
    margin: 0 auto;
    display: block;
    border-radius: 16px;
}

@media (max-width: 600px) {
    .overview-map img {
        max-width: 300px;
    }
}



/* ==========================================
   QR CODE
========================================== */
.qr-wrapper {
    position: relative;
    display: inline-block;
    margin: 12px 0 14px;
}

#qrNational canvas,
#qrNational img {
    display: block;
}


.qr-logo {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 46px;
    height: 46px;
    background: #ffffff;
    padding: 6px;
    border-radius: 12px;
    box-shadow: 0 0 6px rgba(0, 0, 0, .25);
}

.qr-score-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    align-items: center;
}

.qr-box {
    text-align: center;
}

.qr-box canvas,
.qr-box img {
    margin: 0 auto 10px;
}

.qr-score-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    align-items: center;
}


@media (max-width: 700px) {
    .qr-score-row {
        grid-template-columns: 1fr;
    }
}


/* botão secundário */
.btn.btn-secondary {
    background: #e5e7eb;
    color: #0f172a;
}

.btn.btn-secondary:hover {
    filter: brightness(0.97);
}

/* ==========================================
   MÉTRICAS GERAIS
========================================== */
.metric-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-top: 10px;
}

.metric-card {
    border-radius: 14px;
    border: 1px solid var(--ring);
    padding: 14px 16px;
    background: #f8fafc;
}

.metric-card .label {
    font-size: .9rem;
    color: #64748b;
}

.metric-card .value {
    font-size: 1.6rem;
    font-weight: 700;
    color: #0f172a;
}

.metric-card .hint {
    font-size: .85rem;
    color: #94a3b8;
}

/* ==========================================
   FORM FILTRO DE RESULTADO
========================================== */
.result-form-grid {
    display: grid;
    grid-template-columns: 2.2fr 1fr;
    gap: 12px;
    margin-top: 14px;
}

.result-form-grid .field-btn {
    display: flex;
    align-items: flex-end;
}

.full-mobile {
    width: 100%;
}

/* ==========================================
   PAINEL DE RESULTADO DA CIDADE
========================================== */
.results-panel {
    margin-top: 16px;
}

.hidden {
    display: none !important;
}

.city-result-card {
    background: #fff;
    border-radius: 16px;
    border: 1px solid var(--ring);
    box-shadow: 0 8px 30px rgba(2, 8, 23, .04);
    padding: 24px;
}

.city-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.city-header-left h2 {
    margin: 0 0 4px;
}

.city-header-left .tag {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    background: #e0f2fe;
    color: #0369a1;
    font-size: .85rem;
}

/* layout mapa + QR */
.city-layout {
    display: grid;
    grid-template-columns: 1.3fr 1.4fr;
    gap: 20px;
    align-items: flex-start;
    margin-top: 12px;
}

.city-map img {
    width: 100%;
    border-radius: 16px;
    border: 1px solid #e5e7eb;
}

.city-qr {
    text-align: center;
}

.city-qr .qr-wrapper {
    margin: 10px auto 12px;
}

/* ==========================================
   PERGUNTAS E BARRAS
========================================== */

.question-item {
    margin-bottom: 16px;
}

.question-item:last-child {
    margin-bottom: 0;
}

.q-label {
    font-weight: 600;
    margin-bottom: 6px;
}


.bar-track {
    flex: 1;
    background: #e5e7eb;
    border-radius: 999px;
    height: 10px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    width: 0;
    border-radius: 999px;

    /* 🔥 animação suave */
    transition:
        width 0.8s cubic-bezier(.4, 0, .2, 1),
        background-color 0.6s ease;
}

.bar-fill.score-good {
    background: linear-gradient(90deg, #16a34a, #4ade80);
}

.bar-fill.score-mid {
    background: linear-gradient(90deg, #f59e0b, #fde047);
}

.bar-fill.score-bad {
    background: linear-gradient(90deg, #dc2626, #f87171);
}

/* ==========================================
   LISTA DE CIDADES HOMÔNIMAS
========================================== */
.city-choices {
    margin-top: 12px;
    border-radius: 12px;
    border: 1px solid var(--ring);
    background: #f9fafb;
    padding: 12px;
}

.city-choice-item {
    padding: 10px 12px;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.city-choice-item:hover {
    background: rgba(15, 112, 255, .06);
}

/* FOOTER SLIM */
.footer-slim {
    padding-top: 16px;
    padding-bottom: 16px;
}

/* ==========================================
   RESPONSIVIDADE
========================================== */
@media (max-width: 900px) {
    .hero.hero-result {
        padding: 50px 0;
    }

    .overview-grid {
        grid-template-columns: 1fr;
    }

    .metric-grid {
        grid-template-columns: 1fr;
    }

    .result-form-grid {
        grid-template-columns: 1fr;
    }

    .city-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .hero-result h1 {
        font-size: 1.8rem;
    }
}

.score-main {
    text-align: center;
    padding: 20px;
}

.score-main .value {
    font-size: 2.6rem;
    font-weight: 900;
}

.score-main.score-good {
    background: #ecfdf5;
    border-color: #16a34a;
    color: #065f46;
}

.score-main.score-mid {
    background: #fff7ed;
    border-color: #f59e0b;
    color: #92400e;
}

.score-main.score-bad {
    background: #fef2f2;
    border-color: #dc2626;
    color: #7f1d1d;
}