:root {
    --primary: #c9a46c;
    --dark: #111;
    --light: #f5f5f5;
}

/* RESET */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Inter', sans-serif;
    background: #f0eeec;
    scroll-behavior: smooth;
}

/* ================= HEADER ================= */

header {
    background: var(--dark);
    color: white;
    height: 80px;
    display: flex;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 90%;
    margin: auto;
    height: 100%;
}

.logo {
    display: flex;
    align-items: center;
    gap: 5px;
}

.logo img {
    height: 70px;
    width: auto;
}

.nav h2,
.logo h2 {
    color: white;
    font-family: "IvyBodoni", serif;
    font-weight: 500;
    font-size: 30px;
}

.nav nav {
    display: flex;
    gap: 30px;
}

.nav nav a {
    color: white;
    text-decoration: none;
    position: relative;
    transition: 0.3s;
    font-weight: 300;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.nav nav a:hover {
    color: var(--primary);
}

.nav nav a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -5px;
    width: 0%;
    height: 2px;
    background: var(--primary);
    transition: 0.3s;
}

.nav nav a:hover::after,
.nav nav a.active::after {
    width: 100%;
}

.nav nav a.active {
    color: var(--primary);
}

/* ================= HERO ================= */

.hero {
    height: 90vh;
    background: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.6)),
                url('slike/pozadina.png') center/cover no-repeat;
    display: flex;
    align-items: center;
    color: white;
}

.hero-content {
    width: 50%;
    margin-left: 10%;
}

.hero h1 {
    font-family: 'Cinzel', serif;
    font-size: 52px;
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.hero h1::after {
    content: "";
    display: block;
    width: 120px;
    height: 2px;
    background: var(--primary);
    margin-top: 20px;
}

.hero p {
    margin-top: 25px;
    max-width: 550px;
    line-height: 1.6;
    font-weight: 300;
    margin-bottom: 35px;
}

.hero-list {
    margin-top: 15px;
    list-style: none;
}

.hero-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    font-size: 17px;
}

.hero-list li::before {
    content: "";
    width: 6px;
    height: 6px;
    background: var(--primary);
    border-radius: 50%;
}

/* ================= PRODUCTS ================= */

.products {
    text-align: center;
    padding: 60px 20px;
}

.products h3 {
    font-weight: 500;
    font-size: 14px;
    letter-spacing: 3px;
    margin-bottom: 15px;
}

.products h2 {
    font-family: 'Playfair Display', serif;
    font-size: 28px;
    font-weight: 600;
}

.grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 30px;
    width: 75%;
    margin: auto;
    margin-top: 30px;
}

.grid .card {
    grid-column: span 2;
}

.grid a:nth-child(4) {
    grid-column: 2 / span 2;
}

.grid a:nth-child(5) {
    grid-column: 4 / span 2;
}

.card {
    background: white;
    padding-bottom: 20px;
    text-decoration: none;
    color: black;
    transition: 0.3s;
    border-radius: 8px;
    overflow: hidden;
    text-align: center;
}

.card h4 {
    margin-top: 15px;
    font-family: 'Inter', sans-serif;
    color: black;
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.card p {
    font-size: 13px;
    margin-top: 10px;
    line-height: 1.5;
    color: #444;
    position: relative;
}

/* 🔥 OVO JE TVOJA CRTA ISPOD TEKSTA */
.card p::after {
    content: "";
    display: block;
    width: 60px;
    height: 1.5px;
    background: var(--primary);
    margin: 20px auto 0;
}

.card img {
    width: 100%;
}

.card:hover {
    transform: scale(1.03);
}

/* ================= FOOTER ================= */

footer {
    background: #ebe3de;
    padding-top: 30px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.footer-top {
    width: 100%;
    max-width: 1000px;
    margin-bottom: 40px;
}

footer h3 {
    font-weight: 500;
    font-size: 14px;
    letter-spacing: 3px;
}

.contact-title {
    font-family: 'Playfair Display', serif;
    font-size: 32px;
    font-weight: 500;
    margin-bottom: 40px;
}

.contact-grid {
    display: flex;
    justify-content: center;
    align-items: center;
}

.contact-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.icon-circle {
    width: 50px;
    height: 50px;
    background: #111;
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 20px;
    margin-bottom: 20px;
}

.contact-item h4 {
    font-size: 13px;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.contact-item p {
    font-size: 16px;
    font-weight: 500;
}

.divider {
    width: 2px;
    height: 80px;
    background: var(--primary);
    margin: 0 40px;
}

.footer-bottom {
    background: #0e0e0e;
    color: #888;
    width: 100%;
    padding: 20px 0;
    font-size: 12px;
}

/* ================= SATOVI ================= */


.masonry {
    column-count: 3;
    column-gap: 30px;
    width: 75%;
    margin: 0 auto 20px auto;
}

.masonry img {
    width: 100%;
    margin-bottom: 30px;
    border-radius: 12px;
    display: block;
    transition: 0.3s;
    filter: grayscale(10%);
    break-inside: avoid;
}

.masonry img:hover {
    transform: scale(1.03);
    filter: grayscale(0%);
}

/* LIGHTBOX */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.lightbox.active {
    display: flex;
}

.lightbox img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 10px;
}

.close {
    position: absolute;
    top: 30px;
    right: 50px;
    font-size: 40px;
    color: white;
    cursor: pointer;
}

/* RESPONSIVE */
@media (max-width: 900px) {
    .masonry { column-count: 2; }
}

@media (max-width: 600px) {
    .masonry { column-count: 1; }
}

/* SMOOTH SCROLL */
html {
    scroll-behavior: smooth;
}

#proizvodi {
    scroll-margin-top: 50px;
}

/* NASLOV */
.gallery-header{
    background: #111;
    height: 80px; /* isto kao početna traka */
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    position: relative;
}

.page-title{
    position: absolute;
    left: 50%;
    transform: translateX(calc(-50% + 610px));
    color: white;
    font-family: 'Inter', sans-serif;
    font-size: 20px;
    font-weight: 300;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.page-title-daske{
    left: 50%;
    transform: translateX(calc(-50% + 510px));
}

.page-title-topperi{
    left: 50%;
    transform: translateX(calc(-50% + 600px));
}

.page-title-ostalo{
    left: 50%;
    transform: translateX(calc(-50% + 550px));
}

/* DESNO LOGO (kao homepage) */
.logo-right{
    display: flex;
    transform: translateX(20%);
    align-items: center;
    gap: 5px;
}

.logo-right img{
    height: 70px; /* isto kao homepage */
}

.logo-right h2{
    color: white;
    font-family: "IvyBodoni", serif;
    font-weight: 500;
    font-size: 30px;
}

/* BACK ISPOD TRKE */
.back-below{
    display: inline-block;
    font-size: 18px;
    margin: 40px 90px;
    text-decoration: none;
    color: var(--primary);
    font-weight: 400;
    transition: 0.3s;
}

.back-below:hover{
    color: black;
}



/* ================= MOBILE CUSTOM ================= */
@media (max-width: 768px) {

/* ===== NAVBAR EXTRA SMALL ===== */
header {
    height: 60px;
    padding-left: -8px;
}

.logo {
    margin-left: -10px;
}

.nav {
    padding: -8px 3px;
    justify-content: space-between;
}

.logo img {
    height: 35px;
}

.logo h2 {
    font-size: 16px;
}

.nav nav {
    gap: 5px;
}

.nav nav a {
    font-size: 10px;
    letter-spacing: 0.5px;
}

    /* ===== HERO ===== */
    .hero {
        height: auto;
        padding: 60px 20px;
        
    }

    .hero-content {
        width: 100%;
        margin-left: 0;
    }

    .hero h1 {
        font-size: 28px;
    }

    .hero p {
        font-size: 14px;
    }

    .hero-list li {
        font-size: 14px;
    }

    /* ===== PRODUCTS GRID (2 u redu) ===== */
   /* ===== PRODUCTS GRID (Samo za mobitel i centriranje 5. kartice) ===== */
    .grid {
        display: flex !important;    /* Prebacuje s Grida na Flexbox na mobitelu */
        flex-wrap: wrap;             /* Omogućuje da kartice idu u novi red */
        justify-content: center;     /* Centrira sve, uključujući i petu karticu */
        gap: 15px;
        width: 90%;
        margin: 0 auto;  
        margin-top: 30px            /* Centrira cijelu mrežu na ekranu */
    }

    

    /* Sve kartice (uključujući i petu) sada imaju identičnu širinu */
    .grid .card, .grid a {
        /* Računica: 50% širine ekrana minus pola gap-a (15px / 2 = 7.5px) za savršen 2-u-redu layout */
        width: calc(50% - 7.5px) !important;
        flex: 0 0 auto;               /* Spriječava flexbox da rasteže kartice */
        box-sizing: border-box;
    }

    /* Brišemo stari kod za 5. karticu, jer Flexbox sam rješava centriranje */
    .grid a:nth-child(5) {
        grid-column: auto !important;
    }

    .card h4 {
        font-size: 14px;
    }

    .card p {
        font-size: 12px;
    }

    /* ===== KONTAKT (jedno pored drugog) ===== */
    .contact-grid {
        flex-direction: row;
        justify-content: space-around;
        gap: 10px;
    }

    .contact-item {
        flex: 1;
    }

    .icon-circle {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }

    .contact-item h4 {
        font-size: 11px;
    }

    .contact-item p {
        font-size: 12px;
    }

    .divider {
        display: none;
    }

/* ===== GALLERY ===== */
    .masonry {
        column-count: 2 !important; /* Promijenjeno na 3 stupca za mobitele */
        column-gap: 10px;           /* Smanjen razmak između slika da ljepše stane na mobitel */
        width: 95%;                 /* Malo proširena galerija da slike maksimalno iskoriste ekran */
        margin: 0 auto 30px auto !important;
    }

    /* Osiguraj da slike imaju mali razmak prema dolje i na mobitelu */
    .masonry img {
        margin-bottom: 10px;
    }

.back-below {
        margin: 20px 20px !important; 
    }
    .page-title {
        position: static;
        transform: none;
        text-align: center;
        font-size: 18px;
    }

    .logo-right {
        display: none;
    }

}
.paragrafi-intro {
    max-width: 900px;
    margin: 0 auto 40px auto;
    color: black;
    font-size: 18px;
    line-height: 1.6;
    text-align: center;
}