/* ==========================================================================
   QuickTools HQ — shared stylesheet
   ========================================================================== */

:root {
  --bg: #f7f8fb;
  --surface: #ffffff;
  --text: #1c2130;
  --text-muted: #5b6274;
  --primary: #3d5af1;
  --primary-dark: #2d43c9;
  --accent: #16b378;
  --border: #e3e6ee;
  --radius: 12px;
  --shadow: 0 2px 10px rgba(20, 24, 40, 0.06);
  --max-width: 880px;
  font-size: 16px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; }

.wrap {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* Header / nav
   ========================================================================== */

header.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.logo {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
}
.logo span { color: var(--primary); }

nav.main-nav {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  font-size: 0.95rem;
  font-weight: 600;
}
nav.main-nav a { color: var(--text-muted); }
nav.main-nav a:hover, nav.main-nav a.active { color: var(--primary); text-decoration: none; }

/* Main content
   ========================================================================== */

main {
  flex: 1;
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 32px 20px 56px;
}

.page-intro {
  max-width: var(--max-width);
  margin: 0 auto 24px;
}

h1 {
  font-size: 1.9rem;
  margin: 0 0 8px;
  letter-spacing: -0.02em;
}

h2 {
  font-size: 1.3rem;
  margin: 32px 0 12px;
}

.lede {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin: 0;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  max-width: var(--max-width);
  margin: 0 auto 24px;
}

.content {
  max-width: var(--max-width);
  margin: 0 auto;
}

/* Form elements
   ========================================================================== */

textarea, input[type="text"], input[type="number"], select {
  width: 100%;
  font-family: inherit;
  font-size: 1rem;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fbfbfd;
  color: var(--text);
}

textarea:focus, input:focus, select:focus {
  outline: none;
  border-color: var(--primary);
  background: #fff;
}

textarea {
  min-height: 160px;
  resize: vertical;
}

label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin: 0 0 6px;
  color: var(--text-muted);
}

.field { margin-bottom: 16px; }

.row {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
.row > .field { flex: 1; min-width: 140px; }

button, .btn {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 12px 22px;
  font-size: 1rem;
  font-weight: 700;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s ease;
}
button:hover, .btn:hover { background: var(--primary-dark); text-decoration: none; }
button.secondary { background: var(--surface); color: var(--primary); border: 1px solid var(--primary); }
button.secondary:hover { background: #eef1ff; }

.btn-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 4px; }

/* Stats / results
   ========================================================================== */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.stat {
  background: #f2f4fc;
  border-radius: 8px;
  padding: 12px;
  text-align: center;
}
.stat .num { font-size: 1.5rem; font-weight: 800; color: var(--primary); display: block; }
.stat .label { font-size: 0.78rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.03em; }

.result-box {
  margin-top: 16px;
  padding: 16px;
  background: #f2f4fc;
  border-radius: 8px;
  font-size: 1.1rem;
  word-break: break-word;
}

/* Ad slots
   ========================================================================== */

.ad-slot {
  max-width: var(--max-width);
  margin: 28px auto;
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: repeating-linear-gradient(45deg, #eef0f6, #eef0f6 10px, #e6e9f2 10px, #e6e9f2 20px);
  border: 1px dashed #c4cadd;
  border-radius: 8px;
  color: #8890a6;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Side ad slots (desktop only — uses the empty margins beside the content)
   ========================================================================== */

.ad-side {
  position: fixed;
  top: 130px;
  width: 160px;
  height: 600px;
  display: none;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: repeating-linear-gradient(45deg, #eef0f6, #eef0f6 10px, #e6e9f2 10px, #e6e9f2 20px);
  border: 1px dashed #c4cadd;
  border-radius: 8px;
  color: #8890a6;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  z-index: 10;
}
.ad-side-left { left: 20px; }
.ad-side-right { right: 20px; }

/* Only show once the window is wide enough that the side ads won't
   crowd or overlap the centered page content. */
@media (min-width: 1400px) {
  .ad-side { display: flex; }
}

/* Tool grid on homepage
   ========================================================================== */

.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  max-width: 1080px;
  margin: 0 auto;
}

.tool-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
  display: block;
  color: var(--text);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.tool-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(20,24,40,0.10);
  text-decoration: none;
}
.tool-card .icon { font-size: 2rem; margin-bottom: 10px; display: block; }
.tool-card h3 { margin: 0 0 6px; font-size: 1.1rem; }
.tool-card p { margin: 0; color: var(--text-muted); font-size: 0.92rem; }

/* FAQ
   ========================================================================== */

.faq-item {
  border-bottom: 1px solid var(--border);
  padding: 14px 0;
}
.faq-item:last-child { border-bottom: none; }
.faq-item h3 { margin: 0 0 6px; font-size: 1.02rem; }
.faq-item p { margin: 0; color: var(--text-muted); }

/* Footer
   ========================================================================== */

footer.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 24px 20px;
  margin-top: 40px;
}
.footer-inner {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.88rem;
  color: var(--text-muted);
}
.footer-links { display: flex; gap: 16px; flex-wrap: wrap; }
.footer-links a { color: var(--text-muted); }
.footer-links a:hover { color: var(--primary); }

/* Misc
   ========================================================================== */

.badge {
  display: inline-block;
  background: #e8f9f1;
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  margin-bottom: 10px;
}

.static-page h2 { margin-top: 28px; }
.static-page p { margin: 0 0 14px; }
.static-page ul { margin: 0 0 14px; padding-left: 22px; }

@media (max-width: 560px) {
  h1 { font-size: 1.5rem; }
  .card { padding: 18px; }
}
