/* ============================================================
   Desktop fan-out menu (≥992px)
   Full-width panel under the fixed bar for main-menu entries
   whose children are categories (partials/fan-menu.html).
   Category columns fan in left to right; a feature card
   promotes the current month's specials.
   Mobile (≤991px) uses the drawer in mobile-header.css.
   ============================================================ */

@media (min-width: 992px) {

  .wsmenu > .wsmenu-list > li.fan-host {
    position: static;
  }

  /* ---------- Panel ---------- */
  .fan {
    position: absolute;
    top: calc(100% + 6px);
    left: 50%;
    width: 100vw;
    z-index: 1000;
    text-align: left;
    background: #151515;
    border-top: 1px solid rgba(194, 155, 102, 0.35);
    box-shadow: 0 28px 48px rgba(0, 0, 0, 0.35);
    opacity: 0;
    visibility: hidden;
    transform: translate(-50%, -8px);
    /* Closing waits a beat so a diagonal mouse path into the panel doesn't drop it */
    transition: opacity 0.2s ease 0.12s, transform 0.2s ease 0.12s, visibility 0s linear 0.32s;
  }

  /* Invisible bridge across the gap between the bar link and the panel */
  .fan::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 100%;
    height: 14px;
  }

  .fan-host:hover > .fan,
  .fan-host:focus-within > .fan {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
    transition: opacity 0.25s ease, transform 0.3s ease, visibility 0s;
  }

  .wsmenu > .wsmenu-list > li.fan-host > a .wsarrow:after {
    transition: transform 0.25s ease;
  }

  .wsmenu > .wsmenu-list > li.fan-host:hover > a .wsarrow:after,
  .wsmenu > .wsmenu-list > li.fan-host:focus-within > a .wsarrow:after {
    transform: rotate(180deg);
  }

  .fan-inner {
    max-width: 1140px;
    margin: 0 auto;
    padding: 38px 15px 34px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr)) 250px;
    grid-template-rows: auto 1fr;
    column-gap: 32px;
  }

  /* Each category spans the two shared rows (title, links) so the
     link lists line up across columns even when a title wraps */
  .fan-col {
    display: grid;
    grid-row: 1 / -1;
    grid-template-rows: subgrid;
    align-content: start;
  }

  /* ---------- Fan-in: columns cascade left to right ---------- */
  .fan-col {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.2s ease, transform 0.2s ease;
  }

  .fan-host:hover .fan-col,
  .fan-host:focus-within .fan-col {
    opacity: 1;
    transform: none;
    transition: opacity 0.4s ease, transform 0.5s cubic-bezier(0.2, 0.7, 0.2, 1);
    transition-delay: calc(80ms + var(--i, 0) * 60ms);
  }

  /* ---------- Category column ---------- */
  .fan-title {
    margin: 0 0 16px;
    padding-bottom: 16px;
    color: #F1ECE2;
    font-family: 'Vollkorn', serif;
    font-size: 20px;
    font-weight: 400;
    line-height: 1.2;
    position: relative;
  }

  .fan-title::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 28px;
    height: 1px;
    background: #C29B66;
  }

  .fan-links {
    align-self: start;
    list-style: none;
    margin: 0;
    padding: 0;
  }

  .fan-links li {
    margin: 0;
    padding: 0;
  }

  .fan-links a {
    display: inline-flex;
    align-items: center;
    padding: 7px 0;
    color: #CFC8BB;
    font-family: 'Jost', sans-serif;
    font-size: 12.5px;
    font-weight: 500;
    letter-spacing: 0.14em;
    line-height: 1.4;
    text-transform: uppercase;
    text-decoration: none;
    transition: color 0.2s ease, transform 0.2s ease;
  }

  .fan-links a:hover,
  .fan-links a:focus-visible,
  .fan-links a.is-current {
    color: #C29B66;
    text-decoration: none;
  }

  .fan-links a:hover,
  .fan-links a:focus-visible {
    transform: translateX(4px);
  }

  /* ---------- Feature card ---------- */
  .fan-feature {
    display: block;
    border-left: 1px solid rgba(255, 255, 255, 0.07);
    padding-left: 30px;
  }

  .fan-card {
    display: block;
    color: inherit;
    text-decoration: none;
  }

  .fan-card:hover,
  .fan-card:focus {
    text-decoration: none;
  }

  .fan-card img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 56 / 34;
    object-fit: cover;
    margin-bottom: 16px;
    transition: opacity 0.3s ease;
  }

  a.fan-card:hover img {
    opacity: 0.85;
  }

  .fan-card-k,
  .fan-card-t,
  .fan-card-x,
  .fan-card-cta {
    display: block;
  }

  .fan-card-k {
    margin-bottom: 4px;
    color: #C29B66;
    font-family: 'Jost', sans-serif;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
  }

  .fan-card-t {
    margin-bottom: 6px;
    color: #F1ECE2;
    font-family: 'Vollkorn', serif;
    font-size: 21px;
    line-height: 1.2;
  }

  .fan-card-x {
    margin-bottom: 12px;
    color: #8F8574;
    font-family: 'Jost', sans-serif;
    font-size: 13px;
    line-height: 1.5;
  }

  .fan-card-cta {
    color: #C29B66;
    font-family: 'Jost', sans-serif;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    text-decoration: none;
  }

  a.fan-card:hover .fan-card-cta,
  a.fan-card-cta:hover {
    color: #D5B285;
    text-decoration: none;
  }

  /* ---------- Footer row ---------- */
  .fan-foot {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-height: 54px;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
  }

  .fan-all {
    color: #C29B66;
    font-family: 'Jost', sans-serif;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    text-decoration: none;
  }

  .fan-all:hover,
  .fan-all:focus {
    color: #D5B285;
    text-decoration: none;
  }
}

/* Narrow desktops: drop the feature card so the four columns keep their room */
@media (min-width: 992px) and (max-width: 1199px) {
  .fan-inner {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    column-gap: 28px;
  }

  .fan-feature {
    display: none;
  }
}

@media (min-width: 992px) and (prefers-reduced-motion: reduce) {
  .fan,
  .fan-host:hover > .fan,
  .fan-host:focus-within > .fan,
  .fan-col,
  .fan-host:hover .fan-col,
  .fan-host:focus-within .fan-col,
  .fan-links a {
    transition: none;
    transform: none;
  }

  .fan,
  .fan-host:hover > .fan,
  .fan-host:focus-within > .fan {
    transform: translateX(-50%);
  }
}
