/* ==========================================================================
   Byers Limousine - responsive / mobile layer
   Loaded AFTER common.css. On screens wider than 1010px nothing changes
   except better keyboard focus outlines. Everything else only applies to
   tablets and phones.
   ========================================================================== */

/* Keyboard users need to see where they are (reset.css removed the outline). */
:focus-visible { outline: 2px solid #991B00; outline-offset: 2px; }

img { max-width: 100%; }

/* The mobile call bar only exists on small screens. */
.mobile-cta { display: none; }

/* ------------------------------- TABLET + PHONE ------------------------------- */
@media screen and (max-width: 1010px) {

    html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

    body { font-size: 1.6rem; line-height: 1.5; }

    /* Page frame: fluid instead of a fixed 975px poster */
    #wrapper { width: auto; max-width: 975px; background: #fff; }
    #wrapper > div:first-child { background: none !important; height: 8px !important; }
    #container { padding: 0 14px 24px; background: none; }
    #content { margin: 0 0 20px; }

    /* Banner scales with the screen */
    #header img.logo { display: block; width: 100%; height: auto; margin: 0 0 6px; }

    /* Stack navigation above content */
    #column-nav, #column-main { float: none; width: auto; }
    #column-main {
        background-image: none;      /* fixed-position watermark is heavy on phones */
        clear: both;
    }

    /* Text */
    p { line-height: 1.5; margin-left: 0; margin-right: 0; margin-bottom: 14px; }
    p.faq-answer { margin-left: 16px; }
    ul, ol { margin-left: 20px; margin-right: 0; }
    ul.faq-answer { margin-left: 30px; }
    li { line-height: 1.5; margin-bottom: 4px; }

    h1, h2, h3, h4, h5, h6 { line-height: 1.2; margin-left: 0; margin-right: 0; margin-bottom: 12px; }
    h1 { font-size: 2.8rem; }
    h2 { font-size: 2.6rem; }
    h3 { font-size: 2.4rem; }
    h4 { font-size: 2.2rem; }
    h5 { font-size: 2rem; }
    h6 { font-size: 1.7rem; }
    h6 br, h5 br, h1 br { display: none; }   /* hard line breaks fight small screens */

    /* Navigation: compact, tappable buttons (44px+ touch targets) */
    #content #column-nav ul.box-arrow {
        display: flex; flex-wrap: wrap; gap: 6px;
        margin: 12px 0;
    }
    #content #column-nav ul.box-arrow li {
        background: #f2ead8; border: 1px solid #cbbd9a; border-radius: 4px;
        margin: 0; padding: 0;
        flex: 1 1 calc(33.333% - 6px);
    }
    #content #column-nav ul.box-arrow li a {
        display: flex; align-items: center; justify-content: center;
        min-height: 44px; padding: 6px 4px; text-align: center;
        text-decoration: none; font-weight: bold; font-size: 1.3rem; line-height: 1.15;
    }
    #content #column-nav ul.box-arrow li:last-child { background: #991B00; border-color: #991B00; flex-basis: 100%; }
    #content #column-nav ul.box-arrow li:last-child a { color: #fff; }

    /* Phone number and quote link live in the sticky bar on small screens */
    #column-nav table.office-hours, #column-nav > p { display: none; }
    #column-nav > a { display: inline-block; }
    #column-nav > a img { display: inline-block; width: 28px; height: auto; margin: 0 6px 6px 0; }

    /* Images and photo tables */
    #content img { max-width: 100%; height: auto; }
    ul.fleet-details, #content ul.fleet-details { padding-left: 20px; padding-right: 0; }

    #content table.celeb-pics,
    #content table.interior,
    #content table.chauffers,
    #content table.consultants { width: 100%; }
    #content table.celeb-pics tbody, #content table.celeb-pics tr,
    #content table.interior tbody,   #content table.interior tr,
    #content table.chauffers tbody,  #content table.chauffers tr,
    #content table.consultants tbody,#content table.consultants tr { display: block; }
    #content table.celeb-pics td,
    #content table.interior td,
    #content table.interior th,
    #content table.chauffers td,
    #content table.consultants td {
        display: block; width: auto; text-align: center; padding: 0 0 16px;
    }
    #content table.celeb-pics td img, #content table.interior td img,
    #content table.chauffers td img, #content table.consultants td img { margin-left: auto; margin-right: auto; }
    #content table.chauffers div.hr, #content table.consultants div.hr { width: auto; }

    /* ------------------------------- QUOTE FORM ------------------------------- */
    #content table.form-table { width: 100%; margin: 0; }
    #content table.form-table tbody,
    #content table.form-table tr,
    #content table.form-table th,
    #content table.form-table td { display: block; width: auto; text-align: left; }
    #content table.form-table th { padding: 12px 0 4px; font-size: 1.5rem; }
    #content table.form-table td { padding: 2px 0 6px; }

    #content table.form-table input,
    #content table.form-table textarea,
    #content table.form-table select { font-size: 1.6rem; padding: 10px; max-width: 100%; box-sizing: border-box; }
    #content table.form-table input.text,
    #content table.form-table textarea.textarea,
    #content table.form-table select.select { width: 100%; }
    #content table.form-table input[type="text"] { width: 100%; }
    #content table.form-table input[type="checkbox"] { width: 22px; height: 22px; padding: 0; margin: 0 8px 0 0; vertical-align: middle; }
    #content table.form-table input[type="hidden"] { display: none; }
    #content table.form-table #req_date_year { width: 6.5em; }
    #content table.form-table textarea.textarea { height: 140px; }
    #content table.form-table input.submit_button { padding: 12px 18px; margin: 6px 6px 6px 0; }
    #content table.form-table table.form-table,
    #content table.form-table table.checkbox-table { width: 100%; padding: 4px; }
    #content table.form-table table.checkbox-table { float: none; }
    #content table.form-table .hidden { display: none; }

    /* Online calendar pop-up should not run off the screen */
    #div1 { max-width: 100vw; }

    /* Footer */
    #footer { padding-bottom: 60px; }

    /* Sticky call / quote bar on phones */
    .mobile-cta {
        display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
        background: #000; border-top: 2px solid #996600;
        padding-bottom: env(safe-area-inset-bottom, 0);
    }
    .mobile-cta a {
        flex: 1; text-align: center; padding: 14px 8px; color: #fff; font-weight: bold;
        text-decoration: none; font-size: 1.6rem; line-height: 1.2;
    }
    .mobile-cta a + a { background: #991B00; }
}

/* ---------------------------------- PHONES ---------------------------------- */
@media screen and (max-width: 600px) {
    h1 { font-size: 2.4rem; }
    h2 { font-size: 2.2rem; }
    h3 { font-size: 2rem; }
    h4 { font-size: 1.9rem; }
    h5 { font-size: 1.8rem; }
    #container { padding: 0 12px 24px; }
}

/* ------------------------------- DESKTOP TWEAK -------------------------------- */
/* Banner already ships as 910px wide; keep it crisp and never overflow. */
#header img.logo { max-width: 100%; height: auto; }

@media print {
    .mobile-cta { display: none !important; }
}
