/* @import ./components/card-carousel.css */
/* ─── Card carousel section ──────────────────────────────────────────── */

.card-carousel {
    padding: 3rem 0 4rem;
    margin: 0 2rem;
    background: #fff;
}

.card-carousel-header {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    margin-bottom: 1.5rem;
    gap: 1rem;
}

.card-carousel-nav {
    display: flex;
    gap: 0.5rem;
}

.card-carousel-prev,
.card-carousel-next {
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    color: #000;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s, color 0.2s;
}

.card-carousel-prev:hover,
.card-carousel-next:hover {
    color: #666;
}

.card-carousel-prev.is-disabled,
.card-carousel-next.is-disabled {
    opacity: 0.25;
    pointer-events: none;
}

.card-carousel-title {
	margin: 0;
	text-align: center;
	font-size: 1.45rem;
	font-weight: 900;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.card-carousel-see-all {
    font-size: 0.85rem;
}

.card-carousel-see-all:hover {
    color: #FFF;
}

/* ─── Track + cards ──────────────────────────────────────────────────── */

.card-carousel-track {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scrollbar-width: none;
    cursor: grab;
}

.card-carousel-track:active {
    cursor: grabbing;
}

.card-carousel-track::-webkit-scrollbar {
    display: none;
}

.perf-card {
    flex: 0 0 calc((100% - 4rem) / 5);  /* 5 visible at desktop (4 gaps × 1rem) */
    scroll-snap-align: start;
    background: #fff;
    display: flex;
    flex-direction: column;
}

.perf-card:hover {
    background-color: #f9f9f9;
}

.perf-card-link {
    display: flex;
    flex-direction: column;
    color: #000;
    text-decoration: none;
    flex: 1;
}

/* Thumbnail with fixed heights at breakpoints (matches original) */
.perf-card-thumb {
    width: 100%;
    height: 214px;
    background-size: cover;
    background-position: center;
    background-color: #f5f5f5;
}

.perf-card-thumb-empty {
    background: linear-gradient(135deg, #f5f5f5 25%, #eee 25%, #eee 50%, #f5f5f5 50%, #f5f5f5 75%, #eee 75%);
    background-size: 20px 20px;
}

@media (min-width: 1280px) {
    .perf-card-thumb { height: 270px; }
}

@media (min-width: 1600px) {
    .perf-card-thumb { height: 340px; }
}

.perf-card-body {
    padding: 1rem 0 0;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.perf-card-meta {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
    color: #000;
}

.perf-card-flag {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    color: #d40000;
    margin-bottom: 0.5rem;
}

.perf-card-title {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.15;
    margin: 0 0 0.5rem;
}

.perf-card-subtitle {
    font-size: 0.9rem;
    line-height: 1.4;
    color: #333;
    margin-bottom: 0.5rem;
}

.perf-card-author {
    font-size: 0.85rem;
    color: #000;
    margin-bottom: 1rem;
    margin-top: auto;
}

/* Red buy button */
.perf-card-buy {
    align-self: flex-start;
    background: #d40000;
    color: #fff;
    border: none;
    padding: 0.85rem 1.5rem;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
    margin-top: 1rem;
    transition: background 0.2s;
}

.perf-card-buy:hover {
    background: #b00000;
}

/* Responsive — gradually show fewer cards */
@media (max-width: 1280px) {
    .perf-card {
        flex-basis: calc((100% - 3rem) / 4);
    }
}

@media (max-width: 1024px) {
    .perf-card {
        flex-basis: calc((100% - 2rem) / 3);
    }
}

@media (max-width: 768px) {
    .card-carousel-header {
        padding: 0 1.5rem;
        grid-template-columns: 1fr;
        text-align: center;
    }
    .card-carousel-nav {
        order: 3;
        justify-content: center;
    }
    .card-carousel-see-all {
        order: 2;
    }
    .card-carousel-track {
        padding: 0 1.5rem;
    }
    .perf-card {
        flex-basis: calc((100% - 1rem) / 2);
    }
    .perf-card-thumb { height: 180px; }
}

@media (max-width: 480px) {
    .perf-card {
        flex-basis: 80%;
    }
}
/* @import ./components/news-carousel.css */
.news-carousel {
    padding: 3rem 0 4rem;
    margin: 0 2rem;
}

.news-card {
    flex: 0 0 calc((100% - 5rem) / 6); 
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
}

.news-card-link {
    display: flex;
    flex-direction: column;
    color: #000;
    text-decoration: none;
}

.news-card-link:hover .news-card-title {
    color: #666;
}

.news-card-thumb {
    width: 100%;
    aspect-ratio: 4 / 3;
    background-size: cover;
    background-position: center;
    background-color: #f5f5f5;
}
.news-card-thumb-empty {
    background: linear-gradient(135deg, #f5f5f5 25%, #eee 25%, #eee 50%, #f5f5f5 50%, #f5f5f5 75%, #eee 75%);
    background-size: 20px 20px;
}

.news-card-body {
    padding: 1rem 0 0;
}

.news-card-date {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #666;
    margin-bottom: 0.5rem;
}

.news-card-title {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.25;
    margin: 0;
    transition: color 0.15s ease;
}

@media (max-width: 1600px) { .news-card { flex-basis: calc((100% - 4rem) / 5); } }
@media (max-width: 1280px) { .news-card { flex-basis: calc((100% - 3rem) / 4); } }
@media (max-width: 1024px) { .news-card { flex-basis: calc((100% - 2rem) / 3); } }
@media (max-width: 768px)  { .news-card { flex-basis: calc((100% - 1rem) / 2); } }
@media (max-width: 480px)  { .news-card { flex-basis: 80%; } }
/* @import ./books.css */
.page-books, .page-book { background: #fff; }

/* ─── Listing page ─────────────────────────────────────────────────── */

.books-page {
    max-width: var(--container);
    margin: 0 auto;
    padding: 2rem 2rem 4rem;
}

.books-header { text-align: center; margin-bottom: 3rem; }

.books-heading {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0;
}

.books-empty {
    padding: 4rem 1rem;
    text-align: center;
    color: #999;
}

.books-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 2.5rem 1.5rem;
}

/* ─── Book card (shared by carousel + grid) ────────────────────────── */

.book-card {
    display: flex;
    flex-direction: column;
}

.card-carousel-track .book-card {
    /* same sizing rules as .perf-card in carousels */
    flex: 0 0 calc((100% - 4rem) / 5);
    scroll-snap-align: start;
}

.book-card-link {
    display: flex;
    flex-direction: column;
    color: #000;
    text-decoration: none;
    flex: 1;
}

.book-card-cover {
    width: 100%;
    overflow: hidden;
}

/* Covers vary in aspect ratio — show each one at its natural proportions
   instead of cropping to a fixed box. */
.book-card-cover-img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s;
}

.book-card-link:hover .book-card-cover-img {
    transform: scale(1.02);
}

.book-card-cover-empty {
    aspect-ratio: 4 / 3;
    background: repeating-linear-gradient(
        45deg, #f5f5f5, #f5f5f5 10px, #eee 10px, #eee 20px
    );
}

/* In the horizontal carousel keep card heights uniform: fit the whole
   cover inside a fixed band, centred, no cropping. */
.card-carousel-track .book-card-cover {
    height: 220px;
    background: #f0f0f0;
}

.card-carousel-track .book-card-cover-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.book-card-body {
    padding: 1rem 0 0;
}

.book-card-author {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #666;
    margin-bottom: 0.5rem;
}

.book-card-title {
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.25;
    margin: 0 0 0.5rem;
}

.book-card-year {
    font-size: 0.85rem;
    color: #666;
}

/* ─── Book detail page ─────────────────────────────────────────────── */

.book {
    max-width: var(--container-lg);
    margin: 0 auto;
}

.book-back {
    padding: 1rem 2rem;
    font-size: 0.85rem;
    color: #666;
    border-bottom: 1px solid #f0f0f0;
}

.book-back a { color: inherit; text-decoration: underline; }
.book-back a:hover { text-decoration: none; color: #000; }
.book-back-sep { margin: 0 0.5rem; color: #ccc; }

.book-detail {
    display: grid;
    grid-template-columns: minmax(280px, 1fr) minmax(0, 2fr);
    gap: 3rem;
    padding: 3rem 2rem;
}

.book-detail-cover img {
    width: 100%;
    height: auto;
    display: block;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

.book-detail-cover-empty {
    width: 100%;
    aspect-ratio: 3 / 4;
    background: repeating-linear-gradient(
        45deg, #f5f5f5, #f5f5f5 20px, #eee 20px, #eee 40px
    );
}

.book-detail-author {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #666;
    margin-bottom: 0.75rem;
}

.book-detail-title {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.15;
    margin: 0 0 1.5rem;
}

.book-detail-about {
    font-size: 1.05rem;
    line-height: 1.7;
    color: #222;
    margin-bottom: 2rem;
}

.book-detail-about p { margin: 0 0 1em; }

.book-detail-meta {
    display: grid;
    grid-template-columns: 160px 1fr;
    gap: 0.5rem 1.5rem;
    margin: 2rem 0;
    padding: 1.5rem 0;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
}

.book-detail-meta dt {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #999;
}

.book-detail-meta dd {
    margin: 0;
    font-size: 0.95rem;
}

.book-detail-more {
    font-size: 1rem;
    line-height: 1.7;
    color: #333;
}

.book-detail-more p { margin: 0 0 1em; }

/* ─── Responsive ───────────────────────────────────────────────────── */

@media (max-width: 1280px) {
    .books-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .card-carousel-track .book-card { flex-basis: calc((100% - 3rem) / 4); }
}

@media (max-width: 1024px) {
    .books-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .card-carousel-track .book-card { flex-basis: calc((100% - 2rem) / 3); }
}

@media (max-width: 768px) {
    .books-page { padding: 1rem 1rem 3rem; }
    .books-heading { font-size: 1.75rem; }
    .book-detail {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 2rem 1rem;
    }
    .book-detail-title { font-size: 1.75rem; }
    .book-detail-meta { grid-template-columns: 1fr; gap: 0.25rem 0; }
    .book-detail-meta dd { margin-bottom: 0.5rem; }
    .card-carousel-track .book-card { flex-basis: calc((100% - 1rem) / 2); }
}

@media (max-width: 480px) {
    .books-grid { grid-template-columns: 1fr; }
    .card-carousel-track .book-card { flex-basis: 60%; }
}

.page-theatre { background: #fff; }

.theatre {
    max-width: var(--container);
    margin: 0 auto;
}

.theatre-hero {
    padding: 3rem 2rem;
    text-align: center;
}

.theatre-heading {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0 0 2rem;
}

.theatre-intro {
    max-width: 800px;
    margin: 0 auto;
    text-align: left;
    font-size: 1.05rem;
    line-height: 1.7;
    color: #222;
}

.theatre-intro p { margin: 0 0 1em; }
.theatre-intro p:last-child { margin-bottom: 0; }

@media (max-width: 768px) {
    .theatre-hero { padding: 2rem 1rem; }
    .theatre-heading { font-size: 1.75rem; }
}