/* estilos imc.html - versão corrigida e responsiva */
:root {
    --primary-color: #3b82f6;
    --primary-hover: #2563eb;
    --text-primary: #1f2937;
    --text-secondary: #4b5563;
    --card-bg: #ffffff;
    --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --border-radius: 12px;
}

* {
    box-sizing: border-box;
}

html {
    width: 100%;
    min-height: 100%;
    overflow-x: hidden;
}

body {
    margin: 0;
    min-height: 115vh;
    overflow-x: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--text-primary);
    line-height: 1.5;
    background-image: url(../img/cg2.jpg);
    background-size: cover;
    background-position: top center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

body.imc-page::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    background: rgba(0, 0, 0, 0.22);
    pointer-events: none;
}

.page-container {
    width: min(100% - 2rem, 1200px);
    margin: 0 auto;
    padding: clamp(1rem, 3vw, 2rem) 0;
}

.header {
    text-align: center;
    padding-top: 50px;
    margin-bottom: clamp(1.5rem, 5vw, 3rem);
}

.icon {
    display: flex;
    justify-content: center;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.header h1 {
    margin: 0 0 1rem;
    color: #ffffff;
    font-size: clamp(1.9rem, 5vw, 2.5rem);
    line-height: 1.1;
    text-wrap: balance;
}

.header p {
    max-width: 36rem;
    margin: 0 auto;
    color: #ffffff;
    font-size: clamp(0.95rem, 2.8vw, 1rem);
}

.content {
    display: grid;
    grid-template-columns: 1fr;
    gap: clamp(1rem, 3vw, 2rem);
    margin-bottom: clamp(1rem, 3vw, 2rem);
}

.card {
    min-width: 0;
    background: var(--card-bg);
    border: 0;
    border-radius: var(--border-radius);
    padding: clamp(1.25rem, 3vw, 2rem);
    box-shadow: var(--card-shadow);
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    min-height: 44px;
    padding: 0.75rem 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.btn-calculate,
.promo-btn {
    min-height: 44px;
}

.btn-calculate {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 0.875rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-calculate:hover,
.btn-calculate:focus-visible {
    background-color: var(--primary-hover);
}

.result-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

.result-header h2 {
    margin: 0;
    color: var(--text-primary);
    font-size: 1.25rem;
}

.empty-state {
    text-align: center;
    color: var(--text-secondary);
    padding: 2rem 0;
}

.bmi-value {
    text-align: center;
    margin-bottom: 1.5rem;
}

.bmi-number {
    margin-bottom: 0.5rem;
    color: var(--primary-color);
    font-size: clamp(2.25rem, 12vw, 3rem);
    font-weight: 700;
    line-height: 1;
    overflow-wrap: anywhere;
}

.bmi-label {
    color: var(--text-secondary);
}

.result-details {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.result-item {
    min-width: 0;
    background-color: #f3f4f6;
    padding: 1rem;
    border-radius: 8px;
}

.result-item p {
    overflow-wrap: anywhere;
}

.result-item p:first-child {
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.result-item p:last-child {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 0;
}

.info-section {
    margin-top: clamp(1rem, 3vw, 2rem);
}

.info-section h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.info-section p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.info-section p:last-child {
    margin-bottom: 0;
}

.promo-modal-content {
    border-radius: 18px;
    overflow: hidden;
    border: 0;
}

.promo-modal-content .modal-body img {
    display: block;
    width: 100%;
    max-height: 48vh;
    object-fit: contain;
    background: #ffffff;
}

.promo-modal-close {
    position: absolute;
    right: 14px;
    top: 14px;
    z-index: 10;
    background-color: rgba(255, 255, 255, .85);
    border-radius: 999px;
    padding: 10px;
}

@media (min-width: 768px) {
    .content {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767.98px) {
    body {
        background-attachment: scroll;
        background-position: top center;
    }

    .page-container {
        width: min(100% - 1.5rem, 1200px);
        padding: 1rem 0 1.25rem;
    }

    .header {
        margin-bottom: 1.5rem;
    }

    .icon svg {
        width: 40px;
        height: 40px;
    }

    .content {
        gap: 1rem;
    }

    .card {
        padding: 1.25rem;
    }

    .empty-state {
        padding: 1rem 0;
    }

    .modal-dialog {
        margin: 0.75rem;
    }

    .promo-modal-content {
        border-radius: 14px;
    }

    .promo-modal-content .modal-body img {
        max-height: 36vh;
    }

    .promo-btn {
        width: 100%;
    }
}

@media (max-width: 360px) {
    .page-container {
        width: min(100% - 1rem, 1200px);
    }

    .card {
        padding: 1rem;
    }

    .btn-calculate {
        padding-inline: 0.75rem;
    }
}
