﻿/*
Theme Name: Jorge Tech News
Theme URI: https://jorgelar.com.br
Description: Tema moderno para portal de notícias tech
Version: 1.0
Author: Jorge Rossiter
*/

:root {
    --cor-principal: #00d4ff;
    --cor-secundaria: #6366f1;
    --cor-texto: #1f2937;
    --cor-fundo: #f8fafc;
    --cor-card: #ffffff;
    --sombra: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --sombra-hover: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --cor-borda: #e5e7eb;
    --bg-ad-space: #f1f5f9;
    --border-ad-space: #cbd5e1;
    --bg-fonte-original: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    --bg-categoria: #f3f4f6;
    --bg-categoria-hover: #e5e7eb;
    --text-categoria: #374151;
    --bg-badge-category: #0f172a;
    --text-badge-category: #f8fafc;
    --cor-texto-muted: #6b7280;
}

:root[data-theme="dark"] {
    --cor-texto: #f1f5f9;
    --cor-fundo: #0f172a;
    --cor-card: #1e293b;
    --sombra: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
    --sombra-hover: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
    --cor-borda: #334155;
    --bg-ad-space: #1e293b;
    --border-ad-space: #334155;
    --bg-fonte-original: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    --bg-categoria: #334155;
    --bg-categoria-hover: #475569;
    --text-categoria: #f1f5f9;
    --bg-badge-category: #0f172a; 
    --text-badge-category: #f8fafc;
    --cor-texto-muted: #9ca3af;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--cor-fundo);
    color: var(--cor-texto);
    line-height: 1.6;
}

/* HEADER */
.site-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 2rem 0;
    box-shadow: var(--sombra);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-title {
    font-size: 2rem;
    font-weight: 800;
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

.site-title:hover {
    opacity: 0.9;
}

.site-description {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
    margin-top: 5px;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    color: white;
    font-size: 1.5rem;
    transition: transform 0.3s;
}

.social-links a:hover {
    transform: scale(1.2);
}

/* CONTAINER PRINCIPAL */
.site-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 30px;
}

/* POSTS */
.posts-grid {
    display: grid;
    gap: 30px;
}

.post-card {
    background: var(--cor-card);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--sombra);
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--sombra-hover);
}

.post-featured-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.post-content {
    padding: 25px;
}

.post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 0.85rem;
    color: var(--cor-texto-muted);
    margin-bottom: 15px;
}

.post-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.post-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 15px;
    line-height: 1.3;
}

.post-title a {
    color: var(--cor-texto);
    text-decoration: none;
    transition: color 0.3s;
}

.post-title a:hover {
    color: var(--cor-principal);
}

.post-excerpt {
    color: var(--cor-texto);
    margin-bottom: 20px;
    line-height: 1.7;
}

.read-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: linear-gradient(135deg, var(--cor-principal), var(--cor-secundaria));
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s;
}

.read-more:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

/* SIDEBAR */
.sidebar {
    position: sticky;
    top: 120px;
    height: fit-content;
}

.widget {
    background: var(--cor-card);
    padding: 25px;
    border-radius: 12px;
    box-shadow: var(--sombra);
    margin-bottom: 25px;
}

.widget-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 3px solid var(--cor-principal);
}

/* ESPAÇO PARA ANÚNCIOS */
.ad-space {
    background: var(--bg-ad-space);
    border: 2px dashed var(--border-ad-space);
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    min-height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    font-size: 0.9rem;
}

.ad-space-horizontal {
    margin: 40px 0;
    min-height: 100px;
}

/* FONTE ORIGINAL */
.fonte-original {
    margin-top: 30px;
    padding: 20px;
    background: var(--bg-fonte-original);
    border-left: 4px solid var(--cor-principal);
    border-radius: 8px;
}

.fonte-original a {
    color: var(--cor-secundaria);
    font-weight: 600;
    text-decoration: none;
}

.fonte-original a:hover {
    text-decoration: underline;
}

/* PAGINAÇÃO */
.jorge-pagination {
    margin-top: 40px;
}

.jorge-pagination .screen-reader-text {
    display: none;
}

.jorge-pagination .nav-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.pagination-container .page-numbers,
.jorge-pagination a,
.jorge-pagination span.current {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 18px;
    background: linear-gradient(135deg, var(--cor-principal), var(--cor-secundaria));
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 700;
    transition: all 0.3s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.pagination-container .page-numbers:hover,
.jorge-pagination a:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
    color: white;
}

.pagination-container .page-numbers.current,
.jorge-pagination span.current {
    background: var(--cor-secundaria);
    box-shadow: inset 0 3px 5px rgba(0,0,0,0.2);
    cursor: default;
}

.jorge-pagination span.dots {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 10px;
    color: var(--cor-texto);
    font-weight: 600;
    background: transparent;
    box-shadow: none;
}

/* FOOTER */
.site-footer {
    background: #1f2937;
    color: white;
    padding: 40px 0 20px;
    margin-top: 60px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    text-align: center;
}

.footer-content p {
    margin: 10px 0;
    opacity: 0.8;
}

/* RESPONSIVO */
@media (max-width: 768px) {
    .site-container {
        grid-template-columns: 1fr;
        padding: 20px 15px;
    }
    
    .header-container {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
    
    .site-title {
        font-size: 1.5rem;
    }
    
    .sidebar {
        position: static;
    }
    
    .post-featured-image {
        height: 200px;
    }

    .single-post {
        padding: 20px 15px;
    }

    .single-post-title {
        font-size: 1.8rem;
    }

    .single-post-meta {
        gap: 12px;
        font-size: 0.8rem;
    }

    .atn-content, .single-post-content {
        overflow-wrap: break-word;
        word-break: break-word;
        word-wrap: break-word;
    }
}

/* ANIMAÇÕES */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.post-card {
    animation: fadeIn 0.6s ease-out;
}

/* SINGLE POST */
.single-post {
    background: var(--cor-card);
    padding: 40px;
    border-radius: 12px;
    box-shadow: var(--sombra);
}

.single-post-title {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 20px;
}

.single-post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    padding-bottom: 20px;
    margin-bottom: 30px;
    border-bottom: 2px solid var(--cor-borda);
    color: var(--cor-texto-muted);
}

.single-post-content {
    font-size: 1.1rem;
    line-height: 1.8;
}

.single-post-content p {
    margin-bottom: 20px;
}

.single-post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 30px 0;
}

/* BADGE AUTO-GERADO */
.badge-auto {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.2);
}

/* AJAX Loader */
.ajax-loader {
    width: 100%;
    margin: 40px 0;
    text-align: center;
    font-size: 1.1rem;
    color: var(--cor-texto);
    font-weight: 600;
}

.badge-source {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.2);
}

/* CLASSES DE UTILIDADE EXTRAÍDAS DO INLINE HTMl */
.category-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-grow: 1;
    gap: 8px;
    padding: 12px 24px;
    background: linear-gradient(135deg, var(--cor-principal), var(--cor-secundaria));
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s;
    border: none;
    box-shadow: var(--sombra);
}

.category-filter-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.category-pill:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
    color: white;
}

.social-links-sidebar {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 25px;
    padding: 15px 0;
    width: 100%;
}

.social-links-sidebar a {
    color: var(--cor-texto);
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.social-links-sidebar a:hover {
    transform: scale(1.2);
    color: var(--cor-principal);
}

.badge-category {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #6366f1, #4338ca);
    color: white;
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(99, 102, 241, 0.2);
}

.widget-theme-toggle {
    text-align: center;
}

.theme-switch {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.theme-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    gap: 8px;
    padding: 12px 18px;
    background: var(--cor-card);
    border: 2px solid var(--cor-borda);
    color: var(--cor-texto);
    border-radius: 8px;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.9rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--sombra);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.theme-btn:hover {
    transform: translateX(5px);
    border-color: var(--cor-principal);
    box-shadow: var(--sombra-hover);
}

.theme-btn.active {
    background: linear-gradient(135deg, var(--cor-principal), var(--cor-secundaria));
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}


/* Global Content Fixes */
.atn-content img, .single-post-content img {
    max-width: 100% !important;
    height: auto !important;
}

.atn-content, .single-post-content {
    overflow-wrap: break-word;
}

/* Espaçamento extra para o link da fonte */
.atn-source {
    margin-top: 35px !important;
    padding-top: 15px;
}

/* Fix sidebar grid position */
.site-container > aside {
    grid-column: 2;
    grid-row: 1;
}
.site-container > main {
    grid-column: 1;
    grid-row: 1;
}
