/* Bojan Pavluković — zajednički stilovi
   Izgled prati raniju WordPress temu "Photography" (ThemeGoods): svetla siva pozadina,
   bela "kutija" od 1150 px, Montserrat za meni i naslove, serif za tekst, Mogra u podnožju. */

/* ---------- Fontovi (lokalno) ---------- */
@font-face {
  font-family: "Montserrat"; font-style: normal; font-weight: 300 700; font-display: swap;
  src: url(../fonts/montserrat-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Montserrat"; font-style: normal; font-weight: 300 700; font-display: swap;
  src: url(../fonts/montserrat-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Mogra"; font-style: normal; font-weight: 400; font-display: swap;
  src: url(../fonts/mogra-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Mogra"; font-style: normal; font-weight: 400; font-display: swap;
  src: url(../fonts/mogra-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- Tokeni ---------- */
:root {
  --page-bg: #f0f0f0;      /* pozadina oko "kutije" */
  --box-bg: #ffffff;
  --fg: #222222;
  --fg-soft: #999999;      /* podmeni */
  --fg-hover: #383838;
  --line: #e1e1e1;
  --black: #000000;
  --error: #c62828;
  --success: #2e7d32;

  --font-ui: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-text: Georgia, "Times New Roman", Times, serif;
  --font-script: "Mogra", "Brush Script MT", cursive;

  --box-max: 1150px;
  --side: 90px;            /* unutrašnja margina kutije (sadržaj je 970 px) */
  --gutter: 30px;          /* razmak u galerijama */
  --radius: 3px;           /* zaobljenje fotografija, kao u temi */
  --header-h: 60px;
  --ease: cubic-bezier(0.25, 0.8, 0.25, 1);
  color-scheme: light;
}
@media (max-width: 1023px) { :root { --side: 30px; } }
@media (max-width: 639px) { :root { --side: 16px; --gutter: 16px; } }

/* ---------- Osnova ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--page-bg); color: var(--fg);
  font: 400 15px/1.6 var(--font-text);
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
p { margin: 0 0 1.4em; }
h1, h2, h3 { margin: 0; font-family: var(--font-ui); font-weight: 400; color: var(--fg); text-wrap: balance; }
:focus-visible { outline: 2px solid var(--black); outline-offset: 3px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 16px; top: -100px; z-index: 100; padding: 10px 16px; background: var(--black); color: #fff; font: 600 13px var(--font-ui); }
.skip-link:focus { top: 16px; }

/* Bela kutija na sivoj pozadini (tg_boxed) */
.wrapper { max-width: var(--box-max); margin: 0 auto; min-height: 100vh; background: var(--box-bg); }

/* ---------- Zaglavlje ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40; background: var(--box-bg);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: var(--header-h); padding: 0 var(--side); }
.logo img { width: 192px; height: 16px; }
.header-right { display: flex; align-items: center; gap: 4px; }

.main-nav > ul { display: flex; margin: 0; padding: 0; list-style: none; }
.main-nav li { position: relative; }
.main-nav > ul > li > a, .main-nav .sub-toggle {
  display: flex; align-items: center; gap: 6px; height: var(--header-h); padding: 0 15px;
  border: 0; border-bottom: 1px solid transparent; margin-bottom: -1px; background: none; cursor: pointer;
  font: 600 11px/1 var(--font-ui); letter-spacing: 1px; color: var(--fg);
}
.main-nav > ul > li > a:hover, .main-nav .sub-toggle:hover,
.main-nav > ul > li > a[aria-current="page"], .main-nav .has-sub.is-current > .sub-toggle { border-bottom-color: var(--black); color: #020202; }
.chev { width: 8px; height: 8px; }
.sub-menu {
  position: absolute; left: 0; top: 100%; z-index: 5; min-width: 200px; margin: 0; padding: 10px 0; list-style: none;
  background: var(--box-bg); border: 1px solid #fcfcfc; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  opacity: 0; visibility: hidden; transform: translateY(6px); transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
}
.sub-menu a { display: block; padding: 8px 20px; font: 400 11px/1.5 var(--font-ui); letter-spacing: 1px; color: var(--fg-soft); }
.sub-menu a:hover, .sub-menu a[aria-current="page"] { color: var(--fg-hover); }
.has-sub:hover > .sub-menu, .has-sub:focus-within > .sub-menu, .has-sub.is-open > .sub-menu { opacity: 1; visibility: visible; transform: none; }

.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; padding: 0; border: 0; background: none; color: var(--fg); cursor: pointer; }
.icon-btn svg { width: 16px; height: 16px; }
.nav-toggle { display: none; }
.burger { display: grid; gap: 5px; width: 22px; }
.burger span { height: 3px; background: currentColor; }

@media (max-width: 1023px) {
  .nav-toggle { display: inline-flex; }
  .main-nav {
    position: fixed; top: 0; right: 0; bottom: 0; z-index: 60; width: min(320px, 85vw); overflow-y: auto;
    padding: 70px 30px 40px; background: var(--box-bg); box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
    transform: translateX(100%); visibility: hidden; transition: transform 0.35s var(--ease), visibility 0.35s;
  }
  .main-nav.is-open { transform: none; visibility: visible; }
  .main-nav > ul { flex-direction: column; }
  .main-nav > ul > li > a, .main-nav .sub-toggle { height: auto; padding: 12px 0; border: 0; font-size: 13px; }
  .sub-menu { position: static; min-width: 0; padding: 0 0 8px 12px; border: 0; box-shadow: none; opacity: 1; visibility: visible; transform: none; }
  .sub-menu a { padding: 7px 0; font-size: 12px; }
  .nav-close { position: absolute; top: 14px; right: 14px; }
}
@media (min-width: 1024px) { .nav-close { display: none; } }

/* ---------- Naslov stranice ---------- */
.page-caption { padding: 80px var(--side); text-align: center; }
.page-caption h1 { font-size: 34px; line-height: 1.4; letter-spacing: 1px; }
.page-caption .tagline {
  max-width: 860px; margin: 0 auto; font: italic 400 14px/1.9 var(--font-ui); white-space: pre-line;
}
.page-caption .tagline::before { content: ""; display: block; width: 50px; height: 2px; margin: 26px auto 24px; background: var(--fg); }
.page-caption.has-line { border-bottom: 1px solid var(--line); }
@media (max-width: 639px) { .page-caption { padding: 50px var(--side); } .page-caption h1 { font-size: 26px; } }

.content { padding: 0 var(--side) 60px; }
.content--wide { padding-left: 0; padding-right: 0; }
.content--text { padding-top: 60px; max-width: calc(970px + 2 * var(--side)); }

/* ---------- Galerije ---------- */
.gallery a, .blocks a { display: block; overflow: hidden; border-radius: var(--radius); background: #f3f3f3; }
.gallery img, .blocks img { width: 100%; transition: transform 0.6s var(--ease), opacity 0.3s; }
.gallery a:hover img { transform: scale(1.05); }

/* Masonry preko CSS kolona (redosled ide kolonu po kolonu) */
.gallery--masonry { column-gap: var(--gutter); columns: var(--cols, 3); }
.gallery--masonry a { margin-bottom: var(--gutter); break-inside: avoid; }
.gallery--wide { --gutter: 0px; }
.gallery--wide a { border-radius: 0; }
@media (max-width: 1023px) { .gallery--masonry { columns: min(var(--cols, 3), 2); } }
@media (max-width: 639px) { .gallery--masonry { columns: 1; } }
/* Uz JS: prava masonry mreža koja ređa fotografije red po red (kao Isotope u temi);
   visinu svake ćelije postavlja site.js. Broj kolona po širini ekrana: --c */
.gallery--masonry { --c: var(--cols, 3); }
@media (max-width: 1023px) { .gallery--masonry.cols-3, .gallery--masonry.cols-4 { --c: 2; } }
@media (max-width: 639px) { .gallery--masonry, .gallery--masonry.cols-3, .gallery--masonry.cols-4 { --c: 1; } }
.gallery--masonry.is-grid { display: grid; columns: auto; grid-auto-rows: 1px; column-gap: var(--gutter); align-items: start; }
.gallery--masonry.is-grid a { margin-bottom: 0; }

/* Broj kolona (klase umesto inline stilova, zbog CSP-a) */
.cols-1 { --cols: 1; } .cols-2 { --cols: 2; } .cols-3 { --cols: 3; } .cols-4 { --cols: 4; }

/* Ravna mreža sa isečenim sličicama (Food, Weddings) */
.gallery--grid { display: grid; gap: var(--gutter); grid-template-columns: repeat(var(--cols, 2), 1fr); }
.gallery--grid a { aspect-ratio: var(--ratio, 4 / 3); }
.gallery--grid img { height: 100%; object-fit: cover; }
@media (max-width: 639px) { .gallery--grid { grid-template-columns: 1fr; } }

/* Mešana mreža: sve sličice 4:3, istaknuta zauzima 2 x 2 polja (AI Images, Flyover) */
.gallery--mixed { display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-flow: dense; }
.gallery--mixed a { aspect-ratio: 4 / 3; border-radius: 0; }
.gallery--mixed a.is-double { grid-column: span 2; grid-row: span 2; }
.gallery--mixed img { height: 100%; object-fit: cover; }
@media (max-width: 639px) { .gallery--mixed { grid-template-columns: 1fr 1fr; } }

/* Jedna kolona (Etnofest, Interetno) */
.gallery--single { display: grid; gap: var(--gutter); }

/* Horizontalna traka (Products) */
.gallery--horizontal {
  display: flex; gap: 60px; overflow-x: auto; padding: 10px var(--side) 30px; scroll-snap-type: x proximity;
  scrollbar-width: thin;
}
.gallery--horizontal a { flex: none; background: none; scroll-snap-align: center; }
.gallery--horizontal img { width: auto; height: min(62vh, 520px); }
.gallery--horizontal a:hover img { transform: none; opacity: 0.85; }

/* Lista venčanja: naslov se pojavljuje preko fotografije */
.wedding-card { position: relative; }
.wedding-card .title {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 20px; text-align: center;
  background: rgba(255, 255, 255, 0.85); opacity: 0; transition: opacity 0.3s var(--ease);
  font: 600 18px/1.4 var(--font-ui); letter-spacing: 1px;
}
.wedding-card:hover .title, .wedding-card:focus-visible .title { opacity: 1; }
@media (hover: none) { .wedding-card .title { inset: auto 0 0 0; opacity: 1; background: rgba(255, 255, 255, 0.9); } }

/* ---------- Venčanja: hero, trake i blokovi ---------- */
.hero { position: relative; height: min(70vh, 630px); min-height: 320px; overflow: hidden; }
.hero img, .band img { position: absolute; left: 0; top: 0; width: 100%; height: 100%; object-fit: cover; }
.band { position: relative; height: min(600px, 70vh); overflow: hidden; margin: var(--row-gap, 30px) 0; }
.band img { object-position: center top; }
.post-title { padding: 50px var(--side) 0; text-align: center; }
.post-title h1 { font-size: 30px; letter-spacing: 1px; }
.blocks { padding: 40px var(--side) 60px; }
.blocks .row { display: grid; gap: var(--gutter); grid-template-columns: repeat(var(--n, 1), 1fr); margin-bottom: var(--row-gap, 30px); align-items: start; }
.blocks .band { margin-left: calc(-1 * var(--side)); margin-right: calc(-1 * var(--side)); }
.blocks .row.n1 { --n: 1; } .blocks .row.n2 { --n: 2; } .blocks .row.n3 { --n: 3; } .blocks .row.n4 { --n: 4; }
.blocks.gap-tight { --row-gap: 10px; }
.blocks a:hover img { opacity: 0.92; }
@media (max-width: 639px) { .blocks .row { grid-template-columns: 1fr; } }

/* ---------- Parallax hero na galerijama (GALLERY_HERO u build.py) ---------- */
.hero--gallery { height: min(62vh, 560px); min-height: 300px; display: flex; align-items: center; justify-content: center; }
.hero--gallery::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(0, 0, 0, 0.15), rgba(0, 0, 0, 0.45)); }
.hero-caption { position: relative; z-index: 2; max-width: 900px; padding: 0 var(--side); text-align: center; color: #fff; translate: 0 var(--hc-y, 0px); opacity: var(--hc-o, 1); }
.hero-caption h1 { font-size: clamp(30px, 5vw, 52px); line-height: 1.3; letter-spacing: 2px; color: #fff; text-shadow: 0 2px 20px rgba(0, 0, 0, 0.35); }
.hero-caption .tagline { margin: 0; font: italic 400 15px/1.8 var(--font-ui); white-space: pre-line; text-shadow: 0 1px 10px rgba(0, 0, 0, 0.5); }
.hero-caption .tagline::before { content: ""; display: block; width: 50px; height: 2px; margin: 18px auto 16px; background: #fff; }
.content.after-hero { padding-top: 60px; }
.content--wide.after-hero { padding-top: 0; }
.gallery--horizontal { margin-top: 0; }

/* ---------- Tekst (About) ---------- */
.prose { max-width: 970px; }
.prose img { margin: 10px auto 30px; border-radius: var(--radius); }
.prose b, .prose strong { font-weight: 700; }

/* ---------- Kontakt ---------- */
.contact { display: grid; gap: 40px; padding-top: 50px; }
@media (min-width: 900px) { .contact { grid-template-columns: 240px 1fr; gap: 50px; } }
.contact-side h2 { font: 600 20px/1.4 var(--font-ui); text-transform: uppercase; text-align: center; margin-bottom: 20px; }
.contact-side p { margin: 0 0 8px; }
.contact-side a:hover { text-decoration: underline; }
.contact-form h2 { font-size: 30px; letter-spacing: 1px; margin-bottom: 10px; }
.form-row { display: grid; gap: 24px; }
@media (min-width: 640px) { .form-row--2 { grid-template-columns: 1fr 1fr; } }
.field { position: relative; margin-bottom: 24px; }
.field input, .field textarea {
  width: 100%; padding: 12px 10px 10px; border: 0; border-bottom: 1px solid var(--fg); border-radius: 0;
  background: transparent; color: var(--fg); font: 400 16px/1.5 var(--font-text);
}
.field textarea { min-height: 180px; resize: vertical; display: block; }
.field input::placeholder, .field textarea::placeholder { color: var(--fg); opacity: 1; }
.field input:focus, .field textarea:focus { outline: none; border-bottom-width: 2px; padding-bottom: 9px; }
.field.has-error input, .field.has-error textarea { border-bottom-color: var(--error); }
.field-error { display: block; margin-top: 6px; font: 400 12px/1.4 var(--font-ui); color: var(--error); }
.field-error:empty { display: none; }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 16px 24px; margin-top: 10px; }
.form-status { flex: 1 1 260px; margin: 0; font: 400 14px/1.5 var(--font-ui); }
.form-status.is-ok { color: var(--success); }
.form-status.is-error { color: var(--error); }
.button {
  display: inline-flex; align-items: center; justify-content: center; min-height: 45px; padding: 0 30px;
  border: 1px solid var(--black); background: var(--black); color: #fff; cursor: pointer;
  font: 600 16px/1 var(--font-ui); transition: background 0.2s, color 0.2s;
}
.button:hover { background: #fff; color: var(--black); }
.button[disabled] { opacity: 0.5; cursor: progress; }

/* ---------- Podnožje ---------- */
.site-footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px; padding: 40px var(--side) 30px; font-family: var(--font-script); }
.mywed img { width: 400px; max-width: 100%; height: auto; }
.copyright { margin: 10px 0 0; font-size: 12px; }
.footer-nav ul { display: flex; gap: 20px; margin: 0; padding: 0; list-style: none; font-size: 12px; }
.footer-nav a:hover { text-decoration: underline; }

/* ---------- Deljenje ---------- */
.share-overlay {
  position: fixed; inset: 0; z-index: 70; display: flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, 0.96); opacity: 0; visibility: hidden; transition: opacity 0.3s, visibility 0.3s;
}
.share-overlay.is-open { opacity: 1; visibility: visible; }
.share-overlay ul { display: flex; gap: 40px; margin: 0; padding: 0; list-style: none; }
.share-overlay a { display: block; color: var(--fg); transition: transform 0.2s; }
.share-overlay a:hover { transform: scale(1.15); }
.share-overlay svg { width: 34px; height: 34px; }
.share-close { position: absolute; top: 20px; right: 20px; }
.close-x { position: relative; width: 20px; height: 20px; }
.close-x::before, .close-x::after { content: ""; position: absolute; top: 9px; left: 0; width: 20px; height: 2px; background: currentColor; transform: rotate(45deg); }
.close-x::after { transform: rotate(-45deg); }
/* ispod zaglavlja (z 40), da mobilni meni u zaglavlju ostane iznad zatamnjenja */
.backdrop { position: fixed; inset: 0; z-index: 39; background: rgba(0, 0, 0, 0.3); opacity: 0; visibility: hidden; transition: opacity 0.3s, visibility 0.3s; }
.backdrop.is-open { opacity: 1; visibility: visible; }

/* ---------- Na vrh ---------- */
.to-top {
  position: fixed; right: 12px; bottom: 12px; z-index: 30; width: 44px; height: 44px; border: 0; border-radius: 3px;
  background: rgba(0, 0, 0, 0.1); color: #fff; cursor: pointer; opacity: 0; visibility: hidden; transition: opacity 0.3s, visibility 0.3s, background 0.2s;
}
.to-top svg { width: 16px; height: 16px; }
.to-top:hover { background: rgba(0, 0, 0, 0.3); }
.to-top.is-visible { opacity: 1; visibility: visible; }

/* ---------- 404 ---------- */
.not-found { text-align: center; padding-bottom: 80px; }
.not-found p { margin-bottom: 30px; }

/* ---------- Lightbox (PhotoSwipe) svetli, kao "metro-white" u temi ---------- */
html .pswp { --pswp-bg: #ffffff; --pswp-placeholder-bg: #f3f3f3; --pswp-icon-color: #222; --pswp-icon-color-secondary: #fff; --pswp-icon-stroke-color: #fff; }
html .pswp__counter { color: #222; text-shadow: none; }
html .pswp__button { --pswp-icon-color: #222; }

/* ---------- Parallax (hero i trake na venčanjima; uključuje ga site.js) ---------- */
.has-parallax .hero img, .has-parallax .band img { height: 130%; top: -15%; translate: 0 var(--py, 0px); will-change: translate; }
