/*!
Theme Name: CCHLA UFRN
Theme URI: https://cchla.ufrn.br/
Author: Agência Web Escolar
Author URI: https://cchla.ufrn.br/
Description: Tema institucional desenvolvido para o Centro de Ciências Humanas, Letras e Artes da Universidade Federal do Rio Grande do Norte. Um tema moderno, acessível e responsivo para portais acadêmicos.
Version: 1.0.0
Requires at least: 5.0
Tested up to: 6.4
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: cchla-ufrn
Domain Path: /languages
Tags: education, institutional, accessibility-ready, custom-colors, custom-menu, featured-images, threaded-comments, translation-ready, blog, two-columns

CCHLA UFRN WordPress Theme, (C) 2025 Agência Web Escolar
CCHLA UFRN is distributed under the terms of the GNU GPL.
*/
:root {
    --primary-color: #233B8A;
    --primary-color-lighter: #EFF2FB;
}

/* Padrão WebKit (Chrome, Edge, Safari, Opera) */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
    transition: all 0.3s ease;
}

::-webkit-scrollbar-track {
    background: var(--primary-color-lighter);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background-color: var(--primary-color);
    border-radius: 10px;
    transition: all 0.3s ease;
}

/* Ao passar o mouse sobre o scroll */
::-webkit-scrollbar-thumb:hover {
    background-color: var(--primary-color);
    ;
    /* tonalidade mais escura */
    width: 12px;
    /* efeito de expansão suave */
}

/* Ajuste visual do hover na área do scrollbar */
::-webkit-scrollbar:hover {
    width: 12px;
    height: 12px;
}

/* Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color);
}

/* Para Firefox não há width animável, mas podemos dar leve contraste no hover */
html:hover {
    scrollbar-color: var(--primary-color);
    #e6e6e6;
}

/* Animação suave para entrada */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-20px);
    }
}

/**
 * Estilos para Filtros de Arquivo
 */

/* Paginação */
.pagination {
    display: flex;
    gap: 0.5rem;
}

.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    height: 2.5rem;
    padding: 0 0.75rem;
    border: 1px solid var(--primary-color-lighter);
    border-radius: 0.375rem;
    background: white;
    color: #374151;
    font-size: 0.875rem;
    transition: all 0.2s;
    text-decoration: none;
}

.pagination .page-numbers:hover {
    border-color: #3b82f6;
    color: #3b82f6;
    background: var(--primary-color-lighter);
}

.pagination .page-numbers.current {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    font-weight: 600;
}

.pagination .page-numbers.dots {
    border: none;
    cursor: default;
}

.pagination .page-numbers.dots:hover {
    background: transparent;
    color: #374151;
}

/* Filtros Pills */
.filter-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.75rem;
    background: var(--primary-color-lighter);
    color: var(--primary-color);
    ;
    border-radius: 9999px;
    font-size: 0.875rem;
    transition: all 0.2s;
}

.filter-pill:hover {
    background: var(--primary-color-lighter);
}

.filter-pill i {
    font-size: 0.75rem;
}

/* Widget de Filtros */
.archive-filters-widget select,
.archive-filters-widget input[type="text"] {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid var(--primary-color-lighter);
    border-radius: 0.375rem;
    font-size: 0.875rem;
}

.archive-filters-widget select:focus,
.archive-filters-widget input[type="text"]:focus {
    outline: none;
    border-color: var(--primary-color);
    ;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Responsivo */
@media (max-width: 768px) {
    .pagination {
        flex-wrap: wrap;
        justify-content: center;
    }

    .pagination .page-numbers {
        min-width: 2rem;
        height: 2rem;
        font-size: 0.75rem;
    }
}

/**
 * Estilos para Página de Busca
 */

/* Destaque de busca */
mark {
    background-color: #fef3c7;
    color: #92400e;
    font-weight: 600;
    padding: 2px 4px;
    border-radius: 3px;
}

/* Limitação de linhas */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Paginação personalizada */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
}

.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    height: 2.5rem;
    padding: 0 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 0.5rem;
    font-weight: 500;
    color: #4b5563;
    text-decoration: none;
    transition: all 0.2s;
}

.pagination .page-numbers:hover {
    border-color: #2563eb;
    color: #2563eb;
    background-color: #eff6ff;
}

.pagination .page-numbers.current {
    background-color: #2563eb;
    border-color: #2563eb;
    color: white;
}

.pagination .page-numbers.dots {
    border: none;
    cursor: default;
}

.pagination .page-numbers.dots:hover {
    background: none;
}

/* Loading skeleton (opcional) */
@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.skeleton {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
    background-color: #e5e7eb;
    border-radius: 0.375rem;
}

/* Responsividade */
@media (max-width: 640px) {
    .search-form input {
        font-size: 16px;
        /* Previne zoom no iOS */
    }
}

/* ==========================================
   PAGINAÇÃO CCHLA - CORES OFICIAIS
   ========================================== */

/* Container da paginação */
.pagination-item {
    display: inline-block;
}

/* Todos os links e spans */
.pagination-item a,
.pagination-item span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    /* Área de toque mínima recomendada */
    min-height: 44px;
    padding: 0.625rem 1rem;
    /* 10px 16px */
    font-size: 0.9375rem;
    /* 15px */
    font-weight: 600;
    line-height: 1;
    border-radius: 0.5rem;
    /* 8px */
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

/* Links padrão (não ativos) */
.pagination-item a {
    background: #ffffff;
    border: 2px solid #e5e7eb;
    color: #4b5563;
}

.pagination-item a:hover {
    background: #1B4D9E;
    /* Azul CCHLA */
    border-color: #1B4D9E;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(27, 77, 158, 0.3);
}

.pagination-item a:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(27, 77, 158, 0.2);
}

/* Página atual (span.current) */
.pagination-item .current {
    background: #1B4D9E;
    /* Azul CCHLA */
    border: 2px solid #1B4D9E;
    color: #ffffff;
    cursor: default;
    box-shadow: 0 4px 12px rgba(27, 77, 158, 0.25);
}

/* Reticências (dots) */
.pagination-item .dots {
    background: transparent;
    border: 2px solid transparent;
    color: #9ca3af;
    cursor: default;
    pointer-events: none;
    padding: 0.625rem 0.5rem;
    min-width: 32px;
}

/* Botões Anterior/Próxima */
.pagination-item a:first-child,
.pagination-item a:last-child {
    font-weight: 700;
}

/* Estados de foco (acessibilidade) */
.pagination-item a:focus-visible {
    outline: 3px solid #1B4D9E;
    outline-offset: 3px;
    z-index: 1;
}

/* Desabilitado */
.pagination-item .disabled {
    background: #f3f4f6;
    border-color: #e5e7eb;
    color: #d1d5db;
    cursor: not-allowed;
    pointer-events: none;
}

/* ==========================================
   RESPONSIVIDADE
   ========================================== */

/* Mobile: Botões maiores */
@media (max-width: 640px) {

    .pagination-item a,
    .pagination-item span {
        min-width: 48px;
        min-height: 48px;
        padding: 0.75rem 1rem;
        font-size: 1rem;
    }

    /* Oculta alguns números no mobile */
    .pagination-item:not(:first-child):not(:last-child):not(.active-item) {
        display: none;
    }

    /* Sempre mostra: Anterior, Próxima, Atual, e adjacentes */
    .pagination-item:nth-child(-n+2),
    .pagination-item:nth-last-child(-n+2),
    .pagination-item.active-item,
    .pagination-item.active-item+.pagination-item,
    .pagination-item:has(+ .active-item) {
        display: inline-block;
    }
}

/* Tablet */
@media (min-width: 641px) and (max-width: 1024px) {

    .pagination-item a,
    .pagination-item span {
        min-width: 44px;
        min-height: 44px;
        padding: 0.625rem 0.875rem;
    }
}

/* Desktop grande: Números mais espaçados */
@media (min-width: 1280px) {
    .pagination-item {
        margin: 0 0.125rem;
    }
}

/* ==========================================
   ANIMAÇÕES
   ========================================== */

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.6;
    }
}

/* Loading state (opcional) */
.pagination-loading .pagination-item a {
    pointer-events: none;
    animation: pulse 1.5s ease-in-out infinite;
}

/* ==========================================
   MODO ESCURO (Opcional)
   ========================================== */

@media (prefers-color-scheme: dark) {
    .pagination-item a {
        background: #1f2937;
        border-color: #374151;
        color: #e5e7eb;
    }

    .pagination-item a:hover {
        background: #1B4D9E;
        border-color: #1B4D9E;
        color: #ffffff;
    }

    .pagination-item .current {
        background: #1B4D9E;
        border-color: #1B4D9E;
    }

    .pagination-item .dots {
        color: #6b7280;
    }
}

/* ==========================================
   MELHORIAS DE ACESSIBILIDADE
   ========================================== */

/* Alto contraste */
@media (prefers-contrast: high) {
    .pagination-item a {
        border-width: 3px;
    }

    .pagination-item .current {
        border: 3px solid #000000;
    }
}

/* Redução de movimento */
@media (prefers-reduced-motion: reduce) {

    .pagination-item a,
    .pagination-item span {
        transition: none;
    }

    .pagination-item a:hover {
        transform: none;
    }
}

/* ==========================================
   SR-ONLY (Screen Reader Only)
   ========================================== */

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}