/* Shared mobile rules. Scoped specificity also covers template-local styles. */
body .footer-container { box-sizing: border-box; max-width: 100%; }
@media (min-width: 993px) {
    body .category-layout > .category-services-wrapper { flex: 1 1 0; min-width: 0; }
}
@media (max-width: 992px) {
    body .header_mobile_bar {
        position: fixed;
        top: max(15px, env(safe-area-inset-top, 0px));
    }
    body .prices-packages-grid { display: grid; grid-template-columns: minmax(0, 1fr); }
    body .prices-packages-grid .prices-packages-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    body .prices-packages-grid :is(.package-card, .prices-included-inner) { box-sizing: border-box; width: 100%; min-width: 0; }
    body .cta-block { box-sizing: border-box; max-width: 100%; }
    body :is(.cta-btn, .cta-button, .banner-btn) { box-sizing: border-box; max-width: 100%; }
    body .prices-table { min-width: 0; font-size: 14px; }
    body .prices-table :is(th, td, .col-code, .col-price) { font-size: 14px; }
    body .prices-table .category-row td { font-size: 14px; }
    body :is(.package-card-badge, .service-card-badge) { box-sizing: border-box; max-width: calc(100% - 24px); white-space: normal; overflow-wrap: anywhere; }
    body :is(.package-card-badge, .service-card-badge) {
        position: static !important;
        transform: none !important;
        align-self: flex-start;
        max-width: 100%;
        margin: 0 0 12px;
        border-radius: 12px;
        line-height: 1.4;
        font-size: 12px;
    }
    body :is(main, section, footer) :is([class$="-container"], [class$="_container"], [class$="-hero-content"]) {
        box-sizing: border-box;
        max-width: 100%;
    }
    body :is(main, section, footer) :is([class$="-layout"], [class$="-grid"]) > * { min-width: 0; }
    body :is(main, section, footer) :is(h1, h2, h3, h4, p, a, li) { overflow-wrap: anywhere; }
    body :is(.post-body, .single-service-content-text, .page-content, .news-body, .package-description, .history-content-text) {
        min-width: 0;
        font-size: 16px;
        line-height: 1.75;
    }
    body :is(main, section, footer) img { max-width: 100%; }
    body :is(main, section) :is(iframe, video) { max-width: 100%; }
    body :is(main, section) figure { max-width: 100%; margin-left: 0; margin-right: 0; }
    body :is(main, section) :is(table, pre) { display: block; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
    body :is(main, section, footer) :is(.btn, [class$="-btn"], [class$="_btn"]) { box-sizing: border-box; max-width: 100%; }
    body .header_mobile_logo { min-width: 0; max-width: calc(100% - 56px); }
    body .header_mobile_logo img { max-width: 100%; height: auto; }
    body .header_mobile_toggle { flex-shrink: 0; width: 44px; height: 44px; padding: 11px 8px; }
    body #cookie-notice { box-sizing: border-box; max-height: 50vh; max-height: 50dvh; overflow-y: auto; }
    body .modal-overlay { box-sizing: border-box; padding: 12px; }
    body .modal-container { box-sizing: border-box; margin: 0; max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); }
    body :is(input, select, textarea) { box-sizing: border-box; max-width: 100%; font-size: 16px; }
    body .modal-content :is(input, select, textarea),
    body .form-group :is(input, select, textarea) { font-size: 16px; }
}
@media (max-width: 600px) {
    body .services-archive .services-grid { grid-template-columns: minmax(0, 1fr); }
    body .services-archive .service-card-title { font-size: 16px; line-height: 1.5; }
    body .services-archive .service-card-price { font-size: 14px; }
    body :is(.prices-packages-grid, .popular-services-grid) { grid-template-columns: minmax(0, 1fr); }
    body .prices-packages-grid .prices-packages-grid { grid-template-columns: minmax(0, 1fr); }
    body :is(.prices-packages-grid, .popular-services-grid) > * { min-width: 0; }
    body .service-card-tag { box-sizing: border-box; max-width: calc(100% - 16px); white-space: normal; overflow-wrap: anywhere; }
    body :is(main, section) :is([class$="-container"], [class$="_container"]) { width: 100%; padding-left: 16px; padding-right: 16px; }
    body :is(main, section) [style*="grid-template-columns" i] { grid-template-columns: minmax(0, 1fr) !important; gap: 14px !important; }
    body :is(main, section) [style*="grid-template-columns" i] > * { box-sizing: border-box; min-width: 0 !important; max-width: 100%; grid-column: auto !important; grid-row: auto !important; }
    body :is(main, section) .wp-block-columns { flex-direction: column; flex-wrap: wrap !important; }
    body :is(main, section) .wp-block-columns > .wp-block-column { flex-basis: 100% !important; min-width: 0; }
}
