/*
 * Phone & tablet fixes. Loaded after all other style sheets (see includes/head.php).
 * Nothing here applies on desktop screens wider than 991px.
 */

/* ---------- no sideways scrolling on phones ---------- */
@media (max-width: 991px) {
    html, body { max-width: 100%; overflow-x: hidden; }
    img, iframe, video { max-width: 100%; }
    img { height: auto; }

    /* decorative line next to the social icons stuck out of the screen */
    .slider-content .innovinc_line_left { display: none; }

    /* long words / e-mail addresses wrap instead of pushing the page wider */
    p, li, td, h1, h2, h3, h4, h5, a { overflow-wrap: break-word; word-wrap: break-word; }
}

@media (max-width: 767px) {
    /* justified text leaves big gaps on narrow screens */
    p, .section1 p, .section-two-content p, .main-content p { text-align: left !important; }

    /* ---------- header ---------- */
    .headerHome {
        background: rgba(0, 0, 0, 0.88) !important;
        padding: 0 !important;
    }
    .headerHome .container { padding-left: 12px !important; padding-right: 12px !important; }
    .headerHome .navbar-brand img,
    .headerHome .logo img,
    .headerHome a img { max-height: 58px; width: auto; }
    .navbar-toggle { margin-right: 0 !important; }
    .navbar-collapse { width: 100% !important; max-height: 75vh; overflow-y: auto; }
    .navbar-nav > li > a { font-size: 14px !important; padding: 12px 16px !important; border-bottom: 1px solid rgba(255,255,255,0.08); }

    /* ---------- home banner ---------- */
    .innovinc_slider_home_text h2 { font-size: 22px !important; line-height: 1.3 !important; }
    .innovinc_slider_home_text h3 { font-size: 18px !important; line-height: 1.3 !important; }
    .innovinc_slider_home_text h4.tlt, .innovinc_slider_home_text .texts li { font-size: 16px !important; white-space: normal !important; }
    .innovinc_slider_btn a { font-size: 12px !important; letter-spacing: 1px !important; padding: 12px 16px !important; margin: 4px 2px !important; }

    /* ---------- speakers & committee: 2 per row, names always visible ---------- */
    .featured-speaker .row > [class*="col-"],
    #fspeakr .row > [class*="col-"],
    .speakers-page .row > [class*="col-"] {
        width: 50% !important; float: left !important;
        padding-left: 6px !important; padding-right: 6px !important;
    }
    .featured-speaker .row { display: flex; flex-wrap: wrap; }
    .featured-speaker .row:before, .featured-speaker .row:after { display: none; }
    .featured-speaker .row > [class*="col-"] { margin-bottom: 12px; }

    .our_team_thumbnail { cursor: default; }
    .our_team_thumbnail img { width: 100% !important; aspect-ratio: 4 / 5; object-fit: cover; }
    .our_team_thumbnail:after { display: none !important; }        /* dark hover layer */
    .our_team_thumbnail .member_meetup {
        position: static !important; height: auto !important;
        background: #1f2937; padding: 8px 6px 10px; text-align: center;
    }
    .our_team_thumbnail .member_meetup .main-table,
    .our_team_thumbnail .member_meetup .main-table-cell { display: block !important; height: auto !important; }
    .our_team_thumbnail .member_meetup h3,
    .our_team_thumbnail:hover h3 {
        font-size: 14px !important; line-height: 1.3 !important; margin: 0 0 3px !important;
        opacity: 1 !important; transform: none !important; color: #fff !important;
        height: auto !important; top: auto !important; position: static !important;
    }
    .our_team_thumbnail .member_meetup h4,
    .our_team_thumbnail:hover h4 {
        font-size: 11.5px !important; line-height: 1.35 !important; margin: 0 !important;
        opacity: 1 !important; transform: none !important; color: #d1d5db !important;
        height: auto !important; top: auto !important; position: static !important;
    }
    .our_team_thumbnail span, .our_team_thumbnail:hover span { display: none !important; }

    .orgcommeties ul { display: flex; flex-wrap: wrap; justify-content: space-between; padding: 0 !important; }
    .orgcommeties ul > li, .orgcommeties ul > a {
        width: 48.5% !important; float: none !important; margin: 0 0 18px !important;
        padding: 0 !important; text-align: center; display: block;
    }
    .orgcommeties li { min-height: 0 !important; }
    .orgcommeties ul > a > li { width: 100% !important; float: none !important; margin: 0 !important; padding: 0 !important; text-align: center; }
    .orgcommeties li img { width: 100% !important; aspect-ratio: 4 / 5; object-fit: cover; }
    .orgcommeties li h4 { font-size: 14px !important; margin: 8px 0 4px !important; }
    .orgcommeties li p { font-size: 12px !important; line-height: 1.4 !important; text-align: center !important; }

    /* ---------- agenda ---------- */
    .event-time-table { display: flex; flex-wrap: wrap; align-items: flex-start; margin-left: 0 !important; }
    .event-time-table li { float: none !important; }
    .event-time-table li.event-time { width: auto !important; min-width: 0 !important; margin-right: 10px; font-weight: 600; }
    .event-time-table li.click-arrow-event { display: none !important; }
    .event-time-table li.event-time-heading { flex: 1 1 200px; min-width: 0 !important; }
    .event-time-table li p { margin: 6px 0 0 !important; }
    .section-seven .event_innovinc_content::before,
    .tab-pane .event_innovinc_content::before { display: none !important; }

    /* ---------- registration price table fits the screen ---------- */
    .table-responsive { border: 0 !important; margin-bottom: 10px; }
    .table-responsive > .table { width: 100% !important; min-width: 0 !important; table-layout: fixed; }
    .table-responsive > .table th,
    .table-responsive > .table td {
        white-space: normal !important; padding: 8px 3px !important;
        font-size: 12.5px !important; vertical-align: middle !important;
    }
    .table-responsive > .table th:first-child,
    .table-responsive > .table td:first-child { width: 34%; text-align: left !important; }
    .table-responsive > .table thead th { font-size: 10.5px !important; line-height: 1.25 !important; padding: 6px 2px !important; }
    .table-responsive > .table thead th span { font-size: 10.5px !important; }
    .table-responsive > .table thead th span[class^="bhanureg"] { font-size: 13px !important; line-height: 1.3 !important; }
    .table-responsive > .table .radio label { font-size: 12.5px !important; line-height: 1.35; padding-left: 20px; }
    .table-responsive > .table .money,
    .table-responsive > .table .amount { font-size: 13px !important; white-space: nowrap; }
    .table-responsive > .table h4 { font-size: 13px !important; }

    /* payment note + button were squeezed into two half-width columns */
    .main-content .col-lg-9[style*="width"],
    .main-content .col-lg-3[style*="width"] { width: 100% !important; float: none !important; padding: 0 !important; }
    .main-content .col-lg-3[style*="width"] .btn { float: none !important; width: 100%; margin: 12px 0; }
    .main-content .col-lg-3[style*="width"] img { margin: 0 auto !important; display: block; max-width: 250px; }

    /* ---------- forms ---------- */
    .form-control, input[type="text"], input[type="email"], select, textarea { font-size: 16px !important; } /* stops iPhone zooming in */
    .form-group [class*="col-lg-"], .form-group [class*="col-md-"] { width: 100% !important; float: none !important; }
    .btn { white-space: normal; }

    /* ---------- footer ---------- */
    .footer-top .container > [class*="col-"] { width: 100% !important; float: none !important; padding: 10px 0 !important; text-align: center; }
    .footer-top h2, .footer-top h3 { text-align: center !important; font-size: 20px !important; margin: 0 0 10px !important; }
    .footer-top a { display: inline-block; padding: 4px 0; }
    .multicolor-subscribe-form { width: 100% !important; }
    .mcolor-subbox, .mcolor-subbox1 { width: 100% !important; margin-bottom: 8px; }
    .mcolor-button { position: static !important; right: auto !important; top: auto !important; margin: 4px auto 0; display: block; }
    .copyright, .copyright p { text-align: center !important; font-size: 13px; }

    /* ---------- inner page title bars ---------- */
    .inner-banner { margin-top: 71px !important; padding: 24px 0 !important; }
    .inner-banner h3, .inner-banner h1 { font-size: 22px !important; line-height: 1.3 !important; margin: 0 !important; }
    .main-content:not(.brochure-page) { padding-top: 30px !important; }

    /* speakers page & photo gallery: 2 per row instead of 1 */
    .row:has(> [class*="col-"] > .speaker_box) { display: flex; flex-wrap: wrap; }
    .row:has(> [class*="col-"] > .speaker_box):before,
    .row:has(> [class*="col-"] > .speaker_box):after { display: none; }
    .row > [class*="col-"]:has(> .speaker_box) {
        width: 50% !important; float: none !important;
        padding-left: 6px !important; padding-right: 6px !important;
    }
    .speaker_box { margin-bottom: 12px !important; min-height: 0 !important; height: auto !important; }
    .speaker_box .su_our_speakers { margin-bottom: 0 !important; }
    .speaker_box img[src*="speakers/"] { aspect-ratio: 4 / 5; object-fit: cover; object-position: center 25%; width: 100%; }
    .speaker_box h3, .speaker_box h4 { font-size: 14px !important; line-height: 1.3 !important; }
    .speaker_box p, .speaker_box span { font-size: 12px !important; line-height: 1.35 !important; }

    /* gallery: 2 per row instead of 1 */
    .gallery ul li { width: 48% !important; margin: 1% !important; }
}
