.page-header {
    background: linear-gradient(135deg, var(--color-page-header-gradient-from) 0%, var(--color-page-header-gradient-to) 100%);
    color: var(--color-text-inverse);
    padding: 4rem 0 3rem;
    text-align: center;
}

.page-header h1 {
    font-size: clamp(2rem, 4vw, 2.8rem);
    margin-bottom: 0.5rem;
}

.page-header p {
    color: rgba(255, 255, 255, 0.95);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

.section {
    padding: 5rem 0;
}

/* Consecutive sections on the same background: one shared, tighter gap instead of 5rem + 5rem */
.section:not(.section-alt):has(+ .section:not(.section-alt)),
.section-alt:has(+ .section-alt) {
    padding-bottom: 1.5rem;
}

.section:not(.section-alt) + .section:not(.section-alt),
.section-alt + .section-alt {
    padding-top: 1.5rem;
}

.section-compact {
    padding: 2.5rem 0;
}

.section-alt {
    background: var(--color-bg-alt);
    transition: background-color 0.25s ease;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title h2 {
    font-size: clamp(1.8rem, 3vw, 2.4rem);
    margin-bottom: 0.5rem;
}

.section-title p {
    color: var(--color-text-muted);
    max-width: 560px;
    margin: 0 auto;
}

.section-title .divider {
    width: 60px;
    height: 3px;
    background: var(--color-accent);
    margin: 1rem auto 0;
    border-radius: 2px;
}

.cta-banner {
    background: linear-gradient(135deg, var(--color-cta-gradient-from), var(--color-cta-gradient-to));
    color: var(--color-text-inverse);
    padding: 4rem 2rem;
    border-radius: var(--radius-lg);
    text-align: center;
}

.cta-banner p {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 1.5rem;
}

@media (max-width: 991px) {
    .section {
        padding: 3.5rem 0;
    }

    .section:not(.section-alt):has(+ .section:not(.section-alt)),
    .section-alt:has(+ .section-alt) {
        padding-bottom: 1.25rem;
    }

    .section:not(.section-alt) + .section:not(.section-alt),
    .section-alt + .section-alt {
        padding-top: 1.25rem;
    }

    .section-compact {
        padding: 2rem 0;
    }
}

.intro-title {
    font-size: clamp(1.8rem, 3.2vw, 2.5rem);
    margin-bottom: 1rem;
}

/* FAQ accordion (<details>): animated height + opacity where ::details-content is supported */
:root {
    interpolate-size: allow-keywords;
}

.faq-item {
    background: var(--color-surface);
    border: 1px solid var(--color-border-strong);
    border-radius: var(--radius-md);
    margin-bottom: 0.75rem;
    overflow: hidden;
    transition: border-color 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease;
}

.faq-item:hover {
    border-color: var(--color-accent);
}

.faq-item[open] {
    border-color: var(--color-accent);
    background: linear-gradient(180deg, var(--color-bg-alt) 0%, var(--color-surface) 70%);
    box-shadow: var(--shadow-sm);
}

.faq-item summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.95rem 1.25rem;
    cursor: pointer;
    list-style: none;
    border-radius: var(--radius-md);
    transition: background-color 0.2s ease, color 0.2s ease;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::after {
    content: "";
    flex-shrink: 0;
    width: 0.55rem;
    height: 0.55rem;
    margin-right: 0.15rem;
    border-right: 2px solid var(--color-accent);
    border-bottom: 2px solid var(--color-accent);
    transform: translateY(-2px) rotate(45deg);
    transition: transform 0.3s ease;
}

.faq-item[open] summary::after {
    transform: translateY(2px) rotate(225deg);
}

.faq-item summary:hover h3,
.faq-item[open] summary h3 {
    color: var(--color-nav-active);
}

.faq-item summary:focus {
    outline: none;
}

.faq-item summary:focus-visible {
    outline: 3px solid var(--color-focus);
    outline-offset: -3px;
}

.faq-item summary h3 {
    flex: 1;
    font-size: 1.05rem;
    margin: 0;
    transition: color 0.2s ease;
}

.faq-item p {
    margin: 0;
    padding: 0 1.25rem 1.15rem;
}

@supports selector(::details-content) {
    .faq-item::details-content {
        block-size: 0;
        opacity: 0;
        overflow: hidden;
        transition: block-size 0.35s ease, opacity 0.3s ease, content-visibility 0.35s allow-discrete;
    }

    .faq-item[open]::details-content {
        block-size: auto;
        opacity: 1;
    }
}

@media (prefers-reduced-motion: reduce) {
    .faq-item,
    .faq-item summary,
    .faq-item summary::after,
    .faq-item summary h3,
    .faq-item::details-content {
        transition: none !important;
    }
}

/* Location: directions panel and nearby-place cards */
.directions-panel {
    background: var(--color-bg-alt);
    border-radius: var(--radius-md);
    padding: 1.75rem;
}

.directions-panel p {
    max-width: 46rem;
}

.directions-panel__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.place-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    height: 100%;
    padding: 1.5rem;
    background: var(--color-surface);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.place-card h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.place-card p {
    margin-bottom: 1rem;
}

.place-card__dist {
    margin-top: auto;
    background: var(--color-emerald-100);
    color: var(--color-emerald-800);
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.25rem 0.8rem;
    border-radius: var(--radius-pill);
}

[data-theme="dark"] .place-card__dist {
    background: rgba(52, 211, 153, 0.16);
    color: var(--color-emerald-200);
}

@media (max-width: 575.98px) {
    .directions-panel {
        padding: 1.25rem;
    }

    .directions-panel__actions .btn {
        width: 100%;
        justify-content: center;
    }
}

/* Location distance table: themed (Bootstrap table vars assume a light body) */
.table {
    --bs-table-color: var(--color-text);
    --bs-table-bg: transparent;
    --bs-table-border-color: var(--color-border-strong);
    --bs-table-striped-bg: var(--color-table-stripe);
    --bs-table-hover-bg: var(--color-table-hover);
    --bs-table-hover-color: var(--color-text);
    color: var(--color-text);
}

.table > thead > tr > th {
    color: var(--color-heading);
    border-bottom-color: var(--color-accent);
    border-bottom-width: 2px;
}

.table > tbody > tr > th {
    color: var(--color-heading);
    font-weight: 600;
}

.table > tbody > tr:hover > * {
    background-color: var(--color-table-hover);
}

.table caption {
    color: var(--color-text-muted);
}

/* In-page anchors (#apart, #bungalov, #balkon, #sss) must not hide under the fixed header */
[id] {
    scroll-margin-top: calc(var(--header-height) + 1rem);
}

/* Phones: Bootstrap's g-5 gutter (3rem) makes .row bleed 12px past the container padding and widens the page */
@media (max-width: 575.98px) {
    .row.g-5 {
        --bs-gutter-x: 1.5rem;
    }
}

/* Touch devices: comfortable tap targets (>= 44px) */
@media (pointer: coarse), (max-width: 991.98px) {
    .btn,
    .btn-sm {
        min-height: 44px;
        align-items: center;
    }

    .link-arrow:not(.btn) {
        min-height: 44px;
    }

    .contact-card a {
        display: inline-flex;
        align-items: center;
        min-height: 44px;
    }

    .page-header + .section .btn,
    .cta-banner .btn {
        justify-content: center;
    }
}

@media (max-width: 575.98px) {
    /* stack the CTA buttons full width so they are easy to hit and never overflow */
    .cta-banner {
        padding: 2.5rem 1.25rem;
    }

    .cta-banner .btn,
    .cta-banner .link-arrow--pill {
        display: flex;
        width: 100%;
        margin-right: 0 !important;
        justify-content: center;
    }
}
