/* Location Timeline v2.0 */

:root {
    --lt-red:    #f4514a;
    --lt-bg:     #e3dfd7;
    --lt-gap:    16px;
    --lt-card-w: 280px;
    --lt-logo-w: 200px;
}

#lt-root {
    font-family: inherit;
    padding: 0;
    position: relative;
    overflow: visible;
}

/* TOP: tło, position relative dla logo i timeline */
.lt-top {
    background: var(--lt-bg);
    position: relative;
    padding-top: 28px;
    /* clip-path: tnij lewą krawędzią normalnie, prawa bez limitu */
    clip-path: inset(0 -9999px 0 0);
}

/* LOGO: absolute nad pierwszą kartą */
.lt-logo {
    position: absolute;
    top: 28px;
    left: 0;
    width: var(--lt-logo-w);
    padding-right: 20px;
    z-index: 20;
    pointer-events: none;
}

.lt-logo img {
    width: 100%;
    height: auto;
    display: block;
}

/* TIMELINE ROW: stały, nie przesuwa się.
   overflow:hidden żeby punkty znikały za logo przy scrollu.
   Prawa strona bez clippowania. */
.lt-timeline-row {
    display: flex;
    align-items: flex-end;
    gap: var(--lt-gap);
    position: relative;
    padding-bottom: 20px;
    /* overflow:hidden clippuje punkty gdy jadą w lewo (za lewą krawędź) */
    overflow: hidden;
}

/* Linia – pozycja absolutna względem lt-top (nie lt-timeline-row).
   Dzięki temu overflow:hidden na timeline-row jej nie ucina.
   bottom liczone od dołu lt-top = padding-bottom timeline-row + połowa kropki */
.lt-timeline-line {
    position: absolute;
    border-top: 3px dashed var(--lt-red);
    z-index: 5;
    pointer-events: none;
    transform: translateY(-50%);
    /* left, top i width ustawiane przez JS */
}

/* Spacer dla hero */
.lt-point-spacer {
    width: var(--lt-card-w);
    flex-shrink: 0;
    height: 1px;
    transition: transform 0.45s cubic-bezier(.4,0,.2,1);
}

/* Punkt */
.lt-point {
    width: var(--lt-card-w);
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    position: relative;
    z-index: 1;
    transition: transform 0.45s cubic-bezier(.4,0,.2,1);
}

.lt-point-label {
    font-size: 13px;
    font-weight: 700;
    color: var(--lt-red);
    white-space: nowrap;
    line-height: 1;
}

.lt-point-dot {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--lt-red);
    flex-shrink: 0;
    box-shadow: 0 0 0 3px var(--lt-bg);
    transition: transform 0.2s;
}

.lt-point:hover .lt-point-dot { transform: scale(1.35); }

/* SCROLL AREA: przesuwa się – tylko karty */
.lt-scroll-area {
    overflow: visible;
    transition: transform 0.45s cubic-bezier(.4,0,.2,1);
    will-change: transform;
}

/* CARDS ROW */
.lt-cards-row {
    display: flex;
    gap: var(--lt-gap);
    padding-bottom: 28px;
    overflow: visible;
}

/* KARTA: background-image cover */
.lt-card {
    width: var(--lt-card-w);
    flex-shrink: 0;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    aspect-ratio: 3/4;
    box-shadow: 0 4px 20px rgba(0,0,0,.10);
    transition: transform 0.2s, box-shadow 0.2s;
    background-color: #ddd;
    /* backgroundImage, backgroundSize, backgroundPosition ustawiane przez JS */
}

.lt-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(0,0,0,.16);
}

.lt-card-label {
    position: absolute;
    bottom: 14px;
    left: 14px;
    background: rgba(255,255,255,0.88);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border-radius: 20px;
    padding: 5px 14px;
    font-size: 13px;
    font-weight: 600;
    color: #222;
    pointer-events: none;
    z-index: 2;
}

.lt-card-no-img {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    background: #e8e4de;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #aaa;
    font-size: 13px;
}

/* PRZYCISKI */
.lt-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #fff;
    border: none;
    box-shadow: 0 2px 12px rgba(0,0,0,.18);
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 30;
    transition: background 0.2s, color 0.2s;
    line-height: 1;
}
.lt-btn:hover    { background: var(--lt-red); color: #fff; }
.lt-btn:disabled { opacity: 0.25; cursor: default; pointer-events: none; }
.lt-btn.prev     { left: calc(var(--lt-logo-w) + 8px); }
.lt-btn.next     { right: 20px; }

/* TABLET */
@media (max-width: 1100px) {
    :root { --lt-card-w: 220px; --lt-logo-w: 160px; }
}

/* MOBILE */
@media (max-width: 767px) {
    :root { --lt-card-w: 72vw; --lt-logo-w: 130px; }
    .lt-btn { display: none; }
    .lt-scroll-area {
        transform: none !important;
        transition: none !important;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .lt-scroll-area::-webkit-scrollbar { display: none; }
    .lt-card { scroll-snap-align: start; }
    .lt-point { transition: none; }
    .lt-point-spacer { transition: none; }
}

@media (max-width: 480px) {
    :root { --lt-card-w: 82vw; }
}
