/* ===== VARIÁVEIS DE COR ===== */
:root {
    --cor-primaria: #212529;
    --cor-secundaria: #495057;
    --cor-acento: #FF6F61;
    --cor-sucesso: #00A896;
    --cor-alerta: #D90429;
    --cor-warning: #ffc107;
    --fundo-claro: #F8F9FA;
    --texto-principal: #343a40;
    --texto-secundario: #666;
    --branco: #ffffff;
    --cinza-claro: #e0e0e0;
    --cinza-medio: #f0f0f0;
}

/* ===== RESET E BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: var(--fundo-claro);
    min-height: 100vh;
    padding: 20px;
    color: var(--texto-principal);
    line-height: 1.6;
}

/* ===== CONTAINER PRINCIPAL ===== */
.container {
    background: var(--branco);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.1);
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px;
    animation: slideIn 0.5s ease-out;
}

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

/* ===== TIPOGRAFIA ===== */
h1 {
    color: var(--cor-primaria);
    margin-bottom: 10px;
    font-size: 2.5em;
    text-align: center;
    background: linear-gradient(135deg, var(--cor-secundaria) 0%, var(--cor-primaria) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    text-align: center;
    color: var(--texto-secundario);
    margin-bottom: 30px;
    font-size: 1.1em;
}

/* ===== DISCLAIMER ===== */
.disclaimer {
    background: #fff3cd;
    border-left: 4px solid var(--cor-warning);
    padding: 15px;
    margin-bottom: 30px;
    border-radius: 5px;
    color: #856404;
}

/* ===== FORMULÁRIO ===== */
.form-section {
    margin-bottom: 30px;
}

.form-section h3 {
    color: var(--cor-primaria);
    margin-bottom: 20px;
    font-size: 1.3em;
    display: flex;
    align-items: center;
}

.form-section h3::before {
    content: '✓';
    display: inline-block;
    width: 25px;
    height: 25px;
    background: linear-gradient(135deg, var(--cor-secundaria), var(--cor-primaria));
    color: var(--branco);
    border-radius: 50%;
    text-align: center;
    line-height: 25px;
    margin-right: 10px;
    font-size: 0.8em;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

label {
    color: var(--texto-principal);
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 0.95em;
}

input, select {
    padding: 12px;
    border: 2px solid var(--cinza-claro);
    border-radius: 8px;
    font-size: 1em;
    transition: all 0.3s;
    background: var(--branco);
}

input:focus, select:focus {
    outline: none;
    border-color: var(--cor-acento);
    box-shadow: 0 0 0 3px rgba(255, 111, 97, 0.2);
}

.radio-group {
    display: flex;
    gap: 20px;
    padding: 10px 0;
}

.radio-option {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.radio-option input[type="radio"] {
    margin-right: 8px;
    cursor: pointer;
}

.required {
    color: var(--cor-alerta);
}

/* ===== BOTÃO PRINCIPAL ===== */
.btn-calculate {
    background: var(--cor-acento);
    color: var(--branco);
    border: none;
    padding: 15px 40px;
    font-size: 1.2em;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s;
    display: block;
    margin: 40px auto 0;
    box-shadow: 0 4px 15px rgba(255, 111, 97, 0.3);
}

.btn-calculate:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 111, 97, 0.4);
}

/* ===== SEÇÃO DE RESULTADOS ===== */
.results {
    display: none;
    margin-top: 40px;
    animation: fadeIn 0.5s ease-out;
}

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

/* ===== COMPARAÇÃO PRINCIPAL DE RISCO ===== */
.main-risk-comparison {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 20px;
    padding: 40px;
    margin-bottom: 30px;
    text-align: center;
}

.main-risk-comparison h2 {
    color: #333;
    margin-bottom: 30px;
    font-size: 2em;
}

.risk-display {
    display: flex;
    justify-content: space-around;
    align-items: center;
    margin: 30px 0;
    flex-wrap: wrap;
    gap: 30px;
}

.risk-box {
    background: var(--branco);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    min-width: 200px;
    transition: transform 0.3s ease;
}

.risk-box.highlight {
    transform: scale(1.1);
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}

.risk-label {
    color: var(--texto-secundario);
    font-size: 0.9em;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.risk-percentage {
    font-size: 3em;
    font-weight: bold;
    margin: 10px 0;
}

.risk-actual {
    color: var(--cor-acento);
}

.risk-ideal {
    color: var(--cor-sucesso);
}

.risk-comparison-text {
    font-size: 1.5em;
    font-weight: bold;
    margin: 30px 0;
    padding: 20px;
    background: var(--branco);
    border-radius: 10px;
}

.times-higher {
    color: var(--cor-alerta);
    font-size: 1.2em;
}

.times-lower {
    color: var(--cor-sucesso);
    font-size: 1.2em;
}

/* ===== INFORMAÇÕES SECUNDÁRIAS ===== */
.secondary-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.info-card {
    background: var(--branco);
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.info-card:hover {
    transform: translateY(-2px);
}

.info-card-label {
    color: var(--texto-secundario);
    font-size: 0.9em;
    margin-bottom: 8px;
}

.info-card-value {
    font-size: 1.8em;
    font-weight: bold;
    color: #333;
}

.idade-coracao-value {
    color: var(--cor-acento);
}

/* ===== ANÁLISE DETALHADA ===== */
.detailed-analysis {
    background: var(--branco);
    border-radius: 15px;
    padding: 30px;
    margin: 30px 0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.detailed-analysis h3 {
    color: var(--cor-primaria);
    margin-bottom: 20px;
    font-size: 1.5em;
    text-align: center;
}

.analysis-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.analysis-table th {
    background: linear-gradient(135deg, var(--cor-secundaria), var(--cor-primaria));
    color: var(--branco);
    padding: 15px;
    text-align: left;
    font-weight: 600;
}

.analysis-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
}

.analysis-table tr:hover {
    background: var(--fundo-claro);
}

.analysis-table .factor-name {
    font-weight: 500;
    color: #333;
}

.analysis-table .actual-value {
    color: var(--texto-secundario);
    font-weight: 500;
}

.analysis-table .ideal-value {
    color: var(--cor-sucesso);
    font-weight: 500;
}

.analysis-table .points {
    font-weight: bold;
    font-size: 1.1em;
    text-align: center;
}

.points-positive {
    color: var(--cor-alerta);
}

.points-negative {
    color: var(--cor-sucesso);
}

.points-neutral {
    color: var(--texto-secundario);
}

.difference-cell {
    font-weight: bold;
    text-align: center;
}

.difference-worse {
    color: var(--cor-alerta);
}

.difference-better {
    color: var(--cor-sucesso);
}

.difference-same {
    color: var(--texto-secundario);
}

.total-row {
    background: var(--cinza-medio);
    font-weight: bold;
}

.total-row td {
    padding: 15px;
    border-top: 2px solid var(--cor-primaria);
    border-bottom: none;
    font-size: 1.1em;
}

/* ===== COMPARAÇÃO VISUAL ===== */
.visual-comparison {
    background: var(--branco);
    border-radius: 15px;
    padding: 30px;
    margin: 30px 0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.visual-comparison h3 {
    color: var(--cor-primaria);
    margin-bottom: 30px;
    text-align: center;
    font-size: 1.5em;
}

.bar-chart {
    display: flex;
    justify-content: space-around;
    align-items: flex-end;
    height: 300px;
    padding: 20px;
    border-left: 2px solid #ddd;
    border-bottom: 2px solid #ddd;
    position: relative;
}

.bar-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    max-width: 150px;
}

.bar {
    width: 80px;
    border-radius: 5px 5px 0 0;
    transition: all 0.5s ease;
    position: relative;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.bar-value {
    position: absolute;
    top: -30px;
    font-weight: bold;
    font-size: 1.3em;
}

.bar-label {
    margin-top: 15px;
    font-weight: 500;
    text-align: center;
    color: var(--texto-secundario);
}

.bar.ideal {
    background: var(--cor-sucesso);
}

.bar.actual {
    background: var(--cor-acento);
}

/* ===== RECOMENDAÇÕES ===== */
.recommendations {
    margin-top: 30px;
    padding: 25px;
    background: var(--branco);
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.recommendations h3 {
    color: var(--cor-primaria);
    margin-bottom: 20px;
    font-size: 1.3em;
}

.recommendations ul {
    list-style: none;
    padding: 0;
}

.recommendations li {
    padding: 12px 0;
    border-bottom: 1px solid var(--cinza-medio);
    display: flex;
    align-items: flex-start;
    position: relative;
    padding-left: 30px;
}

.recommendations li:last-child {
    border-bottom: none;
}

.recommendations li::before {
    content: '✓';
    position: absolute;
    left: 0;
    top: 12px;
    width: 18px;
    height: 18px;
    background: var(--cor-sucesso);
    color: var(--branco);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8em;
    font-weight: bold;
}

/* ===== CTA SAÚDE 360 ===== */
.cta-saude360 {
    margin-top: 40px;
    padding: 40px;
    background: linear-gradient(135deg, #f5f7fa 0%, #e0e8f0 100%);
    border: 1px solid #d1d9e6;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

.cta-saude360 h3 {
    font-size: 1.8em;
    color: var(--cor-primaria);
    margin-bottom: 15px;
}

.cta-saude360 .cta-subtitle {
    font-size: 1.1em;
    color: var(--texto-secundario);
    max-width: 700px;
    margin: 0 auto 25px;
}

.cta-benefits {
    text-align: left;
    max-width: 600px;
    margin: 0 auto 30px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    font-size: 1.05em;
    color: #333;
}

.cta-benefits div {
    display: flex;
    align-items: center;
    gap: 10px;
}

.cta-button-main {
    background: var(--cor-sucesso);
    color: var(--branco);
    padding: 18px 45px;
    border-radius: 50px;
    text-decoration: none;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    font-weight: 600;
    font-size: 1.2em;
    transition: all 0.3s ease;
    box-shadow: 0 5px 20px rgba(0, 168, 150, 0.3);
}

.cta-button-main:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 8px 25px rgba(0, 168, 150, 0.4);
}

.cta-button-main small {
    font-size: 0.6em;
    opacity: 0.9;
    margin-top: 5px;
    font-weight: 400;
}

/* ===== RESPONSIVIDADE ===== */
@media (max-width: 768px) {
    .container {
        padding: 20px;
        margin: 10px;
    }
    
    h1 {
        font-size: 1.8em;
    }
    
    .risk-percentage {
        font-size: 2em;
    }

    .risk-box {
        min-width: 150px;
        padding: 20px;
    }

    .analysis-table {
        font-size: 0.85em;
    }

    .analysis-table th,
    .analysis-table td {
        padding: 8px;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .secondary-info {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .bar-chart {
        height: 250px;
        padding: 15px;
    }

    .bar {
        width: 60px;
    }

    .cta-benefits {
        text-align: center;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }

    .container {
        padding: 15px;
    }

    h1 {
        font-size: 1.5em;
    }

    .subtitle {
        font-size: 1em;
    }

    .secondary-info {
        grid-template-columns: 1fr;
    }

    .risk-display {
        flex-direction: column;
        gap: 20px;
    }

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

    .cta-button-main {
        padding: 15px 30px;
        font-size: 1.1em;
    }
}

/* ===== ACESSIBILIDADE ===== */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ===== IMPRESSÃO ===== */
@media print {
    body {
        background: var(--branco);
        padding: 0;
    }

    .container {
        box-shadow: none;
        border-radius: 0;
        padding: 20px;
    }

    .cta-saude360 {
        display: none;
    }

    .btn-calculate {
        display: none;
    }

    .recommendations li::before {
        background: #000 !important;
        -webkit-print-color-adjust: exact;
    }
}