/* ==========================================================
   FAN MENU — FLOATING LEFT PETALS (RESPONSIVE-READY)
   - FIXED to viewport (correct for this UI)
   - Position uses tokens so responsive.css can override later
   - NO JS positioning required
========================================================== */

/* --------------------------------
   Tokens
--------------------------------- */
:root{
  /* Match navbar px-4 inset feel (Bootstrap px-4 ≈ 24px) */
  --edge-inset: 24px;

  /* Fan position (horizontal stays aligned with language menu) */
  --fan-left: var(--edge-inset);
  --fan-gap: 24px;

  /* Button size */
  --fan-btn: 52px;

  /* Header stack height
     - Title padding increased
     - Navbar = ~70px
     - Visual alignment needs a bit more than before */
  --header-stack: 178px; /* ↑ was 170px */

  /* Center fan on navbar’s visual midline */
  --fan-top: calc(var(--header-stack) - (var(--fan-btn) / 2));
}

/* ==========================================================
   Container
========================================================== */
#fan-menu-container{
  position: fixed;
  left: var(--fan-left);
  top: var(--fan-top);
  z-index: 9999;
  pointer-events: none; /* container shouldn't block outside clicks */
}

#fan-menu{
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  gap: var(--fan-gap);
}

/* ==========================================================
   Buttons
========================================================== */
#fan-home-btn,
.fan-petal{
  width: var(--fan-btn);
  height: var(--fan-btn);

  background: rgba(255, 245, 235, 0.55);
  backdrop-filter: blur(14px);

  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;

  cursor: pointer;
  pointer-events: auto;

  box-shadow:
    0 6px 18px rgba(0, 0, 0, 0.18),
    inset 0 0 0 1px rgba(255, 255, 255, 0.5);

  transition:
    background 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease,
    opacity 0.25s ease;
}

/* ==========================================================
   Home button crossfade logic (unchanged)
========================================================== */
#fan-home-btn{
  position: relative;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
  outline: none;
}

#fan-home-btn:focus{ outline: none; }

#fan-home-btn .fan-home-icon{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;

  opacity: 0;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;

  will-change: opacity;
}

#fan-home-btn .fan-home-icon.is-visible{
  opacity: 1;
}

#fan-home-btn .fan-home-blank{
  position: absolute;
  inset: 0;
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
}

/* ==========================================================
   Petal icons
========================================================== */
.fan-petal img{
  width: 100%;
  height: 100%;
  object-fit: contain;

  display: block;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

/* ==========================================================
   Hover / active
========================================================== */
#fan-home-btn:hover,
.fan-petal:hover{
  background: rgba(255, 245, 235, 0.88);
  transform: translateY(-1px);

  box-shadow:
    0 8px 22px rgba(0, 0, 0, 0.22),
    inset 0 0 0 1px rgba(255, 255, 255, 0.75);
}

#fan-home-btn:active,
.fan-petal:active{
  transform: translateY(0);
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.18),
    inset 0 0 0 1px rgba(255, 255, 255, 0.6);
}

/* ==========================================================
   Open / closed petals (unchanged)
========================================================== */
.fan-petal{
  opacity: 0;
  transform: scale(0.6);
  pointer-events: none;
}

.fan-petal.open{
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}