/* ========================================= */
/* PLIK: style.css                           */
/* ========================================= */

/* --- 1. KOLORYSTYKA --- */
:root {
    --primary-navy: #2E2E80;
    --accent-lime: #A4C639;
    --bg-light: #f4f4f4;
    --text-dark: #333;
    --white: #ffffff;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--bg-light);
    color: var(--text-dark);
}

/* --- 2. NAGŁÓWEK (Logo Środek, Telefon Prawa) --- */
header {
    background-color: var(--white);
    padding: 10px 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    height: 100px;

    display: flex;
    align-items: center;
    justify-content: flex-end;
    position: relative;
}

.logo-container {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

.logo-container img {
    height: 90px;
    display: block;
}

.header-contact {
    text-align: right;
    z-index: 2;
}

.phone-number {
    display: block;
    font-size: 1.6rem;
    font-weight: bold;
    color: var(--primary-navy);
    text-decoration: none;
    margin-bottom: 5px;
}

.call-btn {
    background-color: var(--accent-lime);
    color: var(--primary-navy);
    padding: 8px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1rem;
    display: inline-block;
}

/* --- 3. KATEGORIE --- */
.categories {
    display: flex;
    justify-content: center;
    gap: 15px;
    padding: 30px 20px;
    flex-wrap: wrap;
}

.cat-btn {
    background-color: var(--primary-navy);
    color: var(--white);
    padding: 10px 25px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: bold;
    transition: 0.3s;
    border: 2px solid var(--primary-navy);
}

.cat-btn:hover {
    background-color: var(--white);
    color: var(--primary-navy);
}

/* --- 4. LISTA AUT --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px 80px 20px;
}

.section-title {
    color: var(--primary-navy);
    border-bottom: 3px solid var(--accent-lime);
    display: inline-block;
    padding-bottom: 5px;
    margin-bottom: 30px;
    margin-top: 40px;
}

.car-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
}

.car-card {
    background: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s;
    display: flex;
    flex-direction: column;
}

.car-card:hover {
    transform: translateY(-5px);
}

.car-details {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.car-title {
    margin: 0 0 10px 0;
    color: var(--primary-navy);
    font-size: 1.4rem;
}

.car-specs {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 15px;
    list-style: none;
    padding: 0;
}

.car-specs li {
    margin-bottom: 5px;
    display: flex;
    align-items: center;
}

.price-tag {
    font-size: 1.8rem;
    color: var(--primary-navy);
    font-weight: bold;
    margin-bottom: 15px;
}

.price-tag span {
    font-size: 1rem;
    font-weight: normal;
}

.action-btn {
    display: block;
    width: 100%;
    padding: 12px 0;
    background-color: var(--accent-lime);
    color: var(--primary-navy);
    text-align: center;
    text-decoration: none;
    font-weight: bold;
    border-radius: 5px;
    text-transform: uppercase;
    border: 1px solid var(--accent-lime);
    transition: 0.3s;
}

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

/* --- 5. GALERIA (SLIDER) --- */
.slider-container {
    position: relative;
    width: 100%;
    height: 200px;
    background-color: #ddd;
    overflow: hidden;
}

.slider-img {
    display: none;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slider-img.active {
    display: block;
    animation: fadeEffect 0.5s;
}

@keyframes fadeEffect {
    from {
        opacity: 0.4
    }

    to {
        opacity: 1
    }
}

.prev,
.next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    width: auto;
    padding: 10px;
    margin-top: -22px;
    color: white;
    font-weight: bold;
    font-size: 18px;
    transition: 0.3s ease;
    border-radius: 0 3px 3px 0;
    user-select: none;
    background-color: rgba(0, 0, 0, 0.4);
    opacity: 0;
    /* Ukryte do momentu najechania myszką */
}

.next {
    right: 0;
    border-radius: 3px 0 0 3px;
}

.slider-container:hover .prev,
.slider-container:hover .next {
    opacity: 1;
}

.prev:hover,
.next:hover {
    background-color: var(--accent-lime);
    color: var(--primary-navy);
}

/* --- 6. STOPKA --- */
footer {
    background-color: var(--primary-navy);
    color: var(--white);
    text-align: center;
    padding: 30px 20px;
    margin-top: 50px;
}

footer p {
    margin: 5px 0;
}

/* --- 7. RESPANSYWNOŚĆ --- */
.mobile-call-bar {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: var(--primary-navy);
    padding: 15px;
    text-align: center;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2);
    z-index: 9999;
}

.mobile-call-bar a {
    color: var(--primary-navy);
    background-color: var(--accent-lime);
    padding: 10px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    text-transform: uppercase;
}

@media (max-width: 768px) {
    .mobile-call-bar {
        display: block;
    }

    .header-contact {
        display: none;
    }

    .logo-container img {
        height: 70px;
    }

    header {
        height: 80px;
    }
}