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

:root {
  --green: #1fa84a;
  --green-dark: #167a37;
  --green-light: #e8f7ed;
  --dark: #1a1a1a;
  --gray: #6b7280;
  --light: #f9fafb;
  --border: #e5e7eb;
  --radius: 12px;
}

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--dark);
  background: var(--light);
  line-height: 1.6;
}

/* ── Header ── */
header {
  background: var(--dark);
  color: #fff;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,0.3);
}
.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #fff;
  font-weight: 700;
  font-size: 18px;
  white-space: nowrap;
}
.logo-badge {
  background: var(--green);
  color: #fff;
  font-weight: 900;
  font-size: 13px;
  padding: 3px 8px;
  border-radius: 6px;
  letter-spacing: 0.5px;
}

/* ── Burger ── */
.burger {
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  border-radius: 6px;
  transition: background 0.2s;
}
.burger:hover { background: rgba(255,255,255,0.1); }
.burger span {
  display: block;
  width: 24px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
}

/* ── Nav overlay ── */
.nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 200;
  display: none;
  opacity: 0;
  transition: opacity 0.25s;
}
.nav-overlay.open { display: block; opacity: 1; }
.nav-drawer {
  position: absolute;
  right: 0; top: 0; bottom: 0;
  width: min(300px, 85vw);
  background: #fff;
  display: flex;
  flex-direction: column;
  box-shadow: -4px 0 24px rgba(0,0,0,0.18);
  transform: translateX(100%);
  transition: transform 0.3s ease;
  overflow-y: auto;
}
.nav-overlay.open .nav-drawer { transform: translateX(0); }
.nav-drawer-header {
  background: var(--dark);
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  flex-shrink: 0;
}
.nav-close {
  background: none;
  border: none;
  color: #fff;
  font-size: 30px;
  cursor: pointer;
  line-height: 1;
  opacity: 0.75;
  padding: 0;
}
.nav-close:hover { opacity: 1; }
.nav-menu { padding: 8px 0; flex: 1; }
.nav-menu-section {
  padding: 12px 20px 4px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--gray);
}
.nav-menu-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 20px;
  font-size: 15px;
  color: var(--dark);
  text-decoration: none;
  transition: background 0.15s;
}
.nav-menu-link:hover { background: var(--green-light); color: var(--green-dark); }
.nav-menu-link.active { color: var(--green); font-weight: 700; background: var(--green-light); }
.nav-sep { height: 1px; background: var(--border); margin: 6px 0; }

/* ── Hero ── */
.hero {
  background: linear-gradient(135deg, #0f2a1a 0%, #1a4a2e 100%);
  color: #fff;
  padding: 60px 24px;
  text-align: center;
}
.hero h1 {
  font-size: clamp(24px, 5vw, 42px);
  font-weight: 800;
  margin-bottom: 16px;
  line-height: 1.2;
}
.hero h1 span { color: #4ade80; }
.hero p {
  font-size: 17px;
  color: rgba(255,255,255,0.8);
  max-width: 560px;
  margin: 0 auto 32px;
}
.hero-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  color: #fff;
  text-decoration: none;
  padding: 10px 22px;
  border-radius: 8px;
  font-size: 15px;
  transition: background 0.2s;
}
.hero-btn:hover { background: rgba(255,255,255,0.18); }

/* ── Main container ── */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}

/* ── Section label ── */
.section-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--gray);
  margin-bottom: 20px;
}

/* ── Instruction cards (index page) ── */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}
.instr-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 20px 24px 24px;
  text-decoration: none;
  color: var(--dark);
  display: flex;
  align-items: flex-start;
  gap: 18px;
  transition: box-shadow 0.2s, transform 0.2s, border-color 0.2s;
  position: relative;
}
.instr-card:hover {
  box-shadow: 0 6px 20px rgba(0,0,0,0.1);
  transform: translateY(-2px);
  border-color: var(--green);
}
.instr-card-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  flex-shrink: 0;
}
.icon-green { background: var(--green-light); }
.icon-blue  { background: #eff6ff; }
.icon-red   { background: #fff1f2; }
.icon-teal  { background: #f0fdfa; }
.icon-pink  { background: #fdf4ff; }
.icon-orange{ background: #fff7ed; }

.instr-card-body { flex: 1; }
.instr-card-title { font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.instr-card-desc  { font-size: 13px; color: var(--gray); line-height: 1.5; }
.instr-card-steps { font-size: 12px; color: var(--green); font-weight: 600; margin-top: 8px; }
.instr-card-arrow {
  color: #d1d5db;
  font-size: 20px;
  align-self: center;
  flex-shrink: 0;
  transition: color 0.2s, transform 0.2s;
}
.instr-card:hover .instr-card-arrow { color: var(--green); transform: translateX(3px); }

/* ── Page wrap (instruction pages) ── */
.page-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px 24px 80px;
}
.breadcrumb { margin-bottom: 20px; }
.breadcrumb a {
  color: var(--green);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
}
.breadcrumb a:hover { text-decoration: underline; }

/* ── Section header ── */
.section-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 2px solid var(--border);
}
.section-icon {
  width: 52px; height: 52px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; flex-shrink: 0;
}
.section-title { font-size: 26px; font-weight: 800; }
.section-desc  { font-size: 15px; color: var(--gray); margin-top: 4px; }

/* ── Info box ── */
.info-box {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 22px;
  margin-bottom: 28px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.info-icon { font-size: 22px; flex-shrink: 0; margin-top: 2px; }
.info-box p { font-size: 14px; color: #374151; line-height: 1.6; }
.info-box strong { color: var(--dark); }

/* ── Steps grid ── */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

/* ── Step card ── */
.step-card {
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  transition: box-shadow 0.2s, transform 0.2s;
}
.step-card:hover {
  box-shadow: 0 6px 20px rgba(0,0,0,0.1);
  transform: translateY(-2px);
}
.step-img-wrap {
  background: #f3f4f6;
  position: relative;
  cursor: pointer;
}
.step-img-wrap img {
  width: 100%;
  height: 340px;
  object-fit: contain;
  display: block;
  padding: 8px;
}
.step-num {
  position: absolute;
  top: 12px; left: 12px;
  background: var(--green);
  color: #fff;
  font-weight: 800;
  font-size: 15px;
  width: 32px; height: 32px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 8px rgba(31,168,74,0.4);
}
.step-body { padding: 16px 18px 20px; }
.step-title { font-weight: 700; font-size: 15px; margin-bottom: 6px; color: var(--dark); }
.step-text  { font-size: 14px; color: #4b5563; line-height: 1.55; }
.step-tip {
  margin-top: 10px; padding: 8px 12px;
  background: var(--green-light);
  border-left: 3px solid var(--green);
  border-radius: 0 6px 6px 0;
  font-size: 13px; color: #166534;
}
.step-warn {
  margin-top: 10px; padding: 8px 12px;
  background: #fff7ed;
  border-left: 3px solid #f97316;
  border-radius: 0 6px 6px 0;
  font-size: 13px; color: #9a3412;
}

/* ── Permissions ── */
.perm-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
  margin-top: 28px;
}
.perm-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
}
.perm-card h4 { font-size: 15px; font-weight: 700; margin-bottom: 10px; }
.perm-item {
  display: flex; align-items: center; gap: 10px;
  font-size: 14px; color: #374151;
  padding: 6px 0;
  border-bottom: 1px solid #f3f4f6;
}
.perm-item:last-child { border-bottom: none; }
.perm-on { color: var(--green); font-size: 18px; }

/* ── Lightbox ── */
.lightbox {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.92);
  z-index: 1000;
  align-items: center; justify-content: center;
  padding: 20px;
}
.lightbox.open { display: flex; }
.lightbox img {
  max-width: 100%; max-height: 90vh;
  object-fit: contain;
  border-radius: 8px;
}
.lightbox-close {
  position: absolute; top: 16px; right: 20px;
  color: #fff; font-size: 36px;
  cursor: pointer; line-height: 1;
  opacity: 0.8; transition: opacity 0.2s;
}
.lightbox-close:hover { opacity: 1; }

/* ── Footer ── */
footer {
  background: var(--dark);
  color: rgba(255,255,255,0.5);
  text-align: center;
  padding: 24px;
  font-size: 13px;
}
footer a { color: var(--green); text-decoration: none; }

/* ── Responsive ── */
@media (max-width: 600px) {
  .steps-grid, .cards-grid { grid-template-columns: 1fr; }
  .hero { padding: 40px 20px; }
  .section-title { font-size: 21px; }
  .instr-card { flex-direction: column; gap: 12px; }
  .instr-card-arrow { display: none; }
}
