/* ==========================================
   RESET E CONFIGURAÇÕES GERAIS
   ========================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333333;
    background-color: #f5f5f5;
}

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

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

ul {
    list-style: none;
}

/* ==========================================
   CONTAINER
   ========================================== */

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

/* ==========================================
   HEADER
   ========================================== */

.header {
    background-color: #ffffff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
}

.logo h1 {
    font-size: 1.8rem;
    color: #1e73be;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.nav ul {
    display: flex;
    gap: 30px;
}

.nav a {
    color: #333333;
    font-weight: 500;
    font-size: 0.95rem;
    padding: 8px 0;
    border-bottom: 2px solid transparent;
}

.nav a:hover,
.nav a.active {
    color: #1e73be;
    border-bottom-color: #1e73be;
}

/* ==========================================
   HERO SECTION
   ========================================== */

.hero {
    background: url('https://images.pexels.com/photos/1181467/pexels-photo-1181467.jpeg?auto=compress&cs=tinysrgb&w=1600') center/cover no-repeat;
    color: #ffffff;
    text-align: center;
    padding: 80px 20px;
    position: relative;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(30, 115, 190, 0.9) 0%, rgba(13, 90, 158, 0.85) 100%);
    z-index: 1;
}

.hero .container {
    position: relative;
    z-index: 2;
}

.hero h2 {
    font-size: 3rem;
    margin-bottom: 15px;
    font-weight: 700;
}

.hero p {
    font-size: 1.2rem;
    opacity: 0.95;
    max-width: 700px;
    margin: 0 auto 30px;
}

/* Hero Search */
.hero-search {
    max-width: 600px;
    margin: 0 auto;
}

.hero-search form {
    display: flex;
    background-color: #ffffff;
    border-radius: 50px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.hero-search-input {
    flex: 1;
    padding: 18px 25px;
    border: none;
    font-size: 1rem;
    outline: none;
    background: transparent;
}

.hero-search-input::placeholder {
    color: #999999;
}

.hero-search-button {
    padding: 18px 25px;
    background-color: #1e73be;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
}

.hero-search-button:hover {
    background-color: #0d5a9e;
}

.hero-search-button svg {
    color: #ffffff;
}

/* ==========================================
   MAIN CONTENT
   ========================================== */

.main-content {
    padding: 50px 0;
}

.content-wrapper {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 30px; /* Reduzido de 40px */
    align-items: start; /* faz com que cada célula tenha a altura do seu conteúdo */
}

/* ==========================================
   POSTS AREA
   ========================================== */

.posts-area {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.post-card {
    background-color: #ffffff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.post-image {
    width: 100%;
    height: 300px;
    overflow: hidden;
}

.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);
}

.post-content {
    padding: 20px; /* Reduzido de 25px */
}

.post-meta {
    display: flex;
    gap: 15px;
    margin-bottom: 12px; /* Reduzido de 15px */
    font-size: 0.85rem;
}

.post-date {
    color: #666666;
}

.post-category {
    color: #1e73be;
    font-weight: 600;
}

.post-title {
    font-size: 1.5rem;
    color: #333333;
    margin-bottom: 12px; /* Reduzido de 15px */
    font-weight: 700;
    line-height: 1.3;
}

.post-card:hover .post-title {
    color: #1e73be;
}

.post-excerpt {
    color: #666666;
    margin-bottom: 18px; /* Reduzido de 20px */
    line-height: 1.7;
}

.btn-read-more {
    display: inline-block;
    background-color: #1e73be;
    color: #ffffff;
    padding: 12px 30px;
    border-radius: 5px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: background-color 0.3s ease;
}

.btn-read-more:hover {
    background-color: #0d5a9e;
}

/* ==========================================
   SIDEBAR
   ========================================== */

.sidebar {
    display: flex;
    flex-direction: column;
    gap: 25px; /* Reduzido de 30px */
}

.widget {
    background-color: #ffffff;
    border-radius: 10px;
    padding: 20px; /* Reduzido de 25px */
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.08);
}

.widget-title {
    font-size: 1.2rem;
    color: #333333;
    margin-bottom: 18px; /* Reduzido de 20px */
    font-weight: 700;
    padding-bottom: 10px; /* Reduzido de 12px */
    border-bottom: 2px solid #1e73be;
}

/* Search Widget */
.search-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.search-input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 5px;
    font-size: 0.95rem;
    transition: border-color 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: #1e73be;
}

.search-button {
    padding: 12px;
    background-color: #1e73be;
    color: #ffffff;
    border: none;
    border-radius: 5px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.search-button:hover {
    background-color: #0d5a9e;
}

/* Categories Widget */
.categories-list li {
    border-bottom: 1px solid #f0f0f0;
}

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

.categories-list a {
    display: flex;
    justify-content: space-between;
    padding: 10px 0; /* Reduzido de 12px */
    color: #333333;
    transition: color 0.3s ease;
}

.categories-list a:hover {
    color: #1e73be;
}

.categories-list .count {
    color: #999999;
    font-size: 0.9rem;
}

/* Recent Posts Widget */
.recent-posts {
    display: flex;
    flex-direction: column;
    gap: 12px; /* Reduzido de 15px */
}

.recent-post-item {
    display: flex;
    gap: 10px; /* Reduzido de 12px */
}

.recent-post-thumb {
    width: 70px;
    height: 70px;
    border-radius: 5px;
    overflow: hidden;
    flex-shrink: 0;
}

.recent-post-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.recent-post-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 3px; /* Reduzido de 5px */
}

.recent-post-content a {
    color: #333333;
    font-weight: 600;
    font-size: 0.9rem;
    line-height: 1.4;
    transition: color 0.3s ease;
}

.recent-post-content a:hover {
    color: #1e73be;
}

.recent-post-date {
    color: #999999;
    font-size: 0.8rem;
}

/* Ad Widget */
.ad-space {
    display: flex;
    justify-content: center;
}

.ad-placeholder {
    width: 300px;
    height: 250px;
    background: linear-gradient(135deg, #f0f0f0 0%, #e0e0e0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 5px;
    border: 2px dashed #cccccc;
}

.ad-placeholder p {
    color: #999999;
    font-weight: 600;
    text-align: center;
    line-height: 1.8;
}

/* Tags Widget */
.tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px; /* Reduzido de 10px */
}

.tag-link {
    display: inline-block;
    padding: 6px 12px; /* Reduzido de 8px 15px */
    background-color: #f0f0f0;
    color: #333333;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.tag-link:hover {
    background-color: #1e73be;
    color: #ffffff;
}

/* Search Results Grid - 2 columns */
.search-results-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px; /* Reduzido de 30px */
}

/* Garante que os cards no grid usem flex column e altura total */
.search-results-grid .post-card {
    display: flex;
    flex-direction: column;
    height: 100%; /* já é implícito, mas reforça */
}


.search-results-grid .post-image {
    height: 160px; /* Reduzido de 180px */
}

/* O conteúdo deve ocupar toda a altura e também ser flex column */
.search-results-grid .post-content {
    display: flex;
    flex-direction: column;
    flex-grow: 1; /* expande para ocupar a altura total do card */
    padding: 20px; /* mantenha o padding desejado */
}


/* O resumo (excerpt) cresce para ocupar o espaço vazio */
.search-results-grid .post-excerpt {
    flex-grow: 1; /* faz o resumo expandir */
    margin-bottom: 15px; /* espaço antes do botão (ajustável) */
}

/* Remove qualquer margin ou padding extra que possa atrapalhar */
.search-results-grid .post-content > *:last-child {
    margin-bottom: 0; /* garante que o último elemento (botão) não tenha margem inferior */
}

.search-results-grid .btn-read-more {
    display: inline-block;
}

/* ==========================================
   CONTACT PAGE
   ========================================== */

.contact-form .form-group {
    margin-bottom: 20px;
}

.contact-form .form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333333;
    font-weight: 600;
    font-size: 0.95rem;
}

.contact-form .form-group input,
.contact-form .form-group select,
.contact-form .form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 5px;
    font-family: inherit;
    font-size: 0.95rem;
    transition: border-color 0.3s ease;
    background-color: #ffffff;
}

.contact-form .form-group input:focus,
.contact-form .form-group select:focus,
.contact-form .form-group textarea:focus {
    outline: none;
    border-color: #1e73be;
}

.contact-form .form-group textarea {
    resize: vertical;
    min-height: 150px;
}

.contact-form .form-group select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 35px;
}

.contact-form .form-actions {
    text-align: center;
    margin-top: 25px;
}

.contact-form .btn-submit {
    background-color: #1e73be;
    color: #ffffff;
    padding: 14px 40px;
    border: none;
    border-radius: 5px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.contact-form .btn-submit:hover {
    background-color: #0d5a9e;
}

/* Contact Info */
.contact-info {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.contact-info-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: 8px;
    border-left: 4px solid #1e73be;
}

.contact-info-icon {
    font-size: 1.5rem;
    line-height: 1;
}

.contact-info-text strong {
    display: block;
    color: #333333;
    font-size: 1rem;
    margin-bottom: 4px;
}

.contact-info-text p {
    color: #666666;
    font-size: 0.95rem;
    margin: 0;
}

/* ==========================================
   FOOTER
   ========================================== */

.footer {
    background-color: #333333;
    color: #ffffff;
    padding: 40px 0 20px; /* Reduzido padding-top de 50px para 40px */
    margin-top: 30px; /* Reduzido de 50px */
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px; /* Reduzido de 40px */
    margin-bottom: 30px; /* Reduzido de 40px */
}

.footer-column h4 {
    font-size: 1.1rem;
    margin-bottom: 15px; /* Reduzido de 20px */
    color: #ffffff;
    font-weight: 700;
}

.footer-column p {
    color: #cccccc;
    line-height: 1.7;
    margin-bottom: 8px; /* Reduzido de 10px */
    font-size: 0.9rem;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 8px; /* Reduzido de 10px */
}

.footer-links a {
    color: #cccccc;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #1e73be;
}

/* Footer Logo */
.footer-logo {
    text-align: left;
}

.footer-logo-img {
    margin-bottom: 15px;
}

.footer-logo-img svg {
    display: block;
}

.footer-bottom {
    border-top: 1px solid #555555;
    padding-top: 18px; /* Reduzido de 20px */
    text-align: center;
}

.footer-bottom p {
    color: #999999;
    font-size: 0.85rem;
}

/* Social Media Links */
.social-links {
    display: flex;
    gap: 12px; /* Reduzido de 15px */
    margin-top: 12px; /* Reduzido de 15px */
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px; /* Reduzido de 40px */
    height: 36px; /* Reduzido de 40px */
    background-color: #1e73be;
    color: #ffffff;
    border-radius: 50%;
    font-size: 1.2rem; /* Reduzido de 1.3rem */
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.social-links a:hover {
    background-color: #0d5a9e;
    transform: scale(1.1);
}

/* ==========================================
   SINGLE POST PAGE
   ========================================== */

.post-single-wrapper {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 30px; /* Reduzido de 40px */
}

.post-single-content {
    background-color: #ffffff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.08);
}

.single-post-image {
    width: 100%;
    height: 500px;
    overflow: hidden;
}

.single-post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.single-post-body {
    padding: 40px; /* Reduzido de 50px */
}

.single-post-meta {
    display: flex;
    gap: 18px; /* Reduzido de 20px */
    margin-bottom: 20px; /* Reduzido de 25px */
    padding-bottom: 18px; /* Reduzido de 20px */
    border-bottom: 2px solid #f0f0f0;
}

.single-post-date,
.single-post-author,
.single-post-category {
    display: flex;
    flex-direction: column;
    gap: 4px; /* Reduzido de 5px */
}

.single-post-date span,
.single-post-author span,
.single-post-category span {
    font-size: 0.8rem; /* Reduzido de 0.85rem */
    color: #999999;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.single-post-date strong,
.single-post-author strong,
.single-post-category strong {
    color: #333333;
    font-size: 1rem;
    text-transform: none;
    letter-spacing: normal;
}

.single-post-title {
    font-size: 2.2rem;
    color: #333333;
    margin-bottom: 25px; /* Reduzido de 30px */
    font-weight: 700;
    line-height: 1.3;
}

.single-post-excerpt {
    font-size: 1.1rem;
    color: #666666;
    font-style: italic;
    margin-bottom: 25px; /* Reduzido de 30px */
    padding: 18px; /* Reduzido de 20px */
    background-color: #f9f9f9;
    border-left: 4px solid #1e73be;
}

.single-post-text {
    color: #555555;
    line-height: 1.8;
    margin-bottom: 25px; /* Reduzido de 30px */
}

.single-post-text p {
    margin-bottom: 18px; /* Reduzido de 20px */
}

.single-post-text h3 {
    font-size: 1.5rem;
    color: #333333;
    margin: 25px 0 12px; /* Reduzido de 30px 0 15px */
    font-weight: 700;
}

.single-post-text ul {
    margin-left: 18px; /* Reduzido de 20px */
    margin-bottom: 18px; /* Reduzido de 20px */
    list-style: disc;
}

.single-post-text li {
    margin-bottom: 8px; /* Reduzido de 10px */
    color: #555555;
}

.post-navigation {
    display: flex;
    gap: 18px; /* Reduzido de 20px */
    margin-top: 35px; /* Reduzido de 40px */
    padding-top: 25px; /* Reduzido de 30px */
    border-top: 2px solid #f0f0f0;
}

.post-nav-item {
    flex: 1;
    padding: 12px; /* Reduzido de 15px */
    background-color: #f9f9f9;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.post-nav-item:hover {
    background-color: #f0f0f0;
}

.post-nav-label {
    font-size: 0.8rem; /* Reduzido de 0.85rem */
    color: #999999;
    text-transform: uppercase;
    font-weight: 600;
}

.post-nav-title {
    color: #1e73be;
    font-weight: 600;
    margin-top: 4px; /* Reduzido de 5px */
}

.post-nav-item.next {
    text-align: right;
}

/* ==========================================
   COMMENTS SECTION
   ========================================== */

.comments-section {
    margin-top: 40px; /* Reduzido de 50px */
}

.comments-title {
    font-size: 1.5rem;
    color: #333333;
    margin-bottom: 25px; /* Reduzido de 30px */
    font-weight: 700;
}

.comments-list {
    display: flex;
    flex-direction: column;
    gap: 20px; /* Reduzido de 25px */
    margin-bottom: 35px; /* Reduzido de 40px */
}

.comment-item {
    padding: 18px; /* Reduzido de 20px */
    background-color: #f9f9f9;
    border-radius: 5px;
    border-left: 4px solid #1e73be;
}

.comment-author {
    display: flex;
    align-items: center;
    gap: 10px; /* Reduzido de 12px */
    margin-bottom: 10px; /* Reduzido de 12px */
}

.comment-avatar {
    width: 36px; /* Reduzido de 40px */
    height: 36px; /* Reduzido de 40px */
    border-radius: 50%;
    background: linear-gradient(135deg, #1e73be 0%, #0d5a9e 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-weight: 700;
    font-size: 1.1rem; /* Reduzido de 1.2rem */
}

.comment-name {
    font-weight: 600;
    color: #333333;
}

.comment-date {
    color: #999999;
    font-size: 0.8rem; /* Reduzido de 0.85rem */
    margin-left: auto;
}

.comment-text {
    color: #555555;
    line-height: 1.7;
}

.comment-reply-link {
    display: inline-block;
    margin-top: 8px; /* Reduzido de 10px */
    color: #1e73be;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
}

.comment-reply-link:hover {
    color: #0d5a9e;
}

/* Comment Form */
.comment-form-section {
    background-color: #ffffff;
    padding: 25px; /* Reduzido de 30px */
    border-radius: 10px;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.08);
}

.comment-form-title {
    font-size: 1.3rem;
    color: #333333;
    margin-bottom: 18px; /* Reduzido de 20px */
    font-weight: 700;
}

.form-group {
    margin-bottom: 18px; /* Reduzido de 20px */
}

.form-group label {
    display: block;
    margin-bottom: 6px; /* Reduzido de 8px */
    color: #333333;
    font-weight: 600;
    font-size: 0.95rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px; /* Reduzido de 12px */
    border: 2px solid #e0e0e0;
    border-radius: 5px;
    font-family: inherit;
    font-size: 0.95rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #1e73be;
}

.form-group textarea {
    resize: vertical;
    min-height: 140px; /* Reduzido de 150px */
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px; /* Reduzido de 20px */
}

.btn-submit {
    background-color: #1e73be;
    color: #ffffff;
    padding: 12px 35px; /* Reduzido padding vertical de 14px para 12px */
    border: none;
    border-radius: 5px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.btn-submit:hover {
    background-color: #0d5a9e;
}

/* ==========================================
   RESPONSIVIDADE
   ========================================== */

/* Tablets */
@media (max-width: 992px) {
    .content-wrapper {
        grid-template-columns: 1fr;
    }

    .sidebar {
        order: 2;
    }

    .posts-area {
        order: 1;
    }

    .footer-content {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px; /* Reduzido de 30px */
    }

    .post-single-wrapper {
        grid-template-columns: 1fr;
    }

    .single-post-body {
        padding: 25px; /* Reduzido de 30px */
    }

    .form-row {
        grid-template-columns: 1fr;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }

    .nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
    }

    .hero {
        padding: 60px 20px;
    }

    .hero h2 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .hero-search form {
        flex-direction: column;
        border-radius: 10px;
    }

    .hero-search-input {
        padding: 15px 20px;
    }

    .hero-search-button {
        padding: 15px;
    }

    .post-image {
        height: 200px; /* Reduzido de 220px */
    }

    .post-title {
        font-size: 1.3rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 25px; /* Reduzido de 30px */
    }

    .ad-placeholder {
        width: 100%;
        max-width: 300px;
    }
}

/* Mobile pequeno */
@media (max-width: 480px) {
    .logo h1 {
        font-size: 1.5rem;
    }

    .nav ul {
        gap: 10px;
    }

    .nav a {
        font-size: 0.85rem;
    }

    .hero {
        padding: 30px 20px; /* Reduzido de 40px */
    }

    .hero h2 {
        font-size: 1.6rem;
    }

    .hero p {
        font-size: 0.95rem;
    }

    .post-content {
        padding: 18px; /* Reduzido de 20px */
    }

    .post-title {
        font-size: 1.2rem;
    }

    .widget {
        padding: 18px; /* Reduzido de 20px */
    }

    /* Search Results Grid - 2 columns responsive */
    .search-results-grid {
        grid-template-columns: 1fr;
    }
}