/* ============================================================
   Rotary District 9660 — IT Help Portal v2
   style.css
   ============================================================ */

/* --- Reset & box-sizing ------------------------------------ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
img { max-width: 100%; display: block; }
a { color: var(--blue); text-decoration: underline; }
a:hover { color: var(--blue-dark); }
ul, ol { padding-left: 1.4rem; }
li { margin-bottom: 0.4rem; }
table { border-collapse: collapse; width: 100%; }

/* --- CSS Variables ----------------------------------------- */
:root {
  --blue:        #17458f;
  --blue-dark:   #0f2f63;
  --gold:        #f7a81b;
  --cranberry:   #d41367;
  --bg:          #f5f5f3;
  --white:       #ffffff;
  --dark:        #1a1a1a;
  --muted:       #555555;
  --border:      #dddddb;
  --sidebar-w:   250px;
  --radius:      10px;
  --card-pad:    28px;
  --font:        -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* --- Base -------------------------------------------------- */
body {
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.7;
  color: var(--dark);
  background: var(--bg);
}

/* --- Skip link --------------------------------------------- */
.skip-link {
  position: absolute;
  top: -3rem;
  left: 0;
  padding: 0.5rem 1rem;
  background: var(--blue);
  color: #fff;
  font-size: 0.9rem;
  border-radius: 0 0 4px 0;
  z-index: 9999;
  transition: top 0.15s;
  text-decoration: none;
}
.skip-link:focus { top: 0; }

/* --- Mobile topbar (hidden on desktop) --------------------- */
.topbar {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 56px;
  background: var(--blue);
  color: #fff;
  align-items: center;
  padding: 0 16px;
  z-index: 200;
  gap: 12px;
}
.topbar-title {
  flex: 1;
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.topbar-logo { height: 32px; width: auto; margin-left: auto; }
.hamburger {
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  padding: 6px;
  display: flex;
  align-items: center;
}
.hamburger svg { width: 22px; height: 22px; }

/* --- Sidebar ----------------------------------------------- */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 299;
}
.sidebar-overlay.active { display: block; }

.sidebar {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: var(--sidebar-w);
  background: var(--blue);
  color: #fff;
  overflow-y: auto;
  z-index: 300;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease;
}
.sidebar-brand {
  padding: 20px 18px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.15);
  text-decoration: none;
  color: #fff;
}
.sidebar-brand img { height: 36px; width: auto; }
.sidebar-brand-text strong { display: block; font-size: 13px; }
.sidebar-brand-text span { font-size: 11px; opacity: 0.75; }

.sidebar-nav { flex: 1; padding: 12px 0 20px; }
.nav-group { margin-bottom: 8px; }
.nav-group-label {
  display: block;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.6;
  padding: 10px 18px 4px;
}
.nav-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 18px;
  font-size: 13px;
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  border-left: 3px solid transparent;
  transition: background 0.1s, color 0.1s;
}
.nav-link:hover { background: rgba(255,255,255,0.1); color: #fff; }
.nav-link.active {
  background: rgba(247,168,27,0.15);
  color: var(--gold);
  border-left-color: var(--gold);
  font-weight: 600;
}
.nav-link svg { width: 14px; height: 14px; flex-shrink: 0; }

.sidebar-footer {
  padding: 12px 18px;
  font-size: 11px;
  opacity: 0.55;
  border-top: 1px solid rgba(255,255,255,0.15);
}

/* --- Layout ------------------------------------------------- */
.layout {
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.main-content {
  flex: 1;
  max-width: 820px;
  width: 100%;
  margin: 0 auto;
  padding: 40px 32px 60px;
}
.page-title {
  font-size: 28px;
  font-weight: 600;
  color: var(--blue);
  margin-bottom: 6px;
}
.page-subtitle {
  font-size: 16px;
  color: var(--muted);
  margin-bottom: 28px;
}

/* --- Cards -------------------------------------------------- */
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--card-pad);
  margin-bottom: 24px;
}
.card h2 { font-size: 22px; font-weight: 600; margin-bottom: 12px; color: var(--blue); }
.card h3 { font-size: 17px; font-weight: 600; margin-bottom: 8px; }
.card p { margin-bottom: 12px; }
.card p:last-child { margin-bottom: 0; }
.card ol, .card ul { margin-bottom: 12px; }

/* Card grid (landing page) */
.card-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 40px;
}
.grid-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  text-decoration: none;
  color: var(--dark);
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.grid-card:hover {
  border-color: var(--blue);
  color: var(--dark);
  box-shadow: 0 0 0 2px rgba(23,69,143,0.12);
}
.grid-card-icon {
  width: 40px; height: 40px;
  background: rgba(23,69,143,0.08);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: var(--blue);
  margin-bottom: 4px;
}
.grid-card-icon svg { width: 20px; height: 20px; }
.grid-card h2 { font-size: 16px; font-weight: 600; margin: 0; color: var(--blue); }
.grid-card p { font-size: 13px; color: var(--muted); margin: 0; line-height: 1.5; }
.grid-card-link {
  font-size: 13px;
  font-weight: 600;
  color: var(--blue);
  margin-top: auto;
}

/* --- Callout boxes ----------------------------------------- */
.callout {
  display: flex;
  gap: 12px;
  padding: 16px 18px;
  border-radius: 8px;
  border-left: 4px solid;
  margin-bottom: 20px;
}
.callout svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 2px; }
.callout > div { flex: 1; }
.callout p { margin-bottom: 6px; }
.callout p:last-child { margin-bottom: 0; }
.callout strong { display: block; margin-bottom: 4px; font-weight: 600; }

.callout-tip {
  background: #eef4fd;
  border-color: var(--blue);
  color: var(--dark);
}
.callout-tip svg { color: var(--blue); }

.callout-warning {
  background: #fff8e6;
  border-color: var(--gold);
  color: var(--dark);
}
.callout-warning svg { color: #c07800; }

.callout-info {
  background: #f5f5f3;
  border-color: #aaa;
  color: var(--dark);
}
.callout-info svg { color: var(--muted); }

/* --- Platform expander ------------------------------------- */
.platform-group { margin-bottom: 24px; }
.platform-prompt { font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.platform-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 0;
}
.platform-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  border-radius: 20px;
  border: 1.5px solid var(--border);
  background: var(--white);
  font-size: 13px;
  font-family: var(--font);
  cursor: pointer;
  color: var(--dark);
  transition: background 0.1s, border-color 0.1s, color 0.1s;
}
.platform-btn:hover { border-color: var(--blue); color: var(--blue); }
.platform-btn.active {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}
.platform-btn svg { width: 14px; height: 14px; }
.platform-content {
  background: var(--bg);
  border-radius: 8px;
  padding: 20px;
  margin-top: 8px;
}
.platform-content ol, .platform-content ul { margin-bottom: 8px; }

/* --- Screenshot placeholders ------------------------------- */
.screenshot-placeholder {
  border: 2px dashed var(--border);
  background: #f9f9f7;
  border-radius: 8px;
  padding: 32px;
  text-align: center;
  color: #888;
  font-size: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin: 16px 0;
}
.screenshot-placeholder svg { width: 28px; height: 28px; opacity: 0.4; }
.screenshot-placeholder.portrait {
  max-width: 320px;
  margin-left: auto;
  margin-right: auto;
  aspect-ratio: 9/19;
  justify-content: center;
}

/* --- Avatar placeholder ------------------------------------ */
.avatar-placeholder {
  width: 120px; height: 120px;
  border-radius: 50%;
  background: #E6F1FB;
  color: var(--blue);
  font-size: 28px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}
.avatar-photo {
  width: 120px; height: 120px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  margin: 0 auto 16px;
}

/* --- Team cards -------------------------------------------- */
.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 28px;
}
.team-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 20px;
  text-align: center;
}
.team-card h3 { font-size: 17px; margin-bottom: 4px; }
.team-card p { font-size: 13px; color: var(--muted); margin: 0; }

/* --- Progress stepper -------------------------------------- */
.progress-stepper {
  display: flex;
  align-items: center;
  margin-bottom: 32px;
  gap: 0;
}
.progress-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  position: relative;
}
.progress-step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 16px;
  left: 50%;
  width: 100%;
  height: 2px;
  background: var(--border);
  z-index: 0;
}
.progress-step.done::after,
.progress-step.active::after { background: var(--blue); }
.step-circle {
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: var(--white);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px;
  font-weight: 600;
  position: relative;
  z-index: 1;
}
.progress-step.done .step-circle { background: var(--gold); border-color: var(--gold); color: #fff; }
.progress-step.active .step-circle { background: var(--blue); border-color: var(--blue); color: #fff; }
.step-label { font-size: 11px; color: var(--muted); margin-top: 6px; text-align: center; }
.progress-step.active .step-label { color: var(--blue); font-weight: 600; }

/* --- Anchor nav (in-page) ---------------------------------- */
.anchor-nav {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 28px;
}
.anchor-nav p { font-size: 12px; color: var(--muted); margin-bottom: 8px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }
.anchor-nav ul {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
}
.anchor-nav ul li { margin: 0; }
.anchor-nav a {
  font-size: 13px;
  padding: 4px 12px;
  background: var(--bg);
  border-radius: 20px;
  text-decoration: none;
  color: var(--blue);
  display: inline-block;
  transition: background 0.1s;
}
.anchor-nav a:hover { background: #dde9f9; }

/* --- Section headings within content ---------------------- */
.section-heading {
  font-size: 22px;
  font-weight: 600;
  color: var(--blue);
  margin: 36px 0 14px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}
.section-heading:first-child { border-top: none; margin-top: 0; }
.subsection-heading {
  font-size: 17px;
  font-weight: 600;
  margin: 24px 0 10px;
}

/* --- Comparison table -------------------------------------- */
.comparison-table { margin: 16px 0 20px; }
.comparison-table th {
  background: var(--blue);
  color: #fff;
  padding: 10px 14px;
  text-align: left;
  font-size: 13px;
  font-weight: 600;
}
.comparison-table td {
  padding: 9px 14px;
  font-size: 13px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.comparison-table tr:last-child td { border-bottom: none; }
.comparison-table tr:nth-child(even) td { background: var(--bg); }
.comparison-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin: 16px 0 20px;
  font-size: 14px;
}
.comparison-col { padding: 20px; }
.comparison-col:first-child { border-right: 1px solid var(--border); }
.comparison-col h3 { font-size: 15px; margin-bottom: 10px; color: var(--blue); }

/* --- FAQ accordion ----------------------------------------- */
.faq-group { margin-bottom: 28px; }
.faq-group-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--blue);
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--border);
}
.faq-item { border-bottom: 1px solid var(--border); }
.faq-question {
  width: 100%;
  background: none;
  border: none;
  text-align: left;
  padding: 14px 0;
  font-size: 15px;
  font-family: var(--font);
  font-weight: 600;
  cursor: pointer;
  color: var(--dark);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.faq-question:hover { color: var(--blue); }
.faq-question svg { width: 16px; height: 16px; flex-shrink: 0; transition: transform 0.2s; color: var(--muted); }
.faq-question[aria-expanded="true"] svg { transform: rotate(180deg); }
.faq-answer {
  padding: 0 0 16px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--dark);
}
.faq-answer p { margin-bottom: 8px; }
.faq-answer p:last-child { margin-bottom: 0; }
.faq-answer ul, .faq-answer ol { margin-bottom: 8px; }

/* --- Feature cards (3-col) --------------------------------- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
.feature-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.feature-card-icon { color: var(--blue); margin-bottom: 10px; }
.feature-card-icon svg { width: 24px; height: 24px; }
.feature-card h3 { font-size: 15px; margin-bottom: 6px; }
.feature-card p { font-size: 13px; color: var(--muted); margin: 0; }

/* --- Step list (onboarding welcome) ----------------------- */
.step-list { list-style: none; padding: 0; margin: 20px 0; }
.step-list-item {
  display: flex;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}
.step-list-item:last-child { border-bottom: none; }
.step-list-num {
  width: 32px; height: 32px; flex-shrink: 0;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  display: flex; align-items: center; justify-content: center;
}
.step-list-body h3 { font-size: 16px; margin-bottom: 4px; }
.step-list-body p { font-size: 14px; color: var(--muted); margin: 0; }

/* --- Buttons ----------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: var(--blue);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 15px;
  font-family: var(--font);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s;
}
.btn:hover { background: var(--blue-dark); color: #fff; }
.btn svg { width: 16px; height: 16px; }

/* --- Landing page hero ------------------------------------- */
.landing-hero {
  background: var(--blue);
  color: #fff;
  padding: 40px 32px;
  margin-bottom: 0;
}
.landing-hero img { height: 48px; width: auto; margin-bottom: 20px; }
.landing-hero h1 { font-size: 28px; font-weight: 600; margin-bottom: 10px; }
.landing-hero p { font-size: 15px; opacity: 0.85; max-width: 520px; }
.landing-body { max-width: 900px; margin: 0 auto; padding: 36px 32px 60px; }

/* --- Footer ------------------------------------------------ */
.site-footer {
  text-align: center;
  padding: 24px 32px;
  font-size: 12px;
  color: var(--muted);
  border-top: 1px solid var(--border);
  margin-top: auto;
}
.site-footer a { color: var(--muted); }

/* --- General typography helpers ---------------------------- */
p { margin-bottom: 14px; }
p:last-child { margin-bottom: 0; }
.text-muted { color: var(--muted); font-size: 13px; }
.mb-0 { margin-bottom: 0; }
.mt-24 { margin-top: 24px; }
code {
  font-family: 'Courier New', Courier, monospace;
  background: #eee;
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 13px;
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 768px) {
  /* Show topbar, hide sidebar by default */
  .topbar { display: flex; }
  .sidebar {
    transform: translateX(calc(-1 * var(--sidebar-w)));
  }
  .sidebar.open { transform: translateX(0); }
  .layout { margin-left: 0; padding-top: 56px; }
  .main-content { padding: 24px 20px 48px; }

  /* Landing page */
  .landing-hero { padding: 28px 20px; }
  .landing-body { padding: 24px 20px 48px; }
  .card-grid { grid-template-columns: 1fr; }

  /* Teams / features */
  .feature-grid { grid-template-columns: 1fr; }
  .team-grid { grid-template-columns: 1fr; }
  .comparison-card { grid-template-columns: 1fr; }
  .comparison-col:first-child { border-right: none; border-bottom: 1px solid var(--border); }

  /* Progress stepper */
  .step-label { font-size: 10px; }
}

@media (max-width: 480px) {
  .page-title { font-size: 22px; }
  .card { padding: 20px; }
  .platform-tabs { gap: 6px; }
  .platform-btn { padding: 5px 12px; font-size: 12px; }
}
