/*
 Theme Name:   GeneratePress Child
 Theme URI:    https://generatepress.com
 Description:  Default GeneratePress child theme
 Author:       Tom Usborne
 Author URI:   https://tomusborne.com
 Template:     generatepress
 Version:      0.1
*/

/* ===== PALETA DE CORES ===== */
:root {
    --roxo-empoderamento: #8B5FBF;
    --rosa-conexao: #D4A1E7;
    --dourado-astral: #FFD700;
    --cinza-elegante: #4A4A4A;
    --branco-puro: #FFFFFF;
    --lavanda-suave: #E6E6FA;
    --pessego-conforto: #FFDAB9;
}

/* ===== LAYOUT DO BLOG ===== */
.blog-template .blog-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== FILTRO DE CATEGORIAS (SELECT) ===== */
.blog-filter {
    background: var(--lavanda-suave);
    padding: 20px 0;
    margin-bottom: 40px;
    text-align: center;
}

.blog-filter select {
    padding: 12px 20px;
    border: 2px solid var(--roxo-empoderamento);
    border-radius: 25px;
    background: var(--branco-puro);
    color: var(--cinza-elegante);
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url('data:image/svg+xml;utf8,<svg fill="%234A4A4A" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 20px;
    padding-right: 50px;
    min-width: 250px;
    transition: all 0.3s ease;
}

.blog-filter select:hover {
    border-color: var(--rosa-conexao);
    box-shadow: 0 0 10px rgba(139, 95, 191, 0.3);
}

.blog-filter select:focus {
    border-color: var(--dourado-astral);
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.3);
}

/* Loading state para o select */
.blog-filter select.loading {
    opacity: 0.7;
    pointer-events: none;
}

/* ===== GRADE DE POSTS ===== */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
    margin-bottom: 60px;
}

.post-card {
    background: var(--branco-puro);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(139, 95, 191, 0.2);
}

/* ===== IMAGENS COMPLETAS SEM CORTE ===== */
.post-thumb {
    display: block;
    overflow: hidden;
    position: relative;
    width: 100%;
    height: 220px;
    background: var(--lavanda-suave);
    display: flex;
    align-items: center;
    justify-content: center;
}

.post-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.5s ease;
}

.post-card:hover .post-img {
    transform: scale(1.05);
}

/* ===== CONTEÚDO DOS CARDS ===== */
.post-card-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.post-category {
    display: inline-block;
    margin-bottom: 12px;
    padding: 6px 15px;
    background: var(--rosa-conexao);
    color: var(--branco-puro);
    border-radius: 20px;
    font-size: 0.75em;
    font-weight: 600;
    text-transform: uppercase;
    align-self: flex-start;
    line-height: 1;
}

.post-title {
    margin: 0 0 12px 0;
    font-size: 1.1em;
    line-height: 1.4;
    flex-grow: 1;
}

.post-title a {
    color: var(--cinza-elegante);
    text-decoration: none;
    display: block;
}

.post-title a:hover {
    color: var(--roxo-empoderamento);
}

.post-excerpt {
    color: #666;
    line-height: 1.6;
    margin-bottom: 20px;
    font-size: 0.9em;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex-grow: 1;
}

.post-card .filter-btn {
    display: inline-block;
    padding: 10px 20px;
    background: var(--roxo-empoderamento);
    color: var(--branco-puro);
    text-decoration: none;
    border-radius: 20px;
    border: none;
    font-weight: 500;
    transition: all 0.3s ease;
    align-self: flex-start;
    margin-top: auto;
    cursor: pointer;
    font-size: 0.9em;
}

.post-card .filter-btn:hover {
    background: var(--rosa-conexao);
    transform: translateY(-2px);
}

/* Botão especial para Guias Essenciais */
.post-card .guide-btn {
    background: var(--dourado-astral);
    color: #000;
}

.post-card .guide-btn:hover {
    background: #FFED4E;
}

/* ===== TÍTULOS DAS SEÇÕES ===== */
.section-title {
    text-align: center;
    color: var(--roxo-empoderamento);
    font-size: 2em;
    margin-bottom: 40px;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--dourado-astral);
    margin: 15px auto;
}

/* ===== RESPONSIVIDADE CORRIGIDA - IMAGENS COMPLETAS MOBILE ===== */
/* Tablets */
@media (max-width: 1024px) {
    .posts-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
    
    .post-thumb {
        height: 200px;
    }
}

/* Tablets Pequenos */
@media (max-width: 768px) {
    .posts-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .blog-template .blog-wrapper {
        padding: 0 15px;
    }
    
    .post-thumb {
        height: 200px;
    }
}

/* Mobile - Galaxy S8+ e similares */
@media (max-width: 740px) {
    .posts-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .blog-filter select {
        min-width: 200px;
        font-size: 14px;
    }
    
    .post-card-content {
        padding: 15px;
    }
    
    .post-title {
        font-size: 1em;
    }
    
    .post-excerpt {
        font-size: 0.85em;
        -webkit-line-clamp: 2;
    }
    
    .section-title {
        font-size: 1.6em;
        margin-bottom: 30px;
    }
    
    .post-thumb {
        height: 200px; /* Aumentado para mobile */
    }
}

/* Mobile Pequeno */
@media (max-width: 480px) {
    .posts-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .section-title {
        font-size: 1.4em;
    }
    
    .blog-filter select {
        min-width: 180px;
        padding: 10px 15px;
        padding-right: 45px;
    }
    
    .post-thumb {
        height: 180px; /* Aumentado para mobile pequeno */
    }
    
    .post-card-content {
        padding: 12px;
    }
    
    .post-excerpt {
        -webkit-line-clamp: 2;
        margin-bottom: 15px;
    }
    
    .post-card .filter-btn {
        padding: 8px 16px;
        font-size: 0.85em;
    }
}

/* Mobile Muito Pequeno */
@media (max-width: 360px) {
    .posts-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .blog-template .blog-wrapper {
        padding: 0 10px;
    }
    
    .post-thumb {
          height: 520px /* Aumentado para mobile muito pequeno */
    }
}

/* ===== ANIMAÇÕES SUAVES ===== */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { 
        opacity: 0; 
        transform: translateY(20px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

/* ===== MELHORIAS DE ACESSIBILIDADE ===== */
@media (prefers-reduced-motion: reduce) {
    .post-card,
    .post-img,
    .filter-btn {
        transition: none;
    }
    
    .fade-in {
        animation: none;
    }
}
/* ===== SINGLE POST STYLES ===== */
.single-template .blog-wrapper {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

.single-header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--lavanda-suave);
}

.single-title {
    color: var(--roxo-empoderamento);
    font-size: 2.5em;
    line-height: 1.3;
    margin: 20px 0;
}

.single-meta {
    color: #666;
    font-size: 0.9em;
}

.single-meta time {
    margin-right: 15px;
}

.single-featured-image {
    margin: 30px 0;
    border-radius: 15px;
    overflow: hidden;
}

.single-featured-image img {
    width: 100%;
    height: auto;
    display: block;
}

.single-content {
    line-height: 1.8;
    font-size: 1.1em;
    color: #333;
}

.single-content h2,
.single-content h3,
.single-content h4 {
    color: var(--roxo-empoderamento);
    margin-top: 40px;
}

.single-content p {
    margin-bottom: 1.5em;
}

.single-content ul,
.single-content ol {
    margin: 20px 0;
    padding-left: 30px;
}

.single-content li {
    margin-bottom: 10px;
}

.single-footer {
    margin-top: 50px;
    padding: 30px;
    background: var(--lavanda-suave);
    border-radius: 15px;
}

.post-categories,
.post-tags {
    margin-bottom: 15px;
}

.post-categories a,
.post-tags a {
    color: var(--roxo-empoderamento);
    text-decoration: none;
    margin: 0 5px;
}

.post-categories a:hover,
.post-tags a:hover {
    text-decoration: underline;
}

/* Navegação entre Posts */
.post-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 50px;
    padding-top: 30px;
    border-top: 2px solid var(--lavanda-suave);
}

.nav-previous a,
.nav-next a {
    display: inline-block;
    padding: 10px 20px;
    background: var(--roxo-empoderamento);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    transition: background 0.3s ease;
}

.nav-previous a:hover,
.nav-next a:hover {
    background: var(--rosa-conexao);
}

/* Responsividade para Single Post */
@media (max-width: 768px) {
    .single-title {
        font-size: 2em;
    }
    
    .single-template .blog-wrapper {
        padding: 0 15px;
    }
    
    .post-navigation {
        flex-direction: column;
        gap: 20px;
    }
    
    .nav-previous,
    .nav-next {
        text-align: center;
    }
}
/* ===== CORREÇÕES SINGLE POST ===== */

/* Remove imagem destacada duplicada do GeneratePress */
.single-template .entry-header .post-image,
.single-template .featured-image {
    display: none !important;
}

/* Remove data do meta */
.single-meta time {
    display: none;
}

.single-meta {
    text-align: center;
    color: #666;
    font-size: 0.9em;
    margin-bottom: 20px;
}

/* Garante que apenas uma imagem apareça */
.single-content .wp-block-image:first-child,
.single-content figure:first-child {
    margin-top: 0;
}

/* Estilo para a primeira imagem do conteúdo (se houver) */
.single-content img:first-of-type {
    border-radius: 15px;
    margin-bottom: 30px;
}

/* Remove qualquer imagem destacada automática */
.entry-header .post-image,
.entry-header .featured-image {
    display: none;
}
/* ===== BARRA DE PESQUISA À DIREITA ===== */
.blog-search-section {
    background: var(--branco-puro);
    padding: 20px 0;
    border-bottom: 1px solid var(--lavanda-suave);
    margin-bottom: 0;
}

.search-container-right {
    display: flex;
    justify-content: flex-end;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Container da barra de pesquisa compacta */
.search-container-right .search-form {
    max-width: 300px;
    margin: 0;
}

/* Estilo compacto para barra à direita */
.search-container-right .search-field {
    padding: 10px 15px;
    font-size: 0.9em;
    border-radius: 25px 0 0 25px;
}

.search-container-right .search-submit {
    padding: 10px 20px;
    border-radius: 0 25px 25px 0;
    min-width: 80px;
    font-size: 0.9em;
}

/* Versão minimalista (como no GeneratePress padrão) */
.search-container-right .search-form {
    border: 1px solid var(--lavanda-suave);
    border-radius: 25px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.search-container-right .search-form:focus-within {
    border-color: var(--roxo-empoderamento);
    box-shadow: 0 2px 8px rgba(139, 95, 191, 0.2);
}

/* Responsividade */
@media (max-width: 768px) {
    .search-container-right {
        justify-content: center;
        padding: 0 15px;
    }
    
    .search-container-right .search-form {
        max-width: 100%;
        width: 100%;
    }
}

@media (max-width: 480px) {
    .search-container-right .search-form {
        flex-direction: row; /* Mantém horizontal mesmo no mobile */
    }
    
    .search-container-right .search-field {
        flex: 1;
        padding: 12px 15px;
    }
    
    .search-container-right .search-submit {
        padding: 12px 20px;
        min-width: 70px;
    }
}
/* ===== HERO SECTION LARGURA TOTAL ===== */
.blog-hero-fullwidth {
    background: linear-gradient(135deg, var(--lavanda-suave) 0%, var(--pessego-conforto) 100%);
    padding: 80px 0;
    text-align: center;
    margin-bottom: 40px;
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
}

.hero-fullwidth-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.hero-fullwidth-content h1 {
    color: var(--roxo-empoderamento);
    font-size: 2.8em;
    margin-bottom: 20px;
    font-weight: 700;
    line-height: 1.2;
}

.hero-fullwidth-content p {
    color: var(--cinza-elegante);
    font-size: 1.3em;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ===== GUIAS ESSENCIAIS LARGURA TOTAL ===== */
.guides-essenciais-fullwidth {
    background: var(--lavanda-suave);
    padding: 60px 0;
    margin-top: 60px;
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
}

.guides-fullwidth-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section-title-fullwidth {
    text-align: center;
    color: var(--roxo-empoderamento);
    font-size: 2.2em;
    margin-bottom: 50px;
    position: relative;
    font-weight: 700;
}

.section-title-fullwidth::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: var(--dourado-astral);
    margin: 20px auto;
    border-radius: 2px;
}

/* ===== GRID LARGURA TOTAL ===== */
.posts-grid-fullwidth {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
    margin-bottom: 0;
}

/* ===== CARDS LARGURA TOTAL ===== */
.post-card-fullwidth {
    background: var(--branco-puro);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.post-card-fullwidth:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(139, 95, 191, 0.15);
}

.post-thumb-fullwidth {
    display: block;
    overflow: hidden;
    flex-shrink: 0;
}

.post-img-fullwidth {
    width: 100%;
    height: 280px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.post-card-fullwidth:hover .post-img-fullwidth {
    transform: scale(1.05);
}

.post-category-fullwidth {
    display: inline-block;
    margin: 25px 25px 15px;
    padding: 8px 20px;
    background: var(--dourado-astral);
    color: #000;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.post-title-fullwidth {
    margin: 10px 25px;
    font-size: 1.4em;
    line-height: 1.3;
    flex-grow: 1;
}

.post-title-fullwidth a {
    color: var(--cinza-elegante);
    text-decoration: none;
    transition: color 0.3s ease;
}

.post-title-fullwidth a:hover {
    color: var(--roxo-empoderamento);
}

.post-excerpt-fullwidth {
    color: #666;
    line-height: 1.6;
    margin: 0 25px 20px;
    flex-grow: 1;
}

.post-button-fullwidth {
    padding: 0 25px 25px;
    margin-top: auto;
}

/* ===== RESPONSIVIDADE LARGURA TOTAL ===== */
@media (max-width: 1200px) {
    .hero-fullwidth-content,
    .guides-fullwidth-content {
        max-width: 100%;
        padding: 0 40px;
    }
}

@media (max-width: 768px) {
    .blog-hero-fullwidth {
        padding: 60px 0;
    }
    
    .hero-fullwidth-content h1 {
        font-size: 2.2em;
    }
    
    .hero-fullwidth-content p {
        font-size: 1.1em;
    }
    
    .guides-essenciais-fullwidth {
        padding: 40px 0;
        margin-top: 40px;
    }
    
    .posts-grid-fullwidth {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .section-title-fullwidth {
        font-size: 1.8em;
        margin-bottom: 30px;
    }
}

@media (max-width: 480px) {
    .hero-fullwidth-content,
    .guides-fullwidth-content {
        padding: 0 20px;
    }
    
    .blog-hero-fullwidth {
        padding: 40px 0;
    }
    
    .hero-fullwidth-content h1 {
        font-size: 1.8em;
    }
    
    .hero-fullwidth-content p {
        font-size: 1em;
    }
    
    .post-img-fullwidth {
        height: 220px;
    }
    
    .post-title-fullwidth {
        font-size: 1.2em;
    }
}

/* ===== COMPATIBILIDADE COM HEADER/FOOTER ===== */
/* Garante que as margens sejam consistentes */
.site-header,
.blog-hero-fullwidth,
.guides-essenciais-fullwidth,
.site-footer {
    box-sizing: border-box;
}

/* Remove qualquer margem/padding extra */
.main-content {
    overflow-x: hidden;
}
/* ===== COR #8b5fbf PARA TODOS OS TÍTULOS E SUBTÍTULOS ===== */

/* Títulos principais das páginas */
.entry-title,
.page-title,
.single-title,
.single-template .single-title,
.page .entry-title,
.single .entry-title,
.single-title,
.entry-header .entry-title {
    color: #8b5fbf !important;
    color: var(--roxo-empoderamento) !important;
}

/* Títulos dentro do conteúdo (H1, H2, H3, H4, H5, H6) */
.single-content h1,
.single-content h2, 
.single-content h3,
.single-content h4,
.single-content h5,
.single-content h6,
.page-content h1,
.page-content h2,
.page-content h3,
.page-content h4,
.page-content h5,
.page-content h6,
.entry-content h1,
.entry-content h2,
.entry-content h3,
.entry-content h4,
.entry-content h5,
.entry-content h6 {
    color: #8b5fbf !important;
    color: var(--roxo-empoderamento) !important;
}

/* Títulos específicos do GeneratePress */
.main-title,
.entry-title,
.widget-title,
.sidebar .widget-title,
.footer-widgets .widget-title {
    color: #8b5fbf !important;
    color: var(--roxo-empoderamento) !important;
}

/* Títulos de widgets e seções */
.sidebar h1,
.sidebar h2,
.sidebar h3,
.sidebar h4,
.sidebar h5,
.sidebar h6,
.widget h1,
.widget h2,
.widget h3,
.widget h4,
.widget h5,
.widget h6 {
    color: #8b5fbf !important;
    color: var(--roxo-empoderamento) !important;
}

/* Títulos de posts relacionados e seções similares */
.related-posts h3,
.post-navigation h3,
.comments-title,
.comment-reply-title {
    color: #8b5fbf !important;
    color: var(--roxo-empoderamento) !important;
}

/* Títulos na página blog */
.blog-template .section-title,
.blog-template .post-title a,
.blog-template .post-title {
    color: #8b5fbf !important;
    color: var(--roxo-empoderamento) !important;
}

/* Garantir que links dentro de títulos mantenham a cor */
.entry-title a,
.single-title a,
.page-title a,
.widget-title a {
    color: #8b5fbf !important;
    color: var(--roxo-empoderamento) !important;
    text-decoration: none;
}

.entry-title a:hover,
.single-title a:hover,
.page-title a:hover,
.widget-title a:hover {
    color: #7340a3 !important;
    text-decoration: underline;
}

/* Títulos de formulários */
.wpforms-container .wpforms-title,
.form-title,
.contact-form h3 {
    color: #8b5fbf !important;
    color: var(--roxo-empoderamento) !important;
}