:root {
    --month-width: 150px;
    --first-col-width: 88px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: -0.05px;
    color: white;
    background: #fff;
}

* {
    box-sizing: border-box;
    font-family: inherit;
}

a,
h1,
h2,
h3,
h4,
h5,
h6,
button,
input,
select,
textarea {
    font-family: inherit;
    font-weight: inherit;
    font-size: inherit;
}

.section {
    padding: 40px;
    box-sizing: border-box;
}

.top {
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 60vh;
}

.title-video {
    width: 98vw;
    max-width: 98vw;
    max-height: 58vh;
    object-fit: contain;
    display: block;
    z-index: 1;
}

.timeline-section {
    position: relative;
    width: 100%;
    height: 100dvh; /* dynamische Viewport-Höhe */
    overflow: hidden;
}

/* Timeline Container – scrollt horizontal */
.timeline-container {
    position: relative;
    width: 100%;
    height: 100dvh;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: env(safe-area-inset-bottom); /* nur unten Safe-Area */
    /* NICHT padding-top! sonst Inhalt rutscht nach unten */
    touch-action: pan-y;
}


.timeline-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100dvh;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.timeline-bg img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(60px);
    transform: scale(1.1);
    opacity: 0;
}

.year,
.year-col {
    position: sticky;
    top: 0;
    left: var(--first-col-width);
    text-align: left;
    z-index: 30;
    background: none;
}

.info-cell {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    text-align: left;
    justify-self: stretch;
    align-self: stretch;
    width: 80vw;
    height: 100%;
    padding: 20px;
    box-sizing: border-box;
    line-height: 1.5;
    z-index: 21;
    background: white;
    color: black;
    mix-blend-mode: color-dodge;
}

.info-cell p {
    width: 100%;
    text-align: left;
}

.info-cell a {
    color: black;
    text-decoration: underline dotted;
}

.header {
    position: sticky;
    z-index: 25;
}

.today-line {
    position: fixed;
    top: 0;
    left: 0;
    width: 10px;
    height: 100vh;
    background: red;
    z-index: 2000;
    pointer-events: none;
    mix-blend-mode: multiply;
}

.timeline {
    display: grid;
    grid-template-columns: var(--first-col-width) repeat(23, var(--month-width)) repeat(4, var(--month-width));
    grid-template-rows: 3.5% 3.5% 15.5% 15.5% 15.5% 15.5% 15.5% 15.5%;
    width: max-content;
    height: 100vh;
    gap: 1px 0;
}

.year,
.header {
    padding-left: 0 !important;
}

.row-title {
    position: sticky;
    left: 0;
    z-index: 20;
    color: white;
    background: black;
    mix-blend-mode: multiply;
    opacity: 0.5;
    align-items: flex-start !important;
    padding-top: 2px;
}

.cell {
    display: flex;
    align-items: center;
    box-sizing: border-box;
    white-space: normal;
    word-break: break-word;
    padding-left: 15px;
}

.media-cell {
    padding-left: 0;
    height: 15.5vh;
    width: 100%;
    overflow: hidden;
    cursor: pointer;
}

.media-cell:has(.white-image) {
    background: #fafafa;
}

.row-highlight {
    background: gray;
}

.row-title.row-highlight {
    background: white;
color: black
}

.active {
    color: black;
    background: white;
    mix-blend-mode: color-dodge;
    opacity: 1;
}

.active a {
    color: black;
}

.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 2000;
    justify-content: center;
    align-items: center;
}

.lightbox-track {
    display: flex;
    gap: 60px;
    align-items: center;
    overflow: hidden;
    width: 100vw;
    padding: 0 20vw;
    box-sizing: border-box;
}

.lightbox-item {
    flex: 0 0 auto;
    max-width: 60vw;
    cursor: pointer;
}

.lightbox-caption {
    margin-top: 10px;
    text-align: center;
    width: 100%;
text-shadow:
        0 0 3px rgba(0, 0, 0, 0.2),
        0 0 6px rgba(0, 0, 0, 0.15),
        0 0 10px rgba(0, 0, 0, 0.1);
}

.lightbox-media {
    display: flex;
    justify-content: center;
    align-items: center;
}

.lightbox-media img,
.lightbox-media video {
    width: 100%;
    max-height: 70vh;
    object-fit: contain;
    display: block;
    background: transparent;
}

.white-image {
    mix-blend-mode: multiply;
}

.cell.event {
    position: relative;
}

.cell.event::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 10px;
    background: white;
    pointer-events: none;
}

.thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    background: transparent;
    transition: filter 0.2s ease;
}

.media-cell:hover .thumbnail {
    filter: brightness(1.25);
}

.cell.split {
    display: grid;
    grid-template-rows: 1fr 1fr;
    padding-left: 0;
}

.cell-top,
.cell-bottom {
    padding-left: 15px;
    display: flex;
    align-items: center;
    height: 100%;
}

.timeline-controls {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 3000;
    display: flex;
    gap: 1px;
}

.timeline-controls button {
    padding: 0 12px;
    cursor: pointer;
    border-radius: 0;
    border: 0 solid #000;
    background: white;
    color: black;
    text-decoration: none;
}

.timeline-controls button:hover {
    background: #eee;
}

a {
    text-decoration: none;
    color: white;
    opacity: 1;
}

a:hover {
    opacity: 0.7;
}

/* Overlay */
.impressum-overlay {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100dvh;
    background: white;
    display: none;
    justify-content: center;
    align-items: flex-start;
    z-index: 4015;
    padding: 40px 20px;
    overflow-y: auto;
}

/* Impressum */

.impressum-content {
    width: 100%;
    color: black;
    display: flex;
    flex-direction: column;
    gap: 20px;
    line-height: 1.5;
}

.impressum-close {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 0 12px;
    background: black;
    color: white;
    border: none;
    cursor: pointer;
    z-index: 4100;
}

.impressum-close:hover {
    background: #eee;
}

.impressum-overlay a {
    color: black;
    text-decoration: underline dotted gray;
}

.impressum-overlay a:hover {
    text-decoration: none;
}

/* Mobilversion */

@media (max-width: 800px) {
    .info-cell {
        width: 100vw;
    }

    .lightbox-track {
        gap: 10px;
        padding: 0 10vw;
    }
    
}