html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: 'Open Sans', sans-serif;
    background:
        linear-gradient(rgba(0,0,0,0.75), rgba(0,0,0,0.85)),
        url('/uploads/pozadina/bg-cars.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

/* HEADER */
.site-header {
    background: transparent;
    padding: 25px;
    padding-bottom: 40px;
    text-align: center;
    backdrop-filter: blur(8px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
    margin-bottom: 20px;
}

.logo img {
    max-width: 150px;
    margin-bottom: 20px;
}

.nav-wrapper {
    position: relative;
}

/* NASLOV */
.page-title {
    text-align: center;
    font-size: 40px;
    text-transform: uppercase;
    margin: 30px 0 50px;
    color: #fff;
    letter-spacing: 2px;
    display: inline-block;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
}

.page-title::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -8px;
    width: 100%;
    height: 3px;
    background: #22c55e;
    border-radius: 2px;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.page-title.animate::after {
    transform: scaleX(1);
}

/* NAV */
.main-nav {
    display: flex;
    justify-content: center;
    gap: 40px;
}

.main-nav a {
    color: #ccc;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    transition: 0.2s ease;
    position: relative;
}

.main-nav a::after {
    content: "";
    position: absolute;
    width: 0%;
    height: 2px;
    left: 0;
    bottom: -6px;
    background: #22c55e;
    transition: 0.3s ease;
}

.main-nav a:hover {
    color: #fff;
}

.main-nav a:hover::after {
    width: 100%;
}

.menu-toggle {
    display: none;
    margin-bottom: 20px;
    font-size: 28px;
    color: #fff;
    cursor: pointer;
}

/* AUTA */
.cars-section {
    padding: 80px 5%;
}

.cars-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(280px, 360px));
    justify-content: center;
    gap: 30px;
}

.car-card {
    position: relative;
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0,0,0,0.35);
    transition: 0.25s ease;
    display: flex;
    flex-direction: column;
    border: 2px solid #000;
}

.car-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 25px 60px rgba(0,0,0,0.5);
}

.car-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.car-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    flex: 1;
}

.car-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.car-title {
    font-size: 18px;
    font-weight: 700;
}

.car-title a {
    text-decoration: none;
    color: #111;
}

.car-year {
    background: #eef2ff;
    color: #3730a3;
    padding: 6px 10px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}

.car-specs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    font-size: 14px;
    color: #555;
}

.spec {
    background: #f9fafb;
    padding: 8px 10px;
    border-radius: 10px;
}

.spec strong {
    display: block;
    font-size: 15px;
    color: black;
}

.car-price-row {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.car-price {
    font-size: 24px;
    font-weight: 800;
    color: #22c55e;
}

.car-btn {
    background: #22c55e;
    color: #fff;
    padding: 10px 16px;
    border-radius: 10px;
    font-weight: 600;
    text-decoration: none;
    transition: 0.2s ease;
}

.car-btn:hover {
    background: #16a34a;
}

.sold-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    background: #ef4444;
    color: #fff;
    padding: 8px 14px;
    font-weight: 800;
    border-radius: 8px;
    z-index: 5;
    font-size: 13px;
    letter-spacing: 1px;
}

/* FOOTER */
.site-footer {
    background: transparent;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #fff;
    padding: 25px 5%;
    margin-top: 60px;
    border-top: 1px solid rgba(255,255,255,0.08);
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    text-align: center;
}

.footer-left {
    font-size: 14px;
}

.footer-nav {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.footer-nav a {
    color: #ccc;
    text-decoration: none;
    font-size: 14px;
    transition: 0.2s ease;
}

.footer-nav a:hover {
    color: #22c55e;
}

/* STRANICA VOZILA */
.vehicle-page {
    max-width: 1250px;
    margin: 0 auto;
    padding: 35px 18px 60px;
    color: #fff;
}

.vehicle-title {
    text-align: center;
    font-size: 42px;
    text-transform: uppercase;
    margin: 10px 0 8px;
    letter-spacing: 1px;
}

.vehicle-price {
    text-align: center;
    font-size: 28px;
    font-weight: 800;
    color: #22c55e;
    margin-bottom: 35px;
}

/* GALERIJA */
.vehicle-gallery {
    position: relative;
    max-width: 1000px;
    margin: 0 auto 55px;
    text-align: center;
    background: transparent;
    border-radius: 18px;
    overflow: hidden;
}

#mainImage {
    width: 100%;
    max-height: 750px;
    object-fit: contain;
    display: block;
    border-radius: 18px;
    cursor: pointer;
    transition: opacity .25s ease, transform .25s ease;
}

.fade-out {
    opacity: 0;
    transform: scale(.98);
}

.vehicle-gallery button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(17,17,17,0.78);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.25);
    font-size: 44px;
    width: 52px;
    height: 64px;
    border-radius: 14px;
    cursor: pointer;
    z-index: 5;
    backdrop-filter: blur(8px);
    transition: 0.2s ease;
}

.vehicle-gallery button:first-child {
    left: 8px;
}

.vehicle-gallery button:last-child {
    right: 8px;
}

.vehicle-gallery button:hover {
    background: #22c55e;
}

.vehicle-gallery button:active,
.lightbox-btn:active {
    transform: translateY(-50%) scale(0.95);
}

/* NASLOVI */
.vehicle-page h2 {
    text-align: center;
    font-size: 32px;
    margin: 50px 0 25px;
    color: #fff;
    letter-spacing: 1px;
}

/* GRID */
.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-bottom: 40px;
}

.grid-4 div {
    background: rgba(17,17,17,0.82);
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: 14px;
    padding: 14px 15px;
    min-height: 58px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #eee;
    backdrop-filter: blur(8px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.28);
    line-height: 1.35;
}

.grid-4 div:hover {
    border-color: #22c55e;
}

.grid-4 strong {
    color: #22c55e;
    margin-right: 4px;
}

.yes {
    color: #22c55e;
    font-weight: 700;
}

.no {
    color: #ef4444;
    font-weight: 700;
}

/* OPIS */
.vehicle-description {
    background: rgba(17,17,17,0.84);
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: 18px;
    padding: 28px;
    margin: 45px 0;
    line-height: 1.7;
    color: #eee;
    backdrop-filter: blur(8px);
}

/* LIGHTBOX */
#lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.92);
    justify-content: center;
    align-items: center;
    z-index: 99999;
    position: fixed;
}

#lightboxImg {
    max-width: 78vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 16px;
    transition: opacity .25s ease, transform .2s ease;
    cursor: zoom-in;
}

.lightbox-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(17,17,17,.78);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.25);
    font-size: 44px;
    width: 52px;
    height: 64px;
    border-radius: 14px;
    cursor: pointer;
    z-index: 100000;
    transition: 0.2s ease;
}

.lightbox-btn.left {
    left: calc(50% - 40vw);
}

.lightbox-btn.right {
    right: calc(50% - 40vw);
}

.lightbox-btn:hover {
    background: #22c55e;
}

/* RESPONSIVE */
@media (max-width: 1100px) {
    .cars-grid {
        grid-template-columns: repeat(2, minmax(280px, 360px));
    }
}

@media (max-width: 1050px) {
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }

    .vehicle-title {
        font-size: 34px;
    }
}

@media (max-width: 768px) {
    .main-nav {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 16px;
        margin-top: 18px;
        max-height: 0;
        opacity: 0;
        overflow: hidden;
        transform: translateY(-10px);
        transition: max-height 0.35s ease, opacity 0.3s ease, transform 0.3s ease;
    }

    .main-nav.active {
        max-height: 300px;
        opacity: 1;
        transform: translateY(0);
    }

    .menu-toggle {
        display: block;
        position: absolute;
        right: 12px;
        top: -5px;
        z-index: 1001;
    }

    .footer-inner {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
}

@media (max-width: 700px) {
    .cars-grid {
        grid-template-columns: minmax(280px, 360px);
    }
}

@media (max-width: 600px) {
    .vehicle-page {
        padding: 28px 12px 45px;
    }

    .vehicle-title {
        font-size: 25px;
    }

    .vehicle-price {
        font-size: 23px;
        margin-bottom: 28px;
    }

    .grid-4 {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .grid-4 div {
        font-size: 14px;
        padding: 13px;
    }

    .vehicle-gallery {
        max-width: 95%;
    }

    #mainImage {
        max-height: 330px;
        border-radius: 14px;
    }

    .vehicle-gallery button {
        font-size: 32px;
        width: 40px;
        height: 52px;
    }

    .vehicle-gallery button:first-child {
        left: 8px;
    }

    .vehicle-gallery button:last-child {
        right: 8px;
    }

    .vehicle-page h2 {
        font-size: 24px;
    }

    .lightbox-btn.left {
        left: 8px;
    }

    .lightbox-btn.right {
        right: 8px;
    }

    #lightboxImg {
        max-width: 88vw;
    }
}

/* O NAMA */
.about-page {
    max-width: 950px;
    margin: 0 auto;
    padding: 40px 18px 70px;
    color: #fff;
}

.about-box {
    background: rgba(17,17,17,0.86);
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: 18px;
    padding: 38px;
    line-height: 1.8;
    backdrop-filter: blur(10px);
    box-shadow: 0 20px 55px rgba(0,0,0,0.5);
}

.about-box p {
    color: #ddd;
    font-size: 16px;
    margin-bottom: 18px;
}

.about-box h2 {
    color: #22c55e;
    font-size: 26px;
    margin: 30px 0 20px;
    text-align: center;
}

.about-list {
    display: grid;
    gap: 14px;
    margin: 25px 0;
}

.about-list div {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.10);
    border-radius: 14px;
    padding: 16px;
    color: #ddd;
}

.about-list strong,
.about-box strong {
    color: #22c55e;
}

.about-signature {
    text-align: right;
    margin-top: 28px;
}

@media (max-width: 600px) {
    .about-box {
        padding: 24px;
    }
}

/* KONTAKT */
.contact-page {
    max-width: 950px;
    margin: 0 auto;
    padding: 40px 18px 70px;
    color: #fff;
}

.contact-box {
    background: rgba(17,17,17,0.86);
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: 18px;
    padding: 38px;
    backdrop-filter: blur(10px);
    box-shadow: 0 20px 55px rgba(0,0,0,0.5);
    text-align: center;
}

.contact-box > p {
    color: #ddd;
    font-size: 17px;
    line-height: 1.7;
    margin-bottom: 30px;
}

.contact-grid {
    display: grid;
    gap: 16px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 16px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.10);
    border-radius: 14px;
    padding: 18px;
    color: #fff;
    text-decoration: none;
    text-align: left;
    transition: 0.2s ease;
}

.contact-item:hover {
    border-color: #22c55e;
    transform: translateY(-2px);
}

.contact-item span {
    font-size: 30px;
}

.contact-item strong {
    color: #22c55e;
    font-size: 17px;
}

.contact-item p {
    margin: 5px 0 0;
    color: #ddd;
}

@media (max-width: 600px) {
    .contact-box {
        padding: 24px;
    }
}

.contact-socials {
    margin-top: 30px;
    display: flex;
    justify-content: center;
    gap: 40px;
}

.contact-socials a {
    display: inline-block;
    transition: 0.25s ease;
}

.contact-socials img {
    width: 50px;
    height: 50px;
    object-fit: contain;
    filter: brightness(0.9);
}

.contact-socials a:hover {
    transform: translateY(-4px) scale(1.1);
}

.contact-socials a:hover img {
    filter: brightness(1.2);
}