/* Casa Boa Vista – Frontend-Ergänzungen (Agent 05)
 * Mobile-First (360 px), WCAG 2.1 AA, reduzierte Bewegung.
 * Ergänzt assets/css/style.css, ersetzt es nicht. Bootstrap 4 bleibt aktiv.
 */

/* ---------- Skip-Link / Fokus ---------- */
.cb-skip-link {
    position: absolute;
    left: -10000px;
    top: 0;
    z-index: 10000;
    padding: .75rem 1rem;
    background: #fff;
    color: #1b3a2b;
    border: 3px solid #1b3a2b;
    border-radius: 0 0 .35rem 0;
    font-size: 1rem;
    font-weight: 700;
    text-decoration: none;
}
.cb-skip-link:focus,
.cb-skip-link:focus-visible {
    left: 0;
    outline: 3px solid #1b3a2b;
    outline-offset: 2px;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
    outline: 3px solid #1b3a2b;
    outline-offset: 2px;
}

.cb-visually-hidden {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ---------- Grundlagen 360 px ---------- */
html { scroll-behavior: smooth; }
body {
    font-size: 1rem; /* mind. 16 px */
    line-height: 1.6;
    overflow-x: hidden;
}
img {
    max-width: 100%;
    height: auto;
}
picture { display: block; max-width: 100%; }
picture > img { max-width: 100%; height: auto; }
.cb-cta,
a.btn,
button.btn,
.cb-nav a {
    min-height: 44px;
    min-width: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.cb-cta {
    background: #1b3a2b;
    border: 2px solid #1b3a2b;
    color: #fff !important;
    padding: .65rem 1.25rem;
    font-weight: 700;
    border-radius: .35rem;
    text-decoration: none;
}
.cb-cta:hover,
.cb-cta:focus-visible {
    background: #12281d;
    color: #fff !important;
}
.cb-secondary-cta {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    padding: .65rem 1rem;
    font-weight: 600;
}

/* ---------- Navigation ---------- */
.cb-nav .navbar-nav { width: 100%; }
.cb-nav .nav-link {
    padding: .75rem .5rem;
    color: #1b3a2b;
    font-weight: 600;
}
.cb-nav .navbar-toggler {
    min-height: 44px;
    min-width: 44px;
    border: 2px solid #1b3a2b;
    padding: .35rem .5rem;
    border-radius: .35rem;
    background: transparent;
}
.cb-nav .navbar-toggler .bar1,
.cb-nav .navbar-toggler .bar2,
.cb-nav .navbar-toggler .bar3 {
    display: block;
    width: 22px;
    height: 2px;
    margin: 4px 0;
    background: #1b3a2b;
    transition: none; /* reduzierte Bewegung: keine Animation */
}
.cb-nav [aria-current="page"] { text-decoration: underline; font-weight: 800; }

/* ---------- Karten / Galerien ---------- */
.cb-card-grid > [class*="col-"] { margin-bottom: 1.25rem; }
.cb-gallery figure { margin: 0 0 1rem; }
.cb-gallery img { display: block; width: 100%; height: auto; }
.cb-gallery figcaption { font-size: .9rem; margin-top: .35rem; }

/* ---------- Testimonials (statisch, keine Sterne) ---------- */
.cb-testimonials { list-style: none; padding: 0; margin: 0; }
.cb-testimonial {
    border: 1px solid #c9d3cc;
    border-left: 4px solid #1b3a2b;
    border-radius: .35rem;
    padding: 1rem 1.15rem;
    margin: 0 0 1rem;
    background: #fff;
    break-inside: avoid;
}
.cb-testimonial blockquote { margin: 0 0 .75rem; font-size: 1.05rem; }
.cb-testimonial .cb-meta { font-size: .9rem; color: #404d45; }
.cb-testimonial .cb-source { font-size: .85rem; color: #404d45; }
.cb-unbekannt { font-style: italic; color: #5a4432; }

/* ---------- Formular (Buchung) ---------- */
.cb-booking-form { max-width: 42rem; }
.cb-field { margin-bottom: 1.15rem; }
.cb-field > label {
    display: block;
    font-weight: 700;
    margin-bottom: .35rem;
}
.cb-field .cb-hinweis { font-size: .9rem; color: #404d45; display: block; margin-top: .25rem; }
.cb-field input,
.cb-field select,
.cb-field textarea {
    width: 100%;
    min-height: 44px;
    padding: .6rem .7rem;
    font-size: 1rem;
    border: 1px solid #6b776f;
    border-radius: .25rem;
    background: #fff;
    color: #17201b;
}
.cb-field textarea { min-height: 7rem; }
.cb-field input[aria-invalid="true"],
.cb-field select[aria-invalid="true"],
.cb-field textarea[aria-invalid="true"] { border: 3px solid #8a1c1c; }
.cb-required::after { content: " *"; color: #8a1c1c; font-weight: 700; }

.cb-error-summary {
    border: 2px solid #8a1c1c;
    background: #fff4f4;
    color: #5a1010;
    padding: 1rem;
    margin-bottom: 1.25rem;
    border-radius: .35rem;
}
.cb-error-summary:focus { outline: 3px solid #8a1c1c; outline-offset: 2px; }
.cb-error-summary ul { margin: .5rem 0 0; padding-left: 1.25rem; }
.cb-field .cb-error {
    display: block;
    color: #8a1c1c;
    font-weight: 600;
    margin-top: .35rem;
}
.cb-wait {
    margin-top: 1rem;
    padding: .85rem 1rem;
    border: 2px solid #1b3a2b;
    border-radius: .35rem;
    background: #eef5f0;
    font-weight: 600;
}
.cb-price {
    border: 1px solid #c9d3cc;
    border-radius: .35rem;
    padding: 1rem;
    margin: 1.25rem 0;
    background: #f7faf8;
}
.cb-price dl { margin: 0; }
.cb-price dt { font-weight: 700; }
.cb-price dd { margin: 0 0 .5rem; }
.cb-price .cb-total { font-size: 1.25rem; font-weight: 800; }

/* ---------- Kalender ---------- */
.cb-calendar { margin: 1.5rem 0; }
.cb-calendar-controls {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    align-items: center;
    margin-bottom: 1rem;
}
.cb-calendar-controls button {
    min-height: 44px;
    min-width: 44px;
    padding: .5rem .85rem;
    border: 2px solid #1b3a2b;
    background: #fff;
    color: #1b3a2b;
    font-weight: 700;
    border-radius: .35rem;
}
.cb-calendar h3 { margin: 0; font-size: 1.15rem; }
.cb-month { margin-bottom: 1.75rem; }
.cb-month h4 { text-align: center; margin-bottom: .5rem; }
.cb-weekdays, .cb-week {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 2px;
}
.cb-weekdays { font-weight: 700; text-align: center; font-size: .85rem; }
.cb-day {
    min-height: 44px;
    min-width: 0;
    padding: .15rem;
    border: 1px solid #c9d3cc;
    border-radius: .2rem;
    background: #fff;
    color: #17201b;
    font-size: .9rem;
    line-height: 1.1;
}
.cb-day[aria-pressed="true"] { background: #1b3a2b; color: #fff; border-color: #1b3a2b; }
.cb-day.cb-unavailable { background: #e4e7e5; color: #4a524d; text-decoration: line-through; }
.cb-day.cb-outside { visibility: hidden; }
.cb-legend { list-style: none; padding: 0; margin: .75rem 0 0; font-size: .9rem; }
.cb-legend li { display: inline-block; margin-right: .85rem; }
.cb-legend .cb-swatch {
    display: inline-block;
    width: .85rem; height: .85rem;
    border: 1px solid #6b776f;
    vertical-align: middle;
    margin-right: .3rem;
}
.cb-swatch-free { background: #fff; }
.cb-swatch-busy { background: #e4e7e5; }
.cb-swatch-selected { background: #1b3a2b; }

/* ---------- Status (Text + Farbe, nie Farbe allein) ---------- */
.cb-status { font-weight: 700; padding: .15rem .5rem; border-radius: .25rem; display: inline-block; }
.cb-status-reserviert { background: #fff3cd; color: #6b4c00; border: 1px solid #b38900; }
.cb-status-gebucht { background: #dff0e2; color: #1b5e20; border: 1px solid #1b5e20; }
.cb-status-storniert { background: #ececec; color: #3d3d3d; border: 1px solid #6b6b6b; }
.cb-status-verfallen { background: #fde0e0; color: #7a1212; border: 1px solid #8a1c1c; }

/* ---------- Footer ---------- */
.cb-footer p { margin: .5rem 0; }
.cb-footer a { color: #fff; text-decoration: underline; min-height: 44px; display: inline-flex; align-items: center; padding: 0 .25rem; }
.cb-footer a:focus-visible { outline-color: #fff; }
.cb-footer-links { list-style: none; padding: 0; margin: 1rem 0; }
.cb-footer-links li { display: inline-block; margin: 0 .5rem; }

/* ---------- Reduzierte Bewegung ---------- */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
        scroll-behavior: auto !important;
    }
    .owl-carousel .owl-stage-outer { transition: none !important; }
}

/* ---------- Tabellen → Karten auf 360 px ---------- */
@media (max-width: 575.98px) {
    .cb-responsive-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
    .cb-responsive-table, .cb-responsive-table tbody, .cb-responsive-table tr, .cb-responsive-table td { display: block; width: 100%; }
    .cb-responsive-table tr { border: 1px solid #c9d3cc; border-radius: .35rem; margin-bottom: .75rem; padding: .5rem; }
    .cb-responsive-table td { border: 0; padding: .25rem .5rem; }
    .cb-weekdays { font-size: .75rem; }
    .cb-day { font-size: .8rem; }
}
