/* =========================
   RESET
========================= */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background: #f6f8fa;
    color: #333;
}

/* =========================
   HEADER (COMMON)
========================= */
header,
.site-header {
    background: #c62828;
    color: #fff;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2em;
    font-weight: bold;
}

.site-header h1 {
    margin: 0;
    font-size: 24px;
}

/* =========================
   HOME PAGE
========================= */
.home-main {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 70vh;
}

.search-card {
    background: #fff;
    width: 100%;
    max-width: 420px;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.search-card h2 {
    text-align: center;
    margin-bottom: 20px;
}

/* =========================
   ROUTE FORM (COMMON)
========================= */
.route-form,
.route-search-box {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.route-form {
    flex-direction: column;
}

/* route.php centered box */
.route-search-wrapper {
    display: flex;
    justify-content: center;
    margin: 30px 0;
}

.route-search-box {
    background: #fff;
    width: 100%;
    max-width: 500px;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.12);
    flex-direction: column;
}

/* =========================
   DROPDOWNS
========================= */
.route-form select,
.route-search-box select {
    width: 100%;
    padding: 12px;
    font-size: 15px;
    border-radius: 5px;
    border: 1px solid #ccc;
    background: #fff;
}

/* =========================
   BUTTONS
========================= */
.form-buttons {
    display: flex;
    justify-content: center;
    gap: 12px;
}

.find-btn,
.btn-search {
    background: #c62828;
    color: #fff;
    border: none;
    padding: 12px 22px;
    font-size: 15px;
    border-radius: 6px;
    cursor: pointer;
}

.find-btn:hover,
.btn-search:hover {
    background: #a91f1f;
}

.btn-return {
    background: #6c757d;
    color: #fff;
    text-align: center;
    padding: 12px 22px;
    border-radius: 6px;
    text-decoration: none;
}

/* =========================
   ROUTE INFO
========================= */
main {
    max-width: 900px;
    margin: 20px auto;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.route-summary p {
    margin-bottom: 8px;
    font-size: 16px;
}

/* =====================================================
   🚇 STATIONS TIMELINE (TABLE REPLACEMENT)
===================================================== */
.stations-timeline {
    margin-top: 25px;
}

.station-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 25px;
}

/* Line + Dot */
.line-wrap {
    position: relative;
    margin-right: 16px;
}

.line-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    display: block;
    z-index: 2;
}

.line-vertical {
    width: 4px;
    height: 100%;
    position: absolute;
    top: 14px;
    left: 5px;
    border-radius: 3px;
}

/* Station text */
.station-info h3 {
    margin-bottom: 6px;
    font-size: 16px;
}

.metro-line {
    display: inline-block;
    padding: 4px 12px;
    font-size: 13px;
    color: #fff;
    border-radius: 14px;
    margin-bottom: 6px;
}

.interchange {
    font-size: 13px;
}

.interchange a {
    color: #c62828;
    text-decoration: none;
    font-weight: bold;
}

/* =========================
   METRO LINE COLORS
========================= */
.red    { background: #e53935; }
.blue   { background: #1e88e5; }
.green  { background: #43a047; }
.yellow { background: #fdd835; color:#000; }
.pink   { background: #ff5ca8; }

/* =========================
   FOOTER
========================= */
footer,
.site-footer {
    background: #003366;
    color: #fff;
    text-align: center;
    padding: 15px 20px;
    margin-top: 30px;
    font-size: 14px;
}

/* =========================
   MOBILE RESPONSIVE
========================= */
@media (max-width: 600px) {

    .home-main {
        padding: 15px;
        min-height: auto;
    }

    .search-card {
        margin: 15px;
    }

    .route-search-box {
        width: 100%;
    }

    .form-buttons {
        flex-direction: column;
    }

    .station-info h3 {
        font-size: 15px;
    }
}
