/**
 * BLOG DE NOTÍCIAS - ESTILOS
 * CSS Principal
 */

/* Reset e Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f5f5f5;
}

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

img {
    max-width: 100%;
    height: auto;
}

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

/* Header */
.header {
    width: 100%;
    overflow-x: hidden;
    background: linear-gradient(135deg, #1a73e8, #0d47a1);
    color: white;
    padding: 4px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 16px;
    font-weight: bold;
    color: white;
}

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

.nav ul {
    display: flex;
    list-style: none;
    gap: 8px;
}

.nav a {
    color: white;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 12px;
    transition: background 0.3s;
}

.nav a:hover {
    background: rgba(255,255,255,0.2);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-form {
    display: flex;
    background: rgba(255,255,255,0.2);
    border-radius: 15px;
    overflow: hidden;
}

.search-form input {
    border: none;
    background: transparent;
    padding: 4px 10px;
    color: white;
    outline: none;
    font-size: 12px;
}

.search-form input::placeholder {
    color: rgba(255,255,255,0.7);
}

.search-form button {
    background: #34a853;
    border: none;
    padding: 4px 10px;
    color: white;
    cursor: pointer;
    font-size: 12px;
}

.btn-admin {
    background: rgba(255,255,255,0.2);
    padding: 4px 8px;
    border-radius: 50%;
    color: white;
    font-size: 11px;
}

/* Main Content */
main.container {
    padding: 30px 20px;
}

/* Seção Destaques */
.destaques h2, .noticias h2 {
    color: #1a73e8;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 3px solid #1a73e8;
}

.destaques-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

.card-destaque {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 3px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

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

.card-destaque img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.card-destaque .card-content {
    padding: 20px;
}

.categoria {
    display: inline-block;
    background: #1a73e8;
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    margin-bottom: 10px;
}

.card-destaque h3 a {
    color: #333;
    font-size: 18px;
}

.card-destaque h3 a:hover {
    color: #1a73e8;
}

.card-destaque p {
    color: #666;
    font-size: 14px;
    margin: 10px 0;
}

.meta {
    display: flex;
    gap: 15px;
    font-size: 12px;
    color: #999;
}

.meta i {
    margin-right: 5px;
}

/* Seção Notícias */
.noticias-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.card-noticia {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

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

.card-noticia img {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.card-noticia .card-content {
    padding: 15px;
}

.card-noticia h3 {
    font-size: 16px;
    margin-bottom: 10px;
}

.card-noticia h3 a:hover {
    color: #1a73e8;
}

.card-noticia p {
    font-size: 13px;
    color: #666;
}

/* Página da Notícia */
.noticia-completa {
    background: white;
    border-radius: 10px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
}

.noticia-completa header {
    margin-bottom: 20px;
}

.noticia-completa h1 {
    color: #333;
    font-size: 32px;
    margin: 15px 0;
}

.noticia-completa .meta {
    margin-top: 10px;
}

.imagem-principal {
    width: 100%;
    border-radius: 10px;
    margin-bottom: 20px;
}

.resumo {
    background: #f8f9fa;
    padding: 20px;
    border-left: 4px solid #1a73e8;
    margin-bottom: 20px;
}

.conteudo {
    font-size: 18px;
    line-height: 1.8;
}

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

.partilhar {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.partilhar a {
    display: inline-flex;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin-right: 10px;
    color: white;
}

.partilhar .fa-facebook { background: #1877f2; }
.partilhar .fa-twitter { background: #1da1f2; }
.partilhar .fa-whatsapp { background: #25d366; }

/* Comentários */
.comentarios {
    background: white;
    border-radius: 10px;
    padding: 30px;
    margin-bottom: 30px;
}

.comentarios h3 {
    margin-bottom: 20px;
    color: #1a73e8;
}

.form-comentario {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
}

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

.form-group input, .form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
}

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

.form-comentario button {
    background: #1a73e8;
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
}

.comentario {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 15px;
}

.comentario-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 14px;
}

.comentario p {
    color: #333;
}

/* Notícias Relacionadas */
.relacionadas {
    background: white;
    border-radius: 10px;
    padding: 30px;
}

.relacionadas h3 {
    color: #1a73e8;
    margin-bottom: 20px;
}

.relacionadas-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.card-relacionada img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 10px;
}

.card-relacionada h4 {
    margin-top: 10px;
}

.card-relacionada a:hover {
    color: #1a73e8;
}

/* Footer */
.footer {
    background: #1a1a2e;
    color: white;
    padding: 40px 0 20px;
    margin-top: 40px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.footer-col h4 {
    margin-bottom: 20px;
    color: #34a853;
}

.footer-col ul {
    list-style: none;
}

.footer-col li {
    margin-bottom: 10px;
}

.footer-col a:hover {
    color: #34a853;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    display: inline-flex;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    font-size: 18px;
}

.social-links a:hover {
    background: #34a853;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    margin-top: 30px;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 14px;
}

/* Alertas */
.alert {
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 15px;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Responsivo */
@media (max-width: 992px) {
    .destaques-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .noticias-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .header .container {
        flex-direction: column;
        gap: 15px;
    }
    .nav ul {
        flex-wrap: wrap;
        justify-content: center;
    }
    .destaques-grid {
        grid-template-columns: 1fr;
    }
    .noticias-grid {
        grid-template-columns: 1fr;
    }
    .relacionadas-grid {
        grid-template-columns: 1fr;
    }
    .footer-grid {
        grid-template-columns: 1fr;
    }
}

/* Formatação Markdown para Descrição Longa */
.conteudo {
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.conteudo h1, .conteudo h2, .conteudo h3 {
    margin: 20px 0 10px;
    color: #1a73e8;
}
.conteudo h1 { font-size: 28px; border-bottom: 2px solid #eee; padding-bottom: 10px; }
.conteudo h2 { font-size: 24px; }
.conteudo h3 { font-size: 20px; }
.conteudo ul, .conteudo ol {
    margin: 15px 0;
    padding-left: 30px;
}
.conteudo li { margin-bottom: 8px; }
.conteudo blockquote {
    border-left: 4px solid #34a853;
    padding: 10px 15px;
    margin: 15px 0;
    color: #666;
    font-style: italic;
    background: #f9f9f9;
    border-radius: 0 8px 8px 0;
}
.conteudo code {
    background: #f4f4f4;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Consolas', monospace;
    font-size: 0.9em;
}
.conteudo pre {
    background: #2d2d2d;
    color: #f8f8f2;
    padding: 15px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 15px 0;
}
.conteudo pre code {
    background: none;
    padding: 0;
    color: inherit;
}
.conteudo img {
    max-width: 100%;
    border-radius: 8px;
    margin: 15px 0;
}
.conteudo table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
}
.conteudo th, .conteudo td {
    border: 1px solid #ddd;
    padding: 10px;
    text-align: left;
}
.conteudo th {
    background: #1a73e8;
    color: white;
}
.conteudo hr {
    border: none;
    border-top: 2px solid #eee;
    margin: 25px 0;
}
