/* GLOBALNE VARIJABLE ZA TEMU */
:root {
    --primary-text: #000000;
    --border-color: #000000;
    --background-light: #ffffff;
}

/* RESET */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', sans-serif;
    background-color: white;
}

/* 0. PRELOADER & HERO */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: #ffffff;
    color: #000000;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99999;
    overflow: hidden;
    opacity: 1;
}

#preloader h1 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 8vw;
    font-weight: 300;
    letter-spacing: 2vw;
}

#hero-section {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
}
.hero-image-wrapper, .hero-image {
    width: 100%;
    height: 100%;
    position: absolute;
}
.hero-image {
    object-fit: cover;
}
.hero-text-overlay {
    position: absolute;
    top: 50%;
    left: 5%;
    transform: translateY(-50%);
    z-index: 10;
}
.hero-text-overlay h1 {
    font-family: 'Cormorant Garamond', serif;
    color: white;
    font-size: 8vw;
    font-weight: 300;
    text-shadow: 0 0 15px rgba(0, 0, 0, 0.7);
    letter-spacing: 0.2em;
}

/* 2. UVODNI TEKST */
#intro-text {
    padding: 20vh 10%;
    background-color: white;
    text-align: center;
}
.quote {
    font-family: 'Cormorant Garamond', serif;
    font-size: 3vw;
    font-style: italic;
    font-weight: 300;
    max-width: 900px;
    margin: 0 auto;
    line-height: 1.4;
    color: var(--primary-text);
}
.section-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 3vw;
    font-weight: 300;
    letter-spacing: 0.15em;
    margin: 10vh auto 5vh auto;
    color: var(--primary-text);
    text-align: center;
}

/* POZADINA ZA HOVER FASCICLES */
#folder-background-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
    pointer-events: none;
    opacity: 0; /* Opacity kontroliše JavaScript */
}

#folder-background-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* UKLONJENA MAGLA: filter i opacity su uklonjeni */
    transform: scale(1.05); /* Skaliranje ostaje */
}


/* 3. FOLDER SEKCIJA (Fascikle) */
#folders-section {
    padding: 10vh 5%;
    background-color: var(--background-light);
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    position: relative;
    z-index: 2;
}

.folders-container {
    width: 100%;
    max-width: 1200px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding-left: 0;
}

.folder-item {
    position: relative;
    width: 80%;
    max-width: 600px;
    height: 150px;
    background-color: white;
    border: 1px solid var(--border-color);
    margin: 15px 0;
    cursor: pointer;
    z-index: 3;
    transform: translateX(0);
    /* Ujednačena tranzicija za sve animacije */
    transition: transform 0.3s ease-out, box-shadow 0.3s ease-out; 
}

/* KOREKCIJA: SVE fascikle se udaljavaju OSIM one na hoveru */
.folders-container.focused .folder-item:not(:hover) {
    filter: none; 
    opacity: 1;   
    transform: translateX(-15px); /* Pomeranje unazad/udaljavanje */
    transition: all 0.3s ease-out;
    box-shadow: none; 
}

/* KOREKCIJA: Samo istaknuta fascikla se pomera napred i uvećava */
.folders-container.focused .folder-item:hover {
    transform: translateX(30px) scale(1.05); /* Isticanje: Pomeranje unapred (30px) + Blago uveličavanje (scale 1.05) */
    box-shadow: 8px 8px 20px rgba(0, 0, 0, 0.15); /* Jači shadow za fokus */
    filter: none; 
    opacity: 1;
    z-index: 4; /* Osigurava da je fascikla na hoveru ispred ostalih */
}

/* Uklonjeno je pravilo .folder-item:hover - to je uzrokovalo glitcheve */

.folder-tab {
    position: absolute;
    top: -20px;
    left: 0;
    background-color: white;
    border: 1px solid var(--border-color);
    border-bottom: none;
    padding: 5px 15px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 1.2vw;
    color: var(--primary-text);
}

/* FOLDER OVERLAY (Fascikla otvorena) */
#folder-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: rgba(255, 255, 255, 0);
    z-index: 9999;
    display: none;
    overflow-y: auto;
    padding: 0;
}
#folder-overlay.active {
    display: block;
}

.folder-content-wrapper {
    width: 90%;
    max-width: 1000px;
    min-height: 100vh;
    margin: 0 auto;
    padding: 100px 40px;
    background-color: white;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.2);
    transform-origin: left top;
}

#folder-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 4vw;
    font-weight: 300;
    margin-bottom: 20px;
}

.folder-description {
    border-left: 3px solid var(--border-color);
    padding-left: 20px;
    margin-bottom: 50px;
}
.folder-description p {
    font-size: 1.2vw;
    margin: 5px 0;
}
#folder-price {
    font-weight: 700;
}

/* Galerija unutar fascikle */
#folder-gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    padding-top: 30px;
}
.grid-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    background-color: #f0f0f0;
}

#close-folder {
    position: fixed;
    top: 30px;
    right: 30px;
    background: black;
    color: white;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    z-index: 10000;
    font-size: 1.2vw;
    font-family: 'Montserrat', sans-serif;
    letter-spacing: 0.1em;
    opacity: 0;
}

/* 4. KONTAKT SEKCIJA */
#contact-section {
    height: 40vh;
    background-color: white;
    padding: 5vh 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}
.contact-title {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 300;
    font-size: 2.8vw;
    letter-spacing: 0.1em;
}
.contact-info {
    text-align: right;
}
.contact-info p, .contact-info a {
    font-size: 1.2vw;
    color: var(--primary-text);
    text-decoration: none;
    display: block;
    margin: 5px 0;
}
.contact-info a:hover {
    text-decoration: underline;
}

/* GSAP SCROLL-REVEAL POČETNO STANJE */
.reveal-item, .reveal-text {
    will-change: transform, opacity;
}

/* RESPONSIVE KOREKCIJE ZA MOBILNE I TABLETE */

@media (max-width: 1024px) {
    /* Manji desktop/tablet */
    .quote {
        font-size: 4vw;
    }
    .section-title {
        font-size: 4vw;
    }
    .folder-tab {
        font-size: 1.8vw;
    }
    .folder-description p {
        font-size: 1.8vw;
    }
}

@media (max-width: 600px) {
    /* Mobilni telefoni (glavna prilagođavanja) */
    
    /* Fontovi */
    #preloader h1, .hero-text-overlay h1 {
        font-size: 12vw;
        letter-spacing: 1vw;
    }
    .quote {
        font-size: 5.5vw;
    }
    .section-title {
        font-size: 6vw;
        margin: 5vh auto 3vh auto;
    }
    /* Uklonite fokus efekat na mobilnom */
    .folders-container.focused .folder-item:not(:hover),
    .folders-container.focused .folder-item:hover {
        filter: none;
        opacity: 1;
        transform: none;
    }
    
    /* Fascikle (Folders) */
    .folders-container {
        padding-left: 5%;
        align-items: center;
    }
    .folder-item {
        width: 100%;
        max-width: none;
        height: 100px;
        margin: 10px 0;
    }
    .folder-tab {
        font-size: 4vw;
        top: -15px;
        padding: 5px 12px;
    }
    /* Oprez: Uklanjamo SVE animacije na mobilnom za stabilnost */
    .folder-item:hover {
        transform: none; 
        box-shadow: none;
    }
    
    /* Otvoreni Overlay */
    .folder-content-wrapper {
        width: 100%;
        padding: 80px 20px 50px 20px;
    }
    #folder-title {
        font-size: 8vw;
    }
    .folder-description p {
        font-size: 4vw;
    }
    #folder-gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    #close-folder {
        font-size: 4vw;
        top: 15px;
        right: 15px;
        padding: 8px 15px;
    }
    
    /* Kontakt */
    #contact-section {
        flex-direction: column;
        justify-content: center;
        text-align: center;
        height: auto;
        padding: 5vh 5%;
    }
    .contact-title {
        font-size: 6vw;
        margin-bottom: 15px;
    }
    .contact-info {
        text-align: center;
        margin-top: 15px; 
    }
    .contact-info p, .contact-info a {
        font-size: 4vw;
    }
}/* LIGHTBOX GALERIJA STILOVI */
#lightbox-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.9);
    display: none; /* Inicijalno sakriveno */
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

#lightbox-modal.active {
    display: flex;
}

.lightbox-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 90%;
    max-width: 90vw;
    height: 90vh;
}

#lightbox-image {
    max-width: 75%; /* Manja slika da ima mesta za strelice */
    max-height: 90%;
    object-fit: contain;
    transition: opacity 0.3s ease-in-out;
}

#lightbox-prev, #lightbox-next, #lightbox-close {
    background: none;
    border: none;
    color: white;
    font-size: 3rem;
    font-weight: 300;
    cursor: pointer;
    padding: 10px 20px;
    z-index: 10001;
    transition: color 0.2s;
    outline: none;
}

#lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 2rem;
}

#lightbox-prev:hover, #lightbox-next:hover, #lightbox-close:hover {
    color: #ccc;
}

/* Prilagođavanje za mobilni */
@media (max-width: 600px) {
    #lightbox-image {
        max-width: 90%;
    }
    .lightbox-content {
        width: 100%;
        max-width: 100%;
        height: 100vh;
    }
    #lightbox-prev, #lightbox-next {
        font-size: 2rem;
        padding: 5px 10px;
    }
}