/* ================================= Layout & Base ================================= */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background-color: #f4f6f4;
    color: #2b2b2b;
    overflow-wrap: anywhere;
}

main {
    max-width: 1000px;
    margin: 12px auto;
    padding: 16px;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

/* ================================= Cabeçalho e Navegação ================================= */
header {
    background-color: #2d6a4f;
    color: #ffffff;
    padding: 12px 16px;
}

header h2 {
    margin: 0 0 10px 0;
    font-size: 1.2rem;
}

nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

nav a {
    color: #d8f3dc;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
    padding: 10px 8px;
    min-height: 44px;
}

nav a:hover,
nav a:focus {
    color: #ffffff;
    text-decoration: underline;
}

a:focus, input:focus, select:focus, textarea:focus, button:focus {
    outline: 3px solid #2d6a4f;
    outline-offset: 2px;
}

/* ================================= Correção do Menu com Bootstrap ================================= */
header.navbar {
    background-color: #2d6a4f !important;
    padding: 12px 16px !important;
    display: block !important;
}

header.navbar .container-fluid {
    display: block !important;
    padding: 0 !important;
}

header.navbar h2 {
    margin: 0 0 10px 0 !important;
    font-size: 1.2rem !important;
    color: #ffffff !important;
}

header .navbar-nav {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    justify-content: flex-start !important;
    gap: 15px !important;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}

header .nav-link {
    color: #d8f3dc !important;
    text-decoration: none !important;
    font-weight: 600 !important;
    padding: 10px 8px !important;
    min-height: 44px !important;
}

header .nav-link:hover,
header .nav-link:focus,
header .nav-link[aria-current="page"] {
    color: #ffffff !important;
    text-decoration: underline !important;
}

/* ================================= Tipografia e Elementos ================================= */
h1 {
    color: #1b4332;
    font-size: 1.75rem;
    margin-bottom: 15px;
}

h2 {
    color: #2d6a4f;
    font-size: 1.5rem;
    margin-top: 25px;
}

h3 {
    color: #2d6a4f;
    font-size: 1.2rem;
}

p {
    margin-bottom: 15px;
}

/* ================================= Imagens e Lado a Lado ================================= */
img {
    display: block;
    max-width: 100%;
    height: auto;
    border-radius: 6px;
}

.image-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 15px;
    margin: 20px 0;
}

.image-row > * {
    min-width: 0;
}

.image-row img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

figure {
    margin: 20px 0;
}

/* ================================= Tabelas ================================= */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    table-layout: fixed;
    font-size: 0.875rem;
}

th, td {
    border: 1px solid #d8dad8;
    padding: 6px;
    text-align: left;
}

th {
    background-color: #2d6a4f;
    color: #ffffff;
}

/* ================================= Rodapé ================================= */
footer {
    text-align: center;
    padding: 20px;
    background-color: #1b4332;
    color: #ffffff;
    margin-top: 40px;
}

footer a {
    color: #D4E8D7;
}

/* ================================= Personalizações Bootstrap ================================= */
.btn-primary {
    background-color: #2d6a4f !important;
    border-color: #2d6a4f !important;
    color: #ffffff !important;
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: #1b4332 !important;
    border-color: #1b4332 !important;
    color: #ffffff !important;
}

.card {
    border-radius: 8px !important;
    border: 1px solid #d8dad8;
}

.card, .shadow-custom {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05) !important;
}

.iframe-comparacao {
    height: 310px;
}

/* ================================= Modelo de Caixa e Formulários ================================= */
*, *::before, *::after {
    box-sizing: border-box;
}

a {
    display: inline-block;
    max-width: 100%;
    min-width: 24px;
    min-height: 24px;
}

input, select, textarea, button {
    max-width: 100%;
    min-width: 24px;
    min-height: 44px;
    font: inherit;
}

input[type="checkbox"] {
    width: 24px;
    height: 24px;
    min-height: 24px;
    margin: 0;
}

summary {
    min-width: 24px;
    min-height: 44px;
    padding: 8px 0;
    cursor: pointer;
}

form p {
    margin-bottom: 15px;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #2d6a4f;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"],
select,
textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #d8dad8;
    border-radius: 4px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

button[type="submit"] {
    background-color: #2d6a4f;
    color: #ffffff;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
}

button[type="submit"]:hover {
    background-color: #1b4332;
}

a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
button:focus-visible {
    outline: 3px solid #1b4332;
    outline-offset: 2px;
}

/* ================================= Índice do Artigo ================================= */
#indice {
    background-color: #f4f6f4;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #d8dad8;
}

#indice a {
    color: #2d6a4f;
}

#indice a:hover,
#indice a:focus {
    color: #1b4332;
}

#indice ul {
    flex-direction: column;
    gap: 5px;
}

/* ================================= Media Queries (Mobile-First) ================================= */
@media (min-width: 480px) {
    .image-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    main {
        padding: 20px;
    }
}

@media (min-width: 768px) {
    main {
        margin: 20px auto;
        padding: 24px;
    }

    header {
        padding: 15px 20px;
    }

    nav ul {
        gap: 15px;
    }

    h1 {
        font-size: 2rem;
    }

    table {
        table-layout: auto;
        font-size: 1rem;
    }

    th, td {
        padding: 12px;
    }

    figure {
        margin-inline: 40px;
    }
}

@media (min-width: 1024px) {
    main {
        padding: 30px;
    }

    .image-row {
        gap: 24px;
    }
}