* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background-color: #f4f7fb;
    color: #222;
}

.container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Top navigation */
header {
    background-color: #ffffff;
    padding: 18px 8%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 24px;
    font-weight: bold;
}

.logo span {
    color: #e67e22;
}

/* Main welcome section */
.hero {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 50px 20px;
}

.hero-content {
    max-width: 700px;
}

.hero h1 {
    font-size: 48px;
    margin-bottom: 10px;
}

.hero h2 {
    font-size: 24px;
    font-weight: normal;
}

.hero p {
    font-size: 18px;
    line-height: 1.6;
    margin: 25px 0;
}

/* Button */
button {
    border: none;
    padding: 14px 30px;
    font-size: 16px;
    border-radius: 8px;
    cursor: pointer;
    background-color: #e67e22;
    color: white;
}

button:hover {
    opacity: 0.9;
}

/* Search page */

.search-page {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 20px;
}

.search-box {
    background-color: white;
    width: 100%;
    max-width: 600px;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.search-box h1 {
    text-align: center;
    margin-bottom: 30px;
}

.search-options {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
}

.search-tab {
    flex: 1;
    background-color: #eeeeee;
    color: #333333;
}

.search-tab:hover {
    background-color: #dddddd;
}

.form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 20px;
}

.form-group label {
    font-weight: bold;
    margin-bottom: 8px;
}

.form-group input {
    padding: 14px;
    border: 1px solid #cccccc;
    border-radius: 8px;
    font-size: 16px;
}

.search-button {
    width: 100%;
    margin-top: 10px;
}

/* Results page */

.results-page {
    flex: 1;
    padding: 40px 8%;
}

.results-container {
    max-width: 900px;
    margin: auto;
}

.journey-text {
    font-size: 18px;
    margin-bottom: 25px;
}

.sort-section {
    margin-bottom: 25px;
}

.sort-section select {
    padding: 10px;
    border-radius: 6px;
    border: 1px solid #cccccc;
    font-size: 15px;
}

/* Individual bus card */

.bus-card {
    background-color: white;
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 20px;

    display: flex;
    justify-content: space-between;
    align-items: center;

    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.bus-info h2 {
    margin-top: 0;
}

.bus-details {
    display: flex;
    gap: 20px;
    margin-top: 15px;
}

.bus-card button {
    white-space: nowrap;
}

/* =========================
   BUS SEAT LAYOUT
========================= */

.seats-page {
    flex: 1;
    padding: 40px 20px;
}

.seat-layout-container {
    max-width: 700px;
    margin: auto;
}

.seat-layout-container h1 {
    text-align: center;
}

/* Seat colour legend */

.legend {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin: 25px 0;
}

.legend div {
    display: flex;
    align-items: center;
    gap: 7px;
}

.legend-seat {
    width: 20px;
    height: 20px;
    border-radius: 5px;
    display: inline-block;
}

/* Bus structure */

.bus-layout {
    background-color: white;
    border: 3px solid #333;
    border-radius: 25px;
    padding: 25px;
    max-width: 450px;
    margin: auto;
}

.driver {
    text-align: right;
    font-weight: bold;
    margin-bottom: 30px;
}

/* Seats */

.seats {
    display: grid;
    grid-template-columns: 1fr 1fr 50px 1fr 1fr;
    gap: 15px;
}

.seat {
    width: 60px;
    height: 55px;
    border: none;
    border-radius: 10px;
    font-size: 17px;
    font-weight: bold;
    cursor: pointer;
}

.aisle {
    width: 50px;
}

/* Seat status */

.available {
    background-color: #2ecc71;
}

.partial {
    background-color: #f39c12;
}

.reserved {
    background-color: #e74c3c;
}

/* Seat information box */

.seat-info {
    background-color: white;
    max-width: 450px;
    margin: 30px auto;
    padding: 25px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.journey-visual {
    margin: 20px auto;
    padding: 15px;
    max-width: 300px;
    border-left: 3px solid #f39c12;
    text-align: left;
}

.journey-line {
    margin: 10px 0;
    padding-left: 15px;
    color: #555;
    line-height: 1.6;
}

.partial-message {
    font-weight: bold;
}

.search-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 20px;
}

.search-button {
    flex: 1;
}

.clear-button {
    background-color: #555;
    color: white;
    border: none;
    padding: 14px 25px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
}

.clear-button:hover {
    background-color: #333;
}