/* 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;
}

body {
    background-color: var(--cinza-claro);
    color: var(--preto);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

/* ================================================================
   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;
}

.sidebar {
    background: var(--branco);
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    position: sticky;
    top: 20px;
    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;
}

/* Barra Lateral (alias for sidebar) */
.barra-lateral {
    width: 250px;
    flex-shrink: 0;
    order: 2;
}

/* 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;
}

.logo {
    display: flex;
    align-items: center;
    margin-right: 30px;
}

.logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 10px; 
}

.logo-icon {
    background-color: var(--branco);
    width: 60px;
    height: 60px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-right: 10px;
}

.logo-icon {
    background-color: var(--branco);
    color: var(--azul);
    width: 60px;
    height: 60px;
    border-radius: 10px;
    display: flex;
    font-size: 32px;
    font-weight: bold;
    margin-right: 10px;
}

.logo-text {
    color: var(--branco);
    font-size: 24px;
    font-weight: bold;
}

.search-bar {
    flex: 1;
    display: flex;
    max-width: 600px;
}

.search-bar input {
    width: 100%;
    padding: 12px 15px;
    border: none;
    border-radius: 30px 0 0 30px;
    font-size: 16px;
    outline: none;
}

.search-bar button {
    background-color: var(--laranja);
    color: var(--branco);
    border: none;
    border-radius: 0 30px 30px 0;
    padding: 0 20px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s;
}

.search-bar button:hover {
    background-color: var(--vermelho);
}

.login-link {
    margin-left: auto; /* Ensures it stays at the far right */
}

.login-link a {
    background-color: var(--verde);
    color: #fff;
    padding: 10px 22px;
    border-radius: 25px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 8px rgba(53, 172, 71, 0.10);
    font-size: 16px;
    display: inline-block;
}

.login-link a:hover {
    background-color: #2a8a3a;
    transform: translateY(-2px) scale(1.04);
    box-shadow: 0 4px 16px rgba(53, 172, 71, 0.18);
}
/* Navegação por 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);
}

.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;
}

/* Conteúdo principal */
.main-container {
    flex: 1 1 100%;
    min-width: 0;
    padding: 0 20px;
    order: 1;
}

.section-title {
    font-size: 22px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 3px solid var(--laranja);
    color: var(--azul);
}
.layout-flex {
    display: flex;
    flex-direction: row;
    gap: 24px;
    align-items: flex-start;
    width: 100%;
    max-width: none;
    margin: 0 auto;
    padding: 0 40px;
}

/* Notícias principais */
.list-news {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    width: 100%;
    flex: 1;
    min-height: 0;
}

.news-card {
    background-color: var(--branco);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
    transition: all 0.4s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.news-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.news-image {
    height: 195px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    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;
}

.news-title {
    font-size: 18px;
    margin-bottom: 10px;
    color: var(--preto);
    flex-grow: 1;
}

.news-excerpt {
    color: var(--cinza-escuro);
    font-size: 14px;
    margin-bottom: 15px;
}

.news-meta {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--cinza-escuro);
}

.news-card h3 {
    margin: 0 0 8px 0;
    font-size: 1.1em;
    font-weight: bold;
}
.news-card h3 a {
    color: #000;
    text-decoration: none;
}
.news-card p {
    margin: 0 0 12px 0;
    color: #333;
    font-size: 0.95em;
    flex: 1;
}
.news-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #666;
}
.news-footer .views {
    display: flex;
    align-items: center;
    gap: 4px;
}
.news-footer .views svg {
    width: 14px;
    height: 14px;
}

/* 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: 15px;
}

.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: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.9rem;
}

.top-news-content h4 {
    font-size: 0.95rem;
    margin-bottom: 8px;
    line-height: 1.4;
}

.top-news-content .news-meta {
    font-size: 12px;
}

/* Área de 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;
}

.comment-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: var(--preto);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--cinza-medio);
    border-radius: 5px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--azul);
}

.form-group-full {
    grid-column: span 2;
}

.form-group textarea {
    height: 120px;
    resize: vertical;
}

.submit-btn {
    grid-column: span 2;
    background-color: var(--verde);
    color: var(--branco);
    border: none;
    padding: 12px 25px;
    border-radius: 5px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s;
    margin-top: 10px;
}

.submit-btn:hover {
    background-color: #2a8a3a;
}

/* Footer */
 footer {
    background: linear-gradient(to right, var(--azul), var(--verde));
    color: var(--branco);
    padding: 30px 0;
    text-align: center;
    margin-top: 50px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-logo {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 15px;
}

.copyright {
    font-size: 14px;
    opacity: 0.8;
}

/* Media Queries */
@media (max-width: 600px) {
    .sidebar {
        position: static;
        margin-top: 40px;
    }
    
    .top-news-item {
        flex-direction: column;
    }
    .header-container {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .logo {
        justify-content: center;
    }
    
    .news-image {
        height: 150px;
    }
    
    .news-grid {
        gap: 15px;
    }
    
    .category {
        padding: 10px 15px;
        margin: 5px;
    }
    
    .news-title {
        font-size: 16px;
    }
    
    .comment-form {
        gap: 10px;
    }
}

@media (max-width: 400px) {
    .news-content {
        padding: 15px;
    }
    
    .search-bar input {
        padding: 10px 12px;
    }
    
    .news-meta {
        flex-direction: column;
        gap: 5px;
    }
}