/* IBFragata Dinâmicas - Estilo Frontend AAA */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;600;800&display=swap');

:root {
    --ib-primary: #4f46e5;
    --ib-accent: #f43f5e;
    --ib-bg: #f8fafc;
    --ib-card-bg: #ffffff;
    --ib-text: #1e293b;
    --ib-text-light: #64748b;
    --ib-whatsapp: #25d366;
    --ib-facebook: #1877f2;
    --ib-twitter: #1da1f2;
}

.ib-hub-container { font-family: 'Outfit', sans-serif; color: var(--ib-text); margin-bottom: 40px; }

/* Filtros */
.ib-filters { background: #fff; padding: 25px; border-radius: 20px; box-shadow: 0 10px 25px rgba(0,0,0,0.05); margin-bottom: 40px; display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.ib-cat-select, .ib-search-input { height: 56px !important; padding: 0 25px !important; border: 1.5px solid #e2e8f0 !important; border-radius: 12px; outline: none !important; transition: all 0.3s; font-size: 1.15rem; color: var(--ib-text); font-family: 'Outfit', sans-serif; box-shadow: none !important; box-sizing: border-box !important; }
.ib-search-wrapper-outer { position: relative; flex: 1; min-width: 280px; display: flex; gap: 10px; align-items: center; }
.ib-search-input { flex: 1; margin: 0; }
.ib-search-btn-trigger { position: static; transform: none; background: var(--ib-primary); color: #fff; border: none; width: 56px; height: 56px !important; border-radius: 12px; cursor: pointer; transition: all 0.3s; display: flex; align-items: center; justify-content: center; flex-shrink: 0; box-sizing: border-box !important; }
.ib-search-btn-trigger:hover { background: #3730a3 !important; transform: scale(1.05); }
.ib-search-btn-trigger:hover .dashicons { color: #fff !important; }
.ib-search-btn-trigger .dashicons { font-size: 20px; color: #fff !important; width: 20px; height: 20px; }
.ib-cat-select:focus, .ib-search-input:focus { border-color: var(--ib-primary); box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1) !important; }

/* Agrupamento por Categorias */
.ib-category-group { margin-bottom: 50px; }
.ib-group-title { font-size: 1.8rem; font-weight: 800; color: #0f172a; margin-bottom: 25px; position: relative; display: block; line-height: 1.2; }
.ib-group-title::after { content: ""; display: block; width: 40px; height: 5px; background: var(--ib-primary); border-radius: 10px; margin-top: 6px; }

/* Grid de Cards - Lista Vertical */
.ib-grid { display: grid; grid-template-columns: 1fr; gap: 15px; }
.ib-card { background: var(--ib-card-bg); border-radius: 24px; padding: 30px; box-shadow: 0 10px 30px rgba(0,0,0,0.04); border: 1px solid #f1f5f9; transition: all 0.3s ease; display: flex; flex-direction: column; position: relative; width: 100%; margin-bottom: 15px; }

.ib-card-header h3 { margin: 0 0 15px 0; font-size: 2.2rem; font-weight: 800; line-height: 1.2; color: #0f172a; }

.ib-meta { display: flex; gap: 20px; margin-bottom: 30px; font-size: 1.1rem; color: var(--ib-text-light); font-weight: 600; }
.ib-meta span { display: flex; align-items: center; gap: 8px; }
.ib-meta .dashicons { font-size: 22px; width: 22px; height: 22px; }

.ib-content-full { font-size: 1.5rem; line-height: 1.6; color: #1e293b; margin-bottom: 15px; letter-spacing: -0.01em; }
.ib-content-full *:last-child { margin-bottom: 0 !important; }
.ib-content-full strong { color: #0f172a; font-weight: 800; font-size: 1.5rem; }
.ib-content-full br { display: block; content: ""; margin-bottom: 8px; }

/* Botões do Card */
.ib-card-footer { margin-top: 5px; padding-top: 15px; border-top: 1px solid #f1f5f9; display: flex; justify-content: space-between; align-items: center; }

.ib-vote-wrapper { display: flex; align-items: center; }
.ib-vote-btn { border: none; background: #fff1f2; color: var(--ib-accent); padding: 8px 16px; border-radius: 99px; font-weight: 800; cursor: pointer; transition: all 0.3s; display: flex; align-items: center; gap: 8px; font-size: 1rem; }
.ib-vote-btn:hover { background: var(--ib-accent); color: #fff; transform: scale(1.05); }
.ib-vote-btn.is-voted { background: var(--ib-accent); color: #fff; box-shadow: 0 4px 12px rgba(244, 63, 94, 0.3); }
.ib-vote-btn .dashicons { font-size: 20px; width: 20px; height: 20px; }
.ib-vote-btn.is-voted .dashicons { color: #fff; }

/* Página de Dinâmica Única */
.ib-single-meta-strip { background: #f1f5f9; padding: 15px 25px; border-radius: 16px; margin-bottom: 40px; display: flex; gap: 30px; align-items: center; border-left: 6px solid var(--ib-primary); justify-content: space-between; flex-wrap: wrap; }
.ib-single-meta-left { display: flex; gap: 30px; font-weight: 700; color: #475569; align-items: center; font-size: 1.15rem; }

.ib-share-wrapper { display: flex; gap: 10px; align-items: center; }
.ib-share-btn { width: 38px; height: 38px; border-radius: 10px; display: flex; align-items: center; justify-content: center; color: #fff !important; text-decoration: none; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); background: #94a3b8; border: none; }
.ib-share-btn:hover { transform: translateY(-4px); filter: brightness(1.2); box-shadow: 0 8px 15px rgba(0,0,0,0.1); color: #fff !important; }
.ib-share-btn.wa { background: var(--ib-whatsapp); }
.ib-share-btn.fb { background: var(--ib-facebook); }
.ib-share-btn.tw { background: #1da1f2; }
.ib-share-btn.copy { background: #6366f1; }
.ib-share-btn.print { background: #64748b; }

.ib-share-btn .dashicons { font-size: 20px; color: #fff !important; width: 20px; height: 20px; display: flex; align-items: center; justify-content: center; }

/* Mensagens */
.ib-no-results { grid-column: 1 / -1; text-align: center; padding: 60px; color: var(--ib-text-light); font-weight: 600; font-size: 1.1rem; }

/* Branding de Impressão (Escondido no Site) */
.ib-print-branding { display: none; }

/* =========================================
   MÁGICA DA IMPRESSÃO LOCALIZADA 🖨️
   ========================================= */
@media print {
    /* Esconde tudo o que não é dinâmico */
    body * { visibility: hidden !important; background: none !important; box-shadow: none !important; }
    
    /* Mostra apenas a dinâmica selecionada */
    body.ib-print-active .ib-print-this,
    body.ib-print-active .ib-print-this * { 
        visibility: visible !important; 
    }

    /* Reposiciona o card no topo da página impressa */
    body.ib-print-active .ib-print-this {
        position: absolute !important;
        left: 0 !important;
        top: 0 !important;
        width: 100% !important;
        border: none !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    /* Mostra e estiliza o cabeçalho de impressão */
    .ib-print-branding { 
        display: flex !important; 
        justify-content: space-between; 
        align-items: flex-end; 
        border-bottom: 2px solid #000; 
        padding-bottom: 5px; 
        margin-bottom: 30px; 
    }
    .ib-print-left { display: flex; flex-direction: column; }
    .ib-site-name { font-size: 1.6rem; font-weight: 800; text-transform: uppercase; color: #000; line-height: 1; }
    .ib-site-url { font-size: 0.9rem; color: #333; font-weight: 600; margin-top: 4px; }
    .ib-print-tag { font-size: 1.1rem; color: #000; font-weight: 800; text-transform: uppercase; }

    /* Esconde botões de voto e redes sociais no papel (e o coração do meta) */
    .ib-card-footer, .ib-vote-wrapper, .ib-share-wrapper, .ib-heart-count { display: none !important; }
    
    /* FONTE TURBINADA PARA IMPRESSÃO 🚀 */
    .ib-content-full { font-size: 1.6rem !important; line-height: 1.6 !important; color: #000 !important; }
    .ib-card-header h3 { font-size: 2.5rem !important; color: #000 !important; margin-bottom: 20px !important; }
    .ib-content-full strong { font-size: 1.6rem !important; color: #000 !important; }
}

/* =========================================
   RESPONSIVIDADE PARA CELULAR 📱
   ========================================= */
@media (max-width: 768px) {
    .ib-hub-container { margin: 20px 15px; }
    
    /* Filtros Empilhados */
    .ib-filters { padding: 15px; gap: 12px; flex-direction: column; align-items: stretch; }
    .ib-cat-select, .ib-search-input { font-size: 1.1rem; padding: 12px 20px; width: 100%; }
    .ib-search-wrapper-outer { min-width: 100%; }
    
    /* Fontes Maiores e Melhores */
    .ib-group-title { font-size: 1.5rem; padding: 8px 18px; width: auto; margin-bottom: 20px; }
    .ib-card { padding: 20px; border-radius: 20px; }
    .ib-card-header h3 { font-size: 1.7rem; margin-bottom: 12px; }
    
    .ib-content-full { font-size: 1.45rem !important; line-height: 1.6; }
    .ib-content-full strong { font-size: 1.45rem !important; }
    
    .ib-meta { font-size: 1.1rem; gap: 12px; flex-wrap: wrap; }
    
    /* Rodapé do Card Mobile */
    .ib-card-footer { flex-direction: column; gap: 15px; align-items: stretch; padding-top: 15px; }
    .ib-share-wrapper { justify-content: space-between; width: 100%; }
}
