/* --- RESET I BAZOWE ZMIENNE --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --bg-dark: #0c0c0c;
    --text-light: #d4d4d4;
    --font-main: 'Montserrat', Verdana, Arial, sans-serif;
    --sidebar-width: 360px; /* Perfekcyjnie w linii z panelem z logo na szerokich ekranach */
    --accent: #ffcc00;
}

body {
    background-color: #000000;
    color: var(--text-light);
    font-family: var(--font-main);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

.bold {
    font-weight: 700;
}

/* --- PRZYCISK WYSUWAJĄCY MENU --- */
#menu-toggle-btn {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 999;
    background-color: var(--accent);
    color: #000000;
    border: none;
    padding: 10px 18px;
    font-family: var(--font-main);
    font-size: 0.95rem;
    font-weight: 700;
    border-radius: 30px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.8);
    transition: transform 0.2s ease, background-color 0.2s ease;
}

#menu-toggle-btn:hover {
    background-color: #ffd633;
    transform: scale(1.05);
}

/* --- CIEMNE TŁO PO OTWARCIU MENU --- */
#menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.75);
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(3px);
}

#menu-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

/* --- WYSUWANY PANEL BOCZNY (DRAWER) --- */
#drawer-menu {
    position: fixed;
    top: 0;
    left: -320px;
    width: 300px;
    height: 100vh;
    background-color: #141414;
    z-index: 1001;
    box-shadow: 5px 0 25px rgba(0, 0, 0, 0.9);
    transition: left 0.3s cubic-bezier(0.77, 0.2, 0.05, 1.0);
    display: flex;
    flex-direction: column;
    padding: 25px 20px;
    overflow-y: auto;
    border-right: 1px solid #333;
}

#drawer-menu.open {
    left: 0;
}

.drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #333;
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.drawer-header h3 {
    color: var(--accent);
    font-size: 1.3rem;
}

#menu-close-btn {
    background: none;
    border: none;
    color: #d4d4d4;
    font-size: 1.5rem;
    cursor: pointer;
}

.drawer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.drawer-links li a {
    display: block;
    padding: 10px 15px;
    color: #d4d4d4;
    border-radius: 8px;
    font-weight: 600;
    transition: background 0.2s ease, color 0.2s ease;
}

.drawer-links li a:hover,
.drawer-links li a.active {
    background-color: #262626;
    color: var(--accent);
    padding-left: 20px;
}

.drawer-home-link {
    font-size: 1.05rem;
    color: #ffffff !important;
}

.drawer-divider {
    height: 1px;
    background-color: #333;
    margin: 10px 0;
}

.drawer-subtitle {
    color: #888;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 5px 0 0 10px;
}

/* --- PASEK INFORMACYJNY Z LOGO (TOP-BAR) --- */
.top-bar {
    background-color: #000000;
    border-bottom: 2px solid gray;
    display: flex;
    flex-direction: column;
}

.brand-title {
    width: 100%;
    min-height: 12vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--bg-dark);
    background-image: url("images/stars.webp");
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    background-blend-mode: hard-light;
    padding: 15px 0;
    border-bottom: 2px solid gray;
}

.brand-logo {
    height: 75px;
    max-width: 80%;
    object-fit: contain;
}

.contact-info {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 20px;
    font-size: 1.15rem; 
    font-weight: 600;
}

.info-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.icon-text {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.icon-text svg {
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.icon-text:hover svg, .fb-icon a:hover svg {
    transform: scale(1.15);
}

/* --- NAGŁÓWEK POJAZDU (BANNER) --- */
.car-banner {
    background-image: url("images/pobierz.webp");
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    border-bottom: 2px solid gray;
    padding: 30px 20px;
    text-align: center;
}

.car-banner h3 {
    font-size: 2.2rem;
    color: #ffffff;
    font-weight: 700;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.9);
}

.car-banner span {
    color: var(--accent);
    font-size: 1.4rem;
}

/* --- UKŁAD GŁÓWNY (MAIN) --- */
#main {
    display: flex;
    flex-direction: column;
}

/* --- LEWA KOLUMNA (OPIS I CENNIK) --- */
.car-sidebar {
    background-color: #000000;
    color: var(--text-light);
    padding: 30px 20px;
    font-size: 0.95rem;
    border-bottom: 2px solid gray;
}

.cennik-list {
    list-style: none;
    margin-bottom: 25px;
}

.cennik-list li {
    margin-bottom: 8px;
}

.title-price {
    font-size: 1.2rem;
    color: var(--accent);
    margin-bottom: 12px;
    text-transform: uppercase;
}

.margin-top {
    margin-top: 15px;
    color: #ffffff;
}

.general-specs {
    background: #141414;
    padding: 15px;
    border-radius: 8px;
    border-left: 3px solid var(--accent);
    margin-bottom: 25px;
}

.general-specs p {
    margin-bottom: 5px;
}

#opis {
    font-size: 1.1rem;
    color: #ffffff;
    margin-bottom: 15px;
    border-bottom: 1px solid #333;
    padding-bottom: 5px;
}

/* Akordeon */
.accordion {
    list-style: none;
}

.acc-toggle {
    background-color: #1a1a1a;
    padding: 12px 15px;
    margin-bottom: 8px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    color: #ffffff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid #262626;
    transition: background-color 0.2s ease;
}

.acc-toggle:hover {
    background-color: #262626;
    border-color: #444;
}

.acc-content {
    display: none;
    list-style-type: disc;
    list-style-position: inside;
    padding: 10px 10px 10px 20px;
    background-color: #0d0d0d;
    border-left: 2px solid var(--accent);
    margin-bottom: 12px;
}

.acc-content li {
    margin-bottom: 6px;
    color: #ccc;
    font-size: 0.9rem;
}

.close-acc {
    list-style: none;
    color: var(--accent) !important;
    cursor: pointer;
    font-weight: bold;
    margin-top: 10px !important;
    text-align: right;
}

.close-all-btn {
    text-align: center;
    background: #222;
    color: #fff;
    padding: 10px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    margin-top: 15px;
    transition: background 0.2s ease;
}

.close-all-btn:hover {
    background: #333;
    color: var(--accent);
}

/* --- PRAWA KOLUMNA (GALERIA I KALENDARZ) --- */
.car-content-right {
    padding: 40px 5%;
    display: flex;
    flex-direction: column;
    gap: 50px;
}

/* Interaktywna galeria */
.gallery-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-width: 900px;
    margin: 0 auto;
    width: 100%;
}

.featured-img-box {
    width: 100%;
    height: 450px;
    background-color: #141414;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #333;
    box-shadow: 0 10px 25px rgba(0,0,0,0.8);
}

#main-gallery-img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Gwarantuje brak zniekształceń */
}

.thumbnails-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
}

.thumb {
    width: 100%;
    height: 80px;
    object-fit: cover; /* Miniaturki są idealnymi kwadratami */
    border-radius: 6px;
    cursor: pointer;
    opacity: 0.5;
    border: 2px solid transparent;
    transition: all 0.2s ease;
    background-color: #141414;
}

.thumb:hover {
    opacity: 0.8;
}

.thumb.active {
    opacity: 1;
    border-color: var(--accent);
    transform: scale(1.03);
}

/* Kalendarz */
.calendar-container {
    max-width: 900px;
    margin: 0 auto;
    width: 100%;
}

.calendar-title {
    font-size: 1.4rem;
    color: #ffffff;
    margin-bottom: 15px;
    text-align: center;
    border-bottom: 1px solid #333;
    padding-bottom: 10px;
}

iframe {
    width: 100%;
    height: 600px;
    border-radius: 12px;
    background: #ffffff;
}

/* ==========================================================================
   RESPONSYWNOŚĆ (MEDIA QUERIES)
   ========================================================================== */

@media (min-width: 600px) {
    .contact-info {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 900px) {
    .top-bar {
        flex-direction: row;
        align-items: stretch;
    }

    .brand-title {
        width: var(--sidebar-width);
        min-width: var(--sidebar-width);
        max-width: var(--sidebar-width);
        padding: 15px 20px;
        border-bottom: none;
        border-right: 2px solid gray;
    }

    .contact-info {
        grid-template-columns: repeat(4, 1fr);
        flex-grow: 1;
        align-items: center;
        padding: 15px 10px;
    }

    #main {
        display: grid;
        grid-template-columns: var(--sidebar-width) 1fr;
        align-items: start;
    }

    .car-sidebar {
        width: var(--sidebar-width);
        border-right: 2px solid gray;
        border-bottom: none;
        min-height: 100%;
    }
}

@media (max-width: 600px) {
    .featured-img-box {
        height: 250px;
    }
    
    .thumbnails-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .car-banner h3 {
        font-size: 1.6rem;
    }
}