/* Logo Styles - Global definition to avoid conflicts */
.logo-img {
    height: 28px;
    width: auto;
    display: block;
}

/* Mobile logo adjustments */
@media (max-width: 768px) {
    .logo-img {
        height: 25px;
    }
}

/* Header Styles */
.header {
    background-color: #00597C;
    position: sticky;
    top: 0;
    z-index: 1040;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 0;
    margin: 0;
}

/* Bootstrap Navbar Customization */
.header .navbar {
    background-color: #00597C !important;
    padding: 0.5rem 0;
    margin: 0;
}

.header .navbar-brand {
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
    margin-right: 2rem; /* Dobro do espaçamento padrão */
}

.header .navbar-nav .nav-link {
    color: #ffffff !important;
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: all 0.3s ease;
    font-size: 0.6875rem;
}

.header .navbar-nav .nav-link:hover,
.header .navbar-nav .nav-link:focus {
    color: white !important;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 0.25rem;
}

.header .navbar-nav .nav-link.active {
    color: #007eb0 !important;
    font-weight: 600;
}

/* Dropdown Customization */
.header .dropdown-menu {
    background-color: #00597C;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.375rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-top: 0.125rem;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
    transition-delay: 0s, 0s, 0s;
    pointer-events: none;
    visibility: hidden;
}

/* Melhorar usabilidade dos dropdowns do header */
.header .dropdown:hover .dropdown-menu {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
    visibility: visible;
    transition-delay: 0s, 0s, 0s;
}

/* Adicionar delay no hover out para evitar desaparecimento acidental */
.header .dropdown .dropdown-menu {
    transition-delay: 0s, 0s, 0.2s;
}

.header .dropdown:hover .dropdown-menu {
    transition-delay: 0s, 0s, 0s;
}

/* Área de ponte invisível para dropdowns do header */
.header .dropdown::before {
    content: '';
    position: absolute;
    top: 100%;
    left: -10px;
    width: calc(100% + 20px);
    height: 15px;
    z-index: 149;
}

.header .dropdown-menu::before {
    content: '';
    position: absolute;
    top: -15px;
    left: -10px;
    width: calc(100% + 20px);
    height: 15px;
    z-index: 148;
}

.header .dropdown-item {
    color: #ffffff;
    padding: 0.5rem 1rem;
    transition: all 0.3s ease;
    font-size: 0.6875rem;
}

.header .dropdown-item:hover,
.header .dropdown-item:focus {
    background-color: rgba(255, 255, 255, 0.1) !important;
    color: white !important;
}

.header .dropdown-item.active {
    background-color: #007eb0;
    color: #00597C;
}

/* Navbar Toggler Customization */
.header .navbar-toggler {
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 0.25rem 0.5rem;
}

.header .navbar-toggler:focus {
    box-shadow: 0 0 0 0.2rem rgba(195, 245, 60, 0.25);
}

.header .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.8%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
    .header .navbar {
        padding: 0.75rem 0;
    }
    
    .header .navbar-collapse {
        background-color: #00597C;
        border-radius: 0.375rem;
        margin-top: 0.5rem;
        padding: 1rem;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    }
    
    .header .navbar-nav {
        text-align: left;
    }
    
    .header .navbar-nav .nav-item {
        margin: 0.25rem 0;
    }
    
    .header .navbar-nav .nav-link {
        padding: 0.75rem 1rem;
        border-radius: 0.25rem;
        font-size: 0.6875rem;
    }
    
    .header .dropdown-menu {
        background-color: rgba(0, 89, 124, 0.95);
        border: none;
        box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
        margin: 0.5rem 0;
        position: static;
        float: none;
        width: 100%;
    }
    
    .header .dropdown-item {
        text-align: left;
        padding: 0.5rem 1rem;
        font-size: 0.6875rem;
    }
    
    /* Force user dropdown to appear on the left in mobile */
    .header .navbar-collapse .user-dropdown .dropdown-menu {
        right: auto !important;
        left: 0 !important;
        transform: none !important;
        position: absolute !important;
    }
    
    /* Logo styles already defined globally above */
}

/* Ao invés de .header, usar uma classe mais específica */
.main-header,
.site-header {
    position: relative !important; /* Desabilitar sticky do header */
    top: auto;
    z-index: 1040;
    background-color: #00597C !important;
}

/* Header principal NÃO deve ser sticky */
header.header {
    position: relative !important;
    background-color: #00597C !important;
}

.login-btn {
    padding: 0.5rem 1.25rem !important;
    border-radius: 0.375rem !important;
    font-weight: 500 !important;
    transition: all 0.3s ease !important;
    background: transparent !important;
    color: white !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    line-height: 1.5;
    text-decoration: none !important;
}

.login-btn:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    border-color: rgba(255, 255, 255, 0.5) !important;
    color: white !important;
    text-decoration: none !important;
    transform: translateY(-1px) !important;
}

.user-circle {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background-color: #00597C;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    font-size: 0.875rem;
}

.user-circle:hover {
    background-color: rgba(0, 89, 124, 0.8); /* Versão mais clara do #00597C */
    transform: scale(1.05);
}

.dropdown-item:hover {
    background-color: rgba(0, 89, 124, 0.1);
    color: #00597C;
}
 
.user-dropdown {
    position: relative;
}

/* User dropdown specific styles - Override critical.css */
.user-dropdown .dropdown-menu {
    margin-top: 0.75rem;
    border-radius: 0.5rem;
    box-shadow: 0 0.5rem 1rem rgba(0,0,0,0.15);
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    transform: translateY(-0.625rem);
    z-index: 200;
    min-width: 11.25rem;
    border: 1px solid rgba(0,0,0,0.15);
    background-color: white !important;
    opacity: 0;
    transition: all 0.2s ease;
    pointer-events: none;
    padding: 0.3125rem 0;
    margin-left: auto;
    margin-right: auto;
}

.user-dropdown.show .dropdown-menu,
.user-dropdown:hover .dropdown-menu {
    display: block;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* Create a larger invisible bridge area to maintain hover */
.user-dropdown::before {
    content: '';
    position: absolute;
    top: 100%;
    left: -30px;
    width: calc(100% + 60px);
    height: 20px;
    z-index: 150;
}

/* Additional hover bridge for the dropdown menu itself */
.user-dropdown .dropdown-menu::before {
    content: '';
    position: absolute;
    top: -20px;
    left: -30px;
    width: calc(100% + 60px);
    height: 20px;
    z-index: 149;
}

/* Override critical.css for user dropdown items */
.user-dropdown .dropdown-item {
    padding: 12px 20px;
    white-space: nowrap;
    transition: all 0.2s ease;
    border: none;
    background: none;
    color: #333 !important; /* Override critical.css white color */
    text-decoration: none;
    display: block;
    width: 100%;
    font-size: 0.6875rem;
    line-height: 1.4;
    position: relative;
    z-index: 1;
    cursor: pointer;
    min-height: 44px;
    box-sizing: border-box;
}

.user-dropdown .dropdown-item:first-child {
    padding-top: 18px;
    margin-top: 0;
    position: relative;
    z-index: 201;
}

.user-dropdown .dropdown-item:first-child::before {
    content: '';
    position: absolute;
    top: -5px;
    left: -10px;
    right: -10px;
    bottom: -5px;
    z-index: -1;
}

.user-dropdown .dropdown-item:hover {
    background-color: #f8f9fa !important;
    color: #00597C !important;
    transform: translateX(2px);
}

.user-dropdown .dropdown-item:focus {
    background-color: #f8f9fa !important;
    color: #00597C !important;
    outline: none;
}

.user-dropdown .dropdown-divider {
    margin: 5px 0;
    border-top: 1px solid #e9ecef;
}

/* Mobile specific styles for user dropdown */
@media (max-width: 768px) {
    .user-dropdown .dropdown-menu {
        position: absolute !important;
        left: 0 !important;
        right: 0 !important;
        transform: none !important;
        margin-top: 0.5rem;
        min-width: 200px;
        background-color: white !important;
        border: 1px solid rgba(0,0,0,0.15);
        box-shadow: 0 0.5rem 1rem rgba(0,0,0,0.15);
        margin-left: auto !important;
        margin-right: auto !important;
    }
    
    .user-dropdown .dropdown-item {
        color: #333 !important;
        padding: 12px 20px;
        font-size: 0.875rem;
        min-height: 44px;
    }
    
    .user-dropdown .dropdown-item:hover {
        background-color: #f8f9fa !important;
        color: #00597C !important;
    }
    
    .user-dropdown .dropdown-item:focus {
        background-color: #f8f9fa !important;
        color: #00597C !important;
    }
}

.user-circle {
width: 40px;
height: 40px;
border-radius: 50%;
background-color: #4ba7bb;
color: white;
display: flex;
align-items: center;
justify-content: center;
font-weight: bold;
cursor: pointer;
transition: all 0.3s ease;
overflow: hidden;
}

/* Add this new style */
.user-circle.has-image {
    color: transparent; /* Hide initials when image is present */
}