/* ==========================================================================
   Apartmani Mladenka – "Maestral" design
   Light, airy seaside look: cool white, Adriatic teal, arched photos.
   No images are referenced from this file, so it can be served from any path.
   ========================================================================== */

:root {
    --bg: #FAFCFD;
    --tint: #EAF4F6;
    --white: #FFFFFF;
    --ink: #10303D;
    --text: #36525E;
    --muted: #4F6B77;
    --line: #C9DBE1;
    --accent: #0B6F7E;
    --accent-dark: #095B68;
    --success: #1F7A4D;
    --success-bg: #E6F4EC;
    --error: #B23B2E;
    --error-bg: #FBEAE7;
    --font-display: Jost, "Century Gothic", "Segoe UI", sans-serif;
    --font-body: Figtree, "Segoe UI", system-ui, -apple-system, sans-serif;
    --radius: 24px;
    --radius-sm: 16px;
    --gutter: clamp(20px, 5.5vw, 80px);
    --section: clamp(64px, 8vw, 112px);
    --shadow: 0 24px 48px rgba(16, 48, 61, 0.14);
}

/* ---------- Base ---------- */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--accent);
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

a:hover {
    color: var(--ink);
}

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: 4px;
}

h1, h2, h3, h4 {
    margin: 0;
    font-family: var(--font-display);
    font-weight: 300;
    line-height: 1.12;
    letter-spacing: -0.01em;
    color: var(--ink);
    text-wrap: balance;
}

p {
    margin: 0 0 1em;
}

p:last-child {
    margin-bottom: 0;
}

ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

[hidden] {
    display: none !important;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: absolute;
    left: 16px;
    top: -60px;
    z-index: 100;
    padding: 10px 18px;
    border-radius: 999px;
    background: var(--ink);
    color: var(--white);
    text-decoration: none;
}

.skip-link:focus {
    top: 12px;
    color: var(--white);
}

.no-scroll {
    overflow: hidden;
}

/* ---------- Layout helpers ---------- */

.container {
    width: 100%;
    max-width: calc(1200px + 2 * var(--gutter));
    margin-inline: auto;
    padding-inline: var(--gutter);
}

.container--narrow {
    max-width: calc(820px + 2 * var(--gutter));
}

.section {
    padding-block: var(--section);
}

.section--tint {
    background: var(--tint);
}

.section--flush-top {
    padding-top: 0;
}

.section__head {
    max-width: 860px;
    margin-bottom: clamp(36px, 4vw, 56px);
}

.section__head--center {
    max-width: 720px;
    margin-inline: auto;
    text-align: center;
}

.section__head .title {
    margin-top: 16px;
}

.section__head p {
    margin-top: 16px;
}

/* ---------- Typography ---------- */

.eyebrow {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.5;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--accent);
}

.eyebrow--line {
    display: flex;
    align-items: center;
    gap: 14px;
}

.eyebrow--line::before {
    content: "";
    flex: none;
    width: 36px;
    height: 1.5px;
    background: currentColor;
}

.display {
    font-size: clamp(40px, 5vw, 72px);
    line-height: 1.06;
    letter-spacing: -0.015em;
}

.title {
    font-size: clamp(32px, 3.5vw, 50px);
}

.title--sm {
    font-size: clamp(28px, 2.8vw, 40px);
    line-height: 1.15;
}

.subtitle {
    font-size: clamp(24px, 2.2vw, 32px);
    font-weight: 400;
    line-height: 1.2;
}

.lead {
    font-size: 19px;
    line-height: 1.6;
}

.signature {
    margin-top: 28px;
    font-family: var(--font-display);
    font-style: italic;
    font-weight: 300;
    font-size: 26px;
    line-height: 1.3;
    color: var(--accent);
}

.prose p {
    max-width: 68ch;
}

.pre-line {
    white-space: pre-line;
}

/* ---------- Buttons and links ---------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 52px;
    padding: 10px 30px;
    border: 1.5px solid transparent;
    border-radius: 999px;
    font-family: var(--font-body);
    font-size: 16px;
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.btn--primary {
    background: var(--accent);
    color: var(--white);
}

.btn--primary:hover {
    background: var(--accent-dark);
    color: var(--white);
}

.btn--outline {
    border-color: var(--accent);
    color: var(--accent);
    background: transparent;
}

.btn--outline:hover {
    background: var(--accent);
    color: var(--white);
}

.btn--dark {
    border-color: var(--ink);
    color: var(--ink);
    background: transparent;
}

.btn--dark:hover {
    background: var(--ink);
    color: var(--white);
}

.btn--sm {
    min-height: 46px;
    padding: 8px 24px;
    font-size: 15px;
}

.btn-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 28px;
}

.link-arrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    font-weight: 600;
    color: var(--ink);
    text-decoration: none;
}

.link-arrow svg {
    flex: none;
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform 0.2s ease;
}

.link-arrow:hover svg {
    transform: translateX(4px);
}

.link-arrow--accent {
    color: var(--accent);
    font-size: 15px;
}

/* ---------- Header ---------- */

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(250, 252, 253, 0.94);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(201, 219, 225, 0.6);
}

.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px 32px;
    min-height: 84px;
}

.brand {
    display: flex;
    flex-direction: column;
    color: var(--ink);
    text-decoration: none;
}

.brand:hover {
    color: var(--ink);
}

.brand__name {
    font-family: var(--font-display);
    font-size: 25px;
    font-weight: 500;
    line-height: 1.15;
    white-space: nowrap;
}

.brand__tag {
    font-size: 11px;
    font-weight: 600;
    line-height: 1.7;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--muted);
    white-space: nowrap;
}

.site-header__panel {
    display: flex;
    align-items: center;
    gap: 16px 28px;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 0 clamp(16px, 2vw, 30px);
    font-size: 16px;
    font-weight: 500;
}

.site-nav > li {
    position: relative;
}

.site-nav a {
    display: block;
    padding: 11px 0;
    color: var(--ink);
    text-decoration: none;
    white-space: nowrap;
}

.site-nav > li > a:hover,
.site-nav > li > a.is-active {
    color: var(--accent);
    box-shadow: inset 0 -2px 0 var(--accent);
}

.submenu {
    position: absolute;
    left: -20px;
    top: 100%;
    min-width: 200px;
    padding: 10px;
    border-radius: var(--radius-sm);
    background: var(--white);
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
}

.has-sub:hover .submenu,
.has-sub:focus-within .submenu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.submenu a {
    padding: 10px 14px;
    border-radius: 10px;
}

.submenu a:hover {
    background: var(--tint);
    color: var(--accent);
}

.lang-switch {
    display: flex;
    gap: 4px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.08em;
}

.lang-switch a {
    display: block;
    padding: 12px 6px;
    color: var(--muted);
    text-decoration: none;
}

.lang-switch a:hover {
    color: var(--accent);
}

.lang-switch a.is-active {
    color: var(--ink);
    box-shadow: inset 0 -2px 0 var(--ink);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    width: 48px;
    height: 48px;
    padding: 12px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    height: 2px;
    border-radius: 2px;
    background: var(--ink);
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-open .nav-toggle span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.nav-open .nav-toggle span:nth-child(2) {
    opacity: 0;
}

.nav-open .nav-toggle span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

.site-header__panel .btn {
    white-space: nowrap;
}

/* Narrower desktop screens: a slightly more compact header so the longest
   (Italian and German) labels still fit on one line. */
@media (min-width: 1200px) and (max-width: 1399px) {
    .brand__name {
        font-size: 22px;
    }

    .site-header__panel {
        gap: 16px 18px;
    }

    .site-nav {
        gap: 0 16px;
        font-size: 15px;
    }

    .site-header__panel .btn {
        padding-inline: 18px;
    }
}

@media (max-width: 1199px) {
    .site-header__inner {
        min-height: 72px;
    }

    .nav-toggle {
        display: flex;
    }

    .site-header__panel {
        display: none;
        position: absolute;
        left: 0;
        right: 0;
        top: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
        max-height: calc(100vh - 72px);
        overflow-y: auto;
        padding: 12px var(--gutter) 28px;
        background: var(--bg);
        border-bottom: 1px solid var(--line);
        box-shadow: 0 24px 32px rgba(16, 48, 61, 0.08);
    }

    .nav-open .site-header__panel {
        display: flex;
    }

    .site-nav {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        font-size: 18px;
    }

    .site-nav > li {
        border-bottom: 1px solid var(--line);
    }

    .site-nav a {
        padding: 14px 0;
    }

    .site-nav > li > a:hover,
    .site-nav > li > a.is-active {
        box-shadow: none;
    }

    .submenu {
        position: static;
        min-width: 0;
        padding: 0 0 10px 16px;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
        opacity: 1;
        visibility: visible;
        transform: none;
        font-size: 16px;
    }

    .submenu a {
        padding: 9px 0;
        color: var(--text);
    }

    .submenu a:hover {
        background: transparent;
    }

    .lang-switch {
        gap: 12px;
    }

    .site-header__panel .btn {
        align-self: flex-start;
    }
}

@media (max-width: 400px) {
    .brand__name {
        font-size: 21px;
    }

    .brand__tag {
        font-size: 10px;
    }
}

/* ---------- Hero (home) ---------- */

.hero {
    padding-block: clamp(32px, 4vw, 48px) clamp(64px, 7vw, 104px);
}

.hero__grid {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    align-items: center;
    gap: clamp(40px, 5vw, 64px);
}

.hero__copy {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.hero__copy .display {
    margin: 24px 0;
}

.hero__copy .lead {
    max-width: 520px;
}

.hero__copy .btn-row {
    margin-top: 36px;
}

.hero__media {
    position: relative;
    width: 100%;
    max-width: 560px;
    margin-inline: auto;
    container-type: inline-size;
}

.hero__arch {
    margin-left: 24%;
    aspect-ratio: 426 / 600;
    overflow: hidden;
    border-radius: var(--radius);
    border-radius: 38cqw 38cqw var(--radius) var(--radius);
    background: var(--tint);
}

.hero__arch img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 55% center;
}

.hero__inset {
    position: absolute;
    left: 0;
    bottom: 9%;
    width: 46%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border: 8px solid var(--bg);
    border-radius: 22px;
    background: var(--tint);
    box-shadow: var(--shadow);
}

.hero__inset img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@media (max-width: 899px) {
    .hero__grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .hero__media {
        max-width: 460px;
    }
}

/* ---------- Facts strip ---------- */

.facts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr));
    gap: 28px 32px;
    padding-bottom: clamp(56px, 6vw, 96px);
}

.fact {
    border-top: 1px solid var(--line);
    padding-top: 28px;
}

.fact__value {
    font-family: var(--font-display);
    font-weight: 300;
    font-size: 44px;
    line-height: 1.1;
    color: var(--ink);
}

.fact__label {
    margin-top: 6px;
    font-size: 15px;
}

/* ---------- Split (text + picture) ---------- */

.split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
    align-items: center;
    gap: clamp(36px, 6vw, 72px);
}

.split--top {
    align-items: start;
}

.split__media {
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--tint);
}

.split__media img {
    width: 100%;
    height: 100%;
    min-height: 320px;
    max-height: 580px;
    object-fit: cover;
}

.split__body .title {
    margin: 18px 0 24px;
}

@media (max-width: 899px) {
    .split {
        grid-template-columns: minmax(0, 1fr);
    }

    .split__media {
        max-width: 640px;
    }
}

/* ---------- Apartment cards ---------- */

.apt-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(400px, 100%), 1fr));
    gap: clamp(24px, 3vw, 40px);
}

.apt-card {
    container-type: inline-size;
}

.apt-card__inner {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 16px;
    border-radius: 32px;
    border-radius: 50cqw 50cqw 32px 32px;
    background: var(--white);
}

.section:not(.section--tint) .apt-card__inner {
    background: var(--tint);
}

.apt-card__media {
    display: block;
    aspect-ratio: 8 / 5;
    overflow: hidden;
    border-radius: 20px;
    border-radius: calc(50cqw - 16px) calc(50cqw - 16px) 20px 20px;
    background: var(--tint);
}

.apt-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 70%;
    transition: transform 0.5s ease;
}

.apt-card__media:hover img {
    transform: scale(1.04);
}

.apt-card__body {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    padding: 28px 20px 20px;
}

.apt-card__top {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 4px 16px;
}

.apt-card__title {
    font-size: 32px;
    font-weight: 400;
    line-height: 1.15;
}

.apt-card__title a {
    color: inherit;
    text-decoration: none;
}

.apt-card__meta {
    font-size: 15px;
    font-weight: 600;
    color: var(--accent);
}

.apt-card__text {
    margin: 12px 0 18px;
}

.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
    font-size: 14px;
    font-weight: 500;
    color: var(--ink);
}

.chips li {
    padding: 6px 14px;
    border-radius: 999px;
    background: var(--tint);
}

.section:not(.section--tint) .chips li {
    background: var(--white);
}

.apt-card .btn-row {
    margin-top: auto;
    gap: 12px;
}

.apt-card .btn {
    min-height: 48px;
    padding: 8px 26px;
    font-size: 15px;
}

/* ---------- Amenities and distances ---------- */

.info-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    align-items: start;
    gap: clamp(40px, 6vw, 88px);
}

.info-grid .title--sm {
    margin: 16px 0 32px;
}

.checklist {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
    gap: 14px 32px;
    color: var(--ink);
    font-weight: 500;
}

.checklist--single {
    grid-template-columns: minmax(0, 1fr);
}

.checklist li {
    display: flex;
    gap: 12px;
}

.checklist li::before {
    content: "";
    flex: none;
    width: 20px;
    height: 20px;
    margin-top: 4px;
    background: var(--accent);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12.5l5 5L20 6.5'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12.5l5 5L20 6.5'/%3E%3C/svg%3E") center / contain no-repeat;
}

.not-available {
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid var(--line);
    font-size: 15px;
    color: var(--muted);
}

.not-available strong {
    color: var(--ink);
    font-weight: 600;
}

.panel {
    padding: clamp(24px, 3vw, 40px);
    border-radius: 28px;
    background: var(--tint);
}

.section--tint .panel {
    background: var(--white);
}

.distance-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr));
    gap: 0 32px;
    margin-top: 12px;
    color: var(--ink);
}

.distance-list li {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 11px 0;
    border-bottom: 1px solid var(--line);
}

.distance-list span:last-child {
    font-weight: 600;
    white-space: nowrap;
}

.panel__note {
    margin-top: 16px;
    font-size: 15px;
}

@media (max-width: 899px) {
    .info-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* ---------- Feature cards (destination / tours / gallery teasers) ---------- */

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
    gap: 32px;
}

.feature-card {
    display: flex;
    flex-direction: column;
    color: var(--text);
    text-decoration: none;
}

.feature-card:hover {
    color: var(--text);
}

.feature-card__media {
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--tint);
}

.feature-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.feature-card:hover .feature-card__media img {
    transform: scale(1.04);
}

.feature-card__title {
    margin: 22px 0 8px;
    font-size: 26px;
    font-weight: 400;
    line-height: 1.2;
}

.feature-card p {
    margin-bottom: 14px;
    font-size: 16px;
}

.feature-card .link-arrow {
    margin-top: auto;
    min-height: 0;
}

.feature-card:hover .link-arrow svg {
    transform: translateX(4px);
}

/* ---------- Contact block and map ---------- */

.contact-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
    align-items: center;
    gap: clamp(36px, 6vw, 72px);
}

.contact-grid .title {
    margin: 16px 0;
}

.contact-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin: 24px 0 32px;
    color: var(--ink);
    font-weight: 500;
}

.contact-list li {
    display: flex;
    gap: 14px;
}

.contact-list svg {
    flex: none;
    width: 22px;
    height: 22px;
    margin-top: 3px;
    fill: none;
    stroke: var(--accent);
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.contact-list a {
    color: inherit;
    text-decoration: none;
}

.contact-list a:hover {
    color: var(--accent);
}

.map {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: clamp(320px, 40vw, 440px);
    overflow: hidden;
    border-radius: 28px;
    background-color: #D8E8EC;
    background-image: linear-gradient(rgba(255, 255, 255, 0.55) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.55) 1px, transparent 1px);
    background-size: 56px 56px;
}

.map--wide {
    height: clamp(320px, 36vw, 460px);
}

.map__fallback {
    padding: 10px 20px;
    border-radius: 999px;
    background: var(--white);
    box-shadow: 0 8px 24px rgba(16, 48, 61, 0.18);
    font-size: 15px;
    font-weight: 600;
    color: var(--ink);
    text-decoration: none;
}

@media (max-width: 899px) {
    .contact-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* ---------- Inner page header ---------- */

.page-hero {
    padding-block: clamp(48px, 6vw, 80px);
    background: var(--tint);
}

.page-hero .display {
    margin-top: 16px;
    font-size: clamp(38px, 4.4vw, 62px);
}

.page-hero .lead {
    max-width: 720px;
    margin-top: 20px;
}

/* ---------- Photo grids ---------- */

.photo-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.photo-grid--two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.photo-grid a,
.gallery-grid a {
    position: relative;
    display: block;
    aspect-ratio: 3 / 2;
    overflow: hidden;
    border-radius: var(--radius-sm);
    background: var(--tint);
}

.photo-grid a:first-child {
    grid-column: 1 / -1;
    border-radius: var(--radius);
}

.photo-grid--even a:first-child {
    grid-column: auto;
    border-radius: var(--radius-sm);
}

.photo-grid img,
.gallery-grid img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.photo-grid a:hover img,
.gallery-grid a:hover img {
    transform: scale(1.05);
}

/* A photo left alone in the last row is shown as a wide strip instead of leaving a gap. */
.photo-grid:not(.photo-grid--two) a:last-child:nth-child(3n+2) {
    grid-column: 1 / -1;
    aspect-ratio: 3 / 1;
}

.photo-grid:not(.photo-grid--two) a:last-child:nth-child(3n) {
    grid-column: span 2;
    aspect-ratio: auto;
}

@media (max-width: 479px) {
    .photo-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .photo-grid:not(.photo-grid--two) a:last-child:nth-child(n) {
        grid-column: auto;
        aspect-ratio: 3 / 2;
    }

    .photo-grid:not(.photo-grid--two) a:last-child:nth-child(2n) {
        grid-column: 1 / -1;
        aspect-ratio: 3 / 1;
    }
}

/* ---------- Apartment detail ---------- */

.detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
    align-items: start;
    gap: clamp(36px, 5vw, 64px);
}

.detail-aside {
    position: sticky;
    top: 108px;
}

.detail-aside .subtitle {
    margin-bottom: 14px;
}

.detail-aside .subtitle + p {
    margin-bottom: 0;
}

.detail-aside .panel {
    margin-top: 28px;
}

.detail-aside .panel p {
    margin-bottom: 18px;
}

.detail-aside .btn-row {
    margin-top: 28px;
    gap: 12px;
}

@media (max-width: 899px) {
    .detail-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .detail-aside {
        position: static;
    }
}

/* ---------- Tours ---------- */

.tour {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: center;
    gap: clamp(32px, 5vw, 72px);
    padding-block: clamp(40px, 5vw, 64px);
    border-top: 1px solid var(--line);
}

.tour:first-child {
    padding-top: 0;
    border-top: 0;
}

.tour:last-child {
    padding-bottom: 0;
}

.tour:nth-child(even) .tour__media {
    order: -1;
}

.tour__body .title--sm {
    margin-bottom: 20px;
}

.tour__body .btn {
    margin-top: 12px;
}

@media (max-width: 899px) {
    .tour {
        grid-template-columns: minmax(0, 1fr);
    }

    .tour:nth-child(even) .tour__media {
        order: 0;
    }
}

/* ---------- Gallery ---------- */

.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: clamp(28px, 3vw, 40px);
}

.filter {
    min-height: 44px;
    padding: 8px 22px;
    border: 1.5px solid var(--line);
    border-radius: 999px;
    background: transparent;
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.filter:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.filter.is-active {
    border-color: var(--accent);
    background: var(--accent);
    color: var(--white);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr));
    gap: 14px;
}

@media (max-width: 559px) {
    .gallery-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }
}

/* ---------- Price list ---------- */

.table-wrap {
    overflow-x: auto;
    border-radius: var(--radius);
    background: var(--tint);
}

.table {
    width: 100%;
    border-collapse: collapse;
    color: var(--ink);
}

.table th,
.table td {
    padding: 18px 24px;
    text-align: left;
    white-space: nowrap;
}

.table thead th {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent);
}

.table tbody td {
    border-top: 1px solid var(--line);
    font-weight: 500;
}

.table tbody td:first-child {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 400;
}

/* ---------- Notices and embedded forms ---------- */

.notice {
    padding: 18px 22px;
    border-radius: var(--radius-sm);
    background: var(--tint);
    color: var(--ink);
    font-weight: 500;
}

.section--tint .notice {
    background: var(--white);
}

.notice--success {
    background: var(--success-bg);
    color: var(--success);
}

.notice--error {
    background: var(--error-bg);
    color: var(--error);
}

.form-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.7fr);
    align-items: start;
    gap: clamp(32px, 5vw, 64px);
}

.form-layout .subtitle {
    margin-bottom: 14px;
}

.form-layout .notice {
    margin-top: 20px;
}

.form-layout .contact-list {
    margin-bottom: 0;
}

.form-card {
    padding: clamp(16px, 3vw, 36px);
    border: 1px solid var(--line);
    border-radius: 28px;
    background: var(--white);
}

.form-card iframe {
    max-width: 100%;
}

.form-card .subtitle {
    margin-bottom: 18px;
}

@media (max-width: 899px) {
    .form-layout {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* ---------- Footer ---------- */

.site-footer {
    padding: 72px 0 40px;
    background: var(--ink);
    color: #C9DCE2;
    font-size: 15px;
}

.site-footer a {
    color: #C9DCE2;
    text-decoration: none;
}

.site-footer a:hover {
    color: var(--white);
    text-decoration: underline;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(210px, 100%), 1fr));
    gap: 40px 48px;
}

.footer-brand {
    font-family: var(--font-display);
    font-size: 25px;
    font-weight: 500;
    line-height: 1.15;
    color: var(--white);
}

.footer-grid p {
    margin: 16px 0 0;
}

.footer-grid p a {
    color: var(--white);
}

.footer-title {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--white);
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 16px;
}

.footer-bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px 24px;
    margin-top: 56px;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.18);
    font-size: 14px;
}

/* ---------- Lightbox ---------- */

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 64px clamp(12px, 6vw, 88px);
    background: rgba(9, 26, 33, 0.94);
}

.lightbox__figure {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    margin: 0;
}

.lightbox__img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}

.lightbox__btn {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    color: var(--white);
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.lightbox__btn:hover {
    background: rgba(255, 255, 255, 0.26);
}

.lightbox__btn:focus-visible {
    outline-color: var(--white);
    border-radius: 50%;
}

.lightbox__btn svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.lightbox__close {
    top: 12px;
    right: 12px;
}

.lightbox__prev {
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox__next {
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox__count {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 20px;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.8);
}

/* ---------- Plain pages (login, account, error) ---------- */

.plain h1,
.plain h2,
.plain h3,
.plain h4 {
    margin-bottom: 18px;
}

.plain h1, .plain h2 {
    font-size: clamp(28px, 3vw, 40px);
}

.plain h3, .plain h4 {
    font-size: 26px;
    font-weight: 400;
}

.plain hr {
    border: 0;
    border-top: 1px solid var(--line);
    margin: 20px 0;
}

.plain label {
    display: inline-block;
    margin: 12px 0 6px;
    font-weight: 600;
    color: var(--ink);
}

.plain input[type="text"],
.plain input[type="email"],
.plain input[type="password"],
.plain textarea,
.plain select {
    display: block;
    width: 100%;
    max-width: 420px;
    min-height: 48px;
    padding: 10px 14px;
    border: 1.5px solid var(--line);
    border-radius: 12px;
    background: var(--white);
    color: var(--ink);
    font: inherit;
}

.plain input:focus,
.plain textarea:focus,
.plain select:focus {
    border-color: var(--accent);
    outline: 0;
}

.plain input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 16px 8px 0 0;
    vertical-align: middle;
    accent-color: var(--accent);
}

.plain input[type="submit"],
.plain button[type="submit"] {
    min-height: 48px;
    margin-top: 20px;
    padding: 8px 28px;
    border: 0;
    border-radius: 999px;
    background: var(--accent);
    color: var(--white);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.plain input[type="submit"]:hover,
.plain button[type="submit"]:hover {
    background: var(--accent-dark);
}

.plain .text-danger,
.plain .field-validation-error,
.plain .validation-summary-errors {
    color: var(--error);
}

.plain .validation-summary-errors ul {
    list-style: disc;
    padding-left: 20px;
}

.plain [style*="width: 33%"] {
    width: auto !important;
    max-width: 420px;
}

/* ---------- Motion ---------- */

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    * {
        transition: none !important;
    }
}
