/**
 * Imaan360 - Navigation Styles & Floating Actions
 * Source of Truth: mockups/DESIGN_PROPOSAL.md (Option A "Sacred Noor")
 */

/* ==========================================================================
   HEADER & NAVBAR
   ========================================================================== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 40;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    background: var(--bg-glass);
    border-bottom: 1px solid var(--border-glass);
    transition: background var(--dur-normal) ease;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
    gap: var(--space-3);
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0;
}

.nav-logo {
    height: 50px;
    width: auto;
    object-fit: contain;
    display: block;
    transition: transform var(--transition-fast, 0.3s ease);
}

.logo:hover .nav-logo {
    transform: scale(1.06);
}

@media (max-width: 768px) {
    .nav-logo {
        height: 35px;
    }
}


.nav-desktop {
    display: none;
    gap: var(--space-2);
    align-items: center;
}

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

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius-pill);
    font-size: var(--font-sm);
    font-weight: 500;
    transition: all var(--dur-fast) ease;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
}

.nav-link:hover, .nav-link:focus-visible {
    color: var(--gold-primary);
    background: rgba(212, 175, 55, 0.08);
}

.nav-link.active {
    color: var(--gold-light);
    background: rgba(212, 175, 55, 0.16);
    border: 1px solid var(--border-glass);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

/* Theme Toggle Button */
.theme-toggle-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-glass);
    color: var(--gold-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--dur-fast) ease;
    min-height: 44px;
    min-width: 44px;
}

.theme-toggle-btn:hover {
    transform: rotate(15deg);
    box-shadow: var(--shadow-glow);
}

/* ==========================================================================
   MOBILE BOTTOM NAVIGATION BAR
   ========================================================================== */
body nav.bottom-nav-bar,
.bottom-nav-bar {
    position: fixed;
    bottom: 0;
    top: auto;
    left: 0;
    right: 0;
    width: 100%;
    height: calc(var(--tab-bar-height) + var(--safe-bottom));
    padding-bottom: var(--safe-bottom);
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--border-glass);
    z-index: 9999;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-around;
    margin: 0;
    padding-left: 0;
    padding-right: 0;
}

@media (min-width: 900px) {
    body nav.bottom-nav-bar,
    .bottom-nav-bar {
        display: none;
    }
}

body nav.bottom-nav-bar .bottom-tab,
.bottom-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--text-muted);
    min-width: 60px;
    height: 100%;
    transition: color var(--dur-fast) ease;
    gap: 2px;
}

.bottom-tab.active, .bottom-tab:hover {
    color: var(--gold-primary);
}

.bottom-tab-icon {
    width: 22px;
    height: 22px;
}

.bottom-tab-label {
    font-size: 0.68rem;
    font-weight: 600;
}

/* ==========================================================================
   FLOATING BUTTONS (WHATSAPP & BACK-TO-TOP)
   GUARD-RAIL: Anchored calc(var(--tab-bar-height) + var(--safe-bottom) + 16px)
   ========================================================================== */
.floating-action-group {
    position: fixed;
    bottom: calc(var(--tab-bar-height) + var(--safe-bottom) + 16px);
    right: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 9990;
}

@media (min-width: 900px) {
    .floating-action-group {
        bottom: 24px;
        right: 24px;
    }
}

/* Support Sadaqah Badge - Anchored on bottom-left to prevent collision with action group */
body .sadaqah-badge,
div.sadaqah-badge#sadaqahBadge {
    position: fixed;
    bottom: calc(var(--tab-bar-height, 64px) + var(--safe-bottom, 0px) + 16px);
    left: 16px;
    right: auto;
    z-index: 9980;
}

@media (min-width: 900px) {
    body .sadaqah-badge,
    div.sadaqah-badge#sadaqahBadge {
        bottom: 24px;
        left: 24px;
    }
}

.floating-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
    transition: transform var(--dur-fast) var(--ease-spring), opacity var(--dur-fast) ease;
    min-height: 44px;
    min-width: 44px;
    text-decoration: none;
}

.floating-btn:hover {
    transform: scale(1.1);
}

.floating-whatsapp {
    background: #25d366;
    color: #ffffff;
}

.floating-backtop {
    background: var(--bg-surface-elevated);
    color: var(--gold-primary);
    border: 1px solid var(--border-glass);
    opacity: 0.85;
}

.floating-backtop:hover {
    opacity: 1;
}
