/**
 * styles/modern.css
 * Tema Moderno UEMASUL - OMP 3.5
 * Identidade Visual: Vinho/Vermelho #BB5050 e Azul Marinho #1A365D
 */

:root {
    --uemasul-primary: #BB5050;
    --uemasul-primary-dark: #912e2e;
    --uemasul-primary-light: #d46a6a;
    --uemasul-navy: #1A365D;
    --uemasul-navy-dark: #0f223d;
    --uemasul-navy-light: #2b4c7e;
    --uemasul-accent: #e28743;
    --uemasul-bg-light: #f8fafc;
    --uemasul-card-bg: #ffffff;
    --uemasul-text-main: #1e293b;
    --uemasul-text-muted: #64748b;
    --uemasul-border: #e2e8f0;
    --uemasul-shadow-sm: 0 2px 4px rgba(0,0,0,0.04);
    --uemasul-shadow-md: 0 6px 18px rgba(0,0,0,0.06);
    --uemasul-shadow-lg: 0 14px 30px rgba(0,0,0,0.1);
    --uemasul-radius-sm: 6px;
    --uemasul-radius-md: 10px;
    --uemasul-radius-lg: 16px;
    --uemasul-transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

/* === TIPOGRAFIA E BASE === */
body {
    background-color: var(--uemasul-bg-light);
    color: var(--uemasul-text-main);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

/* === CABEÇALHO MODERNO === */
.pkp_structure_head {
    background: linear-gradient(135deg, var(--uemasul-primary-dark) 0%, var(--uemasul-primary) 50%, #a03535 100%) !important;
    box-shadow: 0 4px 20px rgba(139, 38, 38, 0.25) !important;
    border-bottom: 2px solid rgba(255, 255, 255, 0.15) !important;
}

.pkp_site_name .is_text {
    font-family: 'Lora', Georgia, serif;
    font-weight: 700;
    letter-spacing: -0.01em;
    text-shadow: 0 2px 4px rgba(0,0,0,0.25);
}

.pkp_navigation_primary > li > a {
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.6rem 1rem !important;
    border-radius: var(--uemasul-radius-sm);
    transition: var(--uemasul-transition);
}

.pkp_navigation_primary > li > a:hover {
    background: rgba(255, 255, 255, 0.18) !important;
    transform: translateY(-1px);
}

.pkp_navigation_user > li > a {
    font-size: 0.88rem;
    opacity: 0.95;
}

/* === ESTRUTURA GERAL E CARDS === */
.pkp_structure_content {
    padding-top: 2rem !important;
    padding-bottom: 3rem !important;
}

/* === SEÇÕES DO CATÁLOGO E LISTAS (DESTAQUES / LANÇAMENTOS) === */
.cmp_monographs_list {
    position: relative !important;
    margin: 2.5rem 0 3.5rem 0 !important;
    padding-top: 0 !important;
    border-top: none !important;
    clear: both !important;
}

/* Remove a sobreposição do título que vinha com position: absolute no tema padrão */
.cmp_monographs_list > .title,
.page_homepage .cmp_monographs_list > .title {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    display: block !important;
    font-family: 'Lora', Georgia, serif !important;
    font-size: 1.65rem !important;
    font-weight: 700 !important;
    color: var(--uemasul-navy) !important;
    background: transparent !important;
    padding: 0 0 0.75rem 0 !important;
    margin: 0 0 1.75rem 0 !important;
    border-bottom: 2px solid var(--uemasul-border) !important;
    line-height: 1.3 !important;
    z-index: 1 !important;
}

.cmp_monographs_list > .title::after,
.page_homepage .cmp_monographs_list > .title::after {
    content: '' !important;
    position: absolute !important;
    bottom: -2px !important;
    left: 0 !important;
    width: 60px !important;
    height: 3px !important;
    background: var(--uemasul-primary) !important;
    border-radius: 2px !important;
}

/* Container de linhas do catálogo (flexbox moderno de 2 colunas com gap) */
.cmp_monographs_list .row {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 1.5rem !important;
    margin: 0 0 1.5rem 0 !important;
    border-bottom: none !important;
    clear: both !important;
}

.cmp_monographs_list .row::before,
.cmp_monographs_list .row::after {
    display: none !important;
}

/* === CARDS DE LIVROS NO CATÁLOGO === */
.obj_monograph_summary {
    display: grid !important;
    grid-template-columns: 115px 1fr !important;
    grid-template-rows: auto auto auto 1fr !important;
    column-gap: 1.25rem !important;
    row-gap: 0.35rem !important;
    align-items: start !important;
    flex: 1 1 calc(50% - 0.75rem) !important;
    max-width: calc(50% - 0.75rem) !important;
    background: var(--uemasul-card-bg) !important;
    border: 1px solid var(--uemasul-border) !important;
    border-radius: var(--uemasul-radius-md) !important;
    padding: 1.25rem !important;
    margin: 0 !important;
    float: none !important;
    box-shadow: var(--uemasul-shadow-sm) !important;
    transition: var(--uemasul-transition) !important;
    position: relative !important;
    box-sizing: border-box !important;
}

@media (max-width: 768px) {
    .cmp_monographs_list .row .obj_monograph_summary {
        flex: 1 1 100% !important;
        max-width: 100% !important;
    }
}

@media (max-width: 480px) {
    .obj_monograph_summary {
        grid-template-columns: 85px 1fr !important;
        column-gap: 0.85rem !important;
        padding: 0.85rem !important;
    }
}

.obj_monograph_summary:hover {
    transform: translateY(-4px) !important;
    box-shadow: var(--uemasul-shadow-lg) !important;
    border-color: rgba(187, 80, 80, 0.3) !important;
}

.obj_monograph_summary .cover {
    grid-column: 1 !important;
    grid-row: 1 / span 5 !important;
    width: 100% !important;
    max-width: 115px !important;
    margin: 0 !important;
    float: none !important;
    border-radius: var(--uemasul-radius-sm);
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
    transition: var(--uemasul-transition);
}

.obj_monograph_summary:hover .cover {
    transform: scale(1.02);
}

.obj_monograph_summary .cover img {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    border-radius: var(--uemasul-radius-sm);
    margin: 0 !important;
}

.obj_monograph_summary .title,
.obj_monograph_summary .author,
.obj_monograph_summary .date,
.obj_monograph_summary .seriesPosition {
    grid-column: 2 !important;
    margin-left: 0 !important;
    display: block !important;
}

.obj_monograph_summary .title {
    font-size: 1rem !important;
    line-height: 1.35 !important;
    margin-top: 0 !important;
    margin-bottom: 0.25rem !important;
}

.obj_monograph_summary .title a {
    color: var(--uemasul-navy) !important;
    font-family: 'Lora', Georgia, serif;
    font-weight: 700;
    text-decoration: none;
    transition: var(--uemasul-transition);
}

.obj_monograph_summary .title a:hover {
    color: var(--uemasul-primary) !important;
}

.obj_monograph_summary .author {
    font-size: 0.85rem !important;
    color: var(--uemasul-text-muted) !important;
    line-height: 1.3 !important;
}

.obj_monograph_summary .date {
    font-size: 0.8rem !important;
    color: #94a3b8 !important;
    margin-top: 0.25rem !important;
}

/* === SEÇÃO SOBRE A EDITORA (HOMEPAGE) === */
.homepage_about {
    background: var(--uemasul-card-bg) !important;
    border: 1px solid var(--uemasul-border) !important;
    border-radius: var(--uemasul-radius-md) !important;
    padding: 1.75rem 2rem !important;
    margin: 1.5rem 0 2.5rem 0 !important;
    box-shadow: var(--uemasul-shadow-sm) !important;
}

.homepage_about h2 {
    font-family: 'Lora', Georgia, serif !important;
    color: var(--uemasul-navy) !important;
    font-size: 1.5rem !important;
    font-weight: 700 !important;
    margin-top: 0 !important;
    margin-bottom: 1rem !important;
    padding-bottom: 0.6rem !important;
    border-bottom: 2px solid var(--uemasul-border) !important;
    position: relative !important;
}

.homepage_about h2::after {
    content: '' !important;
    position: absolute !important;
    bottom: -2px !important;
    left: 0 !important;
    width: 50px !important;
    height: 3px !important;
    background: var(--uemasul-primary) !important;
    border-radius: 2px !important;
}

.homepage_about p {
    color: var(--uemasul-text-main) !important;
    line-height: 1.7 !important;
    font-size: 0.98rem !important;
    margin-bottom: 0 !important;
}

/* === NOTÍCIAS E AVISOS (HOMEPAGE) === */
.cmp_announcements_list,
.announcements_list {
    margin: 3rem 0 !important;
}

.cmp_announcements_list > .title,
.announcements_list > .title {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    font-family: 'Lora', Georgia, serif !important;
    font-size: 1.5rem !important;
    font-weight: 700 !important;
    color: var(--uemasul-navy) !important;
    margin: 0 0 1.5rem 0 !important;
    padding: 0 0 0.6rem 0 !important;
    border-bottom: 2px solid var(--uemasul-border) !important;
}

.cmp_announcements_list > .title::after,
.announcements_list > .title::after {
    content: '' !important;
    position: absolute !important;
    bottom: -2px !important;
    left: 0 !important;
    width: 50px !important;
    height: 3px !important;
    background: var(--uemasul-primary) !important;
    border-radius: 2px !important;
}

/* === PÁGINA DE DETALHES DO LIVRO === */
.obj_monograph_full {
    background: var(--uemasul-card-bg);
    border: 1px solid var(--uemasul-border);
    border-radius: var(--uemasul-radius-lg);
    box-shadow: var(--uemasul-shadow-md);
    padding: 2.2rem !important;
    margin-bottom: 2.5rem;
}

.obj_monograph_full .title {
    color: var(--uemasul-navy) !important;
    font-family: 'Lora', Georgia, serif;
    font-weight: 800;
    line-height: 1.25;
}

.obj_monograph_full .cover img {
    border-radius: var(--uemasul-radius-md);
    box-shadow: 0 10px 25px rgba(0,0,0,0.18);
    transition: var(--uemasul-transition);
}

.obj_monograph_full .cover img:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 32px rgba(0,0,0,0.22);
}

/* === BOTÃO DE FLIPBOOK 3D === */
.uemasul-flipbook-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    background: linear-gradient(135deg, var(--uemasul-primary) 0%, var(--uemasul-primary-dark) 100%);
    color: #ffffff !important;
    font-weight: 600;
    font-size: 1rem;
    padding: 0.85rem 1.4rem;
    border-radius: var(--uemasul-radius-md);
    text-decoration: none !important;
    box-shadow: 0 4px 14px rgba(187, 80, 80, 0.35);
    transition: var(--uemasul-transition);
    cursor: pointer;
    border: none;
    margin-bottom: 12px;
}

.uemasul-flipbook-btn:hover {
    background: linear-gradient(135deg, #c75757 0%, #7e2424 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(187, 80, 80, 0.45);
    color: #ffffff !important;
}

.uemasul-flipbook-btn:active {
    transform: translateY(0);
}

.uemasul-flipbook-btn svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
    transition: transform 0.3s ease;
}

.uemasul-flipbook-btn:hover svg {
    transform: rotateY(180deg);
}

/* === BOTÕES NATIVOS DE DOWNLOAD === */
.cmp_download_link {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    background: #f1f5f9 !important;
    color: var(--uemasul-navy) !important;
    border: 1px solid var(--uemasul-border) !important;
    font-weight: 600 !important;
    padding: 0.75rem 1.2rem !important;
    border-radius: var(--uemasul-radius-md) !important;
    transition: var(--uemasul-transition) !important;
    text-decoration: none !important;
}

.cmp_download_link:hover {
    background: #e2e8f0 !important;
    color: var(--uemasul-primary) !important;
    border-color: #cbd5e1 !important;
    transform: translateY(-1px);
}

/* === GRÁFICO DE DOWNLOADS === */
.downloads_chart {
    background: #f8fafc;
    border: 1px solid var(--uemasul-border);
    border-radius: var(--uemasul-radius-md);
    padding: 1.25rem !important;
    margin-top: 1.5rem !important;
}

.downloads_chart .label {
    color: var(--uemasul-navy) !important;
    font-family: 'Lora', Georgia, serif;
    font-weight: 700;
}

/* === BARRA LATERAL (SIDEBAR) === */
.pkp_structure_sidebar .pkp_block {
    background: var(--uemasul-card-bg);
    border: 1px solid var(--uemasul-border);
    border-radius: var(--uemasul-radius-md);
    padding: 1.25rem !important;
    margin-bottom: 1.5rem;
    box-shadow: var(--uemasul-shadow-sm);
}

.pkp_structure_sidebar .pkp_block .title {
    color: var(--uemasul-navy) !important;
    border-bottom: 2px solid #f1f5f9;
    padding-bottom: 0.5rem;
    margin-bottom: 0.75rem;
    font-weight: 700;
}

/* === RODAPÉ === */
.pkp_structure_footer_wrapper {
    background: linear-gradient(135deg, var(--uemasul-navy-dark) 0%, var(--uemasul-navy) 100%) !important;
    color: #e2e8f0 !important;
    border-top: 3px solid var(--uemasul-primary);
    padding-top: 2rem;
    padding-bottom: 2rem;
}

.pkp_structure_footer_wrapper a {
    color: #93c5fd !important;
}

.pkp_structure_footer_wrapper a:hover {
    color: #ffffff !important;
    text-decoration: underline;
}
