/* ================================================================
   LOGIN ADMIN BUTTON (HEADER)
   ================================================================ */
.login-admin-btn {
    background: var(--verde);
    color: var(--branco) !important;
    padding: 10px 22px;
    border-radius: 25px;
    font-weight: bold;
    font-size: 15px;
    margin-left: 18px;
    box-shadow: 0 2px 8px rgba(53, 172, 71, 0.10);
    transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
    border: none;
    display: inline-block;
    cursor: pointer;
    letter-spacing: 0.5px;
}

.login-admin-btn:hover {
    background: #2a8a3a;
    color: var(--branco);
    transform: translateY(-2px) scale(1.04);
    box-shadow: 0 4px 16px rgba(53, 172, 71, 0.18);
    text-decoration: none;
}

/* ================================================================
   LOGIN PAGE STYLES (moved from login/index.php inline <style>)
   ================================================================ */
.login-container {
    max-width: 400px;
    margin: 3rem auto 4rem auto;
    background: var(--branco);
    border-radius: 10px;
    box-shadow: 0 3px 12px rgba(0,0,0,0.08);
    padding: 2.5rem 2rem 2rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.login-container h2 {
    color: var(--azul);
    margin-bottom: 1.5rem;
    font-size: 2rem;
    font-weight: bold;
}
.login-form {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}
.login-form label {
    font-weight: 500;
    color: var(--preto);
    margin-bottom: 0.3rem;
    display: block;
}
.login-form input[type="text"],
.login-form input[type="password"] {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--cinza-medio);
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s;
    margin-top: 0.2rem;
}
.login-form input:focus {
    border-color: var(--azul);
    outline: none;
}
.login-form button {
    background: linear-gradient(90deg, var(--azul), var(--verde));
    color: var(--branco);
    border: none;
    border-radius: 5px;
    padding: 12px 0;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    margin-top: 0.5rem;
    transition: background 0.2s;
    box-shadow: 0 2px 8px #1b38a820;
}
.login-form button:hover {
    background: linear-gradient(90deg, var(--verde), var(--azul));
}
.login-error {
    color: var(--vermelho);
    background: #fd422320;
    border-radius: 5px;
    padding: 10px 15px;
    margin-bottom: 1rem;
    width: 100%;
    text-align: center;
    font-weight: 500;
}


/* ================================================================
   LISTA.PHP LAYOUT (FLEX WITH SIDEBAR)
   ================================================================ */
.layout-flex {
    display: flex;
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
.form-row { display: flex; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.form-col { flex: 1 1 320px; min-width: 260px; }
.form-col.small { flex: 0 0 240px; }
.form-input, .form-select, .form-textarea { width: 100%; box-sizing: border-box; padding: 8px 10px; border: 1px solid var(--cinza-medio); border-radius: 4px; max-width:100%; }
.form-textarea { min-height: 100px; resize: both; }
    flex-shrink: 0;
}

.layout-flex .main-container {
    flex: 1;
    display: block;
}

/* Place sidebar on the right for list pages */
.layout-flex .barra-lateral {
    order: 2;
}
.layout-flex .main-container {
    order: 1;
}

/* View page main flex container: ensure sidebar is on the right */
.main-flex-container {
    display: flex;
    align-items: flex-start;
    gap: 2rem;
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}
.main-flex-container .sidebar {
    order: 2;
}
.main-flex-container .news-article,
.main-flex-container article {
    order: 1;
}

.layout-flex .main-container h2 {
    font-size: 22px;
    margin-bottom: 25px;
    color: var(--azul);
    font-weight: 600;
    padding-bottom: 10px;
    border-bottom: 3px solid var(--laranja);
}

.list-news {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.list-news .news-card {
    background: var(--branco);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    cursor: pointer;
}

.list-news .news-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.list-news .news-image {
    height: 220px;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    background-color: var(--cinza-claro);
    flex-shrink: 0;
}

.list-news .news-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.list-news .news-category {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: bold;
    margin-bottom: 10px;
    width: fit-content;
}

.list-news .news-content h3 {
    font-size: 18px;
    margin-bottom: 10px;
    color: var(--preto);
    flex-grow: 1;
    font-weight: 600;
    line-height: 1.4;
}

.list-news .news-content h3 a {
    color: var(--preto);
    text-decoration: none;
    transition: color 0.3s;
}

.list-news .news-content h3 a:hover {
    color: var(--azul);
}

.list-news .news-content p {
    color: var(--cinza-escuro);
    font-size: 14px;
    margin-bottom: 15px;
    line-height: 1.5;
}

/* Make the whole card clickable */
.news-card-link {
    display: block;
    color: inherit;
    text-decoration: none;
}

.news-card-link:hover .news-content h3 {
    color: var(--azul);
}

.news-card-link:focus {
    outline: 3px solid rgba(27,56,168,0.12);
    outline-offset: 2px;
}

.news-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: var(--cinza-escuro);
    padding-top: 10px;
    border-top: 1px solid var(--cinza-medio);
}

.news-footer .views {
    display: flex;
    align-items: center;
    gap: 5px;
}

.news-footer .views svg {
    width: 16px;
    height: 16px;
    stroke-width: 1.5;
}

/* ================================================================
   VIEW.PHP LAYOUT (ARTICLE + SIDEBAR + FULL-WIDTH SECTIONS)
   ================================================================ */
.main-flex-container {
    display: flex;
    align-items: flex-start;
    gap: 2rem;
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

.news-article {
    background-color: var(--branco);
    border-radius: 10px;
    padding: 40px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
    margin-bottom: 40px;
    flex: 1 1 0;
    min-width: 0;
}

.news-header {
    margin-bottom: 30px;
    border-bottom: 2px solid var(--cinza-medio);
    padding-bottom: 20px;
}

.news-category {
    display: inline-block;
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 15px;
    background-color: #fe8d2020;
    color: var(--laranja);
}

.news-title {
    font-size: 36px;
    margin-bottom: 15px;
    color: var(--azul);
    line-height: 1.3;
}

.news-meta {
    display: flex;
    gap: 20px;
    color: var(--cinza-escuro);
    font-size: 16px;
    margin-bottom: 10px;
}

.news-author {
    font-weight: 500;
    color: var(--preto);
}

.news-lead {
    font-size: 22px;
    font-weight: 500;
    color: var(--preto);
    margin-bottom: 30px;
    padding: 15px;
    border-left: 4px solid var(--laranja);
    background-color: var(--cinza-claro);
}

.news-image-main {
    width: 100%;
    max-height: 500px;
    border-radius: 10px;
    object-fit: cover;
    margin: 30px 0;
    display: block;
}

.news-image-caption {
    text-align: center;
    font-style: italic;
    color: var(--cinza-escuro);
    margin-top: -25px;
    margin-bottom: 30px;
    font-size: 14px;
}

.news-content {
    font-size: 20px;
    line-height: 1.85;
    padding: 1.5rem 2.5rem;
    background: var(--cinza-claro);
    border-radius: 8px;
    margin-top: 10px;
}

.news-content p {
    margin-bottom: 25px;
}

.news-content h1, .news-content h2, .news-content h3 {
    color: var(--azul);
    margin-top: 1.2em;
    margin-bottom: 0.5em;
    font-weight: 600;
}

.news-content ul, .news-content ol {
    margin-left: 2em;
    margin-bottom: 1em;
}

.news-content a {
    color: var(--azul);
    text-decoration: underline;
    transition: color 0.2s;
}

.news-content a:hover {
    color: #0d2c4a;
}

.news-content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 1rem auto;
    border-radius: 8px;
    object-fit: contain;
}

.news-content figure img, .news-image-main {
    max-width: 100%;
    max-height: 70vh;
    width: auto;
    height: auto;
}

.main-flex-container .sidebar {
    width: 300px;
    flex-shrink: 0;
    background: var(--branco);
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 20px;
    height: fit-content;
}

/* UPLOAD PAGE SPECIFIC STYLES */
.upload-page #editor {
    min-height: 320px;
    background: var(--branco);
}

.upload-page .user-badge {
    padding: 12px 18px;
    border-radius: 10px;
    border: 2px solid rgba(0,0,0,0.15);
    display: inline-block;
    background: linear-gradient(90deg, rgba(27,56,168,0.06), rgba(53,172,71,0.04));
    color: var(--preto);
}

.upload-page #toolbar_e button {
    width: 36px;
    height: 36px;
    border: 1px solid var(--cinza-medio);
    background: var(--branco);
    border-radius: 4px;
    margin-right: 6px;
}

.upload-page .form-wrap {
    max-width: 920px;
    margin: 0 auto;
}
    .upload-page .form-wrap {
        max-width: 1100px;
        margin: 0 auto;
        display: flex;
        justify-content: center;
        align-items: flex-start;
    }

.upload-page main {
    flex: 0 0 75%;
    max-width: 75%;
}

.upload-page aside {
    display: none;
}

/* Ensure upload-topbar (badge) remains above the editor */
.upload-topbar {
    max-width: 1100px;
    margin: 0 auto 18px auto;
    padding: 0 20px;
}

/* Override global .main-container grid for upload page so editor sits centered under the badge */
.upload-page .main-container {
    display: block !important;
    max-width: none;
    padding: 20px;
}

.upload-page .form-wrap {
    /* ensure it's centered within the main container */
    justify-content: center;
}

/* Upload page form utilities */
.upload-main { padding: 20px; }
.form-row { display: flex; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.form-col { flex: 1 1 240px; min-width: 180px; }
.form-col.small { flex: 1 1 200px; }
.form-input, .form-select, .form-textarea { width: 100%; box-sizing: border-box; padding: 8px 10px; border: 1px solid var(--cinza-medio); border-radius: 4px; max-width:100%; }
.form-textarea { min-height: 60px; resize: vertical; }
.mt-6 { margin-top: 6px; }
.mt-10 { margin-top: 10px; }
.mb-10 { margin-bottom: 10px; }
.small-note { display:block; color:#666; margin-top:4px; }
.editor-toolbar { margin-bottom: 8px; }
.btn-icon { padding: 4px; border: 1px solid var(--cinza-medio); background: var(--branco); border-radius: 4px; }
.icon-img { height: 22px; width: auto; display:block; }
.editor-box { border: 1px solid #ccc; background: var(--branco); min-height: 320px; }

/* Ensure form-row children don't stretch when a child is resized */
.form-row { align-items: flex-start; }

/* ================================================================
   FULL-WIDTH SECTIONS (COMMENTS)
   ================================================================ */
.comments-section {
    background-color: var(--branco);
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
    margin: 0 auto 40px auto;
    max-width: 1200px;
    width: calc(100% - 40px);
}

.comments-section h2 {
    font-size: 24px;
    margin-bottom: 25px;
    color: var(--azul);
    text-align: center;
    font-weight: 600;
}

/* ================================================================
   PORTAL DE NOTÍCIAS - STYLESHEET PRINCIPAL
   Variáveis de cores, layout, tipografia e componentes
   ================================================================ */

/* Variáveis de cores */
:root {
    --azul: #1b38a8;
    --vermelho: #fd4223;
    --laranja: #fe8d20;
    --verde: #35ac47;
    --branco: #ffffff;
    --preto: #333333;
    --cinza-claro: #f5f5f5;
    --cinza-medio: #e0e0e0;
    --cinza-escuro: #888888;
}

/* Reset e estilos gerais */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

html, body {
    width: 100%;
    height: 100%;
}

body {
    background-color: var(--cinza-claro);
    color: var(--preto);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

/* ================================================================
   HEADER
   ================================================================ */
header {
    background: linear-gradient(to right, var(--azul), var(--verde));
    padding: 25px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    color: var(--branco);
    margin-bottom: 0;
}

.header-container {
    display: flex;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    gap: 30px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.logo-icon {
    background-color: var(--branco);
    width: 64px;
    height: 64px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: transform 0.3s, filter 0.3s;
}

.logo-icon:hover {
    transform: translateY(-2px);
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.2));
}

.logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.logo-text {
    color: var(--branco);
    font-size: 24px;
    font-weight: bold;
    white-space: nowrap;
}

.search-bar {
    flex: 1;
    display: flex;
    max-width: 600px;
    min-width: 0;
}

.search-bar input {
    flex: 1;
    padding: 12px 15px;
    border: none;
    border-radius: 30px 0 0 30px;
    font-size: 16px;
    outline: none;
    transition: box-shadow 0.3s;
}

.search-bar input:focus {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.search-bar button {
    background-color: var(--laranja);
    color: var(--branco);
    border: none;
    border-radius: 0 30px 30px 0;
    padding: 0 25px;
    cursor: pointer;
    font-weight: bold;
    font-size: 14px;
    transition: background-color 0.3s;
}

.search-bar button:hover {
    background-color: var(--vermelho);
}

/* ================================================================
   CATEGORIAS
   ================================================================ */
.categories {
    background-color: var(--branco);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 20px 0;
    margin-bottom: 40px;
}

.categories-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}

.category {
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    border: 2px solid transparent;
}

.category:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.category-badge {
    background: var(--cinza-claro);
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    margin-right: 8px;
}

/* ================================================================
   LAYOUT PRINCIPAL
   ================================================================ */
.main-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 3fr 1fr;
    gap: 30px;
    margin-bottom: 50px;
}

main {
    width: 100%;
}

aside {
    width: 100%;
}

.section-title {
    font-size: 22px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 3px solid var(--laranja);
    color: var(--azul);
    font-weight: 600;
}

/* ================================================================
   CARDS DE NOTÍCIAS
   ================================================================ */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.news-card {
    background: var(--branco);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    cursor: pointer;
}

.news-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.news-image {
    height: 250px;
    aspect-ratio: auto;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    flex-shrink: 0;
}

.news-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.news-category {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: bold;
    margin-bottom: 10px;
    width: fit-content;
}

.news-title {
    font-size: 18px;
    margin-bottom: 10px;
    color: var(--preto);
    flex-grow: 1;
    font-weight: 600;
    line-height: 1.4;
}

.news-excerpt {
    color: var(--cinza-escuro);
    font-size: 14px;
    margin-bottom: 15px;
    line-height: 1.5;
}

.news-meta {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--cinza-escuro);
    padding-top: 10px;
    border-top: 1px solid var(--cinza-medio);
}

/* ================================================================
   SIDEBAR
   ================================================================ */
.sidebar {
    background: var(--branco);
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 20px;
    height: fit-content;
    width: 250px;
    flex-shrink: 0;
}

.sidebar-title {
    color: var(--azul);
    font-size: 1.2rem;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--laranja);
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
}

.sidebar-list {
    list-style: none;
}

.sidebar-list li {
    padding: 12px 0;
    border-bottom: 1px solid var(--cinza-medio);
}

.sidebar-list li:last-child {
    border-bottom: none;
}

.sidebar-list a {
    color: var(--azul);
    font-weight: 500;
    transition: color 0.3s;
}

.sidebar-list a:hover {
    color: var(--laranja);
}

/* ================================================================
   NOTÍCIAS MAIS VISTAS
   ================================================================ */
.most-viewed {
    background-color: var(--branco);
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
    margin-bottom: 30px;
}

.top-news {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.top-news-item {
    display: flex;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px dashed var(--cinza-medio);
    align-items: flex-start;
    text-decoration: none;
    color: inherit;
    transition: opacity 0.2s, transform 0.2s;
}

.top-news-item:hover {
    opacity: 0.8;
    transform: translateX(3px);
}

.top-news-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.top-news-number {
    color: white;
    font-weight: bold;
    min-width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.9rem;
}

.top-news-content {
    flex: 1;
}

.top-news-content h4 {
    font-size: 0.95rem;
    margin-bottom: 5px;
    line-height: 1.4;
    font-weight: 600;
    color: var(--preto);
}

.top-news-content .news-meta {
    border: none;
    padding: 0;
}

/* ================================================================
   COMENTÁRIOS
   ================================================================ */
.comments-section {
    background-color: var(--branco);
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
    margin-bottom: 40px;
}

.comments-section h2 {
    font-size: 24px;
    margin-bottom: 25px;
    color: var(--azul);
    text-align: center;
    font-weight: 600;
}

.comment-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--preto);
    font-size: 14px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--cinza-medio);
    border-radius: 5px;
    font-size: 16px;
    font-family: inherit;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--azul);
    box-shadow: 0 0 0 3px rgba(27, 56, 168, 0.1);
}

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

.form-group textarea {
    min-height: 120px;
    resize: vertical;
}

.submit-btn {
    grid-column: 1 / -1;
    background-color: var(--verde);
    color: var(--branco);
    border: none;
    padding: 12px 25px;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
    margin-top: 10px;
}

.submit-btn:hover {
    background-color: #2a8a3a;
    transform: translateY(-2px);
}

.submit-btn:active {
    transform: translateY(0);
}

/* ================================================================
   FOOTER
   ================================================================ */
footer {
    background: linear-gradient(to right, var(--azul), var(--verde));
    color: var(--branco);
    padding: 30px 0;
    text-align: center;
    margin-top: 50px;
    width: 100%;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-logo {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 10px;
}

.copyright {
    font-size: 14px;
    opacity: 0.85;
}

/* ================================================================
   ARTIGOS (VIEW)
   ================================================================ */
article {
    background: var(--branco);
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
    margin-bottom: 40px;
}

article h1 {
    font-size: 32px;
    margin-bottom: 15px;
    color: var(--azul);
    font-weight: 700;
}

article .categoria {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    margin-bottom: 20px;
}

article .resumo {
    font-size: 18px;
    font-style: italic;
    color: var(--cinza-escuro);
    margin-bottom: 20px;
    line-height: 1.6;
}

article img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 20px 0;
    border-radius: 5px;
}

article .cover-page {
    text-align: center;
    margin-bottom: 30px;
}

article .cover-page img {
    max-width: 100%;
    height: auto;
}

article .conteudo-noticia {
    font-size: 16px;
    line-height: 1.8;
    color: var(--preto);
}

article .conteudo-noticia p {
    margin-bottom: 15px;
}

article .conteudo-noticia h2 {
    font-size: 24px;
    margin-top: 25px;
    margin-bottom: 15px;
    color: var(--azul);
    font-weight: 600;
}

article .autor {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid var(--cinza-medio);
    font-size: 14px;
    color: var(--cinza-escuro);
    font-style: italic;
}

/* ================================================================
   FORMULÁRIOS DE EDITOR (UPLOAD, EDIT)
   ================================================================ */
.ql-toolbar {
    border: 1px solid var(--cinza-medio);
    border-bottom: none;
    border-radius: 5px 5px 0 0;
    background: var(--cinza-claro);
}

.ql-container {
    border: 1px solid var(--cinza-medio);
    border-radius: 0 0 5px 5px;
    font-size: 16px;
}

#editor {
    background: var(--branco);
    min-height: 300px;
}

.form-wrap {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    gap: 24px;
    align-items: flex-start;
}

.form-wrap main {
    flex: 1;
}

.form-wrap aside {
    width: 320px;
    flex-shrink: 0;
}

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (max-width: 768px) {
    .main-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .main-flex-container {
        flex-direction: column;
        gap: 20px;
        margin: 20px auto;
        padding: 0 10px;
    }

    .main-flex-container .sidebar {
        width: 100%;
        position: static;
        top: auto;
    }

    .news-article {
        padding: 20px;
    }

    .news-title {
        font-size: 28px;
    }

    .news-image-main {
        max-height: 300px;
    }

    .comments-section {
        margin: 0 10px 40px 10px;
        padding: 20px;
    }

    .layout-flex {
        flex-direction: column;
        gap: 20px;
    }

    .barra-lateral {
        width: 100%;
    }

    .list-news {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 15px;
    }

    .list-news .news-image {
        height: 150px;
    }

    .header-container {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }

    .logo {
        justify-content: center;
    }

    .logo-icon {
        width: 56px;
        height: 56px;
    }

    .logo-text {
        font-size: 20px;
    }

    .search-bar {
        max-width: 100%;
    }

    .sidebar {
        position: static;
        top: auto;
    }

    .news-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 15px;
    }

    .news-image {
        height: 150px;
    }

    article {
        padding: 20px;
    }

    article h1 {
        font-size: 24px;
    }

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

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

    .submit-btn {
        grid-column: 1;
    }

    .form-wrap {
        flex-direction: column;
    }

    .form-wrap aside {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .header-container {
        padding: 0 10px;
    }

    .logo-icon {
        width: 48px;
        height: 48px;
    }

    .logo-text {
        font-size: 16px;
    }

    .categories-container {
        padding: 0 10px;
    }

    .category {
        padding: 8px 15px;
        font-size: 13px;
    }

    .main-container {
        padding: 0 10px;
        gap: 15px;
    }

    .news-grid {
        grid-template-columns: 1fr;
    }

    article {
        padding: 15px;
    }

    article h1 {
        font-size: 20px;
    }

    article .resumo {
        font-size: 14px;
    }

    .section-title {
        font-size: 18px;
    }

    .sidebar-title {
        font-size: 1rem;
    }

    footer {
        padding: 20px 10px;
    }
}
