:root{
  --bg:#ffffff;
  --text:#0b1220;
  --muted:#5b6470;
  --accent:#0f62fe;
  --container:1100px;
}

*{box-sizing:border-box}

html,body{
  height:100%;
  margin:0;
  padding:0;
  font-family:Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  background:var(--bg);
  color:var(--text);
  line-height:1.6;
}

/* Layout */
.wrap{max-width:var(--container);margin:0 auto;padding:12px 20px}
.container{max-width:var(--container);margin:0 auto;padding:20px}
.main{display:grid;grid-template-columns:1fr 320px;gap:24px}
.content-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:18px}

/* Header / Menu */
.header{
  background:#fff;
  border-bottom:1px solid #eef3f8;
}
.header .wrap{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:12px;
}

.brand{
  font-weight:700;
  color:var(--accent);
  text-decoration:none;
  font-size:1.05rem;
}

/* nav */
.nav ul{
  list-style:none;
  margin:0;
  padding:0;
  display:flex;
  gap:14px;
}

.nav-toggle{
  display:none;
  background:#0b1220;
  color:#fff;
  padding:8px 12px;
  border:none;
  border-radius:6px;
  font-weight:700;
  cursor:pointer;
}

/* Hero */
.hero{
  background:#f8fbff;
  padding:24px;
  border-radius:8px;
  margin:18px 0;
  border:1px solid #e6f3ff;
}

/* Cards / Content */
.card{
  background:#fff;
  padding:16px;
  border-radius:8px;
  border:1px solid #eef6ff;
}
.article{
  background:#fff;
  padding:20px;
  border-radius:8px;
  border:1px solid #eef6ff;
}
.sidebar{
  background:#fff;
  padding:16px;
  border-radius:8px;
  border:1px solid #eef6ff;
}

/* Typography */
a{color:var(--accent)}
h1{font-size:1.6rem;margin:0 0 12px}
h2{color:var(--accent);font-size:1.05rem;margin-top:14px}
.readmore a{font-weight:600}
.related{margin-top:18px;font-style:italic}

/* Article hero image */
.article-hero{ text-align:center; margin:30px auto; }
.article-hero img{
  display:block;
  margin:0 auto;
  max-width:90%;
  height:auto;
  border-radius:10px;
  box-shadow:0 8px 20px rgba(0,0,0,0.08);
}
.article-hero figcaption{
  color:#6b7280;
  margin-top:8px;
  font-size:14px;
  font-style:italic;
}
@media (max-width:768px){
  .article-hero img{max-width:100%}
}

/* Footer */
.footer{
  border-top:1px solid #eef3fb;
  padding:18px;
  margin-top:30px;
  background:#fbfdff;
  text-align:center;
  color:var(--muted);
}

/* ===== Pastel header & footer style ===== */
header.header{
  background-color:#ABE7B2; /* xanh pastel */
  color:#000;
  padding:10px 0;
  box-shadow:0 2px 6px rgba(0,0,0,0.08);
  font-weight:700;
}

footer.footer{
  background-color:#ABE7B2;
  color:#000;
  text-align:center;
  padding:20px 10px;
  margin-top:40px;
  border-top:3px solid #93d49c;
  font-size:15px;
  font-weight:700;
}
footer.footer a{
  color:#000;
  font-weight:700;
  text-decoration:none;
}
footer.footer a:hover{
  text-decoration:underline;
  color:#064e3b;
}

/* =========================================================
   ✅ MENU LINKS (HOVER + ACTIVE) - CHẮC CHẮN ĂN MÀU
   ========================================================= */
header.header #nav-main a{
  color:#000;
  text-decoration:none;
  font-weight:700;
  padding:10px 15px;
  display:inline-block;
  transition:color .3s, background-color .3s;
}

header.header #nav-main a:hover{
  background-color:rgba(255,255,255,0.4);
  border-radius:6px;
  color:#3498db;
}

/* Active (trang đang mở) */
header.header #nav-main a.active{
  color:#1581BF !important;
  border-bottom:3px solid #1581BF;
}

/* =========================================================
   ✅ RESPONSIVE MENU: ẨN/HIỆN THEO #nav-main
   ========================================================= */
@media (max-width:767px){
  .main{grid-template-columns:1fr}
  .nav ul{flex-wrap:wrap}
  #nav-main{display:none;}
  .nav-toggle{display:inline-block;}
}
@media (min-width:768px){
  #nav-main{display:block !important;}
  .nav-toggle{display:none;}
}

/* ===== Dark mode ===== */
@media (prefers-color-scheme: dark){
  body{background:#0b1220;color:#ffffff}
  .header{background:#0b1220;border-bottom:1px solid rgba(255,255,255,0.12)}
  .card,.article,.sidebar{background:#0b1220;border:1px solid rgba(255,255,255,0.12);color:#fff}
  .footer{background:#0b1220;color:#cbd5e1;border-top:1px solid rgba(255,255,255,0.12)}
  header.header{background:#0b1220;color:#fff}
  footer.footer{background:#0b1220;color:#fff;border-top:3px solid rgba(255,255,255,0.12)}

  header.header #nav-main a{color:#fff}
  header.header #nav-main a:hover{
    background-color:rgba(255,255,255,0.12);
    color:#00FFFF;
  }
  header.header #nav-main a.active{
    color:#1E90FF !important;
    border-bottom:3px solid #1E90FF;
  }
}
