/* =========================
   RESET / BOX-SIZING
========================= */
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup,
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Common form elements box-sizing */
body, input, button, select, textarea {
    box-sizing: border-box;
}

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; /* auto replaced with proper viewport unit */
    padding: 20px;
}

.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-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;
    transition: background 0.3s;
}

.find-btn:hover,
.btn-search:hover {
    background: #a91f1f;
}

.btn-return {
    background: #6c757d;
    color: #fff;
    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-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;
    background: #ccc;
}

.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 {
        min-height: 70vh; /* replaced auto with viewport unit */
        padding: 15px;
    }

    .search-card {
        margin: 15px;
    }

    .route-search-box {
        width: 100%;
    }

    .form-buttons {
        flex-direction: column;
    }

    .station-info h3 {
        font-size: 15px;
    }
}
