/**
 * Estilos para a página single do item bibliográfico
 * Layout moderno com título à esquerda, imagem e descrição lado a lado
 */

/* ==================== RESET COMPLETO DO HERO ==================== */
.single .hero-section[data-type="type-2"],
.single .hero-section[data-type="type-2"]::before,
.single .hero-section[data-type="type-2"]::after {
    background: none !important;
    background-image: none !important;
}

.single .hero-section[data-type="type-2"]::before,
.single .hero-section[data-type="type-2"]::after {
    content: none !important;
    display: none !important;
}

.single .hero-section[data-type="type-2"] {
    background: linear-gradient(135deg, #f5f7fa 0%, #ffffff 100%) !important;
    padding: 2rem 0 3rem 0 !important;
    position: relative !important;
    min-height: auto !important;
}

/* Remove qualquer imagem de background do hero */
.single .hero-section[data-type="type-2"][style*="background-image"] {
    background-image: none !important;
}

/* ==================== BREADCRUMBS NO TOPO ==================== */
.single .hero-section[data-type="type-2"] .item-custom-breadcrumbs {
    order: -2 !important;
    margin-bottom: 1rem !important;
}

.single .hero-section[data-type="type-2"] .item-custom-breadcrumbs .ct-breadcrumbs {
    text-align: left !important;
    padding-bottom: 1rem !important;
    border-bottom: 2px solid #e2e8f0 !important;
    margin-bottom: 0 !important;
}

.single .hero-section[data-type="type-2"] .ct-breadcrumbs,
.single .hero-section[data-type="type-2"] .ct-breadcrumbs *,
.single .hero-section[data-type="type-2"] .ct-breadcrumbs a,
.single .hero-section[data-type="type-2"] .ct-breadcrumbs span {
    color: #64748b !important;
    text-shadow: none !important;
    font-size: 0.875rem !important;
    font-weight: 500 !important;
}

.single .hero-section[data-type="type-2"] .ct-breadcrumbs a:hover {
    color: var(--theme-palette-color-2, #2563eb) !important;
    text-decoration: none !important;
}

/* ==================== ORDEM DOS ELEMENTOS ==================== */
.single .hero-section[data-type="type-2"] .ct-container {
    display: flex !important;
    flex-direction: column !important;
}

.single .hero-section[data-type="type-2"] .page-title {
    order: -1 !important;
    text-align: left !important;
    margin-bottom: 2rem !important;
    margin-top: 1rem !important;
    font-size: 2.5rem !important;
    font-weight: 800 !important;
    color: #1a202c !important;
    text-shadow: none !important;
    line-height: 1.2 !important;
    letter-spacing: -0.02em !important;
}

.single .hero-section[data-type="type-2"] .item-header-layout {
    order: 0 !important;
}

.single .hero-section[data-type="type-2"] .entry-meta {
    order: 1 !important;
    margin-top: 1rem !important;
}

.single .hero-section[data-type="type-2"] .item-sections-navigator {
    order: 2 !important;
}

/* Esconde breadcrumb padrão que aparece depois */
.single .hero-section[data-type="type-2"] > .ct-container > .ct-breadcrumbs {
    display: none !important;
}

/* ==================== LAYOUT PRINCIPAL ==================== */
.single .hero-section[data-type="type-2"] .item-header-layout {
    display: grid !important;
    grid-template-columns: 280px 1fr !important;
    gap: 2.5rem !important;
    margin-top: 2rem !important;
    align-items: start !important;
}

/* ==================== THUMBNAIL ==================== */
.single .item-thumbnail-wrapper {
    position: relative !important;
    width: 280px !important;
    height: auto !important;
}

.single .item-thumbnail-image {
    width: 100% !important;
    height: auto !important;
    border-radius: 12px !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12),
                0 4px 20px rgba(0, 0, 0, 0.08) !important;
    transition: transform 0.3s ease, box-shadow 0.3s ease !important;
    display: block !important;
}

.single .item-thumbnail-image:hover {
    transform: translateY(-4px) !important;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.15),
                0 8px 30px rgba(0, 0, 0, 0.1) !important;
}

.single .item-thumbnail-placeholder {
    width: 100% !important;
    aspect-ratio: 3/4 !important;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    border-radius: 12px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 10px 40px rgba(102, 126, 234, 0.3) !important;
}

.single .item-thumbnail-placeholder i {
    font-size: 4rem !important;
    color: white !important;
    opacity: 0.9 !important;
}

/* ==================== CONTEÚDO À DIREITA ==================== */
.single .item-content-wrapper {
    display: flex !important;
    flex-direction: column !important;
    gap: 1.5rem !important;
}

/* ==================== DESCRIÇÃO ==================== */
.single .item-description-box {
    background: white !important;
    padding: 2rem !important;
    border-radius: 12px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04),
                0 1px 4px rgba(0, 0, 0, 0.04) !important;
    border: 1px solid #e2e8f0 !important;
    color: #334155 !important;
    font-size: 1rem !important;
    line-height: 1.7 !important;
    transition: box-shadow 0.3s ease !important;
}

.single .item-description-box:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08),
                0 2px 8px rgba(0, 0, 0, 0.06) !important;
}

.single .item-description-box p {
    color: #334155 !important;
    text-shadow: none !important;
    margin-bottom: 1rem !important;
}

.single .item-description-box p:last-child {
    margin-bottom: 0 !important;
}

.single .no-description {
    color: #94a3b8 !important;
    font-style: italic !important;
}

/* ==================== BOTÕES DE AÇÃO ==================== */
.single .item-action-buttons {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 1rem !important;
    align-items: center !important;
}

.single .item-action-button {
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
    padding: 0.875rem 1.5rem !important;
    border-radius: 8px !important;
    font-size: 0.9375rem !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    transition: all 0.3s ease !important;
    cursor: pointer !important;
    border: none !important;
    letter-spacing: 0.01em !important;
}

.single .item-action-button i {
    font-size: 1.25rem !important;
}

.single .item-action-button.primary {
    background: linear-gradient(135deg, var(--theme-palette-color-2, #2563eb) 0%, #1d4ed8 100%) !important;
    color: white !important;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3) !important;
}

.single .item-action-button.primary:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4) !important;
}

.single .item-action-button.secondary {
    background: white !important;
    color: #475569 !important;
    border: 2px solid #e2e8f0 !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04) !important;
}

.single .item-action-button.secondary:hover {
    background: #f8fafc !important;
    border-color: var(--theme-palette-color-2, #2563eb) !important;
    color: var(--theme-palette-color-2, #2563eb) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08) !important;
}

/* Esconde entry-meta padrão (já temos as tags dentro dos botões) */
.single .hero-section[data-type="type-2"] .entry-meta {
    display: none !important;
}

/* ==================== TAGS DE PALAVRAS-CHAVE ==================== */
.single .item-keywords-tags {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 0.5rem !important;
    margin-top: 1rem !important;
    width: 100% !important;
}

.single .keyword-tag {
    display: inline-block !important;
    padding: 0.5rem 1rem !important;
    background: #f1f5f9 !important;
    color: #475569 !important;
    border-radius: 20px !important;
    font-size: 0.8125rem !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    transition: all 0.2s ease !important;
    border: 1px solid #e2e8f0 !important;
}

.single .keyword-tag:hover {
    background: var(--theme-palette-color-2, #2563eb) !important;
    color: white !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 8px rgba(37, 99, 235, 0.2) !important;
}

/* ==================== NAVEGAÇÃO ENTRE SEÇÕES ==================== */
.single .item-sections-navigator {
    display: flex !important;
    gap: 1rem !important;
    margin-top: 3rem !important;
    padding: 1.5rem !important;
    background: white !important;
    border-radius: 12px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04),
                0 1px 4px rgba(0, 0, 0, 0.04) !important;
    border: 1px solid #e2e8f0 !important;
    justify-content: center !important;
}

.single .item-sections-navigator .nav-link {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 0.5rem !important;
    padding: 1rem 2rem !important;
    text-decoration: none !important;
    color: #64748b !important;
    transition: all 0.3s ease !important;
    border-radius: 8px !important;
    min-width: 140px !important;
}

.single .item-sections-navigator .nav-link:hover,
.single .item-sections-navigator .nav-link.active {
    background: linear-gradient(135deg, var(--theme-palette-color-2, #2563eb) 0%, #1d4ed8 100%) !important;
    color: white !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3) !important;
}

.single .item-sections-navigator .nav-icon {
    font-size: 2rem !important;
}

.single .item-sections-navigator .nav-text {
    font-size: 0.875rem !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
}

/* ==================== MODAIS ==================== */
.bibliografico-modal {
    display: none !important;
    position: fixed !important;
    z-index: 10000 !important;
    left: 0 !important;
    top: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(0, 0, 0, 0.6) !important;
    backdrop-filter: blur(4px) !important;
    animation: fadeIn 0.3s ease !important;
}

.bibliografico-modal.show {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.bibliografico-modal .modal-content {
    background: white !important;
    padding: 2.5rem !important;
    border-radius: 16px !important;
    max-width: 600px !important;
    width: 90% !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3) !important;
    position: relative !important;
    animation: slideUp 0.3s ease !important;
}

.bibliografico-modal .modal-close {
    position: absolute !important;
    right: 1.5rem !important;
    top: 1.5rem !important;
    font-size: 2rem !important;
    color: #94a3b8 !important;
    cursor: pointer !important;
    transition: color 0.2s ease !important;
    line-height: 1 !important;
}

.bibliografico-modal .modal-close:hover {
    color: #475569 !important;
}

.bibliografico-modal h3 {
    margin: 0 0 1.5rem 0 !important;
    font-size: 1.5rem !important;
    font-weight: 700 !important;
    color: #1a202c !important;
}

/* Opções de compartilhamento */
.share-options {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 1rem !important;
    margin-bottom: 2rem !important;
}

.share-option {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.5rem !important;
    padding: 1rem !important;
    border: none !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    color: white !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
}

.share-option:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2) !important;
}

.share-option.facebook { background: #1877f2 !important; }
.share-option.twitter { background: #1da1f2 !important; }
.share-option.linkedin { background: #0077b5 !important; }
.share-option.whatsapp { background: #25d366 !important; }

.share-link {
    display: flex !important;
    gap: 0.5rem !important;
}

.share-link input {
    flex: 1 !important;
    padding: 0.875rem !important;
    border: 2px solid #e2e8f0 !important;
    border-radius: 8px !important;
    font-size: 0.875rem !important;
}

.copy-link-btn,
.copy-citation-btn {
    padding: 0.875rem 1.25rem !important;
    background: var(--theme-palette-color-2, #2563eb) !important;
    color: white !important;
    border: none !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    white-space: nowrap !important;
}

.copy-link-btn:hover,
.copy-citation-btn:hover {
    background: #1d4ed8 !important;
    transform: translateY(-2px) !important;
}

/* Formatos de citação */
.citation-formats {
    display: flex !important;
    flex-direction: column !important;
    gap: 1.5rem !important;
}

.citation-format {
    padding: 1.5rem !important;
    background: #f8fafc !important;
    border-radius: 8px !important;
    border: 1px solid #e2e8f0 !important;
}

.citation-format h4 {
    margin: 0 0 1rem 0 !important;
    font-size: 1.125rem !important;
    font-weight: 600 !important;
    color: #1a202c !important;
}

.citation-text {
    padding: 1rem !important;
    background: white !important;
    border-radius: 6px !important;
    font-size: 0.875rem !important;
    line-height: 1.6 !important;
    margin-bottom: 1rem !important;
    color: #334155 !important;
    border: 1px solid #e2e8f0 !important;
}

/* Animações */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==================== SEÇÕES DE METADADOS ==================== */
.single .tainacan-item-section--metadata-sections {
    margin-top: 3rem !important;
    background: white !important;
    padding: 2.5rem !important;
    border-radius: 12px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04) !important;
    border: 1px solid #e2e8f0 !important;
}

.single .tainacan-item-section--metadata-sections h2 {
    font-size: 2rem !important;
    font-weight: 700 !important;
    margin-bottom: 2rem !important;
    color: #1a202c !important;
}

/* Sistema de tabs */
.single .metadata-section-layout--tabs {
    display: grid !important;
    gap: 1rem !important;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)) !important;
    margin-bottom: 2rem !important;
}

.single .metadata-section-layout--tabs input {
    display: none !important;
}

.single .metadata-section-layout--tabs label {
    padding: 1.5rem 1rem !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 0.75rem !important;
    background: #f8fafc !important;
    border: 2px solid #e2e8f0 !important;
    border-radius: 12px !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    min-height: 140px !important;
    justify-content: center !important;
}

.single .metadata-section-layout--tabs label:hover {
    background: #f1f5f9 !important;
    border-color: var(--theme-palette-color-2, #2563eb) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08) !important;
}

.single .metadata-section-layout--tabs label i {
    font-size: 2.5rem !important;
    color: #64748b !important;
    transition: color 0.3s ease !important;
}

.single .metadata-section-layout--tabs input:checked + label {
    background: linear-gradient(135deg, var(--theme-palette-color-2, #2563eb) 0%, #1d4ed8 100%) !important;
    border-color: var(--theme-palette-color-2, #2563eb) !important;
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.3) !important;
}

.single .metadata-section-layout--tabs input:checked + label h3,
.single .metadata-section-layout--tabs input:checked + label i {
    color: white !important;
}

.single .metadata-section-layout--tabs label h3 {
    font-size: 0.9375rem !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    color: #475569 !important;
    margin: 0 !important;
    text-align: center !important;
    transition: color 0.3s ease !important;
}

.single .metadata-section-layout--tabs .tainacan-item-section {
    grid-column: 1/-1 !important;
    display: none !important;
    padding-top: 2rem !important;
}

.single .metadata-section-layout--tabs input:checked + label + .tainacan-item-section {
    display: block !important;
}

/* ==================== GALERIA ==================== */
.single .tainacan-item-section--special-gallery {
    margin-top: 3rem !important;
    background: #1e293b !important;
    padding: 3rem 0 !important;
    border-radius: 12px !important;
}

.single .tainacan-item-section--special-gallery:empty {
    display: none !important;
}

.single .tainacan-item-section--special-gallery h2 {
    color: white !important;
    font-size: 2rem !important;
    font-weight: 700 !important;
    margin-bottom: 2rem !important;
}

/* ==================== RESPONSIVIDADE ==================== */
@media screen and (max-width: 999px) {
    .single .hero-section[data-type="type-2"] .page-title {
        font-size: 1.75rem !important;
    }
    
    .single .hero-section[data-type="type-2"] .item-header-layout {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }
    
    .single .item-thumbnail-wrapper {
        width: 100% !important;
        max-width: 280px !important;
        margin: 0 auto !important;
    }
    
    .single .item-action-buttons {
        justify-content: center !important;
    }
    
    .single .item-action-button {
        flex: 1 !important;
        min-width: 140px !important;
        justify-content: center !important;
    }
    
    .single .item-sections-navigator {
        flex-direction: column !important;
        gap: 0.5rem !important;
    }
    
    .single .item-sections-navigator .nav-link {
        flex-direction: row !important;
        width: 100% !important;
        justify-content: flex-start !important;
    }
    
    .share-options {
        grid-template-columns: 1fr !important;
    }
    
    .single .metadata-section-layout--tabs {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)) !important;
    }
}

@media screen and (min-width: 1000px) {
    .single .entry-header {
        padding-bottom: 80px !important;
    }
}