/* Curio Mercurio – mobilni meni (otvara se sa leve strane) */

/* Iste mere na svim stranicama (blog ne koristi border-box kao ostatak sajta) */
.cm-mm-toggle,
.cm-mm-toggle *,
.cm-mm-drawer,
.cm-mm-drawer *,
.cm-mm-drawer *::before,
.cm-mm-drawer *::after { box-sizing: border-box; }

/* ---------- Hamburger u headeru ---------- */
.cm-mm-toggle { display: none; }
html.cm-mm-on .cm-mm-toggle { display: inline-flex; }

html body .cm-mm-toggle {
  -webkit-appearance: none;
  appearance: none;
  position: relative;
  order: -1;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  min-width: 44px;
  margin: 0 2px 0 -10px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  box-shadow: none;
  color: #332b28;
  font: inherit;
  line-height: 1;
  text-transform: none;
  letter-spacing: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background-color .2s ease;
}
html body .cm-mm-toggle:hover { background: rgba(148, 113, 86, .08); }
html body .cm-mm-toggle:focus { outline: none; }
html body .cm-mm-toggle:focus-visible { outline: 2px solid #947156; outline-offset: 1px; }

.cm-mm-bars { position: relative; display: block; width: 22px; height: 14px; }
.cm-mm-bars span {
  position: absolute;
  left: 0;
  display: block;
  width: 22px;
  height: 1.5px;
  border-radius: 1px;
  background: currentColor;
  transition: width .25s ease;
}
.cm-mm-bars span:nth-child(1) { top: 0; }
.cm-mm-bars span:nth-child(2) { top: 6.25px; width: 15px; }
.cm-mm-bars span:nth-child(3) { top: 12.5px; }
.cm-mm-toggle:hover .cm-mm-bars span:nth-child(2) { width: 22px; }

/* Logo ostaje uz hamburger, desni deo headera ostaje desno */
html.cm-mm-on .cm-mm-header > .cm-brand,
html.cm-mm-on .cm-mm-header > .cm-b-brand,
html.cm-mm-on .cm-mm-header > .cmn-site-brand { margin-right: auto; }

/* Do 780px logo zauzima tačno svoju širinu, pa "by Nataša Josifović" stoji centrirano ispod njega */
@media (max-width: 780px) {
  html.cm-mm-on body .cm-site .cm-nav .cm-brand {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    flex: 0 1 auto !important;
  }
}

/* Blog je sada u meniju – "Blog" dugme u headeru više nije potrebno na telefonu */
html.cm-mm-on body .cm-site .cm-nav .cm-nav-blog-mobile { display: none !important; }

/* Na blogu nova fioka zamenjuje stari padajući "Meni"; hamburger, logo i jezik staju u jedan red */
html.cm-mm-on .cm-b .cm-b-menu { display: none !important; }
html.cm-mm-on .cm-b .cm-b-nav { flex-wrap: nowrap; column-gap: 10px; }
html.cm-mm-on .cm-b .cm-b-brand { flex: 0 1 auto; min-width: 0; }
html.cm-mm-on .cm-b .cm-b-brand img { max-width: 100%; }

/* ---------- Zatamnjena pozadina ---------- */
.cm-mm-overlay {
  position: fixed;
  top: 0; right: 0; bottom: 0; left: 0;
  z-index: 100000;
  background: rgba(23, 25, 28, .5);
  opacity: 0;
  visibility: hidden;
  transition: opacity .35s ease, visibility 0s linear .35s;
  -webkit-tap-highlight-color: transparent;
}
html.cm-mm-open .cm-mm-overlay {
  opacity: 1;
  visibility: visible;
  transition: opacity .35s ease;
}

/* ---------- Fioka ---------- */
.cm-mm-drawer {
  position: fixed;
  top: 0; bottom: 0; left: 0;
  z-index: 100001;
  width: min(86vw, 360px);
  overflow: hidden;
  background: #fbfaf7;
  color: #332b28;
  box-shadow: 18px 0 50px rgba(23, 25, 28, .18);
  transform: translate3d(-102%, 0, 0);
  visibility: hidden;
  transition: transform .42s cubic-bezier(.22, .8, .24, 1), visibility 0s linear .42s;
  font-family: Arial, Helvetica, sans-serif;
  text-align: left;
}
html.cm-mm-open .cm-mm-drawer {
  transform: none;
  visibility: visible;
  transition: transform .42s cubic-bezier(.22, .8, .24, 1);
}

/* Diskretna orbita u uglu */
.cm-mm-drawer::before,
.cm-mm-drawer::after {
  content: "";
  position: absolute;
  pointer-events: none;
}
.cm-mm-drawer::before {
  right: -150px;
  bottom: -90px;
  width: 300px;
  height: 300px;
  border: 1px solid rgba(157, 118, 91, .2);
  border-radius: 50%;
}
.cm-mm-drawer::after {
  right: 102px;
  bottom: 162px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #c9a587;
}

.cm-mm-scroll {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
  box-sizing: border-box;
  padding: max(12px, env(safe-area-inset-top)) 26px max(26px, env(safe-area-inset-bottom)) max(26px, env(safe-area-inset-left));
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.cm-mm-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 64px;
  padding-bottom: 14px;
  border-bottom: 1px solid #e7dfd4;
}
html body .cm-mm-drawer .cm-mm-logo { display: block; line-height: 0; text-decoration: none; border: 0; }
html body .cm-mm-drawer .cm-mm-logo img {
  display: block;
  width: 138px;
  max-width: 100%;
  height: auto;
  margin: 0;
}

html body .cm-mm-drawer .cm-mm-close {
  -webkit-appearance: none;
  appearance: none;
  position: relative;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  margin: 0 -10px 0 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  box-shadow: none;
  color: #332b28;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
html body .cm-mm-drawer .cm-mm-close:hover { background: rgba(148, 113, 86, .08); }
html body .cm-mm-drawer .cm-mm-close:focus { outline: none; }
html body .cm-mm-drawer .cm-mm-close:focus-visible { outline: 2px solid #947156; outline-offset: 1px; }
.cm-mm-close span,
.cm-mm-close span::before {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 1.5px;
  margin: -.75px 0 0 -10px;
  background: currentColor;
  border-radius: 1px;
  transform: rotate(45deg);
}
.cm-mm-close span::before { content: ""; top: 0; left: 0; margin: 0; transform: rotate(-90deg); }

html body .cm-mm-drawer .cm-mm-kicker {
  margin: 30px 0 10px;
  padding: 0;
  font: 600 11px/1.3 Arial, Helvetica, sans-serif;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: #9d765b;
}

.cm-mm-nav { display: flex; flex-direction: column; margin: 0; padding: 0; }
html body .cm-mm-drawer .cm-mm-nav a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 54px;
  margin: 0;
  padding: 6px 0;
  border: 0;
  border-bottom: 1px solid #eee6db;
  background: none;
  font: 400 24px/1.2 Georgia, "Times New Roman", serif;
  letter-spacing: -.01em;
  text-transform: none;
  text-decoration: none;
  color: #332b28;
  -webkit-tap-highlight-color: transparent;
}
html body .cm-mm-drawer .cm-mm-nav a::after {
  content: "\2192";
  font: 400 15px/1 Arial, Helvetica, sans-serif;
  color: #b9a390;
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity .2s ease, transform .2s ease;
}
html body .cm-mm-drawer .cm-mm-nav a:hover,
html body .cm-mm-drawer .cm-mm-nav a:focus-visible { color: #9d765b; outline: none; }
html body .cm-mm-drawer .cm-mm-nav a:hover::after,
html body .cm-mm-drawer .cm-mm-nav a:focus-visible::after { opacity: 1; transform: none; }
html body .cm-mm-drawer .cm-mm-nav a[aria-current="page"] { font-style: italic; color: #9d765b; }

/* Linkovi ulaze jedan za drugim */
.cm-mm-nav a {
  opacity: 0;
  transform: translateX(-12px);
  transition: opacity .35s ease, transform .35s ease, color .2s ease;
}
html.cm-mm-open .cm-mm-nav a { opacity: 1; transform: none; }
html.cm-mm-open .cm-mm-nav a:nth-child(1) { transition-delay: .10s, .10s, 0s; }
html.cm-mm-open .cm-mm-nav a:nth-child(2) { transition-delay: .14s, .14s, 0s; }
html.cm-mm-open .cm-mm-nav a:nth-child(3) { transition-delay: .18s, .18s, 0s; }
html.cm-mm-open .cm-mm-nav a:nth-child(4) { transition-delay: .22s, .22s, 0s; }
html.cm-mm-open .cm-mm-nav a:nth-child(5) { transition-delay: .26s, .26s, 0s; }
html.cm-mm-open .cm-mm-nav a:nth-child(6) { transition-delay: .30s, .30s, 0s; }
html.cm-mm-open .cm-mm-nav a:nth-child(7) { transition-delay: .34s, .34s, 0s; }

html body .cm-mm-drawer .cm-mm-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  margin: 28px 0 0;
  padding: 0 22px;
  border: 0;
  border-radius: 35px;
  background: #947156;
  color: #fff;
  font: 500 14px/1.2 Arial, Helvetica, sans-serif;
  letter-spacing: .03em;
  text-align: center;
  text-decoration: none;
  transition: background-color .2s ease;
}
html body .cm-mm-drawer .cm-mm-cta:hover { background: #7f5f47; color: #fff; }
html body .cm-mm-drawer .cm-mm-cta:focus-visible { outline: 2px solid #332b28; outline-offset: 2px; }

.cm-mm-foot {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  margin-top: auto;
  padding-top: 36px;
}
.cm-mm-symbol {
  font: 400 24px/1 Georgia, "Times New Roman", serif;
  color: #9d765b;
}
html body .cm-mm-drawer .cm-mm-tagline {
  margin: 0;
  padding: 0;
  font: italic 15px/1.45 Georgia, "Times New Roman", serif;
  color: #766251;
}
html body .cm-mm-drawer .cm-mm-insta {
  display: inline-block;
  margin-top: 4px;
  padding: 6px 0 3px;
  border: 0;
  border-bottom: 1px solid #b9a390;
  font: 600 11px/1.2 Arial, Helvetica, sans-serif;
  letter-spacing: .16em;
  text-transform: uppercase;
  text-decoration: none;
  color: #493b31;
}
html body .cm-mm-drawer .cm-mm-insta:hover { color: #9d765b; border-color: #9d765b; }

/* Stranica ispod se ne skroluje dok je meni otvoren */
html.cm-mm-lock,
html.cm-mm-lock body { overflow: hidden !important; }

/* Niži telefoni (npr. iPhone SE): malo zbijenije, da sve stane bez skrolovanja */
@media (max-height: 700px) {
  html body .cm-mm-drawer .cm-mm-kicker { margin-top: 20px; }
  html body .cm-mm-drawer .cm-mm-nav a { min-height: 46px; font-size: 21px; }
  html body .cm-mm-drawer .cm-mm-cta { margin-top: 20px; min-height: 48px; }
  .cm-mm-foot { padding-top: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  .cm-mm-overlay,
  .cm-mm-drawer,
  .cm-mm-nav a { transition: none !important; }
}
