/* ==========================================================================
   style.css
   Estilos personalizados do Sistema de Gestão de Downloads.
   Complementa o Bootstrap 5 (carregado via CDN).
   ========================================================================== */

:root {
    --cor-primaria: #0d6efd;
    --cor-secundaria: #6c757d;
    --cor-fundo: #ffffff;
}

/* -------------------------------------------------------------------------- */
/* Geral                                                                      */
/* -------------------------------------------------------------------------- */
body {
    background-color: var(--cor-fundo);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1 0 auto;
}

/* -------------------------------------------------------------------------- */
/* Navbar / Menu de Navegação                                                 */
/* -------------------------------------------------------------------------- */
.navbar {
    padding: 1.5rem 0;
}

.navbar-brand {
    font-size: 1.5rem;
    color: #212529 !important;
    transition: color 0.3s ease;
}

.navbar-brand:hover {
    color: #0d6efd !important;
}

.navbar-brand i {
    font-size: 2.5rem;
}

.navbar-nav .nav-link {
    color: #212529;
    font-weight: 500;
    font-size: 1.1rem;
    padding: 0.75rem 1.25rem;
    transition: all 0.3s ease;
    position: relative;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: #0d6efd;
}

.navbar-nav .nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0.5rem;
    left: 1.25rem;
    right: 1.25rem;
    height: 2px;
    background-color: #212529;
}

/* -------------------------------------------------------------------------- */
/* Header Moderno - Área Administrativa                                       */
/* -------------------------------------------------------------------------- */
.modern-header {
    padding: 0.75rem 0;
    border-bottom: 1px solid #e9ecef;
    background-color: #ffffff !important;
}

.modern-header .container-fluid {
    max-width: 1400px;
}

/* Logo e Branding */
.modern-brand {
    padding: 0;
    margin-right: 2rem;
}

.modern-brand:hover {
    text-decoration: none;
}

.brand-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.brand-icon {
    width: 55px;
    height: 55px;
    background: linear-gradient(135deg, #0d6efd 0%, #0a58ca 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.25);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.brand-icon i {
    font-size: 28px;
    color: #ffffff;
}

.modern-brand:hover .brand-icon {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(13, 110, 253, 0.35);
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.brand-name {
    font-size: 1.35rem;
    font-weight: 700;
    color: #212529;
    letter-spacing: -0.5px;
}

.brand-tagline {
    font-size: 0.8rem;
    font-weight: 500;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 2px;
}

/* Links de Navegação Modernos */
.modern-nav-link {
    color: #495057 !important;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.6rem 1.25rem !important;
    margin: 0 0.25rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
}

.modern-nav-link:hover {
    color: #0d6efd !important;
    background-color: #f8f9fa;
}

.modern-nav-link.active {
    color: #0d6efd !important;
    background-color: #e7f1ff;
}

.modern-nav-link i {
    font-size: 1rem;
    opacity: 0.8;
}

/* Dropdown Moderno */
.modern-dropdown {
    border: 1px solid #e9ecef;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    border-radius: 10px;
    padding: 0.5rem 0;
    margin-top: 0.5rem;
}

.modern-dropdown .dropdown-item {
    padding: 0.6rem 1.25rem;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.modern-dropdown .dropdown-item:hover {
    background-color: #f8f9fa;
    color: #0d6efd;
}

.modern-dropdown .dropdown-item.active {
    background-color: #e7f1ff;
    color: #0d6efd;
}

.modern-dropdown .dropdown-item.text-danger:hover {
    background-color: #ffe5e5;
    color: #dc3545 !important;
}

/* Responsividade Mobile */
@media (max-width: 991px) {
    .modern-header {
        padding: 0.5rem 0;
    }
    
    .brand-container {
        gap: 0.75rem;
    }
    
    .brand-icon {
        width: 45px;
        height: 45px;
    }
    
    .brand-icon i {
        font-size: 24px;
    }
    
    .brand-name {
        font-size: 1.1rem;
    }
    
    .brand-tagline {
        font-size: 0.7rem;
    }
    
    .modern-nav-link {
        margin: 0.25rem 0;
        padding: 0.75rem 1rem !important;
    }
    
    .navbar-nav {
        margin-top: 1rem;
        padding-top: 1rem;
        border-top: 1px solid #e9ecef;
    }
}

/* -------------------------------------------------------------------------- */
/* Footer                                                                     */
/* -------------------------------------------------------------------------- */
.site-footer {
    background: url('../img/footer-bg.png') center/cover no-repeat;
    color: #000;
    padding: 3rem 0 2rem;
    margin-top: auto;
    position: relative;
    overflow: hidden;
}

.footer-content {
    position: relative;
    z-index: 1;
}

.footer-initiative {
    font-size: 1.1rem;
    font-weight: 600;
    color: #000;
    margin-bottom: 1rem;
}

.footer-logos {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.footer-logo-item {
    display: flex;
    align-items: center;
    justify-content: center;
}

.footer-support {
    font-size: 1rem;
    font-weight: 600;
    color: #000;
}

.footer-partner .partner-name {
    font-size: 2.5rem;
    font-weight: 700;
    color: #000;
    text-shadow: 2px 2px 4px rgba(255, 255, 255, 0.3);
}

.footer-copyright {
    font-size: 0.95rem;
    font-weight: 600;
    color: #000;
}

.footer-links {
    font-size: 0.9rem;
}

.footer-link {
    color: #dc3545;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.footer-link:hover {
    color: #fff;
    text-decoration: underline;
}

/* -------------------------------------------------------------------------- */
/* Header Moderno - Página Pública                                            */
/* -------------------------------------------------------------------------- */
.public-header {
    padding: 1rem 0;
    border-bottom: 1px solid #e9ecef;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    background-color: #ffffff !important;
}

/* Logo e Branding */
.public-brand {
    padding: 0;
    margin-right: 2rem;
    transition: transform 0.3s ease;
}

.public-brand:hover {
    text-decoration: none;
    transform: translateY(-1px);
}

.public-brand-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.public-brand-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #0d6efd 0%, #0a58ca 100%);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(13, 110, 253, 0.3);
    transition: all 0.3s ease;
}

.public-brand-icon i {
    font-size: 32px;
    color: #ffffff;
}

.public-brand:hover .public-brand-icon {
    box-shadow: 0 6px 20px rgba(13, 110, 253, 0.4);
    transform: scale(1.05);
}

.public-brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
}

.public-brand-name {
    font-size: 1.45rem;
    font-weight: 700;
    color: #212529;
    letter-spacing: -0.5px;
}

.public-brand-tagline {
    font-size: 0.85rem;
    font-weight: 500;
    color: #6c757d;
    letter-spacing: 0.3px;
    margin-top: 2px;
}

/* Links de Navegação Modernos - Página Pública */
.public-nav-link {
    color: #495057 !important;
    font-weight: 600;
    font-size: 1rem;
    padding: 0.65rem 1.5rem !important;
    margin: 0 0.25rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
}

/* Traço visual por baixo (inicialmente invisível) */
.public-nav-link::after {
    content: '';
    position: absolute;
    bottom: 0.25rem;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 40px;
    height: 3px;
    background: linear-gradient(90deg, #0d6efd 0%, #0a58ca 100%);
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
    opacity: 0;
}

.public-nav-link:hover {
    color: #0d6efd !important;
    background-color: #f8f9fa;
    transform: translateY(-1px);
}

/* Mostrar traço no hover com animação suave */
.public-nav-link:hover::after {
    transform: translateX(-50%) scaleX(1);
    opacity: 0.6;
}

.public-nav-link.active {
    color: #0d6efd !important;
    background-color: #e7f1ff;
}

/* Traço visível e destacado no link ativo */
.public-nav-link.active::after {
    transform: translateX(-50%) scaleX(1);
    opacity: 1;
}

/* Responsividade Mobile - Header Público */
@media (max-width: 991px) {
    .public-header {
        padding: 0.75rem 0;
    }
    
    .public-brand-container {
        gap: 0.85rem;
    }
    
    .public-brand-icon {
        width: 50px;
        height: 50px;
    }
    
    .public-brand-icon i {
        font-size: 26px;
    }
    
    .public-brand-name {
        font-size: 1.2rem;
    }
    
    .public-brand-tagline {
        font-size: 0.75rem;
    }
    
    .public-nav-link {
        margin: 0.25rem 0;
        padding: 0.85rem 1rem !important;
        border-radius: 6px;
    }
    
    .public-nav-link.active::after {
        display: none;
    }
    
    .navbar-nav {
        margin-top: 1rem;
        padding-top: 1rem;
        border-top: 1px solid #e9ecef;
    }
}

@media (max-width: 576px) {
    .public-brand-icon {
        width: 45px;
        height: 45px;
    }
    
    .public-brand-icon i {
        font-size: 24px;
    }
    
    .public-brand-name {
        font-size: 1.1rem;
    }
    
    .public-brand-tagline {
        font-size: 0.7rem;
    }
}

/* -------------------------------------------------------------------------- */
/* Página pública                                                             */
/* -------------------------------------------------------------------------- */
.content-card {
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    height: 100%;
}

.content-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.12) !important;
}

.content-card .card-img-top {
    height: 180px;
    object-fit: cover;
    background-color: #e9ecef;
}

.content-card .thumb-placeholder {
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #e9ecef;
    color: #adb5bd;
    font-size: 3rem;
}

/* Realce do cartão quando o conteúdo está selecionado */
.content-card.selected {
    border: 2px solid var(--cor-primaria);
    box-shadow: 0 0.5rem 1rem rgba(13, 110, 253, 0.25) !important;
}

/* -------------------------------------------------------------------------- */
/* Área administrativa                                                        */
/* -------------------------------------------------------------------------- */
.admin-body {
    background-color: var(--cor-fundo);
}

/* Cartões de estatísticas do dashboard */
.stat-card {
    border: none;
    border-radius: 0.75rem;
    color: #fff;
    overflow: hidden;
}

.stat-card .stat-icon {
    font-size: 2.5rem;
    opacity: 0.35;
}

.stat-card .stat-value {
    font-size: 2rem;
    font-weight: 700;
}

.bg-gradient-primary { background: linear-gradient(135deg, #0d6efd, #0a58ca); }
.bg-gradient-success { background: linear-gradient(135deg, #198754, #146c43); }
.bg-gradient-warning { background: linear-gradient(135deg, #fd7e14, #d96909); }
.bg-gradient-info    { background: linear-gradient(135deg, #0dcaf0, #0aa2c0); }

/* Tabelas */
.table thumbnail-cell img {
    width: 60px;
    height: 45px;
    object-fit: cover;
    border-radius: 0.25rem;
}

/* Página de login */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0d6efd 0%, #6610f2 100%);
}

.login-card {
    width: 100%;
    max-width: 400px;
    border: none;
    border-radius: 1rem;
}

/* Rodapé fixo no fundo */
footer {
    flex-shrink: 0;
}
