/* =========================================
   1. Variáveis & Reset (A Base)
   ========================================= */
:root {
    --azul-hospital: #007bff;     /* Azul confiável */
    --azul-escuro: #0056b3;       /* Para hover e títulos */
    --fundo-suave: #f0f4f8;       /* Cinza azulado (não cansa a vista) */
    --branco: #ffffff;
    --texto: #333333;
    --borda: #d1d9e6;
    --verde-sucesso: #28a745;
    --verde-zap: #25d366;         /* Cor oficial do WhatsApp */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--fundo-suave);
    color: var(--texto);
    line-height: 1.6;
}

/* =========================================
   2. Estrutura do Formulário (Index)
   ========================================= */
header {
    background-color: var(--azul-hospital);
    padding: 20px 0;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

header h1 {
    color: var(--branco);
    font-size: 1.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

main {
    max-width: 700px;
    margin: 40px auto;
    background: var(--branco);
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
}

/* =========================================
   3. Inputs e Fieldsets
   ========================================= */
fieldset {
    border: 1px solid var(--borda);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 25px;
    background-color: #fafbfc;
}

legend {
    font-weight: bold;
    color: var(--azul-hospital);
    padding: 0 10px;
    font-size: 1.1rem;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    margin-top: 10px;
}

/* Inputs Gerais */
input:not([type="radio"]):not([type="submit"]):not([type="reset"]),
select,
textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--borda);
    border-radius: 6px;
    font-size: 1rem;
    outline: none;
    resize: none; /* Trava o redimensionamento */
    transition: 0.3s;
    background-color: var(--branco);
}

input:focus, select:focus, textarea:focus {
    border-color: var(--azul-hospital);
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

/* Radio Buttons */
input[type="radio"] {
    margin-right: 5px;
    margin-left: 10px;
    transform: scale(1.2);
}

input[type="radio"]:first-of-type { margin-left: 0; }

input[type="radio"] + label {
    display: inline-block;
    margin-right: 15px;
    font-weight: normal;
}

/* =========================================
   4. Botões de Ação (Responsivos)
   ========================================= */
input[type="submit"], input[type="reset"] {
    width: 100%;       /* Mobile First: ocupa tudo */
    padding: 15px;
    border: none;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    font-size: 1rem;
    margin-top: 15px;
    display: block;
    transition: filter 0.3s;
}

input[type="submit"] {
    background-color: var(--verde-sucesso);
    color: var(--branco);
}

input[type="reset"] {
    background-color: #e2e6ea;
    color: #495057;
}

input[type="submit"]:hover { filter: brightness(90%); }
input[type="reset"]:hover { background-color: #dbe2ef; }

/* Versão Desktop (Lado a Lado) */
@media (min-width: 600px) {
    input[type="submit"], input[type="reset"] {
        width: 48%;
        display: inline-block;
        margin-top: 10px;
    }
    input[type="submit"] { float: right; }
    input[type="reset"] { float: left; }
}

/* Limpa o float */
form::after {
    content: "";
    display: block;
    clear: both;
}

/* =========================================
   5. Tabela de Preços
   ========================================= */
section.table { margin-top: 40px; }

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

th, td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid var(--borda);
}

th {
    background-color: var(--azul-hospital);
    color: var(--branco);
    text-transform: uppercase;
    font-size: 0.9rem;
}

tbody tr:nth-child(even) { background-color: #f8f9fa; }
tbody tr:hover { background-color: #e9ecef; }

/* =========================================
   6. Página de Sucesso (Novo!)
   ========================================= */
body.success-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    text-align: center;
}

.success-card {
    background: var(--branco);
    padding: 50px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    max-width: 500px;
    width: 90%;
    margin: 20px;
}

.icon-check {
    width: 80px;
    height: 80px;
    background-color: var(--verde-sucesso);
    color: white;
    font-size: 50px;
    border-radius: 50%;
    line-height: 80px;
    margin: 0 auto 20px auto;
}

.success-card h1 {
    color: var(--azul-hospital);
    margin-bottom: 15px;
}

.success-card p {
    color: #666;
    margin-bottom: 30px;
}

.btn-back {
    display: inline-block;
    background-color: var(--azul-hospital);
    color: white;
    padding: 12px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    transition: 0.3s;
}

.btn-back:hover {
    background-color: var(--azul-escuro);
    transform: translateY(-2px);
}

.disclaimer {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--borda);
    font-size: 0.8rem;
    color: #999;
}

.disclaimer strong { color: #ffc107; }

/* =========================================
   7. Botão WhatsApp Flutuante (Opcional mas Recomendado)
   ========================================= */
.btn-whatsapp {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: var(--verde-zap);
    color: white;
    padding: 12px 24px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    box-shadow: 2px 2px 10px rgba(0,0,0,0.2);
    z-index: 1000;
}