:root {
    --primary-color: #1d3557;
    --secondary-color: #2a9d8f;
    --accent-color: #e63946;
    --bg-color: #f4f4f4;
    --card-bg: #ffffff;
    --text-color: #333333;
    --light-gray: #f8f9fa;
    --border-color: #e0e0e0;
}

body {
    font-family: 'Arial', sans-serif;
    background-color: var(--bg-color);
    margin: 0;
    padding: 0;
    color: var(--text-color);
}

/* Header & Navbar PWA Style */
header {
    background-color: var(--primary-color);
    color: white;
    padding: 0 20px;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.navbar-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
}

header h1 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 20px;
    margin: 0;
    padding: 0;
}

.nav-links li a {
    color: white;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    opacity: 0.9;
    transition: opacity 0.3s;
}

.nav-links li a:hover,
.nav-links li a.active {
    opacity: 1;
    text-decoration: underline;
    text-underline-offset: 5px;
}

.hamburger-menu {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Mobile Navbar */
@media (max-width: 768px) {
    .hamburger-menu {
        display: block;
    }

    .nav-links {
        position: absolute;
        top: 60px;
        left: 0;
        width: 100%;
        background-color: var(--primary-color);
        flex-direction: column;
        align-items: center;
        gap: 0;
        overflow: hidden;
        max-height: 0;
        transition: max-height 0.3s ease-in-out;
        box-shadow: 0 5px 5px rgba(0, 0, 0, 0.1);
    }

    .nav-links.open {
        max-height: 300px;
    }

    .nav-links li {
        width: 100%;
        text-align: center;
    }

    .nav-links li a {
        display: block;
        padding: 15px;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }
}

/* Main Container */
main {
    padding: 10px;
    max-width: 800px;
    margin: 0 auto;
}

/* --- User Provided Styles Adapted to Variables --- */

.salario-calculadora-container {
    width: 100%;
    margin: 20px auto;
    padding: 0;
    /* Adjusted for mobile fit */
}

.salario-calculadora,
.comentarios-container {
    background-color: var(--card-bg);
    padding: 25px 30px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.salario-calculadora h2,
.comentarios-container h3 {
    text-align: center;
    margin-top: 0;
    color: var(--primary-color);
    padding-bottom: 10px;
    border-bottom: 2px solid var(--secondary-color);
}

/* FORMULÁRIO */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-weight: bold;
    color: var(--primary-color);
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group input[type="month"],
.form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1.1em;
    box-sizing: border-box;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-top: 5px;
}

.checkbox-group input[type="checkbox"] {
    -webkit-appearance: checkbox !important;
    appearance: checkbox !important;
    display: inline-block !important;
    opacity: 1 !important;
    width: auto !important;
}

.checkbox-group label {
    margin-bottom: 0;
    font-weight: normal;
}

/* SUB-CALCULADORA DE VARIÁVEIS */
.sub-calculadora {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    margin-top: 25px;
    background-color: var(--light-gray);
}

.sub-calculadora h4 {
    margin-top: 0;
    color: var(--secondary-color);
    text-align: center;
}

.resultado-variaveis {
    margin-top: 15px;
}

.resultado-variaveis table {
    width: 100%;
    border-collapse: collapse;
}

.resultado-variaveis td {
    padding: 8px;
    border-bottom: 1px solid #ddd;
}

.resultado-variaveis .total-variaveis {
    font-weight: bold;
    background-color: #e0f2f1;
    color: var(--primary-color);
}

/* BOTÕES E RESULTADOS */
.btn-calcular {
    width: 100%;
    padding: 15px;
    font-size: 1.2em;
    font-weight: bold;
    color: #fff;
    background-color: var(--secondary-color);
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
    margin-top: 10px;
}

.btn-calcular:hover {
    filter: brightness(1.1);
}

.btn-calcular.sub {
    background-color: var(--primary-color);
    margin-top: 20px;
}

.resultado-salario {
    margin-top: 30px;
    border-top: 2px solid var(--secondary-color);
    padding-top: 20px;
}

.resultado-salario table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.resultado-salario td {
    padding: 12px;
    border-bottom: 1px solid #eee;
}

.resultado-salario .label {
    font-weight: bold;
}

.resultado-salario .valor-positivo {
    color: #006400;
}

.resultado-salario .valor-negativo {
    color: #c62828;
}

.salario-liquido-final {
    background-color: #e8f5e9;
    font-size: 1.3em;
    font-weight: bold;
    color: var(--primary-color);
}

.memoria-calculo {
    margin-top: 25px;
    padding: 20px;
    background-color: var(--light-gray);
    border-radius: 8px;
    border-left: 4px solid var(--secondary-color);
}

.memoria-calculo h4 {
    margin-top: 0;
    color: var(--primary-color);
}

.memoria-calculo p {
    margin: 8px 0;
    font-size: 0.95em;
    line-height: 1.6;
    text-align: left;
}

.memoria-calculo small {
    display: block;
    text-align: center;
    margin-top: 15px;
    color: #777;
}

.badge-ano {
    background-color: var(--accent-color);
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.7em;
    vertical-align: middle;
    margin-left: 5px;
}

.highlight-isento {
    color: var(--secondary-color);
    font-weight: bold;
}

/* Estilos para Tooltips de Ajuda */
.tooltip-icon {
    display: inline-block;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background-color: #ccc;
    color: #fff;
    text-align: center;
    font-size: 12px;
    line-height: 18px;
    font-weight: bold;
    cursor: help;
    position: relative;
}

.tooltip-text {
    visibility: hidden;
    width: 280px;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 10px;
    position: absolute;
    z-index: 10;
    bottom: 140%;
    left: 50%;
    margin-left: -140px;
    opacity: 0;
    transition: opacity 0.3s;
    font-weight: normal;
    font-size: 14px;
    line-height: 1.4;
}

.tooltip-icon:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* --- LEGACY CSS OVERRIDES FOR RESCISAO --- */
.input-group {
    background-color: #fcfcfc;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 25px;
    margin-bottom: 25px;
}

.input-group h3 {
    margin-top: 0;
    font-size: 1.3em;
    color: var(--secondary-color);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* CHECKBOX */
.checkbox-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
    padding: 15px;
    background: #e0f2f1;
    border-radius: 8px;
    border: 1px solid #b2dfdb;
}

.checkbox-group input[type="checkbox"] {
    appearance: none;
    display: none !important;
}

.checkbox-group {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.checkbox-group label {
    position: relative;
    padding-left: 55px;
    cursor: pointer;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0 !important;
    display: inline-block;
    line-height: 24px;
    transition: color 0.3s;
}

.checkbox-group label::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 44px;
    height: 24px;
    background-color: #ccc;
    border-radius: 50px;
    transition: background-color 0.3s ease;
}

.checkbox-group label::after {
    content: '';
    position: absolute;
    left: 3px;
    top: 3px;
    width: 18px;
    height: 18px;
    background-color: white;
    border-radius: 50%;
    transition: transform 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.checkbox-group input[type="checkbox"]:checked+label::before {
    background-color: var(--secondary-color);
}

.checkbox-group input[type="checkbox"]:checked+label::after {
    transform: translateX(20px);
}

.checkbox-group input[type="checkbox"]:checked+label {
    color: var(--secondary-color);
}

.btn-pdf {
    width: 100%;
    padding: 12px;
    background-color: var(--accent-color);
    color: white;
    border: none;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
    margin-top: 15px;
    display: none;
}

.btn-pdf:hover {
    background-color: #c92a37;
}

/* RESULTADOS */
.resultado-rescisao {
    margin-top: 40px;
    border-top: 2px solid var(--secondary-color);
    padding-top: 20px;
    animation: fadeIn 0.5s;
}

.resultado-rescisao table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 10px;
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
}

.resultado-rescisao td {
    padding: 15px;
    border-bottom: 1px solid #eee;
    font-size: 0.95em;
}

.resultado-rescisao tr:last-child td {
    border-bottom: none;
}

.resultado-rescisao .label {
    font-weight: 600;
    color: #333;
}

.resultado-rescisao .valor {
    text-align: right;
    font-family: 'Consolas', monospace;
    font-size: 1.1em;
    color: var(--secondary-color);
    font-weight: bold;
}

.resultado-rescisao .desconto {
    text-align: right;
    font-family: 'Consolas', monospace;
    font-size: 1.1em;
    color: var(--accent-color);
}

.rescisao-subtotal {
    background-color: #f8f9fa;
    font-weight: bold;
    border-top: 2px solid #dee2e6;
}

.rescisao-subtotal td {
    color: #495057;
    font-size: 1em;
}

.rescisao-final {
    font-size: 1.2em;
    font-weight: bold;
    color: var(--primary-color);
    background-color: #e3f2fd;
    border-top: 2px solid var(--primary-color);
}

.rescisao-final.total-geral {
    background-color: var(--primary-color) !important;
    color: #ffffff !important;
    font-size: 1.4em;
}

.rescisao-final.total-geral td,
.rescisao-final.total-geral .label,
.rescisao-final.total-geral .valor {
    color: #ffffff !important;
}

.sub-header {
    background-color: #f1f3f5;
    font-weight: bold;
    color: #457b9d;
    text-transform: uppercase;
    font-size: 0.9em;
    letter-spacing: 1px;
    border-bottom: 2px solid #ccc;
}

.memoria-calculo-wrapper {
    margin-top: 30px;
}

.memoria-block {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px dashed #ccc;
}

.memoria-block h5 {
    margin: 0 0 10px 0;
    color: #457b9d;
    font-size: 1.1em;
}

.memoria-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.explicacao-legal {
    font-size: 0.85em;
    background-color: #fff3cd;
    color: #856404;
    padding: 8px;
    border-radius: 4px;
    margin-top: 5px;
    line-height: 1.4;
    border-left: 3px solid #ffc107;
}

.badge-ir {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: bold;
    color: white;
}

.badge-ir.simplificado {
    background-color: var(--secondary-color);
}

.badge-ir.legal {
    background-color: #457b9d;
}

.alert-intermitente {
    display: none;
    background-color: #fff3cd;
    color: #856404;
    padding: 15px;
    border-radius: 5px;
    margin-top: 10px;
    font-size: 0.95em;
    border: 1px solid #ffeeba;
    border-left: 5px solid #ffc107;
}

.badge-2026 {
    background-color: var(--accent-color);
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.6em;
    vertical-align: middle;
    margin-left: 8px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 600px) {

    .rescisao-calculadora,
    .comentarios-container {
        padding: 15px;
    }

    .input-group {
        padding: 15px;
    }

    .checkbox-container {
        flex-direction: column;
        gap: 15px;
    }
}

/* --- ESTILOS PARA A CALCULADORA DE CUSTO --- */
.calculadora-container,
.texto-explicativo,
.comentarios-container {
    background-color: #fff;
    padding: 25px 30px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.calculadora-container h2,
.texto-explicativo h3 {
    text-align: center;
    margin-top: 0;
    color: #1d3557;
    padding-bottom: 10px;
    border-bottom: 2px solid #2a9d8f;
}

.calculadora-form .form-group {
    margin-bottom: 20px;
}

.calculadora-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #1d3557;
}

.calculadora-form input[type="text"],
.calculadora-form input[type="number"],
.calculadora-form select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1.1em;
    box-sizing: border-box;
}

.calculadora-form .options-group {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-bottom: 25px;
    align-items: center;
    flex-wrap: wrap;
}

.calculadora-form input[type="radio"],
.calculadora-form input[type="checkbox"] {
    -webkit-appearance: auto !important;
    appearance: auto !important;
    display: inline-block !important;
    opacity: 1 !important;
    width: auto !important;
}

.calculadora-form .options-group label {
    display: inline-block !important;
    margin-bottom: 0;
    font-weight: normal;
}

/* Note: .btn-calcular is already defined but we can keep overrides or specific adjustments if needed. 
   The provided CSS has a specific hover which matches existing. */

.resultado-custo {
    margin-top: 30px;
    border-top: 2px solid #2a9d8f;
    padding-top: 20px;
    animation: fadeIn 0.5s;
}

.resultado-custo h3 {
    border-bottom: none;
    margin-bottom: 10px;
    font-size: 1.3em;
}

.resultado-custo table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.resultado-custo th,
.resultado-custo td {
    padding: 12px;
    border-bottom: 1px solid #eee;
    text-align: left;
}

.resultado-custo th {
    background-color: #f8f9fa;
    color: #1d3557;
}

.resultado-custo .custo-total {
    font-weight: bold;
    font-size: 1.2em;
    color: #e63946;
    /* Destacar o custo total em vermelho/alerta */
}

.resultado-liquido {
    margin-top: 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    background-color: #f1fcfc;
}

.resultado-liquido .salario-liquido {
    font-weight: bold;
    color: #2a9d8f;
    /* Verde para dinheiro no bolso */
    font-size: 1.2em;
}

.texto-explicativo strong {
    color: #1d3557;
}

.texto-explicativo p,
.texto-explicativo li {
    font-size: 1.05em;
    line-height: 1.7;
}

.badge-novo {
    background-color: #e63946;
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.8em;
    vertical-align: middle;
    margin-left: 5px;
}

/* Footer */
footer {
    background-color: var(--primary-color);
    color: white;
    text-align: center;
    padding: 20px;
    margin-top: auto;
}

footer p {
    margin: 5px 0;
}

footer a {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: bold;
}

footer a:hover {
    text-decoration: underline;
}

/* Utilities replacing inline styles */
.mt-15 {
    margin-top: 15px;
}

.mt-20 {
    margin-top: 20px;
}

.mt-25 {
    margin-top: 25px;
}

.mb-25 {
    margin-bottom: 25px;
}

.pt-15 {
    padding-top: 15px;
}

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

.dashed-border-top {
    border-top: 1px dashed #ccc;
}

.color-accent {
    color: var(--accent-color);
}

.text-sm {
    font-size: 0.9em;
}

.w-full {
    width: 100%;
}

.bg-white {
    background-color: white;
}

/* Botão WhatsApp */
.btn-whatsapp {
    background-color: #25D366;
    color: white;
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 5px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    margin-top: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: background-color 0.3s;
}

.btn-whatsapp:hover {
    background-color: #128C7E;
}

/* Banner de Cookies LGPD */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #222;
    color: white;
    padding: 15px 20px;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
}

.cookie-banner p {
    margin: 0;
    font-size: 0.95em;
    line-height: 1.4;
}

.cookie-banner a {
    color: #4db6ac;
    text-decoration: underline;
}

.cookie-banner button {
    background-color: #25D366;
    color: white;
    border: none;
    padding: 10px 25px;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color 0.3s;
}

.cookie-banner button:hover {
    background-color: #128C7E;
}

@media (max-width: 600px) {
    .cookie-banner {
        flex-direction: column;
        text-align: center;
        padding: 20px;
    }

    .cookie-banner button {
        width: 100%;
    }
}

/* Botão PDF */
.btn-pdf {
    background-color: #dc3545;
    /* Vermelho PDF */
    color: white;
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 5px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: background-color 0.3s;
}

.btn-pdf:hover {
    background-color: #c82333;
}
/* --- BLOG PROMO SECTION --- */
.blog-promo-container {
    margin-top: 40px;
    background: linear-gradient(135deg, var(--primary-color), #2c3e50);
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    color: white;
}

.blog-promo-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap; /* Responsive wrap */
}

.blog-icon {
    font-size: 3em;
    color: var(--secondary-color);
    background: rgba(255,255,255,0.1);
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.blog-text {
    flex: 1;
    min-width: 250px;
}

.blog-text h3 {
    margin: 0 0 10px 0;
    color: white;
    font-size: 1.5em;
}

.blog-text p {
    margin: 0;
    font-size: 1.1em;
    opacity: 0.9;
    line-height: 1.5;
}

.btn-blog-action {
    background-color: var(--secondary-color);
    color: white;
    padding: 12px 25px;
    border-radius: 30px;
    font-weight: bold;
    text-decoration: none;
    transition: transform 0.2s, background-color 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
}

.btn-blog-action:hover {
    background-color: #248a7d;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* Mobile Responsiveness for Blog Promo */
@media (max-width: 600px) {
    .blog-promo-content {
        flex-direction: column;
        text-align: center;
    }
    
    .blog-text h3 {
        font-size: 1.3em;
    }
    
    .btn-blog-action {
        width: 100%;
        justify-content: center;
    }
}

