/* Mobile Responsiveness Enhancements for EB-5 Investment Risk Analysis Website */

/* Base responsive settings */
@media screen and (max-width: 768px) {
    .container {
        width: 100%;
        padding: 15px;
    }
    
    h1 {
        font-size: 1.8rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    h3 {
        font-size: 1.3rem;
    }
    
    /* Adjust header for mobile */
    header .header-content {
        flex-direction: column;
        text-align: center;
    }
    
    /* Make tabs stack on mobile */
    .tab-container {
        flex-direction: column;
    }
    
    .tab-button {
        width: 100%;
        margin-bottom: 5px;
    }
    
    /* Adjust comparison tables for mobile */
    .comparison-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
    
    /* Make cards full width on mobile */
    .card, .update-card {
        width: 100%;
        margin-left: 0;
        margin-right: 0;
    }
    
    /* Adjust risk assessment visualization */
    .risk-meter {
        width: 100%;
    }
    
    /* Adjust navigation for mobile */
    .nav-container {
        flex-direction: column;
    }
    
    .nav-item {
        width: 100%;
        text-align: center;
        margin-bottom: 5px;
    }
    
    /* Adjust footer for mobile */
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-section {
        width: 100%;
        margin-bottom: 20px;
    }
    
    /* Improve touch targets for mobile */
    button, .btn, .nav-link, .tab-button {
        min-height: 44px;
        padding: 12px 15px;
    }
    
    /* Adjust spacing for mobile */
    section {
        margin-bottom: 30px;
    }
    
    /* Improve form elements for mobile */
    input, select, textarea {
        font-size: 16px; /* Prevents iOS zoom on focus */
        width: 100%;
        padding: 12px;
        margin-bottom: 15px;
    }
    
    /* Adjust image sizes for mobile */
    img {
        max-width: 100%;
        height: auto;
    }
    
    /* Make charts responsive */
    .chart-container {
        width: 100%;
        overflow-x: auto;
    }
    
    /* Adjust grid layouts for mobile */
    .grid-container {
        grid-template-columns: 1fr;
    }
    
    /* Improve readability on mobile */
    p, li {
        font-size: 16px;
        line-height: 1.6;
    }
    
    /* Adjust modal dialogs for mobile */
    .modal-content {
        width: 95%;
        margin: 0 auto;
    }
    
    /* Improve table readability on mobile */
    .responsive-table {
        border: 0;
    }
    
    .responsive-table thead {
        display: none;
    }
    
    .responsive-table tr {
        margin-bottom: 20px;
        display: block;
        border: 1px solid #ddd;
    }
    
    .responsive-table td {
        display: block;
        text-align: right;
        border-bottom: 1px dotted #ddd;
        position: relative;
        padding-left: 50%;
    }
    
    .responsive-table td:before {
        content: attr(data-label);
        position: absolute;
        left: 10px;
        width: 45%;
        padding-right: 10px;
        white-space: nowrap;
        text-align: left;
        font-weight: bold;
    }
    
    .responsive-table td:last-child {
        border-bottom: 0;
    }
}

/* Small mobile devices */
@media screen and (max-width: 480px) {
    h1 {
        font-size: 1.6rem;
    }
    
    h2 {
        font-size: 1.4rem;
    }
    
    h3 {
        font-size: 1.2rem;
    }
    
    .container {
        padding: 10px;
    }
    
    /* Further reduce padding and margins */
    .card, .update-card {
        padding: 15px;
    }
    
    /* Adjust button sizes for very small screens */
    .btn {
        padding: 10px;
        font-size: 14px;
    }
}

/* Print styles for better printing */
@media print {
    body {
        font-size: 12pt;
        color: #000;
        background-color: #fff;
    }
    
    a {
        color: #000;
        text-decoration: underline;
    }
    
    header, footer, nav, .no-print {
        display: none;
    }
    
    .container {
        width: 100%;
        margin: 0;
        padding: 0;
    }
    
    h1, h2, h3, h4 {
        page-break-after: avoid;
        page-break-inside: avoid;
    }
    
    img, table {
        page-break-inside: avoid;
        max-width: 100% !important;
    }
    
    p, h2, h3 {
        orphans: 3;
        widows: 3;
    }
    
    .print-full-width {
        width: 100%;
    }
    
    /* Ensure background colors and images print */
    * {
        -webkit-print-color-adjust: exact !important;
        color-adjust: exact !important;
    }
}