/* ===========================================
   PESQUISA DE CLIMA FPF - Fanáticos Por Futebol
   Paleta: Azul institucional FPF
   =========================================== */

:root {
    /* Paleta FPF - Azuis */
    --fpf-blue:        #003d7a;  /* Azul institucional principal */
    --fpf-blue-dark:   #002a55;  /* Azul navy escuro */
    --fpf-blue-darker: #001a35;  /* Quase preto azulado */
    --fpf-blue-mid:    #0056b3;  /* Azul intermediário */
    --fpf-blue-light:  #1976d2;  /* Azul claro de destaque */
    --fpf-blue-pale:   #e3f2fd;  /* Azul muito claro p/ fundos */
    --fpf-blue-50:     #f0f6fc;  /* Quase branco azulado */

    --fpf-white:       #ffffff;
    --fpf-gray-900:    #1a2332;
    --fpf-gray-700:    #4a5568;
    --fpf-gray-500:    #718096;
    --fpf-gray-300:    #cbd5e0;
    --fpf-gray-200:    #e2e8f0;
    --fpf-gray-100:    #edf2f7;
    --fpf-gray-50:     #f7fafc;

    /* NPS */
    --nps-detrator:       #dc2626;
    --nps-detrator-light: #fee2e2;
    --nps-neutro:         #f59e0b;
    --nps-neutro-light:   #fef3c7;
    --nps-promotor:       #16a34a;
    --nps-promotor-light: #dcfce7;

    /* Sim/Não */
    --resposta-sim: #16a34a;
    --resposta-nao: #dc2626;

    /* Sombras */
    --shadow-sm: 0 1px 2px rgba(0, 30, 80, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 30, 80, 0.1), 0 2px 4px -1px rgba(0, 30, 80, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 30, 80, 0.1), 0 4px 6px -2px rgba(0, 30, 80, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 30, 80, 0.15), 0 10px 10px -5px rgba(0, 30, 80, 0.04);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--fpf-gray-50);
    color: var(--fpf-gray-900);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===========================================
   HERO COM VÍDEO NO TOPO
   =========================================== */
.hero {
    position: relative;
    width: 100%;
    height: 380px;
    overflow: hidden;
    /* Fallback caso o vídeo não carregue */
    background: linear-gradient(135deg, var(--fpf-blue-darker) 0%, var(--fpf-blue) 50%, var(--fpf-blue-mid) 100%);
}

.hero-video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    object-fit: cover;
    z-index: 1;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        linear-gradient(135deg, rgba(0, 26, 53, 0.35) 0%, rgba(0, 61, 122, 0.25) 50%, rgba(0, 86, 179, 0.2) 100%);
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 24px;
}

.hero-logo {
    max-height: 140px;
    width: auto;
    filter: drop-shadow(0 4px 20px rgba(0, 0, 0, 0.4));
    animation: fadeInDown 0.8s ease-out;
}

/* Fallback de texto caso o logo não carregue */
.hero-logo-fallback {
    color: var(--fpf-white);
    text-align: center;
    animation: fadeInDown 0.8s ease-out;
    display: none;
}

.hero-logo-fallback.show {
    display: block;
}

.hero-logo-fallback .fpf-sigla {
    font-size: 72px;
    font-weight: 800;
    letter-spacing: 8px;
    line-height: 1;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.hero-logo-fallback .fpf-tagline {
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 4px;
    text-transform: uppercase;
    margin-top: 12px;
    opacity: 0.95;
}

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

/* ===========================================
   BARRA DE SEGURANÇA
   =========================================== */
.security-bar {
    background: var(--fpf-blue-darker);
    color: var(--fpf-white);
    padding: 10px 0;
    border-top: 2px solid var(--fpf-blue-light);
    border-bottom: 1px solid var(--fpf-blue-dark);
}

.security-bar-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 12.5px;
    font-weight: 500;
    letter-spacing: 0.3px;
    color: var(--fpf-gray-300);
}

.security-bar-content svg {
    color: var(--fpf-blue-light);
    flex-shrink: 0;
}

/* ===========================================
   CONTEÚDO PRINCIPAL E TELAS
   =========================================== */
.main-content {
    min-height: calc(100vh - 380px - 42px - 120px);
    padding: 48px 0;
}

.container {
    max-width: 880px;
    margin: 0 auto;
    padding: 0 24px;
}

.screen {
    display: none;
    animation: fadeIn 0.5s ease-out;
}

.screen.active {
    display: block;
}

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

/* ===========================================
   CARD DE BOAS-VINDAS
   =========================================== */
.welcome-card {
    background: var(--fpf-white);
    border-radius: 16px;
    box-shadow: var(--shadow-xl);
    overflow: hidden;
    border: 1px solid var(--fpf-gray-200);
}

.welcome-header {
    background: linear-gradient(135deg, var(--fpf-blue-darker) 0%, var(--fpf-blue) 100%);
    color: var(--fpf-white);
    padding: 32px 40px;
    display: flex;
    align-items: center;
    gap: 24px;
    position: relative;
    overflow: hidden;
}

.welcome-header::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 220px;
    height: 100%;
    background: linear-gradient(135deg, transparent 0%, rgba(25, 118, 210, 0.25) 100%);
    pointer-events: none;
}

.welcome-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--fpf-blue-light);
}

.welcome-logo {
    height: 64px;
    width: auto;
    background: var(--fpf-white);
    padding: 8px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    flex-shrink: 0;
}

/* Fallback caso o logo não carregue */
.welcome-logo-fallback {
    height: 64px;
    width: 64px;
    background: var(--fpf-white);
    color: var(--fpf-blue);
    border-radius: 8px;
    display: none;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 18px;
    letter-spacing: 1px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    flex-shrink: 0;
}

.welcome-logo-fallback.show {
    display: flex;
}

.welcome-titles {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.welcome-eyebrow {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--fpf-blue-light);
}

.welcome-titles h1 {
    font-size: 32px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.welcome-body {
    padding: 36px 40px 40px;
}

.welcome-text {
    font-size: 16px;
    color: var(--fpf-gray-700);
    margin-bottom: 24px;
    line-height: 1.7;
}

.info-box {
    background: linear-gradient(135deg, var(--fpf-blue-pale) 0%, #fff 100%);
    border: 1px solid #bbdefb;
    border-left: 4px solid var(--fpf-blue);
    border-radius: 0 8px 8px 0;
    padding: 18px 20px;
    display: flex;
    gap: 14px;
    margin-bottom: 32px;
}

.info-box-icon {
    color: var(--fpf-blue);
    flex-shrink: 0;
    margin-top: 2px;
}

.info-box-text {
    font-size: 14px;
    color: var(--fpf-gray-700);
    line-height: 1.6;
}

.info-box-text strong {
    display: block;
    color: var(--fpf-blue-darker);
    font-size: 14.5px;
    margin-bottom: 4px;
}

.info-box-text em {
    font-style: normal;
    color: var(--fpf-blue-dark);
    font-weight: 600;
}

/* ===========================================
   CHECKBOX DE CONFIDENCIALIDADE
   =========================================== */
.checkbox-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 28px;
    padding: 12px 16px;
    background: var(--fpf-blue-pale);
    border-radius: 8px;
    border: 1px solid #bbdefb;
}

.checkbox-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    cursor: pointer;
    accent-color: var(--fpf-blue);
}

.checkbox-item label {
    font-size: 14px;
    color: var(--fpf-gray-700);
    cursor: pointer;
    margin: 0;
    font-weight: 500;
}

.checkbox-item input[type="checkbox"]:checked + label {
    color: var(--fpf-blue-darker);
}

/* ===========================================
   FORMULÁRIO CPF
   =========================================== */
.form-cpf label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--fpf-blue-darker);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.input-group {
    display: flex;
    gap: 10px;
    margin-bottom: 8px;
}

.input-group input {
    flex: 1;
    padding: 14px 18px;
    font-size: 16px;
    font-weight: 500;
    border: 2px solid var(--fpf-gray-300);
    border-radius: 8px;
    background: var(--fpf-white);
    color: var(--fpf-gray-900);
    transition: all 0.2s ease;
    font-family: inherit;
    letter-spacing: 0.5px;
}

.input-group input:focus {
    outline: none;
    border-color: var(--fpf-blue);
    box-shadow: 0 0 0 4px rgba(0, 61, 122, 0.12);
}

.input-group input.invalid {
    border-color: var(--nps-detrator);
    background: #fef2f2;
}

.error-message {
    display: block;
    color: var(--nps-detrator);
    font-size: 13px;
    font-weight: 500;
    min-height: 18px;
    margin-top: 4px;
}

/* ===========================================
   BOTÕES
   =========================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s ease;
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary {
    background: var(--fpf-blue);
    color: var(--fpf-white);
    box-shadow: 0 4px 12px rgba(0, 61, 122, 0.3);
}

.btn-primary:hover:not(:disabled) {
    background: var(--fpf-blue-dark);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(0, 61, 122, 0.4);
}

.btn-primary:active:not(:disabled) {
    transform: translateY(0);
}

.btn-primary:disabled {
    background: var(--fpf-gray-300);
    color: var(--fpf-gray-500);
    cursor: not-allowed;
    box-shadow: none;
}

.btn-large {
    padding: 16px 36px;
    font-size: 16px;
}

/* ===========================================
   FOOTER DE CONFIANÇA
   =========================================== */
.welcome-footer {
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid var(--fpf-gray-200);
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    justify-content: space-around;
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--fpf-gray-700);
    font-size: 13.5px;
    font-weight: 500;
}

.trust-item svg {
    color: var(--fpf-blue);
}

/* ===========================================
   BARRA DE PROGRESSO
   =========================================== */
.progress-wrapper {
    background: var(--fpf-white);
    padding: 18px 24px;
    border-radius: 12px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--fpf-gray-200);
    position: sticky;
    top: 16px;
    z-index: 50;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-size: 13px;
    font-weight: 600;
    color: var(--fpf-gray-700);
}

#progress-percent {
    color: var(--fpf-blue);
    font-size: 14px;
}

.progress-bar {
    height: 8px;
    background: var(--fpf-gray-200);
    border-radius: 100px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--fpf-blue) 0%, var(--fpf-blue-light) 100%);
    border-radius: 100px;
    width: 0%;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===========================================
   QUESTÕES
   =========================================== */
.questao {
    background: var(--fpf-white);
    border-radius: 12px;
    padding: 28px 32px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--fpf-gray-200);
    transition: all 0.2s ease;
}

.questao.respondida {
    border-color: var(--fpf-blue);
    border-left: 4px solid var(--fpf-blue);
}

.questao-header {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
}

.questao-numero {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    background: var(--fpf-blue-darker);
    color: var(--fpf-white);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
}

.questao.respondida .questao-numero {
    background: var(--fpf-blue);
}

.questao-texto {
    flex: 1;
    font-size: 16px;
    font-weight: 500;
    color: var(--fpf-blue-darker);
    line-height: 1.5;
    padding-top: 6px;
}

.questao-tipo-badge {
    display: inline-block;
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 3px 8px;
    border-radius: 4px;
    margin-left: 10px;
    vertical-align: middle;
}

.badge-nps {
    background: var(--fpf-blue);
    color: var(--fpf-white);
}

.badge-simnao {
    background: var(--fpf-gray-200);
    color: var(--fpf-gray-700);
}

/* ===========================================
   RÉGUA NPS
   =========================================== */
.nps-container {
    margin-top: 24px;
}

.nps-categorias {
    display: grid;
    grid-template-columns: 7fr 2fr 2fr;
    gap: 4px;
    margin-bottom: 8px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.nps-cat {
    text-align: center;
    padding: 6px 4px;
    border-radius: 6px 6px 0 0;
    color: var(--fpf-white);
}

.nps-cat-detrator { background: var(--nps-detrator); }
.nps-cat-neutro   { background: var(--nps-neutro); }
.nps-cat-promotor { background: var(--nps-promotor); }

.nps-escala {
    display: grid;
    grid-template-columns: repeat(11, 1fr);
    gap: 6px;
}

.nps-btn {
    aspect-ratio: 1 / 1;
    min-height: 52px;
    border: 2px solid var(--fpf-gray-200);
    background: var(--fpf-white);
    border-radius: 8px;
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
    color: var(--fpf-gray-700);
    font-family: inherit;
    position: relative;
    overflow: hidden;
}

.nps-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--cor-nps);
}

.nps-btn[data-cat="detrator"] { --cor-nps: var(--nps-detrator); }
.nps-btn[data-cat="neutro"]   { --cor-nps: var(--nps-neutro); }
.nps-btn[data-cat="promotor"] { --cor-nps: var(--nps-promotor); }

.nps-btn:hover {
    transform: translateY(-2px);
    border-color: var(--cor-nps);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.nps-btn.selected {
    background: var(--cor-nps);
    color: var(--fpf-white);
    border-color: var(--cor-nps);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.nps-btn.selected::before {
    background: rgba(255, 255, 255, 0.4);
}

.nps-legendas {
    display: flex;
    justify-content: space-between;
    margin-top: 12px;
    font-size: 12px;
    color: var(--fpf-gray-500);
    font-weight: 500;
}

.nps-legendas span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.nps-legendas .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.dot-detrator { background: var(--nps-detrator); }
.dot-neutro   { background: var(--nps-neutro); }
.dot-promotor { background: var(--nps-promotor); }

/* ===========================================
   BOTÕES SIM/NÃO
   =========================================== */
.simnao-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 20px;
}

.simnao-btn {
    padding: 18px 20px;
    border: 2px solid var(--fpf-gray-200);
    background: var(--fpf-white);
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    color: var(--fpf-gray-700);
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.simnao-btn[data-valor="sim"]:hover {
    border-color: var(--resposta-sim);
    color: var(--resposta-sim);
    background: var(--nps-promotor-light);
    transform: translateY(-2px);
}

.simnao-btn[data-valor="nao"]:hover {
    border-color: var(--resposta-nao);
    color: var(--resposta-nao);
    background: var(--nps-detrator-light);
    transform: translateY(-2px);
}

.simnao-btn[data-valor="sim"].selected {
    border-color: var(--resposta-sim);
    color: var(--fpf-white);
    background: var(--resposta-sim);
    box-shadow: 0 6px 16px rgba(22, 163, 74, 0.25);
}

.simnao-btn[data-valor="nao"].selected {
    border-color: var(--resposta-nao);
    color: var(--fpf-white);
    background: var(--resposta-nao);
    box-shadow: 0 6px 16px rgba(220, 38, 38, 0.25);
}

.simnao-btn svg {
    width: 22px;
    height: 22px;
}

/* ===========================================
   AÇÕES DO FORMULÁRIO
   =========================================== */
.form-actions {
    display: flex;
    justify-content: center;
    margin-top: 32px;
    padding: 24px 0;
}

/* ===========================================
   TELA FINAL
   =========================================== */
.thanks-card {
    background: var(--fpf-white);
    border-radius: 16px;
    padding: 60px 40px;
    text-align: center;
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--fpf-gray-200);
    border-top: 4px solid var(--fpf-blue);
}

.thanks-icon {
    width: 96px;
    height: 96px;
    margin: 0 auto 24px;
    background: linear-gradient(135deg, var(--nps-promotor) 0%, #15803d 100%);
    color: var(--fpf-white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 12px 32px rgba(22, 163, 74, 0.3);
    animation: scaleIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes scaleIn {
    from { transform: scale(0); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.thanks-card h2 {
    font-size: 28px;
    font-weight: 700;
    color: var(--fpf-blue-darker);
    margin-bottom: 14px;
    letter-spacing: -0.5px;
}

.thanks-card p {
    font-size: 16px;
    color: var(--fpf-gray-700);
    max-width: 520px;
    margin: 0 auto 28px;
    line-height: 1.7;
}

.thanks-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--nps-promotor-light);
    color: #15803d;
    padding: 10px 18px;
    border-radius: 100px;
    font-size: 13px;
    font-weight: 600;
}

/* ===========================================
   RODAPÉ
   =========================================== */
.footer {
    background: var(--fpf-blue-darker);
    color: var(--fpf-gray-300);
    padding: 32px 0;
    border-top: 3px solid var(--fpf-blue-light);
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    color: var(--fpf-white);
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.3px;
}

.footer-logo {
    height: 38px;
    width: auto;
}

.footer-info {
    text-align: right;
    font-size: 13px;
}

.footer-info p {
    margin: 0;
    line-height: 1.6;
}

.footer-small {
    font-size: 11.5px;
    color: var(--fpf-gray-500);
    margin-top: 4px !important;
}

/* ===========================================
   RESPONSIVO
   =========================================== */
@media (max-width: 768px) {
    .hero {
        height: 280px;
    }

    .hero-logo {
        max-height: 100px;
    }

    .hero-logo-fallback .fpf-sigla {
        font-size: 52px;
        letter-spacing: 6px;
    }

    .hero-logo-fallback .fpf-tagline {
        font-size: 11px;
        letter-spacing: 3px;
    }

    .welcome-header {
        flex-direction: column;
        text-align: center;
        padding: 28px 24px;
        gap: 16px;
    }

    .welcome-titles h1 {
        font-size: 26px;
    }

    .welcome-body {
        padding: 28px 24px;
    }

    .input-group {
        flex-direction: column;
    }

    .questao {
        padding: 22px 20px;
    }

    .questao-texto {
        font-size: 15px;
    }

    .nps-categorias {
        font-size: 9.5px;
    }

    .nps-escala {
        gap: 4px;
    }

    .nps-btn {
        min-height: 44px;
        font-size: 14px;
    }

    .simnao-container {
        grid-template-columns: 1fr;
    }

    .footer-container {
        flex-direction: column;
        text-align: center;
    }

    .footer-info {
        text-align: center;
    }

    .nps-legendas {
        font-size: 10.5px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }

    .main-content {
        padding: 32px 0;
    }

    .welcome-titles h1 {
        font-size: 22px;
    }

    .nps-btn {
        min-height: 38px;
        font-size: 12px;
    }

    .nps-categorias {
        font-size: 8.5px;
    }
}
