/* ============================================================
   OnlineWhiteboard.org – Shared Stylesheet
   Used by all pages except the /whiteboard/ tool page
   ============================================================ */

:root {
  --primary: #2180f4;
  --primary-hover: #1d4ed8;
  --primary-grad: linear-gradient(135deg, #1d7df2 0%, #348efb 100%);
  --text-dark: #0f172a;
  --text-muted: #475569;
  --bg-light: #f8fafc;
  --white: #ffffff;
  --border: #e2e8f0;
  --shadow: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
  --shadow-lg: 0 25px 50px -12px rgba(0,0,0,0.12);
  --radius: 12px;
  --radius-sm: 8px;
}

/* ===== RESET ===== */
*, *::before, *::after {
  box-sizing: border-box;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

html, body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  margin: 0; padding: 0;
  color: var(--text-dark);
  background: var(--white);
  line-height: 1.6;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); }
p { margin: 0 0 1rem; }
p:last-child { margin-bottom: 0; }
ul, ol { padding-left: 1.4rem; margin: 0 0 1rem; }
li { margin-bottom: 0.4rem; line-height: 1.7; color: var(--text-muted); }
strong { color: var(--text-dark); }

/* ===== HEADER ===== */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 5%;
  background: var(--primary-grad);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
  gap: 1rem;
}

.logo {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--white);
  text-decoration: none;
  white-space: nowrap;
  letter-spacing: -0.02em;
}

nav.header-nav {
  display: flex;
  gap: 1.2rem;
  align-items: center;
  flex-wrap: nowrap;
}

nav.header-nav a {
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  transition: color 0.2s;
  white-space: nowrap;
}

nav.header-nav a:hover { color: #fff; }

.btn-open {
  background: var(--white);
  color: var(--primary);
  padding: 0.55rem 1.2rem;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.9rem;
  white-space: nowrap;
  transition: all 0.2s;
  flex-shrink: 0;
}

.btn-open:hover {
  background: rgba(255,255,255,0.9);
  transform: translateY(-1px);
}

/* ===== BREADCRUMB ===== */
.breadcrumb {
  padding: 0.75rem 5%;
  background: var(--bg-light);
  border-bottom: 1px solid var(--border);
  font-size: 0.83rem;
  color: var(--text-muted);
}

.breadcrumb a {
  color: var(--text-muted);
  text-decoration: none;
}

.breadcrumb a:hover { color: var(--primary); }
.breadcrumb span { margin: 0 0.4rem; }

/* ===== PAGE HERO ===== */
.page-hero {
  padding: 60px 5% 50px;
  text-align: center;
  background: radial-gradient(circle at top, #fff 0%, #f8fafc 100%);
  border-bottom: 1px solid var(--border);
}

.page-badge {
  display: inline-block;
  background: #eff6ff;
  color: var(--primary);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 3px 12px;
  border-radius: 20px;
  margin-bottom: 1rem;
  border: 1px solid #bfdbfe;
}

.page-hero h1 {
  font-size: 2.8rem;
  font-weight: 800;
  margin: 0 0 1.2rem;
  letter-spacing: -0.04em;
  line-height: 1.2;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.page-hero h1 span { color: var(--primary); }

.page-hero p {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 650px;
  margin: 0 auto 2rem;
  line-height: 1.7;
}

/* ===== CTA BUTTONS ===== */
.btn-primary {
  display: inline-block;
  background: var(--primary-grad);
  color: #fff;
  padding: 0.85rem 2rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-weight: 700;
  font-size: 1rem;
  transition: all 0.2s;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(33,128,244,0.35);
}

.btn-secondary {
  display: inline-block;
  background: var(--white);
  color: var(--primary);
  padding: 0.85rem 2rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  border: 2px solid var(--primary);
  transition: all 0.2s;
}

.btn-secondary:hover { background: #eff6ff; }

.cta-group {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ===== TRUST BAR ===== */
.trust-bar {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
  padding: 22px 5%;
  border-bottom: 1px solid var(--border);
  background: var(--white);
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 500;
}

.trust-item svg {
  width: 16px; height: 16px;
  stroke: var(--primary);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

/* ===== SECTION WRAPPER ===== */
.section {
  padding: 70px 5%;
}

.section-alt {
  padding: 70px 5%;
  background: var(--bg-light);
}

.section-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.section-header h2 {
  font-size: 2rem;
  font-weight: 700;
  margin: 0 0 0.8rem;
  letter-spacing: -0.03em;
}

.section-header p {
  color: var(--text-muted);
  font-size: 1rem;
  max-width: 580px;
  margin: 0 auto;
}

/* ===== CONTENT AREA (article/guide pages) ===== */
.content-wrap {
  max-width: 820px;
  margin: 0 auto;
  padding: 60px 5%;
}

.content-wrap h2 {
  font-size: 1.6rem;
  font-weight: 700;
  margin: 2.5rem 0 1rem;
  letter-spacing: -0.02em;
}

.content-wrap h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin: 2rem 0 0.8rem;
}

.content-wrap p {
  color: var(--text-muted);
  font-size: 0.97rem;
  line-height: 1.8;
  margin-bottom: 1rem;
}

.content-wrap ul, .content-wrap ol {
  margin-bottom: 1.2rem;
}

.content-wrap li {
  font-size: 0.97rem;
  line-height: 1.8;
}

/* Step blocks for tutorial pages */
.step-block {
  display: flex;
  gap: 1.2rem;
  align-items: flex-start;
  background: var(--bg-light);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1rem;
}

.step-block-num {
  width: 36px; height: 36px;
  min-width: 36px;
  background: var(--primary-grad);
  color: #fff;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  font-size: 1rem;
}

.step-block-body h3 {
  margin: 0 0 0.4rem;
  font-size: 1rem;
  font-weight: 600;
}

.step-block-body p {
  margin: 0;
  font-size: 0.93rem;
  color: var(--text-muted);
}

/* Tip/note box */
.tip-box {
  background: #eff6ff;
  border-left: 4px solid var(--primary);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  font-size: 0.93rem;
  color: var(--text-dark);
}

.tip-box strong { color: var(--primary); }

/* ===== CARD GRIDS ===== */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.4rem;
  max-width: 1150px;
  margin: 0 auto;
}

.card {
  background: var(--white);
  padding: 1.8rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.card-icon {
  font-size: 1.8rem;
  margin-bottom: 0.8rem;
  line-height: 1;
}

.card h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
}

.card p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin: 0;
  line-height: 1.6;
}

/* Comparison table */
.compare-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.93rem;
  max-width: 750px;
  margin-left: auto;
  margin-right: auto;
}

.compare-table th {
  background: var(--primary-grad);
  color: #fff;
  padding: 0.75rem 1rem;
  text-align: left;
  font-weight: 600;
}

.compare-table td {
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
}

.compare-table tr:nth-child(even) td { background: var(--bg-light); }
.compare-table .yes { color: #059669; font-weight: 600; }
.compare-table .no { color: #dc2626; font-weight: 600; }

/* ===== FAQ ===== */
.faq-list { margin-top: 1.5rem; }

.faq-item {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1.4rem;
  margin-bottom: 0.9rem;
  text-align: left;
}

.faq-item h3 {
  font-size: 0.98rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
  color: var(--text-dark);
}

.faq-item p {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin: 0;
  line-height: 1.7;
}

/* ===== INTERNAL LINKS NAV ===== */
.related-links {
  padding: 50px 5%;
  background: var(--bg-light);
  border-top: 1px solid var(--border);
  text-align: center;
}

.related-links h2 {
  font-size: 1.2rem;
  font-weight: 600;
  margin: 0 0 1.2rem;
  color: var(--text-dark);
}

.links-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  justify-content: center;
  max-width: 900px;
  margin: 0 auto;
}

.links-grid a {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.45rem 1rem;
  color: var(--primary);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  transition: background 0.2s;
}

.links-grid a:hover { background: #eff6ff; }

/* ===== CTA BANNER ===== */
.cta-banner {
  padding: 70px 5%;
  text-align: center;
  background: var(--primary-grad);
  color: #fff;
}

.cta-banner h2 {
  font-size: 2rem;
  font-weight: 700;
  margin: 0 0 0.8rem;
  letter-spacing: -0.03em;
}

.cta-banner p {
  font-size: 1rem;
  opacity: 0.88;
  max-width: 520px;
  margin: 0 auto 2rem;
}

.cta-banner .btn-white {
  background: #fff;
  color: var(--primary);
  padding: 0.85rem 2rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-weight: 700;
  font-size: 1rem;
  display: inline-block;
  transition: all 0.2s;
}

.cta-banner .btn-white:hover {
  background: rgba(255,255,255,0.9);
  transform: translateY(-2px);
}

/* ===== LEGAL PAGES ===== */
.legal-wrap {
  max-width: 820px;
  margin: 0 auto;
  padding: 60px 5%;
}

.legal-wrap h1 {
  font-size: 2rem;
  font-weight: 700;
  margin: 0 0 0.4rem;
}

.legal-wrap .updated {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  display: block;
}

.legal-wrap h2 {
  font-size: 1.2rem;
  font-weight: 600;
  margin: 2rem 0 0.6rem;
  color: var(--text-dark);
}

.legal-wrap p, .legal-wrap li {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.8;
}

/* ===== FOOTER ===== */
footer {
  padding: 40px 5%;
  text-align: center;
  border-top: 1px solid var(--border);
  background: var(--white);
  color: var(--text-muted);
  font-size: 0.88rem;
}

footer p { margin-bottom: 0.5rem; }

footer a {
  color: var(--text-dark);
  text-decoration: none;
  margin: 0 8px;
}

footer a:hover { text-decoration: underline; }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .page-hero h1 { font-size: 2rem; }
  .page-hero p { font-size: 0.97rem; }
  nav.header-nav { display: none; }
  .section-header h2 { font-size: 1.6rem; }
  .cards-grid { grid-template-columns: 1fr; }
  .compare-table { font-size: 0.82rem; }
  .cta-banner h2 { font-size: 1.5rem; }
}

@media (max-width: 480px) {
  .page-hero h1 { font-size: 1.65rem; }
  .page-hero { padding: 40px 5% 35px; }
  .btn-primary, .btn-secondary { font-size: 0.92rem; padding: 0.75rem 1.4rem; }
  header { flex-wrap: wrap; }
}
