/**
 * Estilos CSS para os blocos Gutenberg do Manus Page Builder (Frontend)
 */

/* Reset e estilos base para blocos */
.wp-block-manus-page-builder-text-block,
.wp-block-manus-page-builder-image-block,
.wp-block-manus-page-builder-gallery-block,
.wp-block-manus-page-builder-hero-banner,
.wp-block-manus-page-builder-button-block,
.wp-block-manus-page-builder-spacer-block,
.wp-block-manus-page-builder-columns-block,
.wp-block-manus-page-builder-video-block {
    margin: 20px 0;
    position: relative;
}

/* Bloco de Texto */
.manus-pb-text-block {
    margin: 20px 0;
}

.manus-pb-text-title {
    margin: 0 0 20px 0;
    font-weight: 600;
    line-height: 1.3;
}

.manus-pb-text-content {
    line-height: 1.6;
}

.manus-pb-text-content p {
    margin: 0 0 15px 0;
}

.manus-pb-text-content p:last-child {
    margin-bottom: 0;
}

/* Bloco de Imagem */
.manus-pb-image-block {
    margin: 30px 0;
    text-align: center;
}

.manus-pb-image-block.manus-pb-align-left {
    text-align: left;
}

.manus-pb-image-block.manus-pb-align-right {
    text-align: right;
}

.manus-pb-image-block img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.manus-pb-image-block a:hover img {
    transform: scale(1.02);
}

.manus-pb-image-caption {
    margin: 15px 0 0 0;
    font-style: italic;
    color: #666;
    font-size: 0.9rem;
}

/* Galeria */
.manus-pb-gallery-block {
    display: grid;
    gap: 15px;
    margin: 30px 0;
}

.manus-pb-gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.manus-pb-gallery-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.manus-pb-gallery-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.manus-pb-gallery-item:hover img {
    transform: scale(1.05);
}

.manus-pb-gallery-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    color: #fff;
    padding: 20px 15px 15px;
    margin: 0;
    font-size: 0.9rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.manus-pb-gallery-item:hover .manus-pb-gallery-caption {
    opacity: 1;
}

/* Banner Hero */
.manus-pb-hero-banner-block {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    overflow: hidden;
    margin: 40px 0;
}

.manus-pb-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.manus-pb-hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    padding: 40px 20px;
    color: inherit;
}

.manus-pb-hero-title {
    font-size: 3rem;
    font-weight: 700;
    margin: 0 0 20px 0;
    line-height: 1.2;
}

.manus-pb-hero-subtitle {
    font-size: 1.25rem;
    margin: 0 0 30px 0;
    opacity: 0.9;
    line-height: 1.5;
}

.manus-pb-hero-button {
    display: inline-block;
    padding: 15px 30px;
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.manus-pb-hero-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    color: #fff;
    text-decoration: none;
}

/* Botão */
.manus-pb-button-block {
    margin: 30px 0;
}

.manus-pb-button-block.manus-pb-align-left {
    text-align: left;
}

.manus-pb-button-block.manus-pb-align-center {
    text-align: center;
}

.manus-pb-button-block.manus-pb-align-right {
    text-align: right;
}

.manus-pb-button {
    display: inline-block;
    padding: 12px 24px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
    border-radius: 4px;
}

.manus-pb-button-small {
    padding: 8px 16px;
    font-size: 0.9rem;
}

.manus-pb-button-medium {
    padding: 12px 24px;
    font-size: 1rem;
}

.manus-pb-button-large {
    padding: 16px 32px;
    font-size: 1.1rem;
}

.manus-pb-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    text-decoration: none;
}

/* Espaçador */
.manus-pb-spacer-block {
    width: 100%;
}

/* Colunas */
.manus-pb-columns-block {
    display: grid;
    gap: 20px;
    margin: 30px 0;
}

.manus-pb-column {
    position: relative;
}

.manus-pb-column p {
    margin: 0 0 15px 0;
}

.manus-pb-column p:last-child {
    margin-bottom: 0;
}

/* Vídeo */
.manus-pb-video-block {
    margin: 30px 0;
}

.manus-pb-video-block.manus-pb-align-left {
    text-align: left;
}

.manus-pb-video-block.manus-pb-align-center {
    text-align: center;
}

.manus-pb-video-block.manus-pb-align-right {
    text-align: right;
}

.manus-pb-video-container {
    position: relative;
    display: inline-block;
    max-width: 100%;
}

.manus-pb-video-container iframe {
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

/* Responsividade */
@media (max-width: 768px) {
    .manus-pb-hero-title {
        font-size: 2rem;
    }
    
    .manus-pb-hero-subtitle {
        font-size: 1.1rem;
    }
    
    .manus-pb-hero-content {
        padding: 30px 15px;
    }
    
    .manus-pb-gallery-block[style*="grid-template-columns: repeat(3"] {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    .manus-pb-gallery-block[style*="grid-template-columns: repeat(4"],
    .manus-pb-gallery-block[style*="grid-template-columns: repeat(5"],
    .manus-pb-gallery-block[style*="grid-template-columns: repeat(6"] {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    .manus-pb-columns-block[style*="grid-template-columns: repeat(2"],
    .manus-pb-columns-block[style*="grid-template-columns: repeat(3"],
    .manus-pb-columns-block[style*="grid-template-columns: repeat(4"] {
        grid-template-columns: 1fr !important;
    }
    
    .manus-pb-video-container {
        width: 100% !important;
    }
}

@media (max-width: 480px) {
    .manus-pb-hero-title {
        font-size: 1.5rem;
    }
    
    .manus-pb-hero-subtitle {
        font-size: 1rem;
    }
    
    .manus-pb-gallery-block[style*="grid-template-columns: repeat(2"] {
        grid-template-columns: 1fr !important;
    }
    
    .manus-pb-gallery-item img {
        height: 150px;
    }
    
    .manus-pb-button {
        width: 100%;
        text-align: center;
    }
}

/* Animações */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.wp-block-manus-page-builder-text-block,
.wp-block-manus-page-builder-image-block,
.wp-block-manus-page-builder-gallery-block,
.wp-block-manus-page-builder-hero-banner,
.wp-block-manus-page-builder-button-block,
.wp-block-manus-page-builder-columns-block,
.wp-block-manus-page-builder-video-block {
    animation: fadeInUp 0.6s ease-out;
}

/* Estados de carregamento */
.manus-pb-loading {
    opacity: 0.6;
    pointer-events: none;
}

.manus-pb-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    margin: -15px 0 0 -15px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #007cba;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 1000;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Melhorias de acessibilidade */
.manus-pb-button:focus,
.manus-pb-hero-button:focus {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

.manus-pb-gallery-item a:focus {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

/* Modo escuro (opcional) */
@media (prefers-color-scheme: dark) {
    .manus-pb-text-content {
        color: #e0e0e0;
    }
    
    .manus-pb-image-caption {
        color: #ccc;
    }
}

/* Compatibilidade com temas populares */
.wp-block-manus-page-builder-text-block .manus-pb-text-content > *:first-child {
    margin-top: 0;
}

.wp-block-manus-page-builder-text-block .manus-pb-text-content > *:last-child {
    margin-bottom: 0;
}

/* Estilos para impressão */
@media print {
    .manus-pb-hero-banner-block {
        background: none !important;
        color: #000 !important;
    }
    
    .manus-pb-hero-overlay {
        background: none !important;
    }
    
    .manus-pb-gallery-item {
        break-inside: avoid;
    }
    
    .manus-pb-button {
        border: 1px solid #000;
        color: #000 !important;
        background: none !important;
    }
}

/* Estilos específicos para o tema atual */
.entry-content .wp-block-manus-page-builder-text-block,
.entry-content .wp-block-manus-page-builder-image-block,
.entry-content .wp-block-manus-page-builder-gallery-block,
.entry-content .wp-block-manus-page-builder-hero-banner,
.entry-content .wp-block-manus-page-builder-button-block,
.entry-content .wp-block-manus-page-builder-spacer-block,
.entry-content .wp-block-manus-page-builder-columns-block,
.entry-content .wp-block-manus-page-builder-video-block {
    max-width: none;
    width: 100%;
}

/* Garantir que os blocos hero e galeria ocupem toda a largura */
.wp-block-manus-page-builder-hero-banner,
.wp-block-manus-page-builder-gallery-block {
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
}

/* Ajuste para containers de conteúdo */
.alignfull .wp-block-manus-page-builder-hero-banner,
.alignfull .wp-block-manus-page-builder-gallery-block {
    width: 100%;
    left: auto;
    right: auto;
    margin-left: auto;
    margin-right: auto;
}

/* =============================================
   TEMPLATE HIERÁRQUICO - MENU LATERAL
   ============================================= */

/* Container Principal */
.manus-pb-template-hierarchical {
    padding: 40px 0;
    min-height: 60vh;
    background: #f8fafc;
}

.manus-pb-hierarchical-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

/* =============================================
   BREADCRUMB
   ============================================= */
.manus-pb-breadcrumb {
    background: #ffffff;
    border-radius: 12px;
    padding: 12px 20px;
    margin-bottom: 30px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.breadcrumb-inner {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 14px;
}

.breadcrumb-home {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    color: #475569;
    font-weight: 500;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.breadcrumb-home:hover {
    background: #f1f5f9;
    color: #3b82f6;
}

.breadcrumb-home .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

.breadcrumb-separator {
    color: #94a3b8;
    font-size: 14px;
    margin: 0 2px;
}

.breadcrumb-link {
    text-decoration: none;
    color: #64748b;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.breadcrumb-link:hover {
    background: #f1f5f9;
    color: #3b82f6;
}

.breadcrumb-current {
    color: #0f172a;
    font-weight: 600;
    background: #f1f5f9;
    padding: 4px 12px;
    border-radius: 6px;
}

/* Botão Mapa */
.manus-pb-sitemap-trigger {
    background: transparent;
    border: 1px solid #e2e8f0;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 500;
    color: #475569;
    transition: all 0.2s ease;
}

.manus-pb-sitemap-trigger:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: #3b82f6;
}

.manus-pb-sitemap-trigger .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

/* =============================================
   LAYOUT PRINCIPAL
   ============================================= */
.manus-pb-hierarchical-layout {
    display: flex;
    gap: 32px;
}

/* Sidebar Left (padrão) */
.sidebar-left .manus-pb-sidebar-nav {
    order: 1;
}

.sidebar-left .manus-pb-main-content {
    order: 2;
}

/* Sidebar Right */
.sidebar-right .manus-pb-sidebar-nav {
    order: 2;
}

.sidebar-right .manus-pb-main-content {
    order: 1;
}

/* =============================================
   MENU LATERAL
   ============================================= */
.manus-pb-sidebar-nav {
    flex: 0 0 300px;
    position: relative;
}

.sidebar-nav-inner {
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    position: sticky;
    top: 30px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

/* Cabeçalho do Menu */
.nav-header {
    padding: 20px 20px 16px;
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    border-bottom: 1px solid #e2e8f0;
}

.nav-title {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #0f172a;
}

.nav-title .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
    color: #3b82f6;
}

/* Lista do Menu */
.hierarchical-nav {
    list-style: none;
    margin: 0;
    padding: 8px 0;
    max-height: calc(100vh - 180px);
    overflow-y: auto;
}

/* Scrollbar personalizada */
.hierarchical-nav::-webkit-scrollbar {
    width: 4px;
}

.hierarchical-nav::-webkit-scrollbar-track {
    background: #f1f5f9;
}

.hierarchical-nav::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.hierarchical-nav::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Itens do Menu */
.hierarchical-nav li {
    margin: 0;
    position: relative;
}

.hierarchical-nav li:last-child {
    border-bottom: none;
}

.hierarchical-nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    text-decoration: none;
    color: #334155;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    position: relative;
}

.hierarchical-nav a:before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: #3b82f6;
    transform: scaleY(0);
    transition: transform 0.2s ease;
}

.hierarchical-nav a:hover {
    background: #f8fafc;
    color: #3b82f6;
    padding-left: 24px;
}

.hierarchical-nav a:hover:before {
    transform: scaleY(1);
}

/* Página atual e ancestral */
.hierarchical-nav .current_page_item > a,
.hierarchical-nav .current_page_ancestor > a {
    background: linear-gradient(90deg, #eff6ff 0%, #ffffff 100%);
    color: #2563eb;
    font-weight: 600;
}

.hierarchical-nav .current_page_item > a:before,
.hierarchical-nav .current_page_ancestor > a:before {
    transform: scaleY(1);
}

/* Submenus */
.hierarchical-nav .children {
    list-style: none;
    margin: 0;
    padding: 0;
    background: #fafcff;
    border-left: 1px solid #e2e8f0;
    margin-left: 20px;
}

.hierarchical-nav .children a {
    padding-left: 36px;
    font-size: 13px;
    font-weight: 400;
    color: #475569;
}

.hierarchical-nav .children a:hover {
    padding-left: 40px;
}

.hierarchical-nav .children .current_page_item > a {
    background: #f0f9ff;
}

/* Indicador de submenu */
.hierarchical-nav .page_item_has_children > a {
    position: relative;
}

.hierarchical-nav .page_item_has_children > a:after {
    content: '▼';
    font-size: 10px;
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    transition: transform 0.2s ease;
}

.hierarchical-nav .page_item_has_children.expanded > a:after {
    transform: translateY(-50%) rotate(180deg);
}

/* Botão Voltar ao Topo */
.back-to-top {
    width: 100%;
    padding: 12px;
    background: #f8fafc;
    border: none;
    border-top: 1px solid #e2e8f0;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 500;
    color: #475569;
    transition: all 0.2s ease;
}

.back-to-top:hover {
    background: #f1f5f9;
    color: #3b82f6;
}

.back-to-top .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

/* =============================================
   CONTEÚDO PRINCIPAL
   ============================================= */
.manus-pb-main-content {
    flex: 1;
    min-width: 0;
}

.manus-pb-hierarchical-article {
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

/* Cabeçalho do Artigo */
.article-header {
    padding: 32px 32px 0;
}

.article-title {
    margin: 0 0 16px;
    font-size: 2.5rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.2;
}

.article-excerpt {
    color: #475569;
    font-size: 1.125rem;
    line-height: 1.6;
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid #e2e8f0;
}

/* Conteúdo do Artigo */
.article-content {
    padding: 32px;
    font-size: 1rem;
    line-height: 1.7;
    color: #1e293b;
}

.article-content > *:first-child {
    margin-top: 0;
}

.article-content > *:last-child {
    margin-bottom: 0;
}

/* =============================================
   NAVEGAÇÃO ENTRE PÁGINAS (ANTERIOR/PRÓXIMA)
   ============================================= */
.manus-pb-page-navigation {
    margin: 40px 0 20px;
    padding: 24px 0;
    border-top: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
}

.nav-links {
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

.nav-prev,
.nav-next {
    display: inline-flex;
    align-items: center;
    gap: 16px;
    text-decoration: none;
    padding: 12px 20px;
    background: #f8fafc;
    border-radius: 12px;
    transition: all 0.2s ease;
    flex: 1;
    border: 1px solid #e2e8f0;
}

.nav-prev:hover,
.nav-next:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.nav-prev:hover {
    transform: translateX(-4px);
}

.nav-next:hover {
    transform: translateX(4px);
}

.nav-arrow {
    font-size: 20px;
    font-weight: 600;
    color: #3b82f6;
}

.nav-text {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.nav-label {
    font-size: 12px;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nav-title {
    font-size: 14px;
    font-weight: 600;
    color: #0f172a;
    line-height: 1.4;
}

.nav-next .nav-text {
    text-align: right;
}

.nav-placeholder {
    flex: 1;
}

/* =============================================
   GRID DE SUBPÁGINAS (CHILD PAGES)
   ============================================= */
.manus-pb-child-pages-section {
    margin-top: 48px;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #0f172a;
}

.section-title .dashicons {
    font-size: 24px;
    width: 24px;
    height: 24px;
    color: #3b82f6;
}

.child-pages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

/* Card de Subpágina */
.child-page-card {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
    transition: all 0.3s ease;
}

.child-page-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px -8px rgba(0, 0, 0, 0.1);
    border-color: #cbd5e1;
}

.card-image {
    position: relative;
    overflow: hidden;
    background: #f1f5f9;
    aspect-ratio: 16/9;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.child-page-card:hover .card-image img {
    transform: scale(1.05);
}

.card-content {
    padding: 20px;
}

.card-title {
    margin: 0 0 12px;
    font-size: 1.125rem;
    font-weight: 600;
}

.card-title a {
    text-decoration: none;
    color: #0f172a;
    transition: color 0.2s ease;
}

.card-title a:hover {
    color: #3b82f6;
}

.card-excerpt {
    color: #475569;
    font-size: 0.875rem;
    line-height: 1.6;
    margin-bottom: 16px;
}

.card-read-more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    color: #3b82f6;
    transition: gap 0.2s ease;
}

.card-read-more:hover {
    gap: 10px;
}

.card-read-more .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
}

/* =============================================
   MODAL DO MAPA
   ============================================= */
.manus-pb-modal {
    display: none;
    position: fixed;
    z-index: 100000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
}

.manus-pb-modal[aria-hidden="false"] {
    display: block;
}

.modal-overlay {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.modal-container {
    position: relative;
    background: #ffffff;
    margin: 5% auto;
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    border-bottom: 1px solid #e2e8f0;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: #0f172a;
}

.modal-close {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.2s ease;
    font-size: 24px;
    line-height: 1;
    color: #64748b;
}

.modal-close:hover {
    background: #f1f5f9;
    color: #ef4444;
}

.modal-body {
    padding: 24px;
    max-height: calc(80vh - 80px);
    overflow-y: auto;
}

/* Mapa Hierárquico */
.manus-pb-sitemap-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sitemap-item {
    margin: 8px 0;
}

.sitemap-item-content {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    transition: background 0.2s ease;
}

.sitemap-item-content:hover {
    background: #f8fafc;
}

.sitemap-item.current .sitemap-item-content {
    background: #eff6ff;
}

.item-icon .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
    color: #64748b;
}

.sitemap-item.current .item-icon .dashicons {
    color: #3b82f6;
}

.item-link {
    text-decoration: none;
    color: #334155;
    flex: 1;
    font-size: 14px;
    font-weight: 500;
}

.item-link:hover {
    color: #3b82f6;
}

.item-current-badge {
    font-size: 11px;
    background: #dbeafe;
    color: #1e40af;
    padding: 2px 8px;
    border-radius: 20px;
    font-weight: 500;
}

/* Subníveis do Mapa */
.manus-pb-sitemap-list .manus-pb-sitemap-list {
    margin-left: 28px;
    padding-left: 16px;
    border-left: 2px solid #e2e8f0;
}

/* =============================================
   FOOTER DO ARTIGO
   ============================================= */
.article-footer {
    padding: 20px 32px 32px;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.article-edit-link .edit-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: #f1f5f9;
    border-radius: 8px;
    text-decoration: none;
    font-size: 13px;
    color: #475569;
    transition: all 0.2s ease;
}

.article-edit-link .edit-link:hover {
    background: #e2e8f0;
    color: #3b82f6;
}

.article-meta {
    font-size: 12px;
    color: #94a3b8;
}

.modified-date {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.modified-date .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
}

/* =============================================
   RESPONSIVIDADE
   ============================================= */
@media (max-width: 1024px) {
    .manus-pb-hierarchical-container {
        padding: 0 20px;
    }
    
    .manus-pb-sidebar-nav {
        flex: 0 0 280px;
    }
}

@media (max-width: 768px) {
    .manus-pb-hierarchical-layout {
        flex-direction: column;
    }
    
    .manus-pb-sidebar-nav {
        flex: auto;
        order: 2;
    }
    
    .sidebar-nav-inner {
        position: static;
    }
    
    .manus-pb-main-content {
        order: 1;
    }
    
    .article-header {
        padding: 24px 24px 0;
    }
    
    .article-content {
        padding: 24px;
    }
    
    .article-footer {
        padding: 20px 24px 24px;
        flex-direction: column;
        align-items: flex-start;
    }
    
    .article-title {
        font-size: 1.75rem;
    }
    
    .nav-links {
        flex-direction: column;
    }
    
    .nav-prev,
    .nav-next {
        justify-content: center;
    }
    
    .nav-text {
        text-align: center;
    }
    
    .child-pages-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-container {
        width: 95%;
        margin: 10% auto;
    }
    
    .breadcrumb-inner {
        font-size: 12px;
    }
    
    .manus-pb-sitemap-trigger {
        padding: 6px 12px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .manus-pb-hierarchical-container {
        padding: 0 16px;
    }
    
    .manus-pb-breadcrumb {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .article-title {
        font-size: 1.5rem;
    }
    
    .section-title {
        font-size: 1.25rem;
    }
}

/* =============================================
   IMPRESSÃO
   ============================================= */
@media print {
    .manus-pb-sidebar-nav,
    .manus-pb-breadcrumb,
    .manus-pb-sitemap-trigger,
    .manus-pb-page-navigation,
    .back-to-top,
    .article-footer,
    .manus-pb-modal {
        display: none;
    }
    
    .manus-pb-hierarchical-layout {
        display: block;
    }
    
    .article-header,
    .article-content {
        padding: 0;
    }
    
    .manus-pb-hierarchical-article {
        border: none;
        box-shadow: none;
    }
    
    .child-page-card {
        break-inside: avoid;
        page-break-inside: avoid;
    }
}

/* =============================================
   ANIMAÇÕES
   ============================================= */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.child-page-card {
    animation: fadeInUp 0.4s ease backwards;
}

.child-page-card:nth-child(1) { animation-delay: 0.05s; }
.child-page-card:nth-child(2) { animation-delay: 0.1s; }
.child-page-card:nth-child(3) { animation-delay: 0.15s; }
.child-page-card:nth-child(4) { animation-delay: 0.2s; }
.child-page-card:nth-child(5) { animation-delay: 0.25s; }
.child-page-card:nth-child(6) { animation-delay: 0.3s; }


/* =============================================
   MENU MOBILE TOGGLE
   ============================================= */
.menu-toggle-mobile {
    display: none;
    width: 100%;
    padding: 12px 16px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #334155;
    margin-bottom: 20px;
    justify-content: space-between;
    align-items: center;
}

.menu-toggle-mobile .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

.menu-toggle-mobile:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

@media (max-width: 768px) {
    .menu-toggle-mobile {
        display: flex;
    }
    
    .manus-pb-sidebar-nav {
        display: none;
    }
    
    .manus-pb-sidebar-nav.open {
        display: block;
        animation: fadeInUp 0.3s ease;
    }
}

/* =============================================
   ESTILOS PARA O MENU HIERÁRQUICO (CORREÇÃO)
   ============================================= */

/* Estilos diretos para os elementos gerados pelo wp_list_pages */
.manus-pb-sidebar-nav ul {
    list-style: none;
    margin: 0;
    padding: 8px 0;
    max-height: calc(100vh - 180px);
    overflow-y: auto;
}

/* Scrollbar personalizada */
.manus-pb-sidebar-nav ul::-webkit-scrollbar {
    width: 4px;
}

.manus-pb-sidebar-nav ul::-webkit-scrollbar-track {
    background: #f1f5f9;
}

.manus-pb-sidebar-nav ul::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.manus-pb-sidebar-nav li {
    margin: 0;
    position: relative;
    border-bottom: 1px solid #f1f5f9;
}

.manus-pb-sidebar-nav li:last-child {
    border-bottom: none;
}

.manus-pb-sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    text-decoration: none;
    color: #334155;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    position: relative;
}

.manus-pb-sidebar-nav a:before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: #3b82f6;
    transform: scaleY(0);
    transition: transform 0.2s ease;
}

.manus-pb-sidebar-nav a:hover {
    background: #f8fafc;
    color: #3b82f6;
    padding-left: 24px;
}

.manus-pb-sidebar-nav a:hover:before {
    transform: scaleY(1);
}

/* Página atual */
.manus-pb-sidebar-nav .current_page_item > a,
.manus-pb-sidebar-nav .current_page_ancestor > a {
    background: linear-gradient(90deg, #eff6ff 0%, #ffffff 100%);
    color: #2563eb;
    font-weight: 600;
}

.manus-pb-sidebar-nav .current_page_item > a:before,
.manus-pb-sidebar-nav .current_page_ancestor > a:before {
    transform: scaleY(1);
}

/* Submenus */
.manus-pb-sidebar-nav .children {
    list-style: none;
    margin: 0;
    padding: 0;
    background: #fafcff;
    border-left: 1px solid #e2e8f0;
    margin-left: 20px;
}

.manus-pb-sidebar-nav .children a {
    padding-left: 36px;
    font-size: 13px;
    font-weight: 400;
    color: #475569;
}

.manus-pb-sidebar-nav .children a:hover {
    padding-left: 40px;
}

.manus-pb-sidebar-nav .children .current_page_item > a {
    background: #f0f9ff;
}

/* Indicador de submenu para itens que têm filhos */
.manus-pb-sidebar-nav .page_item_has_children > a {
    position: relative;
    padding-right: 30px;
}

.manus-pb-sidebar-nav .page_item_has_children > a:after {
    content: '▼';
    font-size: 10px;
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    transition: transform 0.2s ease;
    font-family: Arial, sans-serif;
}
.manus-pb-template-default .entry-content {
    padding: 40px;
    border: solid 1px #ccc;
    margin: 20px;
    border-radius: 20px;
}
/* Estado expandido (quando a página atual está dentro) */
.manus-pb-sidebar-nav .current_page_item.page_item_has_children > a:after,
.manus-pb-sidebar-nav .current_page_ancestor > a:after {
    transform: translateY(-50%) rotate(180deg);
}

/* Submenus visíveis apenas quando o ancestral é atual ou contém página atual */
.manus-pb-sidebar-nav .children {
    display: none;
}

.manus-pb-sidebar-nav .current_page_item .children,
.manus-pb-sidebar-nav .current_page_ancestor .children,
.manus-pb-sidebar-nav .page_item_has_children:hover .children {
    display: block;
}


/* Quando não há menu lateral, o conteúdo ocupa toda a largura */
.manus-pb-main-content.full-width {
    flex: 1;
    max-width: 100%;
}

.manus-pb-main-content.full-width .manus-pb-hierarchical-article {
    max-width: 100%;
}

/* Ajuste do layout quando não há menu */
.manus-pb-hierarchical-layout {
    display: flex;
    gap: 32px;
}

/* Se não houver menu, remove o gap desnecessário */
.manus-pb-sidebar-nav:only-child {
    display: none;
}

.manus-pb-main-content:first-child:last-child {
    margin-left: auto;
    margin-right: auto;
}
.manus-pb-hero-overlay {
    background-color: transparent;
    border-bottom: solid 1px #ccc;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}