/* =========================================================================
   Traveyo Golf — header dropdown menus. THE single source of their look.

   Rendered by app/Services/MenuRenderer.php for every display type (Standard Dropdown,
   Destinations Mega Menu, Two Column, Category + Items, grouped 3-level menus). The display
   type only picks a LAYOUT modifier (.menu-panel--list / --grouped / --countries / --records);
   colours, type and spacing below are shared by all of them — change a value here once and
   every menu follows (e.g. .menu-group-title colour → Golf Holidays AND Destinations).

   Show/hide mechanics (hover, opacity, z-index) stay in the theme skin; this file is loaded
   after it and overrides its visual !important rules.
   ========================================================================= */

/* ---- shared look (target values) ---- */
.menu-group-title {
  display: block;
  color: #8a6d35 !important;
  font-size: 11.5px; font-weight: 800; line-height: 1.3;
  letter-spacing: .11em; text-transform: uppercase;
  border-bottom: 0 !important;
  margin: 0 0 7px; padding: 6px 0 0 10px;
  text-decoration: none !important;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
a.menu-group-title:hover { color: #09231a !important; }

.trv-nav-links .menu-panel .menu-item {
  display: flex !important; flex-direction: column; align-items: flex-start; gap: 0;
  padding: 7px 10px !important; border-radius: 8px !important;
  background: transparent !important; text-shadow: none !important;
  white-space: normal !important; line-height: 1.3;
  transition: background .12s ease;
}
.trv-nav-links .menu-panel .menu-item .label { color: #0f3326; font-size: 15px; font-weight: 650; }
.trv-nav-links .menu-panel .menu-item .sub { display: block; color: #5f5f59; font-size: 12.5px; font-weight: 400; margin-top: 1px; }
.trv-nav-links .menu-panel .menu-item:hover { background: #eef3f0 !important; }
.trv-nav-links .menu-panel .menu-item:hover .label { color: #09231a; }

.menu-panel .columns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 0; padding: 0; list-style: none; }
.menu-panel .columns--n1 { grid-template-columns: 1fr; }
.menu-panel .columns--n2 { grid-template-columns: repeat(2, 1fr); }
.menu-panel .columns--n3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 760px) { .menu-panel .columns { grid-template-columns: 1fr; } }

.menu-panel .view-all {
  grid-column: 1 / -1;            /* its own row, never inside the columns */
  border-top: 1px solid #e3e1da !important; margin-top: 8px; padding-top: 10px !important;
  border-radius: 0 0 8px 8px !important;
}
.menu-panel .view-all .label .fa { font-size: 11px; margin-left: 4px; color: #8a6d35; }
/* grouped menus ("All Golf Holidays") keep that row at the top */
.menu-panel .view-all--top { border-top: 0 !important; margin-top: 0; padding-top: 7px !important; border-bottom: 1px solid #e3e1da; border-radius: 8px 8px 0 0 !important; margin-bottom: 8px; }

/* ---- the panel (container) ---- */
.trv-nav-links .dropdown-menu.menu-panel {
  background: #fff !important;
  border: 1px solid #e3e1da !important;
  border-radius: 14px !important;
  box-shadow: 0 24px 60px rgba(9, 30, 19, .18) !important;
  padding: 12px !important;
}
.menu-panel ul { list-style: none; margin: 0; padding: 0; }
.menu-panel .menu-group { min-width: 0; padding-bottom: 6px; }

/* ---- layouts (decided by the display type) ---- */
.trv-nav-links .dropdown-menu.menu-panel--list { min-width: 240px; padding: 8px !important; }
.trv-nav-links .dropdown-menu.menu-panel--grouped { min-width: 540px; padding: 14px 16px 16px !important; }
.trv-nav-links .dropdown-menu.menu-panel--records { min-width: 520px; padding: 14px 16px !important; }

/* Countries (Destinations / Golf Courses / Golf Resorts): one wide horizontal panel under the
   whole nav row, countries side by side (auto-filled columns) instead of a tall list. */
@media (min-width: 992px) {
  .trv-mainnav__row { position: relative; }
  .trv-nav-links > .nav-item.menu-root--countries { position: static !important; }
  .trv-nav-links > .nav-item.menu-root--countries > .dropdown-menu.menu-panel--countries {
    left: 0 !important; right: 0 !important; top: calc(100% - 6px) !important; width: auto !important;
    min-width: 0 !important; max-width: none !important;
    padding: 18px 22px 20px !important; max-height: calc(100vh - 170px); overflow-y: auto;
  }
  .menu-panel--countries .columns { grid-template-columns: repeat(auto-fit, minmax(165px, 1fr)); gap: 6px 18px; } /* auto-fit: no empty columns when there are few countries */
  /* invisible bridge between the menu link and the panel so the hover is not lost */
  .trv-nav-links > .nav-item.menu-root--countries > .dropdown-menu.menu-panel--countries::before {
    content: ''; position: absolute; left: 0; right: 0; top: -30px; height: 30px;
  }
}
@media (max-width: 1199px) {
  .trv-nav-links .dropdown-menu.menu-panel--grouped,
  .trv-nav-links .dropdown-menu.menu-panel--records { min-width: 460px; }
}

/* Hover intent (assets/js/site.js adds .tg-hover-intent on desktop): the panel opens/closes by
   the .is-open class with small delays instead of instantly on :hover, so the pointer can travel
   down to a panel — even across other menu titles — without it closing or switching. */
.trv-nav-links.tg-hover-intent > .nav-item.dropdown:not(.is-open):hover > .dropdown-menu,
.trv-nav-links.tg-hover-intent > .nav-item.dropdown:not(.is-open):focus-within > .dropdown-menu {
  opacity: 0 !important; visibility: hidden !important; pointer-events: none !important;
}
/* a taller invisible bridge under every top item, so a slightly diagonal path stays "inside" */
.trv-nav-links.tg-hover-intent > .nav-item.dropdown::after { height: 22px; }
/* ---- Mobile menu accordion (MenuRenderer::mobile) — 2026-11-24 ----
   A parent row is one full-width tap target that opens its list (it no longer navigates);
   the chevron is light on the dark green panel so it is obvious the row opens. */
.trv-mobile-nav .trv-mm-list { list-style: none; margin: 0; padding: 0; }
.trv-mobile-nav .trv-mm { margin: 0; }
.trv-mobile-nav .trv-mm__toggle {
  list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 46px; padding: 11px 2px 11px 0; cursor: pointer; user-select: none; -webkit-tap-highlight-color: transparent;
  color: rgba(255,255,255,.92); font-size: 14px; font-weight: 700; border-bottom: 1px solid rgba(255,255,255,.12);
}
.trv-mobile-nav .trv-mm__toggle::-webkit-details-marker { display: none; }
.trv-mobile-nav .trv-mm__toggle::marker { content: ''; }
.trv-mobile-nav .trv-mm__icon {
  flex: 0 0 28px; width: 28px; height: 28px; border-radius: 50%; position: relative;
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.28);
}
.trv-mobile-nav .trv-mm__icon::before {               /* chevron ▼ → ▲ */
  content: ''; position: absolute; left: 50%; top: 45%; width: 8px; height: 8px;
  border-right: 2px solid #fff; border-bottom: 2px solid #fff; transform: translate(-50%, -50%) rotate(45deg);
  transition: transform .2s ease, top .2s ease;
}
.trv-mobile-nav .trv-mm[open] > .trv-mm__toggle { color: #c2a567; }
.trv-mobile-nav .trv-mm[open] > .trv-mm__toggle .trv-mm__icon { background: #c2a567; border-color: #c2a567; }
.trv-mobile-nav .trv-mm[open] > .trv-mm__toggle .trv-mm__icon::before { top: 58%; transform: translate(-50%, -50%) rotate(-135deg); border-color: #123a2b; }
.trv-mobile-nav .trv-mm__body { padding: 2px 0 8px 14px; border-left: 2px solid rgba(194,165,103,.45); margin: 4px 0 6px 2px; }
.trv-mobile-nav .trv-mm__body .trv-mm__toggle { min-height: 40px; font-size: 13.5px; padding: 9px 2px 9px 0; color: rgba(255,255,255,.85); }
.trv-mobile-nav .trv-mm__body .trv-mm__icon { flex-basis: 24px; width: 24px; height: 24px; }
.trv-mobile-nav .trv-mm__body .nav-link { color: rgba(255,255,255,.72) !important; font-size: 13.5px !important; font-weight: 600 !important; padding: 9px 0 !important; }
.trv-mobile-nav .trv-mm__body .trv-mm-overview { color: #c2a567 !important; font-weight: 700 !important; }
.trv-mobile-nav .trv-mm__toggle:focus-visible { outline: 2px solid #c2a567; outline-offset: 2px; }

/* Mobile must never inherit the desktop dropdown panel.  Without these resets a
   nested menu can become a white, absolutely positioned box outside the accordion. */
@media (max-width: 991px) {
  /* Compatibility reset for the previous mobile renderer, which may remain in
     a browser cache during a deployment. */
  .trv-mobile-nav .trv-mobile-submenu > div {
    position: static !important;
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 2px 0 8px 14px !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
  }
  .trv-mobile-nav .trv-mm[open] > .trv-mm__body,
  .trv-mobile-nav .trv-mm[open] > .trv-mm__body .dropdown-menu,
  .trv-mobile-nav .trv-mm[open] > .trv-mm__body .menu-panel {
    position: static !important;
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 2px 0 8px 14px !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    pointer-events: auto !important;
  }
  .trv-mobile-nav .trv-mm[open] > .trv-mm__body .dropdown-menu::before,
  .trv-mobile-nav .trv-mm[open] > .trv-mm__body .menu-panel::before { display: none !important; }
}

/* The bridges only KEEP an open menu open — they never open one. The countries items are
   position:static (their panel spans the whole row), so their ::after bridge became a strip
   across the full width under the menu bar: moving the mouse up from the page, or leaving a
   menu downwards, crossed it and re-opened Destinations / Golf Courses / Golf Resorts. */
.trv-nav-links.tg-hover-intent > .nav-item.dropdown:not(.is-open)::after,
.trv-nav-links.tg-hover-intent > .nav-item.dropdown:not(.is-open) > .dropdown-menu::before { pointer-events: none !important; }
@media (min-width: 992px) {
  .trv-nav-links > .nav-item.menu-root--countries::after { display: none !important; } /* the panel's own ::before bridges the gap */
}
