/* #region DIGITALNI SADRŽAJ ---------------------------------- */
.digi-heading {
  margin: 1rem 0;
}

.digi-layout {
  --accent: #c0392b;
  --text: #111111;
  --muted: #555555;
  --sidebar-width: 320px;
  --rail-offset: 20px;
  --bg: #f9f7f4;
  --transition-speed: 0.22s;

  display: flex;
  height: 80vh;
  overflow: hidden;
  /* fixed width for consistent layout */
  width: 100%;
  max-width: 1600px;
  padding: 0 20px;
  margin: auto;
}

/* ─── SIDEBAR ─── */
.sidebar {
  color: var(--text);
  width: var(--sidebar-width);
  min-width: var(--sidebar-width);
  background: var(--bg);
  padding: 48px 10px 48px 32px;
  display: flex;
  flex-direction: column;
  gap: 0;
  border-right: 1px solid #e0dcd7;
  overflow-y: auto;
  position: relative;
  z-index: 10;
}

/* ─── MOBILE DRAWER (sidebar slides in from the left) ─── */
.sidebar-toggle,
.sidebar-backdrop {
  display: none;
}

@media (max-width: 1000px) {
  .digi-layout {
    position: relative;
    flex-direction: column;
    height: 80dvh;
    padding: 0;
  }

  /* bar above the tour: opens the menu, shows the current tour */
  .sidebar-toggle {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.75rem 1rem;
    border: none;
    border-bottom: 1px solid #e0dcd7;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-family-menu-buttons);
    font-weight: 700;
    letter-spacing: 0.06em;
    text-align: left;
    cursor: pointer;
  }

  .sidebar-toggle:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: -2px;
  }

  /* visibility (not display) keeps the spine measurements working */
  .sidebar {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: min(var(--sidebar-width), 85vw);
    min-width: 0;
    padding: 32px 10px 32px 24px;
    z-index: 30;
    transform: translateX(-100%);
    visibility: hidden;
    transition: transform 0.3s ease, visibility 0s linear 0.3s;
  }

  .digi-layout.sidebar-open .sidebar {
    transform: translateX(0);
    visibility: visible;
    transition: transform 0.3s ease;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.25);
  }

  /* sits above the iframe so a tap outside the menu closes it */
  .sidebar-backdrop {
    display: block;
    position: absolute;
    inset: 0;
    z-index: 25;
    background: rgba(0, 0, 0, 0.4);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
  }

  .digi-layout.sidebar-open .sidebar-backdrop {
    opacity: 1;
    pointer-events: auto;
  }
}

/* ─── NAV SECTION ─── */
.nav-section {
  margin-bottom: 8px;
  position: relative;
}

/* ─── SECTION HEADING (clickable) ─── */
.nav-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  padding: 14px 0;
  user-select: none;
}

.nav-heading-text {
  font-family: var(--font-family-menu-buttons);
  font-size: var(--font-size-base-desktop);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text);
  transition: color var(--transition-speed) ease;
}

.nav-heading:hover .nav-heading-text {
  color: var(--accent);
}

.nav-heading.active .nav-heading-text {
  color: var(--text);
  /* heading stays dark when open */
}

/* vertical bar — shown when section is CLOSED */
.nav-bar {
  width: 2px;
  height: 18px;
  background: var(--text);
  margin-right: var(--rail-offset);
  flex-shrink: 0;
  transition: opacity var(--transition-speed) ease,
  transform var(--transition-speed) ease;
  transform-origin: top center;
}

.nav-heading.active .nav-bar {
  opacity: 0;
  transform: scaleY(0);
}

/* ─── ANIMATED SPINE LINE ─── */
.spine {
  position: absolute;
  right: var(--rail-offset);
  top: 0;
  width: 2px;
  background: var(--accent);
  height: 0;
  transform-origin: top center;
  transition: none;
}

/* ─── ITEMS CONTAINER ─── */
.nav-items {
  overflow: hidden;
  max-height: 0;
  /* no transition here — JS handles staggered animation */
}

.nav-items.open {
  max-height: 500px;
  /* large enough */
}

/* ─── INDIVIDUAL ITEM ─── */
.nav-item {
  display: block;
  font-family: var(--font-family-menu-items);
  font-size: var(--font-size-base-desktop);
  font-weight: 400;
  letter-spacing: 0.06em;
  color: var(--muted);
  padding: 8px 0;
  cursor: pointer;
  text-decoration: none;
  transition: color var(--transition-speed) ease;
}

.nav-item:hover {
  color: var(--accent);
  /* hover: color only, no bold */
}

.nav-item.active {
  color: var(--accent);
  font-weight: 700;
  /* active: color + bold */
}

.nav-item.visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.18s ease,
  transform 0.18s ease,
  color var(--transition-speed) ease;
}

.nav-item:hover.visible {
  font-weight: bolder;
}

/* ─── DIVIDER BETWEEN SECTIONS ─── */
.nav-divider {
  height: 1px;
  background: #e0dcd7;
  margin: 4px 20px 4px 0;
}

/* ─── CONTENT AREA ─── */
.content {
  flex: 1;
  position: relative;
  overflow: hidden;
}

.content-panel {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: translateX(12px);
  transition: opacity 0.32s ease,
  transform 0.32s ease;
  pointer-events: none;
}

.content-panel.active {
  opacity: 1;
  transform: translateX(0);
  pointer-events: all;
}

.content-panel iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

/* placeholder panels for Kaталози and Публикације */
.placeholder-panel {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: #f0ece6;
}

.placeholder-panel h2 {
  font-family: "Cormorant Garamond", serif;
  font-size: var(--font-size-text-lg);
  font-weight: 300;
  letter-spacing: 0.1em;
  color: var(--text);
}

.placeholder-panel p {
  font-size: var(--font-size-text-sm);
  color: var(--muted);
  letter-spacing: 0.08em;
}
/* #endregion */
