/* Shared by the Persian, English and Arabic public layouts. */
main, .page, .container, .container-fluid, .row > *, fieldset { min-width: 0; }
img, video, iframe, embed, object { max-width: 100%; }
input, select, textarea { max-width: 100%; }
:where(p, h1, h2, h3, h4, h5, h6, a, label, li, dd) { overflow-wrap: anywhere; }
#content :where(img, video) { height: auto; }
#content table { display: block; width: 100%; max-width: 100%; overflow-x: auto; }
#content pre { max-width: 100%; white-space: pre-wrap; overflow-wrap: anywhere; }

@media (max-width: 767px) {
    .site-header .language-switch a { width: 44px; height: 44px; font-size: 12px; }
    .site-header .nav-toggle { width: 44px; height: 44px; flex-shrink: 0; }
    .legacy-site .container { max-width: 100%; padding-inline: 16px; }
    .legacy-site .row { margin-inline: 0; }
    .legacy-site .breadcrumbs-custom-path { display: flex; flex-wrap: wrap; gap: 6px; margin-inline: 0; padding-inline: 0; }
    .navbar-brand, .logo-header { max-width: 45%; margin-inline: 0; }
    .navbar-brand img, .logo-header img { max-width: 100%; height: auto; }
    .menu-links { flex-wrap: wrap; gap: 8px; }
    .pagination { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; padding-inline: 0; }
    :where(input.form-control, select.form-control, textarea.form-control, .form-select) { font-size: 16px; }
    :where(.btn, .button) { max-width: 100%; white-space: normal; min-height: 44px; }
    .gallery-images, .placeholder { width: 100%; margin-inline: 0; }
    .small-videos, .small-photos { min-width: 0; }
    .small-videos > *, .small-photos > * { min-width: 0; }
    .breadcrumbs-custom-title { font-size: clamp(20px, 5vw, 28px); padding-inline: 0; }
    .modal-background .modal { max-width: calc(100vw - 24px) !important; min-height: 0 !important; }
    .h_iframe-aparat_embed_frame iframe { min-height: 0 !important; aspect-ratio: 16 / 9; }
}

@media (max-width: 991px) {
    .legacy-site .post-classic-panel { max-width: 100%; margin-inline: 0; flex-wrap: wrap; }
}
