/* Train Gallery Styles */

.train-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

.train-card {
    background: #fff;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .08);
    transition: .3s;
    border: 1px solid rgba(0, 0, 0, .05);
}

.train-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, .15);
}

.train-thumbnail {
    position: relative;
    height: 220px;
    overflow: hidden;
}

.train-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: .4s;
}

.train-card:hover img {
    transform: scale(1.05);
}

.train-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    color: #fff;
    padding: 6px 12px;
    border-radius: 30px;
    font-size: .85rem;
    font-weight: 600;
}

.international {
    background: #0057b7;
}

.regional {
    background: #16a34a;
}

.suburban {
    background: #ea580c;
}

.night {
    background: #7c3aed;
}

.train-content {
    padding: 1rem;
}

.train-content h4 {
    margin-bottom: .5rem;
    color: var(--primary-color);
}

.train-content p {
    color: #666;
    margin-bottom: 1rem;
    font-size: .9rem;
}

.view-schedule-btn {
    width: 100%;
    border: none;
    background: var(--primary-color);
    color: #d91313;
    padding: .9rem;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    transition: .3s;
}

.view-schedule-btn:hover {
    opacity: .9;
}

@media(max-width:768px) {

    .train-gallery {
        grid-template-columns: 1fr;
    }

    .train-thumbnail {
        height: 180px;
    }
}

.modal-content img {
    width: auto;
    max-width: 95vw;
    max-height: 85vh;
    object-fit: contain;
}

/* Schedule Modal Styles */
.schedule-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .9);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 99999;
    padding: 20px;
}

.schedule-modal.active {
    display: flex;
}

.modal-content {
    max-width: 1200px;
    max-height: 90vh;
    text-align: center;
}

.modal-content h3 {
    color: #fff;
    margin-bottom: 15px;
}

.modal-content img {
    max-width: 100%;
    max-height: 80vh;
    border-radius: 12px;
    box-shadow: 0 0 30px rgba(255, 255, 255, .15);
}

.close-modal {
    position: absolute;
    top: 20px;
    left: 20px;
    color: #fff;
    font-size: 28px;
    cursor: pointer;
}


/* support-card */
.support-card {
    border: 2px solid rgba(37, 99, 235, .15);
    background: linear-gradient(135deg,
            #ffffff 0%,
            #f8fbff 100%);
}

.support-badge {
    background: #2563eb;
}

.support-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .6rem;
    margin-top: 1rem;
    padding: .9rem 1rem;
    border-radius: 12px;
    text-decoration: none;
    background: #2563eb;
    color: #fff;
    font-weight: 600;
    transition: .3s;
}

.support-btn:hover {
    transform: translateY(-2px);
    opacity: .95;
}

.support-card h4 {
    color: #1e3a8a;
}

.support-card p {
    line-height: 1.8;
}

/* support-banner */

.support-banner{
    display:flex;
    align-items:center;
    gap:1.5rem;
    padding:1.25rem;
    border-radius:16px;
    background:linear-gradient(
        135deg,
        #eff6ff 0%,
        #f8fafc 100%
    );
    border:1px solid rgba(37,99,235,.15);
}

.support-icon{
    flex-shrink:0;
    width:70px;
    height:70px;
    border-radius:50%;
    display:flex;
    align-items:center;
    justify-content:center;
    background:#2563eb;
    color:#fff;
    font-size:1.7rem;
}

.support-info{
    flex:1;
}

.support-info h4{
    margin:0 0 .4rem;
    color:#1e3a8a;
    font-size:1.1rem;
}

.support-info p{
    margin:0;
    color:#475569;
    line-height:1.8;
}

.support-btn{
    flex-shrink:0;
    display:flex;
    align-items:center;
    gap:.5rem;
    padding:.9rem 1.2rem;
    background:#2563eb;
    color:#fff;
    text-decoration:none;
    border-radius:12px;
    font-weight:600;
    transition:.3s;
}

.support-btn:hover{
    transform:translateY(-2px);
}


@media (max-width:768px){

    .support-banner{
        flex-direction:column;
        text-align:center;
    }

    .support-info{
        width:100%;
    }

    .support-btn{
        width:100%;
        justify-content:center;
    }

}

/* Performance Optimization */
.train-card{
    content-visibility:auto;
    contain-intrinsic-size:350px;
}
