/* --- Latest Trips Section Mejorado --- */
.latest-trips {
    padding: 50px 0;
    background-color: var(--secondary-color);
    position: relative;
}

.latest-trips h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 60px;
    color: var(--white);
    position: relative;
}

.latest-trips h2:after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background-color: var(--primary-color);
}

.latest-trips h2 span {
    color: var(--primary-color);
}

.trips-list {
    display: flex;
    flex-wrap: wrap;
    gap: 32px;
    justify-content: center;
    margin-bottom: 18px;
}

.trip-card {
    background: var(--white);
    border-radius: 18px;
    box-shadow: 0 4px 24px 0 rgba(24,36,61,0.10);
    border: 1.5px solid var(--white);
    padding: 22px 15px;
    width: 320px;
    min-width: 220px;
    max-width: 98vw;
    min-height: 470px;
    max-height: 470px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    transition: box-shadow 0.2s var(--transition), border-color 0.2s var(--transition);
    position: relative;
    overflow: hidden;
}

.trip-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(24,36,61,0.13);
    border-color: var(--secondary-color);
    transition: var(--transition);
}

.trip-user {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    width: 100%;
    justify-content: flex-start;
}

.trip-user-img {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--white);
    background: #f8fafc;
}

.trip-user-name {
    font-size: 1.08rem;
    font-weight: 600;
    color: var(--secondary-color);
    max-width: 170px;
    white-space: nowrap;
    display: inline-block;
}

.trip-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-bottom: 10px;
    gap: 2px;
    padding: 0;
}

.trip-from, .trip-to {
    max-width: 95%;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary-color);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: block;
    text-align: center;
    margin: 0;
    padding: 2px 0;
    letter-spacing: 0.5px;
}

.trip-localidad {
    font-size: 1.18em;
    font-weight: 700;
    color: var(--primary-color);
    display: block;
    line-height: 1.1;
}

.trip-direccion {
    font-size: 0.92em;
    font-weight: 400;
    color: #64748b;
    display: block;
    line-height: 1.1;
}

.trip-arrow {
    font-size: 1.3rem;
    color: var(--secondary-color);
    transform: rotate(90deg);
    margin: 0 0 0 0;
    padding: 0;
    line-height: 1;
}

.trip-info-multiline {
    font-size: 1.01rem;
    color: #64748b;
    text-align: center;
    margin-bottom: 10px;
    min-height: 48px;
    max-height: 60px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: pre-line;
    width: 100%;
    align-items: center;
    justify-content: center;
    display: none;
}

.trip-details {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
    justify-content: center;
    font-size: 1rem;
    color: var(--primary-color);
    margin-bottom: 10px;
    width: 100%;
}

.trip-details i {
    color: var(--secondary-color);
    margin-right: 4px;
}

.trip-qr {
    margin: 10px 0 8px 0;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
}

.trip-qr img {
    width: 100px;
    height: 100px;
    border-radius: 8px;
    border: 1px solid var(--white);
    background: #f8fafc;
    display: block;
}

.trip-info {
    font-size: 0.95rem;
    color: #64748b;
    text-align: center;
    margin-bottom: 10px;
    min-height: 38px;
    max-height: 38px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    display: none;
}

.trips-note {
    text-align: center;
    color: var(--primary-color);
    font-size: 1.38rem;
    margin-top: 18px;
    font-weight: 500;
}

@media (max-width: 900px) {
    .trip-card {
        width: 98vw;
        max-width: 99vw;
        min-width: 0;
        min-height: 410px;
        max-height: 510px;
        padding: 14px 2vw 10px 2vw;
    }
    .trip-header {
        margin-bottom: 6px;
    }
    .trip-details {
        font-size: 0.98rem;
    }
    .trip-qr img {
        width: 80px;
        height: 80px;
    }
    .trip-user-img {
        width: 32px;
        height: 32px;
    }
}

@media (max-width: 600px) {

    .trip-from, .trip-to {
        max-width: 98vw;
        font-size: 1.08rem;
    }
    .trip-localidad {
        font-size: 1.08em;
    }
    .trip-direccion {
        font-size: 0.85em;
    }
    .trip-info-multiline {
        font-size: 0.98rem;
        min-height: 36px;
        max-height: 48px;
    }
}
    