/* Reset box sizing and basic styles */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f7fa;
    color: #2c3e50;
    margin: 0;
    padding: 20px;
}

/* Header styles */
h1 {
    text-align: center;
    margin-bottom: 25px;
    font-weight: 700;
    color: #34495e;
}

/* Navbar styles */
.navbar {
    display: flex;
    justify-content: center;
    gap: 25px;
    background-color: #34495e;
    padding: 12px 0;
    border-radius: 8px;
    margin-bottom: 40px;
}

.navbar a {
    color: #ecf0f1;
    text-decoration: none;
    font-weight: 600;
    padding: 8px 18px;
    border-radius: 6px;
    transition: background-color 0.3s ease;
}

.navbar a:hover {
    background-color: #27ae60;
    color: white;
}

/* Search input */
#otsi {
    display: block;
    margin: 0 auto 30px auto;
    width: 300px;
    max-width: 90%;
    padding: 10px 15px;
    font-size: 16px;
    border: 2px solid #bdc3c7;
    border-radius: 8px;
    transition: border-color 0.3s ease;
}

#otsi:focus {
    border-color: #27ae60;
    outline: none;
}

/* Table styles */
table {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    border-collapse: collapse;
    box-shadow: 0 4px 12px rgb(0 0 0 / 0.1);
    background-color: white;
    border-radius: 10px;
    overflow: hidden;
}

thead tr {
    background-color: #27ae60;
    color: white;
    text-align: left;
    font-weight: 700;
}

th, td {
    padding: 14px 18px;
    border-bottom: 1px solid #e1e4e8;
}

tbody tr:hover {
    background-color: #ecf9f1;
    cursor: pointer;
}

/* Responsive tweaks */
@media (max-width: 768px) {
    #otsi {
        width: 100%;
        max-width: 100%;
    }

    table, thead, tbody, th, td, tr {
        display: block;
    }

    thead tr {
        display: none;
    }

    tbody tr {
        margin-bottom: 20px;
        border: 1px solid #ddd;
        border-radius: 8px;
        padding: 12px;
        background: #fff;
    }

    tbody td {
        padding-left: 50%;
        position: relative;
        border: none;
        border-bottom: 1px solid #eee;
    }

    tbody td:before {
        position: absolute;
        top: 14px;
        left: 18px;
        width: 45%;
        white-space: nowrap;
        font-weight: 600;
        color: #555;
    }

    tbody td:nth-of-type(1):before { content: "Sihtkoht"; }
    tbody td:nth-of-type(2):before { content: "Lennujaam"; }
    tbody td:nth-of-type(3):before { content: "Transport"; }
    tbody td:nth-of-type(4):before { content: "Hind (€)"; }
    tbody td:nth-of-type(5):before { content: "Majutus"; }
    tbody td:nth-of-type(6):before { content: "Hotelli asukoht"; }
    tbody td:nth-of-type(7):before { content: "Kestvus"; }
}
