/* Shared room UI for kastelart.it (1.5 preview fixes).
 *
 *   .kc-slider   photo slider (swipe on phone, round arrows), floor plan = last slide
 *   .kc-price    round gold price badge, pinned to the bottom-left of the photo
 *   .kc-room     room card used on Home, Wohnen and the "Auch bei uns" block
 *   .kc-amenities grouped Ausstattung list
 *   .kc-viewer   photo viewer (feed on the phone, large photo with arrows on desktop)
 *
 * Behaviour lives in room-ui.js. No fixed heights: everything sizes itself
 * from the available width.
 */

:root {
    --kc-gold: #cea82c;
    --kc-gold-soft: rgba(206, 168, 44, .1);
    --kc-ink: #484036;
    --kc-muted: #9b8e7d;
}

/* ---------- Slider ---------- */
.kc-slider {
    position: relative;
    width: 100%;
}

.kc-slider__stage {
    position: relative;
    background: #f1ece3;
}

.kc-slider__track {
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    overscroll-behavior-x: contain;
}

.kc-slider__track::-webkit-scrollbar {
    display: none;
}

.kc-slide {
    flex: 0 0 100%;
    margin: 0;
    position: relative;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    aspect-ratio: 16 / 10;
    background: #f1ece3;
}

.kc-slide img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.kc-slide--plan {
    background: #fff;
}

.kc-slide--plan img {
    object-fit: contain;
    padding: 12px;
}

.kc-slide__label {
    position: absolute;
    right: 14px;
    top: 14px;
    background: rgba(255, 255, 255, .92);
    color: var(--kc-ink);
    font-size: 14px;
    line-height: 1;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 7px 10px;
}

.kc-slider[data-kc-viewer]:not([data-kc-next]) .kc-slide img {
    cursor: zoom-in;
}

.kc-slider[data-kc-next] .kc-slide img {
    cursor: pointer;
}

.kc-slider__zoom {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 3;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 50%;
    padding: 0;
    background: rgba(255, 255, 255, .88);
    color: var(--kc-ink);
    font-size: 20px;
    line-height: 40px;
    cursor: pointer;
    box-shadow: 0 1px 6px rgba(0, 0, 0, .25);
}

.kc-dots {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px 0 0;
    min-height: 26px;
}

.kc-dot {
    width: 10px;
    height: 10px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(72, 64, 54, .28);
    cursor: pointer;
}

.kc-dot--plan {
    border-radius: 2px;
}

.kc-dot.is-active {
    background: var(--kc-gold);
    transform: scale(1.25);
}

.kc-slider__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 0;
    padding: 0;
    background: rgba(255, 255, 255, .88);
    color: var(--kc-ink);
    font-size: 28px;
    line-height: 44px;
    text-align: center;
    cursor: pointer;
    box-shadow: 0 1px 6px rgba(0, 0, 0, .25);
    z-index: 3;
}

.kc-slider__nav:hover {
    background: #fff;
}

.kc-slider__nav:disabled {
    opacity: 0;
    pointer-events: none;
}

.kc-slider__nav--prev {
    left: 12px;
}

.kc-slider__nav--next {
    right: 12px;
}

/* ---------- Price badge (kept: round gold circle with white ring) ---------- */
.kc-price {
    position: absolute;
    left: -72px;
    bottom: -52px;
    z-index: 4;
    width: 236px;
    height: 236px;
    padding: 20px 0 0 14px;
    box-sizing: content-box;
    border-radius: 50%;
    background: var(--kc-gold);
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    pointer-events: none;
}

.kc-price::after {
    content: "";
    position: absolute;
    top: 20px;
    left: 14px;
    width: 223px;
    height: 223px;
    box-sizing: content-box;
    border: 3px solid #fff;
    border-radius: 50%;
    opacity: .5;
}

.kc-price__value {
    font-size: 40px;
    line-height: 48px;
    white-space: nowrap;
}

.kc-price__info {
    font-size: 19px;
    line-height: 48px;
}

.kc-price--green {
    background: #c3c335;
}

.kc-price--green .kc-price__info {
    padding: 0 18px;
    line-height: 17px;
}

/* the slider's counter and arrows must not collide with the badge */

/* ---------- Room card ---------- */
.kc-rooms {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 40px;
    box-sizing: border-box;
}

.kc-room {
    position: relative;
    margin: 0 0 56px;
    color: var(--kc-ink);
    cursor: pointer;
}

.kc-room__body {
    background: var(--kc-gold-soft);
    padding: 28px 32px 30px;
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    column-gap: 40px;
    row-gap: 18px;
    align-items: start;
}

.kc-room__name {
    margin: 0;
    font-family: "Playfair Display", Georgia, serif;
    font-size: 36px;
    line-height: 44px;
    font-weight: 400;
    letter-spacing: 3px;
}

.kc-room__name a {
    color: var(--kc-ink);
    text-decoration: none;
}

.kc-room:hover .kc-room__name a {
    color: var(--kc-gold);
}

.kc-room__meta {
    margin: 4px 0 0;
    font-size: 20px;
    line-height: 28px;
    color: var(--kc-muted);
}

.kc-room__text {
    margin: 0;
    font-size: 18px;
    line-height: 28px;
}

.kc-room__actions {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px 26px;
}

.kc-btn {
    display: inline-block;
    font: inherit;
    font-size: 16px;
    line-height: 20px;
    letter-spacing: 2px;
    text-transform: uppercase;
    text-decoration: none;
    padding: 13px 30px;
    border: 2px solid var(--kc-gold);
    background: var(--kc-gold);
    color: #fff;
    cursor: pointer;
    position: relative;
    z-index: 2;
}

.kc-btn:hover {
    background: #b8941f;
    border-color: #b8941f;
    color: #fff;
}

.kc-textbtn {
    font: inherit;
    font-size: 16px;
    letter-spacing: 2px;
    text-transform: uppercase;
    background: none;
    border: 0;
    padding: 6px 0;
    color: var(--kc-ink);
    border-bottom: 2px solid var(--kc-gold);
    cursor: pointer;
    position: relative;
    z-index: 2;
}

.kc-textbtn::after {
    content: " \25BE";
}

.kc-textbtn[aria-expanded="true"]::after {
    content: " \25B4";
}

.kc-room__prices {
    display: none;
    grid-column: 1 / -1;
    cursor: default;
    font-size: 16px;
    line-height: 24px;
}

.kc-room__prices.is-open {
    display: block;
}

.kc-room__prices .price-kalender {
    margin-bottom: 14px;
}

.kc-room__prices p {
    margin: 0 0 12px;
}

.kc-room-section {
    margin-top: 40px;
}

.kc-room-section__title {
    text-align: center;
    font-family: "Playfair Display", Georgia, serif;
    font-weight: 400;
    font-size: 30px;
    line-height: 38px;
    letter-spacing: 3px;
    color: var(--kc-ink);
    margin: 0 0 32px;
    padding: 0 20px;
}

/* ---------- Ausstattung (grouped list) ---------- */
.kc-amenities {
    margin: 10px 0 20px;
    color: var(--kc-ink);
}

.kc-amenities__title {
    font-size: 30px;
    line-height: 36px;
    margin: 0 0 18px;
}

.kc-amenities__group {
    margin: 0 0 22px;
}

.kc-amenities__heading {
    margin: 0 0 8px;
    font-family: "Playfair Display", Georgia, serif;
    font-weight: 400;
    font-size: 15px;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--kc-gold);
    border-bottom: 1px solid rgba(206, 168, 44, .45);
    padding-bottom: 6px;
}

.kc-amenities__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 16px;
}

.kc-amenities__list li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 17px;
    line-height: 24px;
}

.kc-amenities__list li small {
    display: block;
    font-size: 14px;
    line-height: 18px;
    color: var(--kc-muted);
}

.kc-amenities__icon {
    flex: 0 0 26px;
    width: 26px;
    height: 26px;
    margin-top: -1px;
    color: var(--kc-gold);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.kc-amenities__icon svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.kc-amenities--center {
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
}

.kc-amenities--center .kc-amenities__title {
    text-align: center;
}

/* Studio / Apartment / Wellness detail pages */
.kc-detail {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 40px 20px;
    box-sizing: border-box;
}

.kc-detail__slider {
    max-width: 1200px;
    margin: 0 auto 36px;
    padding: 0 40px;
    box-sizing: border-box;
}

.kc-detail__head {
    margin: 0 0 24px;
}

.kc-detail__head .item-list__name {
    display: block;
}

.kc-detail__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px 26px;
    align-items: center;
    margin: 28px 0 10px;
}

.kc-detail__prices {
    display: none;
    margin-top: 10px;
}

.kc-detail__prices.is-open {
    display: block;
}

/* The wellness page: warm background down to the footer, like Studio/Apartment */
.kc-warm {
    background: var(--kc-gold-soft);
    padding: 36px 0 40px;
}

/* ---------- Photo viewer ---------- */
.kc-viewer {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: #000;
    color: #fff;
    display: none;
}

.kc-viewer.is-open {
    display: block;
}

body.kc-viewer-open {
    overflow: hidden;
}

.kc-viewer__close {
    position: fixed;
    top: 12px;
    right: 12px;
    z-index: 3;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 0;
    background: rgba(0, 0, 0, .6);
    color: #fff;
    font-size: 30px;
    line-height: 46px;
    padding: 0;
    cursor: pointer;
}

.kc-viewer__count {
    position: fixed;
    top: 22px;
    left: 18px;
    z-index: 3;
    font-size: 16px;
    letter-spacing: 1px;
    text-shadow: 0 1px 4px rgba(0, 0, 0, .8);
}

/* desktop: one large photo, arrows */
.kc-viewer__stage {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 56px 90px;
    box-sizing: border-box;
}

.kc-viewer__stage img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
}

.kc-viewer__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 0;
    background: rgba(255, 255, 255, .15);
    color: #fff;
    font-size: 36px;
    line-height: 52px;
    padding: 0;
    cursor: pointer;
    z-index: 2;
}

.kc-viewer__nav:hover {
    background: rgba(255, 255, 255, .3);
}

.kc-viewer__nav--prev {
    left: 16px;
}

.kc-viewer__nav--next {
    right: 16px;
}

/* phone: vertical feed, one big photo after the other */
.kc-viewer__feed {
    display: none;
    position: absolute;
    inset: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background: #111;
    padding: 64px 0 40px;
}

.kc-viewer__feed img {
    display: block;
    width: 100%;
    height: auto;
    margin: 0 0 10px;
}

.kc-viewer--feed .kc-viewer__stage,
.kc-viewer--feed .kc-viewer__nav {
    display: none;
}

.kc-viewer--feed .kc-viewer__feed {
    display: block;
}

.kc-viewer--feed .kc-viewer__count {
    display: none;
}

/* ---------- Preise: gold switch ---------- */
.pk-switch {
    display: inline-flex;
    border: 2px solid var(--kc-gold);
    margin: 0 0 18px;
}

.pk-switch__btn {
    font: inherit;
    font-size: 16px;
    letter-spacing: 2px;
    text-transform: uppercase;
    padding: 12px 30px;
    border: 0;
    background: #fff;
    color: var(--kc-ink);
    cursor: pointer;
    min-width: 150px;
}

.pk-switch__btn[aria-pressed="true"] {
    background: var(--kc-gold);
    color: #fff;
    font-weight: 700;
}

.pk-title {
    margin: 4px 0 6px;
    font-family: "Playfair Display", Georgia, serif;
    font-weight: 400;
    font-size: 26px;
    letter-spacing: 3px;
    color: var(--kc-ink);
}

.pk-unit-note {
    margin: 0 0 10px;
    font-size: 0.75em;
    color: var(--kc-muted);
}


/* ---------- Details / price panels, ghost button, price tiles ---------- */
.kc-btn--ghost {
    background: transparent;
    color: var(--kc-ink);
}

.kc-btn--ghost:hover,
.kc-btn--ghost[aria-expanded="true"] {
    background: transparent;
    border-color: var(--kc-gold);
    color: var(--kc-ink);
}

.kc-room__panel {
    display: none;
    grid-column: 1 / -1;
    cursor: default;
    font-size: 16px;
    line-height: 24px;
    border-top: 1px solid rgba(0, 0, 0, 0.12);
    padding-top: 22px;
}

.kc-room__panel.is-open {
    display: block;
}

.kc-room__panel .price-kalender {
    margin-bottom: 14px;
}

.kc-room__panel p {
    margin: 0 0 12px;
}

.kc-room--price {
    cursor: default;
}

.kc-room__body--price {
    grid-template-columns: 1fr;
}

.kc-room__headline {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 6px 20px;
}

.kc-infolink {
    font-size: 16px;
    letter-spacing: 1px;
    color: var(--kc-ink);
    text-decoration: none;
    border-bottom: 2px solid var(--kc-gold);
    padding-bottom: 2px;
}

.kc-infolink:hover {
    color: #8a6d12;
}

.kc-conditions {
    max-width: 1080px;
    margin: 20px auto 40px;
    padding: 0 40px;
    box-sizing: border-box;
    scroll-margin-top: 20px;
}

@media screen and (max-width: 600px) {
    .kc-conditions {
        padding: 0 12px;
    }
}

/* ---------- Phone ---------- */
@media screen and (max-width: 900px) {
    .kc-price {
        left: -14px;
        bottom: -44px;
    }

    .kc-room__body {
        grid-template-columns: 1fr;
        padding: 22px 22px 26px;
    }

    .kc-rooms,
    .kc-detail,
    .kc-detail__slider {
        padding-left: 20px;
        padding-right: 20px;
    }
}

@media screen and (max-width: 600px) {
    .kc-slide {
        aspect-ratio: 4 / 3;
    }

    .kc-price {
        width: 150px;
        height: 150px;
        padding: 13px 0 0 9px;
        left: -8px;
        bottom: -30px;
    }

    .kc-price::after {
        top: 13px;
        left: 9px;
        width: 142px;
        height: 142px;
    }

    .kc-price__value {
        font-size: 25px;
        line-height: 30px;
    }

    .kc-price__info {
        font-size: 12px;
        line-height: 30px;
    }

    .kc-price--green .kc-price__info {
        padding: 0 12px;
        line-height: 15px;
    }

    .kc-slider__nav {
        width: 38px;
        height: 38px;
        line-height: 38px;
        font-size: 24px;
    }

    .kc-rooms,
    .kc-detail,
    .kc-detail__slider {
        padding-left: 12px;
        padding-right: 12px;
    }

    .kc-room {
        margin-bottom: 36px;
    }

    .kc-room__name {
        font-size: 28px;
        line-height: 34px;
        letter-spacing: 2px;
    }

    .kc-room__meta {
        font-size: 18px;
    }

    .kc-room__text {
        font-size: 17px;
        line-height: 26px;
    }

    .kc-btn {
        padding: 12px 24px;
    }

    .kc-room-section__title {
        font-size: 24px;
        line-height: 32px;
        letter-spacing: 2px;
    }

    .kc-amenities__list li {
        font-size: 16px;
    }

    .pk-switch {
        display: flex;
    }

    .pk-switch__btn {
        flex: 1 1 0;
        min-width: 0;
        padding: 12px 8px;
    }

    .pk-title {
        font-size: 22px;
    }
}

@media screen and (min-width: 901px) {
    .kc-amenities__list {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .kc-detail .kc-amenities__list {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (prefers-reduced-motion: reduce) {
    .kc-slider__track {
        scroll-behavior: auto;
    }
}

.kc-slider.is-plan .kc-price {
    opacity: 0;
}

/* Wellness photos laid out like the Fotogalerie: justified rows on tablet/desktop,
   one wide photo then pairs on the phone */
.kc-slider--grid .kc-slider__stage {
    background: none;
}

.kc-slider--grid .kc-slider__track {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    overflow: visible;
    scroll-snap-type: none;
}

.kc-slider--grid .kc-slide {
    flex: var(--ar, 1.4) 1 calc(var(--ar, 1.4) * 250px);
    height: 250px;
    aspect-ratio: auto;
    min-width: 0;
}

.kc-slider--grid .kc-slider__nav,
.kc-slider--grid .kc-dots,
.kc-slider--grid .kc-slider__zoom {
    display: none;
}

.kc-slider--grid .kc-price {
    bottom: -164px; /* 36px gap + half the badge: centred on the edge of the Wellnesslounge box */
}

@media screen and (max-width: 700px) {
    .kc-slider--grid .kc-slider__track {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .kc-slider--grid .kc-slide {
        height: auto;
        aspect-ratio: 1 / 1;
    }

    .kc-slider--grid .kc-slide:first-child,
    .kc-slider--grid .kc-slide--plan {
        grid-column: 1 / -1;
        aspect-ratio: 16 / 10;
    }

    .kc-slider--grid .kc-slide--plan {
        aspect-ratio: auto;
    }

    .kc-slider--grid .kc-price {
        bottom: -118px;
    }
}

/* gold Anfragen/Preise bar must not hide the end of a page on the phone */
@media screen and (max-width: 600px) {
    .footer-main {
        padding-bottom: 76px;
    }
}

/* Wellness hero: fills its width with a fixed crop, no grey band */
.kc-hero {
    display: block;
    width: 100%;
    height: clamp(220px, 42vw, 560px);
    object-fit: cover;
}

.kc-detail .kc-detail__head + .kc-amenities {
    margin-top: 0;
}

.pk-unit-note--mobile {
    display: none;
}

@media screen and (max-width: 600px) {
    .pk-unit-note--mobile {
        display: block;
    }
}

/* ---------- Gallery page ---------- */
.kc-chips {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin: 0 0 28px;
}

.kc-chip {
    font-size: 15px;
    letter-spacing: 1px;
    color: var(--kc-ink);
    text-decoration: none;
    border: 1.5px solid var(--kc-gold);
    padding: 8px 16px;
    border-radius: 22px;
    background: #fff;
}

.kc-chip:hover {
    background: var(--kc-gold);
    color: #fff;
}

.kc-gallery {
    overflow-x: hidden;
}

.kc-gallery .gallery-item__name {
    scroll-margin-top: 90px;
}

.kc-gallery .gallery-images.row {
    justify-content: center;
}

@media screen and (max-width: 700px) {
    .kc-gallery .container.gallery-container {
        padding: 0 10px !important;
    }

    .kc-gallery .gallery-images.row {
        display: grid !important;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
        margin: 0 0 24px !important;
        padding: 0 !important;
    }

    .kc-gallery .gallery-images .gallery-images__item,
    .kc-gallery .gallery-images .gallery-images__item:nth-child(n) {
        max-width: none !important;
        width: auto !important;
        float: none !important;
        margin: 0 !important;
        padding: 0 !important;
        display: block;
    }

    .kc-gallery .gallery-images .gallery-images__item:nth-child(3n+1) {
        grid-column: 1 / -1;
    }

    .kc-gallery .gallery-images__item img {
        width: 100% !important;
        height: 100% !important;
        margin: 0 !important;
        object-fit: cover;
        aspect-ratio: 1 / 1;
        display: block;
    }

    .kc-gallery .gallery-images__item:nth-child(3n+1) img {
        aspect-ratio: 16 / 10;
    }
}

/* no white strip between photo and card: dots sit on the card colour */
.kc-room .kc-dots {
    background: var(--kc-gold-soft);
    padding: 14px 0 0;
}

/* when both panels are open, the prices come first and the details below them */
.kc-room__panel[id^="prices-"] {
    order: 1;
}

.kc-room__panel[id^="details-"] {
    order: 2;
}

/* phone: room for the badge that straddles the edge of the Wellnesslounge box */
@media screen and (max-width: 700px) {
    .kc-warm {
        padding-top: 100px;
    }
}

/* Wellness: Ausstattung centred as a group */
.kc-amenities--center .kc-amenities__list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px 44px;
}

.kc-amenities--center .kc-amenities__list li {
    align-items: center;
}
