/* =============================================================
   1. FONT IMPORT (General Sans)
   ============================================================= */
@font-face {
    font-family: 'GeneralSans-Regular';
    src: url('fonts/GeneralSans-Regular.otf') format('opentype');
    font-weight: normal; font-style: normal;
}
@font-face {
    font-family: 'GeneralSans-Bold';
    src: url('fonts/GeneralSans-Bold.otf') format('opentype');
    font-weight: bold; font-style: normal;
}

/* =============================================================
   2. VARIJABLE & RESET
   ============================================================= */
:root {
    --bg-color: #ffffff;
    --text-primary: #000000;
    --accent-color: #0A6CFF;
    --main-padding: 40px;
    --top-spacing: 64px;
    --grid-gap-x: 24px;
    --grid-gap-y: 64px; 
    --nav-gap: 16px; 
    --footer-gap: -4px;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg-color: #000000;
        --text-primary: #ffffff;
    }
}

* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: 'GeneralSans-Regular', -apple-system, BlinkMacSystemFont, sans-serif;
    padding: var(--top-spacing) var(--main-padding) var(--main-padding) var(--main-padding);
    font-size: 14px;
    letter-spacing: 0.01em;
    max-width: 3200px;
    margin: 0 auto;
}

/* =============================================================
   3. HEADER & NAVIGATION
   ============================================================= */
header h1 {
    font-family: 'GeneralSans-Bold', sans-serif;
    font-size: 16px;
    text-transform: uppercase;
    margin-bottom: 24px; 
    line-height: 24px;
}

nav {
    display: flex;
    flex-direction: column; 
    gap: var(--nav-gap) !important; 
    align-items: flex-start;
}

nav a {
    font-family: 'GeneralSans-Bold', sans-serif;
    text-decoration: none;
    color: var(--text-primary);
    text-transform: uppercase;
    display: block;
    line-height: 16px; 
}

nav a.active { 
    color: var(--accent-color) !important; 
}

/* =============================================================
   4. GALERIJA GRID (STATIČAN - BRUTALIST)
   ============================================================= */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr); 
    column-gap: var(--grid-gap-x);
    row-gap: var(--grid-gap-y);
    margin-top: 64px;
    margin-bottom: 100px;
}

.grid-item {
    display: block;
    width: 100%;
}

.grid-item img {
    width: 100%;
    height: auto;
    display: block;
    aspect-ratio: auto 4 / 5; 
    cursor: pointer;
    /* UKLONJENE ANIMACIJE SKROLANJA */
    opacity: 1;
    transform: none;
}

.grid-item img:hover {
    opacity: 0.7;
}

.thumb-info {
    margin-top: 14px;
    line-height: 1.4;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

h2.thumb-title {
    font-family: 'GeneralSans-Bold', sans-serif;
    font-size: 14px;
    font-weight: normal; 
    margin: 0; 
    color: var(--text-primary);
}

.thumb-year {
    font-family: 'GeneralSans-Regular', sans-serif;
    font-size: 14px;
    color: var(--text-primary);
    margin-top: 4px;
}

/* =============================================================
   5. FOOTER (TVOJ ORIGINALNI STIL)
   ============================================================= */
footer {
    clear: both;
    margin-top: 180px;
    display: flex;
    flex-direction: column;
    gap: var(--footer-gap) !important; 
    padding-bottom: 0px;
}

footer a, footer span {
    font-size: 14px;
    color: var(--text-primary);
    text-decoration: none;
    line-height: 16px;
    display: block;
}

/* =============================================================
   6. OVERLAY & SLIDER (OVDJE OSTAJE ZOOM I FADE)
   ============================================================= */
.overlay {
    position: fixed;
    inset: 0;
    background: var(--bg-color);
    display: none;
    z-index: 9999;
    touch-action: manipulation;
}

.info-sidebar {
    position: absolute;
    top: var(--top-spacing);
    left: var(--main-padding);
    display: flex;
    flex-direction: column;
    z-index: 100;
}

.info-sidebar h2 { 
    font-family: 'GeneralSans-Bold', sans-serif;
    font-size: 14px; 
    text-transform: uppercase; 
    line-height: 20px;
}

.info-sidebar p { 
    font-size: 14px; 
    line-height: 24px;
}

.image-area {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 var(--main-padding);
}

.image-area img { 
    max-width: 60%;
    max-height: 85%; 
    object-fit: contain; 
}

.close-btn {
    position: absolute;
    top: var(--top-spacing);
    right: var(--main-padding);
    background: none !important; 
    border: none; 
    cursor: pointer;
    color: var(--text-primary);
    z-index: 10001;
}

.nav-arrow {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    background: none !important; 
    border: none; 
    cursor: pointer;
    color: var(--text-primary);
    padding: 40px; 
    z-index: 10000;
}

.nav-arrow.left { left: 0; }
.nav-arrow.right { right: 0; }

/* =============================================================
   7. LOADER (VRAĆEN)
   ============================================================= */
.loader {
  width: 24px;
  aspect-ratio: 1;
  --c: no-repeat linear-gradient(currentColor 0 0);
  background: var(--c) 0% 50%, var(--c) 50% 50%, var(--c) 100% 50%;
  background-size: 20% 100%;
  animation: l1 1s infinite linear;
  margin: 0 auto; 
}

@keyframes l1 {
  0%, 100% {background-size: 20% 100%, 20% 100%, 20% 100%}
  33%  {background-size: 20% 10% , 20% 100%, 20% 100%}
  50%  {background-size: 20% 100%, 20% 10% , 20% 100%}
  66%  {background-size: 20% 100%, 20% 100%, 20% 10% }
}

#infinite-loader {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 0; 
    display: none;
}

/* =============================================================
   8. TVOJ ORIGINALNI RESPONSIVE SETUP
   ============================================================= */
@media (max-width: 2600px) { .gallery-grid { grid-template-columns: repeat(10, 1fr); } }
@media (max-width: 2000px) { .gallery-grid { grid-template-columns: repeat(8, 1fr); } }
@media (max-width: 1800px) { .gallery-grid { grid-template-columns: repeat(6, 1fr); } }
@media (max-width: 1100px) { .gallery-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 800px) { 
    .gallery-grid { grid-template-columns: repeat(3, 1fr); } 
}

@media (max-width: 650px) {
    :root { --main-padding: 24px; }
    .gallery-grid { 
        grid-template-columns: repeat(2, 1fr); 
        row-gap: 48px;
    }
    .image-area img { max-width: 100% !important; }
    .nav-arrow { display: none; }
    .image-area { padding-top: 80px !important; }
    .info-sidebar { top: 24px !important; left: 24px !important; }
    .close-btn { top: 20px !important; right: 24px !important; }
}

/* About portrait fiksno */
.about-portrait {
    width: 100%;
    height: auto;
    display: block;
    cursor: default !important;
    pointer-events: none !important;
}


/* =============================================================
   9. FADE-IN ANIMACIJA (Za Lazy Load stabilnost)
   ============================================================= */
.fade-in {
    opacity: 0;
    transition: opacity 0.8s ease-in-out; /* Možeš staviti 0.6s ako želiš brže */
}

.fade-in.visible {
    opacity: 1;
}

/* Osiguraj da slike u gridu ne skaču dok se učitavaju */
.grid-item img {
    background-color: rgba(128, 128, 128, 0.05); /* Lagana siva podloga dok se slika ne učita */
}