:root {
    --jubag-blue: #0878bd;
    --jubag-blue-dark: #005a95;
    --jubag-lime: #dbe100;
    --jubag-text: #1f2933;
    --jubag-muted: #5d6b78;
    --jubag-light: #f3f8fb;
    --jubag-radius: 22px;
    --jubag-shadow: 0 16px 40px rgba(0, 90, 149, 0.12);
}

.jubag-media-archive,
.jubag-media-single,
.jubag-media-section {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.jubag-media-hero {
    margin: 48px auto 32px;
    padding: 48px;
    border-radius: 32px;
    background:
        radial-gradient(circle at top right, rgba(219,225,0,0.45), transparent 34%),
        linear-gradient(135deg, #eaf7fc, #ffffff);
    box-shadow: var(--jubag-shadow);
}

.jubag-media-hero h1 {
    max-width: 760px;
    margin: 8px 0 16px;
    color: var(--jubag-blue);
    font-size: clamp(2rem, 4vw, 4rem);
    line-height: 1.05;
}

.jubag-media-hero p {
    max-width: 720px;
    color: var(--jubag-text);
    font-size: 1.15rem;
    line-height: 1.65;
}

.jubag-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--jubag-blue-dark);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.jubag-kicker::before {
    content: "#";
    color: var(--jubag-lime);
    font-size: 1.4em;
}

.jubag-media-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 28px;
}

.jubag-media-filter a,
.jubag-category-list a,
.jubag-media-card__terms a {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 7px 13px;
    border-radius: 999px;
    background: var(--jubag-light);
    color: var(--jubag-blue-dark);
    font-weight: 700;
    text-decoration: none;
}

.jubag-media-filter a:hover,
.jubag-category-list a:hover,
.jubag-media-card__terms a:hover {
    background: var(--jubag-lime);
    color: var(--jubag-blue-dark);
}

.jubag-media-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 26px;
    margin: 28px 0 56px;
}

.jubag-media-grid--small {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.jubag-media-card {
    overflow: hidden;
    border-radius: var(--jubag-radius);
    background: #ffffff;
    box-shadow: var(--jubag-shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.jubag-media-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 46px rgba(0, 90, 149, 0.18);
}

.jubag-media-card__image {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: linear-gradient(135deg, var(--jubag-blue), var(--jubag-blue-dark));
}

.jubag-media-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.25s ease;
}

.jubag-media-card:hover .jubag-media-card__image img {
    transform: scale(1.04);
}

.jubag-media-card__placeholder {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    color: #ffffff;
    font-size: 2rem;
    font-weight: 900;
}

.jubag-media-card__play {
    position: absolute;
    left: 18px;
    bottom: 18px;
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border-radius: 999px;
    background: var(--jubag-lime);
    color: var(--jubag-blue-dark);
    font-size: 1.2rem;
    box-shadow: 0 8px 22px rgba(0,0,0,0.18);
}

.jubag-media-card__duration {
    position: absolute;
    right: 14px;
    bottom: 18px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(0,0,0,0.72);
    color: #ffffff;
    font-size: 0.85rem;
    font-weight: 700;
}

.jubag-media-card__content {
    padding: 22px;
}

.jubag-media-card__terms {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.jubag-media-card h3 {
    margin: 0 0 10px;
    color: var(--jubag-blue);
    font-size: 1.25rem;
    line-height: 1.25;
}

.jubag-media-card h3 a {
    color: inherit;
    text-decoration: none;
}

.jubag-media-card p {
    margin: 0;
    color: var(--jubag-muted);
    line-height: 1.55;
}

.jubag-media-section__head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 24px;
    margin: 48px 0 22px;
}

.jubag-media-section__head h2 {
    margin: 6px 0 0;
    color: var(--jubag-blue);
    font-size: clamp(1.8rem, 3vw, 2.8rem);
}

.jubag-link-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 18px;
    border-radius: 999px;
    background: var(--jubag-blue);
    color: #ffffff;
    font-weight: 800;
    text-decoration: none;
}

.jubag-link-button:hover {
    background: var(--jubag-blue-dark);
    color: #ffffff;
}

.jubag-media-slider {
    position: relative;
}

.jubag-media-slider__track {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(280px, 360px);
    gap: 22px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: 8px 4px 28px;
}

.jubag-media-slider__item {
    scroll-snap-align: start;
}

.jubag-slider-btn {
    position: absolute;
    top: 42%;
    z-index: 5;
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 999px;
    background: var(--jubag-blue);
    color: #ffffff;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(0,0,0,0.2);
}

.jubag-slider-btn--prev {
    left: -18px;
}

.jubag-slider-btn--next {
    right: -18px;
}

.jubag-media-detail__header {
    margin: 48px 0 28px;
}

.jubag-backlink {
    display: inline-flex;
    margin-bottom: 18px;
    color: var(--jubag-blue);
    font-weight: 800;
    text-decoration: none;
}

.jubag-media-detail__header h1 {
    max-width: 920px;
    margin: 12px 0 16px;
    color: var(--jubag-blue);
    font-size: clamp(2rem, 4vw, 4rem);
    line-height: 1.05;
}

.jubag-media-detail__teaser {
    max-width: 820px;
    color: var(--jubag-text);
    font-size: 1.2rem;
    line-height: 1.65;
}

.jubag-media-detail__layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 34px;
    align-items: start;
}

.jubag-video-frame {
    overflow: hidden;
    border-radius: 28px;
    background: #000000;
    box-shadow: var(--jubag-shadow);
}

.jubag-video-frame iframe,
.jubag-video-frame video,
.jubag-video-frame .wp-video,
.jubag-video-frame .wp-video-shortcode {
    display: block;
    width: 100% !important;
    aspect-ratio: 16 / 9;
    height: auto !important;
}

.jubag-media-description {
    margin: 34px 0;
    padding: 34px;
    border-radius: 28px;
    background: #ffffff;
    box-shadow: var(--jubag-shadow);
}

.jubag-media-description h2,
.jubag-detail-box h2 {
    margin-top: 0;
    color: var(--jubag-blue);
}

.jubag-detail-box {
    margin-bottom: 24px;
    padding: 24px;
    border-radius: 24px;
    background: var(--jubag-light);
}

.jubag-category-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.jubag-event-list {
    display: grid;
    gap: 12px;
}

.jubag-event-item {
    display: block;
    padding: 14px;
    border-radius: 16px;
    background: #ffffff;
    color: var(--jubag-text);
    text-decoration: none;
}

.jubag-event-item strong {
    display: block;
    color: var(--jubag-blue);
}

.jubag-event-item span {
    display: block;
    margin-top: 4px;
    color: var(--jubag-muted);
}

.jubag-pagination {
    margin: 32px 0 64px;
}

@media (max-width: 900px) {
    .jubag-media-grid,
    .jubag-media-grid--small {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .jubag-media-detail__layout {
        grid-template-columns: 1fr;
    }

    .jubag-media-detail__aside {
        order: 2;
    }
}

@media (max-width: 640px) {
    .jubag-media-archive,
    .jubag-media-single,
    .jubag-media-section {
        width: min(100% - 24px, 1180px);
    }

    .jubag-media-hero {
        padding: 30px 22px;
        border-radius: 24px;
    }

    .jubag-media-grid,
    .jubag-media-grid--small {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .jubag-media-section__head {
        display: block;
    }

    .jubag-link-button {
        margin-top: 14px;
    }

    .jubag-slider-btn {
        display: none;
    }

    .jubag-media-slider__track {
        grid-auto-columns: minmax(260px, 86vw);
    }

    .jubag-media-description {
        padding: 24px;
    }
}