@import url('./components/page-carousel.css');
@import url('./components/news-carousel.css');
@import url('./books.css');
@import url('./pages/visit.css');
.page {
    max-width: 75%;
    margin: 0 auto;
    padding: 2rem;
}

.page-body {
    margin-bottom: 3rem;
}

/* ─── Page items menu ──────────────────────────────────────────────── */

.page-items-menu {
    position: sticky;
    top: 0;
    z-index: 10;
    background: #fff;
    border-bottom: 1px solid #eee;
    padding: 1rem 0;
    margin-bottom: 2rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.page-items-menu a {
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #666;
    text-decoration: none;
    padding: 0.5rem 0;
    border-bottom: 2px solid transparent;
    transition: color 0.15s, border-color 0.15s;
}

.page-items-menu a:hover {
    color: #000;
}

.page-items-menu a.is-active {
    color: #000;
    border-bottom-color: #000;
}

/* ─── Page items themselves ────────────────────────────────────────── */

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

.page-item {
    scroll-margin-top: 80px;  /* belt + suspenders alongside JS offset */
}

.page-item-title {
    font-size: 2rem;
    font-weight: 700;
    margin: 0 0 1rem;
}

.page-item-body {
    line-height: 1.6;
}

.page-item-body img {
    max-width: 100%;
    height: auto;
}

.page-body .row { display: flex; flex-wrap: wrap; margin: 0 -15px; }
.page-body [class^="col-"] { padding: 0 15px; }
.page-body .col-6 { flex: 0 0 50%; max-width: 50%; }
.page-body .col-4 { flex: 0 0 33.333%; max-width: 33.333%; }
.page-body .col-8 { flex: 0 0 66.667%; max-width: 66.667%; }
/* etc. — add classes as legacy content uses them */

@media (max-width: 768px) {
    .page-body [class^="col-"] { flex-basis: 100%; max-width: 100%; }
    .page { padding: 1rem; }
    .page-items-menu { gap: 1rem; font-size: 0.75rem; }
}

.page-back {
    max-width: 75%;
    margin: 0 auto;
    padding: 0 2rem 0;
    font-size: 0.85rem;
    color: #666;
}

.page-back a { color: inherit; text-decoration: underline; }
.page-back a:hover { text-decoration: none; color: #000; }

.page-heading {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 1.5rem 0 2rem;
    text-align: center;
}

@media (max-width: 768px) {
    .page-back { max-width: 100%; padding: 1rem 1rem 0; }
    .page-heading { font-size: 1.75rem; }
}
/* ─── Block-based page content ─────────────────────────────────────── */

.page-blocks {
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
    line-height: 1.6;
}

.page-blocks .block { margin: 0; }

.block-heading--2 { font-size: 2rem;   font-weight: 700; margin-top: 1rem; }
.block-heading--3 { font-size: 1.4rem; font-weight: 700; margin-top: 0.5rem; }

.block-text p { margin: 0 0 1rem; }
.block-text p:last-child { margin-bottom: 0; }
.block-text ul, .block-text ol { margin: 0 0 1rem; padding-left: 1.5rem; }
.block-text a { color: inherit; text-decoration: underline; }

.block-image picture { display: block; }
.block-image img { display: block; width: 100%; height: auto; }
.block-image--wide   { width: 100vw; margin-left: 50%; transform: translateX(-50%); }
.block-image--inline { max-width: 420px; }
.block-caption {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: #777;
}

.block-gallery--grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 0.75rem;
}
.block-gallery--carousel {
    display: flex;
    gap: 0.75rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 0.5rem;
}
.block-gallery--carousel .block-gallery-item {
    flex: 0 0 60%;
    scroll-snap-align: start;
}
.block-gallery-item { position: relative; display: block; overflow: hidden; }
.block-gallery-item img { display: block; width: 100%; height: 100%; object-fit: cover; }
.block-gallery-cap {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 1.75rem 0.7rem 0.55rem;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.78));
    color: #fff;
    font-size: 0.8rem;
    line-height: 1.3;
    opacity: 0;
    transition: opacity 0.2s ease;
}
.block-gallery-item:hover .block-gallery-cap { opacity: 1; }

.block-video-frame {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
}
.block-video-frame iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.block-quote {
    border-left: 3px solid #000;
    padding-left: 1.25rem;
    font-size: 1.2rem;
    font-style: italic;
}
.block-quote-text { margin: 0; }
.block-quote-author {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.9rem;
    font-style: normal;
    color: #777;
}

.block-divider {
    border: 0;
    border-top: 1px solid #ddd;
    width: 100%;
    margin: 0.5rem 0;
}

@media (max-width: 768px) {
    .block-gallery--carousel .block-gallery-item { flex-basis: 80%; }
    .block-heading--2 { font-size: 1.5rem; }
}

/* poster block — centered banner (page-column width, not full-bleed). Keeps
   the photo's own aspect ratio (set inline from the image dimensions),
   clamped between 20vh and 50vh tall; `cover` crops when clamping bites. */
.block-poster {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;          /* fallback — overridden inline per image */
    min-height: 20vh;
    max-height: 50vh;
    background: center / cover no-repeat #000;
}
.block-poster-caption {
    position: absolute;
    right: 1.5rem;
    bottom: 1.5rem;
    max-width: 60%;
    color: #fff;
    text-align: right;
    font-size: 1.15rem;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.7);
}

/* columns layout block */
.block-columns { display: flex; gap: 1.75rem; }
.block-column { min-width: 0; }
.page-blocks .block-column > .block { margin-bottom: 1.25rem; }
.page-blocks .block-column > .block:last-child { margin-bottom: 0; }
/* keep a full-bleed image block from breaking out when nested in a column */
.block-column .block-image--wide {
    width: 100%; margin-left: 0; transform: none;
}
@media (max-width: 768px) {
    .block-columns { flex-direction: column; gap: 1rem; }
}

/* buttons block — row of outline link-buttons */
.block-buttons { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.block-btn {
    display: inline-block;
    padding: 0.55rem 1.15rem;
    border: 1px solid currentColor;
    border-radius: 2rem;
    color: #000;
    text-decoration: none;
    font-size: 0.95rem;
    line-height: 1.2;
    transition: background-color 0.15s, color 0.15s;
}
.block-btn:hover { background: #000; color: #fff; }

/* anchored heading blocks — clear the sticky page-nav menu when scrolled to */
.page-blocks .block-heading[id] { scroll-margin-top: 90px; }
