/* Alapstílusok */
body {
    font-family: Arial, sans-serif;
    background-color: #f4f4f4;
    margin: 0;
    padding: 0;
}

h1 {
    text-align: center;
    color: #f1f1f1;
    padding: 20px;
    background-color: #333;
    margin-bottom: 20px;
    border-radius: 8px;
}

/* Fejléc */
h2 {
    text-align: center;
    color: #333;
    margin-top: 20px;
}

/* Navigációs menü */
.nav-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
}

.nav-buttons .btn {
    text-decoration: none;
    background-color: #007BFF;
    color: white;
    padding: 10px 15px;
    border-radius: 5px;
    transition: background 0.3s ease;
}

.nav-buttons .btn:hover {
    background-color: #0056b3;
}

/* Szűrő menü */
.filter-container {
    text-align: center;
    margin-bottom: 20px;
}

.filter-container select {
    padding: 5px;
    font-size: 14px;
    display: inline-block;
    width: auto; /* Automatikus szélesség, a tartalomnak megfelelően */
    min-width: 150px; /* Minimális szélesség biztosítása */
    max-width: 250px; /* Maximális szélesség, hogy ne nőjön túl nagyra */
    text-align: center; /* A szöveg középre igazítása */
}



/* Táblázat */
table {
    width: 80%;  /* Tábla szélessége */
    margin: 20px auto;
    border-collapse: collapse;
    background: white;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    table-layout: fixed; /* Fix oszlopszélesség */
}

th, td {
    border: 1px solid #ddd;
    padding: 10px;
    text-align: center;
}

/* Fejléc stílusok */
th {
    background-color: #007BFF;
    color: white;
}

/* Ár formázás */
td s {
    color: gray;
}

td b {
    color: red;
    font-size: 1.1em;
}

/* Képek */
td img {
    width: 100px;
    height: auto;
    border-radius: 5px;
}

/* Menü ikonok */
.menu-icon {
    width: 30px;
    height: auto;
    margin: 0 5px;
    cursor: pointer;
}

/* Gombok egymás mellé */
td a {
    display: inline-block;
}

/* Navigációs menü */
.nav-buttons {
    display: flex;
    justify-content: center;
    width: 100%;  /* A menü szélessége 100%-ra állítva */
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap; /* Ha nem fér el, akkor új sorba kerül */
    padding: 0 20px; /* Belső margó hozzáadása */
}

.nav-buttons .btn {
    display: inline-block; /* Biztosítja, hogy egymás mellett legyenek */
    text-decoration: none;
    background-color: #007BFF;
    color: white;
    padding: 12px 20px; /* A gombok szélességének növelése */
    border-radius: 5px;
    transition: background 0.3s ease;
    white-space: nowrap; /* Megakadályozza, hogy a szöveg több sorba törjön */
    font-size: 16px; /* A betűméret növelése, hogy jobban elférjen */
}

.nav-buttons .btn:hover {
    background-color: #0056b3;
}

/* Oszlopok szélessége */
table th:nth-child(1), /* Hirdetéskód fejléc */
table td:nth-child(1), /* Hirdetéskód adat */
table th:nth-child(3), /* Ár fejléc */
table td:nth-child(3), /* Ár adat */
table th:nth-child(4), /* Km fejléc */
table td:nth-child(4), /* Km adat */
table th:nth-child(5), /* Utolsó módosítás fejléc */
table td:nth-child(5), /* Utolsó módosítás adat */
table th:nth-child(7), /* Menü oszlop fejléc */
table td:nth-child(7) { /* Menü oszlop adat */
    width: 120px; /* Kisebb szélesség a hirdetéskód, ár, km, utolsó módosítás és menü oszlopoknak */
}

table th:nth-child(2), /* Autó neve fejléc */
table td:nth-child(2), /* Autó neve adat */
table th:nth-child(6), /* Leírás fejléc */
table td:nth-child(6) { /* Leírás adat */
    width: 250px; /* Nagyobb szélesség az autó neve és leírás oszlopoknak */
}

/* Szűrők és menü stílusok */
#filter, #menu {
    margin: 20px auto;
    width: 80%;
    text-align: center;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 10px;
}

#filter select, #menu a {
    margin: 5px;
    padding: 8px 15px;
    font-size: 14px;
    font-weight: bold;
    text-decoration: none;
    color: #333;
    background-color: #f2f2f2;
    border: 1px solid #ddd;
    border-radius: 5px;
    cursor: pointer;
    display: inline-block;
}

/* Hover állapotok a menüelemekhez */
#menu a:hover, #filter select:hover {
    background-color: #e0e0e0 !important;
    opacity: 0.9;
}

/* Menüpontok stílusának kiemelése */
#menu a {
    display: inline-block;
    margin: 5px;
}

#menu a.active {
    background-color: #009688;
    color: white;
}

/* További menüformázás */
#menu {
    font-size: 16px;
    display: flex;
    justify-content: center;
    gap: 15px;
}

#menu a {
    padding: 10px 20px;
    background-color: #4CAF50;
    color: white;
    border-radius: 4px;
    font-size: 16px;
}

#menu a:hover {
    background-color: #45a049;
}

#menu a:active {
    background-color: #388e3c;
}

/* Képformázás a menüben */
.menu-icon:hover {
    opacity: 0.7;
}

/* Legördülő szűrő */
#filter select {
    width: 160px !important;  /* Fix szélesség */
    padding: 8px 10px !important;
    background-color: #fff !important;
    border-radius: 5px !important;
    border: 1px solid #ddd !important;
    cursor: pointer;
}

/* Gombok megjelenése */
#menu a {
    text-decoration: none !important;
}

#menu a:hover {
    opacity: 0.8 !important;
}
a {
    color: black;
    text-decoration: none; /* ha nem szeretnél aláhúzást */
}

a:hover {
    color: black; /* opcionális: hover állapotban is maradjon fekete */
    text-decoration: underline; /* vagy amit szeretnél hover-re */
}
td {
            vertical-align: middle;
        }
        .distance {
            color: green;
            font-weight: bold;
            text-align: center;
            margin-top: 5px;
            vertical-align: bottom;
        }
        .last-updated {
            position: absolute;
            top: 10px;
            right: 20px;
            font-size: 14px;
            color: #666;
        }
        th a {
            color: inherit;
            text-decoration: none;
        }
        th a:hover {
            text-decoration: underline;
        }
        .price-updated {
            color: orange;
            font-weight: bold;
        }
        .price {
            font-weight: bold;
            color: black;
        }
        .new-price {
    font-weight: bold;
    color: #000;
}

.old-price {
    color: #888;
    font-size: 0.9em;
}

.pagination {
    text-align: center;
    margin-top: 20px;
}
