/*
    Theme Name: Hassler Apartments
    Author: Egloo
    Author URI: https://egloo.it
    Version: 1.0.0
    Text Domain: eg-hassler-apartments
    Description: A custom WordPress theme for Hassler Apartments, designed by Egloo.
    License: GNU General Public License v2 or later
    License URI: https://www.gnu.org/licenses/gpl-2.0.html
*/

* {
    box-sizing: border-box;
    padding: 0;
    margin: 0;
}

dialog {
    margin: auto;
}

a,
input,
textarea,
select,
button,
h1,
h2,
h3,
h4,
h5,
h6 {
    font: inherit;
    color: inherit;
}

a {
    text-decoration: none;
}

img,
video,
iframe {
    display: block;
    inline-size: 100%;
    block-size: auto;
}

button,
label,
input {
    cursor: pointer;
}

input[type="reset"],
input[type="submit"],
button {
    border: none;
    background-color: transparent;
}

span:has(> svg:only-child),
svg {
    line-height: 0;
}

ul {
    list-style-type: none;
}

html {
    scrollbar-gutter: stable;
    scroll-behavior: smooth;
    scroll-padding: 6.25rem;
    -webkit-tap-highlight-color: transparent;
}

body:has(dialog[open]) {
    overflow: hidden;
}

/* The scrollbar gutter (scrollbar-gutter: stable) shows the root background while the scroll is locked:
   white, not the red of the body */
html:has(dialog[open]),
html.lenis-stopped {
    background-color: var(--c-white);
}

:focus-visible {
    outline-offset: 4px;
    outline: 0px solid var(--on-surface, currentColor);
    animation:
        focus-ring-in 0.2s forwards,
        focus-ring-out 0.2s 0.2s forwards;
}

@keyframes focus-ring-in {
    to {
        outline-width: 8px;
    }
}

@keyframes focus-ring-out {
    to {
        outline-width: 4px;
    }
}

/* ======================================== */
/* FONTS */
/* ======================================== */

@font-face {
    font-family: "Dignitas";
    src: url("assets/fonts/dignitas/Dignitas-Regular-Web.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Messina Sans";
    src: url("assets/fonts/messina-sans/MessinaSansWeb-Regular.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Messina Sans";
    src: url("assets/fonts/messina-sans/MessinaSansWeb-SemiBold.woff2") format("woff2");
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Messina Sans";
    src: url("assets/fonts/messina-sans/MessinaSansWeb-Bold.woff2") format("woff2");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Workhorse Script";
    src: url("assets/fonts/workhorse-script/WorkhorseScript-Display.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

/* ======================================== */
/* BASE */
/* ======================================== */

html.lenis,
html.lenis body {
    block-size: auto;
}

html.lenis {
    scroll-behavior: auto;
}

.lenis.lenis-stopped {
    overflow: clip;
}

body {
    font-family: var(--ff-secondary);
    font-size: 0.875rem;
    line-height: 1.35;
    color: var(--on-surface);
    background-color: var(--c-roman-red);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

.site-wrapper {
    position: relative;
    z-index: 1;
    background-color: var(--surface);
}

main:focus {
    outline: none;
}

.dark-section {
    --on-surface: var(--c-beige);
    color: var(--on-surface);
}

/* ======================================== */
/* TYPOGRAPHY */
/* ======================================== */

.fs-title-big,
.fs-title-1,
.fs-title-2,
.fs-title-3,
.fs-title-4 {
    font-family: var(--ff-primary);
    font-weight: 400;
    line-height: 1.05;
    text-transform: uppercase;
    text-wrap: balance;
}

:is(.fs-title-big, .fs-title-1, .fs-title-2, .fs-title-3, .fs-title-4) em {
    font-family: var(--ff-tertiary);
    font-style: normal;
    text-transform: none;
}

.fs-title-big {
    font-size: clamp(2.75rem, 1.6rem + 3.6vw, 4.375rem);
}

.fs-title-1 {
    font-size: clamp(2.375rem, 2.155rem + 0.939vw, 3rem);
}

.fs-title-2 {
    font-size: clamp(1.75rem, 1.53rem + 0.939vw, 2.375rem);
}

.fs-title-3 {
    font-size: clamp(1.375rem, 1.243rem + 0.563vw, 1.75rem);
}

.fs-title-4 {
    font-size: clamp(1.25rem, 1.206rem + 0.188vw, 1.375rem);
}

.fs-body-large {
    font-size: clamp(1rem, 0.95rem + 0.2vw, 1.125rem);
    line-height: 1.35;
}

.fs-body {
    font-size: 0.875rem;
    line-height: 1.35;
}

.fs-body-small {
    font-size: 0.75rem;
    line-height: 1.35;
    font-weight: 600;
}

.fs-label {
    font-family: var(--ff-secondary);
    font-size: 0.625rem;
    line-height: 1.15;
    font-weight: 700;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

.fw-semibold {
    font-weight: 600;
}

.c-muted {
    color: var(--c-grey-darker);
}

/* ======================================== */
/* UTILS */
/* ======================================== */

nav.breadcrumbs ul {
    --_gap: 1.25rem;
    display: block;
}

nav.breadcrumbs li {
    display: inline-block;
    position: relative;
}

nav.breadcrumbs li:not(:last-child) {
    margin-inline-end: var(--_gap);
}

nav.breadcrumbs li svg {
    position: absolute;
    inset-block-start: 50%;
    inset-inline-end: calc((var(--_gap) * -1) / 2);
    translate: 50% -50%;
}

nav.breadcrumbs [aria-current] {
    color: rgb(from currentColor r g b / 0.3);
}

.rich-text > *:not(:last-child) {
    margin-block-end: 1lh;
}

.rich-text strong {
    font-weight: 700;
}

.rich-text ul {
    list-style-type: disc;
}

.rich-text ol {
    list-style-type: decimal;
}

.rich-text ul,
.rich-text ol {
    padding-inline-start: 1rem;
}

.rich-text a {
    text-decoration: underline;
}

.sr-only {
    position: absolute;
    inline-size: 1px;
    block-size: 1px;
    padding: 0;
    margin: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    border-width: 0;
    inset-inline-end: 0;
    inset-block-end: 0;
}

.skip-link:focus {
    position: fixed;
    inset-block-start: 1rem;
    inset-inline-start: 1rem;
    z-index: 9999;
    inline-size: fit-content;
    block-size: fit-content;
    padding: 0.75rem 1.25rem;
    overflow: visible;
    clip-path: none;
    white-space: normal;
    background-color: var(--on-surface, #000);
    color: var(--surface, #fff);
    border-radius: 0.25rem;
    outline: 2px solid transparent;
}

.img-wrapper.img-wrapper-ratio > picture,
.img-wrapper.img-wrapper-ratio {
    overflow: hidden;
    position: relative;
}

.img-wrapper.img-wrapper-ratio > picture {
    block-size: 100%;
    display: block;
}

.img-wrapper.img-wrapper-ratio > video,
.img-wrapper.img-wrapper-ratio > picture > video,
.img-wrapper.img-wrapper-ratio > picture > img,
.img-wrapper.img-wrapper-ratio > img {
    inline-size: 100%;
    block-size: 100%;
    position: absolute;
    object-fit: cover;
    inset: 0;
}

.layers {
    display: grid;
}

.layers > .layer {
    grid-column: -1/1;
    grid-row: -1/1;
}

.layers > .layer.layer-bg {
    position: relative;
}

.layers > .layer.layer-bg > .img-wrapper.img-wrapper-ratio:only-child {
    block-size: 100%;
}

.layers > .layer.layer-bg::before,
.layers > .layer.layer-bg::after {
    content: "";
    pointer-events: none;
    inset-block-start: 0;
    inset-inline-start: 0;
    inline-size: 100%;
    block-size: 100%;
    position: absolute;
}

.layers > .layer.layer-fg {
    position: relative;
    z-index: 1;
}

:root {
    --c-roman-red: #96322d;
    --c-roman-red-light: #a14742;
    --c-green: #213228;
    --c-beige: #f2f0ea;
    --c-beige-2: #f5ebdc;
    --c-grey: #dbdbdb;
    --c-grey-darker: #989898;
    --c-black: #000;
    --c-white: #fff;

    --accent: var(--c-roman-red);
    --surface: var(--c-white);
    --on-surface: var(--c-black);

    --ff-primary: "Dignitas", "Times New Roman", serif;
    --ff-secondary: "Messina Sans", "Helvetica Neue", Arial, sans-serif;
    --ff-tertiary: "Workhorse Script", "Snell Roundhand", cursive;

    --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
    --header-block-size: 6.4375rem; /* utility bar + main bar (Figma "Apartments Navigation": 33 + 70) */
    --header-x-padding: 3.5rem;
    --z-header: 50;
    --z-menu: 60;
    --z-dialog: 100;
    --z-cursor: 1000;

    --container-columns: 16;
    --container-gap: 2rem;
    --container-column-width: 3.3125rem;
    --container-x-padding: 3.5rem;
    --container-max: calc((var(--container-x-padding) * 2) + 15 * var(--container-gap) + 16 * var(--container-column-width));
    /* inline offset of the 16-column container content from the viewport edge */
    --container-offset: max(var(--container-x-padding), (100% - var(--container-max)) / 2 + var(--container-x-padding));

    --form-gap-row: 1.25rem;
    --form-gap-col: 2rem;
    --form-field-min-width: 12rem;
    --form-checkbox-size: 0.8125rem;
    --form-checkbox-bg: var(--c-beige);
    --form-checkbox-checked-bg: var(--accent);
    --form-input-bg: rgb(242 240 234 / 0.5);
    --form-input-border: transparent;
    --form-input-font-size: 0.875rem;
    --form-input-weight: 400;
    --form-input-padding-block: 0.9375rem;
    --form-input-padding-inline: 1rem;
    --form-label-weight: 700;
    --form-border-radius-input: 0;
    --form-border-radius-checkbox: 0;
    --form-border-radius-radio: 50%;
    --form-label-field-gap: 0.625rem;
    --form-icon-check: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMC44NzUiIGhlaWdodD0iNy4xOTciIHZpZXdCb3g9IjAgMCAxMC44NzUgNy4xOTciPgogIDxwYXRoIGlkPSJUcmFjY2lhdG9fMjA4ODUiIGRhdGEtbmFtZT0iVHJhY2NpYXRvIDIwODg1IiBkPSJNLTE1NjA2LjA3Niw2ODc4LjMwN2wzLjI2MywzLjI2Myw0Ljc4NC00Ljc4NCIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMTU2MDcuNDkgLTY4NzUuMzczKSIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjZmZmIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIHN0cm9rZS13aWR0aD0iMiIvPgo8L3N2Zz4K");
    --form-icon-file: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMy4zNjIiIGhlaWdodD0iMTkuNzQ4IiB2aWV3Qm94PSIwIDAgMjMuMzYyIDE5Ljc0OCI+CiAgPGcgaWQ9IlJhZ2dydXBwYV8xNTc4IiBkYXRhLW5hbWU9IlJhZ2dydXBwYSAxNTc4IiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgtNzM4LjA4NiAtNjU0Mi41MDEpIj4KICAgIDxwYXRoIGlkPSJUcmFjY2lhdG9fMjA5MDkiIGRhdGEtbmFtZT0iVHJhY2NpYXRvIDIwOTA5IiBkPSJNMzQuMzM2LDU3LjQ1N2EuNjE2LjYxNiwwLDAsMC0uNjIyLjYyMnYyLjk2NUEyLjMyLDIuMzIsMCwwLDEsMzEuNCw2My4zNjJIMTYuMTQ4YTIuMzEyLDIuMzEyLDAsMCwxLTIuMzE3LTIuMzE3VjU4LjA3OWEuNjIyLjYyMiwwLDAsMC0xLjI0NSwwdjIuOTY1YTMuNTYzLDMuNTYzLDAsMCwwLDMuNTYzLDMuNTYzSDMxLjM4NWEzLjU2MywzLjU2MywwLDAsMCwzLjU2My0zLjU2M1Y1OC4wNzlhLjYuNiwwLDAsMC0uNjEyLS42MjJaIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSg3MjYgNjQ5Ny4xNDEpIiBmaWxsPSIjYmI4ZWY4IiBzdHJva2U9IiNiYjhlZjgiIHN0cm9rZS13aWR0aD0iMSIvPgogICAgPHBhdGggaWQ9IlRyYWNjaWF0b18yMDkxMCIgZGF0YS1uYW1lPSJUcmFjY2lhdG8gMjA5MTAiIGQ9Ik0zOS43NTcsMzIuMTZhLjYxNi42MTYsMCwwLDAsLjYyMi0uNjIyVjIwLjg2MWwyLjY2NiwyLjgyN2EuNjQ1LjY0NSwwLDAsMCwuNDQ4LjIuNTY4LjU2OCwwLDAsMCwuNDI0LS4xNzQuNjI4LjYyOCwwLDAsMCwuMDI1LS44ODRsLTMuNzM3LTMuOTc0YS42NDguNjQ4LDAsMCwwLS45MSwwTDM1LjU1OCwyMi44M2EuNjI1LjYyNSwwLDEsMCwuOTA5Ljg2bDIuNjY2LTIuODI3VjMxLjUzOGEuNjE4LjYxOCwwLDAsMCwuNjI0LjYyMloiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDcxMC4wMTYgNjUyNC4zMzIpIiBmaWxsPSIjYmI4ZWY4IiBzdHJva2U9IiNiYjhlZjgiIHN0cm9rZS13aWR0aD0iMSIvPgogIDwvZz4KPC9zdmc+Cg==");
    --form-icon-select: url("data:image/svg+xml,%3Csvg width='8' height='5' viewBox='0 0 8 5' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M3.02359 2.04426C3.41412 2.43477 4.04727 2.43476 4.43779 2.04424L6.27879 0.203241C6.54961 -0.0675785 6.98869 -0.067596 7.25953 0.203202C7.5304 0.47403 7.53042 0.91317 7.25957 1.18402L4.43781 4.00578C4.04728 4.39631 3.41412 4.39631 3.02359 4.00578L0.201758 1.18395C-0.069058 0.913131 -0.0690589 0.474051 0.201757 0.203234C0.472569 -0.0675773 0.911639 -0.0675829 1.18246 0.203222L3.02359 2.04426Z' fill='%23181818'/%3E%3C/svg%3E");
}

.container {
    inline-size: 100%;
    max-inline-size: calc((var(--container-x-padding) * 2) + ((var(--container-columns) - 1) * var(--container-gap)) + (var(--container-columns) * var(--container-column-width)));
    margin-inline: auto;
    padding-inline: var(--container-x-padding);
}
.container.container-14 {
    --container-columns: 14;
}
.container.container-10 {
    --container-columns: 10;
}
.container.container-8 {
    --container-columns: 8;
}
.container.container-6 {
    --container-columns: 6;
}
.container.container-5 {
    --container-columns: 5;
}
.container.container-4 {
    --container-columns: 4;
}

/* ======================================== */
/* WPCF7 */
/* ======================================== */

input[type="search"]::-webkit-search-decoration,
input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-results-button,
input[type="search"]::-webkit-search-results-decoration,
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    display: none;
}

input[type="checkbox"],
input[type="radio"] {
    appearance: none;
    inline-size: var(--form-checkbox-size);
    block-size: var(--form-checkbox-size);
    background-color: var(--form-checkbox-bg);
    flex-shrink: 0;
    cursor: pointer;
}

input[type="checkbox"] {
    border-radius: var(--form-border-radius-checkbox);
}

input[type="radio"] {
    border-radius: var(--form-border-radius-radio);
}

input[type="checkbox"]:checked,
input[type="radio"]:checked {
    background-color: var(--form-checkbox-checked-bg);
    background-image: var(--form-icon-check);
    background-repeat: no-repeat;
    background-position: center;
    background-size: 72%;
}

input[type="checkbox"]:focus-visible,
input[type="radio"]:focus-visible {
    outline: 2px solid var(--on-surface);
    outline-offset: 2px;
}

input:is([type="text"], [type="number"], [type="email"], [type="tel"]),
.wpcf7-styled select,
.wpcf7-styled textarea {
    inline-size: 100%;
    padding-block: var(--form-input-padding-block);
    padding-inline: var(--form-input-padding-inline);
    border: 1px solid var(--form-input-border);
    background-color: var(--form-input-bg);
    border-radius: var(--form-border-radius-input);
    font-size: var(--form-input-font-size);
    font-weight: var(--form-input-weight);
    outline: none;
}

.wpcf7-styled select {
    appearance: none;
    background-image: var(--form-icon-select);
    background-repeat: no-repeat;
    background-position: calc(100% - var(--form-input-padding-inline)) center;
    padding-inline-end: calc(var(--form-input-padding-inline) + 1.5rem);
}

input::placeholder,
textarea::placeholder,
.wpcf7-styled label:has(input[type="file"]) > span:first-child {
    color: rgb(from var(--on-surface) r g b / 0.4);
}

.wpcf7-styled textarea {
    min-block-size: 6.875rem;
    field-sizing: content;
    resize: vertical;
}

input:is([type="text"], [type="number"], [type="email"], [type="tel"]):focus-visible,
.wpcf7-styled select:focus-visible,
.wpcf7-styled textarea:focus-visible {
    border-color: var(--accent);
    outline: 1px solid var(--accent);
    outline-offset: 0;
}

.wpcf7-styled label {
    font-size: 0.875rem;
    line-height: 1.571;
    letter-spacing: -0.01em;
    font-weight: var(--form-label-weight);
    display: flex;
    flex-direction: column;
    gap: var(--form-label-field-gap);
}

.wpcf7-styled .align-center {
    text-align: center;
}

.wpcf7-styled label:has(input[type="file"]) {
    overflow: hidden;
    display: grid;
    background-image: var(--form-icon-file);
    background-repeat: no-repeat;
    background-position: calc(100% - 1rem) center;
    background-color: rgb(from currentColor r g b / 0.1);
    border: 1px solid transparent;
    border-radius: var(--form-border-radius-input);
    padding-block: var(--form-input-padding-block);
    padding-inline: var(--form-input-padding-inline);
    cursor: pointer;
}

.wpcf7-styled label:has(input[type="file"]) > span:first-child {
    overflow: hidden;
    max-inline-size: calc(100% - 3rem);
    white-space: nowrap;
    text-overflow: ellipsis;
    display: block;
}

.wpcf7-styled label:has(input[type="file"]) input[type="file"] {
    opacity: 0;
    width: 0.1px;
    height: 0.1px;
    position: absolute;
    z-index: -1;
}

.wpcf7-styled label:has([aria-required="true"]) .label-title::after {
    content: " *";
    color: currentColor;
}

.wpcf7-styled :is([data-class="wpcf7cf_group"], form) > p {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(var(--form-field-min-width), 100%), 1fr));
    row-gap: var(--form-gap-row);
    column-gap: var(--form-gap-col);
}

.wpcf7-styled :is([data-class="wpcf7cf_group"], form) > p .wide {
    grid-column: 1 / -1;
}

.wpcf7-styled :is([data-class="wpcf7cf_group"], form) .wpcf7-submit {
    inline-size: 100%;
    margin-inline: auto;
    border-radius: var(--form-border-radius-input);
}

.wpcf7-styled :is([data-class="wpcf7cf_group"], form) > p br,
.wpcf7-styled :is([data-class="wpcf7cf_group"], form) .wpcf7-spinner {
    display: none;
}

.wpcf7-styled :is([data-class="wpcf7cf_group"], form) .wpcf7-not-valid-tip {
    font-size: 0.75rem;
    margin-top: 0.25rem;
}

.wpcf7-styled .wpcf7-acceptance label {
    flex-direction: row;
    align-items: flex-start;
    gap: 0.75rem;
}

.wpcf7-styled .wpcf7-acceptance label span {
    text-box: trim-both cap alphabetic;
}

.wpcf7-styled .wpcf7-acceptance label span a {
    text-decoration: underline;
}

.wpcf7-styled .wide [data-name="acceptance"] {
    display: block;
    margin-block: var(--form-gap-row);
}

.wpcf7-styled [data-name="acceptance"] .wpcf7-list-item {
    margin-inline-start: 0;
}

.wpcf7-styled .wpcf7-response-output {
    padding: 1rem;
    text-wrap: balance;
    font-size: 0.875rem;
    inline-size: 100%;
    border: 1px solid transparent;
    margin-block-start: 3rem;
    border-radius: var(--form-border-radius-input);
}

.wpcf7-styled form.sent .wpcf7-response-output {
    background-color: #5ad66521;
    border-color: #5ad6659e;
}

.wpcf7-styled form.invalid .wpcf7-response-output {
    border-color: #ffb900cc;
}

.eg-pagination ul {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    align-items: center;
}

.eg-pagination .page-btn:disabled,
.eg-pagination .page-separator,
.eg-pagination .page:not(.page-current) {
    opacity: 0.4;
}

.eg-pagination :disabled {
    pointer-events: none;
}

/* ======================================== */
/* BUTTONS & LINKS */
/* ======================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.625rem;
    min-block-size: 2.9375rem;
    padding-block: 0.5rem;
    padding-inline: 2.4375rem;
    border: 1px solid transparent;
    text-align: center;
    cursor: pointer;
    transition:
        background-color 0.3s ease-out,
        border-color 0.3s ease-out,
        color 0.3s ease-out;
}

.btn.btn-primary {
    background-color: var(--c-roman-red);
    border-color: var(--c-roman-red);
    color: var(--c-beige);
}

.btn.btn-secondary {
    border-color: var(--c-black);
    color: var(--c-black);
}

.btn.btn-light {
    border-color: var(--c-beige);
    color: var(--c-beige);
}

/* "Coming soon" in place of a booking button: a label, not a link */
.btn.is-soon,
.site-header .book-now.is-soon {
    cursor: default;
}

.btn.btn-block {
    display: flex;
    inline-size: 100%;
}

@media (hover: hover) {
    .btn.btn-primary:not(.is-soon):hover {
        background-color: var(--c-roman-red-light);
        border-color: var(--c-roman-red-light);
    }

    .btn.btn-secondary:hover {
        background-color: var(--c-roman-red);
        border-color: var(--c-roman-red);
        color: var(--c-beige);
    }

    .btn.btn-light:not(.is-soon):hover {
        background-color: var(--c-beige);
        color: var(--c-black);
    }
}

.eg-link {
    display: inline-flex;
    align-items: center;
    gap: 0.625rem;
    transition:
        gap 0.3s ease-out,
        color 0.3s ease-out;
}

.eg-link svg {
    flex-shrink: 0;
    inline-size: 1.625rem;
    block-size: auto;
}

@media (hover: hover) {
    .eg-link:hover {
        gap: 0.875rem;
        color: var(--c-grey-darker);
    }

    :is(.dark-section, .utility-bar) .eg-link:hover {
        color: inherit;
    }
}

.eyebrow {
    color: inherit;
}

/* Centered head: eyebrow, title, text */
.section-head {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.75rem;
    text-align: center;
}

.section-head .section-head-text {
    max-inline-size: 32.5rem;
    text-wrap: pretty;
}

/* ======================================== */
/* REVEAL */
/* ======================================== */

@media (prefers-reduced-motion: no-preference) {
    /* As on Hassler: texts and blocks rise and fade in once, siblings one after the other */
    .js [data-reveal] {
        transition:
            opacity 1.1s var(--ease-out),
            translate 1.1s var(--ease-out);
        transition-delay: calc(var(--reveal-index, 0) * 0.12s);
    }

    .js [data-reveal]:not([data-entered]) {
        opacity: 0;
        translate: 0 2rem;
    }

    /* Photos inside a revealed block settle from a slight zoom (Hassler "experiences") */
    .js [data-reveal] :is(.nearby-card-media, .apartment-place-media) img {
        transition: scale 1.6s var(--ease-out);
        transition-delay: calc(var(--reveal-index, 0) * 0.12s);
    }

    .js [data-reveal]:not([data-entered]) :is(.nearby-card-media, .apartment-place-media) img {
        scale: 1.2;
    }
}

/* Big photos (apartment main photo, location photo): they fade in and settle from a slight zoom inside
   their frame, which keeps its size (no layout change while loading) */
@media (prefers-reduced-motion: no-preference) {
    .js [data-inset] img {
        transition:
            opacity 1.2s var(--ease-out),
            scale 1.8s var(--ease-out);
    }

    .js [data-inset]:not([data-entered]) img {
        opacity: 0;
        scale: 1.12;
    }

    /* Fast scrolling (js/main.js initReveal): quicker, no stagger, so no white band under the header */
    .js :is([data-reveal], [data-inset])[data-fast],
    .js :is([data-reveal], [data-inset])[data-fast] :is(img, .service-title)::after,
    .js :is([data-reveal], [data-inset])[data-fast] img {
        transition-duration: 0.45s;
        transition-delay: 0s;
    }

    /* Scrolled past before it was reached: already in place */
    .js :is([data-reveal], [data-inset])[data-instant],
    .js :is([data-reveal], [data-inset])[data-instant] *,
    .js :is([data-reveal], [data-inset])[data-instant] *::after {
        transition: none;
    }
}

/* ======================================== */
/* HEADER */
/* ======================================== */

/* As on Hassler: sticky, it slides away while scrolling down and comes back on the way up (JS sets
   data-hidden and --header-visible, the visible header height, used by the sticky booking box) */
.site-header {
    position: sticky;
    inset-block-start: 0;
    z-index: var(--z-header);
    background-color: var(--surface);
}

@media (prefers-reduced-motion: no-preference) {
    .site-header {
        transition: translate 0.6s cubic-bezier(0.65, 0, 0.35, 1);
    }

    /* Within its own height from the top: no slide (js/main.js initHeader) */
    .site-header[data-top] {
        transition: none;
    }
}

.site-header[data-hidden] {
    translate: 0 -100%;
}

.site-header .utility-bar {
    position: relative;
    background-color: var(--c-green);
    color: var(--c-beige);
}

/* The whole bar is clickable: the link's hit area is stretched over it */
.site-header .utility-bar .utility-link::after {
    content: "";
    position: absolute;
    inset: 0;
}

.site-header .utility-bar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    max-inline-size: none;
    min-block-size: 2.0625rem; /* Figma: 33px, 11px above and below the 10px label */
    padding-inline: var(--header-x-padding);
}

.site-header .utility-bar .utility-link {
    margin-inline-start: auto;
}

.site-header .main-bar {
    border-block-end: 1px solid var(--c-grey);
}

/* Sizes as in Figma "Apartments Navigation": 70px bar (grey border included), 56px side margins,
   "Book now" with 64px side padding, logo 21px from the top of the bar */
.site-header .main-bar-inner {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    min-block-size: calc(4.375rem - 1px); /* 70px with the border */
}

.site-header .menu-toggle {
    display: none;
}

.site-header .primary-nav {
    padding-inline-start: var(--header-x-padding);
}

.site-header .primary-nav .menu {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 2.5rem;
}

.site-header .primary-nav a,
.site-header .lang-switch a {
    display: inline-block;
    padding-block: 0.5rem;
    transition: color 0.3s ease-out;
}

.site-header .primary-nav .current-menu-item > a,
.site-header .primary-nav a[aria-current] {
    color: var(--c-roman-red);
}

.site-header .site-logo {
    display: block;
    padding-inline: 1rem;
}

@media (width >= 64rem) {
    .site-header .site-logo {
        align-self: start;
        padding-block-start: 1.3125rem;
    }
}

.site-header .site-logo svg {
    display: block;
    inline-size: 10.5rem;
    block-size: auto;
    aspect-ratio: 168.237 / 31;
    /* "APARTMENTS" touches the bottom of the viewBox: at small sizes (phones) its last pixel row was cut */
    overflow: visible;
}

/* Language switch and "Book now" share the last column: the logo stays centered */
.site-header .header-actions {
    grid-column: 3;
    grid-row: 1;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 2.5rem;
    align-self: stretch;
}

.lang-switch ul {
    display: flex;
    align-items: center;
}

.lang-switch li + li::before {
    content: "/";
    margin-inline: 0.5rem;
    color: var(--c-grey-darker);
}

.lang-switch a:not([aria-current]) {
    color: var(--c-grey-darker);
}

.site-header .book-now-short {
    display: none;
}

.site-header .book-now {
    display: grid;
    place-items: center;
    align-self: stretch;
    padding-inline: 4rem;
    /* down over the grey border of the bar: red under the button, not grey */
    margin-block-end: -1px;
    background-color: var(--c-roman-red);
    color: var(--c-beige);
    transition: background-color 0.3s ease-out;
}

@media (hover: hover) {
    .site-header .primary-nav a:hover,
    .site-header .lang-switch a:hover {
        color: var(--c-grey-darker);
    }

    .site-header .lang-switch a[aria-current]:hover {
        color: inherit;
    }

    .site-header .book-now:not(.is-soon):hover {
        background-color: var(--c-roman-red-light);
    }
}

.site-header .mobile-menu {
    display: none;
}

/* ======================================== */
/* HERO HOME */
/* ======================================== */

/* Full viewport height minus the header (JS sets --header-height to the real header height) */
.hero-home {
    --_img-w: 20.8125rem;
    --_img-h: 24rem;
    --_grow: 2.6s;
    --_ease-grow: cubic-bezier(0.45, 0, 0.55, 1); /* GSAP power1.inOut, as on Imago */
    position: relative;
    display: grid;
    block-size: calc(100svh - var(--header-height, var(--header-block-size)));
    min-block-size: 32rem;
    overflow: clip;
    background-color: var(--c-beige);
    isolation: isolate;
}

/* The photo frame: full bleed once grown; it starts as a centered portrait (see the load animation) */
.hero-home .hero-media {
    position: absolute;
    inset-block-start: 50%;
    inset-inline-start: 50%;
    z-index: -1;
    inline-size: 100%;
    block-size: 100%;
    overflow: hidden;
    translate: -50% -50%;
}

.hero-home .hero-media img {
    inline-size: 100%;
    block-size: 100%;
    object-fit: cover;
}

.hero-home .hero-media::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgb(0 0 0 / 0.2), rgb(0 0 0 / 0.5));
}

/* Texts over the photo */
.hero-home .hero-content {
    grid-area: 1 / 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-block: 4.1875rem 4.9375rem;
    padding-inline: var(--container-x-padding);
    text-align: center;
    color: var(--c-white);
}

.hero-home .hero-title {
    margin-block-start: auto;
    max-inline-size: 29.875rem;
}

.hero-home .hero-title em {
    display: block;
    margin-block-end: -0.3125rem;
}

/* em is already a block: the <br> from the title field would add an empty line */
.hero-home .hero-title em + br {
    display: none;
}

.hero-home .hero-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.25rem;
    margin-block-start: 3.125rem;
}

.hero-home .hero-actions .btn {
    min-inline-size: 14.25rem;
}

/* Load animation, as on Imago (Hassler "hero grow") + Figma "Banner Apartments":
   1. data-ready (photo and fonts loaded): a portrait on the white page, the eyebrow in black above it
      and the title in black below it (Figma 5997:30211)
   2. data-entered: the clip-path window grows to full bleed while the photo inside goes from 1.3x to 1x;
      together the eyebrow and the title move to their place and turn white (Figma 5997:30213)
   3. data-settled (the growth is almost over): the buttons come in
   data-done = finished (drops will-change). */
@media (prefers-reduced-motion: no-preference) {
    /* Only clip-path and scale animate (no width/height): no layout and no re-rasterising of the
       2880px photo at every frame, which made the growth stutter */
    .js .hero-home[data-ready] .hero-media {
        transition:
            clip-path var(--_grow) var(--_ease-grow),
            opacity 0.6s ease-out;
    }

    .js .hero-home[data-ready] .hero-media img {
        transition: scale var(--_grow) var(--_ease-grow);
    }

    .js .hero-home:not([data-done]) .hero-media {
        will-change: clip-path;
    }

    .js .hero-home:not([data-done]) .hero-media img {
        will-change: transform;
    }

    .js .hero-home[data-ready] .hero-content {
        transition: color var(--_grow) var(--_ease-grow);
    }

    .js .hero-home[data-ready] :is(.hero-eyebrow, .hero-title) {
        transition:
            opacity 0.6s ease-out,
            translate var(--_grow) var(--_ease-grow);
    }

    .js .hero-home[data-settled] .hero-actions {
        transition:
            opacity 1s var(--ease-out) 0.35s,
            translate 1.1s var(--ease-out) 0.35s,
            visibility 0s linear 0.35s;
    }

    /* Skipped by an early scroll (js/main.js): straight to the final state */
    .js .hero-home.is-skipped :is(.hero-media, .hero-media img, .hero-content, .hero-eyebrow, .hero-title, .hero-actions) {
        transition: none;
    }

    /* Waiting for the photo and the fonts: nothing half-loaded on screen */
    .js .hero-home:not([data-ready]) .hero-media {
        opacity: 0;
    }

    /* White around the portrait until the photo covers everything */
    .js .hero-home:not([data-done]) {
        background-color: var(--c-white);
    }

    /* The frame is always full bleed: the starting portrait is a clip-path window in the middle */
    .js .hero-home .hero-media {
        clip-path: inset(0);
    }

    /* Starting portrait: JS measures --_clip (between the eyebrow and the title, as in Figma);
       the centered window is the fallback */
    .js .hero-home:not([data-entered]) .hero-media {
        clip-path: inset(var(--_clip, max(0px, 50% - var(--_img-h) / 2) max(0px, 50% - var(--_img-w) / 2)));
    }

    .js .hero-home:not([data-entered]) .hero-media img {
        scale: 1.3;
    }

    /* Before the growth: black texts on the white page, the eyebrow a bit higher and the title lower
       down, on the buttons' spot (JS measures --_title-low), so both rise into place while the photo grows */
    .js .hero-home:not([data-ready]) :is(.hero-eyebrow, .hero-title) {
        opacity: 0;
    }

    .js .hero-home:not([data-entered]) .hero-content {
        color: var(--c-black);
    }

    .js .hero-home:not([data-entered]) .hero-eyebrow {
        translate: 0 -1.25rem;
    }

    .js .hero-home:not([data-entered]) .hero-title {
        translate: 0 var(--_title-low, 3rem);
    }

    .js .hero-home:not([data-settled]) .hero-actions {
        opacity: 0;
        visibility: hidden;
        translate: 0 100%;
    }
}

/* ======================================== */
/* HOME INTRO + APARTMENTS SLIDER */
/* ======================================== */

.section-intro {
    display: flex;
    flex-direction: column;
    gap: 5rem;
    padding-block: 7.5rem;
    overflow: clip;
}

.section-intro .section-head .fs-title-2 {
    max-inline-size: 40.5rem;
}

.apartments-slider {
    --_w: min(37.5rem, 78vw);
    --_scale: 0.7;
    --_gap: clamp(1.25rem, 3.5vw, 3.125rem);
    --_step: calc(var(--_w) * (1 + var(--_scale)) / 2 + var(--_gap));
    --_drag: 0px;
    /* The track is centred on the slider width (50cqi): 50vw would include the scrollbar and shift it */
    container-type: inline-size;
    position: relative;
    touch-action: pan-y;
    user-select: none;
}

.apartments-slider .apartments-slider-track {
    display: flex;
    align-items: flex-start;
    translate: calc(50cqi - var(--_w) / 2 - var(--_index, 0) * var(--_step) + var(--_drag)) 0;
    transition: translate 0.9s var(--ease-out);
}

.apartments-slider.is-dragging .apartments-slider-track {
    transition: none;
    cursor: grabbing;
}

.apartments-slider .apartments-slide {
    position: relative;
    flex: 0 0 var(--_w);
    margin-inline-end: calc(var(--_step) - var(--_w));
    /* JS --_shift: 0 for the centre card and its neighbours, ±1, ±2… further out (see initSlider) */
    translate: calc(var(--_shift, 0) * var(--_w) * (1 - var(--_scale)) / 2) 0;
    transition: translate 0.9s var(--ease-out);
}

.apartments-slider.is-dragging .apartments-slide {
    transition: none;
}

.apartments-slider .apartments-slide.is-active {
    z-index: 1;
}

/* Static (front-page.php: one bookable apartment between "Coming soon" cards): nothing to drag */
.apartments-slider.is-static {
    touch-action: auto;
    user-select: auto;
}

.js .apartments-slider.is-static .apartments-slide:not(.is-active) .apartment-card-media {
    cursor: default;
}

/* Static fallback without JS: horizontal scroll */
.no-js .apartments-slider {
    overflow-x: auto;
}

.no-js .apartments-slider .apartments-slider-track {
    translate: none;
    gap: var(--_gap);
    padding-inline: var(--container-offset);
}

.no-js .apartments-slider .apartments-slide {
    margin: 0;
}

.no-js .apartments-slider .slider-arrows {
    display: none;
}

.apartment-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.apartment-card .apartment-card-media {
    position: relative;
    aspect-ratio: 7 / 5;
    overflow: hidden;
    background-color: var(--c-grey);
    transform-origin: 50% 0;
    transition:
        scale 0.9s var(--ease-out),
        translate 0.9s var(--ease-out);
}

.apartment-card .apartment-card-media::after {
    content: "";
    position: absolute;
    inset: 0;
    background-color: rgb(0 0 0 / 0.1);
    pointer-events: none;
}

.apartment-card .apartment-card-media img {
    inline-size: 100%;
    block-size: 100%;
    object-fit: cover;
    transition: scale 1.2s var(--ease-out);
}

.apartment-card.is-coming-soon .apartment-card-media img {
    filter: blur(10px);
    scale: 1.1;
}

.apartment-card .apartment-card-body {
    display: flex;
    flex-direction: column;
    gap: 0.3125rem;
    max-inline-size: 19.25rem;
    transition:
        translate 0.9s var(--ease-out),
        opacity 0.6s var(--ease-out);
}

.apartment-card .apartment-card-title {
    margin-block-end: 0.625rem;
}

.apartment-card.is-coming-soon .apartment-card-title {
    color: var(--c-grey-darker);
}

/* The link covers the photo (not the white space beside the texts) */
.apartment-card .apartment-card-title a::after {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    z-index: 1;
    aspect-ratio: 7 / 5;
}

.js .apartment-card:not(.is-coming-soon) .apartment-card-cta {
    cursor: pointer;
}

.apartment-card .apartment-card-note {
    color: var(--c-grey-darker);
}

.apartment-card .apartment-card-cta {
    margin-block-start: 1.6875rem;
}

@media (hover: hover) {
    .apartment-card:not(.is-coming-soon):has(.apartment-card-title a:hover, .apartment-card-cta:hover) .apartment-card-media img {
        scale: 1.04;
    }

    .apartment-card:not(.is-coming-soon):has(.apartment-card-title a:hover, .apartment-card-cta:hover) .apartment-card-cta {
        gap: 0.875rem;
        color: var(--c-grey-darker);
    }
}

/* Side slides: smaller photo, 60px lower, only the title visible */
.js .apartments-slide:not(.is-active) .apartment-card-media {
    scale: var(--_scale);
    translate: 0 3.75rem;
}

.js .apartments-slide:not(.is-active) .apartment-card-body {
    translate: calc(var(--_w) * (1 - var(--_scale)) / 2) calc(3.75rem - var(--_w) * 5 / 7 * (1 - var(--_scale)));
}

.js .apartments-slide:not(.is-active) .apartment-card-body > :not(.apartment-card-title) {
    opacity: 0;
    visibility: hidden;
}

.js .apartments-slide:not(.is-active) .apartment-card-title a::after {
    display: none;
}

.js .apartments-slide:not(.is-active) .apartment-card-media {
    cursor: pointer;
}

.apartments-slider .slider-arrows {
    position: absolute;
    inset-inline: 0;
    inset-block-start: calc(var(--_w) * 5 / 7 / 2);
    display: flex;
    justify-content: space-between;
    padding-inline: var(--container-x-padding);
    translate: 0 -50%;
    pointer-events: none;
}

.slider-arrow,
.gallery-arrow {
    display: grid;
    place-items: center;
    inline-size: 3.625rem;
    block-size: 3.625rem;
    border: 1px solid transparent;
    border-radius: 50%;
    background-color: var(--c-beige);
    color: var(--c-black);
    pointer-events: auto;
    transition:
        background-color 0.3s ease-out,
        color 0.3s ease-out,
        opacity 0.3s ease-out;
}

.slider-arrow svg,
.gallery-arrow svg {
    inline-size: 0.5rem;
    block-size: auto;
}

.slider-arrow:disabled,
.gallery-arrow:disabled {
    opacity: 0;
    pointer-events: none;
}

@media (hover: hover) {
    .slider-arrow:hover,
    .gallery-arrow:hover {
        background-color: var(--c-roman-red);
        color: var(--c-beige);
    }
}

/* ======================================== */
/* POSITION (nearby) */
/* ======================================== */

.section-position {
    padding-block: 7.5rem;
    background-color: var(--c-beige);
}

.section-position > .container {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 40.5rem);
    align-items: center;
    gap: 2.5rem 5.3125rem;
}

.section-position .position-text {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.section-position .position-text > .fs-title-2 {
    margin-block-start: 0.75rem;
}

.section-position .apartment-place {
    margin-block-start: 0.9375rem;
}

.section-position .eg-map {
    aspect-ratio: 648 / 592;
}

.apartment-place {
    display: flex;
    flex-direction: column;
    gap: 2.1875rem;
    padding: 1.875rem;
    background-color: var(--c-white);
    color: var(--c-black);
}

.apartment-place .apartment-place-head {
    display: grid;
    grid-template-columns: 10.875rem minmax(0, 1fr);
    gap: 1.25rem;
}

.apartment-place .apartment-place-media {
    position: relative;
    aspect-ratio: 7 / 5;
    overflow: hidden;
}

.apartment-place .apartment-place-media::after {
    content: "";
    position: absolute;
    inset: 0;
    background-color: rgb(0 0 0 / 0.1);
}

.apartment-place .apartment-place-media img {
    inline-size: 100%;
    block-size: 100%;
    object-fit: cover;
}

.apartment-place .apartment-place-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    padding-block: 0.1875rem;
}

.apartment-place .apartment-place-info h3 {
    font-weight: 600;
}

.apartment-place .apartment-place-details {
    max-inline-size: 9rem;
    color: var(--c-grey-darker);
}

.apartment-place .apartment-place-info .eg-link {
    margin-block-start: auto;
}

.info-table,
.apartment-place .distances {
    display: flex;
    flex-direction: column;
}

.info-table .info-row,
.apartment-place .distance {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
    padding-block: 0.875rem;
    border-block-end: 1px solid var(--c-grey);
    font-size: 0.875rem;
    font-weight: 600;
}

.apartment-place .distance:last-child {
    padding-block-end: 0;
    border-block-end: 0;
}

.info-table dt {
    color: var(--c-grey-darker);
}

.info-table dd,
.apartment-place .distance dd {
    text-align: end;
}

.apartment-place .distance dd {
    color: var(--c-grey-darker);
}

/* Places with a pin on the map next to the list: a click highlights the row and the pin (js/map.js) */
.apartment-place .distance-place {
    padding: 0;
    border: 0;
    background: none;
    color: inherit;
    font: inherit;
    text-align: start;
    cursor: pointer;
    transition: color 0.3s ease-out;
}

/* The whole row is clickable: the button's hit area is stretched over it */
.apartment-place .distance[data-map-place-row] {
    position: relative;
}

.apartment-place .distance-place::after {
    content: "";
    position: absolute;
    inset: 0;
}

.apartment-place .distance {
    transition:
        border-color 0.3s ease-out,
        color 0.3s ease-out;
}

.apartment-place .distance.is-highlighted {
    border-block-end-color: var(--c-roman-red);
    color: var(--c-roman-red);
}

.apartment-place .distance.is-highlighted dd {
    color: var(--c-roman-red);
}

@media (hover: hover) {
    .apartment-place .distance-place:hover,
    .apartment-place .distance:has(.distance-place:hover) dd {
        color: var(--c-roman-red);
    }
}

.info-table dd a {
    text-decoration: underline;
    text-underline-offset: 0.2em;
}

/* ======================================== */
/* MAP */
/* ======================================== */

.eg-map {
    position: relative;
    overflow: hidden;
    border-radius: 0.625rem;
    background-color: #ecebe4;
}

.eg-map .eg-map-canvas {
    position: absolute;
    inset: 0;
}

.eg-map .maplibregl-ctrl-attrib {
    font-size: 0.625rem;
}

/* As on hotelhasslerroma.com: red "H" pin 32px for the apartments, small black pin 22.5px for the places */
.map-pin {
    display: grid;
    place-items: center;
    inline-size: 1.40625rem;
    block-size: 1.40625rem;
    color: var(--c-black);
    cursor: default;
}

.map-pin:is(.map-pin-apartment, .map-pin-hotel) {
    inline-size: 2rem;
    block-size: 2rem;
}

.map-pin.map-pin-apartment {
    color: var(--c-roman-red);
}

.map-pin:is(:hover, :focus-visible) {
    z-index: 3;
}

/* Name of the place / apartment above the pin, on hover and keyboard focus */
.map-pin .map-pin-label {
    position: absolute;
    inset-block-end: calc(100% + 0.375rem);
    inset-inline-start: 50%;
    padding: 0.375rem 0.625rem;
    background-color: var(--c-white);
    box-shadow: 0 0.125rem 0.75rem rgb(0 0 0 / 0.15);
    color: var(--c-black);
    font-family: var(--ff-secondary); /* MapLibre sets Helvetica/Arial on the map */
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.35;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    translate: -50% 0.25rem;
    transition:
        opacity 0.2s ease-out,
        translate 0.3s var(--ease-out);
}

/* Clear of the apartment pin, which grows by 25% on hover */
.map-pin-apartment .map-pin-label {
    inset-block-end: calc(125% + 0.375rem);
}

.map-pin:is(:hover, :focus-visible) .map-pin-label {
    opacity: 1;
    translate: -50% 0;
}

/* Never transform the marker element itself: MapLibre positions it with transform: translate(), and a
   scale on it would scale that offset too (the pin jumps across the map). The SVG inside grows instead,
   from the tip of the pin so it stays on its place. */
.map-pin svg {
    inline-size: 100%;
    block-size: 100%;
    overflow: visible;
    transform-origin: 50% 100%;
    transition: scale 0.3s var(--ease-out);
}

button.map-pin {
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
}

button.map-pin:is(.is-active, .is-highlighted) {
    z-index: 2;
}

button.map-pin:is(.is-active, .is-highlighted) svg {
    scale: 1.25;
}

/* Highlighted place: red pin, name shown */
.map-pin.map-pin-place.is-highlighted,
.map-pin.map-pin-hotel.is-highlighted {
    color: var(--c-roman-red);
}

.map-pin.is-highlighted .map-pin-label {
    opacity: 1;
    translate: -50% 0;
}

.map-pin svg {
    transition:
        scale 0.3s var(--ease-out),
        color 0.3s ease-out;
}

@media (hover: hover) {
    button.map-pin:hover svg {
        scale: 1.25;
    }
}

button.map-pin:focus-visible {
    outline: 2px solid var(--c-roman-red);
    outline-offset: 2px;
    border-radius: 50%;
}

/* ======================================== */
/* SERVICES */
/* ======================================== */

.section-services {
    padding-block: 8.75rem;
    background-color: var(--c-roman-red);
}

.section-services .container,
.location-arrive .container {
    display: flex;
    flex-direction: column;
    gap: 4.375rem;
}

.section-services .fs-title-2 {
    max-inline-size: 27rem;
}

/* 4 columns on desktop, 2 on tablet, 1 on phones: never 3 + 1 */
.services-list {
    display: grid;
    grid-template-columns: repeat(var(--_cols, 4), minmax(0, 1fr));
    gap: 3rem 3.75rem;
}

.services-list .service {
    display: flex;
    flex-direction: column;
    gap: 1.875rem;
    padding-inline-end: 1.75rem;
}

.services-list .service-title::after {
    content: "";
    display: block;
    box-sizing: border-box; /* pseudo-elements are not covered by the * reset: 4px in all, as in Figma */
    block-size: 0.25rem;
    margin-block-start: 1.875rem;
    border-block: 1px solid currentColor;
    transform-origin: left;
}

@media (prefers-reduced-motion: no-preference) {
    .js .services-list [data-reveal] .service-title::after {
        transition: scale 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) calc(0.35s + var(--reveal-index, 0) * 0.12s);
    }

    .js .services-list [data-reveal]:not([data-entered]) .service-title::after {
        scale: 0 1;
    }
}

.services-list .service p {
    font-size: 0.875rem;
    font-weight: 400;
    text-wrap: pretty;
}

/* ======================================== */
/* PUSH FULL SCREEN */
/* ======================================== */

.section-push {
    position: relative;
    display: grid;
    align-items: center;
    min-block-size: clamp(30rem, 56.25vw, 50.625rem);
    overflow: clip;
    isolation: isolate;
    background-color: var(--c-green);
}

.section-push.is-tall {
    min-block-size: clamp(32rem, 100svh, 62rem);
}

.section-push .push-media {
    position: absolute;
    inset: 0;
    z-index: -1;
    overflow: clip;
}

.section-push .push-media img,
.location-photo img {
    position: absolute;
    inset-inline: 0;
    inset-block-start: -12.5%;
    inline-size: 100%;
    block-size: 125%;
    object-fit: cover;
    translate: 0 var(--parallax, 0px);
    will-change: translate;
}

.section-push .push-media::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgb(0 0 0 / 0.2) 0%, rgb(0 0 0 / 0.6) 100%);
}

.section-push .push-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 3.5rem;
    padding-block: 6rem;
}

.section-push .push-content .fs-title-2 {
    max-inline-size: 41rem;
}

/* ======================================== */
/* APARTMENT */
/* ======================================== */

.apartment .apartment-head {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.875rem;
    padding-block: 6.0625rem 1.875rem;
    text-align: center;
}

.apartment .apartment-gallery {
    display: flex;
    flex-direction: column;
    gap: 1.875rem;
    padding-block-start: 1rem;
}

.apartment .apartment-main-photo,
.apartment .apartment-thumbs button {
    position: relative;
    display: block;
    inline-size: 100%;
    overflow: hidden;
    cursor: pointer; /* the custom cursor shows the "+": no second magnifier */
}

.apartment .apartment-main-photo::after,
.apartment .apartment-thumbs button::after {
    content: "";
    position: absolute;
    inset: 0;
    background-color: rgb(0 0 0 / 0.1);
    transition: background-color 0.6s var(--ease-out);
}

/* Figma "Frame 417": 1440 x 810 */
.apartment .apartment-main-photo img {
    inline-size: 100%;
    block-size: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

/* At the container width (the photo zooms inside the button, see [data-inset]) */
.apartment .apartment-main-photo {
    inline-size: auto;
    margin-inline: var(--container-offset);
}

.apartment .apartment-thumbs {
    display: flex;
    gap: 1.875rem;
    padding-inline: var(--container-offset);
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    cursor: grab;
}

.apartment .apartment-thumbs::-webkit-scrollbar {
    display: none;
}

.apartment .apartment-thumbs.is-dragging {
    cursor: grabbing;
    user-select: none;
}

.apartment .apartment-thumbs.is-dragging button {
    pointer-events: none;
}

.apartment .apartment-thumbs li {
    flex: 0 0 clamp(15rem, 27.8vw, 25rem);
}

.apartment .apartment-thumbs button {
    aspect-ratio: 1.4;
}

.apartment .apartment-thumbs img {
    inline-size: 100%;
    block-size: 100%;
    object-fit: cover;
}

/* Few photos (Figma "Appartamento 1", 1328 x 600 in the container): the big photo plus a 478px column
   of two, 10px apart; "See all photos" in the middle of the last one, darker (20%) */
.apartment .apartment-gallery.is-compact {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 36%);
    gap: 0.625rem;
    margin-block-end: 1.875rem; /* Figma: 30px more than under the thumbnails row before the text */
}

.apartment .apartment-gallery.is-compact .apartment-main-photo {
    margin-inline: 0;
    aspect-ratio: 840 / 600;
}

.apartment .apartment-gallery.is-compact img {
    inline-size: 100%;
    block-size: 100%;
    aspect-ratio: auto;
    object-fit: cover;
}

.apartment .apartment-side {
    display: grid;
    grid-auto-rows: minmax(0, 1fr);
    gap: 0.625rem;
    min-block-size: 0;
}

.apartment .apartment-side button {
    position: relative;
    display: block;
    overflow: hidden;
    cursor: pointer;
}

/* Out of the flow: the column takes the big photo's height, not the photos' own */
.apartment .apartment-side img {
    position: absolute;
    inset: 0;
}

.apartment .apartment-side button::after {
    content: "";
    position: absolute;
    inset: 0;
    background-color: rgb(0 0 0 / 0.1);
    transition: background-color 0.6s var(--ease-out);
}

.apartment .apartment-side button:last-child::after {
    background-color: rgb(0 0 0 / 0.2);
}

.apartment .apartment-all-photos {
    position: absolute;
    inset: 50% 0 auto;
    z-index: 1;
    translate: 0 -50%;
    color: var(--c-white);
    text-align: center;
}

@media (width < 64rem) {
    .apartment .apartment-gallery.is-compact {
        grid-template-columns: minmax(0, 1fr);
    }

    .apartment .apartment-gallery.is-compact .apartment-main-photo {
        aspect-ratio: 4 / 3;
    }

    .apartment .apartment-side {
        grid-auto-flow: column;
        grid-auto-columns: minmax(0, 1fr);
        aspect-ratio: 2.8;
    }
}

@media (hover: hover) {
    .apartment .apartment-side button:hover::after {
        background-color: rgb(0 0 0 / 0.3);
    }

    .apartment .apartment-side button:not(:last-child):hover::after {
        background-color: rgb(0 0 0 / 0.2);
    }

    .apartment .apartment-main-photo:hover::after,
    .apartment .apartment-thumbs button:hover::after {
        background-color: rgb(0 0 0 / 0.2);
    }
}

.apartment .apartment-body {
    display: grid;
    grid-template-columns: minmax(0, 51.125rem) minmax(0, 24.5625rem);
    justify-content: space-between;
    align-items: start;
    gap: 3.5rem 2rem;
    padding-block: 4.5rem 7.5rem;
}

.apartment .apartment-main {
    display: flex;
    flex-direction: column;
    gap: 3.5rem;
}

.apartment .apartment-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr));
    row-gap: 1.5rem;
}

.apartment .apartment-stats .stat {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    padding-inline: 0.9375rem;
    border-inline-start: 2px solid var(--c-roman-red);
}

.apartment .apartment-stats .stat-label {
    font-weight: 600;
}

.apartment .apartment-description {
    text-wrap: pretty;
}

.apartment .apartment-features,
.apartment .apartment-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.apartment .apartment-info {
    gap: 1rem;
    max-inline-size: 29.875rem;
}

.apartment .apartment-features h2,
.apartment .apartment-info h2 {
    font-weight: 600;
}

/* Figma: two 225px columns */
.apartment .apartment-features ul {
    columns: 2 12rem;
    column-gap: 0;
    max-inline-size: 28.125rem;
    margin-block-end: -0.625rem; /* the last item's padding: the list ends at its text */
}

.apartment .apartment-features li {
    display: flex;
    align-items: baseline;
    gap: 0.875rem;
    padding-block-end: 0.625rem;
    break-inside: avoid;
}

.apartment .apartment-features li::before {
    content: "";
    flex-shrink: 0;
    inline-size: 0.375rem;
    block-size: 0.375rem;
    border-radius: 50%;
    background-color: var(--c-roman-red);
    translate: 0 -0.1em;
}

.apartment .apartment-box {
    position: sticky;
    inset-block-start: calc(var(--header-visible, 0px) + 2rem);
    transition: inset-block-start 0.6s cubic-bezier(0.65, 0, 0.35, 1);
    display: flex;
    flex-direction: column;
    gap: 1.625rem;
    padding: 2.25rem 2rem;
    background-color: var(--c-beige);
}

.apartment .apartment-box > .fs-title-3 + .apartment-price {
    margin-block-start: calc(0.3125rem - 1.625rem);
}

.apartment .apartment-box .apartment-price {
    font-weight: 600;
}

.apartment .apartment-box .info-table dd {
    color: var(--c-black);
}

.apartment .apartment-box-contact {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    padding-block-start: 0.625rem;
    font-weight: 600;
}

/* ======================================== */
/* GALLERY DIALOG */
/* ======================================== */

.gallery-dialog {
    inline-size: 100%;
    max-inline-size: none;
    block-size: 100%;
    max-block-size: none;
    border: 0;
    background-color: var(--c-white);
    color: var(--c-black);
    overflow: hidden;
    overscroll-behavior: contain;
}

/* Transparent: while the panel slides up (JS), the page stays visible above it, as on Hassler */
.gallery-dialog::backdrop {
    background-color: transparent;
}

.gallery-dialog[open] {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
}

.gallery-dialog .gallery-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    max-inline-size: none;
    padding-block: 2.3125rem 1.5rem;
}

.gallery-dialog .gallery-close {
    display: inline-flex;
    align-items: center;
    gap: 0.125rem;
    padding-block: 0.25rem;
    color: var(--c-grey-darker);
    transition: color 0.3s ease-out;
}

@media (hover: hover) {
    .gallery-dialog .gallery-close:hover {
        color: var(--c-black);
    }
}

.gallery-dialog .gallery-stage {
    position: relative;
    overflow: hidden;
    touch-action: pan-y;
}

/* Slides stacked in one cell: the change is Hassler's clip-path wipe on the photos (JS) */
.gallery-dialog .gallery-track {
    display: grid;
    grid-template: minmax(0, 1fr) / minmax(0, 1fr);
    block-size: 100%;
}

.gallery-dialog .gallery-slide {
    display: grid;
    grid-template: minmax(0, 1fr) / minmax(0, 1fr); /* definite area, so the img max-block-size: 100% works */
    place-items: center;
    grid-area: 1 / 1;
    overflow: hidden;
    padding-block: 0 2.5rem;
    padding-inline: calc(var(--container-x-padding) + 3.625rem + 1.5rem);
}

.gallery-dialog .gallery-slide.is-active {
    z-index: 1;
}

.gallery-dialog .gallery-slide:not(.is-active, .is-leaving) {
    visibility: hidden;
}

.gallery-dialog .gallery-slide img {
    inline-size: auto;
    max-inline-size: 100%;
    block-size: auto;
    max-block-size: 100%;
    object-fit: contain;
    user-select: none;
    -webkit-user-drag: none;
}

.gallery-dialog .gallery-arrow {
    position: absolute;
    z-index: 2;
    inset-block-start: 50%;
    translate: 0 -50%;
}

.gallery-dialog .gallery-arrow-prev {
    inset-inline-start: var(--container-x-padding);
}

.gallery-dialog .gallery-arrow-next {
    inset-inline-end: var(--container-x-padding);
}

/* ======================================== */
/* CUSTOM CURSOR */
/* ======================================== */

#custom-cursor {
    /* thin beige ring: the red dot vanished over the red sections, footer and buttons */
    box-shadow: 0 0 0 1px rgb(242 240 234 / 0.8);
    position: fixed;
    inset-block-start: -1.8125rem;
    inset-inline-start: -1.8125rem;
    z-index: var(--z-cursor);
    display: grid;
    place-items: center;
    inline-size: 3.625rem;
    block-size: 3.625rem;
    border-radius: 50%;
    background-color: var(--c-roman-red);
    color: var(--c-beige);
    pointer-events: none;
    opacity: 0;
    scale: 0.25;
    transition:
        opacity 0.3s ease-out,
        scale 0.4s var(--ease-out),
        box-shadow 0.3s ease-out;
}

/* As on Hassler: a small dot always follows the mouse, it grows with an icon over [data-cursor] */
#custom-cursor[data-visible] {
    opacity: 1;
}

#custom-cursor svg {
    grid-area: 1 / 1;
    inline-size: 0.75rem;
    block-size: auto;
    opacity: 0;
    transition: opacity 0.2s ease-out;
}

#custom-cursor[data-state] {
    scale: 1;
    box-shadow: none;
}

#custom-cursor[data-state="gallery"] .cursor-icon-gallery {
    opacity: 1;
}

#custom-cursor[data-state][data-pressed] {
    scale: 0.85;
}

@media (hover: none), (pointer: coarse) {
    #custom-cursor {
        display: none;
    }
}

/* ======================================== */
/* LOCATION PAGE */
/* ======================================== */

.location-intro {
    padding-block: 7.5rem;
}

.location-intro .container {
    display: grid;
    grid-template-columns: minmax(0, 24.5625rem) minmax(0, 40.5rem);
    justify-content: center;
    gap: 2rem 7.3125rem;
}

.location-intro .location-intro-head {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.location-intro .location-intro-text {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    padding-block-start: 2.5rem;
}

.location-intro .lead {
    font-weight: 600;
}

/* Full width, 1440 x 700 in Figma; the photo inside has the parallax and the [data-inset] zoom */
.location-photo {
    position: relative;
    block-size: clamp(20rem, 48.6vw, 43.75rem);
    overflow: clip;
}

.location-map {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
    padding-block: 8.75rem 3.75rem;
}

.location-map .section-head {
    gap: 1.875rem;
}

.location-map .section-head .fs-title-2 em {
    display: inline-block;
}

.location-map .section-head-text {
    font-size: 0.875rem;
    font-weight: 400;
}

.location-map .location-map-frame {
    position: relative;
}

.location-map .eg-map {
    block-size: clamp(30rem, 44.4vw, 40rem);
}

.location-map .location-map-card {
    position: absolute;
    inset-block-start: 1.875rem;
    inset-inline-start: 2.5rem;
    z-index: 2;
    inline-size: min(24.625rem, calc(100% - 5rem));
}

.location-map .location-map-card .apartment-place-head {
    grid-template-columns: 10.875rem minmax(0, 1fr);
}

.location-nearby {
    display: flex;
    flex-direction: column;
    gap: 3.5rem;
    padding-block: 3.75rem 7.5rem;
}

.location-nearby .section-head {
    gap: 3.5rem;
}

.location-nearby .nearby-list {
    display: grid;
    grid-template-columns: repeat(var(--_cols, 4), minmax(0, 1fr));
    gap: 3rem 2rem;
}

.location-nearby .nearby-card {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding-inline-end: 1.5rem;
}

.location-nearby .nearby-card-media {
    position: relative;
    aspect-ratio: 308 / 393;
    margin-block-end: 0.875rem;
    margin-inline-end: -1.5rem;
    overflow: hidden;
}

.location-nearby .nearby-card-media::after {
    content: "";
    position: absolute;
    inset: 0;
    background-color: rgb(0 0 0 / 0.1);
}

.location-nearby .nearby-card-media img {
    inline-size: 100%;
    block-size: 100%;
    object-fit: cover;
}


.location-arrive {
    padding-block: 8.75rem;
    background-color: var(--c-beige);
}

.location-arrive .service p {
    font-weight: 400;
}

/* ======================================== */
/* CONTACTS PAGE */
/* ======================================== */

.contacts {
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.contacts .contacts-intro {
    position: relative;
    display: flex;
    isolation: isolate;
    background-color: var(--c-green);
}

.contacts .contacts-intro > img {
    position: absolute;
    inset: 0;
    z-index: -2; /* under the ::before gradient (same z-index would paint the img over it, DOM order) */
    inline-size: 100%;
    block-size: 100%;
    object-fit: cover;
}

.contacts .contacts-intro::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    /* Figma gradient (Frame 410) direction, lighter than its 40%/10%: matches the approved screenshot (11/11) */
    background: linear-gradient(136.5deg, rgb(0 0 0 / 0.28) 5%, rgb(0 0 0 / 0.28) 40%, rgb(0 0 0 / 0.05) 62.5%);
}

.contacts .contacts-intro-text {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    max-inline-size: calc(22.4375rem + var(--container-x-padding) * 2);
    padding-block: 8.5625rem 7.5rem;
    padding-inline: var(--container-x-padding);
    color: var(--c-white);
}

.contacts .contacts-form {
    display: flex;
    justify-content: center; /* centred in its half (right-aligned it drifted far from the photo on wide screens) */
    padding-block: 8.5625rem 7.5rem;
    padding-inline: var(--container-x-padding);
}

.contacts .contacts-form > * {
    inline-size: 100%;
    max-inline-size: 35.1875rem;
}

.wpcf7-styled label {
    font-size: 0.625rem;
    line-height: 1.15;
    font-weight: 700;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

.wpcf7-styled :is(input, textarea) {
    letter-spacing: normal;
    text-transform: none;
}

.wpcf7-styled input:is([type="text"], [type="email"], [type="tel"]) {
    min-block-size: 3.125rem;
}

.wpcf7-styled textarea {
    min-block-size: 8.125rem;
}

.wpcf7-styled :is([data-class="wpcf7cf_group"], form) .wpcf7-submit {
    min-block-size: 3.1875rem;
    margin-block-start: 1.25rem;
    border: 1px solid var(--c-black);
    border-radius: 0;
    background-color: transparent;
    color: var(--c-black);
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.11em;
    text-transform: uppercase;
    transition:
        background-color 0.3s ease-out,
        border-color 0.3s ease-out,
        color 0.3s ease-out;
}

@media (hover: hover) {
    .wpcf7-styled :is([data-class="wpcf7cf_group"], form) .wpcf7-submit:hover {
        background-color: var(--c-roman-red);
        border-color: var(--c-roman-red);
        color: var(--c-beige);
    }
}

.wpcf7-styled form.submitting .wpcf7-submit {
    cursor: progress;
    opacity: 0.6;
}

.wpcf7-styled form.submitting .wpcf7-submit-wrap {
    position: relative;
}

@media (prefers-reduced-motion: no-preference) {
    .wpcf7-styled form.submitting .wpcf7-submit {
        animation: form-submitting 1.2s ease-in-out infinite alternate;
    }
}

@keyframes form-submitting {
    to {
        opacity: 0.3;
    }
}

.wpcf7-styled .form-privacy {
    font-size: 0.75rem;
    line-height: 1.4;
    font-weight: 600;
    color: rgb(from var(--c-black) r g b / 0.6);
}

.wpcf7-styled .form-privacy a {
    color: var(--c-black);
    text-decoration: underline;
    text-underline-offset: 0.15em;
}

/* Privacy consent checkbox (CF7 [acceptance privacy-consent]): the text keeps the note's style,
   not the uppercase field labels */
.wpcf7-styled .form-privacy .wpcf7-list-item {
    margin: 0;
}

.wpcf7-styled .form-privacy label {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    font: inherit;
    letter-spacing: normal;
    text-transform: none;
    cursor: pointer;
}

/* Keep the full line box (no cap trim from the generic acceptance rule) so the 1rem box
   lines up with the first text line (line-height 1.4 ≈ 1rem box) */
.wpcf7-styled .form-privacy label span {
    text-box: normal;
}

.wpcf7-styled .form-privacy input[type="checkbox"] {
    inline-size: 1rem;
    block-size: 1rem;
    margin: 0;
    border: 1px solid var(--c-black);
    background-color: transparent;
}

.wpcf7-styled .form-privacy input[type="checkbox"]:checked {
    background-color: var(--c-black);
}

.wpcf7-styled .form-privacy .wpcf7-not-valid input[type="checkbox"] {
    border-color: var(--c-roman-red);
}

.wpcf7-styled .wpcf7-not-valid-tip {
    color: var(--c-roman-red);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: normal;
    text-transform: none;
}

/* ======================================== */
/* FOOTER */
/* ======================================== */

.site-footer {
    position: relative;
    display: flex;
    flex-direction: column;
    min-block-size: 100svh;
    background-color: var(--c-roman-red);
    /* Spacing as on hotelhasslerroma.com: 80px above the first row, ~25px under the copyright */
    padding-block: 5rem 1.5625rem;
}

.site-footer > .container {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.site-footer .footer-top {
    flex-grow: 1;
    align-content: start;
}

/* As on Hassler: on pages ending with the full-screen push, the footer slides up over its lower half
   while scrolling (JS sets --footer-shift from 50svh to 0) */
@media (prefers-reduced-motion: no-preference) {
    .footer-cover .site-footer {
        z-index: 2;
        margin-block-start: -50svh;
        translate: 0 var(--footer-shift, 50svh);
    }
}

.site-footer a {
    transition: opacity 0.3s ease-out;
}

@media (hover: hover) {
    .site-footer a:hover {
        opacity: 0.7;
    }
}

.site-footer .footer-top {
    display: grid;
    /* Figma: brand on the left, Menu and Collection side by side on the right (12px apart) */
    grid-template-columns: minmax(0, 1fr) repeat(2, minmax(0, 11.9375rem));
    gap: 3rem 0.75rem;
    padding-inline-end: 5.25rem;
}

.site-footer .footer-brand {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
    font-weight: 600;
}

.site-footer .footer-logo {
    display: block;
    inline-size: fit-content;
    margin-block-end: 1.25rem;
}

.site-footer .footer-logo svg {
    display: block;
    inline-size: 10.5rem;
    block-size: auto;
}

.site-footer .footer-contacts {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.site-footer .footer-menu,
.site-footer .footer-collection {
    display: flex;
    flex-direction: column;
    gap: 2.1875rem;
}

.site-footer .menu {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.site-footer .footer-mark {
    display: flex;
    justify-content: flex-end;
    padding-block: 5rem 3rem;
}

.site-footer .footer-mark svg {
    inline-size: 8.0625rem;
    block-size: auto;
}

.site-footer .footer-bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1rem 2rem;
    padding-block: 0.625rem;
    border-block: 1px solid var(--c-beige);
}

.site-footer .footer-legal,
.site-footer .footer-socials {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 1.5rem;
}

/* As on hotelhasslerroma.com: the same 20px between the hashtag and every icon, icons at their own width */
.site-footer .footer-socials {
    gap: 0.5rem 1.25rem;
    justify-content: flex-end;
    margin-inline-start: auto;
}

.site-footer .social-icon {
    display: grid;
    place-items: center;
    min-block-size: 1.5rem;
}

/* Icon sizes as on hotelhasslerroma.com: Facebook 15×15, Instagram and LinkedIn 16×15, TikTok 12×16 */
.site-footer .social-icon svg {
    inline-size: var(--_w, 0.9375rem);
    block-size: var(--_h, 0.9375rem);
}

.site-footer .social-icon-instagram,
.site-footer .social-icon-linkedin {
    --_w: 1rem;
}

.site-footer .social-icon-tiktok {
    --_w: 0.75rem;
    --_h: 1rem;
}

.site-footer .copyright {
    margin-block-start: 0.875rem;
    text-align: end;
}

/* ======================================== */
/* DEFAULT PAGE (privacy, cookie) */
/* ======================================== */

.page-default {
    padding-block: 6rem 7.5rem;
}

.page-default .container {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

/* ======================================== */
/* RESPONSIVE */
/* ======================================== */

@media (width < 80rem) {
    .site-footer .footer-top {
        padding-inline-end: 0;
    }
}

@media (width < 64rem) {
    :is(.services-list, .location-nearby .nearby-list) {
        --_cols: 2;
    }
}

@media (width < 37.5rem) {
    :is(.services-list, .location-nearby .nearby-list) {
        --_cols: 1;
    }
}

@media (width < 64rem) {
    :root {
        --container-x-padding: 1.25rem;
        --header-x-padding: var(--container-x-padding);
        --header-block-size: 4.875rem;
    }

    /* Phones/tablets: the slimmer green bar (desktop follows Figma) */
    .site-header .utility-bar .container {
        min-block-size: 1.625rem;
        padding-block: 0.25rem;
    }

    /* As on hotelhasslerroma.com (mobile): 3.25rem bar, 8.125rem logo */
    .site-header .main-bar-inner {
        grid-template-columns: 1fr auto 1fr;
        min-block-size: calc(3.25rem - 1px);
    }

    /* The lines' left edge on the container padding (48px hit area, 15px icon) */
    .site-header .menu-toggle {
        display: grid;
        place-items: center;
        inline-size: 3rem;
        block-size: 3rem;
        margin-inline-start: calc(var(--header-x-padding) - 1.03125rem);
        cursor: pointer;
    }

    /* As on hotelhasslerroma.com (hamb-dark.svg): four 1px lines, 15px wide, 4px apart (15 x 13).
       The span draws the two middle lines, ::before/::after the outer ones; open, the outer lines
       meet in the middle as the X and the middle ones fade out */
    .site-header .menu-toggle-lines {
        position: relative;
        display: block;
        inline-size: 0.9375rem;
        block-size: 5px;
        background: linear-gradient(currentColor 0 1px, transparent 1px 4px, currentColor 4px 5px);
        transition: opacity 0.3s ease-out;
    }

    .site-header .menu-toggle-lines::before,
    .site-header .menu-toggle-lines::after {
        content: "";
        position: absolute;
        inset-inline: 0;
        block-size: 1px;
        background-color: currentColor;
        transition:
            translate 0.3s ease-out,
            rotate 0.3s ease-out;
    }

    .site-header .menu-toggle-lines::before {
        inset-block-start: -4px;
    }

    .site-header .menu-toggle-lines::after {
        inset-block-start: 8px;
    }

    .site-header .menu-toggle[aria-expanded="true"] .menu-toggle-lines {
        background: none;
    }

    .site-header .menu-toggle[aria-expanded="true"] .menu-toggle-lines::before {
        translate: 0 6px;
        rotate: 45deg;
    }

    .site-header .menu-toggle[aria-expanded="true"] .menu-toggle-lines::after {
        translate: 0 -6px;
        rotate: -45deg;
    }

    .site-header .primary-nav,
    .site-header .header-actions > .lang-switch {
        display: none;
    }

    /* Always on its own compositing layer: otherwise it was promoted only while the menu panel slid
       under it, and its fractional position (centered column) snapped by half a pixel */
    .site-header .site-logo {
        grid-column: 2;
        grid-row: 1;
        will-change: transform;
    }

    .site-header .site-logo svg {
        inline-size: 8.125rem;
    }

    .site-header .book-now {
        min-inline-size: 0;
        padding-inline: 1rem;
        white-space: nowrap; /* "Prenota ora" wrapped on two lines at 390px */
    }

    /* Phones/tablets: the short label ("Book" / "Prenota") */
    .site-header .book-now-long {
        display: none;
    }

    .site-header .book-now-short {
        display: inline;
    }

    /* Mobile menu: a white panel that opens right under the green utility bar (JS sets --utility-height)
       and slides in from the left under "Book now" and the toggle, which stay on top (the toggle turns
       into the X); the header itself does not move. Languages, grey "Menu" label, big black serif links.
       Open: slide in (0.55s, power2.out), the contents fade in just after; close: it slides back out */
    .site-header .mobile-menu {
        position: fixed;
        inset: var(--utility-height, 1.625rem) 0 0;
        z-index: var(--z-menu);
        display: flex;
        flex-direction: column;
        overflow-y: auto;
        overscroll-behavior: contain;
        background-color: var(--c-white);
        color: var(--c-black);
        transition:
            translate 0.55s cubic-bezier(0.25, 0.46, 0.45, 0.94),
            visibility 0s linear;
    }

    .site-header .mobile-menu:not([data-open]) {
        visibility: hidden;
        translate: -100% 0;
        pointer-events: none;
        transition:
            translate 0.45s cubic-bezier(0.55, 0.085, 0.68, 0.53),
            visibility 0s linear 0.45s;
    }

    .site-header .mobile-menu > * {
        transition:
            opacity 0.4s ease-out 0.2s,
            translate 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.2s;
    }

    .site-header .mobile-menu:not([data-open]) > * {
        opacity: 0;
        translate: -1.875rem 0;
        transition:
            opacity 0.2s ease-out,
            translate 0.2s ease-out;
    }

    @media (prefers-reduced-motion: reduce) {
        .site-header .mobile-menu,
        .site-header .mobile-menu:not([data-open]),
        .site-header .mobile-menu > *,
        .site-header .mobile-menu:not([data-open]) > * {
            translate: none;
        }

        .site-header .mobile-menu:not([data-open]) {
            opacity: 0;
        }

        .site-header .mobile-menu {
            transition-property: opacity, visibility;
        }
    }

    /* "Book now", the toggle and the logo above the sliding panel */
    .site-header .header-actions,
    .site-header .menu-toggle,
    .site-header .site-logo {
        position: relative;
        z-index: calc(var(--z-menu) + 1);
    }

    /* Over the bar's grey line below too (its red goes down over it) */
    .site-header .header-actions {
        z-index: calc(var(--z-menu) + 2);
    }

    /* The bar's grey line stays visible over the open panel too (drawn again above it, under "Book now",
       whose red still covers it). No z-index on .main-bar: the line joins the header's stacking context */
    .site-header .main-bar {
        position: relative;
    }

    .site-header .main-bar::after {
        content: "";
        position: absolute;
        inset: auto 0 -1px;
        z-index: calc(var(--z-menu) + 1);
        block-size: 1px;
        background-color: var(--c-grey);
        pointer-events: none;
    }

    /* The panel starts at the bar's top edge: its contents start under the bar's row */
    .site-header .mobile-menu-top {
        flex-shrink: 0;
        padding-block-start: calc(3.25rem + 1.5rem);
        padding-inline: var(--header-x-padding);
    }

    .site-header .mobile-menu-langs ul {
        display: flex;
        gap: 2.5rem;
    }

    .site-header .mobile-menu-langs a {
        display: inline-block;
        padding-block: 0.5rem;
        font-size: 0.75rem;
        line-height: 1.35;
        font-weight: 600;
    }

    .site-header .mobile-menu-langs a[aria-current] {
        text-decoration: underline;
        text-underline-offset: 0.2em;
    }

    .site-header .mobile-nav {
        padding-block: 2.5rem;
        padding-inline: var(--header-x-padding);
    }

    .site-header .mobile-menu-title {
        margin-block-end: 1rem;
        color: var(--c-grey-darker);
    }

    /* All black, the current page too (no red link in the menu) */
    .site-header .mobile-menu .menu a {
        display: block;
        padding-block: 0.1875rem;
        font-family: var(--ff-primary);
        font-size: 2rem;
        line-height: 1.05;
        text-transform: uppercase;
        color: var(--c-black);
    }

    /* Scroll lock while open: on the root only. Overflow on <body> made it a scroll container of its own
       and the sticky header jumped out of place */
    html:has(.mobile-menu[data-open]) {
        overflow: hidden;
    }

    .section-position > .container {
        grid-template-columns: minmax(0, 1fr);
    }

    .apartment .apartment-body {
        grid-template-columns: minmax(0, 1fr);
    }

    .apartment .apartment-box {
        position: static;
    }

    .location-intro .container {
        grid-template-columns: minmax(0, 1fr);
    }

    .location-intro .location-intro-text {
        padding-block-start: 0;
    }

    .contacts {
        grid-template-columns: minmax(0, 1fr);
    }

    .contacts .contacts-intro {
        min-block-size: 26rem;
    }

    /* The text sits at the bottom here: darken the bottom instead of the top */
    .contacts .contacts-intro::before {
        background: linear-gradient(to top, rgb(0 0 0 / 0.28) 0%, rgb(0 0 0 / 0.28) 40%, rgb(0 0 0 / 0.05) 75%);
    }

    .contacts .contacts-intro-text {
        justify-content: flex-end;
        padding-block: 5rem 3rem;
    }

    .contacts .contacts-form {
        justify-content: flex-start;
        padding-block: 3.5rem 5rem;
    }

    .site-footer .footer-top {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .site-footer .footer-brand {
        grid-column: 1 / -1;
    }
}

@media (width < 48rem) {
    .site-header .utility-bar .utility-text {
        display: none;
    }

    .section-intro {
        gap: 3.5rem;
        padding-block: 5rem;
    }

    .apartments-slider {
        --_scale: 0.8;
    }

    .apartments-slider .slider-arrows {
        display: none;
    }

    /* Static apartments (only "Coming soon" besides the bookable one): no slider on phones, only the
       bookable apartment (the "Coming soon" cards are hidden; with more apartments the slider comes back) */
    .apartments-slider.is-static .apartments-slide:has(.is-coming-soon) {
        display: none;
    }

    .apartments-slider.is-static {
        padding-inline: var(--container-x-padding);
    }

    .js .apartments-slider.is-static .apartments-slider-track {
        flex-direction: column;
        gap: 3rem;
        translate: none;
    }

    .js .apartments-slider.is-static .apartments-slide {
        flex: none;
        inline-size: 100%;
        margin: 0;
        translate: none;
    }

    .js .apartments-slider.is-static .apartments-slide.is-active {
        order: -1;
    }

    .js .apartments-slider.is-static .apartments-slide:not(.is-active) :is(.apartment-card-media, .apartment-card-body) {
        scale: none;
        translate: none;
    }

    /* Footer bottom as on hotelhasslerroma.com (phones): line, legal links spread over the width, line,
       socials row (hashtag left, icons right) with no line under it, then the copyright */
    .site-footer .footer-bottom {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding-block-end: 0;
        border-block-end: 0;
    }

    .site-footer .footer-legal {
        justify-content: space-between;
    }

    .site-footer .footer-socials {
        margin-block-start: 0.875rem;
        margin-inline-start: 0;
        padding-block-start: 0.875rem;
        border-block-start: 1px solid currentColor;
    }

    .site-footer .footer-socials li:first-child {
        margin-inline-end: auto;
    }

    .site-footer .copyright {
        margin-block-start: 1.5rem;
    }

    /* Location "nearby": a swipe slider on phones (native scroll with snap, the next card peeks in) */
    .location-nearby .nearby-list {
        display: flex;
        gap: 1.25rem;
        /* Horizontal only: no vertical scroll inside the slider (iOS let the cards be dragged freely) */
        overflow: auto hidden;
        overscroll-behavior-x: contain;
        touch-action: pan-x pan-y;
        scroll-snap-type: x mandatory;
        scroll-padding-inline: var(--container-x-padding);
        scrollbar-width: none;
    }

    .location-nearby .nearby-list::-webkit-scrollbar {
        display: none;
    }

    .location-nearby .nearby-card {
        flex: 0 0 78%;
        padding-inline-end: 0;
        scroll-snap-align: start;
        scroll-snap-stop: always;
    }

    /* Cards waiting off-screen to the right only fade in: their 2rem rise made the slider taller
       than its box (vertical scroll inside it, text cut at the bottom) */
    .js .location-nearby .nearby-card[data-reveal] {
        translate: none;
    }

    .location-nearby .nearby-card-media {
        margin-inline-end: 0;
    }

    .section-position,
    .location-intro {
        padding-block: 5rem;
    }

    /* Same white as the intro above (whose 5rem already separates them): less space on phones */
    .location-nearby {
        gap: 2.5rem;
        padding-block: 1.5rem 4rem;
    }

    .location-nearby .section-head {
        gap: 1.75rem;
    }

    .section-services,
    .location-arrive {
        padding-block: 5rem;
    }

    .section-services .container,
    .location-arrive .container {
        gap: 3rem;
    }

    .apartment-place {
        padding: 1.25rem;
    }

    .apartment-place .apartment-place-head,
    .location-map .location-map-card .apartment-place-head {
        grid-template-columns: 7.5rem minmax(0, 1fr);
        gap: 1rem;
    }

    .apartment .apartment-head {
        padding-block-start: 3.5rem;
    }

    .apartment .apartment-body {
        padding-block: 3.5rem 5rem;
    }

    .apartment .apartment-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .apartment .apartment-box {
        padding: 1.75rem 1.25rem;
    }

    .gallery-dialog .gallery-slide {
        padding-inline: var(--container-x-padding);
        padding-block-end: 6rem;
    }

    .gallery-dialog .gallery-arrow {
        inset-block-start: auto;
        inset-block-end: 1.5rem;
        translate: none;
    }

    .location-map {
        padding-block: 5rem 3rem;
    }

    .location-map .eg-map {
        block-size: 28rem;
    }

    .location-map .location-map-card {
        position: relative;
        inset: auto;
        inline-size: auto;
        margin-block-start: 1rem;
    }

    .location-map .location-map-card .apartment-place {
        padding-inline: 0;
    }

    .section-push .push-content {
        gap: 2.5rem;
    }

    .site-footer {
        padding-block-start: 4.5rem;
    }

    .site-footer .footer-mark {
        padding-block-start: 3rem;
    }

    .site-footer .copyright {
        text-align: start;
    }
}

/* Short screens: smaller starting portrait in the hero */
@media (height < 45rem) {
    .hero-home {
        --_img-w: 15rem;
        --_img-h: 17.25rem;
    }
}

@media (width < 48rem) {
    .hero-home {
        --_img-w: 13rem;
        --_img-h: 15rem;
    }

    /* The two buttons share the whole row, out to the container padding, 10px apart */
    .hero-home .hero-actions {
        align-self: stretch;
        gap: 0.625rem;
    }

    .hero-home .hero-actions .btn {
        min-inline-size: 0;
        flex: 1 1 9rem;
    }
}

@media (forced-colors: active) {
    .btn,
    .slider-arrow,
    .gallery-arrow {
        border-color: ButtonText;
    }
}

/* ======================================== */
/* 404 */
/* ======================================== */

.error-404 {
    display: grid;
    place-items: center;
    min-block-size: 60svh;
    padding-block: 6rem;
    text-align: center;
}

.error-404 .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.75rem;
}

/* The text column got 179px between 1024 and 1280 next to the fixed-width map: stack earlier */
@media (width < 80rem) {
    .section-position > .container {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* Visible keyboard focus on the map controls (MapLibre removes the outline) */
.eg-map .maplibregl-ctrl button:focus-visible,
.eg-map .maplibregl-ctrl-attrib-button:focus-visible {
    outline: 2px solid var(--c-black);
    outline-offset: 2px;
}

/* Touch targets of at least 24px (WCAG 2.5.8) for the small text links */
@media (pointer: coarse) {
    .site-footer a,
    .site-header .utility-bar .utility-link {
        min-block-size: 1.5rem;
        display: inline-flex;
        align-items: center;
    }

    /* "Discover" under the apartment: the bigger hit area does not take room, so the space under the
       text matches the next section's top padding (a min-height left ~6px of empty box under it) */
    .apartment-card :is(.eg-link, .apartment-card-cta) {
        position: relative;
    }

    .apartment-card :is(.eg-link, .apartment-card-cta)::before {
        content: "";
        position: absolute;
        inset: -0.375rem 0;
    }
}
