/* ===== UTILITY BAR STYLES ===== */
.utility-bar {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    color: #cbd5e1;
    font-size: 0.875rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    position: relative;
    z-index: 1001;
}

.utility-link {
    color: #cbd5e1;
    text-decoration: none;
    padding: 0.25rem 0.75rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.2s ease;
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 0.875rem;
}

.utility-link:hover {
    color: #fff;
}

.utility-link i {
    font-size: 0.875rem;
}

.cart-badge {
    background: #ef4444;
    color: white;
    border-radius: 50%;
    padding: 0.125rem 0.375rem;
    font-size: 0.75rem;
    font-weight: 600;
    margin-left: 0.25rem;
    line-height: 1;
}

/* ===== MAIN NAVIGATION STYLES ===== */
.main-navigation {
    background: #ffffff;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 0;
    position: relative;
    min-height: 70px;
}

.site-logo {
    position: absolute;
    left: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    z-index: 1002;
}

.site-logo img {
    height: 50px;
    width: auto;
    display: block;
}

.site-title {
    color: #000000;
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.nav-menu {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: nowrap;
    max-width: 100%;
    padding: 0 120px; /* Space for logo on left */
}

.nav-link {
    padding: 0.75rem 1rem;
    color: #334155;
    text-decoration: none;
    font-weight: 500;
    display: flex;
    align-items: center;
    border: none;
    background: transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 8px;
    font-size: 0.95rem;
    white-space: nowrap;
    flex-shrink: 0;
}

.nav-link:hover {
    background: #f1f5f9;
    color: #2563eb;
}

.nav-link.active {
    color: #2563eb;
    background: #eff6ff;
}

/* ===== DROPDOWN STYLES ===== */
.nav-dropdown {
    position: relative;
}

.dropdown-toggle {
    position: relative;
}

/* Hide Bootstrap's default dropdown arrow */
.dropdown-toggle::after {
    display: none !important;
}

/* Style our custom dropdown icon */
.dropdown-icon {
    font-size: 0.7rem;
    margin-left: 0.25rem;
    transition: transform 0.3s ease;
}

/* Rotate icon on hover/active */
.nav-dropdown:hover .dropdown-icon,
.nav-dropdown.active .dropdown-icon,
.nav-dropdown.expanded .dropdown-icon {
    transform: rotate(180deg);
}

.dropdown-panel {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    min-width: 280px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.nav-dropdown:hover .dropdown-panel,
.nav-dropdown:focus-within .dropdown-panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-content {
    padding: 0.75rem;
}

.dropdown-item {
    display: flex;
    align-items: start;
    padding: 0.75rem;
    color: #334155;
    text-decoration: none;
    border-radius: 8px;
    transition: background 0.2s ease;
}

.dropdown-item:hover {
    background: #f1f5f9;
    color: #2563eb;
}

.dropdown-item.active {
    background: #eff6ff;
    color: #2563eb;
}

.dropdown-item i {
    flex-shrink: 0;
    width: 20px;
    font-size: 1rem;
}

.item-title {
    font-weight: 500;
    color: #1e293b;
    margin-bottom: 0.25rem;
}

.dropdown-item:hover .item-title {
    color: #2563eb;
}

.item-desc {
    color: #64748b;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4;
    font-size: 0.85rem;
    max-width: 220px;
}

/* ===== HIGHLIGHTED BUTTON STYLES (e.g., Donate) ===== */
.highlighted-button {
    background: linear-gradient(135deg, #ec4899 0%, #ef4444 100%);
    color: white !important;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(236, 72, 153, 0.3);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.highlighted-button:hover {
    background: linear-gradient(135deg, #f472b6 0%, #f87171 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(236, 72, 153, 0.4);
    color: white !important;
}

.highlighted-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, transparent 70%);
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.6s ease;
    border-radius: 50%;
}

.highlighted-button:hover::before {
    transform: translate(-50%, -50%) scale(2);
}

.highlighted-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(236, 72, 153, 0.3);
}

/* Pulse animation for highlighted button */
@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 4px 12px rgba(236, 72, 153, 0.3);
    }
    50% {
        box-shadow: 0 4px 20px rgba(236, 72, 153, 0.5);
    }
}

.highlighted-button {
    animation: pulse-glow 2s ease-in-out infinite;
}

/* Highlighted dropdown styling */
.highlighted-dropdown .dropdown-panel {
    border: 2px solid #ec4899;
}

/* ===== MOBILE STYLES ===== */
.mobile-toggle {
    display: none;
    position: absolute;
    right: 1rem;
    background: transparent;
    border: none;
    font-size: 1.5rem;
    color: #334155;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1002;
    transition: color 0.2s;
}

.mobile-toggle:hover {
    color: #2563eb;
}

/* Show hamburger and adjust layout for tablets and mobile */
@media (max-width: 991px) {
    .mobile-toggle {
        display: block;
    }

    .nav-container {
        justify-content: space-between;
        padding: 0.75rem 1rem;
    }

    .site-logo {
        position: static;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 320px;
        max-width: 85vw;
        height: 100vh;
        background: white;
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        padding: 5rem 1.5rem 2rem 1.5rem;
        overflow-y: auto;
        box-shadow: -4px 0 20px rgba(0,0,0,0.15);
        transition: right 0.3s ease;
        z-index: 9999; /* High z-index for proper stacking */
        gap: 0;
        pointer-events: auto; /* Ensure menu can receive clicks */
    }

    /* Add subtle header to drawer */
    .nav-menu::before {
        content: 'Menu';
        position: absolute;
        top: 1.5rem;
        left: 1.5rem;
        font-size: 1.25rem;
        font-weight: 700;
        color: #1e293b;
        letter-spacing: 0.05em;
        text-transform: uppercase;
        z-index: 1;
    }

    .nav-menu.active {
        right: 0;
    }

    /* Mobile backdrop - REMOVED to eliminate grey overlay
       The menu drawer is now displayed without a dimming backdrop */

    /* Ensure menu drawer is clickable and has proper stacking */
    .nav-menu {
        pointer-events: auto;
        z-index: 2000; /* High z-index for visibility */
    }

    .nav-link {
        width: 100%;
        justify-content: flex-start;
        padding: 1rem;
        border-radius: 8px;
        margin-bottom: 0.25rem;
        background: transparent;
        transition: all 0.2s ease;
    }

    .nav-link:hover {
        background: #f1f5f9;
        color: #2563eb;
        transform: none;
    }

    .nav-link.active {
        background: #eff6ff;
        color: #2563eb;
        font-weight: 600;
        border-left: 3px solid #2563eb;
    }

    .nav-dropdown {
        width: 100%;
    }

    .nav-dropdown .dropdown-toggle {
        width: 100%;
        justify-content: space-between;
        background: transparent;
        transition: all 0.2s ease;
    }

    .nav-dropdown .dropdown-toggle:hover {
        background: #f1f5f9;
        color: #2563eb;
    }

    .nav-dropdown.expanded .dropdown-toggle {
        background: #eff6ff;
        color: #2563eb;
        font-weight: 600;
    }

    .dropdown-panel {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        margin: 0;
        padding: 0.5rem 0 0.5rem 1rem;
        display: none;
        background: transparent;
        border-left: 2px solid #e2e8f0;
        margin-top: 0.25rem;
        margin-left: 0.5rem;
    }

    .dropdown-item {
        padding: 0.75rem 1rem;
        color: #64748b;
        background: transparent;
        border-radius: 6px;
        transition: all 0.2s ease;
    }

    .dropdown-item:hover {
        background: #f1f5f9;
        color: #2563eb;
        transform: none;
        padding-left: 1.25rem;
    }

    .dropdown-item.active {
        background: #eff6ff;
        color: #2563eb;
        font-weight: 500;
    }

    .nav-dropdown.expanded .dropdown-panel {
        display: block;
    }

    /* Mobile close button (Font Awesome X) */
    .nav-menu::after {
        content: '\f00d';
        font-family: 'Font Awesome 6 Free';
        font-weight: 900;
        position: absolute;
        top: 1.5rem;
        right: 1.5rem;
        font-size: 1.5rem;
        color: #64748b;
        cursor: pointer;
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 8px;
        transition: all 0.2s;
        background: transparent;
        z-index: 2001;
        pointer-events: all;
    }

    .nav-menu::after:hover {
        background: #f1f5f9;
        color: #1e293b;
    }

    /* Highlighted button in mobile - preserve gradient background */
    .highlighted-button {
        margin-left: 0 !important;
        width: 100%;
        justify-content: center;
        background: linear-gradient(135deg, #ec4899 0%, #ef4444 100%) !important;
        color: white !important;
    }

    .highlighted-button:hover {
        background: linear-gradient(135deg, #f472b6 0%, #f87171 100%) !important;
    }

    .highlighted-dropdown {
        margin-left: 0 !important;
    }
}

/* Extra small devices */
@media (max-width: 576px) {
    .utility-bar .container-fluid {
        font-size: 0.8rem;
    }

    .utility-link {
        padding: 0.25rem 0.5rem;
    }

    .site-logo img {
        height: 40px;
    }

    .site-title {
        display: none;
    }

    .nav-menu {
        width: 100%;
        max-width: 100%;
    }

    .nav-menu.active::before {
        right: 0;
    }
}

/* ===== ACCESSIBILITY IMPROVEMENTS ===== */
.nav-link:focus,
.dropdown-item:focus,
.mobile-toggle:focus {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

/* Prevent body scroll when mobile menu is open */
body.mobile-menu-open {
    overflow: hidden;
}
