/* Mobile-First Responsive Improvements for Doctrinal Debate */

/* Base Mobile Styles (320px and up) */
@media screen and (max-width: 480px) {
    /* Improved typography for mobile */
    body {
        font-size: 16px;
        line-height: 1.6;
    }

    /* Header improvements */
    .header-content {
        flex-direction: column;
        text-align: center;
        padding: 15px;
    }

    .site-title {
        font-size: 1.5em;
        margin-bottom: 8px;
    }

    .site-tagline {
        font-size: 0.85em;
    }

    /* Navigation improvements for touch */
    .nav {
        margin-top: 15px;
        flex-direction: column;
        width: 100%;
        gap: 10px;
    }

    .nav-link {
        padding: 12px 20px;
        font-size: 16px;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* Content area */
    .container {
        padding: 10px;
    }

    .main-content {
        padding: 20px 15px;
        border-radius: 5px;
    }

    /* Headings scale */
    h1 {
        font-size: 1.6em;
        padding-bottom: 15px;
    }

    h2 {
        font-size: 1.3em;
        margin-top: 25px;
    }

    h3 {
        font-size: 1.15em;
        margin-top: 20px;
    }

    /* Better readability */
    p {
        font-size: 16px;
        line-height: 1.7;
        text-align: left;
        margin-bottom: 16px;
    }

    /* Scripture quotes more visible */
    .scripture-quote {
        display: block;
        margin: 10px 0;
        padding: 10px;
        background: rgba(106, 13, 173, 0.05);
        border-left: 3px solid #6a0dad;
        font-size: 15px;
    }

    /* Boxes and panels */
    .definition-box,
    .evidence-list,
    .legal-point,
    .conclusion-box,
    .position-block {
        padding: 15px;
        margin: 20px -5px;
    }

    /* Debate positions section */
    .position-block h3 {
        font-size: 1.1em;
        line-height: 1.4;
    }

    .position-points li {
        font-size: 15px;
        margin-bottom: 15px;
    }

    .key-argument {
        padding: 12px;
        font-size: 14px;
    }

    .common-ground {
        padding: 15px;
        font-size: 15px;
    }

    /* Lists */
    .evidence-list ol,
    .evidence-list ul {
        margin-left: 15px;
        font-size: 15px;
    }

    /* Navigation buttons - improved for touch */
    .test-nav,
    .nav-buttons {
        flex-direction: column;
        gap: 15px;
        margin-top: 30px;
        padding-top: 20px;
    }

    .test-nav a,
    .nav-button {
        display: block;
        text-align: center;
        padding: 15px 20px;
        min-height: 48px;
        font-size: 16px;
        width: 100%;
    }

    /* Breadcrumb improvements */
    .breadcrumb {
        font-size: 14px;
        padding: 12px 15px;
        overflow-x: auto;
        white-space: nowrap;
    }

    /* Test grid on index page */
    .test-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .test-item {
        padding: 12px;
    }

    /* Tables responsive */
    .comparison-table {
        font-size: 14px;
        display: block;
        overflow-x: auto;
    }

    .comparison-table th,
    .comparison-table td {
        padding: 8px;
        min-width: 100px;
    }
}

/* Small Tablets (481px - 768px) */
@media screen and (min-width: 481px) and (max-width: 768px) {
    /* Slightly larger typography */
    body {
        font-size: 17px;
    }

    .header-content {
        flex-direction: column;
        text-align: center;
    }

    .nav {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        margin-top: 20px;
    }

    .nav-link {
        padding: 10px 18px;
        min-width: 100px;
    }

    .main-content {
        padding: 30px 25px;
    }

    h1 {
        font-size: 1.9em;
    }

    h2 {
        font-size: 1.5em;
    }

    /* Navigation at bottom */
    .test-nav {
        flex-direction: row;
        justify-content: space-between;
    }

    .test-nav a {
        width: auto;
        min-width: 150px;
    }

    /* Test grid - 2 columns */
    .test-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Tablets and up (769px - 1024px) */
@media screen and (min-width: 769px) and (max-width: 1024px) {
    .container {
        max-width: 900px;
    }

    .main-content {
        padding: 35px;
    }

    /* Test grid - 3 columns */
    .test-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Desktop (1025px+) - Already handled by existing styles */

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .scripture-quote {
        border: 2px solid #6a0dad;
        font-weight: bold;
    }

    .nav-link,
    .test-nav a,
    .nav-button {
        border: 2px solid currentColor;
    }
}

/* Dark mode support (optional) */
@media (prefers-color-scheme: dark) {
    body {
        background: #1a1a1a;
        color: #e0e0e0;
    }

    .main-content {
        background: #2a2a2a;
        color: #e0e0e0;
    }

    .header {
        background: linear-gradient(135deg, #0d1929 0%, #1a3150 100%);
    }

    .definition-box,
    .evidence-list {
        background: #333;
        border-color: #4a5298;
    }

    .scripture-quote {
        color: #b19cd9;
    }

    h1, h2, h3 {
        color: #6a9bd1;
    }
}

/* Print styles */
@media print {
    .nav,
    .test-nav,
    .nav-buttons,
    .breadcrumb {
        display: none;
    }

    .main-content {
        padding: 0;
        box-shadow: none;
    }

    body {
        font-size: 12pt;
        line-height: 1.5;
    }

    .scripture-quote {
        font-style: italic;
        border-left: 2px solid #000;
        padding-left: 10px;
    }
}
/* Make entire test blocks clickable */
.test-item .test-link {
    display: block;
    text-decoration: none;
    color: inherit;
    padding: 15px;
    border-radius: 8px;
    transition: all 0.3s;
}

.test-item .test-link:hover {
    background: #f0f4f8;
    transform: translateX(5px);
}

.test-item .test-title {
    color: #2a5298;
    font-weight: bold;
    font-size: 1.1em;
    margin-bottom: 10px;
}

.test-item .test-link:hover .test-title {
    color: #1e3c72;
}

/* Style the questions within clickable blocks */
.test-link .test-questions {
    color: #555;
    padding-left: 20px;
    margin-top: 10px;
}

.test-link .test-questions li {
    margin-bottom: 5px;
    font-size: 0.95em;
}

/* Visual feedback for clickable area */
.test-item {
    cursor: pointer;
    margin-bottom: 20px;
}

/* For "Analysis in Progress" tests */
.test-link[href="#"] {
    opacity: 0.7;
    cursor: not-allowed;
}

.test-link[href="#"]:hover {
    background: #f5f5f5;
    transform: none;
}
