/* ===== Background image base ===== */

.section-bg {
    position: relative;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.section-bg::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45); /* tunnelma + luettavuus */
    z-index: 0;
}

.section-bg > * {
    position: relative;
    z-index: 1;
}
.section-hero-gigs {
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;

    background-image:
        url("../assets/images/bg-hero-gigs.jpg");
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

/* tumma overlay */
.section-hero-gigs::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 0;
}

/* sisältö overlayn päälle */
.section-hero-gigs > * {
    position: relative;
    z-index: 1;
}
.section-hero-gigs h1 {
    color: #fff;
    text-shadow:
        0 2px 12px rgba(0, 0, 0, 0.5),
        0 0 20px rgba(0, 0, 0, 0.35);
}

.section-hero-gigs p {
    text-shadow:
        0 2px 12px rgba(0, 0, 0, 0.5),
        0 0 20px rgba(0, 0, 0, 0.35);
    color: #fff;
}

.page-slug-keikat .section-hero-gigs .section-inner {
    position: relative;
    z-index: 1;
    max-width: 720px;
    margin: 0 auto;
    text-align: center;
}

.page-slug-keikat .section-hero-gigs .hero-intro {
    margin-left: auto;
    margin-right: auto;
    color: #fff;
}

/* Keskitetyt tekstiblokit keikat-sivulla */
.page-slug-keikat .section-content .section-inner {
    max-width: 720px;
    margin: 0 auto;
    text-align: left;
}

.page-slug-keikat .section-content .section-inner p,
.page-slug-keikat .section-content .section-inner p {
    font-style: normal;
    letter-spacing: 0.01em;
    margin-bottom: var(--space-sm);
    color: var(--color-text-muted);
    font-size: var(--fs-base);
    line-height: 1.75;
}

.page-slug-keikat .section-content .section-inner p::before,
.page-slug-keikat .section-content .section-inner p::before {
    content: "";
}

.section-cta {
    padding: clamp(5rem, 8vw, 8rem) 0;
    text-align: center;
    color: #fff;
    background: var(--gradient-cta-subtle);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.section-cta .cta-text {
    margin: 1rem auto;
}

.section-bg h1,
.section-bg h2 {
    letter-spacing: 0.04em;
}

.section-bg p {
    max-width: 60ch;
}

@media (prefers-reduced-motion: reduce) {
    .section-bg {
        background-attachment: scroll;
    }
}

/* ===== Gigs list override (keikat-sivu) ===== */
.page-slug-keikat .gigs-list {
    margin-top: 0;
    border-top: 0;
}

.page-slug-keikat .gig-item {
    display: flex;
    flex-wrap: nowrap;
    gap: 0;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow-x: hidden;
    white-space: nowrap;
    font-size: 1.12rem;
    line-height: 1.48;
    width: 100%;
    max-width: 100%;

    padding: 1rem 0;
    border-bottom: 0;
    padding-inline: var(--space-sm);
}

.page-slug-keikat .gig-item .gig-date {
    color: var(--color-text-muted);
    font-weight: 500;
    font-family: var(--font-body);
    font-size: 1em;
    letter-spacing: 0.03em;
}

.page-slug-keikat .gig-item .gig-title-link {
    color: var(--color-text-muted);
    text-decoration: underline;
    text-decoration-color: rgba(143, 149, 155, 0.52);
    text-underline-offset: 0.2em;
    transition: text-decoration-color var(--transition-fast), color var(--transition-fast);
}

.page-slug-keikat .gig-item .gig-title-link:hover {
    color: var(--color-text-main);
    text-decoration-color: rgba(230, 231, 233, 0.86);
}

.page-slug-keikat .gig-item .gig-title-link,
.page-slug-keikat .gig-item .gig-title-text,
.page-slug-keikat .gig-item .gig-venue,
.page-slug-keikat .gig-item .gig-city {
    letter-spacing: 0.018em;
    color: var(--color-text-muted);
    font-weight: 500;
}

@media (max-width: 768px) {
    .page-slug-keikat .gig-item {
        font-size: 0.98rem;
        line-height: 1.35;
        letter-spacing: 0.01em;
    }

    .page-slug-keikat .gig-item .gig-title-link,
    .page-slug-keikat .gig-item .gig-title-text,
    .page-slug-keikat .gig-item .gig-venue,
    .page-slug-keikat .gig-item .gig-city {
        letter-spacing: 0.02em;
    }
}

/* Final safety override: keep gig rows on one line on gigs page */
.page-slug-keikat .section-gigs .gigs-list .gig-item {
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: center;
    white-space: nowrap;
}

.page-slug-keikat .section-gigs .no-gigs {
    text-align: center;
    margin: var(--space-sm) auto 0;
}

.page-slug-keikat .section-gigs .no-gigs p {
    margin-left: auto;
    margin-right: auto;
}

.page-slug-keikat .gigs-past-section {
    margin-top: var(--space-md);
}

.page-slug-keikat .section-gigs .no-gigs .button-primary {
    display: inline-flex;
    margin: var(--space-sm) auto 0;
}

/* Controls for past gigs */
.gigs-controls {
    margin-top: var(--space-md);
    display: none;
    justify-content: center;
    gap: var(--space-sm);
    flex-wrap: wrap;
}

/* Past gigs are hidden by default; JS reveals them via inline style toggle */
.gigs-list[data-past-toggle="1"] .gig-item.gig-past {
    display: none;
}

.gigs-list[data-past-toggle="1"].is-open .gig-item.gig-past {
    display: flex;
}

.page-slug-keikat .section-gigs h2 {
    text-align: center;
}

.page-slug-keikat .section-gigs h3 {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
}

@media (max-width: 768px) {
    .page-slug-keikat .section-gigs .gigs-list-upcoming .gig-item {
        display: block;
        text-align: left;
        white-space: normal;
        overflow: visible;
        padding: 0.95rem 0.35rem;
        line-height: 1.45;
        padding-inline: var(--space-xs);
    }

    .page-slug-keikat .section-gigs .gigs-list-upcoming .gig-item .gig-date,
    .page-slug-keikat .section-gigs .gigs-list-upcoming .gig-item .gig-title-link,
    .page-slug-keikat .section-gigs .gigs-list-upcoming .gig-item .gig-title-text {
        display: block;
        white-space: normal;
        overflow-wrap: anywhere;
        max-width: 100%;
    }

    .page-slug-keikat .section-gigs .gigs-list-upcoming .gig-item .gig-date {
        margin-bottom: 0.18rem;
        font-size: 0.76rem;
        letter-spacing: 0.08em;
        text-transform: uppercase;
        opacity: 0.78;
    }

    .page-slug-keikat .section-gigs .gigs-list-upcoming .gig-item .gig-title-link,
    .page-slug-keikat .section-gigs .gigs-list-upcoming .gig-item .gig-title-text {
        font-size: 0.98rem;
        line-height: 1.35;
        letter-spacing: 0.012em;
        margin-bottom: 0.18rem;
    }

    .page-slug-keikat .section-gigs .gigs-list-upcoming .gig-item .gig-venue,
    .page-slug-keikat .section-gigs .gigs-list-upcoming .gig-item .gig-city {
        display: inline;
        white-space: normal;
        overflow-wrap: anywhere;
        letter-spacing: 0.01em;
        color: var(--color-text-muted);
    }

    .page-slug-keikat .section-gigs .gigs-list-upcoming .gig-item .gig-sep {
        display: none;
        margin-inline: 0;
        min-width: 0;
    }

    .page-slug-keikat .section-gigs .gigs-list-upcoming .gig-item .gig-sep:last-of-type {
        display: inline-flex;
        margin-inline: 0.35rem;
        min-width: 0;
    }

    .page-slug-keikat .gigs-past-section {
        margin-top: var(--space-lg);
    }

    .page-slug-keikat .gigs-past-section .gigs-past-list .gig-item.gig-past {
        display: block;
        text-align: left;
        white-space: normal;
        overflow: visible;
        padding: 0.95rem 0.35rem;
        line-height: 1.45;
        padding-inline: var(--space-xs);
    }

    .page-slug-keikat .gigs-past-section .gigs-past-list .gig-item.gig-past .gig-date,
    .page-slug-keikat .gigs-past-section .gigs-past-list .gig-item.gig-past .gig-title-link,
    .page-slug-keikat .gigs-past-section .gigs-past-list .gig-item.gig-past .gig-title-text {
        display: block;
        white-space: normal;
        overflow-wrap: anywhere;
        max-width: 100%;
    }

    .page-slug-keikat .gigs-past-section .gigs-past-list .gig-item.gig-past .gig-date {
        margin-bottom: 0.18rem;
        font-size: 0.76rem;
        letter-spacing: 0.08em;
        text-transform: uppercase;
        opacity: 0.78;
    }

    .page-slug-keikat .gigs-past-section .gigs-past-list .gig-item.gig-past .gig-title-link,
    .page-slug-keikat .gigs-past-section .gigs-past-list .gig-item.gig-past .gig-title-text {
        font-size: 0.98rem;
        line-height: 1.35;
        letter-spacing: 0.012em;
        margin-bottom: 0.18rem;
    }

    .page-slug-keikat .gigs-past-section .gigs-past-list .gig-item.gig-past .gig-venue,
    .page-slug-keikat .gigs-past-section .gigs-past-list .gig-item.gig-past .gig-city {
        display: inline;
        white-space: normal;
        overflow-wrap: anywhere;
        letter-spacing: 0.01em;
        color: var(--color-text-muted);
    }

    .page-slug-keikat .gigs-past-section .gigs-past-list .gig-item.gig-past .gig-sep {
        display: none;
        margin-inline: 0;
        min-width: 0;
    }

    .page-slug-keikat .gigs-past-section .gigs-past-list .gig-item.gig-past .gig-sep:last-of-type {
        display: inline-flex;
        margin-inline: 0.35rem;
        min-width: 0;
    }
}
