/* ==================== Responsive Design ==================== */

/* Tablet and below (max-width: 1024px) */
@media (max-width: 1024px) {
    :root {
        --spacing-3xl: 3rem;
    }

    .container {
        padding: 0 var(--spacing-md);
    }

    .hero-title {
        font-size: var(--font-size-3xl);
    }

    .page-title {
        font-size: var(--font-size-3xl);
    }

    .features-grid,
    .wiki-categories,
    .dashboard-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: var(--spacing-lg);
    }
}

/* Mobile (max-width: 768px) */
@media (max-width: 768px) {
    :root {
        --font-size-4xl: 2rem;
        --font-size-3xl: 1.75rem;
        --font-size-2xl: 1.5rem;
        --spacing-3xl: 2rem;
    }

    /* Navigation */
    .navbar .container {
        flex-direction: column;
        gap: var(--spacing-md);
    }

    .nav-menu {
        flex-direction: column;
        width: 100%;
        gap: var(--spacing-xs);
    }

    .nav-menu li {
        width: 100%;
    }

    .nav-menu a {
        display: block;
        text-align: center;
        width: 100%;
    }

    /* Hero */
    .hero {
        padding: var(--spacing-2xl) 0;
    }

    .hero-title {
        font-size: var(--font-size-2xl);
    }

    .hero-subtitle {
        font-size: var(--font-size-lg);
    }

    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }

    .hero-buttons .btn {
        width: 100%;
    }

    /* Sections */
    .section {
        padding: var(--spacing-2xl) 0;
    }

    .section-title,
    .page-title {
        font-size: var(--font-size-2xl);
    }

    /* Grids */
    .features-grid,
    .wiki-categories,
    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }

    /* Cards */
    .feature-card,
    .category-card,
    .dashboard-card,
    .wiki-card {
        padding: var(--spacing-lg);
    }

    /* Forms */
    .login-box,
    .form-box {
        padding: var(--spacing-lg);
        margin: 0 var(--spacing-md);
    }

    /* Flash Messages */
    .flash-messages {
        top: var(--spacing-md);
        right: var(--spacing-md);
        left: var(--spacing-md);
        max-width: none;
    }

    /* Theme Toggle */
    .theme-toggle {
        font-size: 18px;
    }

    /* Breadcrumbs */
    .breadcrumb {
        flex-wrap: wrap;
        font-size: var(--font-size-xs);
    }

    /* Wiki Entry */
    .wiki-entry {
        max-width: 100%;
    }

    .wiki-title {
        font-size: var(--font-size-2xl);
    }

    .wiki-content {
        font-size: var(--font-size-base);
    }

    .wiki-footer {
        flex-direction: column;
    }

    .wiki-footer .btn {
        width: 100%;
    }

    .wiki-actions {
        flex-direction: column;
    }

    .wiki-actions .btn {
        width: 100%;
    }

    /* Category Meta */
    .category-meta {
        flex-direction: column;
        gap: var(--spacing-md);
        align-items: stretch;
    }

    .category-meta .btn {
        width: 100%;
    }

    /* Error Pages */
    .error-title {
        font-size: 4rem;
    }
}

/* Small Mobile (max-width: 480px) */
@media (max-width: 480px) {
    :root {
        --font-size-4xl: 1.75rem;
        --font-size-3xl: 1.5rem;
        --spacing-2xl: 2rem;
    }

    .container {
        padding: 0 var(--spacing-sm);
    }

    .hero-title {
        font-size: var(--font-size-xl);
    }

    .hero-subtitle {
        font-size: var(--font-size-base);
    }

    .section-title,
    .page-title {
        font-size: var(--font-size-xl);
    }

    .nav-brand a {
        font-size: var(--font-size-lg);
    }

    .error-title {
        font-size: 3rem;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .footer,
    .flash-messages,
    .btn,
    .breadcrumb {
        display: none;
    }

    body {
        background: white;
        color: black;
    }

    .wiki-content {
        max-width: 100%;
    }
}
