/* assets/css/style.css */

/* Zmienne kolorystyczne - Główne kolory projektu */
:root {
    --dark-blue: #0A3C6B;
    --light-blue: #2398D5;
    --white: #ffffff;
    --bg: #f4f4f4;
    --text: #333333;
    --gray: #777777;
}

/* Główne ustawienia */
* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Montserrat', sans-serif; }
body { background: var(--bg); color: var(--text); padding-bottom: 50px; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
a { text-decoration: none; color: inherit; display: block; }
ul { list-style: none; }

/* --- KLIKALNE LINKI KONTAKTOWE --- */
.contact-link { display: inline-block; transition: color 0.3s ease; }
.contact-link:hover { color: var(--light-blue); }

/* --- TOP BAR --- */
.top-bar { background-color: var(--dark-blue); color: var(--white); font-size: 12px; padding: 8px 0; }
.top-bar .container { display: flex; justify-content: flex-end; gap: 20px; }

/* --- HEADER / NAWIGACJA --- */
header { background-color: var(--white); padding: 20px 0; box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05); position: sticky; top: 0; z-index: 100; }
.nav-container { display: flex; justify-content: space-between; align-items: center; }
.logo { font-size: 24px; font-weight: 700; color: var(--dark-blue); display: flex; align-items: center; }
nav ul { display: flex; gap: 20px; font-size: 14px; font-weight: 600; color: #555; }
nav ul li a { display: inline; transition: color 0.3s; }
nav ul li a:hover { color: var(--light-blue); }
.nav-btn { background-color: var(--light-blue); color: var(--white); padding: 10px 20px; border-radius: 4px; font-weight: 600; display: inline-block; transition: background 0.3s; }
.nav-btn:hover { background-color: #1a82b8; }

/* --- WYSZUKIWARKA --- */
.search-section { padding: 30px 0; background: var(--white); margin-bottom: 40px; box-shadow: 0 2px 10px rgba(0,0,0,0.05); }
.search-wrapper { position: relative; max-width: 800px; margin: 0 auto; }
.search-icon { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: var(--gray); font-size: 1.2rem; }
#searchInput { width: 100%; padding: 15px 20px 15px 45px; font-size: 1.1rem; border: 2px solid #ddd; border-radius: 4px; outline: none; transition: all 0.3s; }
#searchInput:focus { border-color: var(--light-blue); box-shadow: 0 0 0 3px rgba(35, 152, 213, 0.1); }

/* --- KARTY POJAZDÓW (GRID) --- */
.cars-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 30px; }
.car-card { background: var(--white); border-radius: 4px; overflow: hidden; box-shadow: 0 5px 15px rgba(0,0,0,0.05); transition: transform 0.3s, box-shadow 0.3s; display: flex; flex-direction: column; }
.car-card:hover { transform: translateY(-5px); box-shadow: 0 10px 20px rgba(0,0,0,0.1); }
.card-image { position: relative; height: 220px; overflow: hidden; }
.card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }
.car-card:hover .card-image img { transform: scale(1.05); }

.price-tag { position: absolute; bottom: 15px; right: 15px; background: var(--light-blue); color: var(--white); padding: 8px 15px; border-radius: 4px; font-weight: 700; box-shadow: 0 2px 5px rgba(0,0,0,0.2); }

.card-content { padding: 25px; flex-grow: 1; display: flex; flex-direction: column; }
.card-content h2 { font-size: 1.3rem; margin-bottom: 12px; color: var(--dark-blue); font-weight: 700; }
.card-specs { list-style: none; display: flex; gap: 15px; color: var(--gray); font-size: 0.9rem; margin-bottom: 25px; font-weight: 600; flex-wrap: wrap; }
.card-specs li { display: flex; align-items: center; gap: 5px; }
.card-specs i { color: var(--light-blue); }

.btn-details { margin-top: auto; width: 100%; padding: 12px; background: transparent; border: 2px solid var(--light-blue); color: var(--light-blue); font-weight: 700; cursor: pointer; border-radius: 4px; transition: all 0.3s; text-transform: uppercase; }
.btn-details:hover { background: var(--light-blue); color: var(--white); }

/* --- MODAL (OKIENKO SZCZEGÓŁÓW) --- */
.modal { display: none; position: fixed; z-index: 1000; left: 0; top: 0; width: 100%; height: 100%; background-color: rgba(10, 60, 107, 0.85); backdrop-filter: blur(5px); overflow-y: auto; }
.modal-content { background-color: var(--white); margin: 50px auto; width: 90%; max-width: 1000px; border-radius: 8px; position: relative; overflow: hidden; animation: modalSlideIn 0.4s ease; box-shadow: 0 10px 30px rgba(0,0,0,0.3); }
@keyframes modalSlideIn { from {opacity: 0; transform: translateY(-30px);} to {opacity: 1; transform: translateY(0);} }

.close-modal { position: absolute; top: 15px; right: 25px; font-size: 32px; font-weight: bold; color: #aaa; cursor: pointer; z-index: 1010; transition: color 0.3s; }
.close-modal:hover { color: var(--dark-blue); }

.modal-header-cta { background: #f4f9fc; padding: 20px; text-align: center; border-bottom: 1px solid #e1eff8; }
.modal-phone { font-size: 1.5rem; font-weight: 700; color: var(--light-blue); text-decoration: none; display: inline-block; margin-bottom: 5px; transition: color 0.3s;}
.modal-phone:hover { color: var(--dark-blue); }
.modal-promo { font-size: 0.95rem; color: var(--text); font-weight: 600; }

.modal-body { display: flex; flex-direction: column; }
@media(min-width: 768px) {
    .modal-body { flex-direction: row; }
    .modal-gallery { width: 55%; border-right: 1px solid #eee; }
    .modal-info { width: 45%; }
}

.modal-gallery { background: #fafafa; padding: 25px; display: flex; flex-direction: column; gap: 15px; }
.main-image-container { width: 100%; height: 350px; display: flex; align-items: center; justify-content: center; overflow: hidden; background: #fff; border-radius: 4px; box-shadow: inset 0 0 10px rgba(0,0,0,0.05);}
#modalMainImage { max-width: 100%; max-height: 100%; object-fit: contain; cursor: zoom-in; }

.thumbnails-container { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 5px; }
.thumb { width: 80px; height: 60px; object-fit: cover; cursor: pointer; opacity: 0.6; border: 2px solid transparent; transition: 0.2s; border-radius: 2px; }
.thumb:hover, .thumb.active { opacity: 1; border-color: var(--light-blue); }

.modal-info { padding: 30px; }
.modal-info h2 { font-size: 1.8rem; color: var(--dark-blue); margin-bottom: 15px; font-weight: 700; }
.modal-price { font-size: 1.6rem; color: var(--light-blue); margin-bottom: 25px; border-bottom: 2px solid #eee; padding-bottom: 15px; font-weight: 700; }

.specs-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; margin-bottom: 30px; }
.spec-item { font-size: 0.95rem; border-bottom: 1px solid #f1f1f1; padding: 8px 0; display: flex; justify-content: space-between; }
.spec-item strong { color: var(--dark-blue); font-weight: 600; }
.spec-item span { color: #555; text-align: right; }

.modal-description { background: #f9f9f9; padding: 20px; border-radius: 4px; line-height: 1.7; color: #555; border-left: 4px solid var(--light-blue); }
.modal-description h4 { margin-bottom: 10px; color: var(--dark-blue); font-size: 1.1rem; }

/* --- LIGHTBOX (POWIĘKSZANIE ZDJĘĆ) --- */
.lightbox { display: none; position: fixed; z-index: 2000; padding-top: 50px; left: 0; top: 0; width: 100%; height: 100%; overflow: auto; background-color: rgba(10, 60, 107, 0.95); }
.lightbox-content { margin: auto; display: block; width: 90%; max-width: 1200px; max-height: 85vh; object-fit: contain; animation: zoomIn 0.3s; box-shadow: 0 0 50px rgba(0,0,0,0.5); }
@keyframes zoomIn { from {transform:scale(0.8); opacity: 0;} to {transform:scale(1); opacity: 1;} }
.close-lightbox { position: absolute; top: 15px; right: 35px; color: #f1f1f1; font-size: 40px; font-weight: bold; transition: 0.3s; cursor: pointer; }
.close-lightbox:hover { color: var(--light-blue); text-decoration: none; }

/* --- RESPONSYWNOŚĆ (Smartfony i Tablety) --- */
@media (max-width: 992px) {
    .car-card { flex: 1 1 calc(50% - 20px); }
    .specs-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .top-bar .container { flex-direction: column; justify-content: center; align-items: center; gap: 5px; text-align: center; }
    .nav-container { flex-direction: column; gap: 15px; }
    nav ul { flex-wrap: wrap; justify-content: center; gap: 10px; }
    .nav-btn { width: 100%; text-align: center; }
    
    .search-section { padding: 20px 0; }
    #searchInput { font-size: 1rem; }
    
    .car-card { flex: 1 1 100%; }
    .main-image-container { height: 250px; }
    .modal-content { margin: 20px auto; width: 95%; }
}