/* ========================================
   NAVIGATION BAR
   ======================================== */
.navbar {
    background-color: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid #e5e7eb;
}

.navbar-container {
    max-width: 80rem;
    margin: 0 auto;
    padding: 0 1rem;
}

@media (min-width: 640px) {
    .navbar-container {
        padding: 0 1.5rem;
    }
}

@media (min-width: 1024px) {
    .navbar-container {
        padding: 0 2rem;
    }
}

.navbar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 5rem;
    gap: 1rem;
}

/* ========================================
   LOGO STYLES
   ======================================== */
.logo-container {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.logo-wrapper {
    width: 180px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    position: relative;
}

.logo-img {
    height: 100%;
    width: auto;
    object-fit: contain;
    display: block;
}

.location-text {
    font-size: 0.875rem;
    color: #6b7280;
    margin-left: 0.5rem;
}

/* ========================================
   HEADER SEARCH BAR (Navigation Search)
   ======================================== */
.header-search-container {
    display: none;
    flex: 1;
    max-width: 400px;
    margin-right: auto;
    margin-left: 0;
}

@media (min-width: 1024px) {
    .header-search-container {
        display: block;
    }
}

.header-search-form {
    width: 100%;
}

.header-search-wrapper {
    display: flex;
    gap: 0.5rem;
    padding: 0.25rem;
    background-color: #f9fafb;
    border-radius: 9999px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.2s;
}

.header-search-wrapper:focus-within {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    background-color: #fff;
}

.header-search-input-wrapper {
    position: relative;
    height: 40px;
    display: flex;
    align-items: center;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    transition: background-color 0.2s;
}

.header-search-input-wrapper:hover {
    background-color: #f3f4f6;
}

.header-search-input-wrapper:focus-within {
    background-color: #fff;
}

.header-search-input-keyword {
    border-right: 1px solid #d1d5db;
}

.header-search-input {
    flex: 1;
    width: 100%;
    min-width: 0;
    background: transparent;
    border: none;
    outline: none;
    font-size: 0.875rem;
    color: #111827;
    padding-right: 1.5rem;
}

.header-search-input::placeholder {
    color: #9ca3af;
}

.header-search-clear-btn {
    position: absolute;
    right: 0.625rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 9999px;
    color: #6b7280;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-search-clear-btn:hover {
    background-color: #f3f4f6;
    color: #374151;
}

.header-search-submit-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f97316;
    color: #fff;
    border: none;
    border-radius: 9999px;
    padding: 0.625rem;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}

.header-search-submit-btn:hover {
    background-color: #ea580c;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.header-search-submit-btn:active {
    transform: scale(0.95);
}

/* ========================================
   DESKTOP NAVIGATION
   ======================================== */
.desktop-nav {
    display: none;
    align-items: center;
    gap: 2rem;
    flex-shrink: 0;
}

@media (min-width: 768px) {
    .desktop-nav {
        display: flex;
    }
}

.nav-link {
    color: #9a3412;
    font-weight: 500;
    transition: color 0.2s;
    text-decoration: none;
}

.nav-link:hover {
    color: #f97316;
}

/* ========================================
   NAVIGATION DROPDOWN (Events & Groups)
   ======================================== */
.nav-item-dropdown {
    position: relative;
}

.nav-dropdown-trigger {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    color: #9a3412;
    font-weight: 500;
    transition: color 0.2s;
    text-decoration: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    font-size: inherit;
}

.nav-dropdown-trigger:hover {
    color: #f97316;
}

.nav-dropdown-icon {
    width: 0.875rem;
    height: 0.875rem;
    transition: transform 0.2s;
}

.nav-item-dropdown:hover .nav-dropdown-icon {
    transform: rotate(180deg);
}

.nav-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 0.75rem;
    min-width: 10rem;
    background-color: #fff;
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s;
    z-index: 50;
}

.nav-item-dropdown:hover .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
}

.nav-dropdown-link {
    display: block;
    padding: 0.625rem 1rem;
    color: #374151;
    text-decoration: none;
    transition: background-color 0.2s;
    white-space: nowrap;
}

.nav-dropdown-link:hover {
    background-color: #f9fafb;
}

.nav-dropdown-link:first-child {
    border-radius: 0.5rem 0.5rem 0 0;
}

.nav-dropdown-link:last-child {
    border-radius: 0 0 0.5rem 0.5rem;
}

.nav-dropdown-divider {
    border-top: 1px solid #e5e7eb;
    margin: 0.25rem 0;
}

.nav-dropdown-link-create {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    color: #f97316;
    font-weight: 500;
    text-decoration: none;
    transition: background-color 0.2s;
    white-space: nowrap;
}

.nav-dropdown-link-create:hover {
    background-color: #fff7ed;
}

.nav-dropdown-link-create svg {
    width: 1rem;
    height: 1rem;
}

/* ========================================
   USER PROFILE BUTTON & DROPDOWN
   ======================================== */
.user-profile-container {
    position: relative;
}

.user-profile-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #9a3412;
    transition: color 0.2s;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.user-profile-btn:hover {
    color: #f97316;
}

.user-avatar {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    object-fit: cover;
}

.user-name {
    font-weight: 500;
}

.dropdown-icon {
    width: 1rem;
    height: 1rem;
}

.dropdown-menu {
    position: absolute;
    right: 0;
    margin-top: 0.5rem;
    width: 12rem;
    background-color: #fff;
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s;
    z-index: 50;
}

.user-profile-container:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
}

.dropdown-link {
    display: block;
    padding: 0.5rem 1rem;
    color: #374151;
    text-decoration: none;
    transition: background-color 0.2s;
}

.dropdown-link:hover {
    background-color: #f9fafb;
}

.dropdown-link.rounded-top {
    border-radius: 0.5rem 0.5rem 0 0;
}

.dropdown-divider {
    border-top: 1px solid #e5e7eb;
}

.dropdown-link-danger {
    display: block;
    padding: 0.5rem 1rem;
    color: #dc2626;
    text-decoration: none;
    transition: background-color 0.2s;
}

.dropdown-link-danger:hover {
    background-color: #f9fafb;
}

.dropdown-link-danger.rounded-bottom {
    border-radius: 0 0 0.5rem 0.5rem;
}

/* ========================================
   LOGIN BUTTON
   ======================================== */
.login-btn {
    background-color: #f97316;
    border: 2px solid #f97316;
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-weight: 500;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-block;
}

.login-btn:hover {
    background-color: #fff;
    color: #f97316;
}

/* ========================================
   MOBILE MENU TOGGLE
   ======================================== */
.mobile-menu-container {
    display: block;
}

@media (min-width: 768px) {
    .mobile-menu-container {
        display: none;
    }
}

.mobile-menu-toggle {
    color: #374151;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-menu-toggle:hover {
    color: #f97316;
}

.menu-icon {
    width: 1.5rem;
    height: 1.5rem;
}

/* ========================================
   MOBILE NAVIGATION
   ======================================== */
.mobile-nav-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.mobile-nav-backdrop.hidden {
    opacity: 0;
    pointer-events: none;
}

.mobile-nav {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 18rem;
    max-width: 85vw;
    background-color: #fff;
    border-right: 1px solid #e5e7eb;
    transform: translateX(0);
    transition: transform 0.3s ease;
    z-index: 100;
    overflow-y: auto;
}

.mobile-nav.hidden {
    display: block;
    transform: translateX(-100%);
}

@media (min-width: 768px) {
    .mobile-nav {
        display: none !important;
    }
}

.mobile-nav-content {
    padding: 0.75rem 0;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.mobile-nav-content > a,
.mobile-nav-divider > a {
    border-bottom: 1px solid #f1f5f9;
}

.mobile-nav-content > a:hover,
.mobile-nav-divider > a:hover {
    background-color: #fff7ed;
}

.mobile-nav-logo {
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    height: 7rem;
    margin: -0.75rem 0 0.25rem;
    border-bottom: 1px solid #e5e7eb;
}

.mobile-nav-logo img {
    height: 12rem;
    width: auto;
    display: block;
    object-fit: contain;
    margin: -2.5rem 0;
}

.mobile-user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #f1f5f9;
    text-decoration: none;
    transition: background-color 0.2s;
}

.mobile-user-info:hover {
    background-color: #fff7ed;
}

.mobile-user-avatar {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    object-fit: cover;
}

.mobile-user-name {
    font-weight: 500;
    color: #111827;
}

.mobile-nav-link {
    display: block;
    color: #f97316;
    font-weight: 500;
    transition: background-color 0.2s, color 0.2s;
    text-decoration: none;
    padding: 0.75rem 1rem;
}

.mobile-nav-link:hover {
    color: #ea580c;
    background-color: #fff7ed;
}

.mobile-nav-divider {
    border-top: 1px solid #e5e7eb;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.mobile-nav-link-danger {
    display: block;
    color: #dc2626;
    font-weight: 500;
    transition: background-color 0.2s, color 0.2s;
    text-decoration: none;
    padding: 0.75rem 1rem;
    border-top: 1px solid #e5e7eb;
}

.mobile-nav-link-danger:hover {
    background-color: #fef2f2;
}

.mobile-nav-link-danger:hover {
    color: #b91c1c;
}

.mobile-nav-create-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #f97316;
    font-weight: 500;
    transition: background-color 0.2s, color 0.2s;
    text-decoration: none;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #f1f5f9;
}

.mobile-nav-create-link:hover {
    color: #ea580c;
    background-color: #fff7ed;
}

.mobile-nav-create-link svg {
    width: 1rem;
    height: 1rem;
}

/* ========================================
   RESPONSIVE HEADER ADJUSTMENTS
   ======================================== */
@media (max-width: 1023px) {
    .navbar-content {
        flex-wrap: wrap;
    }
    
    .logo-wrapper {
        width: 160px;
        height: 48px;
    }

    .logo-img {
        height: 100%;
    }
}

@media (max-width: 767px) {
    .logo-wrapper {
        width: 140px;
        height: 40px;
    }

    .logo-img {
        height: 100%;
    }
    
    .location-text {
        font-size: 0.75rem;
    }
}