/* Investment page: /inwestycja/{slug}/ and /dom/{slug}/. Values follow the current theme. */

body.page-single {
    background: var(--paper);
    line-height: 1.6;
    color: var(--ink);
}

/* single-inwestycja and single-dom only (single.css); the developer page keeps the shadow. */
.page-investment .site-header {
    box-shadow: none;
}

.page-single .site-footer {
    margin-top: 0;
}

/* The section tabs stay stuck over the footer too, as on the old page: <main> gives no box of its own. */
.page-single main {
    display: contents;
}

.page-single [id] {
    scroll-margin-top: 132px;
}

body.lightbox-open {
    overflow: hidden;
}

/* ---------- Breadcrumb ---------- */

.breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
    margin-bottom: 22px;
}

.breadcrumb a {
    color: var(--muted);
    transition: color 0.15s ease;
}

.breadcrumb a:hover {
    color: var(--red);
}

.breadcrumb__sep {
    color: var(--muted-2);
}

.breadcrumb__current {
    color: var(--ink);
}

/* ---------- Hero ---------- */

.hero {
    position: relative;
    height: min(58vh, 500px);
    min-height: 380px;
    overflow: hidden;
}

.hero__image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero__shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(13, 14, 17, 0.58) 0%, rgba(13, 14, 17, 0.18) 30%, rgba(13, 14, 17, 0.1) 48%, rgba(13, 14, 17, 0.8) 100%);
}

.hero__top {
    position: absolute;
    top: 22px;
    left: 0;
    right: 0;
    text-shadow: 0 1px 8px rgba(13, 14, 17, 0.5);
}

.hero__top-row {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.hero .breadcrumb {
    margin-bottom: 0;
}

.hero .breadcrumb,
.hero .breadcrumb a {
    color: rgba(255, 255, 255, 0.82);
}

.hero .breadcrumb a:hover {
    color: #fff;
}

.hero .breadcrumb__current {
    color: #fff;
}

.hero .breadcrumb__sep {
    color: rgba(255, 255, 255, 0.5);
}

.hero__claim {
    flex: none;
    background: none;
    border: 0;
    padding: 0;
    cursor: pointer;
    font: 700 12.5px/1 var(--font-body);
    color: rgba(255, 255, 255, 0.78);
    white-space: nowrap;
}

.hero__claim b {
    color: #fff;
    font-weight: 800;
    border-bottom: 1px solid rgba(255, 255, 255, 0.45);
    padding-bottom: 2px;
}

.hero__claim:hover b {
    border-color: #fff;
}

.claim-panel {
    display: none;
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    z-index: 20;
    width: min(380px, 90vw);
    max-width: 380px;
    box-sizing: border-box;
    margin: 0;
    padding: 18px 20px;
    text-align: left;
    text-shadow: none;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: var(--shadow-card);
}

.claim-panel.is-open {
    display: block;
}

.claim-panel h4 {
    font: 800 14.5px/1.3 var(--font-head);
    margin: 0 0 7px;
}

.claim-panel p {
    font: 500 12.5px/1.6 var(--font-body);
    color: var(--muted);
    margin: 0 0 14px;
    text-wrap: pretty;
}

.claim-panel__button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 42px;
    padding: 0 18px;
    background: var(--ink);
    color: #fff;
    border: 0;
    border-radius: var(--radius);
    font: 800 11.5px/1 var(--font-body);
    letter-spacing: 0.07em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.15s ease;
}

.claim-panel__button:hover {
    background: var(--red);
    color: #fff;
}

.hero__archived {
    margin-top: 10px;
}

.hero__archived span {
    display: inline-flex;
    font: 800 11px/1 var(--font-body);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    background: var(--ink);
    color: #fff;
    padding: 8px 12px;
    border-radius: 5px;
    text-shadow: none;
}

.hero__bottom {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding-bottom: 30px;
    color: #fff;
    text-shadow: 0 1px 12px rgba(13, 14, 17, 0.45);
}

.hero__row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}

.hero__title {
    font-family: var(--font-head);
    font-size: clamp(30px, 3.6vw, 46px);
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.06;
    color: #fff;
    margin: 0;
}

.hero__address {
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14.5px;
    color: rgba(255, 255, 255, 0.88);
}

.hero__address span {
    color: inherit;
}

.hero__address svg {
    width: 15px;
    height: 15px;
    flex: none;
}

.hero__claim-mobile {
    display: none;
    font: 700 12px/1.5 var(--font-body);
    color: rgba(255, 255, 255, 0.78);
}

.hero__claim-mobile b {
    color: #fff;
    font-weight: 800;
    border-bottom: 1px solid rgba(255, 255, 255, 0.45);
    padding-bottom: 2px;
    white-space: nowrap;
}

/* Heart button (favourites) in the top right corner, over the global .favorite-button-container rules. */
.page-investment .hero .favorite-button-container {
    position: absolute;
    top: 64px;
    right: max(32px, calc((100% - var(--container)) / 2 + 32px));
    z-index: 6;
}

.page-investment .hero .favorite-button {
    position: static;
    width: 44px !important;
    height: 44px !important;
    border-radius: 50% !important;
    border: 0 !important;
    background: rgba(255, 255, 255, 0.94) !important;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 !important;
    margin: 0;
    font-size: 0 !important;
    line-height: 1;
    color: var(--ink);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.14) !important;
    transition: color 0.15s ease, transform 0.15s ease;
}

.page-investment .hero .favorite-button:hover {
    color: var(--red);
    transform: scale(1.08);
}

.page-investment .hero .favorite-button svg {
    width: 20px !important;
    height: 20px !important;
}

.page-investment .hero .favorite-button .bi-heart-fill {
    color: var(--red);
}

/* Rating and "Dodaj opinię" in the hero. */
.rating-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 9px 16px;
    line-height: 1.6;
    box-shadow: var(--shadow-card);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.rating-pill__stars {
    color: #e8a013;
    letter-spacing: 1px;
    font-size: 14px;
}

.rating-pill b {
    font-size: 16px;
    font-weight: 800;
}

.rating-pill__count {
    color: var(--muted);
    font-weight: 600;
    font-size: 13.5px;
}

.hero__ratings {
    display: flex;
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
    flex-wrap: wrap;
}

.hero__ratings-label {
    font: 800 10.5px/1 var(--font-body);
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.72);
}

.hero__ratings-row {
    display: flex;
    align-items: stretch;
    gap: 8px;
    flex-wrap: wrap;
}

.hero .rating-pill {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.28);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    color: #fff;
    box-shadow: none;
    border-radius: 10px;
}

.hero .rating-pill b {
    color: #fff;
}

.hero .rating-pill__count {
    color: rgba(255, 255, 255, 0.78);
}

.hero .rating-pill:hover {
    border-color: rgba(255, 255, 255, 0.55);
    box-shadow: none;
}

.hero__add-review {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.28);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    border-radius: 10px;
    padding: 0 16px;
    color: #fff;
    font: 700 13.5px/1 var(--font-body);
    transition: background 0.15s ease, border-color 0.15s ease;
}

.hero__add-review svg {
    width: 14px;
    height: 14px;
}

.hero__add-review:hover {
    background: rgba(255, 255, 255, 0.26);
    border-color: rgba(255, 255, 255, 0.5);
    color: #fff;
}

/* ---------- Section tabs ---------- */

.section-nav {
    position: sticky;
    top: 77px;
    z-index: 40;
    background: rgba(255, 255, 255, 0.94);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--line);
}

.section-nav__inner {
    display: flex;
    gap: 2px;
    overflow-x: auto;
    scrollbar-width: none;
}

.section-nav__inner::-webkit-scrollbar {
    display: none;
}

.section-nav a {
    flex: none;
    padding: 15px 15px 13px;
    font: 700 14px/1 var(--font-body);
    color: var(--muted);
    border-bottom: 2.5px solid transparent;
    transition: color 0.15s ease, border-color 0.15s ease;
    white-space: nowrap;
}

.section-nav a:hover {
    color: var(--ink);
}

.section-nav a.is-active {
    color: var(--ink);
    border-color: var(--red);
}

/* ---------- Layout and blocks ---------- */

.investment-layout {
    padding-top: 48px;
    padding-bottom: 40px;
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 40px;
    align-items: start;
}

.investment-main {
    min-width: 0;
}

.investment-aside {
    position: sticky;
    top: 140px;
}

.block + .block {
    margin-top: 52px;
    padding-top: 52px;
    border-top: 1px solid var(--line);
}

.block__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 26px;
}

.block__title {
    font-family: var(--font-head);
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.015em;
    line-height: 1.2;
    margin: 0;
    color: var(--ink);
}

.block__count {
    color: inherit;
    font-weight: 700;
}

.block--collapsible > .block__head {
    cursor: pointer;
    user-select: none;
}

.block__toggle {
    flex: none;
    align-self: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1px solid var(--line);
    background: var(--paper);
    color: var(--muted);
    display: grid;
    place-items: center;
    cursor: pointer;
    transition: transform 0.2s ease, color 0.15s ease, border-color 0.15s ease;
}

.block__toggle svg {
    width: 14px;
    height: 14px;
}

.block--collapsible > .block__head:hover .block__toggle {
    border-color: var(--ink);
    color: var(--ink);
}

.block.is-collapsed .block__toggle {
    transform: rotate(-90deg);
}

.block.is-collapsed > *:not(.block__head) {
    display: none !important;
}

.block.is-collapsed > .block__head {
    margin-bottom: 0;
}

/* ---------- Details ---------- */

.specs-table {
    border: 1px solid var(--line);
    border-radius: 10px;
    overflow: hidden;
    margin: 0;
}

.specs-table__row {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 16px;
    padding: 14px 20px;
    font-size: 14.5px;
}

.specs-table__row:nth-child(odd) {
    background: var(--bg);
}

.specs-table dt {
    color: var(--muted);
    font-weight: 600;
}

.specs-table dd {
    font-weight: 700;
    color: var(--ink);
}

.specs-foot {
    position: relative;
    margin-top: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px 24px;
    flex-wrap: wrap;
}

.specs-note {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
    color: var(--muted);
}

.specs-note__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--red);
    flex: none;
}

.specs-note__info {
    display: inline-flex;
    cursor: pointer;
}

.specs-tooltip {
    position: absolute;
    z-index: 100;
    top: calc(100% - 2px);
    left: 0;
    margin: 0;
    max-width: 300px;
    padding: 20px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 10px;
    box-shadow: 0 12px 32px -8px rgba(13, 14, 17, 0.18);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease-in-out;
}

.specs-tooltip p {
    font-size: 15px;
}

.specs-foot:has(.specs-note__info:hover) .specs-tooltip {
    opacity: 1;
}

/* ---------- Gallery ---------- */

.gallery-mosaic {
    display: grid;
    grid-template-columns: 1.9fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 10px;
    aspect-ratio: 16 / 8.4;
}

.gallery-mosaic__cell {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--line);
    background: var(--bg);
    padding: 0;
    cursor: pointer;
}

.gallery-mosaic__cell.is-big {
    grid-row: 1 / 3;
}

.gallery-mosaic__cell img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.gallery-mosaic__cell:hover img {
    transform: scale(1.03);
}

.gallery-mosaic__more {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background: rgba(13, 14, 17, 0.45);
    color: #fff;
    font: 700 14.5px/1 var(--font-body);
}

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 500;
    display: none;
    background: rgba(13, 14, 17, 0.94);
    align-items: center;
    justify-content: center;
}

.lightbox.is-open {
    display: flex;
}

.lightbox__figure {
    margin: 0;
    max-width: min(1100px, 86vw);
    text-align: center;
}

.lightbox__image {
    max-width: 100%;
    max-height: 78vh;
    border-radius: 10px;
    display: block;
    margin: 0 auto;
}

.lightbox__caption {
    margin-top: 14px;
    color: rgba(255, 255, 255, 0.75);
    font: 700 13px/1 var(--font-body);
    letter-spacing: 0.04em;
}

.lightbox__close,
.lightbox__prev,
.lightbox__next {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    border: 0;
    line-height: 1;
    cursor: pointer;
}

.lightbox__close {
    top: 20px;
    right: 24px;
    width: 44px;
    height: 44px;
    font-size: 26px;
}

.lightbox__prev,
.lightbox__next {
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    font-size: 30px;
}

.lightbox__prev {
    left: 26px;
}

.lightbox__next {
    right: 26px;
}

.lightbox__close:hover,
.lightbox__prev:hover,
.lightbox__next:hover {
    background: rgba(255, 255, 255, 0.24);
}

/* Descriptions (.rich-text) are styled in content.css. */

/* ---------- Location map ---------- */
/* Rules of css/main.css of the old theme first, then css/single.css; leaflet.css comes after this file, as there. */

#locationMap {
    height: 500px;
}

#locationMap .map-marker {
    width: 30px;
    height: 30px;
    background: white;
    border: 2px solid red;
    border-bottom-width: 4px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

#locationMap .map-marker svg {
    width: 16px;
    height: 16px;
}

#locationMap a {
    text-decoration: none;
}

.location-map__frame .leaflet-container a {
    color: #0078a8 !important;
}

.page-investment .location-map {
    position: relative;
    aspect-ratio: 16 / 7;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--line);
    margin-bottom: 22px;
}

.page-investment .location-map__frame,
.page-investment .location-map #locationMap {
    position: absolute;
    inset: 0;
    height: 100%;
    width: 100%;
    z-index: 1;
}

.page-investment .location-map__button {
    position: absolute;
    left: 50%;
    bottom: 18px;
    transform: translateX(-50%);
    z-index: 5;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--red);
    color: #fff;
    border: 0;
    border-radius: var(--radius);
    padding: 12px 22px;
    font: 700 13.5px/1 var(--font-body);
    cursor: pointer;
    box-shadow: 0 6px 18px -6px rgba(13, 14, 17, 0.4);
}

.page-investment .location-map__button:hover {
    background: var(--red-dark);
    color: #fff;
}

/* ---------- Developer card ---------- */

.developer-card {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 14px 16px;
    margin: 0 0 14px;
}

.developer-card__logo {
    flex: none;
    width: 46px;
    height: 46px;
    border-radius: 8px;
    background: var(--bg);
    border: 1px solid var(--line);
    display: grid;
    place-items: center;
    font: 800 13px/1 var(--font-head);
    color: var(--red);
    overflow: hidden;
}

.developer-card__logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.developer-card__name {
    font: 700 14px/1.3 var(--font-head);
    display: block;
    color: var(--ink);
}

.developer-card__rating {
    margin-top: 3px;
    font-size: 12.5px;
    color: var(--muted);
    font-weight: 600;
    display: block;
}

.developer-card__stars {
    color: #e8a013;
    letter-spacing: 1px;
}

.developer-card__link {
    margin-left: auto;
    flex: none;
    color: var(--muted);
    font: 700 13px/1 var(--font-body);
}

.developer-card:hover .developer-card__link {
    color: var(--red);
}

/* ---------- Nearby investments ---------- */

.nearby {
    background: var(--bg);
    border-top: 1px solid var(--line);
    padding: 64px 0 84px;
}

.nearby .block__head {
    margin-bottom: 24px;
}

.nearby__empty {
    color: var(--muted);
    font-weight: 600;
}

.offer-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.offer-row {
    display: grid;
    grid-template-columns: 132px minmax(140px, 1fr) 224px auto;
    align-items: center;
    gap: 20px;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding-right: 22px;
    overflow: hidden;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.offer-row:hover {
    box-shadow: var(--shadow-hover);
    border-color: #dad9d4;
}

.offer-row__media {
    position: relative;
    align-self: stretch;
    min-height: 132px;
}

.offer-row__media img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.offer-row.is-archived .offer-row__media {
    filter: grayscale(0.5) opacity(0.9);
}

.offer-row__distance {
    position: absolute;
    left: 12px;
    top: 12px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(13, 14, 17, 0.82);
    color: #fff;
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
    padding: 5px 10px;
    border-radius: 999px;
    font: 700 11.5px/1 var(--font-body);
}

.offer-row__distance svg {
    width: 12px;
    height: 12px;
}

.offer-row__info {
    padding: 12px 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.offer-row__archived {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    font: 800 10px/1 var(--font-body);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 4px 8px;
    border-radius: 4px;
    background: rgba(13, 14, 17, 0.08);
    color: var(--muted);
}

.offer-row__name {
    font-family: var(--font-head);
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -0.01em;
    max-width: 300px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.offer-row__name a {
    color: inherit;
    text-decoration: none;
}

/* In "Inwestycje w pobliżu" the whole card is the link (.inv-nearby of the old theme); on a developer page it is not. */
.nearby .offer-row {
    position: relative;
}

.nearby .offer-row__name a::after {
    content: "";
    position: absolute;
    inset: 0;
}

.offer-row:hover .offer-row__name {
    color: var(--red);
}

.offer-row__location {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--muted);
    font-size: 13px;
    min-width: 0;
}

.offer-row__location svg {
    width: 14px;
    height: 14px;
    flex: none;
    color: var(--muted-2);
}

.offer-row__location span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.offer-row__specs {
    display: flex;
    flex-direction: column;
    padding: 12px 0;
    margin: 0;
    width: 100%;
}

.offer-row__spec {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 24px;
    padding: 5px 0;
}

.offer-row__spec + .offer-row__spec {
    border-top: 1px solid var(--line);
}

.offer-row__specs dt {
    font-size: 13px;
    color: var(--muted);
    white-space: nowrap;
    font-weight: 400;
}

.offer-row__specs dd {
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
    color: var(--ink);
}

.offer-row__actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: stretch;
    margin-left: 6px;
}

.offer-row__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
    padding: 9px 18px;
    font-weight: 700;
    font-size: 13px;
    white-space: nowrap;
    background: var(--red);
    color: #fff;
    border: 1.5px solid var(--red);
    transition: background 0.15s ease;
}

.offer-row__cta:hover {
    background: var(--red-dark);
    border-color: var(--red-dark);
    color: #fff;
}

.nearby .offer-row__cta {
    position: relative;
    z-index: 1;
}

/* ---------- Unavailable (hidden investment) ---------- */

body.is-unavailable {
    overflow: hidden;
}

body.is-unavailable .hero,
body.is-unavailable .section-nav,
body.is-unavailable .investment-layout,
body.is-unavailable .nearby,
body.is-unavailable .site-header {
    filter: blur(4px);
}

.unavailable {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    font-size: 24px;
}

.unavailable__title {
    color: #fff;
}

.unavailable__button {
    background-color: var(--red);
    color: #fff;
    padding: 11px 30px;
    text-align: center;
    margin-top: 16px;
}

.unavailable__button:hover {
    color: #fff;
}

/* ---------- Smaller screens ---------- */

@media (max-width: 1240px) {
    .investment-layout {
        grid-template-columns: 1fr;
        gap: 44px;
    }

    .investment-aside {
        position: static;
        max-width: 520px;
    }
}

@media (max-width: 1160px) {
    .page-single [id] {
        scroll-margin-top: 112px;
    }

    .section-nav {
        top: 60px;
    }
}

@media (max-width: 900px) {
    .specs-tooltip {
        width: 90%;
    }

    .offer-row {
        grid-template-columns: 112px minmax(0, 1fr);
        gap: 4px 16px;
        padding: 0 14px 12px 0;
    }

    .offer-row__media {
        grid-row: 1 / span 3;
        min-height: 132px;
    }

    .offer-row__info {
        padding: 12px 0 0;
        grid-column: 2;
    }

    .offer-row__specs {
        grid-column: 2;
        width: auto;
        padding: 0;
    }

    .offer-row__actions {
        grid-column: 2;
        justify-self: stretch;
        margin-left: 0;
        padding-top: 4px;
    }
}

@media (max-width: 860px) {
    .specs-foot {
        display: block;
    }

    .gallery-mosaic {
        grid-template-columns: 1fr;
        grid-template-rows: none;
        aspect-ratio: auto;
    }

    .gallery-mosaic__cell.is-big {
        grid-row: auto;
        aspect-ratio: 16 / 10;
    }

    .gallery-mosaic__cell:not(.is-big) {
        display: none;
    }
}

@media (max-width: 720px) {
    /* padding-top stays 48px: on the old site a later investment rule overrode the 40px of this breakpoint. */
    .investment-layout {
        padding-bottom: 32px;
    }

    .block__title {
        font-size: 22px;
    }

    .specs-table__row {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .hero {
        min-height: 320px;
        height: 46vh;
    }

    .hero__claim {
        display: none;
    }

    .page-investment .hero .favorite-button-container {
        top: 14px;
        right: 14px;
    }

    .hero__claim-mobile {
        display: inline-block;
        margin-top: 12px;
    }
}

@media (max-width: 640px) {
    .offer-list {
        flex-direction: row;
        align-items: stretch;
        overflow-x: auto;
        overflow-y: hidden;
        scroll-snap-type: x mandatory;
        margin: 0 -20px;
        padding: 4px 20px 14px;
        scroll-padding-left: 20px;
        scrollbar-width: thin;
        scrollbar-color: var(--red) rgba(13, 14, 17, 0.08);
        -webkit-overflow-scrolling: touch;
    }

    .offer-list::-webkit-scrollbar {
        height: 4px;
    }

    .offer-list::-webkit-scrollbar-track {
        background: rgba(13, 14, 17, 0.08);
    }

    .offer-list::-webkit-scrollbar-thumb {
        background: var(--red);
    }

    .offer-list > * {
        flex: 0 0 84%;
        scroll-snap-align: start;
    }

    .offer-row {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        padding: 0;
    }

    .offer-row__media {
        aspect-ratio: 16 / 9;
        min-height: 0;
        flex: none;
    }

    .offer-row__name {
        max-width: none;
        white-space: normal;
    }

    .offer-row__info {
        padding: 14px 16px 0;
    }

    .offer-row__specs {
        padding: 8px 16px 0;
    }

    .offer-row__actions {
        margin-top: auto;
        padding: 14px 16px 16px;
    }

    .offer-row__cta {
        width: 100%;
        box-sizing: border-box;
    }
}

/* ---------- "Zgłoś błąd": link and modal with the report form ----------
   css/main.css of the old theme first, then css/single.css (body.hn-devpage → .page-single, the class of the investment and developer pages), in their order. */

.specs-report-link {
    font-size: 14px !important;
    text-align: right;
    margin-top: 8px;
    cursor: pointer;
}

.specs-report-link:hover {
    color: #db0707;
    fill: #db0707;
    transition: 0.5s;
}

.report-modal,
.report-modal__overlay {
    display: none;
}

.report-modal__content {
    font-size: 14px;
    max-width: 570px;
    width: 100%;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    z-index: 99999;
    border: solid #dbdbdb 1px;
    border-radius: 0;
    padding: 10px 30px;
}

.report-modal__content .is-hidden {
    display: none !important;
}

.report-modal__body form {
    display: flex !important;
    flex-direction: column !important;
}

.report-modal__body .wpcf7-list-item {
    display: block !important;
}

.report-modal__body input {
    width: 100%;
    font-size: 18px;
    padding: 8px 16px;
    margin-top: 24px;
    display: block;
    box-sizing: border-box;
    border: 1px solid #dbdbdb;
}

.report-modal__body select {
    width: 100%;
    font-size: 18px;
    padding: 8px 16px;
    margin-top: 6px;
    border: 1px solid #dbdbdb;
}

.report-modal__body textarea {
    margin-top: 24px;
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #dbdbdb;
    font-size: 18px;
    resize: none;
    padding: 5px !important;
}

.report-modal__body .wpcf7-response-output {
    margin-left: 0 !important;
    margin-top: 5px !important;
}

.report-modal__body .wpcf7-submit {
    background: #fd1929;
    color: #fff;
}

.report-modal h3 {
    text-transform: none !important;
    font-size: 24px !important;
    margin-bottom: 0 !important;
}

.report-modal__body .wpcf7-not-valid-tip {
    color: #fd1929;
}

.report-modal__body .wpcf7-submit:hover {
    background: #db0707;
    transition: 0.5s;
}

.report-modal__top {
    padding-top: 8px;
    padding-bottom: 8px;
    min-height: 26px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.report-modal__overlay {
    background: rgba(0, 0, 0, 0.3);
    z-index: 9000;
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
}

.report-modal__close {
    font-size: 26px;
    font-weight: 700;
    cursor: pointer;
}

.report-modal__body {
    padding: 10px;
}

@media (max-width: 601px) {
    .report-modal__content {
        max-width: 270px;
    }
}

@media (max-width: 290px) {
    .report-modal__content {
        max-width: 210px;
    }
}

/* style.css: forms on single pages were flex rows. */
.page-single .wpcf7-form {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 4%;
}

.page-investment .specs-report-link {
    margin: 0;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 16px;
    border: 1.5px solid var(--line);
    border-radius: 999px;
    background: var(--paper);
    font: 700 12.5px/1 var(--font-body);
    color: var(--muted);
    cursor: pointer;
    transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.page-investment .specs-report-link svg {
    width: 13px;
    height: 13px;
    flex: none;
}

.page-investment .specs-report-link:hover {
    color: var(--red);
    border-color: var(--red);
    background: var(--red-soft);
}

@media (max-width: 860px) {
    .page-investment .specs-foot .specs-report-link {
        margin-top: 12px;
    }
}

.page-investment .report-modal .report-modal__overlay {
    display: block;
}

.page-investment .report-modal__overlay {
    background: rgba(13, 14, 17, 0.6);
}

.page-investment .report-modal__content {
    max-width: 480px;
    width: calc(100% - 32px);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 18px 24px 24px;
    box-shadow: 0 24px 60px -12px rgba(13, 14, 17, 0.28);
}

.page-investment .report-modal__top {
    padding: 0 0 12px;
    border-bottom: 1px solid var(--line);
}

.page-investment .report-modal h3 {
    font: 700 19px/1.3 var(--font-head) !important;
    color: var(--ink);
}

.page-investment .report-modal__close {
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    font-size: 17px;
    font-weight: 400;
    border-radius: 50%;
    color: var(--muted);
    transition: background 0.15s ease, color 0.15s ease;
}

.page-investment .report-modal__close:hover {
    background: var(--bg);
    color: var(--ink);
}

.page-investment .report-modal__body {
    padding: 4px 0 0;
}

.page-investment .report-modal__body input[type="email"],
.page-investment .report-modal__body select,
.page-investment .report-modal__body textarea {
    width: 100%;
    border: 1.5px solid transparent;
    border-radius: var(--radius);
    background: #eeede8;
    padding: 13px 15px !important;
    font: 600 14.5px/1.4 var(--font-body);
    color: var(--ink);
    margin-top: 14px;
    transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.page-investment .report-modal__body input::placeholder,
.page-investment .report-modal__body textarea::placeholder {
    color: var(--muted);
    font-weight: 500;
}

.page-investment .report-modal__body input[type="email"]:focus,
.page-investment .report-modal__body select:focus,
.page-investment .report-modal__body textarea:focus {
    outline: none;
    border-color: var(--red);
    background: var(--paper);
    box-shadow: 0 0 0 3px var(--red-soft);
}

.page-investment .report-modal__body select {
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    padding-right: 40px !important;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236A6D75' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 16px;
}

.page-investment .report-modal__body select:has(option[value=""]:checked) {
    color: var(--muted);
    font-weight: 500;
}

.page-investment .report-modal__body select option {
    color: var(--ink);
}

.page-investment .report-modal__body textarea {
    min-height: 110px;
    resize: none;
}

.page-investment .report-modal__body .wpcf7-submit {
    width: 100%;
    height: 50px;
    border: 0;
    border-radius: var(--radius);
    background: var(--red);
    color: #fff;
    font: 800 13.5px/1 var(--font-body);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
    margin-top: 16px;
    padding: 0;
    transition: background 0.15s ease;
}

.page-investment .report-modal__body .wpcf7-submit:hover {
    background: var(--red-dark);
}

.page-investment .report-modal__body .wpcf7-submit:focus {
    outline: none;
    box-shadow: 0 0 0 3px var(--red-soft);
}

.page-investment .report-modal__body .wpcf7-not-valid-tip {
    color: var(--red);
    font: 600 12px/1.3 var(--font-body);
    margin-top: 4px;
}

.page-investment .report-modal__body .wpcf7-response-output {
    border-radius: var(--radius);
    font: 600 13px/1.5 var(--font-body);
    margin: 12px 0 0 !important;
    padding: 12px 14px;
}

@media (max-width: 601px) {
    .page-investment .report-modal__content {
        max-width: 480px;
    }
}
