/*
 * Responsive fixes — audit 30.11.2026 (docs/seo-audit/06-prod-audit-2026-11-30.md, R1–R6).
 * Loaded last via frontend/assets/AppAsset.php. Only layout for phones/tablets; desktop (>1023px) is untouched.
 * Rollback: remove 'css/responsive-fixes.css' from AppAsset::$css.
 */

/* R1. Blocks with inline "padding: … 82px" (desktop side-menu offset) must follow the theme's own breakpoints:
   82px on desktop, 60px on tablets (≤1023px), 0 on phones (≤767px). */
@media screen and (max-width: 1023px) {
    .block[style*="82px"] { padding-left: 60px !important; }
}
@media screen and (max-width: 767px) {
    .block[style*="82px"] { padding-left: 0 !important; }
}

/* R2. Banner overlay in newblock3 (inline left:82px; width: calc(100% - 164px)). */
@media screen and (max-width: 1023px) {
    .top__content_new[style*="left: 82px"] { left: 60px !important; width: calc(100% - 120px) !important; }
}
@media screen and (max-width: 767px) {
    .top__content_new[style*="left: 82px"] { left: 0 !important; width: 100% !important; padding: 16px !important; }
    .top__content_new [style*="width: 300px"] { width: auto !important; max-width: 300px; margin-left: auto !important; margin-right: auto !important; }
}

/* R3. Home slider: long service names (e.g. «Пародонтологія») were wider than a 375px screen. */
@media screen and (max-width: 767px) {
    .preview__name--text { font-size: calc((100vw - 60px) / 10.5) !important; }
}

/* R4. "Передзвоніть мені" bar: compact on phones (was ~24% of the screen height). */
@media screen and (max-width: 767px) {
    .callMe { height: auto !important; }
    .callMe__form {
        flex-direction: row !important;
        flex-wrap: wrap;
        justify-content: center;
        align-items: center;
        gap: 8px 12px;
        padding: 10px 44px 12px 16px !important;
        height: auto !important;
    }
    .callMe__title { width: 100%; text-align: center; font-size: 14px !important; }
    .callMe__row { flex: 0 1 auto; }
    .callMe__phone.callMe__rowItem { width: 150px; height: 32px; }
    .callMe__sendBtn { width: 130px !important; height: 34px !important; margin: 0 !important; }
    .callMe__sendBtn .form__button--text { font-size: 12px; letter-spacing: 1.5px; }
    .callMe .close { top: 10px; right: 12px; }
}

/* R5. Footer menu row (inline margin-left + width: 70%) overflowed both edges on phones. */
@media screen and (max-width: 767px) {
    div:has(> .footer_link_new) {
        margin-left: 0 !important;
        width: 100% !important;
        flex-wrap: wrap;
        justify-content: center !important;
        gap: 6px 18px;
        margin-bottom: 40px !important;
    }
    .footer_link_new { font-size: 14px !important; line-height: 20px !important; letter-spacing: 1.5px !important; }
}

/* R6. Buttons: never narrower than their label, never wider than the screen. */
@media screen and (max-width: 767px) {
    .about__button, .block__button { max-width: 100%; box-sizing: border-box; }
    .about__button--text, .block__button--text { white-space: normal; text-align: center; padding: 0 10px; }
}
