/**
 * diskret.me - Mobil-optimalisering
 */

/* KRITISK: Forhindre horisontal scroll på body */
html, body {
    max-width: 100vw;
    overflow-x: hidden;
}

/* Alle tabeller må kunne scrolle */
table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
}

.comparison-table,
.price-table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
}

/* Table wrapper for ekstra sikkerhet */
.table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 1rem -1rem;
    padding: 0 1rem;
}

/* Generelle elementer */
img, video, iframe, pre, code {
    max-width: 100%;
}

/* Mobil breakpoint */
@media (max-width: 768px) {
    body {
        font-size: 15px;
    }
    
    .container {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
        max-width: 100% !important;
    }
    
    /* Tabeller */
    table, .comparison-table, .price-table {
        font-size: 0.8rem;
    }
    
    th, td {
        padding: 0.5rem 0.5rem !important;
    }
    
    /* Grid til én kolonne */
    .info-grid,
    .reviews-grid,
    .cards-grid,
    .features-grid {
        grid-template-columns: 1fr !important;
    }
    
    /* Flex wrapping */
    .service-header,
    .service-body,
    .meta-row {
        flex-wrap: wrap !important;
    }
}

/* Små mobiler */
@media (max-width: 480px) {
    body {
        font-size: 14px;
    }
    
    .container {
        padding-left: 0.75rem !important;
        padding-right: 0.75rem !important;
    }
    
    h1 { font-size: 1.5rem !important; }
    h2 { font-size: 1.25rem !important; }
    h3 { font-size: 1.1rem !important; }
    
    table, .comparison-table, .price-table {
        font-size: 0.75rem;
    }
    
    th, td {
        padding: 0.4rem 0.35rem !important;
    }
    
    .hero { padding: 1.5rem 0 !important; }
    section, .section { padding: 1.5rem 0 !important; }
    
    .cta-button, .btn {
        width: 100%;
        text-align: center;
    }
}

/* Veldig små skjermer */
@media (max-width: 360px) {
    body {
        font-size: 13px;
    }
    
    .container {
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
    }
    
    table, .comparison-table, .price-table {
        font-size: 0.7rem;
    }
    
    th, td {
        padding: 0.3rem 0.25rem !important;
    }
}
