
/* =====================================================================
   responsive.css - mobile responsive overrides for 11500.net
   Loaded on ALL devices (after theme + style_default CSS) so that
   media queries fix layout regardless of UA-based stylesheet switching.
   ===================================================================== */

/* ---------- Fluid media (all screen sizes) ---------- */
img, video, audio, canvas, svg, object, embed {
    max-width: 100%;
}

/* Keep fixed-height images from being stretched by max-width */
img.title, img.diagram, img.advert {
    height: auto;
}

/* Tables: allow horizontal scroll instead of breaking the layout */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* ---------- Global Rules (All Widths) ---------- */

/* Make icon menu fluid at all widths to prevent overflow and ensure visibility */
.expand-down {
    width: 100% !important;
    max-width: 100%;
    box-sizing: border-box;
    position: relative;
    z-index: 10;
}

/* Ensure menu items stay in a single row and don't wrap */
.expand-down ul {
    white-space: nowrap;
}

/* Ensure alert box text is always left-aligned */
.alert {
    text-align: left !important;
}

/* ---------- Small phones (<= 480px) ---------- */
@media (max-width: 480px) {

    body {
        padding-left: 0;
        margin-left: 0;
        margin-right: 0;
    }

    h1 {
        font-size: 28px !important;
        margin-top: 8px;
    }

    h2 {
        font-size: 20px;
    }

    h3 {
        font-size: 18px;
    }

    h4 {
        font-size: 16px;
    }

    h5 {
        font-size: 15px;
    }

    h6 {
        font-size: 12px;
    }

    /* Content container: remove the large asymmetric desktop padding */
    /* padding-top must clear the fixed navbar which wraps to ~71px on most phones */
    #container {
        width: 100% !important;
        padding-top: 80px;
        padding-left: 8px;
        padding-right: 8px;
        padding-bottom: 10px;
        box-sizing: border-box;
    }

    /* Very small phones: navbar wraps to ~106px, need more padding */
    @media (max-width: 359px) {
        #container {
            padding-top: 115px;
        }
    }

    /* Icon menu: make fluid on mobile to prevent overflow */
    .expand-down {
        width: 100% !important;
        max-width: 100%;
    }

    /* Allow horizontal scroll for icon menu on small screens */
    .expand-down ul {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Green alert boxes: ensure full width on mobile */
    .alert {
        width: 100% !important;
        box-sizing: border-box;
    }

    /* Keep text left-aligned (normal) to avoid large gaps from justification */
    .alert h1, .alert h2, .alert h3, .alert h4, .alert h5, .alert h6,
    .alert p {
        text-align: left;
        width: 100%;
    }

    /* Ensure Bootstrap grid columns are full width on mobile */
    .col-lg-12, .col-md-12, .col-sm-12 {
        width: 100% !important;
        float: none !important;
    }

    /* Audio players: never wider than the screen */
    audio, audio.small {
        width: 100% !important;
        max-width: 100%;
        height: 42px;
        display: block;
        box-sizing: border-box;
    }

    /* Large diagrams / title images scale down */
    img.diagram {
        width: 100% !important;
        height: auto !important;
    }

    img.title {
        width: 100% !important;
        max-width: 300px;
        height: auto !important;
    }

    /* Fixed-width nav items wrap instead of overflowing */
    #primary_nav_wrap ul {
        float: none;
        display: block;
    }

    #primary_nav_wrap ul li {
        float: none;
        display: inline-block;
        margin: 2px;
    }

    #primary_nav_wrap ul a {
        width: auto;
        display: inline-block;
        font-size: 13px;
    }

    /* Dropdown menus: keep on screen */
    .dropdown-menu {
        max-width: 92vw;
    }

    /* Footer columns stack */
    footer .col-sm-6 {
        display: block;
        width: 100%;
        text-align: center;
        padding: 4px 0;
    }

    /* Forms: full width inputs on phones */
    form input[type="text"],
    form input[type="email"],
    form input[type="password"],
    form input[type="tel"],
    form input[type="url"],
    form input[type="search"],
    form select,
    form textarea {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    /* Buttons: comfortable tap targets */
    .btn, .tools a {
        display: inline-block;
        min-height: 36px;
    }

    /* Video players */
    video {
        width: 100% !important;
        max-width: 100%;
        height: auto;
    }
}

/* ---------- Tablets (481px - 1024px) ---------- */
@media (min-width: 481px) and (max-width: 1024px) {

    h1 {
        font-size: 34px !important;
    }

    #container {
        width: 98% !important;
        padding-top: 80px;
        padding-left: 12px;
        padding-right: 12px;
        box-sizing: border-box;
    }

    audio, audio.small {
        width: 100% !important;
        max-width: 100%;
        height: 42px;
        display: block;
        box-sizing: border-box;
    }

    img.diagram {
        width: 100% !important;
        height: auto !important;
    }

    .dropdown-menu {
        max-width: 92vw;
    }

    video {
        width: 100% !important;
        max-width: 100%;
        height: auto;
    }
}

