/**
 * Theme Name: Blocksy Child
 * Description: Blocksy Child theme
 * Author: Creative Themes
 * Template: blocksy
 * Text Domain: blocksy
 */

/* ============================================================
   IMAGENS DESTACADAS E AUTOR
============================================================ */
.ct-featured-image .ct-media-container:not(.ct-media-container-static) {
    max-height: 280px;
    overflow: hidden;
}

.ct-featured-image .ct-media-container:not(.ct-media-container-static) img {
    width: 100%;
    height: 280px;
    object-fit: contain;
    object-position: center top;
    aspect-ratio: unset !important;
}

.ct-media-container-static:not(.meta-author .ct-media-container-static) img {
    width: 120px !important;
    height: 120px !important;
    object-fit: cover;
    object-position: center;
    aspect-ratio: unset !important;
}

/* ============================================================
   AJUSTES DA HOME
============================================================ */
.home .entry-header {
    display: none;
}

.home .ct-container-full {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

.home .hero-section {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

/* ============================================================
   FILTRO DE CATEGORIAS (AJAX)
============================================================ */
.wa-category-filter-wrap {
    width: 100%;
    margin: 0 0 20px;
}

.wa-category-filter {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 0;
}

.wa-category-filter-tab {
    padding: 6px 20px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 500;
    color: #475569;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    text-decoration: none;
    transition: .2s ease;
}

.wa-category-filter-tab:hover {
    background: #e2e8f0;
    color: #1e293b;
    text-decoration: none;
}

.wa-category-filter-tab.active {
    background: #1e293b;
    color: #fff;
    border-color: #1e293b;
}

html.wa-category-loading .entries {
    opacity: .45;
    transition: opacity .2s ease;
    pointer-events: none;
}

/* ============================================================
   NEWS TICKER EVOLUÍDO
============================================================ */
.news-ticker {
    padding: 0 0 20px 0;
    overflow: hidden;
    width: 100%;
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(22, 168, 184, 0.2);
    margin-left: -5vw;
    margin-right: -5vw;
}

.ticker-wrap {
    display: flex;
    width: max-content;
    animation: ticker-scroll 80s linear infinite;
}

.news-ticker:hover .ticker-wrap {
    animation-play-state: paused;
}

.ticker-content {
    display: flex;
    white-space: nowrap;
}

.ticker-item {
    display: flex;
    align-items: center;
    padding: 0 40px;
    font-size: 14px;
}

.ticker-cat {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    background: #f1f5f9;
    color: #64748b;
    padding: 2px 8px;
    border-radius: 4px;
    margin-right: 12px;
}

.ticker-item a {
    color: inherit;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.ticker-item a:hover {
    color: #15a6b6;
}

.ticker-date {
    font-size: 11px;
    color: #94a3b8;
    margin-left: 12px;
}

@keyframes ticker-scroll {
    0% { transform: translate3d(0, 0, 0); }
    100% { transform: translate3d(-50%, 0, 0); }
}

@media (max-width: 768px) {
    .ticker-item {
        padding: 0 20px;
    }
    
    .ticker-date {
        display: none;
    }
}

/* ============================================================
   INÍCIO — Cards de páginas filhas
============================================================ */
.wa-child-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-block: 2rem;
}

.wa-child-card {
    display: flex;
    flex-direction: column;
    border: 1px solid oklch(0 0 0 / 0.08);
    border-radius: 0.75rem;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    background: var(--theme-palette-color-8, #fff);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.wa-child-card:hover {
    box-shadow: 0 8px 24px oklch(0 0 0 / 0.10);
    transform: translateY(-3px);
}

.wa-card-image img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}

.wa-card-body {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
}

.wa-card-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
    color: var(--theme-palette-color-1, #1a1a1a);
}

.wa-card-excerpt {
    font-size: 0.9rem;
    color: var(--theme-palette-color-4, #666);
    margin: 0;
    flex: 1;
}

.wa-card-cta {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--theme-palette-color-2, #0066cc);
    margin-top: auto;
}
/* ============================================================
   ANCORAGEM DO LOGO
============================================================ */
/* 1. Congela o bloco inteiro (Logo + Descrição) */
.site-branding {
    view-transition-name: wa-site-branding;
    contain: layout paint;
}

/* 2. Congela a imagem fisicamente */
img.default-logo {
    view-transition-name: wa-logo-img;
    contain: layout paint;
}

/* 3. Desliga completamente a animação de ambos */
::view-transition-group(wa-site-branding),
::view-transition-group(wa-logo-img) {
    animation: none !important;
}

::view-transition-old(wa-site-branding), 
::view-transition-new(wa-site-branding),
::view-transition-old(wa-logo-img), 
::view-transition-new(wa-logo-img) {
    animation: none !important;
    mix-blend-mode: normal !important;
    opacity: 1 !important;
    display: block !important;
}
/* ============================================================
   ANCORAGEM DO BOTÃO DE SESSÃO / CONTA (BLOCKSY)
============================================================ */
.ct-account-item {
    view-transition-name: wa-account-item;
    contain: layout paint;
}

::view-transition-group(wa-account-item) {
    animation: none !important;
}

::view-transition-old(wa-account-item), 
::view-transition-new(wa-account-item) {
    animation: none !important;
    mix-blend-mode: normal !important;
    opacity: 1 !important;
    display: flex !important; /* Respeita o layout flex do Blocksy */
}

/* ============================================================
   FIX: CLS — iguala tamanho do botão logado/deslogado
   Evita que a troca de estado cause layout shift no header
   ============================================================ */

/* Força o mesmo tamanho mínimo em ambos os estados */
.ct-header-account .ct-account-item {
    min-width: 130px; /* ajuste conforme DevTools */
    justify-content: flex-start;
    white-space: nowrap;
}

/* Evita que o avatar redimensione o elemento ao aparecer */
.ct-header-account .ct-media-container {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
}

/* Esconde imagens que não carregaram (ícone de quebrado) */
img:not([src]), 
img[src=""] {
    display: none !important;
}

/* Força o desaparecimento se houver erro de carregamento físico */
img:error {
    display: none !important;
}