/* =========================================
   MENU.CSS — Lightweight Header Styles
   ========================================= */

/* Logo with gradient using mask */
.navbar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  position: relative;
}

.logo-wrapper {
  position: relative;
  display: inline-block;
  height: 40px;
  transition: height 0.3s ease;
}

.logo-img {
  height: 40px;
  width: auto;
  display: block;
  position: relative;
  z-index: 0;
  filter: invert(1) brightness(0.95) saturate(0.9) drop-shadow(0 4px 12px rgba(220, 38, 38, 0.3)) drop-shadow(0 0 8px rgba(255, 255, 255, 0.15));
  transition: height 0.3s ease;
}

/* Larger logo on desktop */
@media (min-width: 768px) {
  .logo-wrapper {
    height: 56px;
  }

  .logo-img {
    height: 56px;
  }
}

/* Header Layout */
.app-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.15) 0%, rgba(0, 0, 0, 0.85) 50%, rgba(18, 10, 8, 0.95) 100%);
  backdrop-filter: blur(12px);
  border-bottom: 2px solid rgba(220, 38, 38, 0.5);
  box-shadow: 0 4px 24px rgba(220, 38, 38, 0.2), 0 0 0 1px rgba(220, 38, 38, 0.1) inset;
  z-index: 1050;
  height: 60px;
  transition: height 0.3s ease;
}

.app-header .container-fluid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  padding: 0 0.75rem;
}

/* Larger header on desktop */
@media (min-width: 768px) {
  .app-header {
    height: 70px;
  }

  .app-header .container-fluid {
    padding: 0 1.5rem;
  }
}

/* Brand section (burger + logo) */
.brand-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

@media (min-width: 768px) {
  .brand-left {
    gap: 1rem;
  }
}

/* Burger toggle */
.navbar-toggler {
  background: rgba(220, 38, 38, 0.1);
  border: 1.5px solid rgba(220, 38, 38, 0.4);
  color: #ffffff;
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1.1rem;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.2);
}

.navbar-toggler:hover {
  background: rgba(220, 38, 38, 0.2);
  border-color: rgba(220, 38, 38, 0.6);
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
  transform: translateY(-1px);
}

/* Mobile header action buttons */
.hdr-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.3rem 0.6rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  min-height: 32px;
  border: 1.5px solid transparent;
  transition: all 0.15s ease;
}
.hdr-btn-ghost {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.2);
  color: #fff;
}
.hdr-btn-ghost:hover { background: rgba(255,255,255,0.15); color: #fff; }
.hdr-btn-danger {
  background: rgba(220,38,38,0.15);
  border-color: rgba(220,38,38,0.5);
  color: #f87171;
}
.hdr-btn-danger:hover { background: rgba(220,38,38,0.25); color: #f87171; }
.hdr-btn-primary {
  background: #dc2626;
  border-color: #dc2626;
  color: #fff;
}
.hdr-btn-primary:hover { background: #b91c1c; color: #fff; }

/* Header dropdown */
.hdr-dropdown {
  position: relative;
}
.hdr-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: #1a1a1a;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px;
  min-width: 170px;
  z-index: 2000;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
  overflow: hidden;
  padding: 4px 0;
}
/* All breakpoints: open on click via .open class */
.hdr-dropdown-menu.open { display: block; }

.hdr-dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 1rem;
  font-size: 0.88rem;
  font-weight: 500;
  color: #e5e5e5;
  text-decoration: none;
  background: none;
  border: none;
  width: 100%;
  cursor: pointer;
  transition: background 0.12s;
}
.hdr-dropdown-item:hover { background: rgba(255,255,255,0.07); color: #fff; }
.hdr-dropdown-item-active { color: #dc2626 !important; font-weight: 700; }
.hdr-dropdown-item-danger { color: #f87171; }
.hdr-dropdown-item-danger:hover { background: rgba(220,38,38,0.12); color: #f87171; }
.hdr-dropdown-divider {
  height: 1px;
  background: rgba(255,255,255,0.08);
  margin: 4px 0;
}

/* Larger burger on desktop */
@media (min-width: 768px) {
  .navbar-toggler {
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 1.3rem;
  }
}

/* Center navigation - desktop only */
.navbar-center-nav {
  display: none;
  gap: 0.5rem;
}

.nav-link-cyber {
  color: rgba(253, 243, 231, 0.7);
  padding: 8px 16px;
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.2s ease;
  text-decoration: none;
}

.nav-link-cyber:hover {
  color: #FDF3E7;
  background: rgba(255, 112, 40, 0.1);
}

.nav-link-cyber.active {
  color: #FDF3E7;
  background: rgba(255, 112, 40, 0.15);
  border-bottom: 2px solid #ff7028;
}

/* Right navigation - desktop only */
.navbar-right-nav {
  display: none;
  align-items: center;
  gap: 0.75rem;
}

/* User avatar/profile */
.nav-link-user {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #FDF3E7;
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.nav-link-user:hover {
  background: rgba(255, 112, 40, 0.1);
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 112, 40, 0.3);
}

.user-avatar-initial {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #D32F2F, #ff7028);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
}

.user-name {
  font-weight: 600;
  font-size: 0.9rem;
}

/* Header action buttons */
.btn-header-action {
  padding: 8px 20px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  transition: all 0.2s ease;
  background: linear-gradient(135deg, #D32F2F, #ff7028);
  color: white;
  border: 1px solid rgba(255, 112, 40, 0.3);
}

.btn-header-action:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(211, 47, 47, 0.4);
}

.btn-header-action.secondary {
  background: transparent;
  color: #ff7028;
  border: 1px solid rgba(255, 112, 40, 0.3);
}

.btn-header-action.secondary:hover {
  background: rgba(255, 112, 40, 0.1);
}

/* Mobile offcanvas menu */
.mobile-menu {
  background: linear-gradient(135deg, rgba(18, 10, 8, 0.98), rgba(27, 11, 0, 0.98));
  color: #FDF3E7;
  border-left: 1px solid rgba(255, 112, 40, 0.2);
}

.mobile-menu .offcanvas-title {
  color: #FDF3E7;
  font-weight: 700;
}

.mobile-nav-menu {
  padding: 0;
  margin: 0;
}

.mobile-nav-link {
  display: block;
  padding: 12px 20px;
  color: rgba(253, 243, 231, 0.8);
  text-decoration: none;
  transition: all 0.2s ease;
  border-left: 3px solid transparent;
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
  background: rgba(255, 112, 40, 0.1);
  border-left-color: #ff7028;
  color: #FDF3E7;
}

.menu-section-title {
  color: rgba(253, 243, 231, 0.5);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 700;
}

/* Desktop layout */
@media (min-width: 992px) {
  .navbar-center-nav {
    display: flex;
  }

  .navbar-right-nav {
    display: flex;
  }
}

/* Keep content below fixed header */
body {
  padding-top: 60px;
}

@media (min-width: 768px) {
  body {
    padding-top: 70px;
  }
}

/* Scrolled state */
.app-header.scrolled {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  background: linear-gradient(135deg, rgba(18, 10, 8, 1), rgba(27, 11, 0, 0.98));
}
