/* ==========================================================================
   EduPuzzler - Responsive Styles
   Cross-platform compatible (Windows, Mac, Mobile)
   ========================================================================== */

/* ==========================================================================
   Tablet Styles (768px and below)
   ========================================================================== */

@media screen and (max-width: 768px) {
    /* Typography adjustments */
    html {
        font-size: 14px;
    }

    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.25rem; }

    /* Hero Section */
    .hero {
        padding: 3rem 0;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .hero-buttons .btn {
        width: 100%;
        max-width: 300px;
    }

    /* Navigation */
    .nav-toggle {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 80px; /* sits just below the compact navbar */
        flex-direction: column;
        background-color: white;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: 2rem 0;
        gap: 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-menu li {
        margin: 0.5rem 0;
    }

    .nav-link {
        display: block;
        padding: 1rem;
    }

    /* Sections */
    .features,
    .categories,
    .games-section,
    .about-section {
        padding: 2rem 0;
    }

    .section-title {
        font-size: 1.75rem;
        margin-bottom: 2rem;
    }

    /* Grids */
    .features-grid,
    .category-grid,
    .games-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    /* About Content */
    .about-content {
        padding: 2rem;
    }

    /* Footer */
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }

    /* Page Header */
    .page-header {
        padding: 2rem 0;
    }

    .page-header h1 {
        font-size: 1.75rem;
    }
}

/* ==========================================================================
   Mobile Styles (480px and below)
   ========================================================================== */

@media screen and (max-width: 480px) {
    /* Container padding */
    .container {
        padding: 0 15px;
    }

    /* Typography */
    html {
        font-size: 14px;
    }

    .hero-title {
        font-size: 1.75rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    /* Navigation */
    .nav-brand {
        height: 64px;
    }

    .nav-brand .logo {
        height: 110px;
    }

    /* Buttons */
    .btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.875rem;
    }

    /* Cards */
    .feature-card,
    .category-card {
        padding: 1.5rem;
    }

    .feature-icon,
    .category-icon {
        font-size: 2.5rem;
    }

    .game-thumbnail {
        height: 150px;
    }

    .game-icon {
        font-size: 3rem;
    }

    .game-info {
        padding: 1rem;
    }

    /* Filter buttons */
    .filter-btn {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }

    /* About content */
    .about-content {
        padding: 1.5rem;
    }

    .feature-list li {
        font-size: 1rem;
    }
}

/* ==========================================================================
   Large Desktop Styles (1400px and above)
   ========================================================================== */

@media screen and (min-width: 1400px) {
    :root {
        --max-width: 1400px;
    }

    .hero-title {
        font-size: 3.5rem;
    }

    .section-title {
        font-size: 3rem;
    }
}

/* ==========================================================================
   Touch Device Optimizations
   ========================================================================== */

@media (hover: none) and (pointer: coarse) {
    /* Increase touch targets */
    .btn,
    .nav-link,
    .filter-btn {
        min-height: 44px;
        min-width: 44px;
    }

    /* Remove hover effects on touch devices */
    .feature-card:hover,
    .category-card:hover,
    .game-card:hover {
        transform: none;
    }

    /* Add active states instead */
    .feature-card:active,
    .category-card:active,
    .game-card:active {
        opacity: 0.9;
    }
}

/* ==========================================================================
   Print Styles
   ========================================================================== */

@media print {
    .site-header,
    .site-footer,
    .nav-toggle,
    .hero-buttons,
    .btn {
        display: none;
    }

    body {
        background-color: white;
        color: black;
    }

    .hero {
        background: none;
        color: black;
    }
}

/* ==========================================================================
   Reduced Motion Support (Accessibility)
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ==========================================================================
   High Contrast Mode Support (Accessibility)
   ========================================================================== */

@media (prefers-contrast: high) {
    :root {
        --shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
        --shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.4);
    }

    .btn {
        border: 2px solid currentColor;
    }
}

/* ==========================================================================
   Dark Mode Support (Optional - can be enabled later)
   ========================================================================== */

@media (prefers-color-scheme: dark) {
    /* Uncomment to enable dark mode
    :root {
        --text-dark: #e0e0e0;
        --text-light: #b0b0b0;
        --bg-light: #1a1a1a;
        --bg-white: #2d2d2d;
        --border-color: #404040;
    }
    */
}

