/* =========================
   Train Route – DESKTOP
   ========================= */

.train-route {
    direction: rtl;
    padding: 32px 16px;
    position: relative;
    z-index: 10;
}

.route-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 32px;
    display: none;
}

/* مسیر */
.route-line {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding-top: 24px;
}

/* خط مسیر */
.route-line::before {
    content: "";
    position: absolute;
    top: 31px;
    right: 0;
    left: 0;
    height: 2px;
    background: linear-gradient(to left, #d0d7de, #b0bec5, #d0d7de);
}

/* ایستگاه */
.station {
    position: relative;
    text-align: center;
    min-width: 70px;
}

/* مارکر */
.station-marker {
    width: 25px;
    height: 25px;
    fill: #d21919;
    stroke: #fff;
    stroke-width: 1.5;
    display: block;
    margin: 0 auto;
    position: relative;
    top: -5px;
    z-index: 2;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,.15));
}

.station-name {
    margin-top: 8px;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
}

/* اطلاعات */
.station-facilities {
    margin-top: 6px;
    position: relative;
    display: inline-block;
}

.info-icon {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: #9aa0a6;
    stroke-width: 2;
}

/* Tooltip دسکتاپ */
.facilities-inline {
    display: none;
    position: absolute;
    bottom: 100%;
    right: 50%;
    transform: translateX(50%);
    margin-bottom: 8px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 8px;
    min-width: 260px;
    max-width: 360px;
    box-shadow: 0 8px 24px rgba(0,0,0,.12);
    z-index: 9999;
}

.station-facilities:hover .facilities-inline {
    display: grid;
    grid-template-columns: repeat(2, auto);
    gap: 6px 18px;
}

.facilities-inline::after {
    content: "";
    position: absolute;
    top: 100%;
    right: 50%;
    transform: translateX(50%);
    border: 6px solid transparent;
    border-top-color: #fff;
}

.facility-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    white-space: nowrap;
    color: #333;
}

.facility-icon {
    width: 12px;
    height: 12px;
    fill: #616161;
    flex-shrink: 0;
}
.station-markerm {
  display: none;
}
/* =========================
   Train Route – MOBILE
   ========================= */

@media (max-width: 768px) {

    .train-route {
        padding: 16px 12px;
    }

    .route-line {
        flex-direction: column;
        gap: 14px;
        padding-top: 0;
    }

    .route-line::before {
        display: none;
    }

    /* کارت ایستگاه */
    .station {
        width: 100%;
        background: #fafafa;
        border-radius: 14px;
        padding: 12px 14px;
        box-shadow: 0 2px 8px rgba(0,0,0,.06);
        text-align: right;
    }

    .station-marker {
        display: none;
    }

    .station-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
		    position: relative;
        z-index: 2;
    }
   /* امکانات تمام عرض کارت */
    .station.is-open .facilities-inline {
        margin-top: 12px;
        width: 100%;
    }
    .station-name {
        font-size: 14px;
        white-space: normal;
        margin: 0;
    }

    .station-facilities {
        margin: 0;
        cursor: pointer;
		  position: static;
    }

    .info-icon {
        width: 18px;
        height: 18px;
        transition: transform .2s ease, stroke .2s ease;
    }

    .station.is-open .info-icon {
        stroke: #1976d2;
        transform: rotate(90deg);
    }

    /* 🔥 حذف کامل tooltip */
    .station-facilities:hover .facilities-inline,
    .facilities-inline::after {
        display: none !important;
    }

    /* لیست امکانات موبایل */
      .facilities-inline {
        display: none;
        position: static;
        margin-top: 10px;
        padding: 0;
        background: transparent;
        border: none;
        box-shadow: none;
        width: 100%;
        box-sizing: border-box;
	
    transition: all .35s ease;


    }

    /* فقط ایستگاه باز */
    .station.is-open .facilities-inline {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px 10px;
		position: relative;
    }

    .station {
        cursor: pointer;
    }

    .facility-item {
        min-width: 0;
        max-width: 100%;
        display: flex;
        align-items: center;
        gap: 6px;
        padding: 6px 10px;
        background: #f1f3f4;
        border-radius: 20px;
        font-size: 11px;
        line-height: 1.4;
        white-space: normal;
		
    }

    .facility-item span {
        overflow-wrap: anywhere;
        word-break: break-word;
    }

    .facility-icon {
        fill: #777;
    }
	
	/* نسخه inline آیکن لوکیشن کنار نام */
.station-markerm {
    width: 20px;
    height: 20px;
    margin: 0;
    top: 0;
    display: inline-block;
    vertical-align: middle;
    filter: none;
	fill: #d21919;
  stroke: #fff;
  stroke-width: 1.5;
}

/* ردیف عنوان ایستگاه */
.station-title {
    display: flex;
    align-items: center;
    gap: 2px;
}
/* آیکن لوکیشن کنار اسم شهر نباید کلیک بگیرد */
.station-markerm,
.station-markerm * {
    pointer-events: none;
}

}
