/**
 * Italy Made Easy — Header & Mega Menu Styles
 * ALL values from tokens.css — never hardcode.
 */

/* ─── Topbar Gradient ────────────────────────────────────── */

.ime-topbar {
    padding: 0 var(--sp-7);
  background: #1C3447;
  position: relative;
}

.tobar-inner {
	    max-width: var(--max-width-site);
    margin: 0 auto;
	text-align:right;

}

.ime-topbar-login {
    position: relative;
    transform: translateY(-50%);
    font-size: 0.8rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.80);
    text-decoration: none;
    white-space: nowrap;
    letter-spacing: 0.03em;
    transition: color 0.15s;
}

.ime-topbar-login:hover { color: #ffffff; }

/* ─── Header Shell ────────────────────────────────────────── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(232, 232, 232, 0.5);
  transition: background var(--transition-normal), box-shadow var(--transition-fast), border-color var(--transition-normal);
}

.site-header.scrolled {
  background: rgba(255, 255, 255, 0.97);
  border-bottom: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
}

.header-inner {
  max-width: var(--max-width-site);
  margin: 0 auto;
  /*padding: 0 var(--sp-7);*/
  height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ─── Logo ────────────────────────────────────────────────── */

.site-logo {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  text-decoration: none;
}

.site-logo img {
  height: 36px;
  width: auto;
}

/* ─── Primary Nav ─────────────────────────────────────────── */

.site-nav {
  flex: 1;
}

.nav-primary {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: var(--sp-1);
  justify-content: flex-end;
}

/* ─── Standard Nav Links ──────────────────────────────────── */

.nav-link {
  display: block;
  padding: 6px 13px;
  color: var(--color-text);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  text-decoration: none;
  border-radius: var(--r-pill);
  border: 1px solid transparent;
  transition: color var(--transition-fast), background-color var(--transition-fast);
  white-space: nowrap;
}

.nav-link:hover {
  color: var(--color-blue);
  background-color: rgba(0, 144, 255, 0.07);
  border-color: rgba(0, 144, 255, 0.15);
  text-decoration: none;
}

/* ─── Log In Link ─────────────────────────────────────────── */

.nav-login {
  display: block;
  padding: 6px 13px;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--color-muted);
  text-decoration: none;
  white-space: nowrap;
}

.nav-login:hover {
  color: var(--color-text);
  text-decoration: none;
}

/* ─── Mega Trigger Button ─────────────────────────────────── */

.nav-trigger {
  display: flex;
  align-items: center;
  gap: var(--sp-1);
  padding: 6px 13px;
  background: none;
  border: 1px solid transparent;
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  border-radius: var(--r-pill);
  cursor: pointer;
  transition: color var(--transition-fast), background-color var(--transition-fast), border-color var(--transition-fast);
  white-space: nowrap;
}

.nav-trigger:hover,
.has-mega-menu.is-open .nav-trigger {
  color: var(--color-blue);
  background-color: rgba(0, 144, 255, 0.07);
  border-color: rgba(0, 144, 255, 0.15);
}

.nav-chevron {
  font-size: 13px;
  opacity: 0.65;
  transition: transform var(--transition-fast);
}

.has-mega-menu.is-open .nav-chevron {
  transform: rotate(180deg);
}

/* ─── CTA in Nav ──────────────────────────────────────────── */

.nav-cta {
  margin-left: var(--sp-2);
}

.nav-cta .btn {
  /* V4: Orbit — ghost with spinning gradient border */
  padding: 10px 24px;
  font-size: var(--font-size-sm);
  font-weight: 600;
  letter-spacing: 0.04em;
  border-radius: var(--r-sm);
  box-shadow: none;
  background: transparent;
}

/* Nav CTA: gradient border via background-clip trick */
@property --nav-orbit-angle {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}

@keyframes nav-orbit-spin {
  to { --nav-orbit-angle: 360deg; }
}

.nav-cta .btn-orbit {
  color: #ffffff !important;
  background:
    linear-gradient(#1C3447, #1C3447) padding-box,
    conic-gradient(from var(--nav-orbit-angle), #0090FF, #E93D82, #F7DE15, #1C3447, #0090FF) border-box !important;
  border: 3px solid transparent !important;
  border-radius: 8px !important;
  box-shadow: none !important;
  overflow: hidden !important;
  animation: nav-orbit-spin 3s linear infinite !important;
}
.nav-cta .btn-orbit::before {
  display: none !important;
}
.nav-cta .btn-orbit::after {
  display: none !important;
}

/* ─── Mega Panel ──────────────────────────────────────────── */

.has-mega-menu {
  position: static;
}

.mega-panel {
  position: fixed;
  top: var(--mega-panel-top, 99px); /* set dynamically by menu.js */
  left: 50%;
  transform: translateX(-50%) translateY(-4px);
  width: min(calc(100vw - 32px), 1280px);
  z-index: 201;
  background: var(--color-white);
  border-radius: var(--r-lg);
  border: 1px solid rgba(28, 52, 71, 0.15);
  box-shadow: 0 20px 60px rgba(28, 52, 71, 0.22), 0 8px 24px rgba(28, 52, 71, 0.08);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-normal), transform var(--transition-normal);
  overflow: hidden;
}

.has-mega-menu.is-open .mega-panel {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

@media screen and (max-width: 782px) {
  /* admin-bar top handled dynamically by menu.js */
}

/* ─── Mega Grid Layouts ───────────────────────────────────── */

.mega-grid {
  display: grid;
}

.mega-grid-3 {
  grid-template-columns: 1.1fr 1.8fr 0.9fr;
}

.mega-grid-2 {
  grid-template-columns: 1.2fr 1fr;
}

/* ─── Mega Columns ────────────────────────────────────────── */

.mega-col {
  padding: 28px 24px;
}

.mega-col + .mega-col {
  border-left: 1px solid var(--color-border);
}

.mega-col-title {
  font-size: 12.5px;
  font-weight: var(--font-weight-bold);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-muted);
  margin-bottom: 18px;
}

.mega-col-divider {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--color-border);
}

/* ─── Assessment Card ─────────────────────────────────────── */

.mega-assessment {
  display: block;
  background: linear-gradient(135deg, rgba(0,144,255,0.08), rgba(107,79,196,0.08));
  border-radius: var(--r-md);
  padding: 16px 54px 16px 18px;
  margin-bottom: 14px;
  border: 1px solid rgba(0,144,255,0.18);
  text-decoration: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.mega-assessment:hover {
  border-color: rgba(0,144,255,0.35);
  box-shadow: 0 4px 16px rgba(0,144,255,0.1);
  text-decoration: none;
}

.mega-assessment-name {
  font-weight: var(--font-weight-extrabold);
  font-size: 0.95rem;
  color: var(--color-text);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.mega-assessment-desc {
  font-size: 0.84rem;
  color: var(--color-muted);
  line-height: 1.5;
}

.mega-assessment-cta {
  display: inline-block;
  margin-top: 8px;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-bold);
  color: var(--color-blue);
}

/* ─── Mega Items (Links) ──────────────────────────────────── */

.mega-item {
  display: block;
  padding: 8px 12px;
  border-radius: var(--r-sm);
  margin-bottom: 2px;
  text-decoration: none;
  transition: background var(--transition-fast);
}

.mega-item:hover {
  background: rgba(0,144,255,0.04);
  text-decoration: none;
}

.mega-item-name {
  font-weight: var(--font-weight-bold);
  font-size: 0.82rem;
  color: var(--color-text);
  margin-bottom: 2px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.mega-item-desc {
  font-size: var(--font-size-sm);
  color: var(--color-muted);
  line-height: 1.45;
}

/* ─── Featured Mega Items (bordered + arrow) ─────────────── */

.mega-item--featured {
  border: 1px solid rgba(0, 0, 0, 0.07);
  margin-bottom: 9px;
}

.mega-item--featured:hover {
  border-color: rgba(0, 144, 255, 0.2);
}

/* ─── Clickable Card Right-Side Indicator ─────────────────── */

.mega-assessment,
.mega-item--featured,
.mega-dream {
  position: relative;
  padding-right: 54px;
}

.mega-item-footer {
  position: absolute;
  top: 14px;
  right: 0;
  bottom: 14px;
  width: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-left: 1px solid var(--color-border);
}

.mega-item-footer-chevron {
  font-size: 1.1rem;
  font-weight: var(--font-weight-bold);
  color: var(--color-blue);
  opacity: 0.65;
  transition: transform var(--transition-fast), opacity var(--transition-fast);
  display: inline-block;
}

.mega-assessment:hover .mega-item-footer-chevron,
.mega-item--featured:hover .mega-item-footer-chevron,
.mega-dream:hover .mega-item-footer-chevron {
  transform: translateX(3px);
  opacity: 1;
}


/* ─── Badges ──────────────────────────────────────────────── */

.mega-item-badge {
  font-size: 10px;
  font-weight: var(--font-weight-bold);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: var(--r-pill);
  white-space: nowrap;
}

.badge-free { background: #ECFDF5; color: #047857; }
.badge-new  { background: #FFF0F7; color: #C01050; }
.badge-paid { background: #FEFCE8; color: #92700A; }
.badge-quiz { background: linear-gradient(135deg, #0090FF, #6B4FC4); color: white; }

/* ─── Fluency Levels ──────────────────────────────────────── */

.fluency-levels {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.fluency-level {
  padding: 10px 14px;
  border-radius: var(--r-sm);
  display: flex;
  gap: 12px;
  align-items: flex-start;
  text-decoration: none;
  transition: all var(--transition-fast);
}

.fluency-level:hover {
  transform: translateX(3px);
  text-decoration: none;
}

.fl-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: var(--font-weight-extrabold);
  color: white;
  flex-shrink: 0;
  margin-top: 1px;
}

.fl-info { flex: 1; }
.fl-name { font-weight: var(--font-weight-bold); font-size: 0.82rem; color: var(--color-text); }
.fl-sub  { font-size: 0.72rem; color: var(--color-blue); font-weight: var(--font-weight-semibold); font-style: italic; }
.fl-outcome { font-size: 0.72rem; color: var(--color-muted); line-height: 1.4; margin-top: 2px; }

.fl-1 .fl-num { background: #0090FF; }  .fl-1:hover { background: rgba(0,144,255,0.04); }
.fl-2 .fl-num { background: #2B7DE9; }  .fl-2:hover { background: rgba(43,125,233,0.04); }
.fl-3 .fl-num { background: #6B4FC4; }  .fl-3:hover { background: rgba(107,79,196,0.04); }
.fl-4 .fl-num { background: #C0408A; }  .fl-4:hover { background: rgba(192,64,138,0.04); }
.fl-5 .fl-num { background: #E93D82; }  .fl-5:hover { background: rgba(233,61,130,0.04); }

/* ─── Visual Column ───────────────────────────────────────── */

.mega-visual {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.mega-visual-img {
  flex: 1;
  border-radius: var(--r-md);
  overflow: hidden;
  margin-bottom: 14px;
}

.mega-visual-img-placeholder {
  width: 100%;
  height: 100%;
  min-height: 220px;
  background: linear-gradient(145deg, rgba(0,144,255,0.12) 0%, rgba(233,61,130,0.12) 50%, rgba(247,222,21,0.08) 100%);
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
}

.mega-visual-img-text {
  font-size: 0.72rem;
  color: var(--color-muted);
  text-align: center;
  padding: 12px;
  font-style: italic;
}

.mega-visual-cta {
  display: block;
  background: var(--grad-primary);
  color: white;
  padding: 10px 16px;
  border-radius: var(--r-sm);
  font-size: 0.78rem;
  font-weight: var(--font-weight-bold);
  text-align: center;
  text-decoration: none;
}

.mega-visual-cta:hover {
  text-decoration: none;
  opacity: 0.92;
}

.mega-visual-sub {
  font-size: 0.7rem;
  color: var(--color-muted);
  text-align: center;
  margin-top: 6px;
}

/* ─── Platform Slideshow ──────────────────────────────── */

.mp-slideshow {
  position: relative;
  width: 100%;
  flex: 1;
  margin-bottom: 14px;
  overflow: hidden;
  border-radius: var(--r-md);
}

.mp-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-start;
  opacity: 0;
  animation: mpFade 14.4s infinite;
}
.mp-slide:nth-child(1) { animation-delay: 0s; }
.mp-slide:nth-child(2) { animation-delay: 3.6s; }
.mp-slide:nth-child(3) { animation-delay: 7.2s; }
.mp-slide:nth-child(4) { animation-delay: 10.8s; }

@keyframes mpFade {
  0%   { opacity: 0; transform: translateY(6px); }
  2%   { opacity: 1; transform: translateY(0); }
  23%  { opacity: 1; transform: translateY(0); }
  27%  { opacity: 0; transform: translateY(-4px); }
  100% { opacity: 0; }
}

.mp-card {
  background: #FFFFFF;
  border-radius: 14px;
  box-shadow: 0 6px 28px rgba(28,52,71,0.10), 0 2px 8px rgba(28,52,71,0.04);
  width: 100%;
  padding: 16px 14px;
  overflow: hidden;
}

.mp-label {
  display: inline-block;
  color: white;
  font-size: 0.5rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 3px 10px;
  border-radius: 12px;
  text-transform: uppercase;
  margin-bottom: 8px;
}

/* Dots */
.mp-dots {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin-bottom: 10px;
}
.mp-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(28,52,71,0.12);
  position: relative;
  overflow: hidden;
}
.mp-dot::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--color-blue);
  opacity: 0;
  animation: mpDotPulse 14.4s infinite;
}
.mp-dot:nth-child(1)::after { animation-delay: 0s; }
.mp-dot:nth-child(2)::after { animation-delay: 3.6s; }
.mp-dot:nth-child(3)::after { animation-delay: 7.2s; }
.mp-dot:nth-child(4)::after { animation-delay: 10.8s; }

@keyframes mpDotPulse {
  0%   { opacity: 0; }
  2%   { opacity: 1; }
  23%  { opacity: 1; }
  27%  { opacity: 0; }
  100% { opacity: 0; }
}

/* Dashboard slide */
.mp-dash-phase { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; }
.mp-dash-phase-num { width: 18px; height: 18px; background: var(--color-blue); color: white; border-radius: 5px; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 0.5rem; }
.mp-dash-phase-label { font-size: 0.5rem; color: var(--color-blue); font-weight: 600; letter-spacing: 0.5px; text-transform: uppercase; }
.mp-dash-course { font-size: 0.72rem; font-weight: 800; color: var(--color-text); margin-bottom: 2px; }
.mp-dash-unit { font-size: 0.5rem; color: var(--color-muted); margin-bottom: 8px; }
.mp-dash-progress-text { font-size: 0.5rem; color: var(--color-muted); margin-bottom: 4px; display: block; }
.mp-dash-progress-text strong { color: var(--color-text); }
.mp-dash-bar { width: 100%; height: 4px; background: #E8EDF2; border-radius: 3px; overflow: hidden; margin-bottom: 10px; }
.mp-dash-bar-fill { height: 100%; background: var(--color-blue); border-radius: 3px; }
.mp-dash-stats { display: flex; gap: 6px; }
.mp-dash-stat { flex: 1; background: #F8FAFC; border-radius: 8px; padding: 8px 6px; text-align: center; }
.mp-dash-stat-icon { font-size: 12px; margin-bottom: 1px; }
.mp-dash-stat-num { font-size: 0.88rem; font-weight: 800; color: var(--color-text); }
.mp-dash-stat-label { font-size: 0.4rem; color: var(--color-muted); text-transform: uppercase; letter-spacing: 0.3px; }

/* Next lesson card inside dashboard */
.mp-next-lesson { margin-top: 10px; padding-top: 10px; border-top: 1px solid rgba(28,52,71,0.06); }
.mp-next-label { font-size: 0.44rem; color: var(--color-muted); text-transform: uppercase; letter-spacing: 0.5px; display: block; margin-bottom: 6px; }
.mp-next-row { display: flex; align-items: center; gap: 8px; }
.mp-next-info { flex: 1; }
.mp-next-title { font-size: 0.58rem; font-weight: 700; color: var(--color-text); margin-bottom: 1px; }
.mp-next-course { font-size: 0.44rem; color: var(--color-muted); }
.mp-next-btn { background: var(--grad-primary); color: white; font-size: 0.44rem; font-weight: 700; padding: 6px 10px; border-radius: 8px; white-space: nowrap; flex-shrink: 0; }

/* Fluency Path slide */
.mp-fluency-title { font-size: 0.66rem; font-weight: 700; color: var(--color-text); margin-bottom: 8px; }
.mp-phase { display: flex; align-items: center; gap: 7px; padding: 6px 8px; border-radius: 8px; margin-bottom: 4px; background: #FAFBFC; border: 1px solid rgba(28,52,71,0.04); }
.mp-phase-circle { width: 22px; height: 22px; border-radius: 6px; display: flex; align-items: center; justify-content: center; color: white; font-weight: 800; font-size: 0.6rem; flex-shrink: 0; }
.mp-phase-name { font-weight: 700; font-size: 0.58rem; }
.mp-phase-sub { font-size: 0.44rem; color: var(--color-muted); }
.mp-phase-bar { width: 36px; height: 3px; border-radius: 2px; background: #E8EDF2; overflow: hidden; flex-shrink: 0; }
.mp-phase-bar-fill { height: 100%; border-radius: 2px; }

/* Video Lesson slide */
.mp-lesson-thumb { width: 100%; aspect-ratio: 16/9; border-radius: 8px; overflow: hidden; position: relative; margin-bottom: 10px; background: #e8edf2; }
.mp-lesson-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mp-lesson-play { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 40px; height: 40px; border-radius: 50%; background: rgba(28,52,71,0.45); backdrop-filter: blur(4px); border: 2px solid rgba(255,255,255,0.30); display: flex; align-items: center; justify-content: center; }
.mp-lesson-play svg { width: 14px; height: 14px; margin-left: 2px; }
.mp-lesson-title { font-size: 0.66rem; font-weight: 700; color: var(--color-text); margin-bottom: 2px; }
.mp-lesson-meta { font-size: 0.5rem; color: var(--color-muted); }
.mp-lesson-list { margin-top: 10px; padding-top: 10px; border-top: 1px solid rgba(28,52,71,0.06); display: flex; flex-direction: column; gap: 4px; }
.mp-lesson-item { font-size: 0.5rem; color: var(--color-muted); display: flex; align-items: center; gap: 6px; padding: 4px 6px; border-radius: 6px; }
.mp-lesson-item-check { color: #34C759; font-size: 0.55rem; font-weight: 700; }
.mp-lesson-item-active { background: rgba(0,144,255,0.06); color: var(--color-blue); font-weight: 600; }
.mp-lesson-item-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--color-blue); flex-shrink: 0; }
.mp-lesson-item-locked { opacity: 0.45; }
.mp-lesson-item-lock { font-size: 0.44rem; }

/* Community slide */
.mp-comm-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.mp-comm-title { font-size: 0.72rem; font-weight: 700; color: var(--color-text); }
.mp-comm-count { font-size: 0.5rem; color: var(--color-muted); }
.mp-post { border: 1px solid rgba(28,52,71,0.06); border-radius: 10px; padding: 10px; }
.mp-post-author { display: flex; align-items: center; gap: 7px; margin-bottom: 6px; }
.mp-avatar { width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.5rem; color: white; flex-shrink: 0; }
.mp-author-name { font-weight: 600; font-size: 0.55rem; color: var(--color-text); }
.mp-author-meta { font-size: 0.44rem; color: var(--color-muted); }
.mp-post-text { font-size: 0.55rem; color: var(--color-text); line-height: 1.5; font-weight: 300; }
.mp-post-photo { margin-top: 8px; border-radius: 6px; overflow: hidden; }
.mp-post-photo img { width: 100%; height: 70px; object-fit: cover; display: block; border-radius: 6px; }
.mp-post-reactions { display: flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 0.5rem; color: rgba(28,52,71,0.35); }

/* ─── Mega Footer ─────────────────────────────────────────── */

.mega-footer {
  background: rgba(28,52,71,0.025);
  padding: 14px 28px;
  border-top: 1px solid var(--color-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.mega-footer-text {
  font-size: 0.78rem;
  color: var(--color-muted);
}

.mega-footer-link {
  font-size: 0.78rem;
  font-weight: var(--font-weight-bold);
  color: var(--color-blue);
  text-decoration: none;
  white-space: nowrap;
}

.mega-footer-link:hover {
  text-decoration: underline;
}

/* ─── Mobile Toggle ───────────────────────────────────────── */

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: var(--sp-2);
  cursor: pointer;
  margin-left: auto;
}

.nav-toggle span {
  display: block;
  width: 28px;
  height: 2.5px;
  background: var(--color-text);
  border-radius: 2px;
  transition: transform var(--transition-normal), opacity var(--transition-fast);
}

.nav-toggle.is-active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.is-active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.is-active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ─── Mobile Menu Overlay ─────────────────────────────────── */

.mobile-menu {
  display: none;
  position: fixed;
  top: var(--mobile-menu-top, 82px);
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 199;
  background: var(--color-white);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.mobile-menu.is-open {
  display: block;
}

.admin-bar .mobile-menu {
  top: calc(var(--mobile-menu-top, 82px) + 32px);
}

.mobile-menu-inner {
  padding: var(--sp-5) var(--sp-5) 100px;
}

.mobile-login {
  display: block;
  padding: var(--sp-3) 0;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--color-muted);
  text-decoration: none;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: var(--sp-3);
}

/* ─── Mobile Accordion ────────────────────────────────────── */

.mobile-accordion {
  border-bottom: 1px solid var(--color-border);
}

.mobile-accordion-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: var(--sp-4) 0;
  background: none;
  border: none;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: var(--font-weight-bold);
  color: var(--color-text);
  cursor: pointer;
}

.mobile-accordion-trigger .nav-chevron {
  transition: transform var(--transition-normal);
}

.mobile-accordion.is-open .mobile-accordion-trigger .nav-chevron {
  transform: rotate(180deg);
}

.mobile-accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-accordion.is-open .mobile-accordion-content {
  max-height: 1200px;
}

.mega-assessment--mobile {
  margin: 0 0 var(--sp-3);
}

.mobile-fluency-levels {
  margin-bottom: var(--sp-3);
}

.mobile-quick-link {
  display: block;
  padding: var(--sp-2) 0;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text);
  text-decoration: none;
}

.mobile-quick-link:hover {
  color: var(--color-blue);
}

.mobile-quick-link--accent {
  color: var(--color-blue);
  font-weight: var(--font-weight-bold);
  margin-top: var(--sp-2);
  padding-bottom: var(--sp-4);
}

/* ─── Mobile Nav Links ────────────────────────────────────── */

.mobile-nav-link {
  display: block;
  padding: var(--sp-4) 0;
  font-size: 1rem;
  font-weight: var(--font-weight-bold);
  color: var(--color-text);
  text-decoration: none;
  border-bottom: 1px solid var(--color-border);
}

.mobile-nav-link:hover {
  color: var(--color-blue);
}

/* ─── Mobile Resource Links ───────────────────────────────── */

.mobile-resource-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-3) 0;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text);
  text-decoration: none;
  border-bottom: 1px solid var(--color-border);
}

.mobile-resource-link:last-child {
  border-bottom: none;
}

.mobile-resource-link:hover {
  color: var(--color-blue);
}

/* ─── Mobile Sticky CTA Bar ──────────────────────────────── */

.mobile-cta-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--color-white);
  padding: var(--sp-3) var(--sp-5);
  border-top: 1px solid var(--color-border);
  box-shadow: 0 -4px 12px rgba(28,52,71,0.08);
  z-index: 200;
  display: none;
}

.mobile-cta-bar.is-visible {
  display: block;
}

.mobile-cta-btn {
  display: block;
  width: 100%;
  text-align: center;
}

/* ─── Responsive ──────────────────────────────────────────── */

@media (max-width: 900px) {
  .ime-topbar {
    display: none;
  }

  .header-inner {
    padding: 0 var(--sp-5);
  }

  .site-nav {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }

  .mega-visual {
    display: none !important;
  }

}

/* Join Now CTA inside mobile menu */
.mobile-menu-join-now {
  display: block;
  width: 100% !important;
  text-align: center;
  margin: 20px 0 8px;
  padding: 14px 24px;
  font-size: var(--font-size-md);
  font-weight: 700;
  box-shadow: 0 4px 16px rgba(0, 144, 255, 0.35);
}

/* Member Login — last item, discreet */
.mobile-nav-link--login {
  color: #6B7280;
  font-size: var(--font-size-caption);
  font-weight: 400;
  border-top: 1px solid var(--color-border);
  padding-top: 14px;
  margin-top: 4px;
  text-align: center;
}

/* ─── Logo Visibility ────────────────────────────────────── */

/* Default: hide white logo everywhere */
.logo-white { display: none; }

/* ─── Resources 3-col Grid ────────────────────────────────── */

.mega-grid-3r {
  grid-template-columns: 1.2fr 1fr 0.9fr;
}

/* ─── Dream / Value Prop Card ─────────────────────────────── */

.mega-dream {
  display: block;
  background: linear-gradient(135deg, rgba(0,144,255,0.07), rgba(107,79,196,0.07));
  border: 1px solid rgba(0,144,255,0.18);
  border-radius: var(--r-md);
  padding: 16px 54px 16px 16px;
  text-decoration: none;
  color: inherit;
  margin-bottom: 14px;
  transition: border-color 0.18s, box-shadow 0.18s, background 0.18s;
}

.mega-dream:hover {
  border-color: rgba(0,144,255,0.35);
  box-shadow: 0 4px 16px rgba(0,144,255,0.1);
  background: linear-gradient(135deg, rgba(0,144,255,0.11), rgba(107,79,196,0.09));
  text-decoration: none;
  color: inherit;
}

.mega-dream-label {
  font-size: 11px;
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-blue);
  margin-bottom: 6px;
}

.mega-dream-headline {
  font-size: 0.96rem;
  font-weight: var(--font-weight-extrabold);
  color: var(--color-heading);
  line-height: 1.35;
  margin-bottom: 6px;
}

.mega-dream-desc {
  font-size: 0.84rem;
  color: var(--color-muted);
  line-height: 1.5;
  margin-bottom: 10px;
}

.mega-dream .mega-assessment-cta {
  font-size: 0.86rem;
  font-weight: var(--font-weight-bold);
  color: var(--color-blue);
  margin-top: 0;
}

/* ─── Testimonials ────────────────────────────────────────── */

.mega-testimonial {
  background: rgba(255,255,255,0.7);
  border-radius: var(--r-md);
  padding: 8px 12px;
  margin: 0 50px 8px;
}

.mega-testimonial:last-child { margin-bottom: 0; }

.mega-testimonial-stars {
  font-size: 0.78rem;
  color: #F59E0B;
  letter-spacing: 1px;
  margin-bottom: 3px;
}

.mega-testimonial-quote {
  font-size: 0.84rem;
  color: var(--color-text);
  line-height: 1.4;
  font-style: italic;
  margin-bottom: 3px;
}

.mega-testimonial-author {
  font-size: 0.78rem;
  color: var(--color-muted);
  font-weight: var(--font-weight-bold);
}

/* ─── Footer Testimonial ──────────────────────────────────── */

.mega-footer-testimonial {
  font-size: 0.78rem;
  color: var(--color-muted);
  font-style: italic;
  line-height: 1.5;
}

.mega-footer-testimonial span {
  font-size: 0.72rem;
  font-style: normal;
  font-weight: var(--font-weight-bold);
  color: rgba(0, 0, 0, 0.45);
}

/* ─── Layered Visual Column ───────────────────────────────── */

.mega-visual-img-layered {
  flex: 1;
  border-radius: var(--r-md);
  overflow: hidden;
  margin-bottom: 14px;
  position: relative;
  min-height: 220px;
}

.mega-visual-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mega-visual-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 30, 45, 0.38);
}

.mega-visual-manu {
  position: absolute;
  bottom: 0;
  right: 0;
  height: 100%;
  width: auto;
  max-width: 85%;
  object-fit: contain;
  object-position: bottom right;
}

/* ================================================
   OPTION H — Mega Menu "Learn Italian"
   ================================================ */

#mega-learn.mega-panel {
  width: min(calc(100vw - 32px), 1280px) !important;
}

.mega-h-wrapper {
  display: grid;
  grid-template-columns: 55% 45%;
  grid-template-rows: 1fr auto;
  height: 480px;
}

/* Nav links column */
.mega-h-nav {
  padding: 20px 24px;
  border-right: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Individual link card */
.mega-h-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid rgba(28, 52, 71, 0.13);
  margin-bottom: 8px;
  text-decoration: none;
  color: inherit;
  transition: background 0.2s, border-color 0.2s;
}

.mega-h-link:hover {
  background: rgba(0, 144, 255, 0.04);
  border-color: rgba(0, 144, 255, 0.2);
  text-decoration: none;
  color: inherit;
}

/* Icon squares */
.mega-h-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.mega-h-icon--blue  { background: rgba(0, 144, 255, 0.06); color: var(--color-blue); }
.mega-h-icon--pink  { background: rgba(233, 61, 130, 0.06); color: #E93D82; }
.mega-h-icon--navy  { background: rgba(28, 52, 71, 0.05);  color: var(--color-navy); }
.mega-h-icon--gold  { background: rgba(251, 191, 36, 0.08); color: #D97706; }

.mega-h-link-text { flex: 1; }

.mega-h-link-title {
  font-size: 0.95rem;
  font-weight: var(--font-weight-bold);
  color: var(--color-text);
  margin-bottom: 2px;
}

.mega-h-link-desc {
  font-size: 0.82rem;
  color: var(--color-muted);
  line-height: 1.4;
}

/* Chevron */
.mega-h-chevron {
  color: var(--color-blue);
  font-size: 20px;
  font-weight: 600;
  opacity: 0.35;
  transition: opacity 0.2s, transform 0.2s;
  flex-shrink: 0;
  margin-left: 8px;
}

.mega-h-link:hover .mega-h-chevron {
  opacity: 1;
  transform: translateX(3px);
}

/* CTA Image column — spans both rows */
.mega-h-cta {
  display: block;
  position: relative;
  overflow: hidden;
  background: #1C3447;
  border-radius: 0 var(--r-lg) var(--r-lg) 0;
  grid-column: 2;
  grid-row: 1 / 3;
}

.mega-h-cta-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 5%;
  display: block;
}

/* Quiz bar */
.mega-h-quiz {
  grid-column: 1;
  background: rgba(28, 52, 71, 0.025);
  padding: 12px 24px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-top: 1px solid var(--color-border);
}

.mega-h-quiz-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(0, 144, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.mega-h-quiz-text {
  font-size: 0.82rem;
  white-space: nowrap;
  color: var(--color-text);
}

.mega-h-quiz-text span {
  color: var(--color-muted);
}

.mega-h-quiz-cta {
  margin-left: auto;
  font-size: 0.82rem;
  font-weight: var(--font-weight-bold);
  color: var(--color-blue);
  text-decoration: none;
  white-space: nowrap;
}

.mega-h-quiz-cta:hover {
  text-decoration: underline;
}

/* Resources panel — 3 columns */
#mega-resources.mega-panel {
  width: min(calc(100vw - 32px), 1340px) !important;
}

.mega-r-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr 38%;
  grid-template-rows: 1fr auto;
  /*height: 468px;*/
}

.mega-r-wrapper .mega-h-cta-img {
  object-fit: cover;
  object-position: right center;
}

.mega-r-col1 {
  justify-content: flex-start;
}

.mega-r-col2 {
  justify-content: flex-start;
}

.mega-r-img {
  grid-column: 3;
  grid-row: 1 / 3;
}

.mega-r-quiz {
  grid-column: 1 / 3;
}

/* Hide old 3-col grid when H is active */
#mega-learn .mega-grid-3 {
  display: none;
}

/* Responsive: hide image column on small screens */
@media (max-width: 900px) {
  .mega-h-wrapper {
    grid-template-columns: 1fr;
  }
  .mega-h-cta {
    display: none;
  }
  .mega-h-nav {
    border-right: none;
  }
  .mega-h-quiz-text {
    white-space: normal;
  }
}
