/* Global Navigation Styles */

.navbar-global {
  position: fixed;
  top: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10000;
  width: calc(100% - 4rem);
  max-width: 80rem;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 9999px;
  padding: 1rem 2rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.nav-inner-global {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo-circle-global {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.logo-circle-global img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.nav-links-global {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-links-global a {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  transition: all 0.3s ease;
  position: relative;
  padding-bottom: 0.5rem;
  font-weight: 600;
  font-family: 'Montserrat', sans-serif;
  font-size: 1rem;
}

.nav-links-global a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: white;
  transition: width 0.3s ease;
}

.nav-links-global a:hover::after,
.nav-links-global a.active-page::after {
  width: 100%;
}

.nav-links-global:hover a {
  color: rgba(255, 255, 255, 0.4);
  transform: scale(0.95);
}

.nav-links-global a:hover,
.nav-links-global a.active-page {
  color: white;
  transform: scale(1.1);
}

.nav-icon-global {
  display: flex;
  align-items: center;
}

.globe-icon-global {
  color: rgba(255, 255, 255, 0.8);
}

/* ========================================
   PROFILE DROPDOWN STYLES
   ======================================== */

.profile-container {
    position: relative;
    margin-left: 1rem;
}

/* 1. The Circular Profile Picture */
.profile-trigger {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.1);
}

.profile-trigger:hover {
    transform: scale(1.05);
    border-color: rgba(255, 255, 255, 0.8);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
}

.profile-trigger img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 2. The Pop-up Menu (Glassmorphism) */
.profile-dropdown {
    position: absolute;
    top: 60px;
    right: 0;
    width: 260px;
    
    /* Matches your Navbar Glass Style */
    background: rgba(30, 41, 59, 0.85); /* Darker glass for better text readability */
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    padding: 1rem;
    
    /* Animation setup */
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    z-index: 10001;
}

/* Active State */
.profile-dropdown.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* Menu Contents */
.dropdown-header {
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1.5px solid rgba(255, 255, 255, 0.5);
}

.user-name {
    color: white;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 0.2rem;
}

.user-email {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
    word-break: break-all;
}

.dropdown-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.9);
    font-family: 'Montserrat', sans-serif;
    font-size: 0.95rem;
    cursor: pointer;
    border-radius: 8px;
    transition: background 0.2s;
    text-align: left;
}

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

.logout-btn {
    color: #ff8589; /* Soft red to match your theme */
}

.logout-btn:hover {
    background: rgba(220, 38, 38, 0.15); /* Red tinted hover */
    color: #ff474e;
}

/* Role Badge Styles */
.name-badge-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 0.2rem;
}

.role-badge {
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    padding: 2px 8px;
    border-radius: 6px;
    letter-spacing: 0.5px;
    font-family: 'Montserrat', sans-serif;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.admin-role {
    background: rgba(239, 68, 68, 0.2); /* Soft transparent red */
    color: #ff8589;
    border-color: rgba(239, 68, 68, 0.4);
}

.user-role {
    background: rgba(255, 255, 255, 0.1); /* Neutral glass */
    color: rgba(255, 255, 255, 0.8);
}

.dropdown-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 0.5rem 0;
}


/* Mobile Responsive */
@media (max-width: 768px) {
  .navbar-global {
    width: calc(100% - 2rem);
    padding: 0.9rem 1rem;
    top: 1rem;
  }

   .profile-dropdown {
        right: -10px; /* Slight offset for mobile padding */
        width: 240px;
    }

  .nav-inner-global {
    gap: 0.8rem;
  }

  .nav-links-global {
    flex: 1;
    justify-content: center;
    gap: 0.6rem;
  }

  .nav-links-global a {
    font-size: 0.85rem;
  }

  .logo-circle-global {
    width: 2rem;
    height: 2rem;
  }
}
