/* Variáveis CSS */
:root {
    --primary-color: #4f46e5;
    --primary-hover: #4338ca;
    --secondary-color: #1e40af;
    --text-color: #1f2937;
    --text-muted: #6b7280;
    --background: #ffffff;
    --background-light: #f9fafb;
    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --gradient-primary: linear-gradient(135deg, #4f46e5 0%, #1e40af 100%);
    --success-bg: rgba(34, 197, 94, 0.1);
    --success-text: #22c55e;
    --success-border: #22c55e;
}

/* Reset e estilos base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background);
}

/* Header e Navegação */
header {
    background-color: var(--background);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
}

@media only screen and (max-width: 768px) {
    header{
        position: relative;
        .search-form{
            margin-left: 60px
        }
        #menuToggle{
            position: fixed;
            background: var(--background-light);
            border: 1px solid var(--border-color);
            border-radius: 12px;
            left: 18px;
        }
    }
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

nav h1 {
    font-size: 1.75rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 700;
}

nav ul {
    display: flex;
    gap: 2rem;
    list-style: none;
}

nav a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background: var(--gradient-primary);
    transition: width 0.3s ease;
}

nav a:hover::after {
    width: 100%;
}

/* Conteúdo Principal */
main {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.destaques {
    background-color: var(--light-background);
    border-radius: 0.5rem;
    padding: 2rem;
    margin-bottom: 2rem;
}

@media only screen and (max-width: 768px) {
    .destaques{
        padding: 0;
    }
}

.destaques h2 {
    color: var(--text-color);
    margin-bottom: 1.5rem;
    font-size: 1.875rem;
}

/* Footer */
footer {
    background: var(--background-light);
    padding: 3rem 0;
    margin-top: 4rem;
}

footer .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.social-links {
    display: flex;
    gap: 1.5rem;
}

.social-links a {
    color: var(--text-muted);
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 1.25rem;
}

.social-links a:hover {
    color: var(--primary-color);
    transform: translateY(-2px);
}

/* Responsividade */
@media (max-width: 1024px) {
    .noticias-destaque {
        grid-template-columns: 1fr;
    }

    .noticia-principal img {
        height: 300px;
    }
}

@media (max-width: 768px) {
    nav {
        flex-direction: column;
        gap: 1rem;
    }

    nav ul {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .banner-principal h1 {
        font-size: 2rem;
    }

    .banner-principal p {
        font-size: 1rem;
    }

    .newsletter-form {
        flex-direction: column;
    }

    footer .container {
        flex-direction: column;
        gap: 2rem;
        text-align: center;
    }

    .social-links {
        justify-content: center;
    }
}

/* Animações */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.noticia-card,
.noticia-principal,
.noticia-secundaria {
    animation: fadeIn 0.5s ease-out forwards;
}

/* Utilitários */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Grid de Notícias */
.noticias-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    padding: 2rem 0;
}

.mais-sobre{
    text-align: center;
    font-size: 18px;
    b{
        color: #45f;
    }
    &:before{
        content: '';
        background: #45f1;
        width: 100%;
        height: 2px;
        border-radius: 6px;
        display: flex;
        margin-left: auto;
        margin-right: auto;
        margin-bottom: 42px;
        margin-top: 60px;
        max-width: 800px
    }
}

.mais_noticias{
    padding-top: 18px;
    position: relative;
    & .noticia-imagem{
        margin-bottom: 0;
    }
    & .noticia-titulo{
        font-size: 18px;
        margin: 0;
        padding: 0;
        text-align: center;
        &:after{
            display:none;
        }
    }
    & .noticia-meta{
        margin: 0;
        padding: 6px 1rem;
    }
    .noticia-content{
        position: relative;
        padding: 12px;
        position: absolute;
        bottom: 0;
        left: 0;
        background: #0005;
        a{
            color: #fff!important;
        }
        .noticia-data{
            position: absolute;
            top: -34px;
            font-size: 14px;
            right: 1px;
            background: #0005;
            padding: 6px 12px;
            border-radius: 15px 0 0;
            color: #fffc;
        }
    }
}

@media only screen and (max-width: 768px) {
    .noticias-grid{
        grid-template-columns: repeat(auto-fill, minmax(100%, 1fr));
    }
}

.noticia-card {
    background: var(--background);
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    max-width: 500px;
    & img{
        transition: 1s!important;;
    }
    &:hover img{
        scale:1.05
    }
}

.noticia-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.noticia-imagem {
    width: 100%;
    object-fit: cover;
    display: flex;
    aspect-ratio: 1 / .75;
    height: auto;
    & img{
        object-fit: cover;
        display: flex;
        height: 100%;
        width: 100%;
    }
}

.noticia-content {
    padding: 1.5rem;
}

.noticia-categoria{
    color: #fff;
    background: #45f2;
    padding: 6px 12px;
    border-radius: 6px;
    display: flex;
    width: max-content;
    background: #45f;
    color: #fff;
}

.noticia-titulo {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    line-height: 1.4;
}

.noticia-titulo a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.noticia-titulo a:hover {
    color: var(--primary-color);
}

.noticia-resumo {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.noticia-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.noticia-data {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-ler-mais {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    background: var(--background-light);
    color: white;
    background: var(--gradient-primary);
}

.btn-ler-mais:hover {
    color: var(--primary-hover);
    background: var(--gradient-primary);
    color: white;
}

.btn-ler-mais i {
    transition: transform 0.3s ease;
}

.btn-ler-mais:hover i {
    transform: translateX(3px);
}

/* Newsletter */
.newsletter {
    background: var(--gradient-primary);
    color: white;
    padding: 3rem 2rem;
    border-radius: 1rem;
    text-align: center;
    margin: 4rem 0;
    position: relative;
}

.newsletter h3 {
    font-size: 1.75rem;
    margin-bottom: 1rem;
}

.newsletter p {
    margin-bottom: 2rem;
    opacity: 0.9;
}

.newsletter-form {
    display: flex;
    gap: 1rem;
    max-width: 500px;
    margin: 0 auto;
}

.newsletter-form input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 0.5rem;
    font-size: 1rem;
}

.newsletter-form button {
    padding: 0.75rem 2rem;
    background: white;
    color: var(--primary-color);
    border: none;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 18px;
    font-family:inherit;
    font-weight: bold;
}

.newsletter-form button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.newsletter-message {
    position: absolute;

    left: 50%;
    transform: translateX(-50%);
    background: #555;
    padding: 1rem 2rem;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: var(--shadow-lg);
    animation: slideDown 0.5s ease-out forwards;
    z-index: 10;
    bottom: 90px;
    z-index: 9999999999999999999999;
    display: flex;
    position: fixed;
    background: #45f!important;
    color: #fff;
}

.newsletter-message.success {
    background-color: var(--success-bg);
    color: var(--success-text);
    border: 1px solid var(--success-border);
    color: #fff;
}

.newsletter-message i {
    font-size: 1.2rem;
}

.newsletter-message p {
    margin: 0;
    font-weight: 500;
}

.newsletter-message .close-message{
    background: #fff3;
    color: #fffa;
    border-radius: 60px;
    width: 36px;
    height: 30px;
    border: 0;
    padding: 0;
    padding: 0;
    cursor: pointer;
    margin-left: 18px;
    &:hover{
        scale:1.1;
        color: #faa;
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translate(-50%, -20px);
    }
    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

/* Menu Lateral */
.menu-toggle {
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-color);
    background: none;
    border: none;
    font-size: 1rem;
}

.menu-lateral {
    position: fixed;
    top: 0;
    left: -300px;
    width: 300px;
    height: 100vh;
    background: var(--background-light);
    z-index: 9999;
    transition: left 0.3s ease;
    border-right: 1px solid var(--border-color);
    padding: 2rem;
    box-shadow: 2px 0 5px var(--shadow-color);
}

.menu-lateral.active {
    left: 0;
}

.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    display: none;
}

.menu-overlay.active {
    display: block;
}

.menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.menu-close {
    background: none;
    border: none;
    color: var(--text-color);
    cursor: pointer;
    font-size: 1.25rem;
}

.menu-nav {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.menu-nav a {
    color: var(--text-color);
    text-decoration: none;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    width: 100%;
}

.menu-nav a:hover {
    background: var(--primary-color);
    color: white;
}

/* Header Atualizado */
.top-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 2rem;
    background: var(--background-light);
    border-bottom: 1px solid var(--border-color);
}

#mobile-logo{
    display: none;
}

@media only screen and (max-width: 768px) {
    #mobile-logo{
        display: flex;
        width: calc(100% - 0px);
        height: auto;
        margin: auto;
        & img{
            width: 100%;
            display: flex;
            padding: 12px;
        }

    }
}

.header-left {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.header-center {
    font-size: 1.5rem;
    font-weight: bold;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    left: 0px;
    width: max-content;
    left: 0;
    right: 0;
    margin: auto;
    cursor: pointer;
    & img{
        width: 165px;
    }
}

.search-form {
    position: relative;
    width: 300px;
}

.search-form input {
    width: 100%;
    padding: 0.5rem 1rem;
    padding-left: 2.5rem;
    border: 1px solid var(--border-color);
    border-radius: 2rem;
    background: var(--background);
    color: var(--text-color);
    font-size: 0.875rem;
    border: 0;
    background: transparent;
    outline: none;
}

.search-form i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

/* Categorias no Topo */
.top-categories {
    display: flex;
    justify-content: center;
    gap: 2rem;
    padding: 1rem;
    background: var(--background-light);
    border-bottom: 1px solid var(--border-color);
    overflow-x: auto;
    white-space: nowrap;
    justify-content: start;
}

.top-categories a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s ease;
    font-size: 0.875rem;
}

.top-categories a:hover {
    color: var(--primary-color);
}

@media (max-width: 768px) {
    .header-center {
        display: none;
    }

    .search-form {
        width: auto;
        flex: 1;
        margin: 0 1rem;
        margin-left: -24px;
    }

    .top-categories {
        padding: 0.5rem;
        gap: 1rem;
    }
}

/* Estilos do Banner Principal */
.banner-principal {
    background: var(--gradient-primary);
    color: white;
    padding: 4rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.banner-principal::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('/assets/images/pattern.svg') repeat;
    opacity: 0.1;
}

.banner-principal h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
    display: none;
}

.banner-principal p {
    font-size: 1.25rem;
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* Grid de Destaques */
.noticias-destaque {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 2rem;
    margin: 2rem 0;
}

@media only screen and (max-width: 768px) {
    .noticias-destaque {
        display: flex;
        flex-direction: column;
    }
}

.noticia-principal {
    background: var(--background);
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    transition: transform 0.3s ease;
    & img{
        transition: 1s!important;;
    }
    &:hover img{
        scale:1.05
    }
}

.noticia-principal:hover {
    transform: translateY(-5px);
}

.noticia-principal img {
    width: 100%;
    
    object-fit: cover;
    aspect-ratio: 1 / .75;
    height: auto;
}

.noticia-principal .noticia-content {
    padding: 2rem;
}

.noticia-principal .noticia-titulo a {
    font-size: 1.75rem;
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.noticia-principal .noticia-titulo a:hover {
    color: var(--primary-color);
}

.noticia-secundaria {
    background: var(--background);
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: transform 0.3s ease;
    & img{
        transition: 1s!important;;
    }
    &:hover img{
        scale:1.05
    }
}

.noticia-secundaria:hover {
    transform: translateY(-5px);
}

.noticia-secundaria img {
    width: 100%;
    height: auto;
    object-fit: cover;
    aspect-ratio: 1 / .75;
}

/* Categorias */
.categorias {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    justify-content: center;
}

.categoria {
    background: var(--card-background);
    padding: 0.5rem 1.5rem;
    border-radius: 2rem;
    color: var(--text-color);
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.categoria:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

.sem-noticias {
    text-align: center;
    color: var(--text-muted);
    padding: 2rem;
    background: var(--card-background);
    border-radius: 0.75rem;
    border: 1px solid var(--border-color);
}

/* Tema Escuro */
:root[data-theme="dark"] {
    --primary-color: #6366f1;
    --primary-hover: #4f46e5;
    --text-color: #f9fafb;
    --text-muted: #9ca3af;
    --background: #111827;
    --background-light: #1f2937;
    --border-color: #374151;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
}

.theme-toggle {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 9999;
    background: var(--background-light);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px var(--shadow-color);
}

.theme-toggle:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 6px var(--shadow-color);
}

.theme-toggle i {
    font-size: 1rem;
}

@media (max-width: 768px) {
    .theme-toggle span {
        display: none;
    }
}

footer {
    background-color: var(--background-light);
    color: var(--text-muted);
    padding: 2rem 0;
    margin-top: 4rem;
    border-top: 1px solid var(--border-color);
}