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

body {
    background-color: #f5f5f7;
    color: #333;
    line-height: 1.6;
}

/* Header styles */
header {
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    text-align: left;
}

.logo img {
    height: 40px;
    width: auto;
}

.header-right {
    margin-left: auto;
}

.header-right a {
    color: #2c3e50;
    text-decoration: none;
    font-weight: 500;
    display: flex;
    align-items: center;
    transition: color 0.3s ease;
}

.header-right a i {
    margin-right: 6px;
}

.header-right a:hover {
    color: #3498db;
}

.site-button {
    background-color: #2c3e50;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: background-color 0.3s ease;
}

.site-button i {
    margin-right: 8px;
}

.site-button:hover {
    background-color: #1a252f;
}

/* Search container styles */
.search-container {
    background-color: #f0f0f5;
    padding: 40px 0;
    text-align: center;
}

.search-box {
    position: relative;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    align-items: center;
}

#search-input {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid #ffcc80;
    border-radius: 25px;
    font-size: 16px;
    outline: none;
}

#search-input:focus {
    border-color: #ff8c00;
}

#search-button {
    margin-left: 10px;
    padding: 12px 20px;
    background-color: #ff8c00;
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 8px;
}

#search-button:hover {
    background-color: #e67e00;
}

/* Estilos para resultados de pesquisa em tempo real */
.search-results-container {
    position: absolute;
    width: 100%;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    max-height: 400px;
    overflow-y: auto;
    display: none;
    margin-top: 10px;
}

/* Posicionamento específico para a página inicial */
.search-box .search-results-container {
    top: 100%;
    left: 0;
    width: 100%;
}

/* Posicionamento específico para a página de visualização de artigo */
.search-bar .search-results-container {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    margin-top: 10px;
}

/* Ajuste para a barra de pesquisa na página de visualização de artigo */
.search-bar {
    position: relative;
}

.search-results-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.search-results-list li {
    padding: 0;
    border-bottom: 1px solid #eee;
}

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

.search-results-list a {
    display: block;
    padding: 12px 15px;
    color: #333;
    text-decoration: none;
    transition: background-color 0.2s;
}

.search-results-list a:hover {
    background-color: #f5f5f7;
}

.search-results-list i {
    margin-right: 10px;
    color: #f7941d;
}

.search-results-list .highlight {
    background-color: #ffe0b2;
    font-weight: bold;
    padding: 2px 0;
}

.no-results {
    padding: 15px;
    text-align: center;
    color: #666;
    font-style: italic;
}

/* Content container styles */
.content-container {
    max-width: 1200px;
    margin: 30px auto;
    display: flex;
    gap: 30px;
    padding: 0 20px;
}

.main-content {
    flex: 3;
    background-color: #ffffff;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    padding: 25px;
}

.main-content h2 {
    margin-bottom: 20px;
    font-size: 22px;
    color: #ff8c00;
}

/* Exibição de tópicos em formato de cards */
.topics-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 20px;
}

/* Responsividade para telas menores */
@media (max-width: 992px) {
    .topics-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .topics-container {
        grid-template-columns: 1fr; /* Uma coluna em telas menores */
    }
}

.topic-item {
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    padding: 25px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    height: 100%;
    min-height: 180px;
    position: relative;
    overflow: hidden;
}

.topic-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.topic-item:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background-color: #ff8c00;
}

.topic-icon {
    width: 70px;
    height: 70px;
    min-width: 70px;
    background-color: #fff3e0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    font-size: 28px;
    color: #ff8c00;
    transition: transform 0.3s;
}

.topic-item:hover .topic-icon {
    transform: scale(1.1);
}

.topic-text {
    font-size: 18px;
    font-weight: 600;
    color: #444;
    margin-top: 10px;
}

.topic-article-count {
    font-size: 14px;
    color: #777;
    margin-top: 8px;
    background-color: #f8f8f8;
    padding: 5px 10px;
    border-radius: 20px;
    display: inline-block;
}

/* Topic search styles */
.topic-search-container {
    margin: 20px 0;
}

.topic-search-box {
    display: flex;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    margin-bottom: 20px;
}

#topic-search-input {
    flex: 1;
    padding: 12px 15px;
    border: none;
    outline: none;
    font-size: 16px;
}

#topic-search-clear {
    background: none;
    border: none;
    padding: 0 15px;
    cursor: pointer;
    color: #999;
    font-size: 16px;
    transition: color 0.3s;
}

#topic-search-clear:hover {
    color: #ff8c00;
}

.no-topics-found {
    text-align: center;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    color: #666;
    font-style: italic;
}

/* Sidebar styles */
.sidebar {
    flex: 1;
    background-color: #ffffff;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    padding: 25px;
    height: fit-content;
}

.sidebar-section {
    margin-bottom: 35px;
}

.sidebar-section:last-child {
    margin-bottom: 0;
}

.sidebar-section h3 {
    margin-bottom: 20px;
    font-size: 18px;
    color: #ff8c00;
    padding-bottom: 12px;
    border-bottom: 1px solid #ffe0b2;
}

.sidebar-section ul {
    padding-left: 5px;
    list-style: none;
}

.sidebar-section li {
    margin-bottom: 15px;
}

.sidebar-section a {
    display: block;
    padding: 8px 10px;
    color: #555;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.2s, color 0.2s;
}

.sidebar-section a:hover {
    background-color: #f5f5f7;
    color: #ff8c00;
}

.sidebar-section a.active {
    background-color: #fff4e6;
    color: #ff8c00;
    font-weight: 500;
}

.sidebar-section a i {
    margin-right: 10px;
    width: 16px;
    text-align: center;
}

/* Estilos específicos para a lista de tópicos na barra lateral */
#topics-sidebar-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

#topics-sidebar-list a {
    padding: 10px 12px;
    line-height: 1.4;
    font-size: 14px;
}

/* Estilos para artigos relacionados */
#related-articles {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

#related-articles a {
    padding: 10px 12px;
    line-height: 1.4;
    font-size: 14px;
}

.popular-articles {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-left: 5px;
}

.popular-articles li {
    margin-bottom: 5px;
    display: flex;
    align-items: flex-start;
}

.popular-articles a {
    color: #555;
    text-decoration: none;
    font-size: 14px;
    line-height: 1.4;
}

.popular-articles a:hover {
    text-decoration: underline;
    color: #ff8c00;
}

.sidebar-section p {
    margin-bottom: 15px;
    font-size: 14px;
    color: #666;
}

#contact-button {
    display: block;
    width: 100%;
    padding: 10px 20px;
    background-color: #ff8c00;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    margin-bottom: 15px;
    text-align: center;
}

#contact-button:hover {
    background-color: #e67e00;
}

/* Footer styles */
footer {
    background-color: #f0f0f5;
    color: #666;
    text-align: center;
    padding: 15px 0;
    margin-top: 40px;
    font-size: 14px;
}

/* Artigos page styles */
.topic-header {
    display: flex;
    align-items: center;
    margin-bottom: 25px;
}

.back-button {
    display: inline-flex;
    align-items: center;
    color: #666;
    text-decoration: none;
    margin-right: 20px;
    font-size: 14px;
    transition: color 0.3s;
}

.back-button:hover {
    color: #ff8c00;
}

.back-button i {
    margin-right: 5px;
}

.articles-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.article-item {
    background-color: #ffffff;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    padding: 20px;
    margin-bottom: 20px;
    transition: transform 0.2s, box-shadow 0.2s;
}

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

.article-title {
    font-size: 16px;
    font-weight: 500;
    color: #ff8c00;
    margin-bottom: 8px;
}

.article-description {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
}

.article-meta {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #888;
}

.article-date {
    display: flex;
    align-items: center;
}

.article-date i {
    margin-right: 5px;
}

.article-read-more {
    display: inline-flex;
    align-items: center;
    color: #ff8c00;
    text-decoration: none;
    font-weight: 500;
}

.article-read-more:hover {
    text-decoration: underline;
}

.article-read-more i {
    margin-left: 5px;
    font-size: 10px;
}

/* Admin login link styles */
.admin-login-link {
    text-align: center;
}

.admin-login-link a {
    display: block;
    width: 100%;
    padding: 10px 15px;
    background-color: #f5f5f7;
    border-radius: 4px;
    color: #555;
    text-decoration: none;
    transition: all 0.2s;
    font-size: 14px;
    text-align: center;
    box-sizing: border-box;
}

.admin-login-link a:hover {
    background-color: #ff8c00;
    color: white;
}

.admin-login-link a i {
    margin-right: 8px;
    color: #ff8c00;
}

.admin-login-link a:hover i {
    color: white;
}

/* Responsive styles */
@media (max-width: 900px) {
    .content-container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
    }
    
    .topics-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .search-box {
        flex-direction: column;
    }
    
    #search-input {
        width: 100%;
    }
    
    #search-button {
        margin-left: 0;
        margin-top: 10px;
        width: 100%;
        justify-content: center;
    }
}

/* Estilos para as sugestões de pesquisa */
.search-suggestions {
    text-align: center;
    margin-top: 10px;
    padding: 0 20px;
    font-size: 14px;
    font-weight: 300;
    color: #666;
}

.search-suggestions span {
    color: #666;
    margin-right: 10px;
    font-weight: 300;
}

.suggestion-text {
    display: inline-block;
    color: #444;
    padding: 2px 8px;
    margin: 0 5px;
    font-weight: 300;
}
