/* Dodatni stilovi za staticku verziju sajta */
.ps2id-target { display:block; position:relative; top:-110px; visibility:hidden; }

/* velicina logotipa (iz Customizer-a originalnog sajta) */
.navbar img.custom-logo,
.theme-header-logo-center img.custom-logo { max-width: 126px; height: auto; }

/* prekidac pisma u gornjoj traci */
.contact_language .len_item a.pismo-active { text-decoration: underline; }

/* Modal (zamjena za Modal Popup Box plugin) */
.mpb-shotcode-buttons .md-trigger { cursor: pointer; }
.pmf-modal { position: fixed; inset: 0; z-index: 3000; display: none; }
.pmf-modal.is-open { display: block; }
.pmf-modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.6); }
.pmf-modal-dialog {
  position: relative; margin: 4vh auto; max-width: 900px; width: 92%;
  max-height: 92vh; display: flex; flex-direction: column;
  background: #fff; color: #333; border-radius: 4px; overflow: hidden;
  box-shadow: 0 10px 40px rgba(0,0,0,.4);
}
.pmf-modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px; background: #43766c; color: #fff;
}
.pmf-modal-header h4 { margin: 0; font-size: 1.25rem; color: #fff; }
.pmf-modal-close {
  background: none; border: 0; color: #fff; font-size: 28px; line-height: 1;
  cursor: pointer; padding: 0 4px;
}
.pmf-modal-body { padding: 20px; overflow-y: auto; text-align: left; }
.pmf-modal-body img { max-width: 100%; height: auto; }
.pmf-modal-body a { color: #0c7fc4; }
body.pmf-modal-locked { overflow: hidden; }

/* Galerija */
.pmf-gallery {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px; margin: 28px 0; clear: both;
}
.pmf-gallery-item {
  position: relative; display: block; overflow: hidden; border-radius: 4px;
  aspect-ratio: 4 / 3; background: #e9eef3; cursor: zoom-in;
}
/* tema forsira width:35% i float:left za slike u tekstu - ponistavamo */
.pmf-gallery-item img,
.post .post-content .entry-content .pmf-gallery-item img {
  width: 100%; height: 100%; object-fit: cover; border-radius: 0;
  float: none; margin: 0; display: block; max-width: none;
  transition: transform .35s ease, filter .35s ease;
}
.pmf-gallery-item::after {
  content: ""; position: absolute; inset: 0; background: rgba(8, 40, 70, 0);
  transition: background .25s ease;
}
.pmf-gallery-item:hover img, .pmf-gallery-item:focus-visible img { transform: scale(1.04); }
.pmf-gallery-item:hover::after, .pmf-gallery-item:focus-visible::after { background: rgba(8, 40, 70, .18); }
/* jedna ili dvije slike: veci prikaz, jedna slika u svom formatu */
.pmf-gallery:has(> .pmf-gallery-item:nth-child(2):last-child),
.pmf-gallery:has(> .pmf-gallery-item:only-child) { grid-template-columns: 1fr 1fr; }
.pmf-gallery-item:only-child { aspect-ratio: auto; }
.pmf-gallery-item:only-child img,
.post .post-content .entry-content .pmf-gallery-item:only-child img { height: auto; max-height: 560px; }
@media (max-width: 600px) {
  .pmf-gallery { grid-template-columns: 1fr 1fr; gap: 8px; }
  .pmf-gallery-item:only-child { grid-column: 1 / -1; }
}

/* Galerija kao slajder (JS pretvara .pmf-gallery sa 2+ slike) */
.pmf-gallery.pmf-gal-js { display: block; }
.pmf-gal-js > .pmf-gallery-item { display: none; }
.pmf-gal-stage {
  position: relative; background: #0f1720; border-radius: 6px; overflow: hidden;
  aspect-ratio: 16 / 10; cursor: zoom-in; outline: none;
}
.pmf-gal-stage:focus-visible { box-shadow: 0 0 0 3px #0c7fc4; }
.pmf-gal-stage img,
.post .post-content .entry-content .pmf-gal-stage img {
  position: absolute; inset: 0; width: 100%; height: 100%; max-width: none;
  object-fit: contain; float: none; margin: 0; border-radius: 0; display: block;
  transition: opacity .25s ease;
}
.pmf-gal-stage .pmf-gal-btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 48px; height: 48px; border-radius: 50%; border: 0; padding: 0;
  background: rgba(255,255,255,.88); color: #12324f; font-size: 28px; line-height: 1;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  box-shadow: 0 2px 10px rgba(0,0,0,.25); transition: background .2s ease, transform .2s ease;
}
.pmf-gal-stage .pmf-gal-btn:hover { background: #fff; transform: translateY(-50%) scale(1.06); }
.pmf-gal-prev { left: 14px; }
.pmf-gal-next { right: 14px; }
.pmf-gal-count, .pmf-gal-zoom {
  position: absolute; top: 12px; background: rgba(10,20,30,.62); color: #fff;
  font-size: 13px; line-height: 1; padding: 7px 10px; border-radius: 20px; letter-spacing: .03em;
  pointer-events: none;
}
.pmf-gal-count { left: 12px; }
.pmf-gal-zoom { right: 12px; }
.pmf-gal-cap { font-size: 15px; color: #4a5866; padding: 8px 2px 0; }
.pmf-gal-cap:empty { display: none; }
.pmf-gal-thumbs {
  display: flex; gap: 8px; overflow-x: auto; padding: 10px 2px 6px;
  scroll-snap-type: x proximity; scrollbar-width: thin; -webkit-overflow-scrolling: touch;
}
.pmf-gal-thumbs button {
  flex: 0 0 auto; width: 104px; height: 70px; padding: 0; border: 0; cursor: pointer;
  border-radius: 4px; overflow: hidden; opacity: .55; scroll-snap-align: center;
  outline: 3px solid transparent; outline-offset: -3px; background: #e9eef3;
  transition: opacity .2s ease, outline-color .2s ease;
}
.pmf-gal-thumbs button:hover { opacity: .9; }
.pmf-gal-thumbs button.is-active { opacity: 1; outline-color: #0c7fc4; }
.pmf-gal-thumbs img,
.post .post-content .entry-content .pmf-gal-thumbs img {
  width: 100%; height: 100%; object-fit: cover; display: block; float: none; margin: 0;
  max-width: none; border-radius: 0;
}
@media (max-width: 600px) {
  .pmf-gal-stage { aspect-ratio: 4 / 3; border-radius: 4px; }
  .pmf-gal-stage .pmf-gal-btn { width: 40px; height: 40px; font-size: 24px; }
  .pmf-gal-prev { left: 8px; } .pmf-gal-next { right: 8px; }
  .pmf-gal-zoom { display: none; }
  .pmf-gal-thumbs button { width: 80px; height: 56px; }
}

figure.post-thumbnail img.wp-post-image { cursor: zoom-in; }

/* Galerija preko cijelog ekrana */
.pmf-lb {
  position: fixed; inset: 0; z-index: 100000; display: none;
  background: rgba(10, 14, 20, .96); color: #fff;
  align-items: center; justify-content: center;
  -webkit-user-select: none; user-select: none; touch-action: pan-y;
}
.pmf-lb.is-open { display: flex; animation: pmfLbIn .2s ease; }
@keyframes pmfLbIn { from { opacity: 0; } to { opacity: 1; } }
.pmf-lb figure { margin: 0; max-width: 92vw; max-height: 100%; text-align: center; }
.pmf-lb img {
  max-width: 92vw; max-height: calc(100vh - 120px); width: auto; height: auto;
  display: block; margin: 0 auto; box-shadow: 0 10px 40px rgba(0,0,0,.5);
  transition: opacity .2s ease;
}
.pmf-lb figcaption {
  font-size: 15px; line-height: 1.5; color: #d8dee6; padding: 12px 16px 0;
  max-width: 900px; margin: 0 auto;
}
.pmf-lb button {
  position: absolute; background: rgba(255,255,255,.1); color: #fff; border: 0;
  width: 52px; height: 52px; border-radius: 50%; cursor: pointer; font-size: 28px;
  padding: 0; display: flex; align-items: center; justify-content: center;
  transition: background .2s ease;
}
.pmf-lb button:hover, .pmf-lb button:focus-visible { background: rgba(255,255,255,.24); outline: none; }
.pmf-lb-close { top: 16px; right: 16px; }
.pmf-lb-prev { left: 16px; top: 50%; transform: translateY(-50%); }
.pmf-lb-next { right: 16px; top: 50%; transform: translateY(-50%); }
.pmf-lb-count { position: absolute; top: 30px; left: 24px; font-size: 14px; color: #aab4c0; letter-spacing: .05em; }
.pmf-lb.is-single .pmf-lb-prev, .pmf-lb.is-single .pmf-lb-next, .pmf-lb.is-single .pmf-lb-count { display: none; }
@media (max-width: 600px) {
  .pmf-lb button { width: 44px; height: 44px; font-size: 24px; }
  .pmf-lb-prev, .pmf-lb-next { top: auto; bottom: 18px; transform: none; }
  .pmf-lb img { max-height: calc(100vh - 170px); max-width: 100vw; }
  .pmf-lb figure { max-width: 100vw; }
}

/* Dogadjaji */
.pmf-events { margin-bottom: 20px; }
.pmf-event-item {
  background: #fff; border-radius: 4px; overflow: hidden; height: 100%;
  box-shadow: 0 2px 10px rgba(0,0,0,.12); margin-bottom: 20px;
  display: flex; flex-direction: column;
}
.pmf-event-thumb img { width: 100%; height: 170px; object-fit: cover; display: block; }
.pmf-event-body { padding: 14px 16px 18px; text-align: left; }
.pmf-event-date, .pmf-event-loc { font-size: .85rem; color: #6a6a6a; margin-bottom: 6px; }
.pmf-event-title { font-size: 1.05rem; margin: 6px 0 8px; line-height: 1.35; }
.pmf-event-title a { color: #01012f; }
.pmf-event-title a:hover { color: #2a89b8; }
.pmf-event-meta { list-style: none; padding: 0; margin: 0 0 24px; }
.pmf-event-meta li { padding: 6px 0; border-bottom: 1px solid #e6e6e6; }

/* detalji dogadjaja na kartici (СП, смјер, кандидат...) */
.pmf-event-details {
  list-style: none; padding: 0; margin: 8px 0 0;
  font-size: .82rem; color: #5a5a5a; line-height: 1.45;
}
.pmf-event-details li { padding: 2px 0 2px 14px; position: relative; }
.pmf-event-details li:before {
  content: ''; position: absolute; left: 0; top: .62em;
  width: 5px; height: 5px; border-radius: 50%; background: #2a89b8;
}

/* dugme ka prilozenom dokumentu (PDF) */
.pmf-event-doc {
  display: block; margin: auto 16px 16px; padding: 9px 12px;
  background: #2a89b8; color: #fff !important; border-radius: 4px;
  font-size: .84rem; font-weight: 600; text-align: center;
  text-decoration: none !important;
}
.pmf-event-doc:hover, .pmf-event-doc:focus { background: #1f6b91; color: #fff; }
.pmf-event-doc i { margin-right: 6px; }

/* sitne korekcije za staticku verziju */
.entry-content img { max-width: 100%; height: auto; }
.entry-content table { max-width: 100%; }
.wp-show-posts-image img { max-width: 100%; height: auto; }

/* Наши партнери: kartice iste visine, naslov i dugme poravnati */
.pmf-partners { display: flex; flex-wrap: wrap; }
.pmf-partners > [class*="col-"] { display: flex; margin-bottom: 24px; }
.pmf-partners .card { width: 100%; border: 0; border-radius: 10px; overflow: hidden; }
.pmf-partners .card-body { display: flex; flex-direction: column; height: 100%; padding: 30px 28px 26px; }
.pmf-partners .card-body > p:first-child { display: none; }
.pmf-partners .card-title { font-size: 23px !important; line-height: 1.3; color: #fff; min-height: 2.6em;
  display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 14px; }
.pmf-partners .card-text { flex: 1 1 auto; margin-bottom: 18px; }
.pmf-partners .mpb-shotcode-buttons { margin-top: auto; }
.pmf-partners .mpb-shotcode-buttons { display: flex; justify-content: center; width: 100%; margin-left: 0; margin-right: 0; padding: 0; }
.pmf-partners .mpb-shotcode-buttons .btn { display: inline-block; float: none; text-decoration: none; padding: 8px 24px;
  border-radius: 6px; border: 1px solid rgba(255,255,255,.65); background: rgba(255,255,255,.14) !important;
  font-size: 14px; transition: background .2s; }
.pmf-partners .mpb-shotcode-buttons .btn:hover { background: rgba(255,255,255,.28) !important; }
@media (max-width: 991px) { .pmf-partners .card-title { min-height: 0; } }

/* ===== Најновије новости (sidebar uz vijest) ===== */
.pmf-side { position: sticky; top: 24px; background: #fff; border-radius: 16px; overflow: hidden;
  box-shadow: 0 2px 6px rgba(16,42,67,.06), 0 18px 40px rgba(16,42,67,.12); margin-bottom: 30px; }
.pmf-side-head { display: flex; align-items: center; gap: 12px; padding: 18px 22px;
  background: linear-gradient(120deg, #123a5e 0%, #1d5f93 55%, #2f8fc8 100%); position: relative; }
.pmf-side-head::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(260px 120px at 95% 0%, rgba(255,255,255,.22), transparent 70%); }
.pmf-side-head h4 { margin: 0; color: #fff; font-size: 18px; font-weight: 700; letter-spacing: .02em; }
.pmf-side-dot { width: 10px; height: 10px; border-radius: 50%; background: #ffb340; flex-shrink: 0;
  box-shadow: 0 0 0 0 rgba(255,179,64,.7); animation: pmfPuls 2s infinite; }
@keyframes pmfPuls { 0% { box-shadow: 0 0 0 0 rgba(255,179,64,.6); } 70% { box-shadow: 0 0 0 10px rgba(255,179,64,0); } 100% { box-shadow: 0 0 0 0 rgba(255,179,64,0); } }
.pmf-side-body { padding: 14px; display: flex; flex-direction: column; gap: 6px; }

/* prva, istaknuta vijest */
.pmf-side-top { position: relative; display: block; border-radius: 12px; overflow: hidden; aspect-ratio: 16/10;
  background: linear-gradient(135deg, #1d5f93, #123a5e); margin-bottom: 6px; text-decoration: none !important; }
.pmf-side-top img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.pmf-side-top::after { content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(10,25,45,0) 25%, rgba(10,25,45,.88) 100%); }
.pmf-side-top:hover img { transform: scale(1.06); }
.pmf-side-top-txt { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; padding: 14px 16px; color: #fff; }
.pmf-side-top-txt b { display: block; font-size: 16px; line-height: 1.35; font-weight: 700; color: #fff;
  text-shadow: 0 1px 6px rgba(0,0,0,.35); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.pmf-side-top-txt time { display: block; margin-top: 6px; font-size: 12px; color: rgba(255,255,255,.8); }
.pmf-side-chip { display: inline-block; margin-bottom: 8px; padding: 3px 10px; border-radius: 999px; background: #ffb340;
  color: #1a2b3c; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.pmf-side-top.bez-slike { aspect-ratio: auto; min-height: 150px; }

/* ostale vijesti */
.pmf-side-item { display: flex; gap: 14px; align-items: center; padding: 10px; border-radius: 12px;
  text-decoration: none !important; transition: background .25s, transform .25s; }
.pmf-side-item:hover { background: #f1f6fb; transform: translateX(4px); }
.pmf-side-thumb { position: relative; width: 84px; height: 66px; flex-shrink: 0; border-radius: 10px; overflow: hidden;
  background: linear-gradient(135deg, #2f8fc8, #123a5e); }
.pmf-side-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.pmf-side-item:hover .pmf-side-thumb img { transform: scale(1.1); }
.pmf-side-date { position: absolute; left: 5px; top: 5px; background: rgba(255,255,255,.95); color: #123a5e; border-radius: 7px;
  padding: 2px 6px 3px; text-align: center; line-height: 1; font-size: 9.5px; font-weight: 700; text-transform: uppercase;
  box-shadow: 0 2px 6px rgba(0,0,0,.18); }
.pmf-side-date b { display: block; font-size: 15px; margin-bottom: 1px; }
.pmf-side-txt { min-width: 0; }
.pmf-side-txt b { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
  font-size: 14px; line-height: 1.4; font-weight: 600; color: #1a2b3c; transition: color .25s; }
.pmf-side-item:hover .pmf-side-txt b { color: #1d6fae; }
.pmf-side-txt time { display: block; margin-top: 4px; font-size: 12px; color: #7a8796; }

.pmf-side-all { display: flex; justify-content: center; align-items: center; gap: 8px; margin: 0 14px 14px; padding: 12px;
  border-radius: 10px; background: #f1f6fb; color: #1d5f93 !important; font-weight: 700; font-size: 14px;
  text-decoration: none !important; transition: background .25s, color .25s; }
.pmf-side-all span { transition: transform .25s; }
.pmf-side-all:hover { background: #1d5f93; color: #fff !important; }
.pmf-side-all:hover span { transform: translateX(4px); }
@media (max-width: 767px) { .pmf-side { position: static; margin-top: 30px; } }
@media (prefers-reduced-motion: reduce) { .pmf-side * { animation: none !important; transition: none !important; } }
