/* =============================================
   FAROL DA SAÚDE — CSS Global
   Paleta: Branco, Preto, Verde Saúde
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@300;400;500;600;700&family=Sora:wght@400;600;700;800&display=swap');

:root {
    --verde-escuro:  #166534;
    --verde-medio:   #16a34a;
    --verde-claro:   #22c55e;
    --verde-suave:   #dcfce7;
    --preto:         #0f172a;
    --cinza-escuro:  #1e293b;
    --cinza-medio:   #475569;
    --cinza-claro:   #f1f5f9;
    --branco:        #ffffff;
    --sombra:        0 4px 24px rgba(22,163,74,0.10);
    --sombra-forte:  0 8px 40px rgba(15,23,42,0.13);
    --radius:        14px;
    --radius-sm:     8px;
    --transition:    all 0.28s cubic-bezier(.4,0,.2,1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: 'DM Sans', sans-serif;
    background-color: #f8fafb;
    color: var(--preto);
    min-height: 100vh;
}

/* =============================================
   NAVBAR
   ============================================= */
.navbar {
    background: var(--branco);
    border-bottom: 2px solid var(--verde-suave);
    box-shadow: 0 2px 16px rgba(22,163,74,0.08);
    padding: 0.6rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar-brand {
    font-family: 'Sora', sans-serif;
    font-weight: 800;
    font-size: 1.45rem;
    color: var(--verde-escuro) !important;
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: -0.3px;
}

.navbar-brand i {
    color: var(--verde-medio);
    font-size: 1.6rem;
}

.navbar-nav .nav-link {
    font-family: 'DM Sans', sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--cinza-escuro) !important;
    padding: 0.5rem 1.1rem !important;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    letter-spacing: 0.01em;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: var(--verde-medio) !important;
    background: var(--verde-suave);
}

.navbar-nav .nav-link i {
    margin-right: 6px;
}

.navbar-toggler {
    border: 2px solid var(--verde-suave);
    padding: 0.3rem 0.6rem;
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%2316a34a' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* =============================================
   HERO / BANNER HOME
   ============================================= */
.hero {
    background: linear-gradient(135deg, var(--verde-escuro) 0%, var(--verde-medio) 60%, var(--verde-claro) 100%);
    color: var(--branco);
    padding: 5rem 0 4rem;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -60px; right: -80px;
    width: 380px; height: 380px;
    background: rgba(255,255,255,0.06);
    border-radius: 50%;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -80px; left: -60px;
    width: 280px; height: 280px;
    background: rgba(255,255,255,0.05);
    border-radius: 50%;
}

.hero-icon {
    font-size: 4.5rem;
    color: rgba(255,255,255,0.92);
    margin-bottom: 1.2rem;
    display: block;
    animation: pulseHeart 1.8s infinite;
}

@keyframes pulseHeart {
    0%, 100% { transform: scale(1); }
    50%       { transform: scale(1.08); }
}

.hero h1 {
    font-family: 'Sora', sans-serif;
    font-size: 2.8rem;
    font-weight: 800;
    margin-bottom: 1rem;
    letter-spacing: -0.5px;
}

.hero p {
    font-size: 1.15rem;
    opacity: 0.92;
    max-width: 560px;
    margin: 0 auto 2rem;
    line-height: 1.7;
}

.btn-hero {
    background: var(--branco);
    color: var(--verde-escuro);
    font-weight: 700;
    font-size: 1rem;
    padding: 0.75rem 2rem;
    border-radius: var(--radius);
    border: none;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    transition: var(--transition);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-hero:hover {
    background: var(--verde-suave);
    color: var(--verde-escuro);
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.18);
}

/* =============================================
   FEATURE CARDS (Home)
   ============================================= */
.features-section {
    padding: 4rem 0 3rem;
    background: var(--branco);
}

.section-title {
    font-family: 'Sora', sans-serif;
    font-size: 1.9rem;
    font-weight: 700;
    color: var(--preto);
    margin-bottom: 0.4rem;
}

.section-subtitle {
    color: var(--cinza-medio);
    font-size: 1rem;
    margin-bottom: 2.5rem;
}

.feature-card {
    background: var(--branco);
    border: 1.5px solid #e2e8f0;
    border-radius: var(--radius);
    padding: 2rem 1.5rem;
    text-align: center;
    transition: var(--transition);
    height: 100%;
}

.feature-card:hover {
    border-color: var(--verde-claro);
    box-shadow: var(--sombra);
    transform: translateY(-4px);
}

.feature-icon {
    width: 64px; height: 64px;
    background: var(--verde-suave);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.2rem;
    font-size: 1.7rem;
    color: var(--verde-medio);
}

.feature-card h5 {
    font-family: 'Sora', sans-serif;
    font-weight: 700;
    font-size: 1.05rem;
    margin-bottom: 0.5rem;
    color: var(--preto);
}

.feature-card p {
    font-size: 0.92rem;
    color: var(--cinza-medio);
    line-height: 1.6;
}

/* =============================================
   FORMULÁRIO
   ============================================= */
.form-section {
    padding: 3.5rem 0 4rem;
    background: var(--cinza-claro);
}

.card-form {
    background: var(--branco);
    border-radius: var(--radius);
    box-shadow: var(--sombra-forte);
    border: none;
    overflow: hidden;
}

.card-form-header {
    background: linear-gradient(90deg, var(--verde-escuro), var(--verde-medio));
    color: var(--branco);
    padding: 1.2rem 2rem;
    font-family: 'Sora', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-form-body { padding: 2rem 2.2rem; }

label {
    font-weight: 600;
    font-size: 0.88rem;
    color: var(--cinza-escuro);
    margin-bottom: 0.3rem;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.form-control, .form-select {
    border: 1.5px solid #e2e8f0;
    border-radius: var(--radius-sm);
    padding: 0.7rem 1rem;
    font-size: 0.97rem;
    color: var(--preto);
    transition: var(--transition);
    background: var(--branco);
}

.form-control:focus, .form-select:focus {
    border-color: var(--verde-medio);
    box-shadow: 0 0 0 3px rgba(34,197,94,0.18);
    outline: none;
}

/* =============================================
   BOTÕES
   ============================================= */
.btn-primary {
    background: linear-gradient(90deg, var(--verde-escuro), var(--verde-medio));
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 0.97rem;
    padding: 0.75rem 1.5rem;
    color: var(--branco);
    transition: var(--transition);
    letter-spacing: 0.02em;
}

.btn-primary:hover {
    background: linear-gradient(90deg, var(--verde-medio), var(--verde-claro));
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(22,163,74,0.3);
    color: var(--branco);
}

.btn-secondary {
    background: var(--branco);
    border: 2px solid #e2e8f0;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 0.97rem;
    padding: 0.75rem 1.5rem;
    color: var(--cinza-medio);
    transition: var(--transition);
}

.btn-secondary:hover {
    border-color: var(--verde-claro);
    color: var(--verde-escuro);
    background: var(--verde-suave);
}

.btn-danger {
    background: #fee2e2;
    border: none;
    color: #dc2626;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.85rem;
    padding: 0.4rem 0.9rem;
    transition: var(--transition);
}

.btn-danger:hover {
    background: #dc2626;
    color: var(--branco);
}

/* =============================================
   RESULTADOS
   ============================================= */
.result-section {
    padding: 3.5rem 0 4rem;
    background: var(--cinza-claro);
}

.result-card {
    background: var(--branco);
    border-radius: var(--radius);
    box-shadow: var(--sombra);
    border: none;
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.result-card-header {
    padding: 1rem 1.5rem;
    font-family: 'Sora', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.result-card-header.dados  { background: var(--cinza-claro); color: var(--cinza-escuro); }
.result-card-header.result { background: var(--verde-suave); color: var(--verde-escuro); }

.result-card-body { padding: 1.5rem; }

.dado-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.55rem 0;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.95rem;
}

.dado-item:last-child { border-bottom: none; }

.dado-label { color: var(--cinza-medio); font-weight: 500; }
.dado-valor { font-weight: 700; color: var(--preto); }

.badge-resultado {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0.35rem 0.9rem;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.03em;
}

.badge-success { background: #dcfce7; color: #166534; }
.badge-warning { background: #fef9c3; color: #854d0e; }
.badge-danger  { background: #fee2e2; color: #991b1b; }
.badge-normal  { background: #dbeafe; color: #1e40af; }

.situacao-box {
    border-radius: var(--radius);
    padding: 1.5rem;
    text-align: center;
    margin-top: 1rem;
}

.situacao-box.success { background: #dcfce7; border: 2px solid #86efac; }
.situacao-box.warning { background: #fef9c3; border: 2px solid #fde047; }
.situacao-box.danger  { background: #fee2e2; border: 2px solid #fca5a5; }

.situacao-box .situacao-icon { font-size: 2.5rem; margin-bottom: 0.5rem; }
.situacao-box .situacao-titulo {
    font-family: 'Sora', sans-serif;
    font-size: 1.4rem;
    font-weight: 800;
}

/* =============================================
   HISTÓRICO (TABELA)
   ============================================= */
.historico-section { padding: 3.5rem 0 4rem; }

.table-card {
    background: var(--branco);
    border-radius: var(--radius);
    box-shadow: var(--sombra);
    overflow: hidden;
    border: none;
}

.table-card-header {
    background: linear-gradient(90deg, var(--verde-escuro), var(--verde-medio));
    color: var(--branco);
    padding: 1.2rem 1.8rem;
    font-family: 'Sora', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.table { margin: 0; }

.table thead th {
    background: var(--cinza-claro);
    color: var(--cinza-escuro);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    border: none;
    padding: 0.9rem 1rem;
}

.table tbody tr { transition: var(--transition); }
.table tbody tr:hover { background: var(--verde-suave); }

.table tbody td {
    vertical-align: middle;
    font-size: 0.93rem;
    border-color: #f1f5f9;
    padding: 0.85rem 1rem;
}

/* =============================================
   SOBRE / DESCRIÇÃO
   ============================================= */
.sobre-section { padding: 4rem 0; background: var(--branco); }

.sobre-card {
    background: var(--cinza-claro);
    border-radius: var(--radius);
    padding: 2.5rem;
    border-left: 5px solid var(--verde-medio);
}

.sobre-card p {
    font-size: 1rem;
    color: var(--cinza-escuro);
    line-height: 1.8;
    margin-bottom: 1rem;
}

.sobre-card p:last-child { margin-bottom: 0; }

.disclaimer {
    background: #fef9c3;
    border: 1.5px solid #fde047;
    border-radius: var(--radius-sm);
    padding: 1rem 1.2rem;
    font-size: 0.9rem;
    color: #854d0e;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 1.5rem;
}

/* =============================================
   FOOTER
   ============================================= */
footer {
    background: var(--preto);
    color: rgba(255,255,255,0.6);
    text-align: center;
    padding: 1.8rem 1rem;
    font-size: 0.88rem;
}

footer span { color: var(--verde-claro); font-weight: 700; }

/* =============================================
   RESPONSIVO
   ============================================= */
@media (max-width: 768px) {
    .hero h1 { font-size: 2rem; }
    .hero p  { font-size: 1rem; }
    .card-form-body { padding: 1.2rem 1rem; }
    .table-responsive { font-size: 0.82rem; }
    .section-title { font-size: 1.5rem; }
}