/* =========================================================
   Calculadoras nutricionais
   ========================================================= */
.calculator-section {
    position: relative;
    background: var(--paper);
    overflow: hidden;
}

.calculator-section::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle at 1px 1px, rgba(20, 34, 25, 0.13) 1px, transparent 0);
    background-size: 26px 26px;
    -webkit-mask-image: radial-gradient(ellipse 70% 55% at 50% 0%, #000 0%, transparent 70%);
    mask-image: radial-gradient(ellipse 70% 55% at 50% 0%, #000 0%, transparent 70%);
    opacity: 0.5;
    pointer-events: none;
}

.calculator-section .container {
    position: relative;
    z-index: 1;
    max-width: 900px;
}

.calculator-section h1 {
    font-size: clamp(36px, 5vw, 62px);
    max-width: 16ch;
}

.calculator-subtitle {
    margin: 18px 0 40px;
    font-family: var(--display);
    font-size: clamp(19px, 1.9vw, 24px);
    font-style: italic;
    font-weight: 400;
    color: var(--leaf-deep);
    max-width: 50ch;
}

/* Caixa da calculadora */
.calculator-box {
    display: flex;
    flex-wrap: wrap;
    background: var(--paper-card);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.calculator-inputs {
    flex: 1 1 340px;
    padding: 38px 34px;
}

.input-group {
    margin-bottom: 22px;
}

.input-group label {
    display: block;
    margin-bottom: 9px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.13em;
    text-transform: uppercase;
    color: var(--ink-soft);
}

.input-group input,
.input-group select {
    width: 100%;
    min-height: 54px;
    padding: 14px 16px;
    font-family: var(--sans);
    font-size: 16px;
    color: var(--ink);
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 12px;
    transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease), background 0.3s var(--ease);
    appearance: none;
    -webkit-appearance: none;
}

.input-group select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%235E6E63' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 12px;
    padding-right: 42px;
}

.input-group input:focus,
.input-group select:focus {
    outline: none;
    background: var(--paper-card);
    border-color: var(--leaf-deep);
    box-shadow: 0 0 0 4px rgba(93, 168, 64, 0.16);
}

.input-group input::placeholder {
    color: rgba(20, 34, 25, 0.34);
}

/* Botão calcular */
.calc-button {
    width: 100%;
    min-height: 56px;
    margin-top: 8px;
    padding: 16px 26px;
    border-radius: 999px;
    background: var(--forest);
    color: var(--paper);
    font-family: var(--sans);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.04em;
    transition: var(--transition);
}

.calc-button:hover {
    background: var(--apricot);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Resultado */
.calculator-result {
    flex: 1 1 320px;
    padding: 38px 34px;
    background:
        radial-gradient(90% 120% at 100% 0%, #23553D 0%, transparent 62%),
        linear-gradient(150deg, #1D4433 0%, #122C20 100%);
    color: var(--paper);
    animation: riseIn 0.6s var(--ease) both;
}

.calculator-result h3,
.calculator-result .result-label {
    font-family: var(--sans);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--apricot-2);
    margin-bottom: 14px;
}

.result-value {
    font-family: var(--display);
    font-size: clamp(46px, 7vw, 72px);
    font-weight: 500;
    line-height: 1;
    letter-spacing: -0.03em;
    color: var(--paper);
}

.result-classification {
    margin-top: 14px;
    padding: 9px 17px;
    display: inline-block;
    border-radius: 999px;
    background: rgba(250, 245, 236, 0.12);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: var(--paper);
}

.result-description {
    margin-top: 18px;
    font-size: 16px;
    line-height: 1.68;
    color: rgba(250, 245, 236, 0.8);
}

.water-tips {
    margin-top: 22px;
    padding-top: 20px;
    border-top: 1px solid var(--line-light);
    font-size: 15.5px;
    line-height: 1.7;
    color: rgba(250, 245, 236, 0.8);
}

.water-tips strong {
    color: var(--paper);
}

/* Bloco de CTA dentro do conteúdo */
.seo-cta {
    margin: 40px 0 8px;
    padding: 40px 34px;
    border-radius: var(--radius-lg);
    text-align: center;
}

.seo-content .seo-cta h3 {
    color: var(--paper);
    font-size: clamp(23px, 2.4vw, 32px);
    margin-bottom: 12px;
}

.seo-content .seo-cta p {
    max-width: 48ch;
    margin: 0 auto 26px;
    color: rgba(250, 245, 236, 0.8);
}

.seo-content .seo-cta .cta-button {
    background: var(--paper);
    color: var(--forest);
}

.seo-cta .cta-button .btn-icon {
    filter: none;
}

.seo-cta .cta-button:hover .btn-icon {
    filter: invert(1);
}

/* Fórmula */
.formula-box {
    margin-top: 26px;
    padding: 26px 28px;
    background: var(--paper-2);
    border: 1px dashed var(--line-strong);
    border-radius: var(--radius);
}

.formula-box h3 {
    font-family: var(--sans);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--leaf-deep);
    margin-bottom: 12px;
}

.formula-box p {
    font-family: var(--display);
    font-size: 19px;
    line-height: 1.6;
    color: var(--ink);
}

/* Tabela do IMC */
.imc-table {
    margin-top: 34px;
}

.imc-table h2 {
    margin-bottom: 18px;
    font-size: 22px;
}

.imc-table table {
    width: 100%;
    border-collapse: collapse;
    background: var(--paper-card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
}

.imc-table caption {
    caption-side: top;
    text-align: left;
    padding-bottom: 14px;
    font-size: 14px;
    color: var(--ink-soft);
}

.imc-table th,
.imc-table td {
    border: 0;
    background: transparent;
    padding: 15px 22px;
    text-align: left;
    font-size: 16px;
}

.imc-table thead th {
    background: var(--forest);
    color: var(--paper);
    font-family: var(--sans);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.imc-table tbody tr {
    border-bottom: 1px solid var(--line);
}

.imc-table tbody tr:last-child {
    border-bottom: 0;
}

.imc-table tbody tr:hover {
    background: var(--paper-2);
}

.imc-table tbody td:first-child {
    font-family: var(--display);
    font-size: 18px;
    color: var(--forest);
}

/* Conteúdo SEO */
.seo-content {
    background: var(--paper-2);
}

.seo-content .container {
    max-width: 860px;
}

.seo-content h2 {
    margin: 46px 0 20px;
    font-size: clamp(26px, 3vw, 38px);
    max-width: 22ch;
}

.seo-content h2:first-child {
    margin-top: 0;
}

.seo-content h3 {
    margin: 30px 0 12px;
}

.seo-content p {
    font-size: 17px;
    line-height: 1.8;
    color: var(--ink-2);
    margin-bottom: 18px;
}

.seo-list {
    margin: 0 0 24px;
}

.seo-list li {
    position: relative;
    padding: 10px 0 10px 30px;
    font-size: 16.5px;
    line-height: 1.65;
    color: var(--ink-2);
    border-bottom: 1px solid var(--line);
}

.seo-list li::before {
    content: "";
    position: absolute;
    left: 4px;
    top: 20px;
    width: 8px;
    height: 8px;
    border-radius: 60% 0 60% 0;
    background: var(--leaf);
}

.seo-content a {
    color: var(--leaf-deep);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.seo-content a:hover {
    color: var(--apricot-texto);
}

/* Responsivo */

@media (max-width: 640px) {
    .calculator-inputs,
    .calculator-result {
        padding: 30px 24px;
    }

    /* Cada linha da tabela vira um cartão */
    .imc-table table {
        border: 0;
        background: transparent;
    }

    .imc-table caption {
        display: none;
    }

    .imc-table thead {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        white-space: nowrap;
    }

    .imc-table table,
    .imc-table tbody,
    .imc-table tr,
    .imc-table th,
    .imc-table td {
        display: block;
        width: auto;
    }

    .imc-table tbody tr {
        background: var(--paper-card);
        border: 1px solid var(--line);
        border-radius: 14px;
        padding: 4px 20px 18px;
        margin-bottom: 12px;
    }

    .imc-table tbody th,
    .imc-table tbody td {
        border: 0;
        background: transparent;
        padding: 15px 0 0;
        text-align: left;
    }

    .imc-table tbody td::before {
        content: attr(data-rotulo);
        display: block;
        margin-bottom: 4px;
        font-size: 11px;
        font-weight: 700;
        letter-spacing: 0.14em;
        text-transform: uppercase;
        color: var(--ink-soft);
    }

    .imc-table tbody td:first-child {
        border-bottom: 1px solid var(--line);
        padding-bottom: 14px;
    }
}
