/* Bestlab Fast — mega menu v5: what differs from v3.

   v5 is v3's panel opened by click (assets/js/mega-menu-v5.js), so it loads
   mega-menu-v3.css and this layer after it, and this file holds only the
   difference. Anything that is not about the click model or the "Minden …"
   rows belongs in mega-menu-v3.css, where both designs get it. */

/* ---- Nav row: no chevrons ---------------------------------------------
   The item's own link is the trigger now, so there is no caret button in the
   markup; the rule below is only a guard in case one comes back. The link
   takes the caret's share of the padding, and while its panel is open it keeps
   the hover colour, so the row says which item the panel belongs to. */
.blf-has-mega .blf-menu__caret{display:none}
.blf-menu > li.blf-has-mega > .blf-menu__top{cursor:pointer}
.blf-menu > li.blf-has-mega.is-open > .blf-menu__top{color:var(--bl-blue)}

/* ---- "Minden …" rows ---------------------------------------------------
   The first row of columns 2 and 3 leads to the page the row that opened the
   column would have led to, had clicking it not opened the column instead. It
   is set off from the list under it by a hairline and reads in the link blue,
   so it is plainly a way out rather than one more choice. */
.blf-mega__l2item--all,
.blf-mega__l3item--all{margin-bottom:5px;padding-bottom:5px;border-bottom:1px solid var(--bl-line)}
.blf-mega__l2item--all .blf-mega__l2link,
.blf-mega__links .blf-mega__l3item--all > a{color:var(--bl-blue);font-weight:600}
.blf-mega__l2item--all .blf-mega__l2ico{opacity:.9;color:var(--bl-blue)}

@media(max-width:900px){
	.blf-mega__l2item--all,
	.blf-mega__l3item--all{margin-bottom:4px;padding-bottom:4px}
}

/* ---- Equal columns -----------------------------------------------------
   Every column of the panel — rail, groups, links, card — is one width,
   `--blf-mm5-col`: a quarter of the container, held between two bounds so a
   column never gets too narrow to read a name in or so wide the panel turns
   into a page. v3's per-column widths from Megjelenés → Mega menü v4 (the
   `--blf-mm-rail` / `--blf-mm-cols*` properties) are deliberately not read
   here; its alignment and radius still are. The card is a column like the
   others, so its tiles go two across to fit it. Below 1121px the card column
   is dropped (mega-menu-v3.css) and the other three keep the same width. */
@media(min-width:901px){
	.blf-menu-v5{--blf-mm5-col:clamp(230px,calc(min(100vw - 32px,var(--bl-container,1280px)) / 4),320px)}
	.blf-menu-v5 .blf-mega__inner{grid-template-columns:var(--blf-mm5-col) auto;width:max-content;max-width:100%}
	.blf-menu-v5 .blf-mega .blf-mega__panel{grid-template-columns:repeat(3,var(--blf-mm5-col))}
	.blf-menu-v5 .blf-mega:not(.is-grp) .blf-mega__panel{grid-template-columns:var(--blf-mm5-col)}
	.blf-menu-v5 .blf-mega__previewcol{padding:18px 16px 22px}
	.blf-menu-v5 .blf-mega__preview{max-width:none}
	.blf-menu-v5 .blf-mega__tiles{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(min-width:901px) and (max-width:1120px){
	.blf-menu-v5 .blf-mega .blf-mega__panel{grid-template-columns:repeat(2,var(--blf-mm5-col))}
}

/* ---- Docked to the left (Options → Menü → Panel elhelyezése) -----------
   The same panel as a full-height drawer against the window's left edge, the
   page dimmed behind it — the kaiserkraft drawer. `.blf-mega` becomes the
   whole window: its ::before is the dimming, the card is the drawer, and a
   click on the dimmed part is a click outside the card, which is what closes
   the panel anyway. The dimming belongs to the panel rather than to <body>
   because the header must be dimmed too, and the panel is inside the header's
   stacking context — a <body> scrim above the header would cover the panel
   with it. Columns open to the right of the drawer as before.
   Desktop only: the mobile drawer is the nav's own. */
.blf-mega__dockhead{display:none}

@media(min-width:901px){
	.blf-menu-dock-left .blf-mega{position:fixed;inset:0;z-index:95;transform:none}
	.blf-menu-dock-left .blf-mega::before{content:"";position:absolute;inset:0;background:rgba(11,44,90,.45)}
	/* The panel dims the page itself; v3's <body> scrim would double it. */
	.blf-menu-dock-left.blf-mega-open::before{display:none}

	.blf-menu-dock-left .blf-mega__inner{position:relative;height:100%;max-width:100%;margin:0;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;border:0;border-radius:0;box-shadow:8px 0 40px rgba(11,44,90,.25);transform:translateX(-24px);transition:transform .22s cubic-bezier(.16,1,.3,1)}
	.blf-menu-dock-left .blf-mega.is-open .blf-mega__inner{transform:none}
	.blf-menu-dock-left .blf-mega__railcol{background:#fff}

	.blf-menu-dock-left .blf-mega__dockhead{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:56px;margin:-4px 0 4px;padding:0 0 12px 6px;border-bottom:1px solid var(--bl-line)}
	.blf-mega__dockhead .custom-logo{display:block;width:auto;max-height:40px}
	.blf-mega__close{display:flex;align-items:center;justify-content:center;flex:none;width:44px;height:44px;padding:0;border:0;border-radius:8px;background:none;color:var(--bl-navy);cursor:pointer}
	.blf-mega__close:hover{background:var(--bl-soft)}
	.blf-mega__close:focus-visible{outline:2px solid var(--bl-blue);outline-offset:-2px}
}
/* ---- One row grid across the drawer's columns ------------------------
   Docked, the rail, the groups and the links read as one table, the way
   kaiserkraft's drawer does: every column opens on a head of the same height
   (the logo and close in the rail, the blue eyebrow in the other two), and
   under it every row is the same height with the same gap, so row N of one
   column sits level with row N of the next. The "Minden …" rows keep their
   hairline, but it is drawn in the same 11px step the rail's doorway divider
   takes, not added as padding that would push the column down. A row whose name
   wraps still grows — a name is never cut. */
@media(min-width:901px){
	.blf-menu-dock-left{--blf-mm5-head:64px;--blf-mm5-row:40px}
	.blf-menu-dock-left .blf-mega__railcol,
	.blf-menu-dock-left .blf-mega__l2col,
	.blf-menu-dock-left .blf-mega__l3col{padding-top:16px}
	.blf-menu-dock-left .blf-mega__dockhead{height:var(--blf-mm5-head);min-height:0;margin:0;padding:0 0 0 6px}
	.blf-menu-dock-left .blf-mega__l2col > .blf-mega__coltitle,
	.blf-menu-dock-left .blf-mega__l3 > .blf-mega__coltitle{display:flex;align-items:center;flex-wrap:wrap;align-content:center;height:var(--blf-mm5-head);margin:0 0 12px;border-bottom:1px solid var(--bl-line);overflow:hidden}
	.blf-menu-dock-left .blf-mega__rail,
	.blf-menu-dock-left .blf-mega__l2,
	.blf-menu-dock-left .blf-mega__links{gap:2px}
	.blf-menu-dock-left .blf-mega__raillink,
	.blf-menu-dock-left .blf-mega__l2link,
	.blf-menu-dock-left .blf-mega__links a{min-height:var(--blf-mm5-row);padding-top:5px;padding-bottom:5px}
	.blf-menu-dock-left .blf-mega__l2item--all,
	.blf-menu-dock-left .blf-mega__l3item--all{position:relative;margin-bottom:9px;padding-bottom:0;border-bottom:0}
	.blf-menu-dock-left .blf-mega__l2item--all::after,
	.blf-menu-dock-left .blf-mega__l3item--all::after{content:"";position:absolute;left:8px;right:8px;bottom:-7px;height:1px;background:var(--bl-line)}
}
@media(min-width:901px) and (prefers-reduced-motion:reduce){
	.blf-menu-dock-left .blf-mega__inner{transition:none}
}
