/* ============================================================
   HOOHUI — Mega Menu / Styled Dropdowns
   Ισχύει ΜΟΝΟ desktop (>1024px). Κάτω από αυτό: τίποτα (mobile
   menu ξεχωριστό/ανέγγιχτο). Αυστηρά η παλέτα του site.
   #1B3A6B navy | #FF6B4A coral | #F5F2ED beige | #5A6B85 μπλε-γκρι
   ============================================================ */

@media (min-width: 1025px) {

  /* Ο parent γίνεται anchor για το absolute panel */
  .main-navigation .primary-menu-container li.hoohui-mm-trigger {
    position: relative;
  }

  /* ---- PANEL (κοινό) ---- */
  .hoohui-mm-trigger > .hoohui-mm-panel {
    position: absolute;
    top: 100%;
    left: 50%;
    margin-top: 8px;
    padding: 16px;
    background: #FFFFFF;
    border: 1px solid #E8E4DC;
    border-radius: 14px;
    box-shadow: 0 12px 34px rgba(27, 58, 107, 0.14);
    z-index: 99999;

    /* κλειστό state */
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(6px);
    transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s ease;
  }

  /* αόρατη «γέφυρα» ώστε να μη χάνεται το hover στο κενό item→panel */
  .hoohui-mm-trigger > .hoohui-mm-panel::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: -12px;
    height: 12px;
  }

  /* Πλάτη ανά τύπο + κεντράρισμα (margin = -μισό πλάτος) */
  .hoohui-mm--mega > .hoohui-mm-panel { width: 640px; margin-left: -320px; }
  .hoohui-mm--dd   > .hoohui-mm-panel { width: 300px; margin-left: -150px; padding: 10px; }

  /* ---- OPEN state: hover, keyboard focus, ή JS class ---- */
  .hoohui-mm-trigger:hover        > .hoohui-mm-panel,
  .hoohui-mm-trigger:focus-within > .hoohui-mm-panel,
  .hoohui-mm-trigger.hoohui-open  > .hoohui-mm-panel {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
  }

  /* ---- MEGA: header ---- */
  .hoohui-mm-head {
    padding: 4px 10px 12px;
    margin-bottom: 10px;
    border-bottom: 1px solid #F0ECE4;
  }
  .hoohui-mm-head-title {
    font-family: 'Poppins', sans-serif;
    font-size: 15px;
    font-weight: 600;
    color: #1B3A6B;
    line-height: 1.3;
  }
  .hoohui-mm-head-sub {
    font-family: 'Nunito Sans', sans-serif;
    font-size: 13px;
    color: #5A6B85;
    line-height: 1.4;
    margin-top: 3px;
  }

  /* ---- MEGA: 3 στήλες ---- */
  .hoohui-mm-cols {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px 14px;
  }
  .hoohui-mm-col-h {
    font-family: 'Poppins', sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #1B3A6B;
    opacity: 0.85;
    padding: 4px 10px;
    margin-bottom: 2px;
  }

  /* ---- ITEM (κοινό mega + dropdown) ---- */
  .hoohui-mm-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 10px;
    border-radius: 10px;
    text-decoration: none;
    transition: background 0.15s ease;
  }
  .hoohui-mm-item:hover { background: #F5F2ED; }
  .hoohui-mm-item:hover .hoohui-mm-title { color: #FF6B4A; }
  .hoohui-mm-item:hover .hoohui-mm-chip  { background: #EDE8DF; }
  .hoohui-mm-item:focus-visible {
    outline: 2px solid #FF6B4A;
    outline-offset: 2px;
    background: #F5F2ED;
  }

  .hoohui-mm-chip {
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #F5F2ED;
    border-radius: 10px;
    font-size: 18px;
    line-height: 1;
    transition: background 0.15s ease;
  }
  .hoohui-mm-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
  }
  .hoohui-mm-title {
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #1B3A6B;
    line-height: 1.3;
    transition: color 0.15s ease;
  }
  .hoohui-mm-desc {
    font-family: 'Nunito Sans', sans-serif;
    font-size: 12.5px;
    color: #5A6B85;
    line-height: 1.35;
  }

  /* JS-driven οριζόντια στοίχιση όταν το panel βγαίνει εκτός viewport */
  .hoohui-mm-trigger > .hoohui-mm-panel.hoohui-align-left  { left: 0;    margin-left: 0; }
  .hoohui-mm-trigger > .hoohui-mm-panel.hoohui-align-right { left: auto; right: 0; margin-left: 0; }

  /* ---- Reduced motion: καμία κίνηση, απλό show/hide ---- */
  @media (prefers-reduced-motion: reduce) {
    .hoohui-mm-trigger > .hoohui-mm-panel {
      transition: none;
      transform: none;
    }
    .hoohui-mm-trigger:hover        > .hoohui-mm-panel,
    .hoohui-mm-trigger:focus-within > .hoohui-mm-panel,
    .hoohui-mm-trigger.hoohui-open  > .hoohui-mm-panel {
      transform: none;
    }
    .hoohui-mm-item,
    .hoohui-mm-chip,
    .hoohui-mm-title { transition: none; }
  }
}
