/* === responsive.css — Mobile & Tablet Breakpoints === */

/* --- Tablet (max-width: 768px) --- */
@media (max-width: 768px) {
    .page-wrapper {
        padding: 1.5rem 1rem;
    }

    h1 { font-size: 1.5rem; }
    h2 { font-size: 1.2rem; }

    /* Nav: show toggle, hide horizontal menu */
    .nav-toggle {
        display: block;
    }

    .main-nav ul {
        flex-direction: column;
        display: none;
        padding: 0;
    }

    .main-nav.open ul {
        display: flex;
    }

    .main-nav a {
        padding: 0.75rem 1.5rem;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }

    .dropdown {
        position: static;
        box-shadow: none;
        background: rgba(0, 0, 0, 0.1);
    }

    .dropdown a {
        color: rgba(255, 255, 255, 0.9);
        padding-left: 2.5rem;
        border-bottom-color: rgba(255, 255, 255, 0.05);
    }

    .dropdown a:hover {
        background: rgba(255, 255, 255, 0.1);
        color: #fff;
    }

    /* Vocab grid: single column */
    .vocab-grid {
        grid-template-columns: 1fr;
    }

    /* Letter grid: smaller */
    .letter-grid {
        grid-template-columns: repeat(auto-fill, minmax(65px, 1fr));
        gap: 0.5rem;
    }

    /* Matching: stack on tablet */
    .matching-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    /* Urdu sizes */
    .urdu-large { font-size: 3rem; }
    .urdu-xlarge { font-size: 4.5rem; }
    .letter-display .letter-main { font-size: 4rem; }

    /* Letter card: stack on tablet */
    .letter-card {
        flex-direction: column-reverse;
    }

    .letter-display {
        max-width: 100%;
        flex-direction: row;
        gap: 1rem;
        padding: 1rem;
    }

    .letter-display .letter-main {
        font-size: 4rem;
    }
}

/* --- Mobile (max-width: 480px) --- */
@media (max-width: 480px) {
    html { font-size: 15px; }

    .page-wrapper {
        padding: 1rem 0.75rem;
    }

    .header-top {
        padding: 0.5rem 1rem;
    }

    .site-title {
        font-size: 1.2rem;
    }

    .site-title .urdu-title {
        font-size: 1.3rem;
    }

    h1 { font-size: 1.3rem; }
    h2 { font-size: 1.1rem; }

    /* Urdu: enforce minimum readability */
    .urdu, [lang="ur"] {
        font-size: 1.5rem;
    }

    .urdu-block {
        font-size: 1.5rem;
        padding: 0.75rem 1rem;
    }

    .urdu-large { font-size: 2.5rem; }
    .urdu-xlarge { font-size: 3.5rem; }

    .parallel-text .urdu-line {
        font-size: 1.4rem;
    }

    /* Vocab cards */
    .vocab-card .urdu-word {
        font-size: 2rem;
    }

    /* Letter display */
    .letter-display {
        padding: 0.75rem;
    }

    .letter-display .letter-main {
        font-size: 3.5rem;
    }

    /* Letter grid */
    .letter-grid {
        grid-template-columns: repeat(auto-fill, minmax(55px, 1fr));
    }

    .letter-grid-item .letter {
        font-size: 2rem;
    }

    /* Forms table */
    .forms-table td {
        font-size: 1.5rem;
        padding: 0.5rem;
    }

    .forms-table th {
        font-size: 0.75rem;
        padding: 0.4rem 0.5rem;
    }

    /* Exercises: larger touch targets */
    .mcq-option {
        padding: 1rem;
        min-height: 48px;
    }

    .matching-item {
        min-height: 48px;
        padding: 0.85rem;
    }

    .tf-option {
        padding: 1rem;
        min-height: 48px;
    }

    .word-tile {
        padding: 0.6rem 1rem;
        min-height: 44px;
    }

    .check-btn {
        padding: 1rem;
        font-size: 1.05rem;
        min-height: 48px;
    }

    /* Question card */
    .question-card {
        padding: 1.25rem;
    }

    /* Results */
    .results-actions {
        flex-direction: column;
    }

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

    /* Lesson nav: stack */
    .lesson-nav {
        flex-direction: column;
        gap: 0.75rem;
    }

    .lesson-nav .btn {
        width: 100%;
    }

    /* Cards */
    .card {
        padding: 1rem;
    }

    /* Toggle label hide on mobile to save space */
    .toggle-label {
        display: none;
    }
}

/* --- Print styles --- */
@media print {
    .site-header,
    .site-footer,
    .lesson-nav,
    .toggle-container,
    .nav-toggle {
        display: none !important;
    }

    .page-wrapper {
        max-width: 100%;
        padding: 0;
    }

    .urdu, [lang="ur"] {
        font-size: 1.4rem;
        line-height: 2;
    }
}
