body {
    background-color: #f8f9fa;
    overflow-x: clip; /* decorative ::before/::after lines must not create a horizontal scrollbar */
}

.card-img-top {
    height: 220px;
    object-fit: cover;
}

.navbar-brand {
    letter-spacing: 0.5px;
}

.card {
    border: none;
    border-radius: 12px;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-3px);
    transition: transform 0.2s ease-in-out;
}

/* Verfügbarkeitskalender */
.cal-weekdays, .cal-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    text-align: center;
}

.cal-weekday {
    font-size: 0.75rem;
    font-weight: 600;
    color: #6c757d;
    padding: 4px 0;
}

.cal-day {
    padding: 8px 0;
    border-radius: 6px;
    font-size: 0.85rem;
}

.cal-empty {
    background: transparent;
}

.cal-past {
    color: #ced4da;
}

.cal-free {
    background: #e9f7ef;
    cursor: pointer;
}

.cal-free:hover {
    background: #c9f0da;
}

.cal-booked {
    background: #f8d7da;
    color: #842029;
    text-decoration: line-through;
}

.cal-selected {
    background: #198754 !important;
    color: #fff !important;
    font-weight: bold;
}

.cal-in-range {
    background: #d1e7dd !important;
}

.cal-legend span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-right: 12px;
    font-size: 0.8rem;
}

.cal-legend .dot {
    width: 12px;
    height: 12px;
    border-radius: 3px;
    display: inline-block;
}

/* Aktive Seite in der Navigation hervorheben
.navbar .nav-link.active {
    font-weight: 600;
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-decoration-color: rgba(255,255,255,0.8);
}
*/

/* ------------------------------------------------------------------
   Performance / layout stability (CLS, LCP, INP)
   ------------------------------------------------------------------ */

/* Icon fonts load asynchronously: reserve the glyph box so text does not jump */
.fa, .fas, .far, .fab,
[class^="bi-"], [class*=" bi-"] {
    display: inline-block;
    min-width: 1em;
    text-align: center;
}

/* Decorative picture grids: fixed aspect ratio even before the image has loaded */
.gallery-img {
    aspect-ratio: 4 / 3;
    object-fit: cover;
    height: auto;
}

/* Bungalow cards (images come from the database, natural size unknown) */
.room-item .room-img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    background: #e9ecef;
}

/* Hero carousel: keep the ratio of the 1500x600 artwork */
#header-carousel .carousel-item img {
    height: auto;
    aspect-ratio: 5 / 2;
    object-fit: cover;
}
@media (max-width: 768px) {
    #header-carousel .carousel-item img {
        aspect-ratio: auto;
    }
}

/* Team portrait */
.team-img {
    aspect-ratio: 311 / 294;
    object-fit: cover;
    width: 100%;
    height: auto;
}

/* Footer QR/business card */
.footer-qr {
    aspect-ratio: 640 / 384;
    height: auto;
}

/* Language switcher in the navbar */
.lang-switch .lang-link {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
}
.lang-switch .lang-link:hover,
.lang-switch .lang-link.is-current {
    color: var(--primary, #198754);
}
.lang-switch .lang-more img {
    height: 20px;
    width: auto;
    max-width: 100px;
    cursor: pointer;
}
@media (max-width: 991.98px) {
    .lang-switch { padding: 10px 0 !important; }
}

/* Marquee: compositor-only animation, respects reduced-motion */
.marquee-content { will-change: transform; }
/* NOTE: the marquee is intentionally NOT disabled for prefers-reduced-motion:
   many phones (battery saver / "remove animations") report it, which stopped the ticker on mobile. */
@media (prefers-reduced-motion: reduce) {
    .animated { animation: none !important; }
}

/* Footer is far below the fold: skip its rendering until needed */
.footer {
    content-visibility: auto;
    contain-intrinsic-size: auto 520px;
}

/* Reserve space for the (client-rendered) availability calendar */
#calGrid { min-height: 260px; }
/* Reserve space for AJAX price box */
#priceBreakdown, #qbPriceBreakdown { min-height: 0; }

.marquee-item { font-family: inherit; cursor: pointer; }

/* ------------------------------------------------------------------
   FAQ accordion (native <details>, no JavaScript needed)
   ------------------------------------------------------------------ */
.faq-section {
    max-width: 900px;
    margin: 40px auto 0;
    padding: 0 20px;
}
.faq-section h2 {
    margin: 0 0 25px;
    font-size: 28px;
    line-height: 1.3;
}
.faq-section .faq-item {
    margin: 0;
    border-bottom: 1px solid #ddd;
}
.faq-section .faq-item:first-of-type {
    border-top: 1px solid #ddd;
}
.faq-section summary {
    position: relative;
    padding: 18px 45px 18px 5px;
    cursor: pointer;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.5;
    list-style: none;
}
.faq-section summary::-webkit-details-marker { display: none; }
.faq-section summary::after {
    content: "+";
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 26px;
    font-weight: 400;
}
.faq-section details[open] summary::after { content: "\2212"; }
.faq-section .faq-answer { padding: 0 45px 20px 5px; }
.faq-section .faq-answer p { margin: 0; line-height: 1.7; }
@media (max-width: 600px) {
    .faq-section { padding: 0 15px; margin: 30px auto; }
    .faq-section h2 { font-size: 24px; }
    .faq-section summary { font-size: 16px; padding-top: 16px; padding-bottom: 16px; }
}
.seo-text h2, .seo-text h3 { margin-top: 1.6rem; }

/* Back-to-top: hidden until the page is scrolled (JS toggles inline display) */
.btn.back-to-top { display: none; }

/* Navigation: keep every item on one line even with the language switcher */
.navbar-dark .navbar-nav .nav-link { white-space: nowrap; }
@media (min-width: 992px) and (max-width: 1399.98px) {
    .navbar-dark .navbar-nav .nav-link { margin-right: 16px; font-size: 14px; }
    .lang-switch .lang-more img { width: 70px; height: 14px; }
}
@media (min-width: 992px) and (max-width: 1199.98px) {
    .lang-switch .lang-more img { width: 48px; height: 10px; }
}

/* Thong Sala text blocks / gallery */
.ts-list { padding-left: 1.2rem; margin-bottom: 1rem; }
.ts-list li { margin-bottom: .2rem; }
.ts-photo { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; height: auto; background: #f1f1f1; }

/* CLS: reserve the icon glyph box before the async icon fonts arrive */
i.bi, i.fa, i.fas, i.far, i.fab {
    display: inline-block;
    min-width: 1em;
    height: 1em;
    line-height: 1;
    vertical-align: -0.125em;
}
.carousel-item { min-height: 1px; }
