/* ============================================================
   SixQuality — Software Testing Knowledge Hub
   Theme: maroon + white + gold, Segoe UI. Pure CSS, no JS.
   ============================================================ */

:root {
  --maroon: #6b1f2a;
  --maroon-dark: #4e141d;
  --maroon-light: #8a2d3a;
  --gold: #d4a017;
  --gold-soft: #e8be4e;
  --white: #ffffff;
  --ink: #241015;
  --body: #333333;
  --muted: #6c6c6c;
  --bg: #ffffff;
  --bg-soft: #f6f1f2;
  --line: #e4d9db;
  --green: #2e8b57;
  --red: #c0392b;
  --radius: 10px;
  --radius-lg: 16px;
  --shadow: 0 6px 24px rgba(78, 20, 29, 0.12);
  --shadow-soft: 0 2px 10px rgba(78, 20, 29, 0.08);
  --container: 1120px;
  --font: "Segoe UI", "Segoe UI Web", Tahoma, Geneva, Verdana, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--body);
  background: var(--bg);
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--maroon); text-decoration: none; }
a:hover { color: var(--maroon-light); }

h1, h2, h3, h4 {
  color: var(--maroon-dark);
  line-height: 1.25;
  margin: 1.6em 0 0.6em;
  font-weight: 700;
}
h1 { font-size: 2.4rem; margin-top: 0; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.05rem; }
p { margin: 0 0 1.1em; }
ul, ol { margin: 0 0 1.2em; padding-left: 1.4em; }
li { margin: 0.35em 0; }
code { background: var(--bg-soft); padding: 1px 6px; border-radius: 5px; font-size: 0.92em; color: var(--maroon-dark); }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.section { padding: 56px 0; }
.muted { color: var(--muted); }
.prose { max-width: 820px; }
.prose p, .prose li { color: var(--body); }
.prose strong { color: var(--ink); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 14px 26px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.18s ease;
}
.btn-solid { background: var(--gold); color: var(--maroon-dark); border-color: var(--gold); }
.btn-solid:hover { background: var(--gold-soft); color: var(--maroon-dark); }
.btn-outline { background: rgba(255,255,255,0.08); color: var(--white); border-color: rgba(255,255,255,0.7); }
.btn-outline:hover { background: rgba(255,255,255,0.95); color: var(--maroon-dark); }
.btn-maroon { background: var(--maroon); color: var(--white); border-color: var(--maroon); }
.btn-maroon:hover { background: var(--maroon-light); color: var(--white); }

/* ---------- Cards ---------- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 24px; }
.card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--white);
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.card-head {
  background: linear-gradient(135deg, var(--maroon), var(--maroon-dark));
  color: var(--white);
  min-height: 92px;
  padding: 18px 20px;
  display: flex;
  align-items: flex-end;
}
.card-head .tag { font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gold-soft); font-weight: 600; }
.card-body { padding: 18px 20px 22px; flex: 1; display: flex; flex-direction: column; }
.card-body h3 { margin: 0 0 8px; font-size: 1.15rem; }
.card-body p { color: var(--muted); font-size: 0.95rem; margin-bottom: 16px; }
.card-link { display: inline-block; font-weight: 600; color: var(--maroon); margin-top: auto; }
.card-link:hover { color: var(--gold); }

/* ============================================================
   HEADER + NAVIGATION (pure CSS checkbox-hack flyout)
   ============================================================ */
.site-header {
  background: linear-gradient(90deg, var(--maroon-dark), var(--maroon) 55%, var(--maroon-light));
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 10px rgba(0,0,0,0.18);
}
.nav { display: flex; align-items: center; justify-content: space-between; min-height: 72px; position: relative; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--white); }
.brand:hover { color: var(--white); }
.brand-mark-img {
  width: 46px; height: 46px; border-radius: 50%; object-fit: contain;
  filter: drop-shadow(0 2px 5px rgba(0,0,0,0.4));
}
.brand-name { font-size: 1.3rem; font-weight: 700; letter-spacing: 0.01em; color: var(--white); }

.nav-toggle { display: none; }
.nav-burger { display: none; color: var(--white); font-size: 1.6rem; cursor: pointer; padding: 6px 10px; user-select: none; }

.nav-links { display: flex; align-items: center; gap: 6px; }
.nav-links > a,
.dropdown > a {
  color: rgba(255,255,255,0.92);
  padding: 10px 16px;
  border-radius: 8px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.nav-links > a:hover,
.dropdown > a:hover,
.nav-links > a.active,
.dropdown > a.active { background: rgba(255,255,255,0.15); color: var(--white); }
.caret { font-size: 0.7rem; }
.caret-left { font-size: 0.7rem; margin-left: auto; padding-left: 12px; color: var(--gold-soft); }

.dropdown { position: relative; }
.dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  min-width: 230px;
  background: linear-gradient(160deg, var(--maroon), var(--maroon-dark));
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 8px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
  z-index: 200;
}
.dropdown:hover > .dropdown-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown-item {
  display: flex;
  align-items: center;
  color: rgba(255,255,255,0.92);
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 500;
  white-space: nowrap;
}
.dropdown-item:hover, .dropdown-item.active { background: rgba(255,255,255,0.16); color: var(--white); }

.dropdown-submenu { top: -8px; right: 100%; margin-right: 6px; min-width: 260px; }
.dropdown-submenu3 { top: -8px; right: 100%; margin-right: 6px; min-width: 300px; }
.dropdown-sub { position: relative; }
.dropdown-sub:hover > .dropdown-menu { opacity: 1; visibility: visible; transform: translateY(0); }

/* ============================================================
   HERO / PAGE HEAD (hero-bg.png + left-dark gradient)
   ============================================================ */
.hero {
  position: relative;
  background:
    linear-gradient(90deg, rgba(40,10,14,0.96) 0%, rgba(78,20,29,0.78) 38%, rgba(107,31,42,0.32) 68%, rgba(107,31,42,0.05) 100%),
    url("hero-bg.png");
  background-size: cover;
  background-position: center right;
  color: var(--white);
  padding: 96px 0 104px;
}
.hero h1 { color: var(--white); font-size: 3rem; max-width: 640px; margin-bottom: 18px; }
.hero p.lead { color: rgba(255,255,255,0.92); font-size: 1.2rem; max-width: 520px; margin-bottom: 30px; }
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }

.page-head {
  position: relative;
  background:
    linear-gradient(90deg, rgba(40,10,14,0.95) 0%, rgba(78,20,29,0.82) 45%, rgba(107,31,42,0.35) 78%, rgba(107,31,42,0.1) 100%),
    url("../assets/hero-bg.png");
  background-size: cover;
  background-position: center right;
  color: var(--white);
  padding: 64px 0 56px;
}
.page-head h1 { color: var(--white); margin: 8px 0 10px; }
.page-head p { color: rgba(255,255,255,0.9); max-width: 620px; margin: 0; }
.breadcrumb { color: rgba(255,255,255,0.75); font-size: 0.9rem; margin: 0; }
.breadcrumb a { color: var(--gold-soft); }
.breadcrumb a:hover { color: var(--white); }

.meta { color: var(--muted); font-size: 0.9rem; border-bottom: 1px solid var(--line); padding-bottom: 14px; margin-bottom: 24px; }

.group { margin-bottom: 48px; }
.group > h2 { font-size: 1.9rem; margin-bottom: 4px; }
.group > .group-intro { color: var(--muted); margin-bottom: 24px; }

/* ============================================================
   DIAGRAM COMPONENTS
   ============================================================ */
.diagram { background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 24px; margin: 28px 0; }
.diagram-title { font-weight: 700; color: var(--maroon-dark); margin: 0 0 18px; text-align: center; }
.flow { display: flex; align-items: stretch; justify-content: center; flex-wrap: wrap; gap: 10px; }
.flow.vertical { flex-direction: column; align-items: center; }
.flow-box {
  background: var(--white);
  border: 2px solid var(--maroon);
  color: var(--maroon-dark);
  border-radius: 10px;
  padding: 14px 18px;
  text-align: center;
  font-weight: 600;
  min-width: 130px;
  box-shadow: var(--shadow-soft);
  display: flex; flex-direction: column; justify-content: center;
}
.flow-box.alt { background: linear-gradient(135deg, var(--maroon), var(--maroon-dark)); color: var(--white); border-color: var(--maroon-dark); }
.flow-box small { display: block; font-weight: 400; font-size: 0.78rem; opacity: 0.85; margin-top: 4px; }
.flow-arrow { display: flex; align-items: center; justify-content: center; color: var(--gold); font-size: 1.5rem; font-weight: 700; }
.flow.vertical .flow-arrow { transform: rotate(90deg); }

.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin: 28px 0; }
.compare .col { border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; background: var(--white); box-shadow: var(--shadow-soft); }
.compare .col h4 { margin: 0; background: linear-gradient(135deg, var(--maroon), var(--maroon-dark)); color: var(--white); padding: 14px 18px; font-size: 1.05rem; }
.compare .col ul { margin: 14px 0; padding: 0 18px 4px 34px; }
.compare .col p { padding: 14px 18px 4px; margin: 0; }

.levels { display: flex; flex-direction: column; align-items: center; gap: 8px; margin: 28px 0; }
.levels .level { color: var(--white); text-align: center; padding: 14px 18px; border-radius: 8px; font-weight: 600; box-shadow: var(--shadow-soft); }
.levels .level small { display: block; font-weight: 400; font-size: 0.78rem; opacity: 0.9; }
.levels .level:nth-child(1) { width: 40%; background: var(--maroon-dark); }
.levels .level:nth-child(2) { width: 58%; background: var(--maroon); }
.levels .level:nth-child(3) { width: 76%; background: var(--maroon-light); }
.levels .level:nth-child(4) { width: 94%; background: #a7566a; }

.cmp-table { width: 100%; border-collapse: collapse; margin: 28px 0; box-shadow: var(--shadow-soft); border-radius: var(--radius-lg); overflow: hidden; }
.cmp-table th, .cmp-table td { text-align: left; padding: 13px 16px; border-bottom: 1px solid var(--line); font-size: 0.95rem; }
.cmp-table thead th { background: linear-gradient(135deg, var(--maroon), var(--maroon-dark)); color: var(--white); font-weight: 600; }
.cmp-table tbody tr:nth-child(even) { background: var(--bg-soft); }
.cmp-table tbody td:first-child { font-weight: 600; color: var(--maroon-dark); }

.callout { background: #fdf7e7; border: 1px solid #efd99a; border-left: 5px solid var(--gold); border-radius: 10px; padding: 18px 22px; margin: 26px 0; color: #5c4a16; }
.callout strong { color: var(--maroon-dark); }

/* ============================================================
   REVIEW COMPONENTS
   ============================================================ */
.review-score {
  display: flex; align-items: center; gap: 22px;
  background: linear-gradient(135deg, var(--maroon), var(--maroon-dark));
  color: var(--white);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  margin: 28px 0;
  box-shadow: var(--shadow);
}
.score-num { font-size: 3.4rem; font-weight: 800; line-height: 1; color: var(--gold-soft); }
.score-num span { font-size: 1.3rem; color: rgba(255,255,255,0.75); }
.score-label h3 { color: var(--white); margin: 0 0 4px; }
.score-label p { color: rgba(255,255,255,0.88); margin: 0 0 6px; }
.stars { color: var(--gold); font-size: 1.1rem; letter-spacing: 2px; }

.rating-bars { margin: 26px 0; }
.rating-row { display: grid; grid-template-columns: 180px 1fr 44px; align-items: center; gap: 14px; margin: 10px 0; }
.r-label { font-weight: 600; color: var(--maroon-dark); font-size: 0.95rem; }
.rating-track { background: var(--bg-soft); border-radius: 20px; height: 14px; overflow: hidden; border: 1px solid var(--line); }
.rating-fill { height: 100%; background: linear-gradient(90deg, var(--maroon-light), var(--maroon)); border-radius: 20px; }
.r-val { font-weight: 700; color: var(--maroon); text-align: right; font-size: 0.95rem; }

.proscons { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 28px 0; }
.proscons .pros, .proscons .cons { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 18px 22px 12px; box-shadow: var(--shadow-soft); }
.proscons .pros { border-left: 5px solid var(--green); }
.proscons .cons { border-left: 5px solid var(--red); }
.proscons h4 { margin: 0 0 8px; }
.proscons .pros h4 { color: var(--green); }
.proscons .cons h4 { color: var(--red); }

.verdict { background: var(--bg-soft); border: 1px solid var(--line); border-top: 4px solid var(--gold); border-radius: var(--radius-lg); padding: 22px 26px; margin: 28px 0; }
.verdict h3 { margin-top: 0; }
.recommend-badge { display: inline-block; background: var(--gold); color: var(--maroon-dark); font-weight: 600; font-size: 0.85rem; padding: 6px 14px; border-radius: 20px; margin-top: 8px; }

/* ---------- Service blocks ---------- */
.service { border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 28px; background: var(--white); box-shadow: var(--shadow-soft); }
.service .ico { width: 54px; height: 54px; border-radius: 12px; background: linear-gradient(135deg, var(--maroon), var(--maroon-dark)); color: var(--gold-soft); display: flex; align-items: center; justify-content: center; font-size: 1.5rem; font-weight: 800; margin-bottom: 14px; letter-spacing: -0.02em; }
.service h3 { margin-top: 0; }

/* ---------- CTA band ---------- */
.cta { background: linear-gradient(135deg, var(--maroon), var(--maroon-dark)); color: var(--white); border-radius: var(--radius-lg); padding: 44px; text-align: center; margin: 8px 0; }
.cta h2 { color: var(--white); margin-top: 0; }
.cta p { color: rgba(255,255,255,0.9); max-width: 560px; margin: 0 auto 22px; }

/* ---------- Contact form ---------- */
.form-grid { display: grid; gap: 16px; max-width: 560px; }
.form-grid label { font-weight: 600; color: var(--maroon-dark); display: block; margin-bottom: 6px; }
.form-grid input, .form-grid textarea { width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; font-family: var(--font); font-size: 1rem; }
.form-grid textarea { min-height: 140px; resize: vertical; }
.info-list { list-style: none; padding: 0; }
.info-list li { margin: 12px 0; }
.info-list strong { color: var(--maroon-dark); display: block; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer { background: var(--maroon-dark); color: rgba(255,255,255,0.82); margin-top: 40px; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 18px; padding: 32px 24px; }
.site-footer .brand-name { color: var(--white); font-size: 1.15rem; }
.site-footer .muted { color: rgba(255,255,255,0.6); margin: 4px 0 0; font-size: 0.9rem; }
.footer-links { display: flex; gap: 18px; flex-wrap: wrap; }
.footer-links a { color: rgba(255,255,255,0.85); }
.footer-links a:hover { color: var(--gold-soft); }
.copyright { width: 100%; color: rgba(255,255,255,0.5); font-size: 0.85rem; margin: 0; border-top: 1px solid rgba(255,255,255,0.12); padding-top: 16px; }

/* ============================================================
   RESPONSIVE — burger + accordion
   ============================================================ */
@media (max-width: 920px) {
  .nav-burger { display: block; }
  .nav-links {
    display: none;
    position: absolute;
    top: 72px; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--maroon-dark);
    padding: 8px;
    max-height: calc(100vh - 72px);
    overflow-y: auto;
    box-shadow: var(--shadow);
  }
  .nav-toggle:checked ~ .nav-links { display: flex; }
  .nav-links > a, .dropdown > a { padding: 14px 16px; border-radius: 8px; }
  .dropdown { position: static; }
  .dropdown-sub { position: static; }
  .dropdown-menu {
    position: static; opacity: 1; visibility: visible; transform: none;
    box-shadow: none; background: rgba(0,0,0,0.18);
    margin: 4px 0 4px 12px; min-width: 0; display: none;
  }
  .dropdown:hover > .dropdown-menu, .dropdown-sub:hover > .dropdown-menu { display: block; }
  .dropdown-submenu, .dropdown-submenu3 { margin-right: 0; }
  .caret-left { margin-left: auto; }
  .two-col { grid-template-columns: 1fr; gap: 24px; }
  .compare { grid-template-columns: 1fr; }
  .proscons { grid-template-columns: 1fr; }
  .review-score { flex-direction: column; text-align: center; }
  .hero h1 { font-size: 2.2rem; }
  .rating-row { grid-template-columns: 130px 1fr 40px; }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  h1 { font-size: 1.9rem; }
  .hero { padding: 64px 0 72px; }
  .hero h1 { font-size: 1.9rem; }
  .section { padding: 40px 0; }
  .rating-row { grid-template-columns: 110px 1fr 36px; gap: 8px; }
  .r-label { font-size: 0.85rem; }
  .cta { padding: 28px 20px; }
}
