/* Header Styles */
header {
  padding-top: 0px;
  padding-bottom: 0px; /* Remove bottom padding to eliminate gap */
  position: relative;
  z-index: 1030;
}

.navbar-brand img {
  height: 100px !important;
  width: auto !important;
  transition: all 0.3s ease;
}

/* Responsive logo sizing */
@media (min-width: 768px) {
  .navbar-brand img {
    height: 120px !important; /* Bigger logo on larger screens */
  }
}

@media (max-width: 767.98px) {
  .navbar-brand img {
    width: 65px !important;
    height: 65px !important;
  }
}

/* Fix navbar brand alignment */
.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: white !important;
    text-decoration: none;
}

.navbar-brand:hover {
    color: #ffd700 !important;
}

/* HIDE HAMBURGER ON LARGE SCREENS (lg breakpoint = 992px) */
@media (min-width: 992px) {
  #hamburgerMenu {
    display: none !important;
  }
}

/* SHOW HAMBURGER ONLY ON MEDIUM AND SMALLER SCREENS */
@media (max-width: 991.98px) {
  #hamburgerMenu {
    display: flex !important;
  }
}

/* Header buttons and dropdowns - LARGER on medium+ screens */
@media (min-width: 768px) {
  .btn-outline-light {
    padding: 12px 24px;
    font-size: 1.2rem;
    min-width: 120px;
    font-weight: 500;
  }
  
  .dropdown-toggle {
    font-size: 1.2rem;
    padding: 12px 18px;
    font-weight: 500;
  }
  
  .nav-link.dropdown-toggle {
    padding: 12px 18px !important;
    font-size: 1.2rem !important;
  }
}

/* Even larger on large screens */
@media (min-width: 992px) {
  .btn-outline-light {
    padding: 14px 28px;
    font-size: 1.3rem;
    min-width: 140px;
  }
  
  .dropdown-toggle {
    font-size: 1.3rem;
    padding: 14px 20px;
  }
  
  .nav-link.dropdown-toggle {
    padding: 14px 20px !important;
    font-size: 1.3rem !important;
  }
}

/* Hamburger icon styles */
.navbar-toggler,
#hamburgerMenu,
#hamburgerMenuSmall {
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border: none;
  background: transparent;
}

.hamburger-icon {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 30px;
  height: 22px;
}

.hamburger-icon span {
  position: absolute;
  width: 100%;
  height: 3px;
  background-color: #fff;
  border-radius: 2px;
  transition: all 0.3s ease;
}

.hamburger-icon span:nth-child(1) {
  transform: translateY(-8px);
}

.hamburger-icon span:nth-child(2) {
  transform: translateY(0);
}

.hamburger-icon span:nth-child(3) {
  transform: translateY(8px);
}

.hamburger-icon.open span:nth-child(1) {
  transform: rotate(45deg);
}

.hamburger-icon.open span:nth-child(2) {
  opacity: 0;
}

.hamburger-icon.open span:nth-child(3) {
  transform: rotate(-45deg);
}

/* Small screen auth buttons */
@media (max-width: 767.98px) {
  .btn-sm {
    font-size: 0.8rem;
    padding: 0.4rem 0.8rem;
  }
}

/* Make sure buttons don't overlap with hamburger or logo */
.d-flex.gap-1 {
  z-index: 10;
  position: relative;
}

/* Focus states for accessibility */
.hamburger-icon:focus,
#hamburgerMenu:focus,
#hamburgerMenuSmall:focus {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

/* Dropdown menu styling */
.dropdown-menu {
  border-radius: 0.375rem;
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(0, 0, 0, 0.15);
  z-index: 1035; /* Make sure dropdowns appear above everything */
}

/* Navbar sticky behavior */
.navbar.sticky-top {
  position: sticky;
  top: 0;
  z-index: 1030;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: box-shadow 0.3s ease;
}

/* Smooth scroll behavior when header is sticky */
html {
  scroll-behavior: smooth;
}

/* Join and Login button styling */
.join-btn, .login-btn {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    border-radius: 0.5rem;
    padding: 0.5rem 1rem !important;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white !important;
    text-decoration: none;
    font-weight: 500;
}

.join-btn:hover, .login-btn:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0.1) 100%);
    border-color: rgba(255, 255, 255, 0.4);
    color: white !important;
    text-decoration: none;
}

.join-btn {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    border-color: #28a745;
}

.join-btn:hover {
    background: linear-gradient(135deg, #20c997 0%, #28a745 100%);
    border-color: #20c997;
    transform: translateY(-1px);
}

/* User greeting styling */
.user-greeting {
    color: #ffd700 !important;
    font-weight: 500;
    font-size: 0.9rem;
}

/* Logout button styling */
.logout-btn {
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.2) 0%, rgba(220, 53, 69, 0.1) 100%);
    border: 1px solid rgba(220, 53, 69, 0.3);
    border-radius: 0.5rem;
    padding: 0.5rem 1rem !important;
    color: #ff6b6b !important;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.logout-btn:hover {
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.3) 0%, rgba(220, 53, 69, 0.2) 100%);
    border-color: rgba(220, 53, 69, 0.5);
    color: #ff6b6b !important;
    text-decoration: none;
    transform: translateY(-1px);
}

/* Responsive button adjustments */
@media (max-width: 991.98px) {
    .join-btn, .login-btn, .logout-btn {
        padding: 0.4rem 0.8rem !important;
        font-size: 0.9rem;
    }
    
    .user-greeting {
        font-size: 0.8rem;
    }
}

@media (max-width: 767.98px) {
    .join-btn, .login-btn {
        margin-right: 0.5rem !important;
    }
    
    .user-greeting {
        display: none; /* Hide greeting on very small screens */
    }
}