/* Header do site */
.site-header {
    background: var(--primary-color);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

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

.site-header h1 {
    font-size: 1.5rem;
    margin: 0;
}

.site-header h1 a {
    color: white;
    text-decoration: none;
}

.site-header nav {
    display: flex;
    gap: 2rem;
}

.site-header nav a {
    color: white;
    text-decoration: none;
    opacity: 0.8;
    transition: opacity 0.3s;
}

.site-header nav a:hover,
.site-header nav a.active {
    opacity: 1;
}

/* Blog Hero */
.blog-hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-color-dark, #2980b9) 100%);
    color: white;
    padding: 4rem 0;
    text-align: center;
    margin-bottom: -2rem;
}

.blog-hero h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.blog-hero p {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* Blog Main */
.blog-main {
    padding: 3rem 0;
    background: #f8f9fa;
    min-height: calc(100vh - 200px);
}

/* Search Form */
.blog-search {
    margin-bottom: 3rem;
    text-align: center;
}

.search-form {
    max-width: 500px;
    margin: 0 auto;
}

.search-input-group {
    display: flex;
    border-radius: 25px;
    overflow: hidden;
    box-shadow: 0 3px 15px rgba(0,0,0,0.1);
    background: white;
}

.search-input {
    flex: 1;
    padding: 1rem 1.5rem;
    border: none;
    font-size: 1rem;
    outline: none;
}

.search-button {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 1rem 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.search-button:hover {
    background: var(--primary-color-dark, #2980b9);
}

.search-info {
    margin-top: 1rem;
    color: #666;
}

.search-info strong {
    color: var(--primary-color);
}

.results-count {
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

.no-results {
    text-align: center;
    padding: 3rem;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.no-results h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.no-results p {
    color: #666;
    margin-bottom: 1rem;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Grid Layout */
.blog-grid-wrapper {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 3rem;
}

/* Search Results Header */
.search-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.search-results-header h2 {
    color: var(--primary-color);
    font-size: 1.5rem;
}

.clear-search {
    color: #666;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s;
}

.clear-search:hover {
    color: var(--primary-color);
}

/* Posts Grid */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
}

.post-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.post-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
}

.post-image {
    width: 100%;
    height: 220px;
    overflow: hidden;
    position: relative;
}

.post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.post-card:hover .post-image img {
    transform: scale(1.05);
}

.category-overlay {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: var(--primary-color);
    color: white;
    padding: 0.3rem 1rem;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 500;
    transition: background 0.3s;
}

.category-overlay:hover {
    background: var(--primary-color-dark, #2980b9);
}

.post-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.8rem;
    font-size: 0.85rem;
    color: #999;
}

.meta-separator {
    color: #ddd;
}

.post-content h2 {
    margin-bottom: 0.8rem;
    line-height: 1.3;
    font-size: 1.3rem;
}

.post-content h2 a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s;
}

.post-content h2 a:hover {
    color: var(--primary-color);
}

.excerpt {
    color: #666;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    flex: 1;
    font-size: 0.95rem;
}

.post-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.read-more {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    transition: gap 0.3s;
    font-size: 0.95rem;
}

.read-more:hover {
    gap: 0.8rem;
}

.read-more svg {
    width: 16px;
    height: 16px;
    stroke-width: 2;
}

.views-count {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    color: #999;
    font-size: 0.85rem;
}

.views-count svg {
    width: 16px;
    height: 16px;
    stroke-width: 1.5;
}

/* No Results */
.no-results {
    text-align: center;
    padding: 4rem 2rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.no-results svg {
    color: #ddd;
    margin-bottom: 2rem;
}

.no-results h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.no-results p {
    color: #666;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.no-results .btn-primary {
    margin-top: 1rem;
}

/* Sidebar */
.blog-sidebar {
    position: sticky;
    top: 2rem;
    height: fit-content;
}

.widget {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    margin-bottom: 2rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.widget h3 {
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.categories-list {
    list-style: none;
}

.categories-list li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #eee;
}

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

.categories-list a {
    color: var(--text-color);
    text-decoration: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.categories-list a:hover {
    color: var(--primary-color);
}

.cta-widget {
    background: var(--primary-color);
    color: white;
    text-align: center;
}

.cta-widget h3,
.cta-widget p {
    color: white;
}

.cta-widget .btn-primary {
    background: white;
    color: var(--primary-color);
    margin-top: 1rem;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 3rem;
}

.pagination a,
.pagination span {
    padding: 0.5rem 1rem;
    border-radius: 5px;
}

.pagination a {
    background: white;
    color: var(--primary-color);
    text-decoration: none;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    transition: background 0.3s, color 0.3s;
}

.pagination a:hover {
    background: var(--primary-color);
    color: white;
}

.pagination .current {
    background: #f0f0f0;
    color: #666;
}

/* Footer */
.site-footer {
    background: #2c3e50;
    color: white;
    padding: 2rem 0;
    text-align: center;
}

/* Tags Cloud */
.tags-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag-cloud-item {
    background: #f0f0f0;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    text-decoration: none;
    color: #666;
    font-size: 0.85rem;
    transition: all 0.3s;
}

.tag-cloud-item:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

/* Newsletter Widget */
.newsletter-widget {
    background: #f8f9fa;
}

.newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
}

.newsletter-form input {
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 0.95rem;
}

.newsletter-form .btn-primary {
    width: 100%;
}

/* Search Widget */
.search-widget .search-input-wrapper {
    display: flex;
    border: 1px solid #ddd;
    border-radius: 25px;
    overflow: hidden;
}

.search-widget .search-input {
    flex: 1;
    padding: 0.7rem 1rem;
    border: none;
    outline: none;
    font-size: 0.95rem;
}

.search-widget .search-submit {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0 1rem;
    cursor: pointer;
    transition: background 0.3s;
}

.search-widget .search-submit:hover {
    background: var(--primary-color-dark, #2980b9);
}

/* Posts List Widget */
.posts-list {
    list-style: none;
    padding: 0;
}

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

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

.posts-list a {
    text-decoration: none;
    color: var(--text-color);
    display: block;
}

.posts-list h4 {
    margin-bottom: 0.3rem;
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.3;
    transition: color 0.3s;
}

.posts-list a:hover h4 {
    color: var(--primary-color);
}

.posts-list time,
.posts-list .views-count {
    color: #999;
    font-size: 0.85rem;
}

/* Responsivo */
@media (max-width: 1024px) {
    .blog-grid-wrapper {
        grid-template-columns: 1fr;
    }
    
    .blog-sidebar {
        position: static;
        margin-top: 3rem;
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .blog-hero h1 {
        font-size: 2rem;
    }
    
    .blog-hero p {
        font-size: 1rem;
    }
    
    .posts-grid {
        grid-template-columns: 1fr;
    }
    
    .blog-sidebar {
        grid-template-columns: 1fr;
    }
    
    .site-header .container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .post-image {
        height: 200px;
    }
    
    .search-results-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
}