/*
 * Route stylesheet for /events and /articles.
 *
 * Values are taken from the live site's own computed styles, measured on
 * thebangaloredrumshop.com/events, /events/{id}, /articles and /articles/{slug}:
 * the Bebas headings, the card shadows and radii, the grey category band and
 * the overlapping event title card are all the site's own numbers.
 *
 * Enqueued only on those routes, by inc/editorial-data.php.
 */

.tbds-editorial {
    --ed-ink: #000;
    --ed-muted: #808080;
    --ed-card: #fff;
    --ed-gap: 2rem;
    --ed-wide: 1400px;
    --ed-read: 900px;
}

.tbds-editorial img { max-width: 100%; }

.tbds-editorial-heading {
    font-family: "Bebas Neue", "Bebas Neue Fallback", sans-serif;
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 500;
    letter-spacing: 2px;
    line-height: 1.2;
    margin: 0 0 1rem;
    color: var(--ed-ink);
}

.tbds-editorial h2 {
    font-family: "Bebas Neue", "Bebas Neue Fallback", sans-serif;
    letter-spacing: 1px;
}

/* ------------------------------------------------------------ events list */

.tbds-event-hero {
    margin: 0;
    overflow: hidden;
}

.tbds-event-hero-rail {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
}

.tbds-event-hero-rail::-webkit-scrollbar { display: none; }

.tbds-event-hero-slide {
    flex: 0 0 100%;
    scroll-snap-align: start;
    display: block;
}

.tbds-event-hero-slide img {
    display: block;
    width: 100%;
    height: clamp(180px, 30vw, 460px);
    object-fit: cover;
}

.tbds-event-list-section {
    max-width: var(--ed-wide);
    margin: 3rem auto;
    padding-inline: 2rem;
}

/* The live listing is a horizontal rail, not a wrapping grid — it keeps the
   card size fixed however many events there are. */
.tbds-event-list {
    display: flex;
    gap: var(--ed-gap);
    overflow-x: auto;
    padding-bottom: 1.5rem;
    scroll-snap-type: x proximity;
}

.tbds-event-card {
    flex: 0 0 350px;
    max-width: 100%;
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
    background: var(--ed-card);
    border-radius: 7px;
    box-shadow: 4px 8px 25px -1px rgba(0, 0, 0, 0.14);
    overflow: hidden;
    color: inherit;
    text-decoration: none;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.tbds-event-card:hover,
.tbds-event-card:focus-visible {
    transform: translateY(-3px);
    box-shadow: 4px 12px 30px -1px rgba(0, 0, 0, 0.22);
}

.tbds-event-card-poster { height: 190px; }

.tbds-event-card-poster img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tbds-event-card-info {
    display: flex;
    padding: 1rem;
    gap: 1rem;
}

.tbds-event-card-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 0 0 auto;
    min-width: 45px;
}

.tbds-event-month {
    font-size: 1.5rem;
    color: var(--ed-muted);
    line-height: 1.2;
}

.tbds-event-day {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.2;
}

.tbds-event-card-text h2 {
    font-family: inherit;
    letter-spacing: normal;
    font-size: 1.17rem;
    font-weight: 700;
    margin: 0 0 0.35rem;
    line-height: 1.25;
}

.tbds-event-card-text p {
    margin: 0;
    font-size: 1rem;
    line-height: 1.35;
}

/* ---------------------------------------------------------- event detail */

.tbds-event-detail { position: relative; }

.tbds-event-poster img {
    display: block;
    width: 100%;
    height: clamp(280px, 42vw, 800px);
    object-fit: cover;
}

.tbds-event-titlecard {
    position: relative;
    z-index: 2;
    max-width: 1100px;
    margin: clamp(-160px, -9vw, -60px) auto 0;
    background: var(--ed-card);
    border-radius: 8px;
    box-shadow: -1px 4px 18px 1px rgba(0, 0, 0, 0.45);
    padding: 2rem clamp(1.25rem, 3vw, 3rem);
    display: grid;
    grid-template-columns: 1.5fr 2px 1fr;
    gap: 2rem;
    align-items: center;
    width: calc(100% - 2rem);
}

.tbds-event-titlecard-left h1 {
    font-family: "Bebas Neue", "Bebas Neue Fallback", sans-serif;
    font-size: clamp(2rem, 4.5vw, 3rem);
    font-weight: 400;
    text-transform: capitalize;
    line-height: 1.15;
    margin: 0 0 1rem;
}

.tbds-event-fact { margin-top: 0.75rem; }

.tbds-event-fact-label {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--ed-muted);
    text-transform: capitalize;
}

.tbds-event-fact-value {
    display: block;
    font-weight: 700;
    margin-top: 5px;
}

.tbds-event-titlecard-rule {
    background: rgba(0, 0, 0, 0.12);
    width: 2px;
    align-self: stretch;
}

.tbds-event-titlecard-right {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.tbds-event-titlecard-right p { margin: 0 0 0.75rem; }

.tbds-event-socials {
    display: flex;
    gap: 1rem;
}

.tbds-event-socials a { color: inherit; }

.tbds-event-copy {
    width: 200px;
    max-width: 100%;
    margin-top: 1rem;
    padding: 0.6rem 0;
    font-size: 0.833rem;
    color: #181616;
    background: transparent;
    border: 1px solid rgba(0, 0, 0, 0.35);
    border-radius: 4px;
    cursor: pointer;
}

.tbds-event-copy:hover { background: rgba(0, 0, 0, 0.05); }

.tbds-event-body {
    max-width: 1100px;
    margin: 4rem auto 6rem;
    padding-inline: 1rem;
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 2rem;
    align-items: start;
}

.tbds-event-body h2 {
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    font-weight: 400;
    margin: 0 0 1rem;
}

.tbds-event-details p { line-height: 1.7; }

.tbds-event-aside > * + * { margin-top: 2.5rem; }

.tbds-event-artists {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tbds-event-artists span { color: var(--ed-muted); }

/* --------------------------------------------------------- articles list */

.tbds-article-band {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 2rem;
    background: rgba(128, 128, 128, 0.21);
    border-radius: 4px;
    margin: 1rem 2rem;
    padding: 10px 20px;
}

.tbds-article-band a {
    font-family: "Bebas Neue", "Bebas Neue Fallback", sans-serif;
    font-size: 1.3rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: inherit;
    text-decoration: none;
}

.tbds-article-band a:hover,
.tbds-article-band a.is-active { text-decoration: underline; }

.tbds-articles-section {
    max-width: var(--ed-wide);
    margin: 3rem auto;
    padding-inline: 2rem;
}

.tbds-articles-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--ed-gap);
}

.tbds-article-card {
    border-radius: 6px;
    box-shadow: 4px 3px 11px 0 rgba(0, 0, 0, 0.2);
    overflow: hidden;
    background: var(--ed-card);
    display: flex;
    flex-direction: column;
}

.tbds-article-card-image {
    display: block;
    aspect-ratio: 3 / 2;
    max-width: 100%;
    overflow: hidden;
}

.tbds-article-card-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tbds-article-card-body {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.tbds-article-card-body h2 {
    font-size: clamp(1.35rem, 2.2vw, 2rem);
    font-weight: 700;
    text-transform: uppercase;
    line-height: 1.2;
    margin: 0 0 0.5rem;
}

.tbds-article-card-body h2 a {
    color: inherit;
    text-decoration: none;
}

.tbds-article-card-excerpt {
    margin: 0;
    line-height: 1.5;
}

.tbds-article-card-foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-top: auto;
    padding-top: 0.75rem;
}

.tbds-article-more {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: inherit;
}

.tbds-article-byline { color: var(--ed-muted); }

.tbds-articles-empty { padding: 2rem 0; }

/* -------------------------------------------------------- article detail */

.tbds-article {
    max-width: var(--ed-read);
    margin: 2rem auto 5rem;
    padding-inline: 2rem;
}

.tbds-article-title {
    font-family: "Bebas Neue", "Bebas Neue Fallback", sans-serif;
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    line-height: 1.15;
    margin: 0;
}

.tbds-article-meta {
    color: var(--ed-muted);
    margin: 0.5rem 0 0;
}

.tbds-article-hero {
    margin: 2rem 0;
    aspect-ratio: 3 / 2;
    max-width: 100%;
    overflow: hidden;
    border-radius: 6px;
}

.tbds-article-hero img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tbds-article-content { line-height: 1.75; }

.tbds-article-content h2 {
    font-size: clamp(1.6rem, 3vw, 2.25rem);
    font-weight: 400;
    margin: 2.5rem 0 0.75rem;
}

.tbds-article-content h3,
.tbds-article-content h4 {
    font-family: inherit;
    letter-spacing: normal;
    margin: 2rem 0 0.5rem;
}

.tbds-article-content img {
    height: auto;
    border-radius: 6px;
}

.tbds-article-content ul,
.tbds-article-content ol { padding-left: 1.25rem; }

.tbds-article-content li + li { margin-top: 0.4rem; }

.tbds-article-content table {
    width: 100%;
    border-collapse: collapse;
}

/* Wide tables scroll on their own rather than pushing the page sideways. */
.tbds-article-content > table { display: block; overflow-x: auto; }

.tbds-article-video {
    width: min(100%, 900px);
    margin: 2.5rem auto;
    aspect-ratio: 16 / 9;
}

.tbds-article-video iframe {
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: 8px;
}

.tbds-article-related { margin-top: 3rem; }

.tbds-article-related h2 {
    font-size: clamp(1.6rem, 3vw, 2.25rem);
    font-weight: 400;
    margin: 0 0 1rem;
}

.tbds-article-back { margin-top: 3rem; }

/* -------------------------------------------------------------- narrower */

@media (max-width: 900px) {
    .tbds-event-titlecard {
        grid-template-columns: 1fr;
        gap: 1rem;
        text-align: left;
    }

    .tbds-event-titlecard-rule {
        width: 100%;
        height: 1px;
        align-self: auto;
    }

    .tbds-event-titlecard-right { align-items: flex-start; text-align: left; }

    .tbds-event-body { grid-template-columns: 1fr; margin-top: 2.5rem; }

    .tbds-articles-grid { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
    .tbds-event-list-section,
    .tbds-articles-section { padding-inline: 1rem; margin-block: 2rem; }

    .tbds-article { padding-inline: 1rem; }

    .tbds-article-band { margin-inline: 1rem; gap: 0.25rem 1rem; }

    .tbds-event-card { flex-basis: min(320px, 82vw); }

    .tbds-event-titlecard {
        margin-top: -40px;
        width: calc(100% - 1.5rem);
        padding: 1.25rem;
    }

    .tbds-article-card-foot {
        flex-direction: column-reverse;
        align-items: flex-start;
    }
}
