:root {
    --black: #111111;
    --dark: #1b1b1b;
    --red: #d71920;
    --red-dark: #aa1015;
    --white: #ffffff;
    --light: #f4f4f4;
    --gray: #777777;
    --border: #dddddd;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: var(--light);
    color: var(--black);
}

.topbar {
    height: 72px;
    background: var(--black);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
}

.brand {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.pmr {
    font-size: 28px;
    font-weight: 800;
    font-style: italic;
}

.racing {
    color: var(--red);
    font-weight: 700;
}

.autodata {
    color: #bbbbbb;
    font-size: 14px;
}

.topbar nav a {
    color: var(--white);
    text-decoration: none;
    margin-left: 24px;
}

.topbar nav a:hover {
    color: var(--red);
}

main {
    max-width: 1350px;
    margin: auto;
    padding: 40px;
}

.card {
    background: var(--white);
    border-radius: 8px;
    padding: 28px;
    border: 1px solid var(--border);
}

.btn {
    display: inline-block;
    padding: 14px 22px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 700;
    border: none;
    cursor: pointer;
}

.btn-red {
    background: var(--red);
    color: var(--white);
}

.btn-red:hover {
    background: var(--red-dark);
}

.btn-dark {
    background: var(--black);
    color: var(--white);
}

input,
select,
textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #cccccc;
    border-radius: 5px;
    font-size: 16px;
}

label {
    display: block;
    margin-bottom: 7px;
    font-weight: 600;
}

.form-row {
    margin-bottom: 20px;
}
/* ---------------------------------------------------------
   AUTOdata avaleht
--------------------------------------------------------- */

.home-header {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto 25px auto;

    display: flex;
    justify-content: space-between;
    align-items: center;

    gap: 20px;
}

.home-header h1 {
    margin-bottom: 8px;
}

.home-header p {
    margin: 0;
}

.home-header-action {
    flex-shrink: 0;
}


.home-main-card {
    width: 100%;
    max-width: 900px;

    margin-left: auto;
    margin-right: auto;
    margin-bottom: 25px;
}


.home-search-row {
    display: flex;
    gap: 10px;
    align-items: stretch;
}

.home-search-row input {
    flex: 1;
    min-width: 0;
}

.recent-vehicles {
    display: grid;
    gap: 0;
}

.recent-vehicle-row {
    display: flex;
    align-items: center;

    padding: 10px 0;
    border-bottom: 1px solid #e5e5e5;

    text-decoration: none;
    color: inherit;
}

.recent-vehicle-name {
    margin-left: 6px;
}

.recent-vehicle-arrow {
    margin-left: 6px;
    color: #d71920;
    font-size: 18px;
}

/* Väiksemad ekraanid */

@media (max-width: 700px) {

    .home-header {
        flex-direction: column;
        align-items: stretch;
    }

    .home-header-action {
        width: 100%;
    }

    .home-header-action .btn {
        display: block;
        width: 100%;
        text-align: center;
        box-sizing: border-box;
    }

    .home-search-row {
        flex-direction: column;
    }

    .home-search-row .btn {
        width: 100%;
    }

    .recent-vehicle-row {
        align-items: flex-start;
    }

}
