#train {
    display: block;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    clear: both;
}

.train-card {
    background: #FFFFFF;
    border: 1px solid #DBE3EC;
    border-radius: 10px;
    overflow: hidden;
}

h1.train-title {
    margin: 5px 0 0 15px;
}
h2 {
    margin-top: 10px;
}
p.train-text {
    text-align: left;
    margin: 10px 0 20px 15px;
}

.train-map {
    position: relative;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    overflow: hidden;
}

.train-map img {
    width: 100%;
    max-width: 100%;
    height: auto;
    display: block;
}

.train-map .point {
    position: absolute;
    transform: translate(-50%, -50%);
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #E8610A;
    color: #fff;
    text-align: center;
    line-height: 34px;
    font-weight: bold;
    text-decoration: none;
}



.train-map {
    position: relative;
}

.train-map img {
    width: 100%;
    display: block;
}

/* Punkt */
.train-point {
    position: absolute;
    transform: translate(-50%, -50%);
    z-index: 5;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #ff7a1a, #e04f00);
    color: #fff;
    border: 3px solid #fff;
    font-size: 15px;
    font-weight: 800;
    text-decoration: none;
    box-shadow:
            0 6px 18px rgba(224, 79, 0, .35),
            0 0 0 0 rgba(232, 97, 10, .45);

    animation: trainPointPulse 2.4s infinite;
    transition:
            transform .2s ease,
            background .2s ease,
            box-shadow .2s ease;
}
/* Pulsująca obwódka */
.train-point::before {
    content: "";
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    border: 2px solid rgba(232, 97, 10, .35);
    opacity: .75;
    animation: trainPointRing 2.4s infinite;
}
/* Dymek */
.train-point::after {
    content: attr(data-label);
    position: absolute;
    left: 50%;
    bottom: calc(100% + 12px);
    transform: translateX(-50%) translateY(6px);
    padding: 7px 12px;
    border-radius: 6px;
    background: #0D1F3C;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    box-shadow: 0 8px 20px rgba(13, 31, 60, .25);
    transition: opacity .18s ease, transform .18s ease;
}
/* Dymek po lewej */
.train-point.label-left::after {
    left: 0;
    transform: translateX(0) translateY(6px);
}
.train-point.label-left:hover::after {
    transform: translateX(0) translateY(0);
}
/* Dymek po prawej */
.train-point.label-right::after {
    right: 0;
    left: auto;
    transform: translateX(0) translateY(6px);
}
.train-point.label-right:hover::after {
    transform: translateX(0) translateY(0);
}
/* Mały trójkąt pod dymkiem */
.train-point:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
.train-point:hover {
    transform: translate(-50%, -50%) scale(1.18);
    background: linear-gradient(135deg, #0184f5, #0168c7);
    color: #fff;
    box-shadow:
            0 8px 24px rgba(1, 104, 199, .35),
            0 0 0 8px rgba(1, 104, 199, .12);
    animation: none;
}
.train-point:hover::before {
    animation: none;
    opacity: 0;
}
@keyframes trainPointPulse {
    0%, 100% {
        box-shadow:
                0 6px 18px rgba(224, 79, 0, .35),
                0 0 0 0 rgba(232, 97, 10, .45);
    }
    60% {
        box-shadow:
                0 6px 18px rgba(224, 79, 0, .35),
                0 0 0 14px rgba(232, 97, 10, 0);
    }
}
@keyframes trainPointRing {
    0% {
        transform: scale(.8);
        opacity: .7;
    }
    70% {
        transform: scale(1.35);
        opacity: 0;
    }
    100% {
        transform: scale(1.35);
        opacity: 0;
    }
}


.content-block {
    float: left;
    margin: 20px 0;
    width: 100%;
}


.categories {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    width: 100%;
    margin: 0 auto 20px auto;
}
.categories > a {
    color: inherit;
    text-decoration: none;
}
.category-block {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    box-sizing: border-box;
    padding: 20px 16px 15px;
    border: 1px solid #DBDBDB;
    border-radius: 10px;
    background: #FFFFFF;
    display: grid;
    grid-template-rows: 100px 1fr auto;
    justify-items: center;
    align-items: center;
    transition:
            transform .2s ease,
            border-color .2s ease,
            box-shadow .2s ease;
}
.category-block:hover {
    transform: translateY(-4px);
    border-color: #0878D1;
    box-shadow: 0 6px 14px rgba(0, 0, 0, .10);
}
.category-number {
    position: absolute;
    top: 10px;
    left: 10px;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #E8610A;
    color: #FFFFFF;
    font-size: 14px;
    font-weight: 700;
}
.category-image {
    width: 100px;
    height: 100px;
    object-fit: contain;
}
.category-name {
    width: 100%;
    text-align: center;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.3;
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
    color: var(--navy);
}
.category-products {
    margin-top: auto;
    width: 100%;
    text-align: center;
    font-size: 12px;
    color: #777777;
}

@media only screen and (max-width : 1200px) {

    p.train-text {
        margin-right: 15px;
    }

    .train-map {
        margin-bottom: 20px;
    }
    .train-point {
        width: 22px;
        height: 22px;
        font-size: 12px;
        border-width: 2px;
    }

    .train-point::before {
        inset: -6px;
    }


    .categories {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        width: 100%;
    }
    .categories > a {
        display: flex;
        height: 100%;
    }
    .category-block {
        width: 100%;
        height: 100%;
        aspect-ratio: auto;
        padding: 16px 8px 10px;
        grid-template-rows: 78px 1fr auto;
        row-gap: 4px;
    }
    .category-image {
        width: 75px;
        height: 75px;
    }
    .category-name {
        font-size: 13px;
        line-height: 1.3;
    }
    .category-products {
        margin-top: 6px;
        font-size: 11px;
    }
    .category-number {
        top: 7px;
        left: 7px;
        width: 24px;
        height: 24px;
        font-size: 12px;
    }
}