/* ============================================================
   JDW Archive Subnav Widget
   Sticky horizontal navigation bar with section anchors,
   active state tracking, and graceful overflow scroll.
   ============================================================ */

.jdw-subnav{
  --jdw-subnav-top:0px;
  background-color:#FCFAF5;
  border-top:1px solid rgba(168,136,76,.3);
  border-bottom:1px solid rgba(168,136,76,.3);
  position:relative;
  z-index:50;
}

.jdw-subnav.is-sticky{
  position:sticky;
  top:var(--jdw-subnav-top, 0px);
}

/* ---------- Scroll container ---------- */
.jdw-subnav-scroll{
  overflow-x:auto;
  overflow-y:hidden;
  padding:18px 40px;
  -webkit-overflow-scrolling:touch;
  scrollbar-width:thin;
  scrollbar-color:rgba(168,136,76,.5) transparent;
}
.jdw-subnav-scroll::-webkit-scrollbar{
  height:6px;
}
.jdw-subnav-scroll::-webkit-scrollbar-thumb{
  background-color:rgba(168,136,76,.5);
  border-radius:3px;
}
.jdw-subnav-scroll::-webkit-scrollbar-track{
  background-color:transparent;
}

/* ---------- List ---------- */
.jdw-subnav-list{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:50px;
  margin:0;
  padding:0;
  list-style:none;
  white-space:nowrap;
  width:max-content;
  min-width:100%;
}

.jdw-subnav-list li{
  margin:0;
  padding:0;
  list-style:none;
  flex:0 0 auto;
}

/* ---------- Link ---------- */
.jdw-subnav a{
  font-family:'Montserrat',sans-serif;
  font-size:11px;
  font-weight:500;
  letter-spacing:.22em;
  text-transform:uppercase;
  color:#6B6660;
  text-decoration:none;
  display:inline-block;
  position:relative;
  padding:4px 0;
  transition:color .25s ease;
}
.jdw-subnav a:hover,
.jdw-subnav a:focus-visible{
  color:#A8884C;
}
.jdw-subnav a.is-active{
  color:#A8884C;
}

/* ---------- Active indicator (animated underline) ---------- */
.jdw-subnav a::after{
  content:'';
  position:absolute;
  left:0;
  right:0;
  bottom:-6px;
  height:1px;
  background-color:#A8884C;
  transform:scaleX(0);
  transform-origin:center;
  transition:transform .35s cubic-bezier(.7,0,.2,1);
}
.jdw-subnav a:hover::after,
.jdw-subnav a:focus-visible::after,
.jdw-subnav a.is-active::after{
  transform:scaleX(1);
}
.jdw-subnav.no-indicator a::after{
  display:none;
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce){
  .jdw-subnav a,
  .jdw-subnav a::after{
    transition:none;
  }
}

/* ---------- Mobile ---------- */
@media (max-width:768px){
  .jdw-subnav-scroll{
    padding:14px 20px;
  }
  .jdw-subnav-list{
    gap:34px;
    justify-content:flex-start;
  }
  .jdw-subnav a{
    font-size:10px;
    letter-spacing:.2em;
  }
}

/* ---------- Focus ---------- */
.jdw-subnav a:focus-visible{
  outline:2px solid #A8884C;
  outline-offset:4px;
}
