/* Mega Lecture native header + footer (ml-chrome.php). Tokens match redesign/ml_kit.py: ink, cyan, yellow, Montserrat. */
.ml-header, .ml-drawer, .ml-footer { --ink: #0E0E0E; --cyan: #35C8EA; --cyan-tint: #E6F7FC; --cyan-text: #0B6A85; --yellow: #FFD12E; --yellow-tint: #FFF4D1;
	--surface: #FFFFFF; --surface-alt: #FAF9F6; --surface-alt2: #F4F3EE; --border: rgba(0,0,0,.09); --border-strong: rgba(0,0,0,.14); --body: #3D3B37; --muted: #6B6963;
	font-family: Montserrat, "Segoe UI", system-ui, sans-serif; color: var(--body); box-sizing: border-box; }
.ml-header *, .ml-drawer *, .ml-footer * { box-sizing: border-box; }
.ml-header a, .ml-drawer a, .ml-footer a { text-decoration: none; }
.ml-ico { display: inline-block; vertical-align: middle; flex: none; }

/* ---- header bar ---- */
.ml-header { position: sticky; top: 0; z-index: 100; background: var(--surface); border-top: 3px solid var(--cyan); border-bottom: 1px solid var(--border); }
.ml-header.is-stuck { box-shadow: 0 6px 24px rgba(0,0,0,.07); }
.admin-bar .ml-header { top: 32px; }
.ml-header__in { max-width: 1240px; margin: 0 auto; padding: 10px 20px; display: flex; align-items: center; gap: 12px; }
.ml-logo { display: inline-flex; line-height: 0; }
.ml-header__logo img { width: 128px; height: auto; }
.ml-header__actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.ml-iconbtn { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 50%; color: var(--ink); }
.ml-iconbtn:hover { color: var(--cyan-text); }
.ml-iconbtn--wa { color: #128C7E; border: 1px solid var(--border-strong); }
.ml-iconbtn--wa:hover { color: #fff; background: #25D366; border-color: #25D366; }
.ml-cart { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; color: var(--ink); }
.ml-cart:hover { color: var(--cyan-text); }
.ml-cart__count { position: absolute; top: 1px; right: 0; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: #d9534f; color: #fff;
	font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; display: none; }
.ml-cart__count.is-on { display: block; }
.ml-burger { display: none; align-items: center; justify-content: center; width: 40px; height: 40px; color: var(--ink) !important; cursor: pointer; }
.ml-burger:hover { color: var(--cyan-text); }

/* ---- buttons ---- */
.ml-btn { display: inline-flex; align-items: center; justify-content: center; padding: 10px 18px; border-radius: 8px; border: 1px solid transparent;
	font: 700 13.5px/1.2 Montserrat, sans-serif; color: var(--ink); white-space: nowrap; transition: background-color .15s, border-color .15s, color .15s; }
.ml-btn--primary { background: var(--yellow); border-color: var(--yellow); }
.ml-btn--primary:hover { background: #F2C300; border-color: #F2C300; color: var(--ink); }
.ml-btn--ghost { background: transparent; border-color: var(--border-strong); }
.ml-btn--ghost:hover { background: var(--surface-alt2); border-color: var(--ink); color: var(--ink); }
.ml-btn--full { width: 100%; }

/* ---- desktop menu ---- */
.ml-nav { flex: 1 1 auto; display: flex; justify-content: center; min-width: 0; }
.ml-nav__list { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 2px; }
.ml-nav__item { margin: 0; }
.ml-nav__link { display: inline-flex; align-items: center; gap: 5px; padding: 10px 11px; border-radius: 8px; font-size: 14px; font-weight: 700; color: var(--body); line-height: 1.2; }
.ml-nav__link .ml-ico { color: var(--muted); transition: transform .15s; }
.ml-nav__link:hover, .ml-nav__link:focus-visible { color: #08313D; background: var(--cyan-tint); }
.ml-nav__item.is-open > .ml-nav__link { color: var(--cyan-text); background: var(--cyan-tint); }
.ml-nav__item.is-open > .ml-nav__link .ml-ico { color: var(--cyan-text); transform: rotate(180deg); }

/* mega panels: a full-width white bar under the header, its content boxed to the header width */
.ml-panel { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--surface); border-bottom: 1px solid var(--border);
	box-shadow: 0 24px 40px -20px rgba(0,0,0,.18); z-index: 5; }
.ml-nav__item.is-open > .ml-panel { display: block; }
.ml-panel__in { max-width: 1240px; margin: 0 auto; padding: 30px 20px 34px; display: flex; align-items: flex-start; gap: 40px; }
.ml-panel__col { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.ml-label { margin: 0 0 6px; font-size: 11px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: var(--cyan-text); }
.ml-links { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.ml-links li { margin: 0; font-size: 14px; line-height: 1.4; }
.ml-links a, .ml-links span { color: var(--body); }
.ml-links a:hover { color: var(--cyan-text); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--cyan); }
.ml-links--lg li { font-size: 15px; }
.ml-links--lg { gap: 10px; }
.ml-panel__cta { flex: 0 0 30%; padding: 20px; border-radius: 12px; background: var(--yellow-tint); display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.ml-panel__cta h4 { margin: 0; font-size: 15px; font-weight: 700; line-height: 1.3; color: var(--ink); }
.ml-panel__cta p { margin: 0; font-size: 13px; line-height: 1.55; color: var(--body); }
.ml-mega-cta { margin-top: 6px; }

/* ---- phones and tablets: drawer instead of the menu ---- */
@media (max-width: 1024px) {
	.ml-nav, .ml-hide-mobile { display: none !important; }
	.ml-burger { display: inline-flex; }
	.ml-header__actions { gap: 4px; }
}
@media (max-width: 767px) {
	.ml-header { position: relative; top: auto; }
	.ml-header__in { padding: 8px 12px; }
	.ml-header__logo img { width: 110px; }
}
@media (max-width: 782px) { .admin-bar .ml-header { top: 46px; } }

.ml-drawer { position: fixed; inset: 0; z-index: 10000; }
.ml-drawer[hidden] { display: none; }
.ml-drawer__overlay { position: absolute; inset: 0; background: rgba(14,14,14,.6); opacity: 0; transition: opacity .2s; }
.ml-drawer__panel { position: absolute; top: 0; right: 0; bottom: 0; width: 340px; max-width: 88vw; overflow-y: auto; -webkit-overflow-scrolling: touch;
	background: var(--surface); box-shadow: -8px 0 30px rgba(0,0,0,.25); padding: 20px 22px 32px; display: flex; flex-direction: column; gap: 22px;
	transform: translateX(100%); transition: transform .22s ease-out; }
.ml-drawer.is-open .ml-drawer__overlay { opacity: 1; }
.ml-drawer.is-open .ml-drawer__panel { transform: none; }
html.ml-drawer-open { overflow: hidden; }
.ml-drawer__top { display: flex; align-items: center; justify-content: space-between; }
.ml-drawer__top img { width: 118px; height: auto; }
.ml-drawer__close, .ml-burger { -webkit-appearance: none; appearance: none; background: transparent !important; border: 0 !important; box-shadow: none !important; padding: 0 !important; border-radius: 8px; line-height: 1; }
.ml-drawer__close { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; color: var(--cyan-text) !important; cursor: pointer; }
.ml-drawer__close:hover, .ml-drawer__close:focus-visible { background: var(--cyan-tint) !important; }
.ml-drawer__ctas { display: flex; flex-direction: column; gap: 10px; }
.ml-drawer__ctas .ml-btn { padding: 12px 18px; font-size: 15px; }
.ml-drawer__group { display: flex; flex-direction: column; gap: 8px; }
.ml-social { list-style: none; margin: 0; padding: 0; display: flex; gap: 8px; }
.ml-social li { margin: 0; }
.ml-social__a { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; background: var(--surface-alt2); color: var(--ink); }
.ml-social__a:hover { background: var(--cyan); color: var(--ink); }
@media (prefers-reduced-motion: reduce) { .ml-drawer__panel, .ml-drawer__overlay, .ml-nav__link .ml-ico { transition: none; } }

/* ---- footer ---- */
.ml-footer { background: var(--surface-alt); border-top: 1px solid var(--border); font-size: 13.5px; }
.ml-footer__in { max-width: 1240px; margin: 0 auto; padding: 56px 20px 32px; display: flex; flex-wrap: wrap; gap: 32px 24px; }
.ml-footer__col { flex: 1 1 160px; display: flex; flex-direction: column; gap: 8px; }
.ml-footer__col--brand { flex: 1.6 1 240px; }
.ml-footer__col--contact { flex: 1.4 1 220px; }
.ml-footer__col .ml-links li { font-size: 13.5px; }
.ml-footer__col .ml-links { gap: 8px; }
.ml-footer__col .ml-btn { align-self: flex-start; margin-top: 8px; }
.ml-footer__blurb { max-width: 300px; margin: 10px 0 14px; font-size: 13.5px; line-height: 1.6; color: var(--muted); }
.ml-footer__col--brand img { width: 140px; height: auto; }
.ml-footer__bottom { border-top: 1px solid var(--border); }
.ml-footer__bottom .ml-footer__in { padding: 16px 20px; align-items: center; justify-content: space-between; gap: 8px 24px; }
.ml-footer__bottom p { margin: 0; font-size: 12.5px; color: var(--muted); }
@media (max-width: 600px) { .ml-footer__in { padding: 40px 16px 24px; } .ml-footer__bottom .ml-footer__in { padding: 14px 16px; } }
/* 29 Sep 2026: "Free tests" in the main menu and drawer */
.ml-nav__link--tests { color: var(--cyan-text); }
.ml-nav__link--tests .ml-new { display: inline-block; margin-left: 2px; padding: 2px 6px; border-radius: 999px; background: #FFD12E; color: #0E0E0E; font-size: 10px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; line-height: 1.3; }
.ml-btn--tests { background: var(--cyan-tint); color: #08313D; border: 1.5px solid #35C8EA; }
.ml-btn--tests:hover { background: #35C8EA; color: #0E0E0E; }

/* Free tests mega menu (3 Oct 2026): MDCAT featured card, AS / A2 level pairs */
.ml-feat { background: #0B0B0C; color: #fff; border-radius: 14px; padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.ml-feat__tag { align-self: flex-start; padding: 3px 9px; border-radius: 999px; background: var(--yellow); color: #0E0E0E; font-size: 10.5px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.ml-feat__title { margin: 0; font-size: 19px; font-weight: 700; line-height: 1.2; color: #fff; }
.ml-feat__text { margin: 0; font-size: 13.5px; line-height: 1.5; color: #B9C6D0; }
.ml-feat__list { list-style: none; margin: 2px 0 4px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.ml-feat__list li { margin: 0; }
.ml-feat__list a { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 8px 11px; border-radius: 8px; background: #16212B; border: 1px solid #243543; color: #fff; font-size: 13.5px; font-weight: 600; }
.ml-feat__list a:hover { border-color: var(--cyan); }
.ml-feat__list small { color: var(--cyan); font-size: 12px; font-weight: 600; white-space: nowrap; }
.ml-lvl { margin-left: 4px; font-size: 12px; color: var(--muted); white-space: nowrap; }
.ml-lvl a { color: var(--muted); }
.ml-links li a, .ml-lvl a { text-underline-offset: 3px; }
.ml-drawer .ml-feat { margin-bottom: 4px; }
@media (min-width: 1025px) and (max-width: 1180px) { .ml-panel__in { gap: 26px; } }
#ml-panel-tests .ml-links + .ml-label { margin-top: 14px; }

/* Homepage hero slider (3 Oct 2026): the hero and the MDCAT slide (.ml-hero-s2) share one grid cell; hidden until the script wraps them */
.ml-hero-s2 { display: none; }
.ml-hs { display: grid; grid-template-columns: minmax(0, 1fr); position: relative; }
.ml-hs > .ml-hero, .ml-hs > .ml-hero-s2 { grid-area: 1 / 1; min-width: 0; display: block; transition: opacity .35s ease, visibility .35s; }
.ml-hs > .is-off { opacity: 0; visibility: hidden; }
.ml-hs__ctl { position: absolute; left: 0; right: 0; bottom: 18px; z-index: 3; display: flex; justify-content: center; align-items: center; gap: 12px; }
.ml-hs__dot { width: 10px; height: 10px; padding: 0; border: 0; border-radius: 99px; background: rgba(255,255,255,.35); cursor: pointer; transition: width .2s, background .2s; }
.ml-hs__dot[aria-current="true"] { width: 28px; background: #35C8EA; }
.ml-hs__arr { width: 34px; height: 34px; padding: 0; border-radius: 50%; border: 1px solid rgba(255,255,255,.25); background: rgba(255,255,255,.08); color: #fff; font-size: 18px; line-height: 1; cursor: pointer; }
.ml-hs__arr:hover, .ml-hs__dot:hover { background: rgba(255,255,255,.22); }
.ml-hs__dot:focus-visible, .ml-hs__arr:focus-visible { outline: 2px solid #35C8EA; outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .ml-hs > .ml-hero, .ml-hs > .ml-hero-s2, .ml-hs__dot { transition: none; } }
