/**
 * Premium Components CSS — Luxe Edition
 */

/* Mobile Menu */
.navbar-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--dark);
}

.mobile-menu {
    position: fixed;
    top: 0;
    right: -300px;
    width: 300px;
    height: 100vh;
    background: white;
    box-shadow: var(--shadow-2xl);
    z-index: 1100;
    transition: right var(--transition-base);
    overflow-y: auto;
}

.mobile-menu.show {
    right: 0;
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.mobile-menu-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
}

.mobile-menu-nav {
    list-style: none;
    padding: 1rem;
    margin: 0;
}

.mobile-menu-nav li {
    margin-bottom: 0.5rem;
}

.mobile-menu-nav a {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--dark);
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: background var(--transition-fast);
}

.mobile-menu-nav a:hover {
    background: var(--light);
}

/* Premium Footer */
.footer {
    background: linear-gradient(180deg, #0f172a 0%, #0b1120 100%);
    color: white;
    margin-top: auto;
    position: relative;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.3), transparent);
}

.footer a,
footer a {
    text-decoration: none;
}

.footer-top {
    padding: 5rem 0 3.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

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

.footer-logo {
    font-family: 'Poppins', sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    letter-spacing: -0.02em;
}

.footer-desc {
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 1.5rem;
    line-height: 1.75;
    font-size: 0.9375rem;
}

.footer-social {
    display: flex;
    gap: 0.625rem;
}

.social-link {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.social-link:hover {
    background: var(--gradient-primary);
    border-color: transparent;
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
}

.footer-title {
    font-family: 'Poppins', sans-serif;
    font-size: 0.8125rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.9);
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 0.625rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.45);
    text-decoration: none;
    transition: all 0.25s ease;
    font-size: 0.9375rem;
    display: inline-block;
}

.footer-links a:hover {
    color: rgba(255, 255, 255, 0.9);
    transform: translateX(4px);
}

.newsletter-form {
    margin-top: 1rem;
}

.newsletter-input-group {
    display: flex;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: border-color 0.3s ease;
}

.newsletter-input-group:focus-within {
    border-color: rgba(102, 126, 234, 0.4);
}

.newsletter-input {
    flex: 1;
    background: none;
    border: none;
    padding: 0.875rem 1.25rem;
    color: white;
    outline: none;
    font-size: 0.9375rem;
}

.newsletter-input::placeholder {
    color: rgba(255, 255, 255, 0.35);
}

.newsletter-button {
    background: var(--gradient-primary);
    border: none;
    padding: 0.875rem 1.5rem;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    font-size: 0.875rem;
}

.newsletter-button:hover {
    filter: brightness(1.1);
}

.newsletter-message {
    margin-top: 0.5rem;
    font-size: 0.875rem;
    display: none;
}

.newsletter-message.show {
    display: block;
}

.newsletter-message.success {
    color: #10b981;
}

.newsletter-message.error {
    color: #ef4444;
}

.footer-bottom {
    padding: 2rem 0;
}

.footer-bottom-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.copyright {
    margin: 0;
    color: rgba(255, 255, 255, 0.35);
    font-size: 0.875rem;
}

.footer-legal {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 2rem;
}

.footer-legal a {
    color: rgba(255, 255, 255, 0.35);
    text-decoration: none;
    transition: color var(--transition-fast);
    font-size: 0.875rem;
}

.footer-legal a:hover {
    color: rgba(255, 255, 255, 0.75);
}


/* Text Selection */
::selection {
    background: rgba(102, 126, 234, 0.2);
    color: #1e293b;
}

::-moz-selection {
    background: rgba(102, 126, 234, 0.2);
    color: #1e293b;
}

/* Premium Scroll Buttons */
.scroll-buttons {
    position: fixed;
    right: 24px;
    bottom: 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 999;
}

.scroll-btn {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-lg);
    border: none;
    background: rgba(255, 255, 255, 0.9);
    color: #475569;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08), 0 0 1px rgba(0, 0, 0, 0.06);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    opacity: 0;
    transform: scale(0.85) translateY(8px);
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: none;
}

.scroll-btn.visible {
    opacity: 1;
    transform: scale(1) translateY(0);
    pointer-events: auto;
}

.scroll-btn:hover {
    background: var(--gradient-primary);
    color: white;
    transform: scale(1.08) translateY(0);
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.35);
}

.scroll-btn:active {
    transform: scale(0.95) translateY(0);
}

/* Back to Top (legacy) */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
    z-index: 999;
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.3);
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.4);
}

/* User Dropdown */
.navbar-user-menu {
    position: relative;
}

.navbar-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.5rem;
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12), 0 0 1px rgba(0, 0, 0, 0.08);
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px) scale(0.98);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    list-style: none;
    padding: 0.5rem;
    margin: 0;
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.navbar-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.navbar-dropdown li {
    margin: 0;
}

.navbar-dropdown a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--dark);
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: background var(--transition-fast);
    font-size: 0.9375rem;
}

.navbar-dropdown a:hover {
    background: var(--light);
}

.dropdown-divider {
    height: 1px;
    margin: 0.375rem 0.5rem;
    background: rgba(0, 0, 0, 0.06);
    border: none;
}

/* Loading Spinner */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.7s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Theme Toggle Button */
.theme-toggle {
    background: none;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1rem;
    color: #475569;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
}

.theme-toggle:hover {
    border-color: #667eea;
    color: #667eea;
    background: rgba(102, 126, 234, 0.06);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.08);
}

.theme-toggle .bi-moon-fill { display: inline-block; }
.theme-toggle .bi-sun-fill { display: none; }

[data-theme="dark"] .theme-toggle .bi-moon-fill { display: none; }
[data-theme="dark"] .theme-toggle .bi-sun-fill { display: inline-block; }

[data-theme="dark"] .theme-toggle {
    border-color: #475569;
    color: #e2e8f0;
}

/* Responsive */
@media (max-width: 768px) {
    .navbar-toggle {
        display: block;
    }

    .navbar-menu {
        display: none;
    }

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

    .footer-bottom-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .footer-legal {
        justify-content: center;
    }


    .language-selector {
        bottom: 80px;
    }

    .scroll-buttons {
        right: 16px;
        bottom: 16px;
    }

    .scroll-btn {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
}