/* HEADER SIMPLES E LIMPO */
/* MENU PRINCIPAL */
.header {
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 90%;
    margin: 30px auto;
    padding: 0 10px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

/* LOGO/BRAND */
.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: white;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.2rem;
    transition: opacity 0.3s ease;
}

.brand:hover {
    opacity: 0.9;
    text-decoration: none;
    color: white;
}

.brand-icon {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

/* NAVEGAÇÃO DESKTOP */
.nav-menu {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
}

.nav-item {
    position: relative;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    text-decoration: none;
    transform: translateY(-1px);
}

.nav-link i {
    font-size: 0.9rem;
}

/* SAUDAÇÃO USUÁRIO DESKTOP */
.nav-welcome {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px; /* Reduzido padding */
    color: rgba(255, 255, 255, 0.95);
    font-weight: 500;
    font-size: 0.85rem; /* Reduzido de 0.9rem */
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    white-space: nowrap; /* IMPEDE QUEBRA DE LINHA */
    max-width: 180px; /* LARGURA MÁXIMA */
    overflow: hidden;
    text-overflow: ellipsis; /* ADICIONA ... SE MUITO LONGO */
}

.nav-welcome i {
    font-size: 0.9rem; /* Ligeiramente menor */
    color: #10b981;
    flex-shrink: 0; /* IMPEDE QUE O ÍCONE ENCOLHA */
}

/* NAVEGAÇÃO DESKTOP - Ajuste para dar mais espaço */
.nav-menu {
    display: flex;
    align-items: center;
    gap: 6px; /* Reduzido de 8px para 6px */
    list-style: none;
    flex-wrap: nowrap; /* IMPEDE QUEBRA DE LINHA */
}

.nav-item {
    position: relative;
    flex-shrink: 0; /* IMPEDE QUE OS ITENS ENCOLHAM */
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 6px; /* Reduzido */
    padding: 8px 12px; /* Reduzido padding */
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.85rem; /* Reduzido */
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    white-space: nowrap; /* IMPEDE QUEBRA DE TEXTO */
}

/* Container principal - mais espaço */
.nav-container {
    max-width: 95%; /* Aumentado de 90% para 95% */
    margin: 0 auto;
    padding: 0 15px; /* Aumentado de 10px para 15px */
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

/* Breakpoint específico para evitar quebra em telas médias */
@media (max-width: 1024px) and (min-width: 769px) {
    .nav-welcome {
        font-size: 0.8rem;
        padding: 6px 10px;
        max-width: 160px;
    }
    
    .nav-link {
        font-size: 0.8rem;
        padding: 6px 10px;
    }
    
    .nav-menu {
        gap: 4px;
    }
}

/* Para telas muito pequenas mas ainda desktop */
@media (max-width: 900px) and (min-width: 769px) {
    .nav-welcome {
        font-size: 0.75rem;
        padding: 6px 8px;
        max-width: 140px;
    }
    
    .nav-link {
        font-size: 0.75rem;
        padding: 6px 8px;
    }
    
    .nav-menu {
        gap: 3px;
    }
}

/* BOTÃO SAIR ESPECIAL */
.nav-link.logout {
    background: rgba(0, 0, 0, 0.3);
    color: #fef2f2;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.nav-link.logout:hover {
    background: rgba(182, 27, 27, 0.3);
    color: white;
    border-color: rgba(255, 255, 255, 0.5);
}

/* BOTÃO MOBILE */
.mobile-toggle {
    display: none;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.mobile-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
}

.hamburger {
    width: 24px;
    height: 20px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.hamburger span {
    width: 100%;
    height: 2px;
    background: white;
    border-radius: 1px;
    transition: all 0.3s ease;
}

/* ANIMAÇÃO DO HAMBURGER */
.mobile-toggle.active .hamburger span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.mobile-toggle.active .hamburger span:nth-child(2) {
    opacity: 0;
}

.mobile-toggle.active .hamburger span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* MENU MOBILE */
.mobile-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.mobile-menu.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

.mobile-nav {
    padding: 20px;
}

/* SAUDAÇÃO USUÁRIO MOBILE */
.mobile-welcome {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
    color: white;
    border-radius: 10px;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 0.95rem;
}

.mobile-welcome i {
    font-size: 1.2rem;
    color: #10b981;
}

.mobile-divider {
    height: 1px;
    background: #e2e8f0;
    margin: 16px 0;
}

.mobile-nav-item {
    margin-bottom: 8px;
}

.mobile-nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    color: #4a5568;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.mobile-nav-link:hover {
    background: #1e3a8a;
    color: white;
    text-decoration: none;
    transform: translateX(4px);
}

.mobile-nav-link i {
    width: 20px;
    text-align: center;
    color: #64748b;
}

.mobile-nav-link:hover i {
    color: white;
}

/* BOTÃO SAIR MOBILE */
.mobile-nav-link.logout {
    background: #fef2f2;
    border-color: #fecaca;
    color: #dc2626;
}

.mobile-nav-link.logout:hover {
    background: #dc2626;
    color: white;
}

.mobile-nav-link.logout i {
    color: #dc2626;
}

.mobile-nav-link.logout:hover i {
    color: white;
}

/* OVERLAY */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 50;
}

.overlay.active {
    opacity: 1;
    visibility: visible;
}

/* RESPONSIVIDADE */
@media (max-width: 768px) {
    .nav-container {
        width: 100%;
        padding: 0 0px;
        height: 60px;
    }

    .nav-menu {
        display: none;
    }

    .mobile-toggle {
        display: block;
    }

    .brand {
        font-size: 1.1rem;
    }

    .brand-icon {
        width: 36px;
        height: 36px;
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .nav-container {
        width: 100%;
        padding: 0 0px;
    }

    .mobile-nav {
        padding: 10px;
    }

    .mobile-welcome {
        padding: 14px 16px;
        font-size: 0.9rem;
    }

    .brand {
        font-size: 1rem;
    }

    .brand-icon {
        width: 32px;
        height: 32px;
        font-size: 1rem;
    }
}

/* EFEITOS ADICIONAIS */
.nav-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: rgba(255, 255, 255, 0.8);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover::before {
    width: 80%;
}

/* ANIMAÇÃO DE ENTRADA */
@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.mobile-menu.active {
    animation: slideDown 0.3s ease;
}

/* Estilo para o logo da marca */
.brand-logo {
    width: 5%;
    height: 5%;;
    object-fit: contain;
    display: block;
}

/* Ajustar a marca completa */
.brand {
    display: flex;
    align-items: center;
    gap: 12px; /* Espaço entre logo e texto */
    padding: 8px 12px;
    text-decoration: none;
}

/* Responsivo para mobile */
@media (max-width: 768px) {
    .brand-logo {
        width: 20%;
        height: 20%;
    }
    
    .brand {
        gap: 8px;
        padding: 6px 10px;
    }
}

/* Para telas grandes */
@media (min-width: 1200px) {
    .brand-logo {
        width: 8%;
        height: 8%;
    }
}

/* === MODAL SOBRE - VERSÃO CORRIGIDA === */

/* Modal overlay - inicialmente oculto */
#aboutModal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    padding: 10px;
    box-sizing: border-box;
}

.modal-container {
    background: white;
    border-radius: 12px;
    max-width: 650px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    position: relative;
    transform: translateY(-20px);
    transition: transform 0.3s ease;
    margin: 20px;
}

.modal-header {
    padding: 25px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
    color: white;
    border-radius: 12px 12px 0 0;
    position: relative;
}

.modal-header h2 {
    margin: 0;
    color: white;
    font-size: 1.6rem;
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.modal-header h2::before {
    content: '\f05a';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    font-size: 1.4rem;
}

.close-button {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    font-size: 18px;
    cursor: pointer;
    padding: 10px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    color: white;
    transition: all 0.3s ease;
    font-weight: bold;
    margin-left: 15px;
}

.close-button:hover {
    background: rgba(255, 255, 255, 0.25);
    color: white;
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.modal-body {
    padding: 15px;
}

.modal-intro {
    text-align: center;
    margin-bottom: 12px;
    padding: 12px;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-radius: 6px;
    border: 1px solid #bae6fd;
}

.modal-intro h3 {
    color: #1e3a8a;
    margin: 0 0 5px 0;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.modal-intro p {
    color: #475569;
    margin: 0;
    line-height: 1.4;
    font-size: 0.85rem;
}

.version-badge {
    display: inline-block;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    margin-top: 4px;
    box-shadow: 0 1px 3px rgba(16, 185, 129, 0.3);
}

.modal-footer {
    padding: 10px 15px;
    border-top: 1px solid #e2e8f0;
    text-align: center;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: 0 0 12px 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-footer .footer-text {
    color: #1e3a8a;
    font-size: 0.75rem;
    font-weight: 500;
    margin: 0;
    flex: 1;
}

.modal-footer button {
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.8rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(30, 58, 138, 0.3);
    flex-shrink: 0;
}

.modal-footer button:hover {
    background: linear-gradient(135deg, #1e40af 0%, #2563eb 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(30, 58, 138, 0.4);
}

.modal-footer small {
    display: none;
}

.modal-content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 12px;
}

.modal-content-left {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.modal-content-right {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.modal-section {
    padding: 10px;
    background: #f8fafc;
    border-radius: 6px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.modal-section h4 {
    color: #1e3a8a;
    margin: 0 0 6px 0;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: 600;
}

.modal-section ul {
    margin: 0;
    padding-left: 15px;
    color: #4a5568;
}

.modal-section li {
    margin-bottom: 2px;
    font-size: 0.8rem;
    line-height: 1.3;
}

.modal-section p {
    color: #4a5568;
    line-height: 1.4;
    margin: 0;
    font-size: 0.8rem;
}

.modal-images {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
    padding: 8px;
    background: #f8fafc;
    border-radius: 4px;
    margin-bottom: 8px;
}

.modal-images img {
    max-width: 20%;
    max-height: 20%;
    object-fit: contain;
    border-radius: 3px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Responsividade */
@media (max-width: 768px) {
    .modal-container {
        width: 95%;
        margin: 10px;
        max-height: 95vh;
    }
    
    .modal-content-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .modal-header {
        padding: 15px;
    }
    
    .modal-header h2 {
        font-size: 1.2rem;
    }
    
    .modal-body {
        padding: 12px;
    }
    
    .modal-intro {
        padding: 10px;
        margin-bottom: 10px;
    }
    
    .modal-intro h3 {
        font-size: 1rem;
    }
    
    .modal-images img {
        max-width: 20%;
        max-height: 15%
    }
    
    .modal-footer {
        padding: 8px 12px;
        flex-direction: column;
        gap: 8px;
    }
    
    .modal-footer .footer-text {
        font-size: 0.7rem;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .modal-container {
        width: 98%;
        margin: 5px;
        max-height: 98vh;
    }
    
    .modal-header {
        padding: 12px;
    }
    
    .modal-header h2 {
        font-size: 1.1rem;
    }
    
    .close-button {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }
    
    .modal-body {
        padding: 10px;
    }
    
    .modal-intro {
        padding: 8px;
        margin-bottom: 8px;
    }
    
    .modal-intro h3 {
        font-size: 0.95rem;
    }
    
    .modal-intro p {
        font-size: 0.8rem;
    }
    
    .modal-footer {
        padding: 6px 10px;
    }
    
    .modal-section h4 {
        font-size: 0.85rem;
    }
    
    .modal-section li,
    .modal-section p {
        font-size: 0.75rem;
    }
}