* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Segoe UI", sans-serif;
    background: #f5f7fa;
    color: #1f2937;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: auto;
}

/* HEADER */

.header {
    background: #0f172a;
    padding: 0;
}

.header .container.nav {
    width: 100%;
    max-width: none;
    margin: 0;
    padding-left: 24px;
    padding-right: 24px;
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 80px;
    gap: 16px;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
}

.logo img {
    height: 28px;
    width: 28px;
    object-fit: contain;
    object-position: left center;
    display: block;
    border-radius: 0;
}

.logo > span {
    font-size: 24px;
    font-weight: 700;
    color: #ffffff;
    line-height: 1;
    letter-spacing: 0.2px;
}

.logo > span span {
    color: #22c55e;
}

nav {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
}

nav a {
    color: #cbd5e1;
    margin-left: 20px;
    text-decoration: none;
    font-size: 14px;
}

nav a:hover {
    color: #ffffff;
}

nav a.is-active {
    color: #ffffff;
    font-weight: 700;
}

.nav-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 10px;
    background: transparent;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.nav-toggle-bar {
    width: 20px;
    height: 2px;
    background: #ffffff;
    border-radius: 99px;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) {
    opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* HERO */

.hero {
    background: linear-gradient(135deg, #1e3a8a, #16a34a);
    color: #ffffff;
    padding: 80px 0;
    text-align: center;
}

.hero h1 {
    font-size: 36px;
    margin-bottom: 20px;
}

.hero p {
    font-size: 18px;
    margin-bottom: 30px;
}

.btn-primary,
.btn-secondary {
    padding: 12px 25px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 700;
    margin: 0 10px;
}

.btn-primary {
    background: #ffffff;
    color: #1e3a8a;
}

.btn-secondary {
    background: transparent;
    border: 2px solid #ffffff;
    color: #ffffff;
}

/* TOOLS */

.tools {
    padding: 60px 0;
    text-align: center;
}

.tools h2 {
    margin-bottom: 40px;
    font-size: 28px;
}

.cards {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.card {
    background: #ffffff;
    padding: 30px;
    width: 300px;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
    transition: 0.3s;
}

.card:hover {
    transform: translateY(-5px);
}

.card h3 {
    margin-bottom: 15px;
}

.card p {
    font-size: 14px;
    margin-bottom: 20px;
}

.card a {
    text-decoration: none;
    color: #16a34a;
    font-weight: 700;
}

/* FOOTER */

.footer {
    background: #0f172a;
    color: #94a3b8;
    text-align: center;
    padding: 20px 0;
    font-size: 14px;
}

.footer-links {
    margin-top: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.footer-links a,
.footer-link-button {
    color: #cbd5e1;
    font-size: 13px;
    text-decoration: none;
}

.footer-links a:hover,
.footer-link-button:hover {
    color: #ffffff;
}

.footer-link-button {
    background: transparent;
    border: none;
    cursor: pointer;
    font: inherit;
    padding: 0;
}

.cookie-banner {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: 16px;
    z-index: 1200;
}

.cookie-banner-content {
    background: #0f172a;
    color: #e2e8f0;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    padding: 14px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.35);
    max-width: 760px;
    margin: 0 auto;
}

.cookie-banner-content p {
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
}

.cookie-banner-content a {
    color: #86efac;
}

.cookie-banner-actions {
    margin-top: 10px;
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.cookie-btn {
    border-radius: 8px;
    padding: 8px 12px;
    border: 1px solid transparent;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.cookie-btn-accept {
    background: #16a34a;
    color: #ffffff;
}

.cookie-btn-accept:hover {
    background: #15803d;
}

.cookie-btn-reject {
    background: transparent;
    border-color: #475569;
    color: #e2e8f0;
}

.cookie-btn-reject:hover {
    border-color: #94a3b8;
}

/* PAGE HERO */

.page-hero {
    background: linear-gradient(135deg, #1e3a8a, #16a34a);
    color: #ffffff;
    padding: 60px 0;
    text-align: center;
}

/* CALCULATOR SECTION */

.calculator-section {
    padding: 60px 0;
    background: #f8fafc;
}

.calculator-wrapper {
    display: flex;
    gap: 40px;
    flex-wrap: wrap;
    justify-content: center;
}

.calculator-card,
.result-card {
    background: #ffffff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
    width: 400px;
}

.campo {
    margin-bottom: 15px;
}

.campo label {
    display: block;
    font-size: 14px;
    margin-bottom: 5px;
}

.label-with-info {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 5px;
}

.label-with-info label {
    margin-bottom: 0;
}

.info-button {
    position: relative;
    width: 20px;
    height: 20px;
    border: 1px solid #94a3b8;
    border-radius: 50%;
    background: #f8fafc;
    color: #0f172a;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.info-button:hover,
.info-button:focus-visible {
    border-color: #16a34a;
    color: #16a34a;
    outline: none;
}

.info-tooltip {
    position: absolute;
    left: 0;
    bottom: calc(100% + 10px);
    min-width: 220px;
    max-width: 260px;
    background: #0f172a;
    color: #ffffff;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.4;
    text-align: left;
    padding: 8px 10px;
    border-radius: 8px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    opacity: 0;
    visibility: hidden;
    transform: translateY(4px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
    pointer-events: none;
    z-index: 20;
}

.info-button:focus .info-tooltip,
.info-button:focus-visible .info-tooltip,
.info-button:hover .info-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.campo input {
    width: 100%;
    padding: 10px;
    border-radius: 6px;
    border: 1px solid #cbd5e1;
}

.campo select {
    width: 100%;
    padding: 10px;
    border-radius: 6px;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    color: #1f2937;
}

.campo-inline {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 10px;
}

.btn-calc {
    width: 100%;
    padding: 12px;
    background: #16a34a;
    border: none;
    color: #ffffff;
    border-radius: 6px;
    font-weight: 700;
    cursor: pointer;
}

.btn-calc:hover {
    background: #15803d;
}

.form-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.btn-clear {
    width: 100%;
    padding: 12px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: #334155;
    border-radius: 6px;
    font-weight: 700;
    cursor: pointer;
}

.btn-clear:hover {
    background: #f8fafc;
    border-color: #94a3b8;
}

/* CONTENT SECTION */

.content-section {
    padding: 60px 0;
}

.content-section h2 {
    margin-top: 30px;
    margin-bottom: 15px;
}

.content-section p,
.content-section ul {
    margin-bottom: 20px;
}

.content-section ul {
    padding-left: 20px;
}

.resultado-tabela-wrap {
    overflow-x: auto;
}

.resultado-tabela {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
}

.resultado-tabela th,
.resultado-tabela td {
    text-align: left;
    padding: 10px 12px;
    border-bottom: 1px solid #e2e8f0;
    font-size: 14px;
}

.resultado-tabela thead th {
    background: #f1f5f9;
    color: #0f172a;
    font-weight: 700;
}

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

.resultado-tabela tbody td:last-child {
    font-weight: 700;
    color: #065f46;
}

.resultado-aviso {
    margin-top: 12px;
    font-size: 12px;
    line-height: 1.5;
    color: #64748b;
}

/* RESPONSIVO */

@media (max-width: 900px) {
    .calculator-wrapper {
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 768px) {
    .container {
        width: 92%;
    }

    .header .container.nav {
        padding-left: 16px;
        padding-right: 16px;
    }

    .nav {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        flex-wrap: wrap;
        min-height: 80px;
        gap: 12px;
    }

    .nav-toggle {
        display: inline-flex;
    }

    nav {
        display: none;
        width: 100%;
        flex-direction: column;
        gap: 6px;
        background: #111827;
        border: 1px solid rgba(255, 255, 255, 0.08);
        border-radius: 12px;
        padding: 8px;
    }

    nav.is-open {
        display: flex;
    }

    nav a {
        display: block;
        margin: 0;
        padding: 10px 12px;
        border-radius: 8px;
    }

    nav a:hover {
        color: #ffffff;
        background: rgba(255, 255, 255, 0.08);
    }

    .logo img {
        height: 24px;
        width: 24px;
    }

    .logo > span {
        font-size: 19px;
    }

    .hero h1 {
        font-size: 26px;
    }

    .hero p {
        font-size: 16px;
    }

    .hero-buttons {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }

    .btn-primary,
    .btn-secondary {
        width: 100%;
        max-width: 320px;
        margin: 0;
    }

    .cards {
        flex-direction: column;
        align-items: center;
    }

    .card {
        width: 100%;
        max-width: 360px;
    }

    .calculator-card,
    .result-card {
        width: 100%;
        max-width: 520px;
    }
}

@media (max-width: 480px) {
    .logo > span {
        font-size: 17px;
    }

    .logo img {
        height: 22px;
        width: 22px;
    }

    .nav {
        min-height: 64px;
    }

    nav a {
        font-size: 13px;
        padding: 9px 10px;
    }

    .hero {
        padding: 56px 0;
    }

    .hero h1 {
        font-size: 22px;
    }

    .tools,
    .calculator-section,
    .content-section {
        padding: 42px 0;
    }

    .campo-inline {
        grid-template-columns: 1fr;
    }

    .form-actions {
        grid-template-columns: 1fr;
    }

    .cookie-banner {
        left: 10px;
        right: 10px;
        bottom: 10px;
    }

    .cookie-banner-content {
        padding: 12px;
    }

    .cookie-banner-actions {
        justify-content: stretch;
    }

    .cookie-btn {
        flex: 1 1 auto;
    }
}
