/* Shared section controls. Their appearance must not depend on API responses. */
.portal-theme .portal-section-heading {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 12px;
    margin: 0 0 14px;
    font-size: 24px;
    font-weight: 600;
    line-height: 1.3;
}
.portal-section-heading > .portal-section-title { min-width: 0; }
.portal-theme .portal-section-heading > .portal-section-more {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: auto;
    margin: 0;
    padding: 7px 11px;
    position: static;
    border: 1px solid #094575;
    border-radius: 5px;
    background: #094575;
    color: #fff;
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.3;
    text-align: center;
    white-space: nowrap;
    text-decoration: none;
}
.portal-theme .portal-section-heading > .portal-section-more:hover {
    border-color: #063552;
    background: #063552;
    color: #fff;
}
.portal-section-header { align-items: center; row-gap: 10px; margin-bottom: 12px; }
.portal-section-header .portal-section-heading { margin-bottom: 0; }
.portal-theme .portal-section-add { margin: 0; position: static; font-size: 15px; line-height: 1.4; }

/* Existing yellow classifieds and green adoption blocks retain their colors. */
.portal-classifieds-block {
    --classifieds-bg: #f7d11f;
    --classifieds-header: #ffd510;
    --classifieds-title: #b51b13;
    --classifieds-text: #202a36;
    --classifieds-image: #e6c21c;
    background: var(--classifieds-bg);
}
.portal-classifieds-block.zwierzeta-ogl {
    --classifieds-bg: #e5f6ea;
    --classifieds-header: #1f8f4e;
    --classifieds-title: #fff;
    --classifieds-text: #143322;
    --classifieds-image: #c9ebd3;
}
.portal-classifieds-block > .row { margin-left: 0; margin-right: 0; }
.portal-classifieds-block .box-header {
    align-items: center;
    row-gap: 12px;
    padding-top: 14px;
    padding-bottom: 14px;
    border-top: 0;
    border-bottom: 1px solid #ffffff80;
    background: var(--classifieds-header);
}
.portal-classifieds-block .portal-section-heading { margin-bottom: 0; font-size: 23px; }
.portal-classifieds-block .portal-section-header { margin-bottom: 0; }
.portal-classifieds-block .portal-section-title { color: var(--classifieds-title); }
.portal-theme .portal-classifieds-block .portal-section-add {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 14px;
    border: 1px solid #d5c266;
    border-radius: 5px;
    background: #fff;
    color: #094575;
    font-size: 16px;
    font-weight: 500;
}
.portal-theme .zwierzeta-ogl .portal-section-add { border-color: #b5d9c2; color: #146c39; }
.portal-theme .portal-classifieds-block .portal-section-add:hover { background: #f2f5f8; }
.portal-classifieds-grid > [class*="col-"] { display: flex; }
.portal-classifieds-block .ogloszenia-box {
    flex: 1;
    min-width: 0;
    margin-top: 14px;
    padding-bottom: 14px;
    border: 0;
    text-align: center;
}
.portal-classifieds-block .last-box { display: block; color: var(--classifieds-text); }
.portal-classifieds-block .last-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    aspect-ratio: 4 / 3;
    margin-bottom: 8px;
    overflow: hidden;
    border-radius: 4px;
    background: var(--classifieds-image);
}
.portal-classifieds-block .last-wrapper img { display: block; width: 100%; height: 100%; object-fit: contain; }
.portal-classifieds-block .title { color: var(--classifieds-text); font-size: 15px; font-weight: 500; line-height: 1.4; overflow-wrap: anywhere; }
.portal-classifieds-block .last-box:hover .title { text-decoration: underline; }
.portal-classifieds-mobile { display: none; }
.portal-classifieds-categories { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 12px; padding-bottom: 16px; border-top: 1px solid #c8ad32; }
.portal-theme .portal-classifieds-block .portal-category-link { display: inline-flex; align-items: center; margin: 0; padding: 7px 10px; border: 1px solid #d5c266; background: #fff; color: #094575; font-size: 13px; font-weight: 500; line-height: 1.35; }
.portal-theme .portal-classifieds-block .portal-category-link:hover { background: #094575; border-color: #094575; color: #fff; }
.portal-company-block .nf-wrapper { display: flex; align-items: center; justify-content: center; padding: 8px; border-radius: 4px; }
.portal-company-block > .portal-section-header { margin: 0 0 12px; }
.portal-company-block > .portal-section-header > [class*="col-"] { padding-left: 0; padding-right: 0; }
.portal-company-block .nf-wrapper img { position: static; width: 100%; max-height: 100%; height: auto; object-fit: contain; }
.portal-company-block .nf-box h4 { line-height: 1.4; overflow-wrap: anywhere; }
@media (min-width: 768px) {
    .portal-classifieds-grid > .md-hidden { display: flex; }
}
@media (max-width: 767.98px) {
    .portal-theme .portal-section-heading { font-size: 21px; }
    .portal-theme .portal-section-heading > .portal-section-more { font-size: 13px; padding: 7px 10px; }
    .portal-section-header > .text-right, .portal-classifieds-block .box-header > .text-right { text-align: left !important; }
    .portal-classifieds-has-mobile > .portal-classifieds-grid { display: none; }
    .portal-classifieds-mobile { display: block; padding-top: 12px; padding-bottom: 8px; }
    .portal-classifieds-mobile .adbox { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 94px; margin-bottom: 8px; padding: 8px; border-radius: 4px; background: #ffffff80; }
    .portal-classifieds-mobile .adbox .last-wrapper { flex: 0 0 108px; width: 108px; height: 81px; aspect-ratio: auto; margin: 0; }
    .portal-classifieds-mobile .adbox .title { flex: 1; min-width: 0; font-size: 16px; line-height: 1.4; }
}
@media (max-width: 480px) {
    .portal-theme .portal-company-block .portal-section-add { display: inline-flex; }
}
