/* ═══════════════════════════════════════════════
   Спільні стилі для Header та Footer
   ═══════════════════════════════════════════════ */

/* ── Navbar ──────────────────────────────────── */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 0.75rem 2rem;
    background: rgba(5, 5, 5, 0.6);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border-bottom: 1px solid transparent;
    transition: all 0.3s ease;
}

.navbar.scrolled {
    background: rgba(5, 5, 5, 0.85);
    border-bottom: 1px solid rgba(187, 134, 252, 0.2);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
    color: inherit;
    flex-shrink: 0;
}

.logo-icon {
    font-size: 1.6rem;
}

.logo-text {
    font-size: 1.3rem;
    font-weight: 700;
    background: linear-gradient(135deg, #bb86fc 0%, #6c63ff 50%, #bb86fc 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 3s linear infinite;
}

@keyframes shimmer {
    to { background-position: 200% center; }
}

/* Nav Links */
.nav-links {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.nav-link {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.nav-link:hover {
    color: #fff;
    background: rgba(187, 134, 252, 0.1);
}

/* Nav Actions (Auth Buttons) */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.btn-nav-secondary {
    display: inline-flex;
    align-items: center;
    padding: 0.55rem 1.25rem;
    font-size: 0.88rem;
    font-weight: 600;
    border-radius: 10px;
    text-decoration: none;
    color: #bb86fc;
    border: 1.5px solid rgba(187, 134, 252, 0.4);
    background: transparent;
    transition: all 0.3s ease;
    cursor: pointer;
    font-family: inherit;
}

.btn-nav-secondary:hover {
    background: rgba(187, 134, 252, 0.1);
    border-color: #bb86fc;
    transform: translateY(-1px);
}

.btn-nav-primary {
    display: inline-flex;
    align-items: center;
    padding: 0.55rem 1.25rem;
    font-size: 0.88rem;
    font-weight: 600;
    border-radius: 10px;
    text-decoration: none;
    color: white;
    background: linear-gradient(135deg, #bb86fc 0%, #6c63ff 100%);
    border: none;
    transition: all 0.3s ease;
    cursor: pointer;
    font-family: inherit;
    box-shadow: 0 2px 12px rgba(187, 134, 252, 0.3);
}

.btn-nav-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(187, 134, 252, 0.5);
}

/* User Button (logged in) */
.nav-user-btn {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.35rem 1rem 0.35rem 0.35rem;
    border-radius: 50px;
    background: rgba(187, 134, 252, 0.1);
    border: 1.5px solid rgba(187, 134, 252, 0.2);
    text-decoration: none;
    color: #fff;
    font-weight: 500;
    font-size: 0.88rem;
    transition: all 0.3s ease;
}

.nav-user-btn:hover {
    background: rgba(187, 134, 252, 0.2);
    border-color: rgba(187, 134, 252, 0.4);
    transform: translateY(-1px);
}

.nav-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.nav-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.nav-avatar-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(187, 134, 252, 0.2);
    font-size: 1rem;
}

.btn-logout {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 1.5px solid rgba(255, 107, 107, 0.3);
    background: transparent;
    color: #ff6b6b;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-logout:hover {
    background: rgba(255, 107, 107, 0.1);
    border-color: #ff6b6b;
    transform: translateY(-1px);
}

/* Burger Menu */
.nav-burger {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 8px;
    background: none;
    border: none;
    cursor: pointer;
}

.nav-burger span {
    width: 24px;
    height: 2px;
    background: #fff;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.nav-burger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
.nav-burger.active span:nth-child(2) {
    opacity: 0;
}
.nav-burger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    background: rgba(18, 18, 24, 0.98);
    backdrop-filter: blur(20px);
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
    z-index: 999;
    border-bottom: 1px solid transparent;
}

.mobile-menu.active {
    max-height: 400px;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(187, 134, 252, 0.15);
}

.mobile-menu-links {
    display: flex;
    flex-direction: column;
    padding: 0 2rem;
}

.mobile-menu-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    padding: 0.75rem 0;
    font-size: 1rem;
    font-weight: 500;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: color 0.2s;
}

.mobile-menu-links a:last-child {
    border-bottom: none;
}

.mobile-menu-links a:hover {
    color: #bb86fc;
}

.mobile-menu-divider {
    height: 1px;
    background: rgba(187, 134, 252, 0.15);
    margin: 0.5rem 0;
}

/* ── Footer ──────────────────────────────────── */
.site-footer {
    position: relative;
    margin-top: 4rem;
    color: rgba(255, 255, 255, 0.7);
}

.footer-wave {
    color: rgba(18, 18, 24, 0.95);
    line-height: 0;
    margin-bottom: -1px;
}

.footer-wave svg {
    width: 100%;
    height: 60px;
}

.footer-body {
    background: rgba(18, 18, 24, 0.95);
    padding: 3rem 2rem 1.5rem;
    border-top: 1px solid rgba(187, 134, 252, 0.1);
}

.footer-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 2.5rem;
}

/* Footer Brand */
.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
    color: inherit;
}

.footer-logo .logo-icon {
    font-size: 1.4rem;
}

.footer-logo .logo-text {
    font-size: 1.2rem;
    font-weight: 700;
    background: linear-gradient(135deg, #bb86fc 0%, #6c63ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-desc {
    font-size: 0.9rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.5);
    max-width: 300px;
}

.footer-socials {
    display: flex;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: rgba(187, 134, 252, 0.1);
    border: 1px solid rgba(187, 134, 252, 0.15);
    color: rgba(255, 255, 255, 0.6);
    transition: all 0.3s ease;
}

.social-link:hover {
    background: rgba(187, 134, 252, 0.2);
    border-color: rgba(187, 134, 252, 0.4);
    color: #bb86fc;
    transform: translateY(-2px);
}

/* Footer Columns */
.footer-col {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-col h4 {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 0.5rem;
}

.footer-col a {
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.footer-col a:hover {
    color: #bb86fc;
}

/* Footer Bottom */
.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.footer-bottom p {
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.35);
}

.footer-powered a {
    color: #bb86fc;
    text-decoration: none;
    transition: opacity 0.2s;
}

.footer-powered a:hover {
    opacity: 0.8;
}

/* ── Responsive ──────────────────────────────── */
@media (max-width: 768px) {
    .navbar {
        padding: 0.6rem 1rem;
    }

    .nav-links {
        display: none;
    }

    .nav-actions {
        display: none;
    }

    .nav-burger {
        display: flex;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .logo-text {
        font-size: 1.1rem;
    }
}
