/* Import Inter Font */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;700;800&display=swap');

/* --- SCROLL REVEAL ANIMATIONS --- */
.tsp-reveal {
    opacity: 0;
    transition: all 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
    visibility: hidden;
    will-change: opacity, transform;
}

/* 1. Fade Animation */
.tsp-reveal-fade {
    transform: translateY(30px);
}

/* 2. Flip Animation */
.tsp-reveal-flip {
    transform: perspective(1000px) rotateX(-90deg);
    transform-origin: center top;
}

/* 3. Zoom Animation */
.tsp-reveal-zoom {
    transform: scale(0.6);
}

/* Final Visible State */
.tsp-reveal.is-visible {
    opacity: 1 !important;
    transform: translateY(0) rotateX(0) scale(1) !important;
    visibility: visible !important;
}

/* Optional: Staggered delay */
.tsp-reveal.is-visible:nth-child(even) {
    transition-delay: 0.1s;
}

/* Main Container */
.tsp-timeline-container {
    max-width: 1200px;
    margin: 80px auto;
    padding: 0 40px;
    font-family: 'Inter', sans-serif;
    color: #1e293b;
    /* Slate 800 */
}

/* --- YEAR SEPARATOR --- */
.tsp-year-separator {
    display: grid;
    grid-template-columns: 200px 100px 1fr;
    align-items: center;
    margin-bottom: 50px;
    opacity: 1;
}

@keyframes slideDownFade {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tsp-sep-left,
.tsp-sep-right {
    /* Spacers */
}

.tsp-sep-center {
    display: flex;
    justify-content: center;
    position: relative;
}

/* Modern Circular Year Label */
.tsp-year-label {
    /* Premium Gradient */
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: #fff;
    font-size: 1.4rem;
    font-weight: 800;

    width: 90px;
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;
    border: 5px solid #fff;
    box-shadow: 0 10px 25px rgba(124, 58, 237, 0.3);
    /* Colored Shadow */
    z-index: 5;
    position: relative;
}

/* --- ITEM GRID --- */
.tsp-item {
    display: grid;
    grid-template-columns: 200px 60px 1fr;
    /* Narrower spine */
    gap: 0;
    padding-bottom: 50px;
    position: relative;
}

/* Left Column: Month/Day */
/* Left Column: Calendar Box Date (CLASSIC) */
.tsp-date-col {
    text-align: right;
    padding-top: 15px;
    padding-right: 40px;
}

.tsp-month-text {
    background: #fff;
    width: 65px;
    height: 75px;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
    font-family: inherit;
    transition: all 0.3s ease;
}

/* Calendar Header (Month) */
.tsp-month-text::before {
    content: attr(data-month);
    display: block;
    width: 100%;
    background: var(--tsp-bg, #4f46e5);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    padding: 4px 0;
    text-align: center;
}

/* Day Number */
.tsp-month-text::after {
    content: attr(data-day);
    display: block;
    font-size: 1.5rem;
    font-weight: 800;
    color: #1e293b;
    padding-top: 5px;
}

.tsp-item:hover .tsp-month-text {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(79, 70, 229, 0.2);
    border-color: #4f46e5;
}

/* Center Column: Line + Dot */
.tsp-marker-col {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Line */
.tsp-marker-line {
    position: absolute;
    top: -30px;
    bottom: -80px;
    width: 4px;
    background: #000;
    z-index: 0;
    border-radius: 4px;
    height: calc(100% + 100px);
}

/* For last item */
.tsp-item:last-child .tsp-marker-line {
    background: linear-gradient(to bottom, #000 40%, transparent 100%);
    height: 100%;
}

/* Dot */
.tsp-marker-dot {
    width: 20px;
    height: 20px;
    background: #fff;
    border: 5px solid #000;
    border-radius: 50%;
    z-index: 2;
    margin-top: 26px;
    box-shadow: 0 0 0 4px #fff, 0 4px 10px rgba(0, 0, 0, 0.1), 0 0 15px rgba(79, 70, 229, 0.2);
    /* Subtle glow */
    transform: scale(1);
}

/* Right Column: Content */
.tsp-content-col {
    padding-left: 10px;
    /* Reduced to bring card closer */
    perspective: 1000px;
    position: relative;
}

/* Connector Line (Length reduced by 50%) */
.tsp-content-col::before {
    content: '';
    position: absolute;
    top: 36px;
    left: -30px;
    /* Center of 60px marker col */
    width: 40px;
    /* 30px (to col edge) + 10px (padding) = 40px (50% of previous 80px) */
    height: 2px;
    background: #000;
    z-index: 1;
}

.tsp-card {
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.05), 0 0 0 1px rgba(0, 0, 0, 0.03);
    /* Refined shadow + border */
    overflow: hidden;
    opacity: 1;
    transform: none;
}

.tsp-card:hover {
    transform: translateY(-8px) scale(1.01);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
}

.tsp-card-header {
    background: var(--tsp-bg, #4f46e5);
    padding: 18px 24px;
    position: relative;
    overflow: hidden;
    width: 50%;
    border-bottom-right-radius: 24px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* Shine effect on Header */
.tsp-card-header::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(255, 255, 255, 0) 40%, rgba(255, 255, 255, 0.1) 50%, rgba(255, 255, 255, 0) 60%);
    pointer-events: none;
}

.tsp-title {
    margin: 0;
    color: #fff;
    font-size: clamp(1rem, 4vw, 1.25rem);
    font-weight: 700;
    letter-spacing: -0.01em;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    line-height: 1.3;
}

.tsp-card-body {
    padding: 30px;
    color: #475569;
    /* Slate 600 */
    line-height: 1.75;
    font-size: 1rem;
}

.tsp-hidden-content {
    display: block;
    margin-top: 20px;
}

.tsp-title-readmore {
    display: inline-block;
    margin-top: 8px;
    font-size: 0.75rem;
    /* sm size */
    color: rgba(255, 255, 255, 0.85);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 1px dotted rgba(255, 255, 255, 0.4);
}

.tsp-title-readmore:hover {
    color: #ffffff;
    border-bottom-color: #ffffff;
}

/* Arrows Removed explicitly for date */
.tsp-date-col::before {
    display: none;
    content: none;
}

/* Mobile Responsive */
@media (max-width: 900px) {
    .tsp-year-separator {
        grid-template-columns: 80px 1fr;
        gap: 20px;
    }

    .tsp-sep-left {
        display: none;
    }

    .tsp-sep-center {
        justify-content: flex-start;
    }

    .tsp-year-label {
        width: 70px;
        height: 70px;
        font-size: 1.1rem;
    }

    .tsp-item {
        grid-template-columns: 80px 1fr;
        padding-bottom: 40px;
    }

    .tsp-date-col {
        grid-row: 1;
        grid-column: 2;
        text-align: left;
        padding: 0 0 10px 0;
        margin-left: 30px;
        /* Align with card start */
    }

    .tsp-marker-col {
        grid-row: 1 / span 2;
        grid-column: 1;
        width: 80px;
    }

    .tsp-marker-line {
        left: 50%;
        transform: translateX(-50%);
    }

    .tsp-content-col {
        grid-row: 2;
        grid-column: 2;
        padding-left: 0;
    }

    .tsp-card {
        transform: translateY(20px);
    }

    .tsp-item.visible .tsp-card {
        transform: translateY(0);
    }
}

/* --- YEAR SEPARATOR --- */
.tsp-year-separator {
    display: grid;
    grid-template-columns: 200px 60px 1fr;
    /* Matches .tsp-item grid */
    align-items: center;
    gap: 0;
    margin-bottom: 40px;
    margin-top: 20px;
}

.tsp-sep-left,
.tsp-sep-right {
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(0, 0, 0, 0.1), transparent);
}

.tsp-sep-center {
    display: flex;
    justify-content: center;
    position: relative;
    z-index: 1;
}

/* Vertical Spine Bridge */
.tsp-sep-center::before {
    content: '';
    position: absolute;
    top: -30px;
    bottom: -30px;
    width: 4px;
    background: #000;
    left: 50%;
    transform: translateX(-50%);
    z-index: -1;
}

.tsp-year-label {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: #fff;
    padding: 12px 0;
    border-radius: 50%;
    font-weight: 800;
    font-size: 1rem;
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow:
        0 0 0 4px #fff,
        0 4px 15px rgba(79, 70, 229, 0.3),
        inset 0 2px 4px rgba(255, 255, 255, 0.2);
    /* Gem effect */
    border: 1px solid rgba(255, 255, 255, 0.1);
    letter-spacing: 0.5px;
    transition: transform 0.3s ease;
}

.tsp-year-separator:hover .tsp-year-label {
    transform: scale(1.1);
}

/* --- CLASSIC ZIGZAG (Alternating Sides) --- */

/* Even Rows: Content Left, Spine Center, Date Right */
.tsp-layout-classic .tsp-item.tsp-zigzag-even {
    grid-template-columns: 1fr 60px 200px;
}

.tsp-layout-classic .tsp-item.tsp-zigzag-even .tsp-content-col {
    grid-column: 1;
    padding-left: 0;
    padding-right: 10px;
    order: 1;
}

.tsp-layout-classic .tsp-item.tsp-zigzag-even .tsp-content-col::before {
    left: auto;
    right: -30px;
}

.tsp-layout-classic .tsp-item.tsp-zigzag-even .tsp-marker-col {
    grid-column: 2;
    order: 2;
}

.tsp-layout-classic .tsp-item.tsp-zigzag-even .tsp-date-col {
    grid-column: 3;
    text-align: left;
    order: 3;
    padding-right: 0;
    padding-left: 40px;
}

.tsp-layout-classic .tsp-item.tsp-zigzag-even .tsp-card-header {
    margin-left: auto;
    border-bottom-right-radius: 0;
    border-bottom-left-radius: 24px;
}

.tsp-layout-classic .tsp-item.tsp-zigzag-even .tsp-title {
    text-align: right;
}

/* --- MODAL STYLES --- */
/* ==========================================================================
   PREMIUM MODAL SYSTEM
   ========================================================================== */

.tsp-modal-overlay {
    display: none;
    position: fixed;
    inset: 0 !important;
    z-index: 999999 !important;
    width: 100vw;
    height: 100vh;
    background-color: rgba(15, 23, 42, 0.75);
    /* Deep Slate Tint */
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.tsp-modal-box {
    background: #ffffff;
    width: 95%;
    max-width: 720px;
    border-radius: 32px;
    box-shadow: 0 40px 80px -20px rgba(15, 23, 42, 0.4);
    position: relative;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: tspModalAppear 0.5s cubic-bezier(0.19, 1, 0.22, 1);
}

@keyframes tspModalAppear {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(40px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.tsp-close-btn {
    position: absolute;
    top: 24px;
    right: 24px;
    width: 44px;
    height: 44px;
    background: rgba(15, 23, 42, 0.05);
    color: #1e293b;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 50;
    border: 1px solid rgba(15, 23, 42, 0.05);
}

.tsp-close-btn:hover {
    background: #f43f5e;
    /* Premium Rose */
    color: #ffffff;
    transform: rotate(90deg) scale(1.1);
    border-color: #f43f5e;
}

.tsp-modal-body {
    overflow-y: auto;
    padding: 0;
    scrollbar-width: thin;
    scrollbar-color: #e2e8f0 transparent;
}

.tsp-modal-body::-webkit-scrollbar {
    width: 6px;
}

.tsp-modal-body::-webkit-scrollbar-thumb {
    background: #e2e8f0;
    border-radius: 10px;
}

.tsp-modal-header-img img {
    width: 100%;
    height: auto;
    display: block;
}

.tsp-modal-info {
    padding: 45px 55px 55px;
}

.tsp-modal-date {
    display: inline-block;
    padding: 7px 16px;
    background: rgba(99, 102, 241, 0.1);
    color: #6366f1;
    /* Indigo */
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    border-radius: 100px;
    margin-bottom: 25px;
}

.tsp-modal-headline {
    font-size: clamp(1.8rem, 6vw, 2.75rem);
    font-weight: 800;
    color: #0f172a;
    line-height: 1.1;
    margin: 0 0 28px;
    letter-spacing: -0.025em;
}

.tsp-modal-description {
    font-size: 1.15rem;
    line-height: 1.9;
    color: #334155;
    font-weight: 400;
}

.tsp-modal-description p {
    margin-bottom: 1.6em;
}

/* --- SCROLL ISOLATION --- */
body.tsp-modal-open {
    overflow: hidden !important;
    padding-right: 15px;
    /* Prevent layout shift */
}

/* --- ADD NEW EVENT FORM --- */
.tsp-form-group {
    margin-bottom: 20px;
}

.tsp-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
    color: #334155;
    font-size: 0.9rem;
}

.tsp-form-group input[type="text"],
.tsp-form-group input[type="date"],
.tsp-form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.2s;
}

.tsp-form-group input:focus,

/* --- FLAT LAYOUT CALENDAR BOX --- */
.tsp-flat-date {
    background: #fff;
    width: 60px;
    height: 70px;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
    margin-bottom: 20px;
    font-family: inherit;
}

.tsp-flat-date::before {
    content: attr(data-month);
    display: block;
    width: 100%;
    background: #f43f5e;
    /* Premium Rose for Flat Layout */
    color: #fff;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    padding: 3px 0;
    text-align: center;
}

.tsp-flat-date::after {
    content: attr(data-day);
    display: block;
    font-size: 1.3rem;
    font-weight: 800;
    color: #1e293b;
    padding-top: 4px;
}

/* --- FLATPICKR PREMIUM THEME OVERRIDES --- */
.flatpickr-calendar {
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.2) !important;
    border-radius: 16px !important;
    border: 1px solid #e2e8f0 !important;
    font-family: 'Inter', sans-serif !important;
}

.flatpickr-day.selected,
.flatpickr-day.selected:hover {
    background: #4f46e5 !important;
    border-color: #4f46e5 !important;
}

.flatpickr-months .flatpickr-month {
    color: #1e293b !important;
    fill: #1e293b !important;
}

.flatpickr-current-month .flatpickr-monthDropdown-months {
    font-weight: 700 !important;
}

.tsp-submit-btn {
    width: 100%;
    padding: 14px;
    background: #4f46e5;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
}

.tsp-submit-btn:hover {
    background: #4338ca;
}

/* ==========================================================================
   MODERN LAYOUT (Side-by-Side)
   Scoped to .tsp-layout-modern
   ========================================================================== */

.tsp-layout-modern .tsp-item {
    grid-template-columns: 60px 1fr;
    /* No Date Col */
}

.tsp-layout-modern .tsp-marker-col {
    grid-column: 1;
}

.tsp-layout-modern .tsp-content-col {
    grid-column: 2;
    padding-left: 20px;
}

.tsp-layout-modern .tsp-card {
    display: flex;
    flex-direction: row;
    min-height: 220px;
}

.tsp-layout-modern .tsp-card:hover {
    transform: translateY(-5px);
}

.tsp-layout-modern .tsp-card-text {
    flex: 1;
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
}

.tsp-layout-modern .tsp-date-badge {
    display: inline-block;
    background: var(--tsp-bg, #4f46e5);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 4px 12px;
    border-radius: 100px;
    margin-bottom: 12px;
    align-self: flex-start;
}

.tsp-layout-modern .tsp-card-media {
    width: 40%;
    position: relative;
    overflow: hidden;
    min-height: 100%;
}

.tsp-layout-modern .tsp-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Modern Mobile Override */
@media (max-width: 900px) {
    .tsp-layout-modern .tsp-item {
        grid-template-columns: 60px 1fr;
    }

    .tsp-layout-modern .tsp-card {
        flex-direction: column-reverse;
    }

    .tsp-layout-modern .tsp-card-media {
        width: 100%;
        height: 200px;
    }
}


/* ==========================================================================
   FLAT LAYOUT (Requested Image Style)
   Scoped to .tsp-layout-flat
   ========================================================================== */

.tsp-layout-flat .tsp-timeline {
    position: relative;
    padding-top: 40px;
}

/* Item Grid: Image | Spine | Text */
.tsp-layout-flat .tsp-item {
    display: grid;
    grid-template-columns: 1fr 60px 1fr;
    gap: 40px;
    align-items: center;
    /* Center vertically based on content */
    margin-bottom: 0;
    /* Remove gap so lines connect */
    padding-bottom: 60px;
}

/* Column 1: Image */
.tsp-layout-flat .tsp-col-img {
    text-align: right;
    /* Image aligns to spine */
}

.tsp-layout-flat .tsp-image img {
    border-radius: 8px;
    /* Slight radius for modern feel */
    box-shadow: none;
    /* Flat style */

    /* UI/UX Standardization */
    width: 100%;
    /* FLUID: Fills the column width */
    max-width: 100%;
    /* Prevention */
    height: auto;
    /* Allow scale */
    aspect-ratio: 16 / 9;
    /* Enforce Rectangle Shape (Responsive) */
    object-fit: cover;
    /* ESSENTIAL: Prevents stretching/distortion */

    display: block;
    margin-left: auto;
    /* Alignment */
}

/* Column 2: Spine */
.tsp-layout-flat .tsp-col-spine {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    /* Ensure height covers the item */
}

/* Spine Line */
.tsp-layout-flat .tsp-col-spine::before {
    content: '';
    position: absolute;
    top: -60px;
    /* Connect to previous item */
    bottom: -60px;
    /* Connect to next item */
    width: 2px;
    background-color: #000;
    /* Black line */
    z-index: 0;
    height: auto;
}

.tsp-layout-flat .tsp-item:first-child .tsp-col-spine::before {
    top: 0;
}

/* Use pseudo on parent if needed for full height, but this should work with negative margins/pads */

/* Spine Item Marker */
.tsp-layout-flat .tsp-dot {
    width: 16px;
    height: 16px;
    background: #000;
    /* Black square/dot */
    border: 4px solid #fff;
    box-shadow: 0 0 0 1px #000;
    z-index: 2;
    margin-top: 10px;
    border-radius: 2px;
}


/* Column 3: Text */
.tsp-layout-flat .tsp-col-text {
    text-align: left;
    padding-top: 0;
}

/* Typography */
.tsp-layout-flat .tsp-flat-date {
    color: #f43f5e;
    /* Rose/Pink Date */
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.tsp-layout-flat .tsp-flat-intro {
    font-size: 0.85rem;
    color: #94a3b8;
    /* Light grey 'Introduced' */
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tsp-layout-flat .tsp-flat-title {
    color: #06b6d4;
    /* Cyan/Teal Title */
    font-size: clamp(1.4rem, 5vw, 2.2rem);
    font-weight: 800;
    margin: 0 0 15px;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.tsp-layout-flat .tsp-flat-desc {
    color: #64748b;
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 20px;
}

.tsp-layout-flat .tsp-flat-readmore {
    color: #334155;
    font-weight: 600;
    text-decoration: none;
    font-size: 0.95rem;
    border-bottom: 2px solid transparent;
    transition: border-color 0.2s;
}

.tsp-layout-flat .tsp-flat-readmore:hover {
    border-bottom-color: #06b6d4;
    color: #0f172a;
}

/* --- ZIGZAG LOGIC (Alternating Sides) --- */

/* Even Rows: Text Left, Spine Center, Image Right */
.tsp-layout-flat .tsp-item.tsp-zigzag-even {
    grid-template-columns: 1fr 60px 1fr;
}

.tsp-layout-flat .tsp-item.tsp-zigzag-even .tsp-col-text {
    grid-column: 1;
    text-align: right;
    order: 1;
}

.tsp-layout-flat .tsp-item.tsp-zigzag-even .tsp-col-spine {
    grid-column: 2;
    order: 2;
}

.tsp-layout-flat .tsp-item.tsp-zigzag-even .tsp-col-img {
    grid-column: 3;
    text-align: left;
    order: 3;
}

/* Image alignment for even items */
.tsp-layout-flat .tsp-item.tsp-zigzag-even .tsp-image img {
    margin-left: 0;
    margin-right: auto;
}

/* Adjust date placement for even items */
.tsp-layout-flat .tsp-item.tsp-zigzag-even .tsp-flat-date {
    margin-left: auto;
}

/* Year Separator Override for Flat - FIXING SPINE CONNECTION */
.tsp-layout-flat .tsp-year-separator {
    grid-template-columns: 1fr 60px 1fr;
    /* Match grid center */
    margin: 0;
    /* Remove margin to ensure connectivity */
    padding: 0 0 60px 0;
}

.tsp-layout-flat .tsp-sep-center {
    /* Ensure the vertical line runs through here */
}

/* Override the default black line for Classic layout */
.tsp-layout-flat .tsp-sep-center::before {
    width: 2px;
    background: #000;
    /* Black spine match */
    top: -50px;
    bottom: -50px;
    z-index: -1;
}

.tsp-layout-flat .tsp-year-label {
    width: 60px;
    height: 40px;
    border-radius: 4px;
    /* Box style */
    background: #fff;
    border: 2px solid #000;
    color: #000;
    font-size: 1rem;
    font-weight: 700;
    box-shadow: none;
    /* Remove glow */
    z-index: 5;
}

/* Mobile Responsive (Unified 768px Breakpoint) */
@media (max-width: 768px) {

    /* Main container padding */
    .tsp-timeline-container {
        padding: 0 20px;
        margin: 40px auto;
    }

    /* Standardize Item Grid for Mobile */
    .tsp-item {
        grid-template-columns: 60px 1fr !important;
        gap: 0 !important;
    }

    /* Year Separator */
    .tsp-year-separator {
        grid-template-columns: 60px 1fr !important;
        margin-bottom: 30px;
    }

    .tsp-sep-left {
        display: none;
    }

    .tsp-sep-center {
        justify-content: center;
    }

    /* Spine */
    .tsp-marker-col,
    .tsp-col-spine {
        grid-column: 1 !important;
        grid-row: 1 / span 10 !important;
        width: 60px !important;
    }

    .tsp-marker-line,
    .tsp-layout-flat .tsp-col-spine::before {
        left: 50% !important;
        transform: translateX(-50%) !important;
    }

    /* Content Alignment (CLASSIC) */
    .tsp-date-col {
        grid-row: 1;
        grid-column: 2;
        text-align: left !important;
        padding: 0 0 15px 10px !important;
        margin-left: 0 !important;
    }

    .tsp-content-col {
        grid-row: 2;
        grid-column: 2;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .tsp-content-col::before {
        display: none !important;
    }

    .tsp-card-header {
        width: 100% !important;
        border-radius: 0 !important;
        text-align: left !important;
    }

    .tsp-title {
        text-align: left !important;
    }

    /* Content Alignment (FLAT) */
    .tsp-layout-flat .tsp-col-img {
        grid-column: 2 !important;
        order: -1 !important;
        text-align: left !important;
        margin-bottom: 20px !important;
    }

    .tsp-layout-flat .tsp-col-text {
        grid-column: 2 !important;
        text-align: left !important;
    }

    .tsp-layout-flat .tsp-flat-date {
        margin-left: 0 !important;
    }

    .tsp-layout-flat .tsp-flat-title {
        font-size: 1.4rem !important;
    }

    /* Reset Zigzag for Even Items on Mobile */
    .tsp-item.tsp-zigzag-even {
        grid-template-columns: 60px 1fr !important;
    }

    .tsp-item.tsp-zigzag-even .tsp-content-col,
    .tsp-item.tsp-zigzag-even .tsp-date-col,
    .tsp-item.tsp-zigzag-even .tsp-col-img,
    .tsp-item.tsp-zigzag-even .tsp-col-text {
        grid-column: 2 !important;
        text-align: left !important;
        order: initial !important;
    }

    /* Typo scaling */
    .tsp-modal-headline {
        font-size: 1.8rem !important;
    }
}