/* Scoped to the search results page; header search remains unchanged. */
.search-page {
    min-width: 0;
    max-width: 100%;
    overflow-wrap: anywhere;
}

@media (max-width: 767px) {
    .romana-search-page {
        padding: 0 15px;
        box-sizing: border-box;
    }

    .romana-search-page .search-page {
        padding: 0;
    }

    .search-page > form {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 12px;
        min-width: 0;
        max-width: 100%;
    }

    .search-page > form > iframe {
        display: none;
    }

    .search-page input[name="q"] {
        box-sizing: border-box;
        flex: 1 1 100%;
        width: 100%;
        min-width: 0;
        max-width: 100%;
        min-height: 44px;
        margin: 0;
        font-size: 16px;
    }

    .search-page .search-detail-button {
        box-sizing: border-box;
        max-width: 100%;
        min-height: 44px;
        margin: 0;
        width: 100%;
        padding: 10px 20px;
        border: 0;
        border-radius: 8px;
        background: #4074a4;
        color: #fff;
        font: inherit;
        font-weight: 600;
        cursor: pointer;
    }

    .search-page .search-result {
        flex-basis: 100%;
    }

    .search-page img {
        max-width: 100%;
        height: auto;
    }

    .search-page .search_item {
        display: flex;
        align-items: flex-start;
        gap: 12px;
        min-width: 0;
        height: auto;
        min-height: 0;
        padding: 16px 0;
    }

    .search-page .item_image {
        flex: 0 0 88px;
        width: 88px;
        box-sizing: border-box;
        margin: 0;
    }

    .search-page .item_content {
        position: static;
        flex: 1 1 0;
        min-width: 0;
        width: auto;
        margin: 0;
        padding: 0;
    }

    .search-page .detail_url_link { font-size: 16px; line-height: 1.4; }
    .search-page .descr-search-item { font-size: 14px; line-height: 1.5; }
}

@media (max-width: 1024px) {
    .romana-search-page .modern-page-navigation {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 8px;
        max-width: 100%;
        margin: 24px 0;
        white-space: normal;
    }

    .romana-search-page .modern-page-title { flex-basis: 100%; }

    .romana-search-page .modern-page-navigation a,
    .romana-search-page .modern-page-current {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        box-sizing: border-box;
        min-width: 44px;
        min-height: 44px;
        padding: 8px;
        margin: 0;
        border: 1px solid #d5e0e8;
        border-radius: 6px;
        font-size: 16px;
        line-height: 1.2;
        text-decoration: none;
    }

    .romana-search-page .modern-page-current { background: #4074a4; color: #fff; }
}

.search-page input:focus-visible,
.search-page a:focus-visible {
    outline: 2px solid #4074a4;
    outline-offset: 3px;
}
