.timeline-bar-wrap {
    position: relative;
    height: 70px;
    margin-bottom: 25px;
    width: 100%;
}
.timeline-bar {
    position: absolute;
    left: 8%;
    right: 8%;
    top: 32px;
    height: 6px;
    background: #e3e3e3;
    border-radius: 8px;
}
.timeline-bar .timeline-dot {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 28px;
    height: 28px;
    background: #fff;
    border: 3px solid #bbb;
    border-radius: 50%;
    cursor: pointer;
    z-index: 2;
    transition: border .25s, background .25s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.timeline-bar .timeline-dot.active {
    background: #000;
    border-color: #000;
}
.timeline-bar .timeline-dot .dot-year {
    position: absolute;
    top: -35px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 14px;
    color: #555;
    font-weight: bold;
    white-space: nowrap;
    z-index: 5;
    background: #fff;
    padding: 0 2px;
}
.timeline-bar .timeline-dot.active .dot-year {
    color: #000;
}

.caption {
    padding:5px;
    background: #fff;
    border-radius: 10px;
    box-shadow:  none;
    margin-top: 5px;
    text-align: center;
}
#timeline-slider .item img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

.timeline-mobile-select-wrap {
    display: none;
}

.chevron-icon {
    transition: transform 0.3s ease;
    margin-right:3px;
}
.chevron-icon.rotated {
    transform: rotate(180deg);
}
.video-slide {
    position: relative;
}
.video-caption {
    position: absolute;
    left: 50%;
    bottom: 15px;
    transform: translateX(-50%);
    background: rgb(0 0 0 / 45%);
    color: #fff;
    font-size: 16px;
    padding: 5px;
    border-radius: 8px;
    max-width: 94%;
    text-align: center;
    z-index: 10;
    box-shadow: 0 2px 16px rgb(0 0 0 / 18%);
    letter-spacing: 0.01em;
    pointer-events: none;
    font-family: inherit;
    width: 94%;
}
.owl-dots {
    display: none !important;
}
#timeline-slider > .owl-nav > .owl-prev {top: 40%; left: 0;}
#timeline-slider > .owl-nav > .owl-next {top: 40%; right: 0;}

/* ===== MOBILNI PRIKAZ (max 767px) ===== */
@media (max-width: 767px) {
    .timeline-bar-wrap,
    .timeline-bar {
        display: none !important;
    }
    .timeline-mobile-bar {
        display: flex !important;
        justify-content: flex-start;
        align-items: center;
        position: relative;
       
        width: 95%;
       
        overflow-x: auto !important;
        overflow-y: visible !important; /* OVO JE KLJUČNO! */
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        background: transparent;
    }
    .timeline-mobile-bar::-webkit-scrollbar {
        display: none;
    }
    .timeline-mobile-bar-line {
        position: absolute;
        top: 50%;
        left: 6%;
        right: 6%;
        height: 5px;
        background: #e3e3e3;
        border-radius: 8px;
        z-index: 1;
        transform: translateY(-50%);
        pointer-events: none;
    }
    .timeline-mobile-bar-scroll {
        display: flex;
        flex-direction: row;
        align-items: center;
        width: 100%;
        overflow-x: auto !important;
        overflow-y: visible !important;
        scrollbar-width: none;
        position: relative;
		height: 100px
    }
    .timeline-mobile-bar-scroll::-webkit-scrollbar {
        display: none;
    }
    .timeline-mobile-bar .timeline-dot {
        position: relative !important;
        margin: 0 8px;
        width: 28px;
        height: 28px;
        min-width: 28px;
        min-height: 28px;
        background: #fff;
        border: 3px solid #bbb;
        border-radius: 50%;
        cursor: pointer;
        z-index: 2;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-direction: column;
        transition: border .25s, background .25s;
        box-sizing: border-box;
    }
    .timeline-mobile-bar .timeline-dot.active {
        background: #000;
        border-color: #000;
    }
    .timeline-mobile-bar .dot-year {
        position: absolute;
        top: -32px;
        left: 50%;
        transform: translateX(-50%);
        font-size: 14px;
        color: #555;
        font-weight: bold;
        white-space: nowrap;
        line-height: 1;
        pointer-events: none;
        z-index: 5;
        background: #fff;
        padding: 0 2px;
        border-radius: 3px;
        min-width: 28px;
        text-align: center;
    }
    .timeline-mobile-bar .timeline-dot.active .dot-year {
        color: #000;
        background: #fff;
    }
}

   @media (max-width: 768px) {
        #gallery-single-section .isotope-item {
            width: 48%;
            margin: 1%;
            display: inline-block;
            vertical-align: top;
            position: static;
        }
    }
	
	#knjiga-sjecanja-box {

  border-radius: 14px;
  padding: 28px 22px 16px 22px;
  box-shadow: 0 2px 12px #0002;
  margin: 0 auto;
  max-height:500px;
  overflow-y:auto
}
#knjiga-sjecanja-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 25px;
}
#sjecanje-ime, #sjecanje-text {
  width: 100%;
  border-radius: 8px;
  border: 1px solid #ddd;
  padding: 11px;
  font-size: 16px;
  resize: none;
}
#sjecanje-text {
  min-height: 60px;
  max-height: 160px;
}
#knjiga-sjecanja-form button {
  align-self: flex-end;
  background: #000;
  color: #fff;
  border: none;
  border-radius: 7px;
  padding: 9px 25px;
  font-size: 16px;
  cursor: pointer;
  transition: background .2s;
}
#knjiga-sjecanja-form button:hover {
  background: #003a70;
}
#zapisi-lista {
  margin-top: 10px;
}
.zapis {
  background: #fff;
  border-left: 5px solid #000;
  margin-bottom: 16px;
  padding: 13px 17px 7px 17px;
  border-radius: 8px;
  font-size: 15px;
  box-shadow: 0 1px 5px #0001;
}
.zapis-naslov {
  font-weight: bold;
  margin-bottom: 4px;
}
.zapis-ime {
  font-style: italic;
  font-size: 14px;
  color: #444;
  margin-bottom: 3px;
}
.zapis-datum {
  font-size: 11px;
  color: #888;
  margin-top: 2px;
  text-align: right;
}
.icon-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 7px 2px 7px;
  font-size: 17px;
  margin-left: 3px;
  color: #0056b3;
  vertical-align: middle;
  transition: color .15s;
}
.icon-btn:hover { color: #d22; }

.modal-custom {
  position: fixed; z-index: 1001; left: 0; top: 0; width: 100vw; height: 100vh;
  background: rgba(0,0,0,0.38); display: flex; align-items: center; justify-content: center;
}
.modal-content-custom {
  background: #fff; padding: 28px 28px 18px 28px; border-radius: 11px; min-width:320px; max-width:380px; position:relative;
  box-shadow: 0 8px 40px #0003;
}
.close-modal {
  position:absolute; top:10px; right:14px; font-size:20px; cursor:pointer; color:#555;
}

 .person-card {
      background: #fffbea;
      border: 2px solid #b5ad80;
      border-radius: 10px;
      box-shadow: 0 2px 10px #0001;
      min-width: 146px;
      padding: 8px 12px;
      text-align: center;
      font-size: 15px;
      position: relative;
      z-index: 3;
      transition: box-shadow .2s, font-size .2s, min-width .2s, padding .2s;
    }
    .person-card.pair {
      display: flex; flex-direction: row; justify-content: center; gap: 18px;
      min-width: 290px; padding: 8px 16px;
    }
    .person-inner { display: flex; flex-direction: column; align-items: center; }
    .name { font-weight: bold; }
    .years { font-size: 13px; color: #867f57;}
    .maiden { font-size:12px; color: #867f57; font-style: italic; }
    .svg-lines { position: absolute; left: 0; top: 0; width: 100%; height: 100%; pointer-events: none; z-index:2; }

    @media (max-width:700px) {
      .family-tree-wrap { max-width: 99vw; }
      .family-level { gap: 6px; margin-bottom: 34px; }
      .person-card { min-width: 88px; font-size: 12px; padding: 5px 4px; }
      .person-card.pair { min-width: 144px; gap: 7px; padding: 5px 6px;}
      .name { font-size: 13px;}
      .years, .maiden { font-size: 10px;}
    }
	
    .family-tree-wrap { width: 100%; max-width: 900px; margin:0px auto 0 auto; position: relative; }
    .family-level {
      display: flex;
      justify-content: center;
      align-items: flex-start;
      gap: 18px;
      margin-bottom: 60px;
      position: relative;
    }}