/* =========================================================================
   MMOLogin Solutions — SHARED SITE CHROME (header · nav · footer)
   Self-contained & namespaced (mm-*). Hardcoded brand values so it can be
   loaded by ANY page (index.html + home.css, products.html + styles.css)
   without colliding with that page's own stylesheet.
   Load AFTER the page stylesheet. Identical markup on every page.
   Active nav item is selected via <body data-page="home|products|services|projects|about">.
   Reused IDs (siteHeader / navToggle / primaryNav) keep shared
   chrome.js header/drawer logic working across every page.
   ========================================================================= */

.mm-header, .mm-header *, .mm-footer, .mm-footer * { box-sizing: border-box; }

/* ---------- Header shell ---------- */
.mm-header{
  position:fixed; inset:0 0 auto 0; z-index:100;
  padding:16px 0;
  transition:background .28s cubic-bezier(.4,0,.2,1), box-shadow .28s, padding .28s;
}
.mm-header.scrolled{
  background:rgba(255,255,255,.96); backdrop-filter:blur(12px);
  box-shadow:0 6px 20px rgba(11,27,43,.08); padding:10px 0;
}
.mm-header-inner{
  width:100%; max-width:1200px; margin-inline:auto;
  padding-inline:clamp(18px,4vw,32px);
  display:flex; align-items:center; justify-content:space-between; gap:24px;
}

/* ---------- Brand (logo swaps light↔dark on scroll) — framed with animated glow ---------- */
.mm-brand{
  display:inline-flex; align-items:center;
  padding:9px 18px; border-radius:14px;
  border:1.5px solid rgba(255,255,255,.28);
  background:transparent;
  position:relative; isolation:isolate; overflow:hidden;
  transition:border-color .3s, box-shadow .3s;
}
/* sweeping sheen that travels across the frame */
.mm-brand::before{
  content:""; position:absolute; inset:0; z-index:-1; border-radius:inherit;
  background:linear-gradient(115deg,transparent 20%,rgba(220,228,0,.22) 45%,rgba(150,71,219,.28) 55%,transparent 80%);
  background-size:250% 100%; background-position:200% 0;
  animation:brandSheen 5.5s ease-in-out infinite;
}
/* soft rotating conic glow on the border */
.mm-brand::after{
  content:""; position:absolute; inset:-1.5px; z-index:-2; border-radius:inherit; padding:1.5px;
  background:conic-gradient(from 0deg,rgba(220,228,0,.0),rgba(220,228,0,.55),rgba(150,71,219,.55),rgba(94,87,234,.0),rgba(220,228,0,.0));
  -webkit-mask:linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);
  -webkit-mask-composite:xor; mask-composite:exclude;
  opacity:.0; transition:opacity .3s; animation:brandSpin 6s linear infinite;
}
.mm-brand:hover{border-color:rgba(220,228,0,.6); box-shadow:0 8px 26px rgba(150,71,219,.28);}
.mm-brand:hover::after{opacity:1;}
@keyframes brandSheen{0%{background-position:200% 0;}55%,100%{background-position:-120% 0;}}
@keyframes brandSpin{to{transform:rotate(360deg);}}
.mm-logo{height:44px; width:auto; display:block;}
.mm-logo-dark{display:none;}
.mm-header.scrolled .mm-brand{border-color:#d7deec; background:transparent;}
.mm-header.scrolled .mm-logo-light{display:none;}
.mm-header.scrolled .mm-logo-dark{display:block;}
@media (prefers-reduced-motion:reduce){
  .mm-brand::before,.mm-brand::after{animation:none;}
}

/* ---------- Nav ---------- */
.mm-nav{display:flex; align-items:center; gap:clamp(14px,2vw,26px);}
.mm-nav-list{display:flex; align-items:center; gap:2px; list-style:none; margin:0; padding:0;}
.mm-nav-list a{
  display:inline-block; padding:9px 14px; border-radius:8px;
  font-family:inherit; font-size:14px; font-weight:500;
  color:rgba(255,255,255,.92); white-space:nowrap;
  transition:color .28s, background .28s;
}
.mm-nav-list a:hover{color:#dce400;}
.mm-header.scrolled .mm-nav-list a{color:#0b2439;}
.mm-header.scrolled .mm-nav-list a:hover{color:#9647db;}

/* active item (driven by body[data-page]) */
body[data-page="home"]     .mm-nav-list a[data-nav="home"],
body[data-page="products"] .mm-nav-list a[data-nav="products"],
body[data-page="services"] .mm-nav-list a[data-nav="services"],
body[data-page="projects"] .mm-nav-list a[data-nav="projects"],
body[data-page="about"]    .mm-nav-list a[data-nav="about"]{
  color:#dce400; font-weight:600;
}
body[data-page="home"]     .mm-header.scrolled .mm-nav-list a[data-nav="home"],
body[data-page="products"] .mm-header.scrolled .mm-nav-list a[data-nav="products"],
body[data-page="services"] .mm-header.scrolled .mm-nav-list a[data-nav="services"],
body[data-page="projects"] .mm-header.scrolled .mm-nav-list a[data-nav="projects"],
body[data-page="about"]    .mm-header.scrolled .mm-nav-list a[data-nav="about"]{
  color:#9647db;
}

/* ---------- Right-side actions: Language + Dashboard ---------- */
.mm-nav-actions{display:flex; align-items:center; gap:10px;}

/* Language switcher — desktop shows the flag ICON ONLY */
.mm-lang-wrap{position:relative; display:inline-flex;}
.mm-lang{
  display:inline-flex; align-items:center; justify-content:center; gap:0;
  width:44px; height:38px; padding:0; border-radius:8px;
  font-family:inherit; font-size:13px; font-weight:500; color:#fff;
  background:rgba(255,255,255,.10); border:1px solid rgba(255,255,255,.22);
  cursor:pointer; transition:background .28s, color .28s, border-color .28s;
}
.mm-lang .mm-flag{width:24px; height:16px; border-radius:3px; flex-shrink:0; display:block; box-shadow:0 0 0 1px rgba(0,0,0,.08);}
.mm-lang .mm-lang-label{display:none;}
.mm-lang .mm-caret{display:none;}
.mm-lang:hover{background:rgba(255,255,255,.18); border-color:rgba(220,228,0,.5);}
.mm-header.scrolled .mm-lang{color:#0b2439; background:#eef2f8; border-color:#e2e8f2;}
.mm-header.scrolled .mm-lang:hover{border-color:#9647db;}

.mm-lang-menu{
  position:absolute; top:calc(100% + 8px); right:0; z-index:120;
  min-width:170px; padding:6px; border-radius:14px;
  background:#fff; box-shadow:0 18px 46px rgba(11,27,43,.18);
  border:1px solid #eef2f8; list-style:none; margin:0;
  opacity:0; visibility:hidden; transform:translateY(-6px);
  transition:opacity .2s, transform .2s, visibility .2s;
}
.mm-lang-menu.open{opacity:1; visibility:visible; transform:translateY(0);}
.mm-lang-menu li{margin:0;}
.mm-lang-opt{
  width:100%; display:flex; align-items:center; gap:10px;
  padding:10px 12px; border-radius:9px; border:none; background:none; cursor:pointer;
  font-family:inherit; font-size:14px; font-weight:500; color:#0b2439; text-align:left;
  transition:background .2s, color .2s;
}
.mm-lang-opt .mm-flag{width:22px; height:15px; border-radius:3px; flex-shrink:0; box-shadow:0 0 0 1px rgba(0,0,0,.06);}
.mm-lang-opt:hover{background:#f2f5fa; color:#9647db;}
.mm-lang-opt[aria-current="true"]{background:rgba(150,71,219,.10); color:#9647db; font-weight:600;}
.mm-lang-opt .mm-check{margin-left:auto; width:15px; height:15px; opacity:0; color:#9647db;}
.mm-lang-opt[aria-current="true"] .mm-check{opacity:1;}

@media (max-width:900px){
  .mm-lang-wrap{display:block;}
  .mm-lang{width:100%; height:auto; padding:12px 14px; gap:9px; justify-content:center;}
  .mm-lang .mm-lang-label{display:inline;}
  .mm-lang .mm-caret{display:block;}
  .mm-lang-menu{position:static; min-width:0; width:100%; opacity:1; visibility:visible; transform:none; box-shadow:none; border:none; background:rgba(255,255,255,.06); margin-top:8px; display:none;}
  .mm-lang-menu.open{display:block;}
  .mm-lang-opt{color:#fff;}
  .mm-lang-opt:hover,.mm-lang-opt[aria-current="true"]{background:rgba(255,255,255,.10); color:#dce400;}
  .mm-lang-opt[aria-current="true"] .mm-check{color:#dce400;}
}

/* Hide the Google Translate banner/tooltip the widget injects */
.goog-te-banner-frame,.skiptranslate{display:none!important;}
body{top:0!important;}
#google_translate_element{position:absolute!important; left:-9999px!important; width:1px; height:1px; overflow:hidden;}
font[style]{background:none!important; box-shadow:none!important;}

.mm-btn-dash{
  display:inline-flex; align-items:center; gap:8px;
  padding:10px 20px; border-radius:8px;
  font-family:inherit; font-size:14px; font-weight:600; color:#1a1e00;
  background:#dce400; box-shadow:0 8px 22px rgba(220,228,0,.34);
  white-space:nowrap; transition:transform .28s, box-shadow .28s;
}
.mm-btn-dash svg{width:16px; height:16px;}
.mm-btn-dash:hover{transform:translateY(-2px); box-shadow:0 12px 30px rgba(220,228,0,.5);}

/* ---------- Hamburger ---------- */
.mm-nav-toggle{display:none; flex-direction:column; gap:5px; padding:8px; background:none; border:none; cursor:pointer;}
.mm-nav-toggle span{width:26px; height:2px; background:#fff; border-radius:2px; transition:transform .28s, opacity .28s, background .28s;}
.mm-header.scrolled .mm-nav-toggle span{background:#0b2439;}
.mm-nav-toggle.open span:nth-child(1){transform:translateY(7px) rotate(45deg);}
.mm-nav-toggle.open span:nth-child(2){opacity:0;}
.mm-nav-toggle.open span:nth-child(3){transform:translateY(-7px) rotate(-45deg);}

/* ---------- Mobile drawer ---------- */
@media (max-width:900px){
  .mm-nav-toggle{display:flex;}
  .mm-nav{
    position:fixed; inset:0 0 0 auto; width:min(84vw,340px);
    flex-direction:column; align-items:stretch; justify-content:flex-start; gap:0;
    background:linear-gradient(160deg,#2a1668,#5b34c4);
    padding:96px 26px 40px; transform:translateX(100%);
    transition:transform .3s ease; box-shadow:-14px 0 44px rgba(0,0,0,.4);
    z-index:99; overflow-y:auto;
  }
  .mm-nav.open{transform:translateX(0);}
  .mm-nav-list{flex-direction:column; align-items:stretch; gap:4px;}
  .mm-nav-list a,
  .mm-header.scrolled .mm-nav-list a{padding:14px 12px; font-size:16px; color:#fff; border-radius:10px;}
  .mm-nav-list a:hover,
  .mm-header.scrolled .mm-nav-list a:hover{background:rgba(255,255,255,.08); color:#dce400;}
  body[data-page="home"]     .mm-nav-list a[data-nav="home"],
  body[data-page="products"] .mm-nav-list a[data-nav="products"],
  body[data-page="services"] .mm-nav-list a[data-nav="services"],
  body[data-page="projects"] .mm-nav-list a[data-nav="projects"],
  body[data-page="about"]    .mm-nav-list a[data-nav="about"],
  body[data-page="home"]     .mm-header.scrolled .mm-nav-list a[data-nav="home"],
  body[data-page="products"] .mm-header.scrolled .mm-nav-list a[data-nav="products"],
  body[data-page="services"] .mm-header.scrolled .mm-nav-list a[data-nav="services"],
  body[data-page="projects"] .mm-header.scrolled .mm-nav-list a[data-nav="projects"],
  body[data-page="about"]    .mm-header.scrolled .mm-nav-list a[data-nav="about"]{color:#dce400;}
  .mm-nav-actions{flex-direction:column; align-items:stretch; gap:10px; margin-top:20px; padding-top:20px; border-top:1px solid rgba(255,255,255,.14);}
  .mm-lang,
  .mm-header.scrolled .mm-lang{justify-content:center; color:#fff; background:rgba(255,255,255,.10); border-color:rgba(255,255,255,.22);}
  .mm-btn-dash{justify-content:center;}
}

/* =========================================================================
   Footer (shared)
   ========================================================================= */
.mm-footer{background:#0d1526; color:#fff; padding:clamp(56px,7vw,84px) 0 34px;}
.mm-footer-inner{width:100%; max-width:1200px; margin-inline:auto; padding-inline:clamp(18px,4vw,32px);}
.mm-footer-grid{display:grid; grid-template-columns:1.6fr 1fr 1fr 1.3fr; gap:clamp(30px,4vw,48px);}

.mm-footer-brand img{height:44px; width:auto; margin-bottom:18px;}
.mm-f-name{font-size:14px; font-weight:600; line-height:1.5; margin-bottom:16px; color:rgba(255,255,255,.92);}
.mm-f-contact{display:grid; gap:11px; margin-bottom:20px; list-style:none; padding:0;}
.mm-f-contact li{display:flex; gap:9px; font-size:13px; font-weight:300; color:rgba(255,255,255,.7); line-height:1.5;}
.mm-f-contact li span{flex-shrink:0; display:inline-flex; margin-top:1px;}
.mm-f-contact li span svg{width:14px; height:14px; color:rgba(255,255,255,.55);}
.mm-f-social{display:flex; gap:10px;}
.mm-f-social a{width:38px; height:38px; border-radius:10px; display:grid; place-items:center; font-size:14px; font-weight:700; background:rgba(255,255,255,.08); color:#fff; transition:background .28s, transform .28s;}
.mm-f-social a:hover{transform:translateY(-3px);}
.mm-f-social .fb:hover{background:#1877f2;}
.mm-f-social .yt:hover{background:#ff0000;}
.mm-f-social .za:hover{background:#0068ff;}

.mm-f-col h4{font-size:13px; font-weight:600; letter-spacing:1px; text-transform:uppercase; margin-bottom:20px; color:#fff;}
.mm-f-col ul{display:grid; gap:13px; list-style:none; padding:0; margin:0;}
.mm-f-col a{font-size:14px; font-weight:300; color:rgba(255,255,255,.68); transition:color .28s, padding-left .28s;}
.mm-f-col a:hover{color:#dce400; padding-left:4px;}

.mm-f-news p{font-size:14px; color:rgba(255,255,255,.7); margin-bottom:16px; font-weight:300;}
.mm-news-form{display:flex; background:rgba(255,255,255,.08); border-radius:999px; padding:5px 5px 5px 18px; border:1px solid rgba(255,255,255,.12);}
.mm-news-form input{flex:1; background:none; border:none; color:#fff; font-family:inherit; font-size:14px; min-width:0;}
.mm-news-form input::placeholder{color:rgba(255,255,255,.5);}
.mm-news-form input:focus{outline:none;}
.mm-news-form button{width:42px; height:42px; border-radius:50%; background:linear-gradient(135deg,#5e57ea,#9647db); display:grid; place-items:center; flex-shrink:0; border:none; cursor:pointer;}

.mm-footer-bottom{margin-top:clamp(36px,4vw,52px); padding-top:26px; border-top:1px solid rgba(255,255,255,.1); display:flex; flex-wrap:wrap; gap:14px; justify-content:space-between; align-items:center;}
.mm-footer-bottom p{font-size:13px; color:rgba(255,255,255,.55);}
.mm-footer-bottom .mm-lang-foot{font-size:13px; color:rgba(255,255,255,.7); display:inline-flex; gap:6px; align-items:center;}

@media (max-width:860px){ .mm-footer-grid{grid-template-columns:1fr 1fr;} }
@media (max-width:560px){
  .mm-footer-grid{grid-template-columns:1fr; gap:32px;}
  .mm-footer-bottom{flex-direction:column; text-align:center;}
}

/* =========================================================================
   Shared modal ("Dashboard đang phát triển")
   ========================================================================= */
.mm-modal{position:fixed; inset:0; z-index:1000; display:grid; place-items:center; padding:20px;}
.mm-modal[hidden]{display:none;}
.mm-modal-backdrop{position:absolute; inset:0; background:rgba(11,27,43,.62); backdrop-filter:blur(4px); animation:mmFade .22s ease;}
.mm-modal-card{
  position:relative; z-index:1; width:min(440px,100%);
  background:#fff; border-radius:22px; padding:38px 32px 30px; text-align:center;
  box-shadow:0 40px 90px rgba(11,27,43,.34); animation:mmPop .26s cubic-bezier(.34,1.3,.5,1);
  font-family:'Poppins',-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif;
}
.mm-modal-x{
  position:absolute; top:14px; right:16px; width:34px; height:34px; border-radius:50%;
  border:none; background:#f2f5fa; color:#5a6b7b; font-size:22px; line-height:1; cursor:pointer;
  transition:background .22s, color .22s;
}
.mm-modal-x:hover{background:#e7ecf3; color:#0b2439;}
.mm-modal-ico{
  width:64px; height:64px; margin:0 auto 18px; border-radius:20px; display:grid; place-items:center;
  background:linear-gradient(135deg,#5e57ea,#9647db); color:#fff; box-shadow:0 16px 36px rgba(109,59,212,.34);
}
.mm-modal-ico svg{width:32px; height:32px;}
.mm-modal-card h2{font-size:22px; font-weight:700; color:#003970; margin:0 0 10px; line-height:1.3;}
.mm-modal-card p{font-size:14px; font-weight:300; color:#5a6b7b; line-height:1.65; margin:0 0 24px;}
.mm-modal-actions{display:flex; flex-wrap:wrap; gap:10px; justify-content:center;}
.mm-modal-btn{
  display:inline-flex; align-items:center; justify-content:center;
  padding:12px 24px; border-radius:8px; border:none; cursor:pointer;
  font-family:inherit; font-size:14px; font-weight:600; transition:transform .22s, box-shadow .22s, background .22s, color .22s;
}
.mm-modal-btn.primary{background:linear-gradient(135deg,#5e57ea,#9647db); color:#fff; box-shadow:0 10px 26px rgba(109,59,212,.34);}
.mm-modal-btn.primary:hover{transform:translateY(-2px); box-shadow:0 14px 32px rgba(109,59,212,.45);}
.mm-modal-btn.ghost{background:#f2f5fa; color:#0b2439;}
.mm-modal-btn.ghost:hover{background:#e7ecf3;}
@keyframes mmFade{from{opacity:0;}to{opacity:1;}}
@keyframes mmPop{from{opacity:0; transform:translateY(14px) scale(.97);}to{opacity:1; transform:none;}}
@media (prefers-reduced-motion:reduce){
  .mm-modal-backdrop,.mm-modal-card{animation:none;}
}

/* ---------- Skip to content (a11y) ---------- */
.mm-skip{position:fixed;top:10px;left:10px;z-index:1001;transform:translateY(-160%);transition:transform .2s ease;padding:11px 18px;border-radius:10px;background:#dce400;color:#1a1e00;font-family:inherit;font-size:14px;font-weight:600;box-shadow:0 10px 30px rgba(0,0,0,.25);}
.mm-skip:focus{transform:translateY(0);outline:3px solid #5e57ea;outline-offset:2px;}
#mainContent:focus{outline:none;}
