/* ============================================================
   mCloud — Shared Layout Shell styles
   Imported by every product-page template.
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--mc-color-bg); }

/* ---------- Header ---------- */
.mc-header {
  background: var(--mc-color-surface);
  border-bottom: 1px solid var(--mc-color-border);
  position: sticky; top: 0; z-index: 50;
  font-family: 'Inter', 'Noto Sans Myanmar', sans-serif;
}
.mc-header-inner {
  max-width: 1240px; margin: 0 auto; padding: 0 24px;
  height: 72px; display: flex; align-items: center; gap: 32px;
}
.mc-brand {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; color: inherit;
  min-height: var(--mc-touch-target-min); padding: 4px 0; flex-shrink: 0;
}
.mc-brand .mark {
  width: 32px; height: 32px; border-radius: 7px;
  background: var(--mc-color-primary); position: relative;
  box-shadow: inset 0 -6px 0 rgba(255,255,255,0.14);
}
.mc-brand .mark::before {
  content:""; position:absolute; inset: 7px 6px;
  border-radius: 5px 5px 10px 10px; background:#fff; opacity:0.94;
}
.mc-brand .word {
  font-weight: 700; font-size: 18px; letter-spacing: -0.01em;
  color: var(--mc-color-text); line-height: 1.2;
}
.mc-brand .word span { color: var(--mc-color-primary); }

.mc-nav { display: flex; align-items: center; gap: 4px; flex: 1; }
/* IMPORTANT: nav-item must NOT be positioned, so the mega-menu inside it
   anchors to the sticky .mc-header (full viewport width) instead of the
   narrow nav-item button. */
.nav-item { position: static; }
.nav-link {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: var(--mc-touch-target-min);
  padding: 0 14px;
  font-size: 14.5px; font-weight: 500;
  color: var(--mc-color-text-secondary);
  text-decoration: none;
  border-radius: 8px; cursor: pointer;
  background: transparent; border: 0;
  transition: color 120ms, background 120ms;
  line-height: 1.5;
  font-family: inherit;
}
.nav-link:hover, .nav-item:hover .nav-link {
  color: var(--mc-color-primary); background: var(--mc-color-primary-soft);
}
.nav-link svg { width: 16px; height: 16px; }

.mc-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

.lang-toggle {
  display: inline-flex; background: var(--mc-color-surface-alt);
  border-radius: 999px; padding: 4px;
  min-height: var(--mc-touch-target-min); align-items: center;
}
.lang-toggle .opt {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 12px; border-radius: 999px;
  font-size: 13px; font-weight: 600; color: var(--mc-color-text-secondary);
  cursor: pointer; background: transparent; border: 0;
  line-height: 1.5; font-family: inherit;
}
.lang-toggle .opt[aria-pressed="true"] {
  background: var(--mc-color-surface); color: var(--mc-color-text);
  box-shadow: 0 1px 2px rgba(17,24,39,0.08);
}
.flag { width: 18px; height: 12px; border-radius: 2px; overflow: hidden; display: block; flex-shrink: 0; line-height: 0; }
.flag svg { display: block; width: 100%; height: 100%; }

.mc-btn-ghost {
  min-height: var(--mc-touch-target-min); min-width: var(--mc-touch-target-min);
  padding: 0 16px; border: 0; background: transparent;
  border-radius: 8px; font-family: inherit;
  font-size: 14.5px; font-weight: 600; color: var(--mc-color-text);
  cursor: pointer; line-height: 1.5;
}
.mc-btn-ghost:hover { background: var(--mc-color-surface-alt); }

.mc-btn-primary {
  min-height: var(--mc-touch-target-min); min-width: var(--mc-touch-target-min);
  padding: 0 18px; background: var(--mc-color-primary); color: #fff;
  font-family: inherit; font-size: 14.5px; font-weight: 600;
  border: 0; border-radius: 8px;
  display: inline-flex; align-items: center; gap: 6px;
  cursor: pointer; line-height: 1.5;
  transition: background 120ms;
}
.mc-btn-primary:hover { background: var(--mc-color-primary-hover); }
.mc-btn-primary svg { width: 16px; height: 16px; }

.mc-btn-outline {
  min-height: var(--mc-touch-target-min); min-width: var(--mc-touch-target-min);
  padding: 0 18px;
  background: var(--mc-color-surface);
  color: var(--mc-color-primary);
  border: 1.5px solid var(--mc-color-border-strong);
  border-radius: 8px;
  font-family: inherit; font-size: 14.5px; font-weight: 600;
  cursor: pointer; line-height: 1.5;
  display: inline-flex; align-items: center; gap: 6px;
  transition: background 120ms, border-color 120ms;
}
.mc-btn-outline:hover {
  background: var(--mc-color-primary-soft);
  border-color: var(--mc-color-primary);
}

.m-toggle {
  display: none;
  width: 48px; height: 48px;
  border: 0; background: transparent; border-radius: 8px;
  color: var(--mc-color-text);
  align-items: center; justify-content: center; cursor: pointer;
}
.m-toggle svg { width: 22px; height: 22px; }

/* ---------- Mega menu ---------- */
.mega-menu {
  position: absolute; top: 100%; left: 0; right: 0;
  background: var(--mc-color-surface);
  border-top: 1px solid var(--mc-color-border);
  border-bottom: 1px solid var(--mc-color-border);
  box-shadow: 0 12px 32px rgba(17,24,39,0.08);
  padding: 20px 0 24px; z-index: 10;
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity 160ms, transform 160ms, visibility 160ms;
}
.nav-item.has-mega:hover .mega-menu {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.mega-inner {
  max-width: 1240px; margin: 0 auto; padding: 0 24px;
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px;
}
.mega-col { padding: 0 8px; border-right: 1px solid var(--mc-color-border); min-width: 0; }
.mega-col:last-child { border-right: 0; }
.mega-col h4 {
  margin: 4px 8px 10px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px; font-weight: 600;
  color: var(--mc-color-text-muted);
  text-transform: uppercase; letter-spacing: 0.08em; line-height: 1.5;
}
/* Vertical stack — icon above text — so labels get the full column width
   and don't wrap mid-word in a 7-column layout. */
.mega-item {
  display: flex; flex-direction: column; align-items: flex-start; gap: 8px;
  padding: 10px 8px; border-radius: 8px;
  text-decoration: none; color: inherit; min-height: 48px;
  transition: background 120ms;
}
.mega-item:hover { background: var(--mc-color-primary-soft); }
.mega-icon {
  width: 32px; height: 32px; border-radius: 8px;
  background: var(--mc-color-primary-soft); color: var(--mc-color-primary);
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: background 120ms, color 120ms;
}
.mega-icon svg { width: 20px; height: 20px; }
.mega-item:hover .mega-icon { background: var(--mc-color-primary); color: #fff; }
.mega-item .label {
  display: block;
  font-size: 13.5px; font-weight: 700; color: var(--mc-color-text);
  line-height: 1.4; letter-spacing: -0.005em;
}
.mega-item .desc {
  display: block; font-size: 11.5px; color: var(--mc-color-text-muted);
  line-height: 1.6; margin-top: 2px;
}

/* ---------- Mobile drawer ---------- */
.m-drawer {
  position: fixed; top: 72px; left: 0; right: 0; bottom: 0;
  background: var(--mc-color-surface);
  z-index: 49; overflow-y: auto;
  padding: 8px 0 40px;
  border-top: 1px solid var(--mc-color-border);
  display: none;
}
.m-drawer.is-open { display: block; }
.m-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 20px; min-height: 56px;
  font-size: 16px; font-weight: 600; color: var(--mc-color-text);
  border-bottom: 1px solid var(--mc-color-border);
  cursor: pointer; line-height: 1.5;
  font-family: inherit; background: transparent;
  border-left: 0; border-right: 0; border-top: 0;
  width: 100%; text-align: left;
}
.m-row > svg {
  width: 20px; height: 20px; color: var(--mc-color-text-muted);
  transition: transform 200ms; flex-shrink: 0;
}
.m-row.is-open > svg { transform: rotate(180deg); color: var(--mc-color-primary); }
.m-sub {
  background: var(--mc-color-surface-alt);
  display: none; border-bottom: 1px solid var(--mc-color-border);
}
.m-row.is-open + .m-sub { display: block; }
.m-sub a {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--mc-color-text);
  padding: 14px 24px 14px 28px;
  font-size: 14px; min-height: 48px; line-height: 1.5;
}
.m-sub a svg { width: 18px; height: 18px; color: var(--mc-color-primary); }
.m-sub a .lbl { font-weight: 600; font-size: 14px; }
.m-foot {
  padding: 20px; display: flex; flex-direction: column; gap: 10px;
  border-top: 1px solid var(--mc-color-border); margin-top: 4px;
}
.m-foot .lang-toggle { align-self: stretch; justify-content: center; }
.m-foot .mc-btn-primary, .m-foot .mc-btn-ghost { width: 100%; justify-content: center; }
.m-foot .mc-btn-ghost { border: 1px solid var(--mc-color-border-strong); }

/* ---------- Footer ---------- */
.mc-footer {
  background: #0B1220; color: #B0BBD0;
  font-family: 'Inter', 'Noto Sans Myanmar', sans-serif;
}
.mc-footer-inner { max-width: 1240px; margin: 0 auto; padding: 64px 24px 28px; }
.mc-foot-top {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr 1fr; gap: 32px;
}
@media (max-width: 900px) { .mc-foot-top { grid-template-columns: 1fr 1fr; } }
@media (max-width: 540px) { .mc-foot-top { grid-template-columns: 1fr; } }
.mc-foot-brand .word { font-weight: 700; font-size: 22px; color: #fff; line-height: 1.2; }
.mc-foot-brand .word span { color: #6F9FFF; }
.mc-foot-brand p { margin: 14px 0 0; font-size: 13px; line-height: 1.8; max-width: 30ch; }
.mc-foot-contact {
  margin-top: 24px;
  display: flex; flex-direction: column; gap: 12px;
  font-size: 13px; line-height: 1.8;
}
.mc-foot-contact .row { display: flex; gap: 10px; align-items: flex-start; }
.mc-foot-contact svg {
  width: 16px; height: 16px; color: #6F9FFF; flex-shrink: 0; margin-top: 4px;
}
.mc-foot-contact a { color: inherit; text-decoration: none; }
.mc-foot-contact a:hover { color: #fff; }
.mc-foot-col h5 {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; color: #fff;
  text-transform: uppercase; letter-spacing: 0.08em;
  margin: 0 0 16px; line-height: 1.5;
}
.mc-foot-col ul {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 10px;
}
.mc-foot-col a {
  color: #B0BBD0; text-decoration: none;
  font-size: 13.5px; line-height: 1.7;
}
.mc-foot-col a:hover { color: #fff; }
.mc-foot-bottom {
  margin-top: 48px; padding-top: 24px;
  border-top: 1px solid #1E293B;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
  font-size: 12.5px; line-height: 1.7; color: #8392AD;
}
.mc-foot-social { display: flex; align-items: center; gap: 8px; }
.mc-foot-social a {
  width: 40px; height: 40px;
  min-width: var(--mc-touch-target-min); min-height: var(--mc-touch-target-min);
  border-radius: 8px;
  background: #111A2E; color: #B0BBD0;
  display: inline-flex; align-items: center; justify-content: center;
  text-decoration: none; transition: background 120ms, color 120ms;
}
.mc-foot-social a:hover { background: #1877F2; color: #fff; }
.mc-foot-social a svg { width: 18px; height: 18px; }

/* ---------- Layout responsive collapse ---------- */
@media (max-width: 1024px) {
  .mc-nav, .mc-actions .lang-toggle, .mc-actions .mc-btn-ghost { display: none; }
  .mc-actions { margin-left: auto; }
  .m-toggle { display: inline-flex; }
}
@media (max-width: 720px) {
  .mc-actions .mc-btn-primary { display: none; }
}

/* ---------- Shared "wrap" container ---------- */
.wrap {
  max-width: 1240px; margin: 0 auto; padding: 0 24px;
  font-family: 'Inter', 'Noto Sans Myanmar', sans-serif;
}
