/* One portal listing-card system for public lists, home, accounts and recommendations.
   Excludes primary detail headers, information/profile tiles and advertising cards. */
body.portal-public-page :is(.portal-listing-card,.card-company:has(.relatedAdsInfo)):not(.portal-detail-summary) {
    container: portal-card / inline-size;
    min-width: 0; background: #fff; color: #173b30;
    border: 1px solid #b8e7d6; border-left: 3px solid #0bd59c !important;
    border-radius: 14px; box-shadow: 0 3px 14px #022f2203;
    transition: border-color .15s, box-shadow .15s;
}
body.portal-public-page :is(.portal-listing-card,.card-company:has(.relatedAdsInfo)):not(.portal-detail-summary):hover {
    border-color: #83d8b9; border-left-color: #0bd59c; box-shadow: 0 8px 28px #022f220a;
}
body.portal-public-page .portal-listing-card:not(.portal-detail-summary) > .card-body { padding: 27px; min-width: 0; color: #557368; font-size: 15px; line-height: 1.8; }
body.portal-public-page .portal-listing-card:not(.portal-detail-summary) > .card-body > .row { flex-direction: row; align-items: flex-start; gap: 0; }
body.portal-public-page .portal-listing-card:not(.portal-detail-summary) > .card-body > .row > .col { flex: 1 1 0; min-width: 0; color: #557368; font-size: 15px; line-height: 1.8; }
body.portal-public-page .portal-listing-card:not(.portal-detail-summary) .logo-col-desktop-portal { display: flex; flex: 0 0 105px; flex-direction: column-reverse; justify-content: flex-end; width: 105px; gap: 14px; }
body.portal-public-page .portal-listing-card:not(.portal-detail-summary) .logo-col-desktop-portal > .row { margin: 0; }
body.portal-public-page .portal-listing-card:not(.portal-detail-summary) .logo-col-desktop-portal > .row > .col { padding: 0; margin: 0 !important; }
body.portal-public-page .portal-listing-card:not(.portal-detail-summary) .portal-action-container-desktop { display: flex; flex-wrap: wrap; width: auto; gap: 2px; align-items: center; }
body.portal-public-page .portal-listing-card:not(.portal-detail-summary) .btn-portal-actions { display: inline-flex; justify-content: center; align-items: center; width: 32px; min-width: 32px; min-height: 36px; margin: 0; padding: 3px; border: 0; background: transparent; }
body.portal-public-page .portal-listing-card:not(.portal-detail-summary) :is(.company_pic_extra_big,.company_pic_extra_big_external) { width: 64px; height: 64px; min-width: 0; max-width: 64px; max-height: 64px; margin: 0; border-radius: 9px; object-fit: contain; }
body.portal-public-page .portal-listing-card:not(.portal-detail-summary) .contact_pic_extra_big { width: 64px; height: 64px; max-width: 64px; max-height: 64px; margin: 0; border: 1px solid #dceee7; border-radius: 50%; object-fit: cover; }
body.portal-public-page .portal-listing-card:not(.portal-detail-summary) :is(.company_pic_small,.company_pic_small_external,.contact_pic_small) { width: 44px; height: 44px; margin: 0; object-fit: contain; border-radius: 7px; }
body.portal-public-page .portal-listing-card:not(.portal-detail-summary) .contact_pic_small { border-radius: 50%; object-fit: cover; }
body.portal-public-page .portal-listing-card:not(.portal-detail-summary) > .card-body > .row > .col > .mb-1:first-child { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
body.portal-public-page .portal-listing-card:not(.portal-detail-summary) > .card-body > .row > .col > .mb-1:first-child > .d-inline-block { min-width: 0; }
body.portal-public-page .portal-listing-card:not(.portal-detail-summary) > .card-body > .row > .col > .mb-1:first-child > .d-inline-block:not(.float-end) { flex: 1 1 0; }
body.portal-public-page .portal-listing-card:not(.portal-detail-summary) > .card-body > .row > .col > .mb-1:first-child > .float-end { flex: 0 0 auto; order: 2; }
body.portal-public-page .portal-listing-card:not(.portal-detail-summary) :is(.portal-title,.mb-1 > .d-inline-block > .fw-semibold) { color: #173b30; font-size: 19px; font-weight: 600; line-height: 1.5; letter-spacing: -.45px; margin-bottom: 9px; overflow-wrap: anywhere; }
body.portal-public-page .portal-listing-card:not(.portal-detail-summary) :is(.portal-title,.mb-1 > .d-inline-block > .fw-semibold) a { color: inherit; }
body.portal-public-page .portal-listing-card:not(.portal-detail-summary) :is(.portal-title,.mb-1 > .d-inline-block > .fw-semibold) a:hover { color: #067556; }
body.portal-public-page .portal-listing-card:not(.portal-detail-summary) .fs-6 { color: #557368; font-size: 14px !important; }
body.portal-public-page .portal-listing-card:not(.portal-detail-summary) .comp_img_portal { width: 16px; height: 16px; }
body.portal-public-page .portal-listing-card:not(.portal-detail-summary) .pe-5 { padding-right: 0 !important; font-size: 15px; line-height: 1.8; overflow-wrap: anywhere; }
body.portal-public-page :is(.portal-listing-card,.card-company:has(.relatedAdsInfo)):not(.portal-detail-summary) .badge {
    display: inline-block; border: 0; border-radius: 5px; background: #effbf7 !important; color: #067556 !important;
    padding: 4px 9px; margin: 4px 2px 0 0; font-size: 13px !important; font-weight: 400 !important; line-height: 1.6; white-space: normal;
}
body.portal-public-page .portal-listing-card .badge:empty { display: none !important; }
body.portal-public-page .portal-listing-card:not(.portal-detail-summary) .topjob-badge { position: static; display: inline-flex; width: fit-content; padding: 4px 8px; border-radius: 5px; background: #d8f8ec; color: #04563d; font-size: 12px; font-weight: 500; line-height: 1.6; white-space: nowrap; }
body.portal-public-page .portal-listing-card:not(.portal-detail-summary) .stepstone-btn { display: inline-flex; align-items: center; min-height: 44px; padding: 10px 13px; margin-top: 10px; border: 0; border-radius: 6px; background: #effbf7; color: #067556; font-size: 14px; font-weight: 500; line-height: 1.6; text-decoration: none; }
body.portal-public-page .portal-listing-card:not(.portal-detail-summary) .stepstone-btn:hover { background: #ddf7ec; color: #045b42; }
/* Wide rows on home and own-ad views preserve the reference card's horizontal layout. */
body.portal-home-page .portal-home-cards { grid-template-columns: minmax(0, 1fr); }
body.portal-public-page .row > .col:has(> .portal-listing-card) { flex: 0 0 100%; width: 100%; max-width: 100%; }
/* Existing compact recommendation markup keeps its original links and content. */
body.portal-public-page .card-company:has(.relatedAdsInfo) > .card-body { padding: 21px; color: #557368; font-size: 14px; line-height: 1.8; }
body.portal-public-page .card-company .relatedAdsInfo { padding-left: 12px !important; min-width: 0; }
body.portal-public-page .card-company .relatedAdsInfo .fs-5 { color: #173b30; font-size: 17px !important; line-height: 1.5; }
body.portal-public-page .card-company .relatedAdsInfo .fs-5 a { color: inherit; overflow-wrap: anywhere; }
body.portal-public-page .card-company .relatedAdsInfo .fs-6 { color: #557368; font-size: 14px !important; }
@container portal-card (max-width: 480px) {
    body.portal-public-page .portal-listing-card:not(.portal-detail-summary) > .card-body { padding: 20px; font-size: 14px; }
    body.portal-public-page .portal-listing-card:not(.portal-detail-summary) .logo-col-desktop-portal { flex-basis: 66px; width: 66px; }
    body.portal-public-page .portal-listing-card:not(.portal-detail-summary) :is(.company_pic_extra_big,.company_pic_extra_big_external,.contact_pic_extra_big) { width: 44px; height: 44px; max-width: 44px; max-height: 44px; }
    body.portal-public-page .portal-listing-card:not(.portal-detail-summary) :is(.portal-title,.mb-1 > .d-inline-block > .fw-semibold) { font-size: 18px; }
    body.portal-public-page .portal-listing-card:not(.portal-detail-summary) > .card-body > .row > .col { font-size: 14px; }
    body.portal-public-page .portal-listing-card:not(.portal-detail-summary) .pe-5 { font-size: 14px; }
    body.portal-public-page .portal-listing-card:not(.portal-detail-summary) > .card-body > .row > .col > .mb-1:first-child { flex-wrap: wrap; gap: 8px; }
    body.portal-public-page .portal-listing-card:not(.portal-detail-summary) .float-end:has(img[alt="Stepstone"]) { flex-basis: 100% !important; text-align: right; }
}
@media (max-width: 767px) {
    body.portal-public-page .portal-listing-card:not(.portal-detail-summary) > .card-body { padding: 20px; }
    body.portal-public-page .portal-listing-card:not(.portal-detail-summary) .w-75 { width: auto !important; }
}
@media (prefers-reduced-motion: reduce) {
    body.portal-public-page :is(.portal-listing-card,.card-company:has(.relatedAdsInfo)):not(.portal-detail-summary) { transition: none; }
}
