/* ============================================
   COMPLETE MOBILE RESPONSIVE CSS
   For embedded PDF iframe fix
   ============================================ */

/* Reset and base styles */
* {
    box-sizing: border-box;
}

/* PDF wrapper for scrollable container */
.pdf-wrapper {
    width: 100%;
    overflow-x: auto;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    position: relative;
    margin: 0;
    padding: 0;
}

/* Iframe base styles */
.pdf-wrapper iframe {
    display: block;
    width: 100%;
    border: none;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* Mobile devices (phones) */
@media only screen and (max-width: 768px) {
    
    /* Fix body */
    html, body {
        margin: 0;
        padding: 0;
        width: 100%;
        overflow-x: hidden;
    }
    
    body {
        margin: 0 !important;
        padding: 10px !important;
        max-width: 100% !important;
        min-width: auto !important;
    }
    
    /* Fix main container */
    .page, article {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
        padding: 0;
        margin: 0;
    }
    
    .page-body {
        width: 100%;
        max-width: 100%;
        padding: 0;
        margin: 0;
    }
    
    /* Fix page title */
    .page-title {
        font-size: 1.6rem !important;
        word-wrap: break-word;
        padding: 0 5px 10px 5px !important;
        margin: 0 !important;
        text-align: left;
    }
    
    /* PDF wrapper mobile styles */
    .pdf-wrapper {
        overflow-x: auto;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        margin: 10px 0;
        padding: 0;
        width: 100%;
    }
    
    /* Iframe mobile styles - SCROLLABLE */
    .pdf-wrapper iframe {
        width: 100% !important;
        height: 550px !important;
        min-height: 550px;
        overflow: scroll;
        -webkit-overflow-scrolling: touch;
    }
    
    /* Fix tables for mobile */
    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
        width: 100%;
    }
    
    /* Fix images */
    img {
        max-width: 100%;
        height: auto;
    }
    
    /* Fix column layouts */
    .column-list {
        flex-direction: column;
    }
    
    .column {
        width: 100%;
        padding: 0;
        margin-bottom: 20px;
    }
    
    /* Fix headings */
    h1 {
        font-size: 1.5rem !important;
    }
    
    h2 {
        font-size: 1.3rem !important;
    }
    
    h3 {
        font-size: 1.1rem !important;
    }
    
    /* Fix content spacing */
    .page-description {
        padding: 0 10px;
    }
    
    /* Make text readable */
    body, p, li, td, th {
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
}

/* Small phones */
@media only screen and (max-width: 480px) {
    body {
        padding: 5px !important;
    }
    
    .page-title {
        font-size: 1.3rem !important;
    }
    
    .pdf-wrapper iframe {
        height: 450px !important;
        min-height: 450px;
    }
}

/* Tablets */
@media only screen and (min-width: 769px) and (max-width: 1024px) {
    .pdf-wrapper iframe {
        height: 650px !important;
    }
}

/* Desktop */
@media only screen and (min-width: 1025px) {
    .pdf-wrapper iframe {
        height: 800px !important;
    }
}

/* Fix for landscape orientation on mobile */
@media only screen and (max-width: 768px) and (orientation: landscape) {
    .pdf-wrapper iframe {
        height: 450px !important;
        min-height: 400px;
    }
}

/* Ensure PDF is scrollable on all devices */
.pdf-wrapper {
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
}

.pdf-wrapper iframe {
    pointer-events: auto;
}