/*
Theme Name: Astra Child (Evalco Corretor)
Theme URI: https://casaimmobili.com.br
Description: Tema filho do Astra para site de corretor com blog - prioridade total no style.css
Author: Evalco Carvalho
Author URI: https://casaimmobili.com.br
Template: astra
Version: 1.0.0
Text Domain: astra-child
*/

/* ===== SEUS ESTILOS AQUI - PRIORIDADE TOTAL ===== */
/* Exemplo: esconder elementos indesejados do template */
/*
.hero-section, 
.call-to-action {
    display: none;
}
*/

/* Personalize com suas próprias cores, fontes, espaçamentos */
body {
    /* Exemplo: fonte mais legível */
    font-family: 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
}

.meu-blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}


/* Qualquer regra aqui vai sobrescrever o tema pai e o Customizer */

/* Força espaçamento superior global para páginas de post */
.single-post .ast-container {
    margin-top: 0;
    padding-top: 0;
}

.single-post .entry-header {
    margin-top: 0;
}



/* Grid de 3 colunas para o Display Posts */
.meu-grid-personalizado {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin: 40px auto;
    max-width: 1200px;
    padding: 0 20px;
}

/* Estilo dos cards */
.meu-grid-personalizado .listing-item {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s, box-shadow 0.2s;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.meu-grid-personalizado .listing-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.12);
}

/* Imagem */
.meu-grid-personalizado img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

/* Conteúdo */
.meu-grid-personalizado .listing-item > div {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

/* Título */
.meu-grid-personalizado .title {
    margin: 0 0 10px;
    font-size: 1.25rem;
    line-height: 1.3;
}
.meu-grid-personalizado .title a {
    color: #0a2b3e;
    text-decoration: none;
}
.meu-grid-personalizado .title a:hover {
    color: #f5b042;
}

/* Data */
.meu-grid-personalizado .meu-data {
    font-size: 0.8rem;
    color: #64748b;
    margin-bottom: 12px;
}

/* Resumo */
.meu-grid-personalizado .excerpt {
    color: #334155;
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 20px;
    flex-grow: 1;
}

/* Botão Leia Mais (o plugin adiciona automaticamente um parágrafo com link) */
.meu-grid-personalizado .excerpt + p {
    margin: 0;
    text-align: right;
}
.meu-grid-personalizado .excerpt + p a {
    display: inline-block;
    background: #f5b042;
    color: #0a2b3e;
    padding: 6px 18px;
    border-radius: 40px;
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 600;
    transition: background 0.2s;
}
.meu-grid-personalizado .excerpt + p a:hover {
    background: #e09d2c;
}

/* Responsivo */
@media (max-width: 992px) {
    .meu-grid-personalizado {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
}
@media (max-width: 576px) {
    .meu-grid-personalizado {
        grid-template-columns: 1fr;
    }
}


/* Wrapper com espaçamento lateral e superior/inferior de 20px */
.meus-cards-wrapper {
    max-width: 1400px;
    margin: 40px auto;
    padding: 0 20px;
}

/* Grid responsivo */
.meus-cards-grid {
    display: grid;
    gap: 30px;
}
.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}
.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}
.grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* Card premium */
.card-premium {
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 25px -8px rgba(0,0,0,0.1);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    display: flex;
    flex-direction: column;
}
.card-premium:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 35px -12px rgba(0,0,0,0.2);
}

/* Imagem */
.card-img {
    height: 200px;
    background-size: cover;
    background-position: center;
    transition: transform 0.4s ease;
}
.card-premium:hover .card-img {
    transform: scale(1.03);
}

/* Conteúdo */
.card-content {
    padding: 20px 20px 25px;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.card-title {
    font-size: 1.35rem;
    font-weight: 800;
    margin: 0 0 10px;
    color: #0a2b3e;
    line-height: 1.3;
}
.card-excerpt {
    font-size: 0.9rem;
    color: #4a627a;
    line-height: 1.5;
    margin: 0 0 20px;
    flex: 1;
}
.card-btn {
    align-self: flex-start;
    background: transparent;
    border: 2px solid #f5b042;
    border-radius: 40px;
    padding: 8px 22px;
    font-weight: bold;
    font-size: 0.85rem;
    color: #f5b042;
    text-decoration: none;
    transition: all 0.3s ease;
}
.card-btn:hover {
    background: #f5b042;
    color: #0a2b3e;
}

/* Responsivo */
@media (max-width: 992px) {
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 768px) {
    .meus-cards-wrapper {
        padding: 0 15px;
    }
    .grid-3, .grid-2, .grid-4 {
        grid-template-columns: 1fr;
    }
    .card-img {
        height: 180px;
    }
}


/* ===== AJUSTE GERAL PARA CELULAR ===== */
@media (max-width: 768px) {
    
    /* Ajusta padding horizontal das seções que usam 1rem (como seu hero) */
    section, 
    div[style*="padding: 8rem 1rem"],
    div[style*="padding: 10rem 2rem"],
    div[style*="padding: 12rem 1rem"],
    div[style*="padding: 14rem 1rem"] {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }

    /* Reduz padding vertical dos heróis */
    section {
        padding-top: 5rem !important;
        padding-bottom: 4rem !important;
    }

    /* Ajusta tamanho dos títulos principais (h1) */
    h1 {
        font-size: 2.2rem !important;
        letter-spacing: 0.05em !important;
    }

    /* Ajusta subtítulos (h2) */
    h2 {
        font-size: 1.5rem !important;
    }

    /* Ajusta parágrafos de descrição */
    p, .descricao {
        font-size: 1rem !important;
        line-height: 1.4 !important;
    }

    /* Botões: um abaixo do outro, com texto centralizado */
    div[style*="display: flex; gap:"],
    div[style*="display: flex; gap: 1.5rem"] {
        flex-direction: column !important;
        align-items: center !important;
        gap: 1rem !important;
    }
    
    a[style*="padding: 1rem 2rem"] {
        width: 90% !important;
        text-align: center !important;
    }

    /* Estatísticas (ficam empilhadas) */
    div[style*="justify-content: center; gap: 3rem"] {
        flex-direction: column !important;
        gap: 1.5rem !important;
    }

    /* Cards do shortcode: já estão no grid com media query dentro do CSS que você fez. 
       Mas se algo falhar, força o empilhamento */
    .meus-cards-grid {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }
    .meus-cards-wrapper {
        margin: 30px auto !important;
        padding: 0 15px !important;
    }
    
    /* Imagens dentro de cards não estouram */
    .card-img {
        height: 180px !important;
    }

    /* Ajusta badges de localização */
    p[style*="background: rgba(0,0,0,0.5); display: inline-block;"] {
        font-size: 0.8rem !important;
        padding: 0.3rem 1rem !important;
    }
}



/* ===== AJUSTES EXCLUSIVOS PARA O FOOTER NO CELULAR ===== */
@media (max-width: 768px) {
    /* Força o grid do footer a ter 1 coluna */
    div[style*="max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 40px;"] {
        grid-template-columns: 1fr !important;
        gap: 30px !important;
        text-align: center; /* centraliza o conteúdo das colunas, opcional */
    }
    
    /* Ajusta o espaçamento dos títulos h3 dentro do footer */
    div[style*="background: #0a2b3e; color: #cbd5e1; padding: 50px 20px 30px;"] h3 {
        margin-bottom: 10px !important;
        font-size: 1.3rem !important;
    }
    
    /* Remove bullets e padding das listas */
    div[style*="background: #0a2b3e; color: #cbd5e1; padding: 50px 20px 30px;"] ul {
        padding-left: 0 !important;
        text-align: center !important;
    }
    
    /* Links ficam com espaçamento vertical */
    div[style*="background: #0a2b3e; color: #cbd5e1; padding: 50px 20px 30px;"] li {
        margin-bottom: 8px !important;
    }
    
    /* Barra de navegação do meio (links) – quebra em linhas */
    div[style*="text-align: center; margin-top: 40px; padding-top: 20px; border-top: 1px solid #1e293b; display: flex; justify-content: center; gap: 30px; flex-wrap: wrap;"] {
        flex-direction: column !important;
        gap: 12px !important;
        align-items: center !important;
    }
    
    /* Ajusta padding geral do footer para telas pequenas */
    div[style*="background: #0a2b3e; color: #cbd5e1; padding: 50px 20px 30px;"] {
        padding: 40px 15px 20px !important;
    }
}






/* ===== AJUSTES GLOBAIS PARA HERO NO CELULAR ===== */
@media (max-width: 768px) {
    
    /* 
       Seleciona qualquer section que tenha padding inline (comum nos heróis)
       e também divs que atuam como container principal do hero
    */
    section[style*="padding:"],
    div[style*="background: linear-gradient"][style*="text-align: center"] {
        padding-top: calc(80px + 2rem) !important;
        padding-bottom: 3rem !important;
    }
    
    /* 
       Caso o hero use div interna com padding (como o que você fez em algumas páginas)
       Ex: <div style="padding: 14rem 1rem...">
    */
    div[style*="padding-top:"][style*="text-align: center"],
    div[style*="padding: 14rem"][style*="text-align: center"],
    div[style*="padding: 12rem"][style*="text-align: center"],
    div[style*="padding: 10rem"][style*="text-align: center"] {
        padding-top: calc(80px + 2rem) !important;
        padding-bottom: 3rem !important;
    }
    
    /* Ajuste de fontes para todos os títulos dentro de heróis */
    section h1, div[style*="text-align: center"] h1,
    section h2, div[style*="text-align: center"] h2,
    section p, div[style*="text-align: center"] p {
        max-width: 100% !important;
    }
    
    section h1, div[style*="text-align: center"] h1 {
        font-size: 2.2rem !important;
    }
    
    section h2, div[style*="text-align: center"] h2 {
        font-size: 1.4rem !important;
    }
    
    section p, div[style*="text-align: center"] p {
        font-size: 1rem !important;
        line-height: 1.4 !important;
    }
    
    /* Botões dentro de heróis: empilhar e centralizar */
    section div[style*="display: flex"][style*="gap"], 
    div[style*="text-align: center"] div[style*="display: flex"][style*="gap"] {
        flex-direction: column !important;
        align-items: center !important;
        gap: 1rem !important;
    }
    
    section a[style*="padding: 1rem 2rem"],
    div[style*="text-align: center"] a[style*="padding: 1rem 2rem"] {
        width: 90% !important;
        text-align: center !important;
        box-sizing: border-box !important;
    }
}


/* Ajusta o tamanho da logo no celular */
@media (max-width: 768px) {
    .custom-logo {
        max-width: 50px !important;
        height: auto !important;
    }
}



/* Estilização do novo texto */
.mobile-title {
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    color: #f5b042;
    text-transform: uppercase;
    white-space: nowrap;
}

/* Exibe o texto apenas em dispositivos móveis */
@media (min-width: 768px) {
    .mobile-title {
        display: none;
    }
}

/* --- Ajustes finos de centralização (se necessário) --- */
/* Para telas muito pequenas, reduz o tamanho da fonte */
@media (max-width: 480px) {
    .mobile-title {
        font-size: 1rem;
    }
}


/* Container das tags */
.custom-tags-container {
    margin: 40px 0 20px;
    padding: 15px 0;
    clear: both;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px; /* espaçamento horizontal e vertical entre linhas */
    row-gap: 20px; /* espaçamento vertical entre linhas quando quebra */
    border-top: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
}

/* Rótulo "Tags:" */
.custom-tags-label {
    font-weight: bold;
    color: #0a2b3e;
    background: #f1f5f9;
    padding: 6px 14px;
    border-radius: 40px;
    font-size: 0.85rem;
    display: inline-block;
}

/* Cada tag individual */
.custom-tags-container a {
    display: inline-block;
    background: #f5b04220;
    color: #0a2b3e;
    padding: 8px 18px; /* um pouco mais de padding interno */
    border-radius: 40px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s ease;
    border: 1px solid #f5b04240;
    margin: 0; /* reset */
}

.custom-tags-container a:hover {
    background: #f5b042;
    color: #0a2b3e;
    border-color: #f5b042;
}

@media (max-width: 768px) {
    .custom-tags-container {
        gap: 12px;
        row-gap: 16px;
        justify-content: center; /* centraliza os balões em telas pequenas */
    }
    .custom-tags-container a {
        padding: 6px 14px;
        font-size: 0.8rem;
    }
}

