* {
    box-sizing: border-box;
}

html {
    height: 100%;
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
    direction: rtl;
    line-height: 1.2;
    font-weight: 300;
    font-family: "IBM Plex Sans Hebrew", "Arial", sans-serif;
    font-size: 18px;
    color: #ffffff;
}

body {
    margin: 0;
    background: #1D1D1B;
    overflow-x: hidden;
}

.tm-lines-component {
    background: transparent;
    /* padding: 0 20px 60px 20px; */
    width: 100%;
    position: relative;
    z-index: 3;
    transform: translateY(-250px);
    will-change: transform;
    --red-color: #e42621;
    --purple-color: #ba68c8;
    --green-color: #76ff03;
}

.tm-lines-component .line-card.redLine { --line-color: var(--red-color); }
.tm-lines-component .line-card.purpleLine { --line-color: var(--purple-color); }
.tm-lines-component .line-card.greenLine { --line-color: var(--green-color); }

.tm-lines-component .line-card {
    color: var(--line-color);
}

.tm-lines-component .LinesSVG .redLine .theLine { fill: var(--red-color); }
.tm-lines-component .LinesSVG .purpleLine .theLine { fill: var(--purple-color); }
.tm-lines-component .LinesSVG .greenLine .theLine { fill: var(--green-color); }

.tm-lines-component .LinesSVG .stopsW { fill: #ffffff; }
.tm-lines-component .LinesSVG .stopsB { fill: #1D1D1B; }

.tm-lines-component .lines-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(10px, 2vw, 30px);
    align-items: center;
    /* max-width: 100%; */
    width: 100%;
    margin: 0 auto;
    position: relative;
}

.tm-lines-component .lines-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: clamp(50px, 6vw, 90px);
    z-index: 10;
    grid-column: 1;
    grid-row: 1;
    padding-top: 0;
    max-width: 600px;
    margin: auto;
    /* align-self: anchor-center; */
    width: 100%;
}

.tm-lines-component .line-card {
    display: block;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.tm-lines-component .line-title {
    display: block;
    font-size: clamp(24px, 3vw, 44px);
    font-weight: 700;
    margin-bottom: clamp(6px, 1vw, 14px);
    text-align: right;
    color: var(--line-color);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
}

.tm-lines-component .line-card:hover .line-title {
    transform: translateX(-8px);
}

.tm-lines-component .timeline-row {
    position: relative;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    width: 100%;
    direction: rtl;
}

.tm-lines-component .timeline-bar {
    position: absolute;
    top: clamp(14px, 1.8vw, 22px);
    right: 20px;
    left: clamp(80px, 10vw, 140px);
    height: 2px;
    background-color: var(--line-color);
    z-index: 1;
    transition: opacity 0.3s ease, box-shadow 0.3s ease;
}

.tm-lines-component .line-card:hover .timeline-bar {
    box-shadow: 0 0 10px var(--line-color);
}

.tm-lines-component .timeline-nodes {
    display: flex;
    gap: clamp(20px, 3vw, 50px);
    position: relative;
    z-index: 2;
}

.tm-lines-component .node-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: clamp(30px, 2.5vw, 45px);
}

.tm-lines-component .node-circle,
.tm-lines-component .action-circle {
    width: clamp(28px, 2.4vw, 38px);
    height: clamp(28px, 2.4vw, 38px);
    border-radius: 50%;
    border: 2px solid var(--line-color);
    background-color: rgba(29, 29, 27, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--line-color);
    font-size: clamp(10px, 0.9vw, 14px);
    position: relative;
    z-index: 2;
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.35s ease;
}

.tm-lines-component .node-num {
    display: block;
    font-size: clamp(16px, 2vw, 28px);
    font-weight: 700;
    color: #ffffff;
    margin-top: 4px;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}

.tm-lines-component .node-label {
    display: block;
    font-size: clamp(11px, 0.9vw, 14px);
    color: #ffffff;
    margin-top: 3px;
    font-weight: 300;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.8);
}

.tm-lines-component .line-card:hover .node-circle {
    transform: scale(1.1);
    box-shadow: 0 0 12px var(--line-color);
}

.tm-lines-component .timeline-action {
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
    z-index: 2;
    color: var(--line-color);
}

.tm-lines-component .action-text {
    font-size: clamp(12px, 1vw, 16px);
    font-weight: 400;
    color: var(--line-color);
    white-space: nowrap;
    transition: transform 0.3s ease;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}

.tm-lines-component .line-card:hover .action-circle {
    transform: translateX(-4px) scale(1.08);
    box-shadow: 0 0 10px var(--line-color);
}

.tm-lines-component .line-card:hover .action-text {
    transform: translateX(-4px);
}

.tm-lines-component .the-mapLines-area {
    width: 100%;
    position: relative;
    grid-column: 2;
    grid-row: 1;
    margin-top: 0;
    margin-left: 0;
    z-index: 2;
    max-width: 800px;
    align-self: start;
}

.tm-lines-component .LinesSVG {
    position: relative;
    z-index: 2;
    width: 100%;
    height: auto;
    display: block;
}

.tm-lines-component .the-map-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    opacity: 0.15;
    z-index: 1;
    pointer-events: none;
}

.tm-lines-component .LinesSVG .line {
    transition: opacity 0.4s ease;
}

.tm-lines-component:has(.line-card:hover) .LinesSVG .line {
    opacity: 0.25;
}

.tm-lines-component:has(.line-card.redLine:hover) .LinesSVG .redLine,
.tm-lines-component:has(.line-card.purpleLine:hover) .LinesSVG .purpleLine,
.tm-lines-component:has(.line-card.greenLine:hover) .LinesSVG .greenLine {
    opacity: 1;
}
@media (max-width: 900px) {
    .tm-lines-component .lines-layout {
        grid-template-columns: 1fr;
    }
    
    .tm-lines-component .the-mapLines-area {
        grid-column: 1;
        grid-row: 1;
        width: 100%;
        max-width: 550px;
        margin: 0 auto;
    }

    .tm-lines-component .lines-list {
        grid-column: 1;
        grid-row: 2;
        width: 80%;
        max-width: none;
        margin: auto;
        gap: clamp(25px, 4vw, 40px);
    }

    .tm-lines-component .timeline-bar {
        left: 70px;
    }
}