/* Global Responsive Design for 241 Runners Awareness */

/* Base responsive styles for all pages */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
}

/* Full screen layout for all pages */
.container,
.main-content,
.content-wrapper {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
}

/* Navigation responsive design */
.navbar,
.navigation,
nav {
    width: 100%;
    position: relative;
}

.navbar-nav,
.nav-links {
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    gap: 0.5rem;
}

/* Form responsive design */
.form-container,
.form-wrapper {
    width: 100%;
    max-width: 100%;
    padding: 20px;
}

.form-group {
    width: 100%;
    margin-bottom: 15px;
}

input,
select,
textarea,
button {
    width: 100%;
    max-width: 100%;
    padding: 12px;
    font-size: 16px; /* Prevents zoom on iOS */
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* Table responsive design */
.table-container,
.table-wrapper {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

table {
    width: 100%;
    min-width: 600px;
    border-collapse: collapse;
}

/* Card responsive design */
.card,
.card-container {
    width: 100%;
    margin: 10px 0;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Grid responsive design */
.grid,
.grid-container {
    display: grid;
    gap: 20px;
    width: 100%;
}

/* Button responsive design */
.btn,
button {
    min-height: 44px; /* Touch target size */
    min-width: 44px;
    padding: 12px 20px;
    font-size: 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    touch-action: manipulation;
}

/* Accessibility improvements */
.btn:focus,
button:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Screen reader support */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .btn,
    button {
        border: 2px solid currentColor;
    }
    
    .card,
    .card-container {
        border: 1px solid currentColor;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Large screens (1400px+) */
@media (min-width: 1400px) {
    .container,
    .main-content {
        padding: 20px;
        max-width: 1400px;
        margin: 0 auto;
    }
    
    .grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
}

/* Medium screens (1200px - 1399px) */
@media (max-width: 1399px) and (min-width: 1200px) {
    .container,
    .main-content {
        padding: 15px;
    }
    
    .grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

/* Small screens (768px - 1199px) */
@media (max-width: 1199px) and (min-width: 768px) {
    .container,
    .main-content {
        padding: 10px;
    }
    
    .navbar-nav,
    .nav-links {
        flex-direction: column;
        align-items: center;
    }
    
    .grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 15px;
    }
    
    .card,
    .card-container {
        padding: 15px;
    }
}

/* Mobile screens (320px - 767px) */
@media (max-width: 767px) {
    body {
        font-size: 14px;
    }
    
    .container,
    .main-content {
        padding: 5px;
    }
    
    .navbar-nav,
    .nav-links {
        flex-direction: column;
        width: 100%;
        gap: 5px;
    }
    
    .form-container,
    .form-wrapper {
        padding: 10px;
    }
    
    .grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .card,
    .card-container {
        padding: 10px;
        margin: 5px 0;
    }
    
    .btn,
    button {
        width: 100%;
        margin: 5px 0;
    }
    
    table {
        font-size: 0.9rem;
    }
    
    th,
    td {
        padding: 8px 4px;
    }
}

/* Extra small screens (320px - 479px) */
@media (max-width: 479px) {
    body {
        font-size: 12px;
    }
    
    .container,
    .main-content {
        padding: 2px;
    }
    
    .form-container,
    .form-wrapper {
        padding: 5px;
    }
    
    .card,
    .card-container {
        padding: 8px;
        margin: 2px 0;
    }
    
    .btn,
    button {
        padding: 10px;
        font-size: 14px;
    }
    
    table {
        font-size: 0.8rem;
    }
    
    th,
    td {
        padding: 6px 2px;
    }
}

/* Print styles */
@media print {
    .navbar,
    .navigation,
    nav,
    .btn,
    button {
        display: none;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
    
    .container,
    .main-content {
        padding: 0;
    }
    
    .card,
    .card-container {
        border: 1px solid #000;
        box-shadow: none;
        page-break-inside: avoid;
    }
}
