/* Container principal */
.ga4-top-posts {
    display: flex;
    flex-direction: column; /* Posts em coluna vertical */
    gap: 15px; /* Espaçamento entre os posts */
    margin: 0 auto;
}

/* Container para posts com imagem */
.ga4-posts-with-image {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)) !important;
    gap: 20px !important;
    margin: 0 auto !important;
    background: transparent !important;
    max-width: 100% !important;
}

/* Layout horizontal para posts com imagem - 3 colunas */
.ga4-posts-with-image.layout-horizontal {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    display: grid;
    gap: 20px;
    max-width: 100%;
}

/* Layout vertical para posts com imagem - 2 colunas */
.ga4-posts-with-image.layout-vertical {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    display: grid;
    gap: 20px;
    max-width: 100%;
}

/* Posts dentro de containers com imagem - NOVOS SHORTCODES */
.ga4-posts-with-image .ga4-post {
    display: flex;
    flex-direction: column;
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    width: 100%;
    margin: 0;
    box-sizing: border-box;
    padding: 0;
    border: none;
    overflow: hidden;
    position: relative;
    min-height: 400px;
}

/* Layout horizontal - Card estilo Elementor */
.ga4-posts-with-image.layout-horizontal .ga4-post {
    display: flex;
    flex-direction: column;
    background-color: #fff;
    justify-content: flex-start;
    align-items: stretch;
    padding: 0;
    min-height: 420px;
}

/* Container da imagem para layout horizontal - parte superior */
.ga4-posts-with-image.layout-horizontal .ga4-post-image {
    width: 100%;
    margin: 0 0 15px 0;
    flex-shrink: 0;
    overflow: hidden;
}

/* Imagem para layout horizontal - grudada no card */
.ga4-posts-with-image.layout-horizontal .ga4-post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px 12px 0 0;
    border: none;
    display: block;
}

/* Container do conteúdo para layout horizontal - parte inferior */
.ga4-posts-with-image.layout-horizontal .ga4-post-content {
    width: 100%;
    background: #fff;
    color: #333;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    flex: 1;
}

/* Layout vertical - mantém layout original */
.ga4-posts-with-image.layout-vertical .ga4-post {
    flex-direction: column;
    padding: 15px;
}

.ga4-posts-with-image.layout-vertical .ga4-post-image {
    margin-bottom: 12px;
}

.ga4-posts-with-image.layout-vertical .ga4-post-image img {
    width: 100%;
    object-fit: cover;
    border-radius: 8px;
    border: none;
    display: block;
}

.ga4-posts-with-image.layout-vertical .ga4-post-content {
    color: inherit;
    background: transparent;
    padding: 0;
}

/* Cada post relacionado - APENAS PARA O ORIGINAL */
.ga4-top-posts .ga4-post {
    width: 100%;
    margin: 0;
    background-color: #fff;
    box-sizing: border-box;
    padding: 15px;
}

/* Posts dentro de containers com imagem - NOVOS SHORTCODES */
.ga4-posts-with-image .ga4-post {
    display: flex !important;
    flex-direction: column !important;
    background-color: #fff !important;
    border-radius: 12px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
    width: 100% !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    border: 1px solid #ddd !important;
}

/* Container da imagem */
.ga4-post-image {
    margin-bottom: 12px !important;
}

/* Imagens dos posts */
.ga4-post-image img {
    width: 100% !important;
    height: 180px !important;
    object-fit: cover !important;
    border-radius: 8px !important;
    border: none !important;
    display: block !important;
}

/* Container do conteúdo */
.ga4-post-content {
    flex: 1;
}

/* Data do post - ORIGINAL */
.ga4-top-posts .ga4-post-date {
    font-size: 12px;
    color: #666;
    text-align: left;
    margin-bottom: 5px;
}

/* Título do post */
.ga4-post h3 {
    margin: 8px 0 !important;
    font-size: 18px !important;
    line-height: 1.3 !important;
    font-weight: 700 !important;
}

.ga4-post h3 a {
    text-decoration: none !important;
}

.ga4-post h3 a:hover {
    color: #00C15C;
}

/* Título para layout horizontal (sobre fundo branco) */
.ga4-posts-with-image.layout-horizontal .ga4-post h3 {
    margin: 0 0 10px 0;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.3;
}

.ga4-posts-with-image.layout-horizontal .ga4-post h3 a {
    text-decoration: none;
}

.ga4-posts-with-image.layout-horizontal .ga4-post h3 a:hover {
    opacity: 0.8;
}

/* Container meta para layout horizontal */
.ga4-posts-with-image.layout-horizontal .ga4-post-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0 0 8px 0;
    font-size: 12px;
    color: #333;
}

/* Data para layout horizontal - lado direito */
.ga4-posts-with-image.layout-horizontal .ga4-post-date {
    margin: 0;
    font-size: 12px;
    color: #666;
    background: none;
    padding: 0;
    border-radius: 0;
    order: 2;
}

/* Categorias para layout horizontal - lado esquerdo */
.ga4-posts-with-image.layout-horizontal .ga4-post-categories {
    margin: 0;
    font-size: 12px;
    color: #000;
    font-weight: bold;
    background: none;
    padding: 0;
    border-radius: 0;
    order: 1;
}

/* Excerpt para layout horizontal */
.ga4-posts-with-image.layout-horizontal .ga4-post-excerpt {
    margin: 8px 0 15px 0;
    font-size: 14px;
    color: #666;
    line-height: 1.5;
    display: block;
}

/* Metadados para layout vertical */
.ga4-posts-with-image.layout-vertical .ga4-post-meta {
    margin: 8px 0;
    font-size: 14px;
    color: #666;
}

/* Data para layout vertical */
.ga4-posts-with-image.layout-vertical .ga4-post-date {
    margin: 4px 0;
    font-size: 13px;
    color: #666;
}

/* Categorias para layout vertical */
.ga4-posts-with-image.layout-vertical .ga4-post-categories {
    margin: 4px 0;
    font-size: 13px;
    color: #000;
    font-weight: bold;
    background: none;
}

/* Excerpt para layout vertical */
.ga4-posts-with-image.layout-vertical .ga4-post-excerpt {
    margin: 8px 0;
    font-size: 14px;
    color: #666;
    line-height: 1.5;
}
.social-nimbus-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
    z-index: 10;
}

.social-nimbus-btn {
    background-color: #0073aa;
    color: #fff;
    border: none;
    padding: 8px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
    position: relative;
}

.social-nimbus-btn:hover {
    background-color: #005f8d;
}

/* Estilos do botão de compartilhar */
.social-nimbus-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
    z-index: 10;
}

.social-nimbus-btn {
    background-color: #0073aa;
    color: #fff;
    border: none;
    padding: 8px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
    position: relative;
}

.social-nimbus-btn:hover {
    background-color: #005f8d;
}

.social-nimbus-dropdown {
    display: none;
    position: absolute;
    bottom: 100%;
    left: 0;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 190px !important;
    box-shadow: 0 2px 5px -1px rgba(0, 0, 0, 0.05);
    padding: 6px 8px !important;
    z-index: 9999;
}

.social-nimbus-dropdown-content {
    display: flex;
    align-items: center;
    gap: 8px;
}

.social-nimbus-dropdown-content a,
.social-nimbus-dropdown-content button {
    background-size: contain !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
}

.social-nimbus-dropdown-content a[title="Facebook"] {
    background-image: url('/wp-content/themes/anesta-child/icons/facebook_share.png')
}

.social-nimbus-dropdown-content a[title="X (Twitter)"] {
    background-image: url('/wp-content/themes/anesta-child/icons/twitter_share.png')
}

.social-nimbus-dropdown-content a[title="LinkedIn"] {
    background-image: url('/wp-content/themes/anesta-child/icons/linkedin_share.png')
}

.social-nimbus-dropdown-content a[title="WhatsApp"] {
    background-image: url('/wp-content/themes/anesta-child/icons/whatsapp_share.png')
}

.social-nimbus-dropdown-content button[title="Copiar URL"] {
    background-image: url('/wp-content/themes/anesta-child/icons/link_share.png')
}

.social-nimbus-dropdown a,
.social-nimbus-dropdown button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    color: #333;
    text-decoration: none;
    font-size: 16px;
    border-radius: 6px;
    transition: background 0.2s ease;
    border: none;
    background: transparent;
    cursor: pointer;
}

.social-nimbus-dropdown a:hover,
.social-nimbus-dropdown button:hover {
    background-color: #f0f0f0;
}

/* Responsividade */
@media (min-width: 1200px) {
    /* Desktop large - força o grid corretamente */
    .ga4-posts-with-image.layout-horizontal {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 20px !important;
    }
    
    .ga4-posts-with-image.layout-vertical {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 20px !important;
    }
}

@media (max-width: 1199px) and (min-width: 968px) {
    /* Desktop medium */
    .ga4-posts-with-image.layout-horizontal {
        grid-template-columns: repeat(3, 1fr) !important;
    }
    
    .ga4-posts-with-image.layout-vertical {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 967px) {
    /* Tablet - 1 coluna (um abaixo do outro) */
    .ga4-posts-with-image {
        display: flex !important;
        flex-direction: column !important;
        gap: 20px !important;
        padding: 0 15px !important;
    }
    
    .ga4-posts-with-image.layout-horizontal {
        display: flex;
        flex-direction: column;
        gap: 20px;
    }
    
    .ga4-posts-with-image.layout-vertical {
        display: flex;
        flex-direction: column;
        gap: 20px;
    }
}

@media (max-width: 767px) {
    /* Mobile - 1 coluna (um abaixo do outro) */
    .ga4-posts-with-image {
        display: flex !important;
        flex-direction: column !important;
        gap: 20px !important;
        padding: 0 20px !important;
    }
    
    .ga4-posts-with-image.layout-horizontal,
    .ga4-posts-with-image.layout-vertical {
        display: flex;
        flex-direction: column;
        gap: 20px;
    }

    /* Data e categoria lado a lado no mobile */
    .ga4-posts-with-image .ga4-post-meta {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        flex-direction: row !important;
        gap: 10px !important;
    }

    /* ORIGINAL - mantém estilo original */
    .ga4-top-posts .ga4-post {
        padding: 10px;
    }

    .ga4-top-posts .ga4-post h3 {
        font-size: 14px;
        line-height: 1.2;
    }

    .ga4-top-posts .ga4-post-date {
        font-size: 11px;
    }

    /* NOVOS - estilos para novos shortcodes */
    .ga4-posts-with-image .ga4-post {
        min-height: 350px !important;
    }
    
    .ga4-posts-with-image.layout-horizontal .ga4-post h3 {
        font-size: 16px !important;
    }
    
    .ga4-posts-with-image.layout-horizontal .ga4-post-content {
        padding: 16px !important;
    }

    .ga4-posts-with-image .ga4-post h3 {
        font-size: 15px;
        line-height: 1.2;
    }

    .ga4-posts-with-image .ga4-post-date {
        font-size: 11px;
    }

    .ga4-posts-with-image .ga4-post-categories {
        font-size: 10px;
    }

    .ga4-posts-with-image .ga4-post-excerpt {
        font-size: 13px;
    }

    .ga4-post-image img {
        height: 160px;
    }

    .social-nimbus-btn {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }

    .social-nimbus-dropdown a,
    .social-nimbus-dropdown button {
        width: 28px;
        height: 28px;
    }
}

@media (max-width: 480px) {
    /* ORIGINAL - mantém estilo original */
    .ga4-top-posts .ga4-post {
        padding: 8px;
    }

    .ga4-top-posts .ga4-post h3 {
        font-size: 13px;
    }

    .ga4-top-posts .ga4-post-date {
        font-size: 10px;
    }

    /* NOVOS - estilos para novos shortcodes */
    .ga4-posts-with-image .ga4-post {
        min-height: 320px !important;
    }
    
    .ga4-posts-with-image.layout-horizontal .ga4-post-content {
        padding: 12px !important;
    }
    
    .ga4-posts-with-image.layout-horizontal .ga4-post h3 {
        font-size: 15px !important;
    }

    .ga4-posts-with-image .ga4-post h3 {
        font-size: 14px;
    }

    .ga4-posts-with-image .ga4-post-date {
        font-size: 10px;
    }

    .ga4-posts-with-image .ga4-post-categories {
        font-size: 9px;
    }

    .ga4-posts-with-image .ga4-post-excerpt {
        font-size: 12px;
    }

    .ga4-post-image img {
        height: 140px;
    }

    .ga4-posts-with-image .ga4-post-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 3px;
    }
}

/* Força aplicação do grid e estilos - APENAS PARA NOVOS SHORTCODES */
body .ga4-posts-with-image {
    display: grid !important;
    gap: 20px !important;
}


body .ga4-posts-with-image .ga4-post {
    background-color: #ffffff !important;
    border-radius: 12px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
    padding: 12px !important;
    border: 1px solid #ddd !important;
}

body .ga4-posts-with-image .ga4-post-image img {
    border-radius: 8px !important;
    width: 100% !important;
    height: 180px !important;
    object-fit: cover !important;
}
