/*
Theme Name:   Popularis Child
Description:  Tema filho do Popularis - Sabedoria de Deus
Author:       Jana Moreno
Author URI:   https://janamoreno.com.br
Template:     popularis
Version:      1.0.0
Text Domain:  popularis-child
*/

/* =============================================
   LAYOUT GERAL DA CATEGORIA
   ============================================= */

.sdd-category-wrap {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 36px;
    max-width: 1100px;
    margin: 0 auto;
    padding: 24px 16px 48px;
    box-sizing: border-box;
    align-items: start;
}

/* =============================================
   CABEÇALHO DA CATEGORIA
   ============================================= */

.sdd-category-header {
    padding: 36px 32px;
    margin-bottom: 32px;    
    text-align: center;
}

.sdd-category-title {
    font-size: 1.9rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 10px 0;
    letter-spacing: -0.4px;
}

.sdd-category-description {
    color: rgba(255,255,255,0.88);
    font-size: 0.97rem;
    line-height: 1.7;
    max-width: 680px;
    margin: 0 auto;
}

/* =============================================
   GRADE DE POSTS
   ============================================= */

.sdd-posts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-bottom: 36px;
}

.sdd-post-featured {
    grid-column: 1 / -1 !important;
    flex-direction: row !important;
    min-height: 240px;
}

.sdd-post-featured .sdd-post-thumb {
    width: 44% !important;
    flex-shrink: 0;
    border-radius: 12px 0 0 12px !important;
    aspect-ratio: unset !important;
    min-height: 240px;
}

.sdd-post-featured .sdd-post-thumb img {
    height: 100% !important;
    object-fit: cover;
}

.sdd-post-featured .sdd-post-card-body {
    border-radius: 0 12px 12px 0 !important;
    justify-content: center;
    padding: 28px 26px !important;
}

/* =============================================
   CARD DE POST
   ============================================= */

.sdd-post-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.07);
    border: 1px solid #e8e8e8;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
    display: flex;
    flex-direction: column;
}

.sdd-post-card:hover {
    box-shadow: 0 6px 22px rgba(0,0,0,0.12);
    transform: translateY(-3px);
}

.sdd-post-thumb-link {
    display: block;
    overflow: hidden;
    text-decoration: none;
}

.sdd-post-thumb {
    width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
    background: #f0f0f0;
}

.sdd-post-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease;
}

.sdd-post-card:hover .sdd-post-thumb img {
    transform: scale(1.04);
}

.sdd-thumb-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #e8f5ee, #d0ead8);
    min-height: 160px;
}

.sdd-placeholder-icon {
    font-size: 2.8rem;
    color: #2d6a4f;
    opacity: 0.45;
}

.sdd-post-card-body {
    padding: 18px 20px 22px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.sdd-post-cats {
    margin-bottom: 6px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;    
}

.sdd-post-cats a { text-decoration: none; }
.sdd-post-cats a:hover { text-decoration: underline; }

.sdd-post-title {
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.4;
    margin: 0 0 8px 0;
    color: #1a1a1a;
}

.sdd-post-title a { color: inherit; text-decoration: none; }
.sdd-post-title a:hover { color: #2d6a4f; }

.sdd-post-meta {
    font-size: 0.76rem;
    color: #999;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
}

.sdd-meta-sep { color: #ddd; }

.sdd-post-excerpt {
    font-size: 0.86rem;
    color: #555;
    line-height: 1.65;
    flex: 1;
    margin-bottom: 14px;
}

.sdd-post-excerpt p { margin: 0; }

.sdd-read-more {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.82rem;
    font-weight: 600;
    color: #2d6a4f;
    text-decoration: none;
    border-bottom: 2px solid transparent;
    padding-bottom: 1px;
    transition: border-color 0.2s, color 0.2s;
    width: fit-content;
    margin-top: auto;
}

.sdd-read-more:hover {
    border-color: #2d6a4f;
    color: #1a3a2e;
}

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

.sdd-sidebar {
    position: sticky;
    top: 24px;
}

.sdd-sidebar .widget {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e8e8e8;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    padding: 22px 20px;
    margin-bottom: 24px;
}

.sdd-sidebar .widget-title,
.sdd-sidebar .widgettitle {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #2d6a4f;
    margin: 0 0 14px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #e8f5ee;
}

.sdd-sidebar .widget ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sdd-sidebar .widget ul li {
    padding: 6px 0;
    border-bottom: 1px solid #f5f5f5;
    font-size: 0.88rem;
}

.sdd-sidebar .widget ul li:last-child { border-bottom: none; }

.sdd-sidebar .widget ul li a {
    color: #333;
    text-decoration: none;
    transition: color 0.15s;
}

.sdd-sidebar .widget ul li a:hover { color: #2d6a4f; }

/* =============================================
   PAGINAÇÃO
   ============================================= */

.sdd-pagination {
    margin: 10px 0 20px;
    display: flex;
    justify-content: center;
}

.sdd-pagination .nav-links {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: center;
}

.sdd-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border-radius: 8px;
    font-size: 0.86rem;
    font-weight: 600;
    text-decoration: none;
    color: #2d6a4f;
    background: #f0f8f4;
    border: 1px solid #d0ead8;
    transition: background 0.2s, color 0.2s;
}

.sdd-pagination .page-numbers.current,
.sdd-pagination .page-numbers:hover {
    background: #2d6a4f;
    color: #fff;
    border-color: #2d6a4f;
}

/* =============================================
   SEM RESULTADOS
   ============================================= */

.sdd-no-results {
    text-align: center;
    padding: 60px 20px;
    color: #555;
}

.sdd-no-results h2 {
    font-size: 1.3rem;
    color: #1a1a1a;
    margin-bottom: 10px;
}

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

@media (max-width: 900px) {
    .sdd-category-wrap {
        grid-template-columns: 1fr;
    }
    .sdd-sidebar {
        position: static;
    }
}

@media (max-width: 640px) {
    .sdd-posts-grid {
        grid-template-columns: 1fr;
    }
    .sdd-post-featured {
        flex-direction: column !important;
    }
    .sdd-post-featured .sdd-post-thumb {
        width: 100% !important;
        border-radius: 12px 12px 0 0 !important;
        min-height: 180px;
    }
    .sdd-post-featured .sdd-post-card-body {
        border-radius: 0 0 12px 12px !important;
    }
    .sdd-category-header {
        padding: 24px 18px;
    }
    .sdd-category-title {
        font-size: 1.5rem;
    }
}
