/* Mega menü (inc/mega-menu.php, template-parts/mega-menu/*). Taslak: docs/mockups/mega-menu-v1.html (A + E).
   Paneller tam genişlik değil: Eğitimler en fazla 940px, Etkinlikler 760px. Sınıf öneki mm- (smk- ikon fontu).
   Header'ın genel kuralları (ul flex, li margin, a beyaz) panelin içine sızmasın diye seçiciler .header-holder .mm-… ile başlar. */

body > header { --mm-ink: #22262e; --mm-ink-2: #3d4250; --mm-muted: #5b6069; --mm-line: #e8eaef; --mm-mist: #f0f1f4; --mm-paper: #f7f8fa; --mm-brand: #ffdf25; --mm-brand-hover: #ffe95e; --mm-ok: #2f7a3e; --mm-ok-tint: #e7f3ea; --mm-cream: #fff9d3; --mm-display: "Overpass", Arial, sans-serif; --mm-sans: "Inter", "Helvetica Neue", Arial, sans-serif; }

/* Üst madde + ok düğmesi */
body > header .header-holder li:has(> .mm-toggle) { display: flex; align-items: center; gap: 2px; position: static; }
body > header .header-holder .mm-toggle { display: inline-grid; place-items: center; width: 28px; height: 28px; margin: 0; padding: 0; border: 0; border-radius: 6px; background: transparent; color: #fff; cursor: pointer; }
body > header .header-holder .mm-toggle:hover { color: var(--mm-brand); }
body > header .header-holder .mm-toggle:focus-visible { outline: 2px solid var(--mm-brand); outline-offset: 2px; }
body > header .header-holder .mm-toggle .mm-ic { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s ease; }
body > header .header-holder .mm-toggle[aria-expanded="true"] { color: var(--mm-brand); }
body > header .header-holder .mm-toggle[aria-expanded="true"] .mm-ic { transform: rotate(180deg); }
body > header .header-holder li.mm-open > a { color: var(--mm-brand); }

/* Hemen Bilgi Al */
body > header .header-holder .mm-cta { display: inline-flex; align-items: center; height: 44px; padding: 3px 20px 0; border-radius: 50px; background: var(--mm-brand); color: var(--mm-ink); font: 800 15px/1 var(--mm-display); white-space: nowrap; text-decoration: none; transition: background-color .2s ease; }
body > header .header-holder .mm-cta:hover { background: var(--mm-brand-hover); color: var(--mm-ink); text-decoration: none; }

/* Panel kabı: header'a göre konumlanır (header position: relative), sayfa ortasında. Üst madde yazısının 20px altından başlar
   (header'ın 40px alt boşluğunun içine biner). */
body > header .header-holder .mm-panel { position: absolute; z-index: 30; top: calc(100% - 20px); left: 50%; width: min(940px, calc(100vw - 32px)); transform: translateX(-50%); border-radius: 16px; background: #fff; color: var(--mm-ink); box-shadow: 0 24px 60px rgba(34, 38, 46, .22), 0 0 0 1px rgba(34, 38, 46, .06); font: 400 15px/1.5 var(--mm-sans); text-align: left; }
body > header .header-holder .mm-panel--events { width: min(760px, calc(100vw - 32px)); }
body > header .header-holder .mm-panel[hidden] { display: none; }
/* Üst maddeden panele geçerken boşlukta kapanmasın: görünmez köprü + ok işareti */
body > header .header-holder .mm-panel::before { content: ""; position: absolute; left: 0; right: 0; top: -28px; height: 28px; }
body > header .header-holder .mm-panel::after { content: ""; position: absolute; top: -6px; left: var(--mm-arrow-x, 50%); width: 12px; height: 12px; margin-left: -6px; border-radius: 2px; background: #fff; transform: rotate(45deg); }
@media (prefers-reduced-motion: no-preference) {
	body > header .header-holder .mm-panel:not([hidden]) { animation: mm-in .16s ease-out; }
	@keyframes mm-in { from { opacity: 0; transform: translate(-50%, -4px); } to { opacity: 1; transform: translate(-50%, 0); } }
}

/* Panel içindeki genel sıfırlamalar (header kurallarını ezer) */
body > header .header-holder .mm-panel ul { display: block; margin: 0; padding: 0; list-style: none; }
body > header .header-holder .mm-panel li { margin: 0; }
/* :where ile: sıfırlama header'ın 'ul li a' kuralını ezer ama panelin kendi sınıflı bağlantılarını (düğme, başlık) ezmez. */
body > header .header-holder .mm-panel :where(a) { color: var(--mm-ink); font: inherit; text-decoration: none; }
body > header .header-holder .mm-panel p { margin: 0; }
body > header .header-holder .mm-panel :focus-visible { outline: 2px solid var(--mm-ink); outline-offset: 2px; border-radius: 8px; }
body > header .header-holder .mm-lbl { padding: 0 12px 8px; font: 700 12px/1.5 var(--mm-sans); letter-spacing: .08em; text-transform: uppercase; color: var(--mm-muted); }
body > header .header-holder .mm-meta { font-size: 13px; line-height: 1.5; color: var(--mm-muted); font-variant-numeric: tabular-nums; }
body > header .header-holder .mm-badges { display: flex; flex-wrap: wrap; gap: 6px; }
body > header .header-holder .mm-b { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 10px; border-radius: 4px; font: 700 12px/1 var(--mm-sans); white-space: nowrap; }
body > header .header-holder .mm-b .mm-ic { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
body > header .header-holder .mm-b--pop { background: var(--mm-brand); color: var(--mm-ink); }
body > header .header-holder .mm-b--new { background: var(--mm-ink); color: #fff; }
body > header .header-holder .mm-b--cert, body > header .header-holder .mm-b--ok { background: var(--mm-ok-tint); color: var(--mm-ok); }
body > header .header-holder .mm-b--done { background: var(--mm-mist); color: var(--mm-ink-2); }
body > header .header-holder .mm-b--ok:empty, body > header .header-holder .mm-panel [hidden] { display: none; }
body > header .header-holder .mm-btn { display: inline-flex; align-items: center; justify-content: center; height: 44px; padding: 3px 20px 0; border-radius: 50px; background: var(--mm-brand); color: var(--mm-ink); font: 800 15px/1 var(--mm-display); transition: background-color .2s ease; }
body > header .header-holder .mm-btn:hover { background: var(--mm-brand-hover); }
body > header .header-holder .mm-btn--o { background: #fff; box-shadow: inset 0 0 0 1.5px var(--mm-ink); }
body > header .header-holder .mm-btn--o:hover { background: var(--mm-mist); }
body > header .header-holder .mm-link { font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }

/* Eğitimler (A) */
body > header .header-holder .mm-panel--courses .mm-body { display: grid; grid-template-columns: minmax(0, 1fr) 290px; }
body > header .header-holder .mm-panel--nofeat .mm-body { grid-template-columns: minmax(0, 1fr); }
body > header .header-holder .mm-list { padding: 20px 12px 12px 16px; }
body > header .header-holder .mm-rows { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 8px; }
body > header .header-holder .mm-row { display: grid; gap: 4px; padding: 10px 12px; border-radius: 10px; transition: background-color .15s ease; }
body > header .header-holder .mm-row:hover { background: var(--mm-mist); }
body > header .header-holder .mm-row__t { font: 700 15px/1.3 var(--mm-display); color: var(--mm-ink); }
body > header .header-holder .mm-feat { display: flex; flex-direction: column; gap: 12px; margin: 12px 12px 12px 0; padding: 20px; border-radius: 12px; background: var(--mm-ink); color: #fff; }
body > header .header-holder .mm-feat__t { font: 900 20px/1.15 var(--mm-display); color: var(--mm-cream); text-wrap: balance; }
body > header .header-holder .mm-feat__list { display: grid !important; gap: 6px; font-size: 14px; line-height: 1.45; color: #d6d8dd; }
body > header .header-holder .mm-feat__list li { display: flex; gap: 8px; }
body > header .header-holder .mm-feat__list li::before { content: ""; flex: none; width: 6px; height: 6px; margin-top: 7px; background: var(--mm-brand); }
body > header .header-holder .mm-feat .mm-btn { margin-top: auto; align-self: flex-start; }
body > header .header-holder .mm-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding: 14px 24px; border-top: 1px solid var(--mm-line); border-radius: 0 0 16px 16px; background: var(--mm-paper); font-size: 14px; }
body > header .header-holder .mm-foot__all { font-weight: 700; }
body > header .header-holder .mm-foot__help { color: var(--mm-muted); }
body > header .header-holder .mm-foot__help a { font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

/* Etkinlikler (E) */
body > header .header-holder .mm-panel--events .mm-body { display: grid; grid-template-columns: minmax(0, 1fr) 230px; }
body > header .header-holder .mm-ev { display: grid; grid-template-rows: 150px auto; margin: 12px; overflow: hidden; border: 1px solid var(--mm-line); border-radius: 12px; }
body > header .header-holder .mm-ev__img { position: relative; display: block; background: linear-gradient(135deg, #2c313b, #12151b); }
body > header .header-holder .mm-ev__photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
body > header .header-holder .mm-ev--past .mm-ev__photo { filter: grayscale(.6); }
body > header .header-holder .mm-ev__date { position: absolute; left: 16px; bottom: -26px; display: grid; place-items: center; align-content: center; width: 64px; height: 64px; border-radius: 12px; background: var(--mm-brand); color: var(--mm-ink); font-family: var(--mm-display); line-height: 1; box-shadow: 0 6px 16px rgba(0, 0, 0, .18); }
body > header .header-holder .mm-ev--past .mm-ev__date { background: #fff; }
body > header .header-holder .mm-ev__date b { font-size: 26px; font-weight: 900; }
body > header .header-holder .mm-ev__date small { font-size: 12px; font-weight: 800; text-transform: uppercase; }
body > header .header-holder .mm-ev__info { display: grid; gap: 10px; padding: 36px 20px 20px; }
body > header .header-holder .mm-ev__t { font: 900 22px/1.15 var(--mm-display); color: var(--mm-ink); }
body > header .header-holder .mm-ev__sum { font-size: 14px; color: var(--mm-ink-2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
body > header .header-holder .mm-ev__facts { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 14px; color: var(--mm-ink-2); }
body > header .header-holder .mm-ev__facts span { display: inline-flex; align-items: center; gap: 6px; }
body > header .header-holder .mm-ev__facts .mm-ic { width: 16px; height: 16px; fill: none; stroke: var(--mm-ink); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
body > header .header-holder .mm-ev__acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
body > header .header-holder .mm-side { display: grid; gap: 4px; align-content: start; padding: 20px 20px 16px 8px; }
body > header .header-holder .mm-side .mm-lbl { padding-left: 8px; }
body > header .header-holder .mm-side .mm-lbl:not(:first-child) { margin-top: 12px; }
body > header .header-holder .mm-side__links a { display: flex; justify-content: space-between; padding: 10px 8px; border-radius: 10px; font: 700 15px/1.3 var(--mm-display); transition: background-color .15s ease; }
body > header .header-holder .mm-side__links a:hover, body > header .header-holder .mm-side__more a:hover { background: var(--mm-mist); }
body > header .header-holder .mm-side__more a { display: grid; gap: 2px; padding: 8px; border-radius: 10px; }
body > header .header-holder .mm-side__t { font: 700 14px/1.3 var(--mm-display); color: var(--mm-ink); }
body > header .header-holder .mm-past { display: grid; gap: 4px; margin-top: 8px; padding: 12px; border-radius: 10px; background: var(--mm-paper); }

/* Dar masaüstü / tablet */
/* Mod açıkken ok düğmeleri + Hemen Bilgi Al yer kaplıyor: üst maddeler kırılmasın (992–1199'da "Kurumsal Eğitimler" iki satıra düşüyordu). */
@media (min-width: 992px) {
	body > header .header-holder #main-menu > li > a { white-space: nowrap; }
	body > header .header-holder > a[rel="home"] { flex-shrink: 0; } /* Logo sıkışıp küçülmesin (header yüksekliği mod kapalıyla aynı). */
}
@media (min-width: 992px) and (max-width: 1199px) {
	body > header .header-holder #main-menu > li { margin-right: 20px; }
	body > header .header-holder .mm-cta { padding: 3px 16px 0; }
}
/* 992 altında masaüstü menüye düğme sığmıyor (768–991); düğme mobil menüde. */
@media (max-width: 991px) { body > header .header-holder .mm-cta { display: none; } }
@media (max-width: 1023px) {
	body > header .header-holder .mm-panel--courses .mm-body { grid-template-columns: minmax(0, 1fr); }
	body > header .header-holder .mm-feat { margin: 0 12px 12px; }
	body > header .header-holder .mm-panel--events .mm-body { grid-template-columns: minmax(0, 1fr) 200px; }
}
@media (max-width: 860px) {
	body > header .header-holder .mm-rows { grid-template-columns: minmax(0, 1fr); }
	body > header .header-holder .mm-panel { max-height: calc(100vh - 140px); overflow-y: auto; }
	body > header .header-holder .mm-panel--events .mm-body { grid-template-columns: minmax(0, 1fr); }
	body > header .header-holder .mm-side { padding: 0 12px 16px; }
}

/* Mobil menü (.menu-overlay, 768 altı): Eğitimler / Etkinlikler açılır liste + tam genişlik Hemen Bilgi Al */
.menu-overlay .mobile-menu-nav li:has(> .mm-m-toggle) { position: relative; }
.menu-overlay .mobile-menu-nav li:has(> .mm-m-toggle) > a { padding-right: 48px; }
.menu-overlay .mm-m-toggle { position: absolute; top: 4px; right: 0; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; background: transparent; color: #fff; cursor: pointer; }
.menu-overlay .mm-m-toggle .mm-ic { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s ease; }
.menu-overlay .mm-m-toggle[aria-expanded="true"] .mm-ic { transform: rotate(180deg); }
.menu-overlay .mm-m-toggle:focus-visible { outline: 2px solid #ffdf25; outline-offset: -2px; border-radius: 8px; }
.menu-overlay .mm-m-list[hidden] { display: none; }
.menu-overlay .mm-m-list ul { display: block; margin: 0; padding: 4px 0 8px 16px; list-style: none; }
.menu-overlay .mobile-menu-nav .mm-m-list li a { display: grid; gap: 2px; padding: 10px 0; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.menu-overlay .mm-m-t { font: 700 15px/1.35 "Overpass", Arial, sans-serif; color: #fff; }
.menu-overlay .mm-m-meta { font: 400 13px/1.45 "Inter", Arial, sans-serif; color: #c7cad0; }
.menu-overlay .mm-m-all a { font-weight: 700; color: #ffdf25 !important; }
.menu-overlay .mm-cta--mobile { display: flex; align-items: center; justify-content: center; height: 48px; margin: 8px 0 0; padding-top: 3px; border-radius: 50px; background: #ffdf25; color: #22262e; font: 800 16px/1 "Overpass", Arial, sans-serif; text-decoration: none; }
