/* 3.4b mobile fixes (task 03.4b). Loaded last, after media.css. Layout only: colours, fonts and blocks stay as they were. */

/* --- 1. No horizontal overflow ------------------------------------------------ */
img, video { max-width: 100%; height: auto; }
iframe, embed, object { max-width: 100%; }
body { overflow-wrap: break-word; }
/* long URLs inside article text. Not "a" globally: "anywhere" also shrinks min-content and broke card titles (АУТСОР|СИНГ) */
p a, li a, td a { overflow-wrap: anywhere; }
pre { white-space: pre-wrap; }
/* WOW.js fadeInLeft/Right start at translateX(+-100%): while they run the page was ~2x wider (sideways wobble on touch).
   "clip" (not "hidden") creates no scroll container, so nothing else changes. All .wow blocks are inside <section>. */
section { overflow-x: clip; }

@media only screen and (max-width: 991px) {
    /* tables inside page/news texts scroll inside themselves instead of widening the page */
    .container table { display: block; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
    /* inputs: 16px = no zoom-on-focus in iOS Safari */
    input, select, textarea, .cnt_form_input { font-size: 16px !important; }
    /* home slider 768-991px: the description ran under the 100px button bar; phones already hide it (hidden-xs) */
    .carousel-caption p.hidden-xs { display: none !important; }
}

/* --- 2. Phones ---------------------------------------------------------------- */
@media only screen and (max-width: 767px) {
    /* readable text */
    p, li, td, dd, dt, blockquote { font-size: 16px; line-height: 1.5; }

    /* home slider: H1 >= 18px; the caption gets the full slide width instead of a smaller font */
    .carousel-caption { left: 12px; right: 12px; padding: 8px 0; top: 0; bottom: auto; }
    .carousel-caption h1, .carousel-caption h3, .carousel-caption h1 { font-size: 18px; line-height: 22px; margin: 4px 0 0; padding-bottom: 0; }

    /* mobile menu: 44px rows, submenus shown as an indented list (no hover on touch screens) */
    ul.header__mb-menu > li > a { min-height: 44px; display: flex; align-items: center; }
    ul.header__mb-menu .header_drop-down-list,
    ul.header__mb-menu .header_drop-down-list.active { display: block; position: static; max-height: none; overflow: visible; padding: 0 0 8px 14px; background: none; text-align: left; }
    ul.header__mb-menu .header_drop-down-list ul { display: block; width: auto; padding: 0; }
    ul.header__mb-menu .header_drop-down-list ul li { min-height: 0; margin: 0; padding: 0; text-transform: none; border-bottom: none; }
    ul.header__mb-menu .header_drop-down-list ul li:before { display: none; }
    ul.header__mb-menu .header_drop-down-list ul li a { color: #264e82; font-family: inherit; font-weight: normal; font-size: 15px; min-height: 44px; display: flex; align-items: center; }

    /* tap targets >= 44px */
    .home__lang-link { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; }
    .home__call-back-ico { min-height: 44px; }
    a[href^="tel:"] { display: inline-flex; align-items: center; min-height: 44px; }
    footer a, .footer a { display: inline-block; min-height: 44px; line-height: 44px; }
    .foot_fb { min-width: 44px; min-height: 44px; background-position: center; }
    .foot_subs_btn { min-width: 44px; min-height: 44px; }
    .foot_subs_input { min-height: 44px; }
    .show_rev_owl_txt { display: inline-block; min-height: 44px; line-height: 44px; }
    .navbar-brand { min-height: 44px; display: flex; align-items: center; }
    a[href^="mailto:"] { display: inline-flex; align-items: center; min-height: 44px; }
    .cnt_mess a { display: inline-flex; align-items: center; min-height: 44px; }
    .cnt_fb { min-width: 44px; min-height: 44px; background-position: center; }
    .news_cat_btn { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }
    .c_t_list li a { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; }
    .cases_owl_item li a { display: flex; align-items: center; min-height: 44px; }

    /* modal forms: full-width fields, 44px controls, bigger close button (the overlay already scrolls inside) */
    .remodal input:not([type=hidden]):not([type=checkbox]):not([type=radio]), .remodal select, .cnt_form_input { min-height: 44px; }
    .it_remodal .remodal-close { width: 44px; height: 44px; top: 8px; right: 8px; display: flex; align-items: center; justify-content: center; }
    .it_remodal .remodal-close:after { line-height: 1; }
    .remodal input[type=time] { min-width: 110px; }   /* 16px font: "12:00" + clock icon fit; 120px wraps the row at 390px */
    /* modal title: the 120px header clipped 2-line titles ("Отримати комерційну | пропозицію") */
    .it_remodal_header { height: auto; min-height: 120px; }
    .it_remodal_header h2 { box-sizing: border-box; min-height: 120px; display: flex; align-items: center; line-height: 1.25; padding: 16px 52px 16px 20px; }

    /* services list: the title column is ~107px wide (legacy); whole words as before (no mid-word break) */
    .serv_item_name { overflow-wrap: normal; }
}

/* --- 3. Contacts map: responsive at any width ---------------------------------- */
iframe[src*="google.com/maps"], iframe[src*="maps.google"] { width: 100% !important; }
@media only screen and (max-width: 767px) {
    iframe[src*="google.com/maps"], iframe[src*="maps.google"] { height: 320px !important; }
}
