@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700;900&family=DM+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&family=JetBrains+Mono:wght@400;600&display=swap');

/* ===================================================
   Azure · Edu PT — Design System
   Replicates the style of modules 1 & 2
   =================================================== */

:root {
  --az-blue:    #0078D4;
  --az-dark:    #004578;
  --az-mid:     #005A9E;
  --az-light:   #EFF6FC;
  --az-sky:     #DEECF9;
  --accent:     #FFB900;
  --accent-soft:#FFF4CE;
  --green:      #107C10;
  --green-light:#DFF6DD;
  --red:        #D13438;
  --red-light:  #FDE7E9;
  --orange:     #CA5010;
  --orange-soft:#FDE7D3;
  --purple:     #5C2E91;
  --purple-soft:#EDE8F5;

  --bg:         #F8F9FA;
  --bg2:        #F0F2F5;
  --surface:    #FFFFFF;
  --border:     #D8DCE0;
  --border-mid: #C8CDD3;
  --text:       #161616;
  --text-mid:   #404040;
  --text-dim:   #767676;

  --nav-h:      58px;
  --radius:     10px;
  --radius-sm:  6px;
  --shadow:     0 2px 8px rgba(0,120,212,.10);
  --shadow-md:  0 4px 20px rgba(0,120,212,.13);
  --shadow-lg:  0 8px 40px rgba(0,120,212,.16);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.72;
  overflow-x: hidden;
}
::-webkit-scrollbar { width: 7px; }
::-webkit-scrollbar-track { background: var(--bg2); }
::-webkit-scrollbar-thumb { background: var(--az-blue); border-radius: 4px; }

/* ── NAV ── */
nav {
  position: sticky; top: 0; z-index: 300;
  height: var(--nav-h);
  background: var(--az-dark);
  display: flex; align-items: center;
  padding: 0 1.5rem; gap: 0;
  box-shadow: 0 2px 16px rgba(0,0,0,.30);
}
.nav-brand {
  display: flex; align-items: center; gap: .6rem;
  text-decoration: none; flex-shrink: 0; margin-right: 1.5rem;
}
.nav-brand .logo {
  width: 32px; height: 32px;
  background: var(--az-blue);
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 900; font-size: 1rem; color: white;
  font-family: 'Playfair Display', serif;
  letter-spacing: -.02em;
}
.nav-brand strong { color: white; font-size: .95rem; font-weight: 700; }
.nav-links {
  display: flex; align-items: stretch; height: 100%;
  gap: 0; overflow-x: auto; scrollbar-width: none; flex: 1;
}
.nav-links::-webkit-scrollbar { display: none; }
.nav-links a {
  display: flex; align-items: center;
  padding: 0 .85rem;
  color: rgba(255,255,255,.72);
  text-decoration: none;
  font-size: .78rem; font-weight: 600;
  white-space: nowrap;
  border-bottom: 3px solid transparent;
  transition: color .2s, border-color .2s;
  letter-spacing: .02em;
}
.nav-links a:hover { color: white; border-bottom-color: rgba(255,255,255,.4); }
.nav-links a.active { color: white; border-bottom-color: var(--accent); }
.nav-progress-wrap {
  margin-left: auto; flex-shrink: 0;
  display: flex; align-items: center; gap: .5rem;
}
.nav-progress-wrap span { color: rgba(255,255,255,.55); font-size: .73rem; }
.prog-bar { width: 90px; height: 5px; background: rgba(255,255,255,.18); border-radius: 3px; overflow: hidden; }
.prog-fill { height: 100%; background: var(--accent); border-radius: 3px; transition: width .4s; }

/* ── LAYOUT ── */
.page-wrap { max-width: 1080px; margin: 0 auto; padding: 2.5rem 1.5rem 5rem; display: grid; grid-template-columns: 230px 1fr; gap: 2.5rem; align-items: start; }
@media (max-width: 780px) { .page-wrap { grid-template-columns: 1fr; } }

/* ── SIDEBAR ── */
.sidebar { position: sticky; top: calc(var(--nav-h) + 1.2rem); }
.sidebar-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.sidebar-head { background: var(--az-blue); color: white; padding: .75rem 1rem; font-weight: 700; font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; }
.sidebar-menu { padding: .4rem; }
.sidebar-menu a {
  display: flex; align-items: center; gap: .55rem;
  padding: .48rem .8rem; border-radius: var(--radius-sm);
  color: var(--text-mid); text-decoration: none;
  font-size: .845rem; font-weight: 500;
  transition: all .15s;
}
.sidebar-menu a:hover { background: var(--az-light); color: var(--az-blue); }
.sidebar-menu a.active { background: var(--az-light); color: var(--az-blue); font-weight: 700; }
.sidebar-section { padding: .6rem .8rem .15rem; font-size: .67rem; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; color: var(--text-dim); }

/* ── CONTENT ── */
.content h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.9rem, 3.5vw, 2.6rem); font-weight: 900;
  color: var(--text); line-height: 1.15; margin-bottom: .9rem;
}
.content h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.55rem; font-weight: 700; color: var(--text);
  margin: 2.8rem 0 1rem; padding-bottom: .55rem;
  border-bottom: 2px solid var(--border);
  display: flex; align-items: center; gap: .55rem;
}
.content h2 .sec-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; flex-shrink: 0;
  background: var(--az-blue); color: white;
  border-radius: 5px; font-size: .73rem; font-weight: 800;
  font-family: 'DM Sans', sans-serif;
}
.content h3 { font-size: 1.08rem; font-weight: 700; color: var(--az-blue); margin: 1.8rem 0 .6rem; }
.content p { margin-bottom: .95rem; color: var(--text-mid); }
.content strong { color: var(--text); }
.content a { color: var(--az-blue); }
.content ul, .content ol { margin: .6rem 0 1rem 1.4rem; color: var(--text-mid); }
.content li { margin-bottom: .3rem; }

/* page meta tags */
.page-meta { display: flex; gap: .7rem; flex-wrap: wrap; margin-bottom: 1.6rem; }
.meta-pill {
  display: inline-flex; align-items: center; gap: .3rem;
  padding: .22rem .8rem; border-radius: 99px;
  font-size: .75rem; font-weight: 700;
  background: var(--az-light); color: var(--az-blue);
}
.meta-pill.orange { background: var(--orange-soft); color: var(--orange); }
.meta-pill.green  { background: var(--green-light); color: var(--green); }

/* ── STAT CARDS ── */
.stat-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(175px, 1fr)); gap: .9rem; margin: 1.4rem 0; }
.stat-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.2rem; transition: box-shadow .2s, transform .2s;
}
.stat-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.stat-card .sc-val { font-family: 'Playfair Display', serif; font-size: 1.9rem; font-weight: 900; color: var(--az-blue); line-height: 1; }
.stat-card .sc-label { font-size: .78rem; font-weight: 700; color: var(--text-dim); margin-top: .3rem; }
.stat-card .sc-body { font-size: .8rem; color: var(--text-mid); margin-top: .5rem; }
.stat-card ul { margin: .3rem 0 0 1rem; padding: 0; }
.stat-card ul li { font-size: .78rem; }

/* ── FEATURE GRID ── */
.feat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(205px, 1fr)); gap: .9rem; margin: 1.2rem 0; }
.feat-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.1rem; transition: box-shadow .2s, transform .2s;
}
.feat-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.feat-card .fc-icon { font-size: 1.7rem; margin-bottom: .55rem; }
.feat-card h4 { font-size: .9rem; font-weight: 700; margin-bottom: .35rem; color: var(--text); }
.feat-card p  { font-size: .81rem; color: var(--text-dim); margin: 0; }
.feat-card code { font-size: .74rem; color: var(--az-blue); background: var(--az-light); padding: .05rem .3rem; border-radius: 3px; }

/* ── CALLOUTS ── */
.callout {
  border-radius: var(--radius-sm); padding: 1rem 1.2rem;
  margin: 1.2rem 0; display: flex; gap: .85rem;
  border-left: 4px solid;
}
.callout .ci { font-size: 1.2rem; flex-shrink: 0; line-height: 1.5; }
.callout-body strong { display: block; margin-bottom: .15rem; font-size: .88rem; }
.callout-body, .callout-body p { font-size: .87rem; margin: 0; }
.callout.info   { background: var(--az-light); border-color: var(--az-blue); }
.callout.info strong { color: var(--az-blue); }
.callout.tip    { background: var(--green-light); border-color: var(--green); }
.callout.tip strong { color: var(--green); }
.callout.warn   { background: var(--accent-soft); border-color: var(--accent); }
.callout.warn strong { color: #8a6900; }
.callout.danger { background: var(--red-light); border-color: var(--red); }
.callout.danger strong { color: var(--red); }

/* ── STEPS ── */
.steps { display: flex; flex-direction: column; gap: 0; margin: 1.3rem 0; }
.step {
  display: flex; gap: 1rem; padding: .95rem 0;
  border-bottom: 1px dashed var(--border);
  position: relative;
}
.step:last-child { border-bottom: none; }
.step-n {
  flex-shrink: 0; width: 32px; height: 32px;
  background: var(--az-blue); color: white;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-weight: 900; font-size: .8rem;
  font-family: 'Playfair Display', serif;
}
.step-body h4 { font-size: .9rem; font-weight: 700; margin-bottom: .25rem; color: var(--text); }
.step-body p  { font-size: .85rem; color: var(--text-mid); margin: 0; }

/* ── CODE BLOCKS ── */
.code-wrap { background: #011627; border-radius: var(--radius); overflow: hidden; margin: 1.1rem 0; box-shadow: var(--shadow); }
.code-head {
  display: flex; align-items: center; justify-content: space-between;
  background: #02213f; padding: .5rem 1rem; border-bottom: 1px solid rgba(255,255,255,.07);
}
.code-head span { font-family: 'JetBrains Mono', monospace; font-size: .72rem; color: #7EC8E3; font-weight: 600; }
.code-head::before { content: "● ● ●"; color: #2d4a6b; font-size: .65rem; letter-spacing: .12em; margin-right: .5rem; }
.copy-btn {
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.14);
  color: rgba(255,255,255,.55); font-size: .68rem; font-weight: 600;
  padding: .18rem .6rem; border-radius: 4px; cursor: pointer;
  transition: all .15s; font-family: 'DM Sans', sans-serif;
}
.copy-btn:hover { background: rgba(255,255,255,.14); color: white; }
.copy-btn.copied { background: var(--green); color: white; border-color: var(--green); }
pre { padding: 1.1rem 1.3rem; overflow-x: auto; font-size: .81rem; line-height: 1.75; }
pre code { font-family: 'JetBrains Mono', monospace; color: #D6DEEB; }
pre .kw  { color: #C792EA; }
pre .cmd { color: #82AAFF; }
pre .str { color: #ADDB67; }
pre .cmt { color: #546E7A; font-style: italic; }
pre .var { color: #FFCB8B; }
pre .num { color: #F78C6C; }
pre .op  { color: #7EC8E3; }
p code, li code, td code {
  background: var(--bg2); border: 1px solid var(--border); border-radius: 3px;
  padding: .08rem .42rem; font-size: .82em; color: var(--az-blue);
  font-family: 'JetBrains Mono', monospace;
}

/* ── TABLE ── */
.table-wrap { overflow-x: auto; margin: 1.1rem 0; border-radius: var(--radius); box-shadow: var(--shadow); }
table { width: 100%; border-collapse: collapse; background: var(--surface); font-size: .86rem; }
thead tr { background: var(--az-blue); }
thead th { padding: .72rem 1rem; color: white; font-weight: 700; text-align: left; font-size: .76rem; text-transform: uppercase; letter-spacing: .05em; }
tbody tr { border-bottom: 1px solid var(--border); transition: background .13s; }
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: var(--az-light); }
td { padding: .62rem 1rem; color: var(--text-mid); }
td strong { color: var(--text); }
.chk { color: var(--green); font-weight: 700; }
.crs { color: var(--red); }

/* ── DIAGRAM BOX ── */
.diagram-box {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.8rem; margin: 1.3rem 0; text-align: center; overflow-x: auto;
}
.d-label { font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--text-dim); margin-bottom: 1.3rem; }
.az-node {
  display: inline-flex; align-items: center; gap: .4rem;
  background: var(--az-blue); color: white;
  border-radius: var(--radius-sm); padding: .5rem 1rem;
  font-weight: 700; font-size: .82rem;
}
.az-node.dark { background: var(--az-dark); }
.az-node.mid  { background: var(--az-mid); }
.az-node.light { background: #1797D4; }
.az-node.green { background: var(--green); }
.az-node.orange { background: var(--orange); }
.az-row { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: .5rem; margin: .5rem 0; }
.az-arr { color: var(--border-mid); font-size: 1.3rem; margin: 0 .3rem; }

/* ── EXERCISE BLOCKS ── */
.exercise-block {
  background: var(--surface); border: 2px solid var(--az-blue); border-radius: var(--radius);
  overflow: hidden; margin: 2rem 0; box-shadow: var(--shadow-md);
}
.ex-head {
  background: var(--az-blue); color: white; padding: .8rem 1.3rem;
  display: flex; align-items: center; gap: .7rem;
}
.ex-type {
  background: var(--accent); color: #000; border-radius: 99px;
  padding: .13rem .7rem; font-size: .68rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: .06em;
}
.ex-head h3 { font-size: .97rem; font-weight: 700; margin: 0; }
.ex-body { padding: 1.3rem; }

/* Lab steps */
.lab-block { background: #011627; border-radius: var(--radius); padding: 1.3rem; margin: .3rem 0 1rem; color: #D6DEEB; }
.lab-title { display: flex; align-items: center; gap: .7rem; margin-bottom: 1rem; padding-bottom: .7rem; border-bottom: 1px solid rgba(255,255,255,.08); }
.lab-badge { background: var(--accent); color: #000; border-radius: 5px; padding: .18rem .65rem; font-size: .68rem; font-weight: 800; text-transform: uppercase; }
.lab-title h4 { font-size: .95rem; font-weight: 700; color: #7EC8E3; margin: 0; }
.lab-steps { counter-reset: lab; list-style: none; padding: 0; }
.lab-steps li {
  counter-increment: lab; display: flex; gap: .85rem;
  padding: .45rem 0; font-size: .86rem;
  border-bottom: 1px solid rgba(255,255,255,.05);
}
.lab-steps li::before {
  content: counter(lab); flex-shrink: 0;
  width: 20px; height: 20px;
  background: var(--az-blue); color: white; border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  font-size: .7rem; font-weight: 700;
}
.lab-steps li:last-child { border-bottom: none; }
.lab-steps code { background: rgba(255,255,255,.1); color: #ADDB67; border-radius: 3px; padding: .04rem .32rem; font-family: 'JetBrains Mono', monospace; font-size: .8em; }

/* Quiz */
.quiz-q { margin-bottom: 1.4rem; }
.quiz-q > p { font-weight: 700; color: var(--text); margin-bottom: .7rem; font-size: .93rem; }
.quiz-opts { display: flex; flex-direction: column; gap: .45rem; }
.quiz-opt {
  display: flex; align-items: center; gap: .7rem;
  padding: .7rem .95rem;
  background: var(--bg); border: 2px solid var(--border); border-radius: var(--radius-sm);
  cursor: pointer; transition: all .18s; font-size: .88rem; color: var(--text-mid);
}
.quiz-opt:hover { border-color: var(--az-blue); background: var(--az-light); color: var(--az-blue); }
.quiz-opt input[type=radio] { accent-color: var(--az-blue); flex-shrink: 0; }
.quiz-opt.correct { border-color: var(--green); background: var(--green-light); color: var(--green); }
.quiz-opt.wrong   { border-color: var(--red);   background: var(--red-light);   color: var(--red); }
.quiz-fb { display: none; padding: .8rem 1rem; border-radius: var(--radius-sm); margin-top: .7rem; font-size: .86rem; font-weight: 600; }
.quiz-fb.show { display: block; }
.quiz-fb.ok  { background: var(--green-light); color: var(--green); border: 1px solid var(--green); }
.quiz-fb.err { background: var(--red-light);   color: var(--red);   border: 1px solid var(--red); }
.btn-check {
  margin-top: .9rem; padding: .6rem 1.5rem;
  background: var(--az-blue); color: white; border: none;
  border-radius: var(--radius-sm); font-weight: 700; font-size: .86rem;
  cursor: pointer; transition: background .18s; font-family: 'DM Sans', sans-serif;
}
.btn-check:hover { background: var(--az-dark); }
.btn-check:disabled { background: var(--text-dim); cursor: not-allowed; }

/* ── PAGE NAV ── */
.page-nav { display: flex; justify-content: space-between; gap: 1rem; margin-top: 2.5rem; padding-top: 1.8rem; border-top: 2px solid var(--border); }
.page-nav a {
  display: flex; flex-direction: column; gap: .15rem;
  padding: .8rem 1.2rem; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); text-decoration: none; max-width: 220px;
  transition: border-color .18s, box-shadow .18s;
}
.page-nav a:hover { border-color: var(--az-blue); box-shadow: var(--shadow); }
.nav-dir { font-size: .7rem; color: var(--text-dim); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.nav-title { font-weight: 700; color: var(--text); font-size: .88rem; }
.page-nav a.next { align-items: flex-end; margin-left: auto; }

/* ── HIGHLIGHT BOX ── */
.hl-box {
  background: var(--az-light); border-left: 4px solid var(--az-blue);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: .9rem 1.2rem; margin: 1.1rem 0;
}
.hl-box p { margin: 0; font-size: .9rem; }

/* ── FOOTER ── */
footer {
  background: var(--az-dark); color: rgba(255,255,255,.5);
  text-align: center; padding: 2rem 1.5rem; font-size: .8rem;
}
footer .fl { font-family: 'Playfair Display', serif; font-size: 1rem; color: white; margin-bottom: .3rem; }
footer a { color: #7EC8E3; text-decoration: none; }

/* ── ANIMATIONS ── */
@keyframes fadeUp { from { opacity:0; transform:translateY(16px); } to { opacity:1; transform:translateY(0); } }
.fu  { animation: fadeUp .45s ease both; }
.fu1 { animation-delay: .1s; }
.fu2 { animation-delay: .2s; }
.fu3 { animation-delay: .3s; }
