/* ============================================================
   AZ900Certification.com — Global Styles
   Microsoft Azure inspired theme
   ============================================================ */

:root {
  --primary: #0078D4;
  --primary-dark: #005a9e;
  --primary-light: #e6f2fb;
  --navy: #0b1f33;
  --navy-2: #122c4b;
  --teal: #00b294;
  --bg: #f4f8fc;
  --card: #ffffff;
  --text: #1c2733;
  --muted: #5b6b7c;
  --border: #e3ebf3;
  --green: #107c10;
  --green-bg: #e6f4e6;
  --red: #d13438;
  --red-bg: #fdecec;
  --amber: #b45309;
  --amber-bg: #fef3e2;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 2px 12px rgba(11, 31, 51, .08);
  --shadow-lg: 0 10px 30px rgba(11, 31, 51, .14);
  --font: "Segoe UI", -apple-system, BlinkMacSystemFont, "Inter", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  font-size: 16px;
}

img { max-width: 100%; display: block; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { max-width: 1140px; margin: 0 auto; padding: 0 20px; }

/* ---------- Typography ---------- */
h1, h2, h3, h4 { line-height: 1.25; color: var(--navy); font-weight: 700; }
h1 { font-size: 2.4rem; }
h2 { font-size: 1.8rem; margin-bottom: 10px; }
h3 { font-size: 1.2rem; }
p { margin-bottom: 12px; }
.section-title { text-align: center; margin-bottom: 40px; }
.section-title p { color: var(--muted); max-width: 640px; margin: 0 auto; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 12px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: .98rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all .2s ease;
  font-family: var(--font);
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 4px 14px rgba(0,120,212,.35); }
.btn-primary:hover { background: var(--primary-dark); }
.btn-outline { background: transparent; color: var(--primary); border-color: var(--primary); }
.btn-outline:hover { background: var(--primary-light); }
.btn-white { background: #fff; color: var(--navy); }
.btn-white:hover { background: #eef4fa; }
.btn-green { background: var(--green); color: #fff; }
.btn-green:hover { background: #0b5e0b; }
.btn-sm { padding: 8px 18px; font-size: .88rem; }
.btn-block { display: block; width: 100%; text-align: center; }

/* ---------- Navbar ---------- */
.navbar {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.navbar .container { display: flex; align-items: center; justify-content: space-between; height: 66px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.15rem; color: var(--navy); }
.logo:hover { text-decoration: none; }
.logo svg { flex-shrink: 0; }
.logo span em { color: var(--primary); font-style: normal; }
.nav-links { display: flex; gap: 6px; align-items: center; }
.nav-links a {
  color: var(--text); font-weight: 500; padding: 8px 14px; border-radius: 8px; font-size: .95rem;
}
.nav-links a:hover { background: var(--primary-light); color: var(--primary-dark); text-decoration: none; }
.nav-links a.active { background: var(--primary); color: #fff; }
.nav-cta { display: inline-block; }

.nav-toggle {
  display: none; background: none; border: none; cursor: pointer; padding: 8px;
}
.nav-toggle span { display: block; width: 24px; height: 3px; background: var(--navy); margin: 5px 0; border-radius: 3px; }

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(135deg, #0b1f33 0%, #0e2a47 55%, #123a63 100%);
  color: #fff; padding: 70px 0 90px; position: relative; overflow: hidden;
}
.hero::after {
  content: ""; position: absolute; right: -120px; top: -120px; width: 420px; height: 420px;
  background: radial-gradient(circle, rgba(0,120,212,.35), transparent 65%);
}
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 50px; align-items: center; position: relative; z-index: 2; }
.hero h1 { color: #fff; font-size: 2.7rem; margin-bottom: 16px; }
.hero h1 span { color: #50e6ff; }
.hero p { color: #c9d9ea; font-size: 1.1rem; margin-bottom: 28px; max-width: 540px; }
.hero-badges { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 24px; }
.hero-badges .badge { background: rgba(255,255,255,.12); color: #e8f2fc; border: 1px solid rgba(255,255,255,.25); }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.hero-card {
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.16);
  border-radius: var(--radius); padding: 26px; backdrop-filter: blur(4px);
}
.hero-card h3 { color: #fff; margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
.hero-card ul { list-style: none; }
.hero-card li { padding: 8px 0; border-bottom: 1px dashed rgba(255,255,255,.15); color: #dbe8f5; font-size: .95rem; }
.hero-card li:last-child { border-bottom: none; }
.hero-card li b { color: #50e6ff; }
.hero-card li::before { content: "✔"; color: var(--teal); margin-right: 10px; font-weight: 700; }

/* ---------- Badges / chips ---------- */
.badge {
  display: inline-block; padding: 5px 14px; border-radius: 999px; font-size: .8rem; font-weight: 600;
  background: var(--primary-light); color: var(--primary-dark);
}
.badge-teal { background: #dff6f1; color: #006e5b; }
.badge-amber { background: var(--amber-bg); color: var(--amber); }
.badge-green { background: var(--green-bg); color: var(--green); }
.badge-navy { background: #e7eef7; color: var(--navy); }

/* ---------- Cards ---------- */
.card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 26px;
}
.card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); transition: all .25s ease; }
.card h3 { margin-bottom: 10px; }
.card p { color: var(--muted); font-size: .95rem; }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }

/* ---------- Test cards ---------- */
.test-card { display: flex; flex-direction: column; }
.test-card .test-meta { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0 16px; }
.test-card .test-meta span {
  font-size: .8rem; background: var(--bg); border: 1px solid var(--border);
  padding: 3px 10px; border-radius: 999px; color: var(--muted);
}
.test-card .btn { margin-top: auto; }
.test-icon {
  width: 52px; height: 52px; border-radius: 12px; display: flex; align-items: center; justify-content: center;
  background: var(--primary-light); margin-bottom: 14px;
}

/* ---------- Stats bar ---------- */
.stats { background: #fff; border-bottom: 1px solid var(--border); }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; padding: 34px 0; text-align: center; }
.stat b { font-size: 2rem; color: var(--primary); display: block; }
.stat span { color: var(--muted); font-size: .92rem; }

/* ---------- Steps / how it works ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; counter-reset: step; }
.step { position: relative; padding: 28px 22px 22px; }
.step::before {
  counter-increment: step; content: counter(step);
  position: absolute; top: -18px; left: 24px; width: 38px; height: 38px;
  background: var(--primary); color: #fff; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 1.1rem;
  box-shadow: 0 4px 12px rgba(0,120,212,.35);
}

/* ---------- Ad slot ---------- */
.ad-slot {
  background: repeating-linear-gradient(45deg, #f2f6fa, #f2f6fa 12px, #e9f0f7 12px, #e9f0f7 24px);
  border: 2px dashed #b8cde0; border-radius: var(--radius-sm);
  color: #7a93ab; text-align: center; padding: 18px; font-size: .8rem;
  min-height: 90px; display: flex; align-items: center; justify-content: center; letter-spacing: .5px;
}
.ad-slot-label { font-size: .68rem; text-transform: uppercase; color: #9db3c8; text-align: center; margin-bottom: 6px; letter-spacing: 1px; }
.leaderboard { margin: 34px 0; }

/* ---------- FAQ ---------- */
.faq-item { border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: 12px; background: #fff; overflow: hidden; }
.faq-item summary {
  cursor: pointer; padding: 16px 20px; font-weight: 600; color: var(--navy);
  list-style: none; display: flex; justify-content: space-between; align-items: center;
}
.faq-item summary::after { content: "+"; font-size: 1.4rem; color: var(--primary); font-weight: 400; }
.faq-item[open] summary::after { content: "–"; }
.faq-item .faq-body { padding: 0 20px 18px; color: var(--muted); font-size: .96rem; }

/* ---------- Page header (inner pages) ---------- */
.page-header {
  background: linear-gradient(135deg, #0b1f33, #123a63); color: #fff; padding: 48px 0;
}
.page-header h1 { color: #fff; margin-bottom: 8px; }
.page-header p { color: #c9d9ea; margin: 0; max-width: 700px; }
.breadcrumbs { font-size: .85rem; color: #9db8d4; margin-bottom: 14px; }
.breadcrumbs a { color: #50e6ff; }

/* ---------- Content / prose ---------- */
.prose { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 34px; box-shadow: var(--shadow); }
.prose h2 { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--border); }
.prose h2:first-child { margin-top: 0; padding-top: 0; border-top: none; }
.prose h3 { margin-top: 20px; color: var(--primary-dark); }
.prose ul, .prose ol { margin: 0 0 14px 22px; }
.prose li { margin-bottom: 6px; }
.prose table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: .94rem; }
.prose th, .prose td { border: 1px solid var(--border); padding: 10px 14px; text-align: left; }
.prose th { background: var(--primary-light); color: var(--navy); }
.prose code { background: var(--bg); border: 1px solid var(--border); padding: 2px 8px; border-radius: 5px; font-size: .9em; }
.tip-box {
  background: var(--primary-light); border-left: 4px solid var(--primary);
  padding: 14px 18px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; margin: 16px 0; font-size: .95rem;
}
.warn-box { background: var(--amber-bg); border-left: 4px solid var(--amber); padding: 14px 18px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; margin: 16px 0; font-size: .95rem; }

/* ---------- Quiz ---------- */
.quiz-wrap { max-width: 860px; margin: 0 auto; }
.quiz-topbar {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px 22px; display: flex; align-items: center; justify-content: space-between;
  gap: 16px; margin-bottom: 20px; box-shadow: var(--shadow); flex-wrap: wrap;
}
.quiz-topbar .q-title { font-weight: 700; color: var(--navy); font-size: 1.05rem; }
.quiz-topbar .q-meta { display: flex; gap: 18px; align-items: center; font-size: .9rem; color: var(--muted); }
.timer { font-weight: 700; color: var(--navy); font-variant-numeric: tabular-nums; }
.timer.warn { color: var(--red); animation: pulse 1s infinite; }
@keyframes pulse { 50% { opacity: .5; } }

.progress-track { height: 8px; background: var(--border); border-radius: 99px; overflow: hidden; margin-bottom: 20px; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--primary), var(--teal)); width: 0%; transition: width .3s ease; border-radius: 99px; }

.question-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 30px; box-shadow: var(--shadow); margin-bottom: 18px; }
.q-number { font-size: .82rem; font-weight: 700; color: var(--primary); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 10px; }
.q-text { font-size: 1.18rem; font-weight: 600; color: var(--navy); margin-bottom: 22px; }
.options { list-style: none; }
.option {
  display: flex; gap: 14px; align-items: flex-start; width: 100%; text-align: left;
  background: var(--bg); border: 2px solid var(--border); border-radius: var(--radius-sm);
  padding: 14px 18px; margin-bottom: 12px; cursor: pointer; font-family: var(--font);
  font-size: 1rem; color: var(--text); transition: all .15s ease; line-height: 1.5;
}
.option:hover { border-color: var(--primary); background: var(--primary-light); }
.option .opt-letter {
  flex-shrink: 0; width: 30px; height: 30px; border-radius: 50%; background: #fff;
  border: 2px solid var(--border); display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .88rem; color: var(--muted); transition: all .15s ease;
}
.option.selected { border-color: var(--primary); background: var(--primary-light); }
.option.selected .opt-letter { background: var(--primary); border-color: var(--primary); color: #fff; }
.option.correct { border-color: var(--green); background: var(--green-bg); }
.option.correct .opt-letter { background: var(--green); border-color: var(--green); color: #fff; }
.option.wrong { border-color: var(--red); background: var(--red-bg); }
.option.wrong .opt-letter { background: var(--red); border-color: var(--red); color: #fff; }
.option:disabled { cursor: default; }

.explanation {
  background: var(--primary-light); border-left: 4px solid var(--primary);
  padding: 16px 18px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; margin-top: 14px;
  font-size: .95rem; display: none;
}
.explanation.show { display: block; }
.explanation b { color: var(--primary-dark); }

.quiz-nav { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 22px; }
.quiz-nav .btn { min-width: 130px; }

.palette { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 22px; box-shadow: var(--shadow); }
.palette h4 { font-size: .85rem; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); margin-bottom: 12px; }
.palette-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(40px, 1fr)); gap: 8px; }
.palette-btn {
  width: 100%; aspect-ratio: 1; border-radius: var(--radius-sm); border: 2px solid var(--border);
  background: #fff; font-weight: 700; color: var(--muted); cursor: pointer; font-family: var(--font); font-size: .9rem;
  transition: all .15s ease; display: flex; align-items: center; justify-content: center;
}
.palette-btn:hover { border-color: var(--primary); }
.palette-btn.current { border-color: var(--primary); background: var(--primary); color: #fff; }
.palette-btn.answered { background: var(--green); border-color: var(--green); color: #fff; }
.palette-btn.flagged { background: var(--amber); border-color: var(--amber); color: #fff; }
.palette-legend { display: flex; gap: 18px; margin-top: 14px; font-size: .82rem; color: var(--muted); flex-wrap: wrap; }
.palette-legend i { display: inline-block; width: 14px; height: 14px; border-radius: 4px; margin-right: 6px; vertical-align: -2px; }
.legend-answered i { background: var(--green); }
.legend-flagged i { background: var(--amber); }
.legend-current i { background: var(--primary); }

/* ---------- Results ---------- */
.results-card { text-align: center; padding: 44px 30px; }
.score-ring {
  width: 170px; height: 170px; border-radius: 50%; margin: 0 auto 24px;
  display: flex; align-items: center; justify-content: center; flex-direction: column;
  background: conic-gradient(var(--primary) calc(var(--score) * 1%), var(--border) 0);
  position: relative;
}
.score-ring::before {
  content: ""; position: absolute; inset: 14px; background: #fff; border-radius: 50%;
}
.score-ring .score-inner { position: relative; z-index: 2; }
.score-ring .score-inner b { font-size: 2.6rem; color: var(--navy); display: block; line-height: 1.1; }
.score-ring .score-inner span { color: var(--muted); font-size: .9rem; }
.pass-banner { display: inline-block; padding: 8px 26px; border-radius: 999px; font-weight: 700; font-size: 1.05rem; margin-bottom: 18px; }
.pass-banner.passed { background: var(--green-bg); color: var(--green); }
.pass-banner.failed { background: var(--red-bg); color: var(--red); }
.result-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; max-width: 560px; margin: 22px auto 26px; }
.result-stat { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px; }
.result-stat b { display: block; font-size: 1.4rem; color: var(--navy); }
.result-stat span { font-size: .8rem; color: var(--muted); }
.best-score { color: var(--muted); font-size: .9rem; margin-bottom: 20px; }

/* ---------- CTA band ---------- */
.cta-band {
  background: linear-gradient(135deg, #0078D4, #00b294); border-radius: var(--radius);
  color: #fff; padding: 44px; text-align: center; margin: 50px 0;
}
.cta-band h2 { color: #fff; margin-bottom: 10px; }
.cta-band p { color: rgba(255,255,255,.9); margin-bottom: 22px; }

/* ---------- Footer ---------- */
.footer { background: var(--navy); color: #a9bfd4; margin-top: 60px; padding: 48px 0 20px; font-size: .92rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 30px; margin-bottom: 34px; }
.footer h4 { color: #fff; margin-bottom: 14px; font-size: 1rem; }
.footer a { color: #a9bfd4; display: block; padding: 4px 0; }
.footer a:hover { color: #50e6ff; text-decoration: none; }
.footer .logo { color: #fff; margin-bottom: 12px; }
.footer p { color: #7e96ad; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); padding-top: 18px; text-align: center; font-size: .82rem; color: #6f87a0; }
.footer-bottom a { display: inline; color: #8fb4d8; padding: 0; }

/* ---------- Forms ---------- */
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-weight: 600; margin-bottom: 6px; color: var(--navy); font-size: .95rem; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: 12px 14px; border: 2px solid var(--border); border-radius: var(--radius-sm);
  font-family: var(--font); font-size: .98rem; background: #fff; color: var(--text);
}
.form-group input:focus, .form-group textarea:focus { outline: none; border-color: var(--primary); }
.form-group textarea { min-height: 140px; resize: vertical; }

/* ---------- Misc ---------- */
.mt-1 { margin-top: 10px; } .mt-2 { margin-top: 20px; } .mt-3 { margin-top: 34px; } .mt-4 { margin-top: 50px; }
.mb-1 { margin-bottom: 10px; } .mb-2 { margin-bottom: 20px; } .mb-3 { margin-bottom: 34px; }
.text-center { text-align: center; }
.muted { color: var(--muted); }
.hidden { display: none !important; }
.section { padding: 56px 0; }
.section-alt { background: #fff; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 34px; }
  .grid-3, .steps { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 26px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  h1 { font-size: 1.9rem; }
  .hero h1 { font-size: 2rem; }
  .nav-toggle { display: block; }
  .nav-links {
    display: none; position: absolute; top: 66px; left: 0; right: 0; background: #fff;
    flex-direction: column; padding: 14px 20px 20px; border-bottom: 1px solid var(--border); box-shadow: var(--shadow-lg);
    align-items: stretch; gap: 4px;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 14px; }
  .result-stats { grid-template-columns: 1fr; }
  .prose { padding: 22px; }
}

/* ---------- Newsletter / email signup ---------- */
.newsletter-band { padding: 44px 0 0; }
.newsletter-card {
  background: linear-gradient(135deg, #0b1f33, #123a63);
  border-radius: var(--radius);
  padding: 32px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  flex-wrap: wrap;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(80,230,255,.25);
}
.newsletter-card h3 { color: #fff; margin-bottom: 6px; font-size: 1.25rem; }
.newsletter-card p { color: #c9d9ea; margin: 0; font-size: .95rem; max-width: 420px; }
.newsletter-form { display: flex; gap: 10px; flex-wrap: wrap; flex: 1; max-width: 470px; }
.newsletter-form input[type="email"] {
  flex: 1; min-width: 220px; padding: 13px 18px; border-radius: 999px; border: none;
  font-family: var(--font); font-size: .95rem; color: var(--text);
}
.newsletter-form input[type="email"]:focus { outline: 3px solid rgba(80,230,255,.45); }
.newsletter-msg { flex-basis: 100%; font-size: .92rem; color: #50e6ff; font-weight: 600; }
.newsletter-msg.error { color: #ffb4b4; }
@media (max-width: 700px) {
  .newsletter-card { padding: 26px 22px; }
  .newsletter-form .btn { width: 100%; }
}

/* ---------- Cookie consent banner ---------- */
.cookie-banner {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 999;
  background: #0b1f33; color: #dbe8f5; padding: 14px 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  box-shadow: 0 -4px 20px rgba(0,0,0,.25); font-size: .88rem;
}
.cookie-banner p { margin: 0; flex: 1; min-width: 240px; color: #c9d9ea; }
.cookie-banner a { color: #50e6ff; }
.cookie-banner .cookie-btns { display: flex; gap: 10px; }
.cookie-banner .btn { padding: 8px 18px; font-size: .85rem; }
@media (max-width: 640px) {
  .cookie-banner { justify-content: center; text-align: center; }
}

/* ---------- Mobile table scroll fix ---------- */
@media (max-width: 700px) {
  .prose table, .cta-band table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
  }
}
