/* =====================================================================
   Grad Benkovac – blagi redizajn naslovnice (11/2026)
   Učitava se samo na index.html. Mijenja izgled: naslova sekcija,
   aktualnih obavijesti, kartica novosti i bočnog stupca (obavijesti, izdvojeno).
   HTML koji generira elements.js ostaje isti.
   ===================================================================== */

:root {
  --hm-navy: #1F406D;
  --hm-sky: #009be9;
  --hm-red: #c70606;
  --hm-text: #24344d;
  --hm-muted: #66768c;
  --hm-line: #e7ecf3;
  --hm-bg-soft: #f6f8fb;
  --hm-radius: 14px;
  --hm-shadow: 0 1px 2px rgba(20, 41, 69, .05), 0 6px 18px rgba(20, 41, 69, .06);
  --hm-shadow-hover: 0 4px 10px rgba(20, 41, 69, .08), 0 16px 36px rgba(20, 41, 69, .12);
}

/* ---------- Generirani tekst: poništi "jedan red s tri točke" ----------
   elements.js dijeli naslove u <span>-ove, a zadnji je prisilno u jednom redu.
   Ovdje tekst normalno teče, a duljinu režemo na 2–3 reda (line-clamp). */
actual-notices-list .post-title a span,
index-news-list .index-news-title a span,
index-news-list .index-news-content span,
index-notices-list .post-title a span {
  display: inline !important;
  width: auto !important;
  overflow: visible !important;
  white-space: normal !important;
  text-overflow: clip !important;
}

/* ---------- Font naslova: isti sans kao tekst stranice (umjesto serifnog) ---------- */
.widget-title.title-dots,
.widget-title.title-dots span,
.sidebar .widget-title.line-bottom,
actual-notices-list .post-title,
actual-notices-list .post-title a,
index-news-list h5.index-news-title,
index-news-list h5.index-news-title a,
index-notices-list .post-title,
index-notices-list .post-title a {
  font-family: Raleway, "Helvetica Neue", Arial, sans-serif !important;
  letter-spacing: 0 !important;
}

/* ---------- Naslovi sekcija ---------- */
.widget-title.title-dots {
  margin-bottom: 18px;
  padding-bottom: 0;
  background: none !important;
  border-bottom: 1px solid var(--hm-line);
}
.widget-title.title-dots span {
  display: inline-block;
  margin-bottom: -1px;
  padding: 0 0 10px;
  background: transparent !important;
  border-bottom: 3px solid var(--hm-sky);
  color: var(--hm-navy) !important;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: .2px;
  text-transform: none;
}
.widget-title.title-dots.small span {
  font-size: 17px;
}
.sidebar .widget-title.line-bottom {
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--hm-line);
  color: var(--hm-navy);
  font-size: 17px;
  font-weight: 700;
}
.sidebar .widget-title.line-bottom::after {
  bottom: -2px;
  width: 44px;
  height: 3px;
  background: var(--hm-sky);
}

/* ---------- Aktualne obavijesti ---------- */
actual-notices-list .container.pb-40 {
  padding-top: 10px;
  padding-bottom: 24px !important;
}
actual-notices-list .widget-title.title-dots span {
  /* hitne obavijesti zadržavaju crvenu kao znak upozorenja */
  border-bottom-color: var(--hm-red);
}
actual-notices-list .widget-title.title-dots span::before {
  content: "";
  display: inline-block;
  width: 9px;
  height: 9px;
  margin: 0 10px 2px 2px;
  border-radius: 50%;
  background: var(--hm-red);
  box-shadow: 0 0 0 0 rgba(199, 6, 6, .45);
  animation: hmPulse 2s infinite;
}
@keyframes hmPulse {
  0%   { box-shadow: 0 0 0 0 rgba(199, 6, 6, .45); }
  70%  { box-shadow: 0 0 0 8px rgba(199, 6, 6, 0); }
  100% { box-shadow: 0 0 0 0 rgba(199, 6, 6, 0); }
}

actual-notices-list .owl-stage-outer {
  padding: 4px 2px 10px;
}
actual-notices-list .owl-stage {
  display: flex;          /* sve kartice u redu iste visine */
}
actual-notices-list article.post.media-post {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  height: 100%;
  margin: 0 !important;
  padding: 16px 18px !important;
  border: 1px solid var(--hm-line);
  border-left: 4px solid var(--hm-red);
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--hm-shadow);
  transition: box-shadow .2s ease, transform .2s ease;
}
actual-notices-list article.post.media-post:hover {
  transform: translateY(-2px);
  box-shadow: var(--hm-shadow-hover);
}
actual-notices-list .owl-item {
  display: flex;
}
actual-notices-list .owl-item > article.post.media-post {
  flex: 1 1 auto;
  width: 100%;
}
actual-notices-list .post-thumb {
  flex: 0 0 auto;
  float: none !important;
  margin: 0 !important;
}
actual-notices-list .post-thumb img {
  width: 34px !important;
  max-width: 34px !important;
  padding-top: 2px !important;
}
actual-notices-list .post-right {
  flex: 1 1 auto;
  min-width: 0;
  padding: 0 !important;
  overflow: visible !important;
}
actual-notices-list .post-title {
  margin: 0 0 6px !important;
  line-height: 1.4;
}
actual-notices-list .post-title a {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  color: var(--hm-text);
  font-size: 15px !important;
  font-weight: 600;
  letter-spacing: 0;
}
actual-notices-list .post-title a:hover {
  color: var(--hm-red);
}
actual-notices-list .post-date {
  color: var(--hm-muted);
  font-size: 12.5px !important;
}
actual-notices-list .post-date::before,
index-notices-list .post-date::before {
  content: "\f073";            /* FontAwesome kalendar */
  margin-right: 6px;
  font-family: FontAwesome;
  opacity: .7;
}
/* strelice karusela */
actual-notices-list .owl-carousel {
  position: relative;
}
actual-notices-list .owl-nav-top .owl-nav,
actual-notices-list .owl-carousel .owl-nav {
  position: absolute !important;
  top: -62px !important;
  right: 0 !important;
  left: auto !important;
  bottom: auto !important;
  width: auto !important;
  margin: 0 !important;
  transform: none !important;
  display: flex !important;
  gap: 6px;
}
actual-notices-list .owl-carousel .owl-nav button.owl-prev,
actual-notices-list .owl-carousel .owl-nav button.owl-next {
  position: static !important;
  transform: none !important;
  left: auto !important;
  right: auto !important;
  margin: 0 !important;
  opacity: 1 !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
}
actual-notices-list .owl-nav.disabled {
  display: none !important;
}
actual-notices-list .owl-nav button.owl-prev,
actual-notices-list .owl-nav button.owl-next {
  width: 34px;
  height: 34px;
  margin-left: 6px;
  border: 1px solid var(--hm-line) !important;
  border-radius: 50% !important;
  background: #fff !important;
  color: var(--hm-navy) !important;
  font-size: 12px !important;
  line-height: 32px !important;
  transition: background-color .2s ease, color .2s ease;
}
actual-notices-list .owl-nav button.owl-prev:hover,
actual-notices-list .owl-nav button.owl-next:hover {
  background: var(--hm-navy) !important;
  color: #fff !important;
}

/* ---------- Banneri (eBenkovac + kvaliteta zraka) ---------- */
.div2 {
  margin-bottom: 10px;
}
.div2 a img,
.div2 iframe {
  border-radius: var(--hm-radius);
}
.div2 iframe {
  background: #fff;
}

/* ---------- Novosti (kartice) ---------- */
index-news-list .index-news-container {
  display: flex;
  margin-bottom: 26px;
}
index-news-list article.index-news-article {
  display: flex;
  flex-direction: column;
  width: 100%;
  margin: 0 !important;
  border: 1px solid var(--hm-line);
  border-radius: var(--hm-radius);
  background: #fff;
  box-shadow: var(--hm-shadow);
  overflow: hidden;
  transition: box-shadow .25s ease, transform .25s ease;
}
index-news-list article.index-news-article:hover {
  transform: translateY(-3px);
  box-shadow: var(--hm-shadow-hover);
}
index-news-list .entry-header .post-thumb {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--hm-bg-soft);
}
index-news-list img.index-news-img {
  width: 100% !important;
  height: 100% !important;
  max-height: none !important;
  object-fit: cover;
  transition: transform .5s ease;
}
index-news-list article.index-news-article:hover img.index-news-img {
  transform: scale(1.04);
}
index-news-list .index-news-entry-content {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  height: auto !important;
  padding: 16px 18px 18px !important;
  border: 0 !important;
}
index-news-list h5.index-news-title {
  order: 2;
  margin: 0 0 8px !important;
  height: auto !important;
  line-height: 1.35;
}
index-news-list h5.index-news-title a {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  color: var(--hm-navy);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .1px;
}
index-news-list article:hover h5.index-news-title a {
  color: var(--hm-sky);
}
/* datum iznad naslova, kao mala oznaka */
index-news-list .index-news-entry-content > ul.list-inline {
  order: 1;
  margin: 0 0 10px !important;
}
index-news-list .index-news-entry-content > ul.list-inline li {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(0, 155, 233, .08);
  color: var(--hm-navy);
  font-size: 12px;
  font-weight: 600;
}
index-news-list .index-news-entry-content > ul.list-inline li i {
  color: var(--hm-sky) !important;
}
index-news-list p.index-news-content {
  order: 3;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  height: auto !important;
  margin: 0 0 14px;
  overflow: hidden;
  color: var(--hm-muted);
  font-size: 14px;
  line-height: 1.55;
}
index-news-list a.index-news-see-more {
  order: 4;
  float: none !important;
  align-self: flex-start;
  margin-top: auto;
  color: var(--hm-sky) !important;
  font-size: 13.5px !important;
  font-weight: 600;
}
index-news-list a.index-news-see-more i {
  display: none;
}
index-news-list a.index-news-see-more::after {
  content: "\2192";
  display: inline-block;
  margin-left: 6px;
  transition: transform .2s ease;
}
index-news-list article:hover a.index-news-see-more::after {
  transform: translateX(4px);
}

/* ---------- Bočni stupac: obavijesti ---------- */
.sidebar .latest-posts {
  border: 1px solid var(--hm-line);
  border-radius: var(--hm-radius);
  background: #fff;
  box-shadow: var(--hm-shadow);
  overflow: hidden;
}
index-notices-list article.post.media-post {
  margin: 0 !important;
  padding: 0 !important;
}
index-notices-list .post-right {
  padding: 12px 16px !important;
  border-bottom: 1px solid var(--hm-line);
  transition: background-color .15s ease;
}
index-notices-list article:last-child .post-right {
  border-bottom: 0;
}
index-notices-list article:hover .post-right {
  background: var(--hm-bg-soft);
}
index-notices-list .separator {
  display: none;
}
index-notices-list .post-title {
  margin: 0 0 4px !important;
  line-height: 1.4;
}
index-notices-list .post-title a {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  color: var(--hm-text);
  font-size: 14px;
  font-weight: 600;
}
index-notices-list article:hover .post-title a {
  color: var(--hm-sky);
}
index-notices-list .post-date {
  color: var(--hm-muted);
  font-size: 12px !important;
}

/* ---------- Bočni stupac: izdvojeno ---------- */
.sidebar .widget .list.list-border li {
  padding: 0;
  border-bottom: 1px solid var(--hm-line) !important;
}
.sidebar .widget .list.list-border li:last-child {
  border-bottom: 0 !important;
}
.sidebar .widget .list.list-border li a {
  display: block;
  position: relative;
  padding: 10px 22px 10px 2px;
  color: var(--hm-text);
  font-size: 14px;
  font-weight: 500;
  transition: color .15s ease, padding-left .15s ease;
}
.sidebar .widget .list.list-border li a::after {
  content: "\f105";              /* FontAwesome angle-right */
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  font-family: FontAwesome;
  color: var(--hm-muted);
  opacity: .6;
}
.sidebar .widget .list.list-border li a:hover {
  padding-left: 6px;
  color: var(--hm-sky);
}
.sidebar a img {
  border-radius: 12px;
}

@media (prefers-reduced-motion: reduce) {
  actual-notices-list .widget-title.title-dots span::before { animation: none; }
  index-news-list article.index-news-article,
  index-news-list img.index-news-img,
  actual-notices-list article.post.media-post { transition: none; }
}

/* =====================================================================
   Ostatak naslovnice: slider, baneri, projekti, podnožje
   ===================================================================== */

/* ---------- Slider: mekani prijelaz u sadržaj ---------- */
#home .tp-bannertimer { height: 3px !important; background: var(--hm-sky) !important; opacity: .85; }
#home .tparrows.default, #home .tparrows { border-radius: 50% !important; }
#home .tp-bullets .tp-bullet { border-radius: 50%; }
#home { position: relative; }
#home::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 36px; pointer-events: none; z-index: 5;
  background: linear-gradient(to bottom, rgba(246,248,251,0), rgba(246,248,251,.9));
}

/* ---------- Pozadina sadržaja i razmaci ---------- */
.main-content > section:not(#home) { background: var(--hm-bg-soft); padding-bottom: 20px; }
.main-content .div2 { padding-top: 6px; }

/* ---------- Baneri (eBenkovac + kvaliteta zraka) ---------- */
.main-content .div2 .ratio { background: transparent; overflow: visible; }
.main-content .div2 .ratio > img {
  border-radius: var(--hm-radius);
  box-shadow: var(--hm-shadow);
  transition: box-shadow .25s ease, transform .25s ease;
}
.main-content .div2 a:hover .ratio > img { box-shadow: var(--hm-shadow-hover); transform: translateY(-2px); }
.main-content .div2 .ratio > iframe { border-radius: var(--hm-radius); box-shadow: var(--hm-shadow); background: #fff; }

/* ---------- Separator ---------- */
.main-content .separator { border: 0 !important; height: 1px; background: var(--hm-line) !important; margin: 26px 15px 34px !important; }

/* ---------- Projekti: kartice ---------- */
.main-content .container > .row > [class*="col-"] > .icon-box.index-project { margin: 0; }
.main-content .container > .row:has(.index-project) {
  display: flex; flex-wrap: wrap; margin-left: -10px; margin-right: -10px;
}
.main-content .container > .row:has(.index-project)::before,
.main-content .container > .row:has(.index-project)::after { display: none; }
.main-content .container > .row:has(.index-project) > [class*="col-"] {
  display: flex; padding: 10px; width: 25%;
}
.icon-box.index-project {
  width: 100%;
  position: relative;
  padding: 28px 22px 26px !important;
  min-height: 0 !important;
  display: flex !important;
  flex-direction: column;
  align-items: center;
  background: #fff !important;
  border: 1px solid var(--hm-line) !important;
  border-radius: var(--hm-radius);
  box-shadow: var(--hm-shadow);
  overflow: hidden;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.icon-box.index-project::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px;
  background: linear-gradient(90deg, var(--hm-navy), var(--hm-sky));
  transform: scaleX(0); transform-origin: left center; transition: transform .35s cubic-bezier(.4,0,.2,1);
}
.icon-box.index-project:hover { transform: translateY(-4px); box-shadow: var(--hm-shadow-hover); border-color: #d5e3f2 !important; }
.icon-box.index-project:hover::before { transform: scaleX(1); }
.icon-box.index-project .icon-sm { margin: 0 0 6px !important; display: flex; align-items: center; justify-content: center; height: 104px; }
.icon-box.index-project .icon-sm img { height: auto !important; max-height: 90px; max-width: 100%; width: auto; padding-bottom: 0 !important; object-fit: contain; }
.icon-box.index-project h4 {
  font-family: "Raleway", "Open Sans", Arial, sans-serif !important;
  font-size: 15px; line-height: 1.35; letter-spacing: .03em; font-weight: 700 !important;
  color: var(--hm-navy); margin: 8px 0 10px !important;
  transition: color .15s ease;
}
.icon-box.index-project:hover h4 { color: var(--hm-sky); }
.icon-box.index-project p {
  margin: 0 !important; font-size: 13.5px; line-height: 1.6; color: var(--hm-muted);
  display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden;
}
@media (max-width: 1199px) { .main-content .container > .row:has(.index-project) > [class*="col-"] { width: 50%; } }
@media (max-width: 575px)  { .main-content .container > .row:has(.index-project) > [class*="col-"] { width: 100%; } }

@media (prefers-reduced-motion: reduce) {
  .icon-box.index-project, .icon-box.index-project::before, .main-content .div2 .ratio > img { transition: none; }
}

/* Baner eBenkovac: visina prati sliku (bez praznog okvira), centriran uz widget kvalitete zraka */
.main-content .div2 .row.g-2 { display: flex; flex-wrap: wrap; align-items: center; }
.main-content .div2 .row.g-2::before, .main-content .div2 .row.g-2::after { display: none; }
.main-content .div2 .ratio-16x9 { padding-top: 26.6%; }
.main-content .div2 .ratio > img { object-fit: cover; }
@media (max-width: 1199px) { .main-content .div2 .ratio-16x9 { padding-top: 26.6%; } }
@media (max-width: 991px) {
  .main-content .div2 .row.g-2 > div { flex: 0 0 100%; width: 100%; max-width: 100%; padding-left: 0 !important; padding-right: 0 !important; }
  .main-content .div2 .row.g-2 > div + div { margin-top: 14px; }
}
