/* static/css/nav.css */
/*
 * Шапка, навигация, мобильное меню, футер.
 * Стили теперь содержат классы, ранее генерируемые Tailwind.
 */

/* ─── Header ──────────────────────────────────────────────── */

#main-header {
    background-color: transparent;
    backdrop-filter: none;
    border-bottom: 1px solid transparent;
    transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

#main-header.scrolled {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    box-shadow: var(--shadow-sm);
    border-color: rgba(243, 244, 246, 1); /* gray-100 */
}

/* ─── Nav Links ───────────────────────────────────────────── */

.nav-link {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--color-muted);
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: var(--color-primary);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* ─── Mobile Menu ─────────────────────────────────────────── */

#mobile-menu {
    transition: opacity 0.2s ease, transform 0.2s ease;
}

#mobile-menu.hidden {
    display: none;
}

/* ─── Fluid Background ────────────────────────────────────── */

.fluid-bg {
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse at 10% 10%, rgba(13, 148, 136, 0.04) 0%, transparent 50%),
        radial-gradient(ellipse at 90% 90%, rgba(139, 92, 246, 0.04) 0%, transparent 50%);
    z-index: -1;
    pointer-events: none;
}

/* ─── Floating Support Button ─────────────────────────────── */

.floating-support {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 40;
    width: 56px;
    height: 56px;
    border-radius: 1rem;
    background: var(--color-text);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 30px rgba(17, 24, 39, 0.25);
    transition: all 0.3s ease;
    text-decoration: none;
}

.floating-support:hover {
    background: var(--color-primary);
    transform: scale(1.05);
}

.floating-support i {
    width: 24px;
    height: 24px;
    transition: transform 0.2s ease;
}

.floating-support:hover i {
    transform: scale(1.1);
}

@media (max-width: 767px) {
    .floating-support {
        bottom: 16px;
        right: 16px;
        width: 52px;
        height: 52px;
    }
}

/* Safe area для iPhone */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    .floating-support {
        bottom: calc(16px + env(safe-area-inset-bottom));
    }

    @media (min-width: 768px) {
        .floating-support {
            bottom: 24px;
        }
    }
}

/* Сдвиг floating button когда есть buybar */
body.has-buybar .floating-support {
    bottom: 80px;
}

@media (min-width: 768px) {
    body.has-buybar .floating-support {
        bottom: 24px;
    }
}