/* ========================================
   A3M Language Club - Layout
   ======================================== */

/* ========================
   Navbar
   ======================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    background: var(--bg-nav);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-secondary);
    z-index: var(--z-fixed);
    transition: all var(--transition-base);
}

.navbar.scrolled {
    box-shadow: var(--shadow-lg);
}

.nav-container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--space-6);
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-8);
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    text-decoration: none;
    flex-shrink: 0;
}

.logo-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-primary);
    border-radius: var(--radius-lg);
    font-family: var(--font-japanese);
    font-size: var(--text-xl);
    font-weight: var(--font-bold);
    color: white;
}

.logo-name {
    font-size: var(--text-lg);
    font-weight: var(--font-extrabold); /* Make it extra bold */
    color: var(--gold); /* Make it golden */
}

.logo-highlight {
    color: var(--gold); /* Ensure highlight is also golden */
    background: none;
    -webkit-text-fill-color: var(--gold);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: var(--space-1);
}

.nav-link {
    padding: var(--space-2) var(--space-4);
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    color: var(--text-secondary);
    border-radius: var(--radius-lg);
    transition: all var(--transition-fast);
    text-decoration: none;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-primary);
    background: var(--bg-tertiary);
}

.nav-link.active {
    color: var(--brand-primary-light);
}

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

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

/* Theme Toggle */
.theme-toggle {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-secondary);
    border-radius: var(--radius-lg);
    cursor: pointer;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.theme-toggle:hover {
    color: var(--brand-primary-light);
    border-color: var(--brand-primary);
}

[data-theme="dark"] .theme-icon-light { display: none; }
[data-theme="dark"] .theme-icon-dark { display: block; }
[data-theme="light"] .theme-icon-dark { display: none; }
[data-theme="light"] .theme-icon-light { display: block; }

.theme-toggle svg,
.theme-toggle i {
    width: 18px;
    height: 18px;
}

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

.user-avatar-btn {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--space-1);
    border-radius: var(--radius-full);
    transition: all var(--transition-fast);
}

.user-avatar-btn:hover {
    background: var(--bg-tertiary);
}

.avatar-chevron {
    color: var(--text-muted);
    width: 16px;
    height: 16px;
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
}

.mobile-menu-btn svg,
.mobile-menu-btn i {
    width: 24px;
    height: 24px;
}

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: var(--z-modal);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
}

.mobile-menu.active {
    opacity: 1;
    visibility: visible;
}

.mobile-menu-content {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 300px;
    max-width: 85vw;
    background: var(--bg-primary);
    padding: var(--space-6);
    transform: translateX(100%);
    transition: transform var(--transition-slow);
    overflow-y: auto;
}

.mobile-menu.active .mobile-menu-content {
    transform: translateX(0);
}

.mobile-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-8);
}

.mobile-close-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    border: none;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    cursor: pointer;
}

.mobile-nav-links {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
    margin-bottom: var(--space-8);
}

.mobile-nav-link {
    display: block;
    padding: var(--space-3) var(--space-4);
    font-size: var(--text-base);
    font-weight: var(--font-medium);
    color: var(--text-secondary);
    border-radius: var(--radius-lg);
    transition: all var(--transition-fast);
    text-decoration: none;
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.mobile-auth-section {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

/* ========================
   Main Content
   ======================== */
.main-content {
    min-height: 100vh;
    padding-top: var(--nav-height);
}

/* Dashboard Layout */
.dashboard-layout {
    display: flex;
    min-height: calc(100vh - var(--nav-height));
}

.dashboard-layout .main-content {
    padding-top: 0;
}

/* ========================
   Sidebar
   ======================== */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border-secondary);
    padding: var(--space-6) var(--space-4);
    position: sticky;
    top: var(--nav-height);
    height: calc(100vh - var(--nav-height));
    overflow-y: auto;
    flex-shrink: 0;
    transition: width var(--transition-base);
}

.sidebar-header {
    padding: 0 var(--space-3) var(--space-6);
    border-bottom: 1px solid var(--border-secondary);
    margin-bottom: var(--space-4);
}

.sidebar-title {
    font-size: var(--text-sm);
    font-weight: var(--font-bold);
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
}

.sidebar-section {
    margin-bottom: var(--space-4);
}

.sidebar-section-title {
    padding: var(--space-2) var(--space-3);
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    color: var(--text-secondary);
    border-radius: var(--radius-lg);
    transition: all var(--transition-fast);
    cursor: pointer;
    text-decoration: none;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
}

.sidebar-link:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.sidebar-link.active {
    background: rgba(108, 92, 231, 0.12);
    color: var(--brand-primary-light);
}

.sidebar-link svg,
.sidebar-link i {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.sidebar-badge {
    margin-left: auto;
    min-width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--brand-primary);
    color: white;
    font-size: 11px;
    font-weight: var(--font-bold);
    border-radius: var(--radius-full);
    padding: 0 6px;
}

/* ========================
   Dashboard Content
   ======================== */
.dashboard-content {
    flex: 1;
    padding: var(--space-8);
    min-width: 0;
    overflow-x: hidden;
}

.dashboard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-8);
    flex-wrap: wrap;
    gap: var(--space-4);
}

.dashboard-title {
    font-size: var(--text-3xl);
    font-weight: var(--font-bold);
}

.dashboard-subtitle {
    font-size: var(--text-base);
    color: var(--text-secondary);
    margin-top: var(--space-1);
}

/* ========================
   Footer
   ======================== */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-secondary);
    padding-top: var(--space-16);
}

.footer-container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--space-6);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.5fr;
    gap: var(--space-12);
    padding-bottom: var(--space-12);
}

.footer-brand {
    max-width: 300px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    text-decoration: none;
    margin-bottom: var(--space-4);
}

.footer-logo .logo-name {
    font-size: var(--text-lg);
    font-weight: var(--font-extrabold);
    color: var(--gold);
}

.footer-desc {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    line-height: var(--leading-relaxed);
    margin-bottom: var(--space-5);
}

.footer-social {
    display: flex;
    gap: var(--space-3);
}

.social-link {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-secondary);
    border-radius: var(--radius-lg);
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.social-link:hover {
    background: var(--brand-primary);
    color: white;
    border-color: var(--brand-primary);
    transform: translateY(-2px);
}

.social-link svg,
.social-link i {
    width: 16px;
    height: 16px;
}

.footer-heading {
    font-size: var(--text-sm);
    font-weight: var(--font-bold);
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--space-5);
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.footer-links a {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    transition: color var(--transition-fast);
}

.footer-links a:hover {
    color: var(--brand-primary-light);
}

.footer-contact-list li {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.footer-icon {
    width: 16px;
    height: 16px;
    color: var(--text-muted);
}

.footer-newsletter {
    margin-top: var(--space-6);
}

.newsletter-form {
    display: flex;
    gap: var(--space-2);
}

.newsletter-input {
    flex: 1;
    padding: var(--space-2) var(--space-4);
    background: var(--bg-input);
    border: 1px solid var(--border-input);
    border-radius: var(--radius-lg);
    color: var(--text-primary);
    font-size: var(--text-sm);
}

.newsletter-input:focus {
    border-color: var(--brand-primary);
}

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-6) 0;
    border-top: 1px solid var(--border-secondary);
    flex-wrap: wrap;
    gap: var(--space-4);
}

.footer-bottom p {
    font-size: var(--text-sm);
    color: var(--text-muted);
}

.footer-bottom-links {
    display: flex;
    gap: var(--space-6);
}

.footer-bottom-links a {
    font-size: var(--text-sm);
    color: var(--text-muted);
}

.footer-bottom-links a:hover {
    color: var(--brand-primary-light);
}

/* Hide footer on dashboard */
.dashboard-active .footer {
    display: none;
}

.dashboard-active .navbar .nav-links {
    display: none;
}
