/* =============================================
   SMALL BUSINESS PLATFORM — SHARED STYLES
   justamix.com/small
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&family=Playfair+Display:wght@600;700&display=swap');

:root {
  --green:        #1a6e3c;
  --green-light:  #2a9b57;
  --green-dark:   #0f4225;
  --amber:        #e8920a;
  --amber-light:  #fbb03b;
  --red:          #c0392b;
  --bg:           #f4f7f5;
  --card:         #ffffff;
  --text:         #1c2b1e;
  --muted:        #5a7a62;
  --border:       #cdddd3;
  --radius:       12px;
  --shadow:       0 2px 12px rgba(26,110,60,0.10);
}

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

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  padding-bottom: 3rem;
}

/* ── HEADER ── */
.app-header {
  background: var(--green-dark);
  padding: 0.75rem 1rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.2rem;
}

.header-titles { flex: 1; min-width: 0; }

.app-header h1 {
  font-family: 'Playfair Display', serif;
  color: #fff;
  font-size: 1.2rem;
  letter-spacing: 0.01em;
  margin-bottom: 0.1rem;
}

.app-header p {
  color: rgba(255,255,255,0.6);
  font-size: 0.75rem;
  margin-bottom: 0.5rem;
}

/* ── TOP RIGHT AUTH ── */
.header-auth {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
  padding-top: 0.1rem;
}

.auth-link {
  color: rgba(255,255,255,0.7);
  font-size: 0.75rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.15s;
}
.auth-link:hover { color: #fff; }
.auth-link.register-link {
  background: var(--amber);
  color: #fff;
  border-radius: 6px;
  padding: 0.25rem 0.6rem;
}
.auth-link.register-link:hover { background: var(--amber-light); }

.auth-divider {
  color: rgba(255,255,255,0.3);
  font-size: 0.72rem;
}

.profile-btn {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  color: #fff;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 6px;
  padding: 0.25rem 0.6rem;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s;
}
.profile-btn:hover { background: rgba(255,255,255,0.2); }

/* Header-auth: knoppen die renderHeaderAuth() (js/auth.js) plaatst */
.hh-col { display: flex; flex-direction: column; align-items: flex-end; gap: 0.3rem; }
.hh-row { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; justify-content: flex-end; }

.hh-pill {
  font-size: 0.8rem; font-weight: 700; text-decoration: none;
  padding: 0.35rem 0.75rem; border-radius: 99px;
  color: #fff; border: 1.5px solid rgba(255,255,255,0.55);
  background: rgba(255,255,255,0.12); transition: background 0.15s;
  white-space: nowrap; display: inline-flex; align-items: center; gap: 0.35rem;
}
.hh-pill:hover { background: rgba(255,255,255,0.25); }

.hh-pill-solid {
  font-size: 0.8rem; font-weight: 700; text-decoration: none;
  padding: 0.35rem 0.75rem; border-radius: 99px;
  background: #fff; color: var(--green-dark); border: 1.5px solid #fff;
  transition: opacity 0.15s; white-space: nowrap;
}
.hh-pill-solid:hover { opacity: 0.85; }

.hh-logout {
  font-size: 0.75rem; font-weight: 600; cursor: pointer;
  background: none; border: 1.5px solid rgba(255,255,255,0.35);
  color: rgba(255,255,255,0.8); border-radius: 99px;
  padding: 0.3rem 0.65rem; white-space: nowrap;
  transition: background 0.15s, color 0.15s; font-family: 'DM Sans', sans-serif;
}
.hh-logout:hover { background: rgba(255,255,255,0.15); color: #fff; }

.hh-sub { display: flex; gap: 0.5rem; align-items: center; justify-content: flex-end; }
.hh-link {
  font-size: 0.68rem; font-weight: 700; text-decoration: none;
  color: rgba(255,255,255,0.65); border-bottom: 1px solid rgba(255,255,255,0.3);
  padding-bottom: 1px; white-space: nowrap; transition: color 0.15s;
}
.hh-link:hover { color: #fff; }
.hh-sep { color: rgba(255,255,255,0.3); font-size: 0.68rem; }
.hh-about-btn {
  font-size: 0.68rem; font-weight: 700; cursor: pointer; background: none; border: none;
  color: rgba(255,255,255,0.65); padding: 0; white-space: nowrap;
  font-family: 'DM Sans', sans-serif; transition: color 0.15s;
}
.hh-about-btn:hover { color: #fff; }

/* About-popup (via de About-knop in de header) */
.about-overlay {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; align-items: flex-start; justify-content: flex-end;
  padding: 0.5rem 1rem 0;
}
.about-card {
  background: #fff; border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
  padding: 1.1rem 1.1rem 0.9rem;
  max-width: 300px; width: calc(100% - 2rem);
  font-family: 'DM Sans', sans-serif; font-size: 0.84rem;
  line-height: 1.65; color: #333; margin-top: 5.5rem;
}
.about-card-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 0.65rem; }
.about-card-head strong { font-size: 0.88rem; color: var(--green-dark); line-height: 1.3; }
.about-close {
  background: none; border: none; font-size: 1.1rem; cursor: pointer; color: #999;
  padding: 0; line-height: 1; margin-left: 0.5rem; flex-shrink: 0;
}
.about-card p { margin: 0 0 0.6rem; }
.about-card p:last-child { margin: 0; font-size: 0.75rem; color: #999; }

/* ── NAV TABS ── */
.tabs {
  display: flex;
  gap: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }

.tab-btn {
  flex-shrink: 0;
  background: transparent;
  border: none;
  color: rgba(255,255,255,0.55);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.65rem 0.9rem 0.7rem;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  transition: color 0.2s, border-color 0.2s;
  text-decoration: none;
  white-space: nowrap;
}

.tab-btn.active,
.tab-btn:hover {
  color: var(--amber-light);
  border-bottom-color: var(--amber-light);
}

/* ── HERO (startpagina) ── */
.hero {
  background: var(--green-dark);
  border-radius: var(--radius);
  padding: 1.6rem 1.2rem 1.4rem;
  margin-bottom: 1rem;
  text-align: center;
}
.hero h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.45rem;
  line-height: 1.3;
  color: #fff;
  margin-bottom: 0.6rem;
}
.hero p {
  font-size: 0.92rem;
  line-height: 1.6;
  color: rgba(255,255,255,0.85);
  max-width: 30rem;
  margin: 0 auto 1.1rem;
}
.hero .btn-primary { max-width: 320px; }
.hero-note {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.55);
  margin-top: 0.6rem;
}
.hero-alt {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 600;
  color: rgba(255,255,255,0.75);
  text-decoration: underline;
  margin-top: 0.9rem;
}
.hero-alt:hover { color: #fff; }

/* ── PAGE CONTENT ── */
.page { padding: 1rem; max-width: 680px; margin: 0 auto; }

/* ── CARDS ── */
.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.2rem 1rem;
  margin-bottom: 1rem;
}

/* ── EXPLAIN SECTIONS ── */
.explain-section { margin-bottom: 0.5rem; }

.explain-section h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.15rem;
  color: var(--green-dark);
  margin-bottom: 0.9rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--amber-light);
}

.explain-section h3 {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--green);
  margin: 1.1rem 0 0.35rem;
}

.explain-section p {
  font-size: 0.92rem;
  line-height: 1.7;
  color: var(--text);
  margin-bottom: 0.65rem;
}

.explain-section p strong { color: var(--green-dark); }

/* ── STORY BOXES ── */
.story-box {
  background: #f0f7f3;
  border-radius: var(--radius);
  padding: 0.9rem;
  margin: 0.75rem 0;
}

.story-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--green-light);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.45rem;
}

/* ── RULE / HIGHLIGHT BOXES ── */
.rule-box {
  background: #fff8ee;
  border-left: 4px solid var(--amber);
  border-radius: 0 8px 8px 0;
  padding: 0.8rem 0.9rem;
  margin: 0.7rem 0;
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--text);
}

.tip-box {
  background: #eaf5ee;
  border-left: 4px solid var(--green-light);
  border-radius: 0 8px 8px 0;
  padding: 0.8rem 0.9rem;
  margin: 0.7rem 0;
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--text);
}

/* ── DIVIDERS ── */
.explain-divider {
  text-align: center;
  color: var(--border);
  font-size: 1.2rem;
  margin: 1.2rem 0;
  letter-spacing: 0.3em;
}

/* ── CLOSING LINE ── */
.closing-line {
  text-align: center;
  font-family: 'Playfair Display', serif;
  font-size: 1.05rem;
  color: var(--green-dark);
  padding: 1rem;
  border-top: 1px solid var(--border);
  margin-top: 0.5rem;
}

/* ── BUTTONS ── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: var(--amber);
  color: #fff;
  border: none;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  border-radius: 10px;
  padding: 0.85rem 1.5rem;
  cursor: pointer;
  width: 100%;
  letter-spacing: 0.02em;
  transition: background 0.15s, transform 0.1s;
  text-decoration: none;
}
.btn-primary:hover { background: #d07e08; }
.btn-primary:active { transform: scale(0.98); }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: var(--bg);
  color: var(--green);
  border: 1.5px solid var(--border);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.88rem;
  font-weight: 600;
  border-radius: 10px;
  padding: 0.75rem 1.2rem;
  cursor: pointer;
  transition: background 0.15s;
  text-decoration: none;
  width: 100%;
  margin-top: 0.6rem;
}
.btn-secondary:hover { background: #e0ede5; }

/* ── SHARE BAR ── */
.share-bar {
  margin: 1.5rem 0 0.5rem;
  text-align: center;
}
.share-msg {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 0.4rem;
  min-height: 1.2rem;
}
.btn-whatsapp {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: #1faa55;
  color: #fff;
  border: none;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  border-radius: 10px;
  padding: 0.85rem 1.5rem;
  cursor: pointer;
  width: 100%;
  max-width: 320px;
  letter-spacing: 0.02em;
  transition: background 0.15s;
  text-decoration: none;
}
.btn-whatsapp:hover { background: #178a45; }
.share-copy-link {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  text-decoration: underline;
  margin-top: 0.6rem;
  cursor: pointer;
  background: none;
  border: none;
  font-family: 'DM Sans', sans-serif;
}
.share-copy-link:hover { color: var(--green-dark); }

/* ── SMALL SCREENS ──
   De sticky header is hoog op een klein scherm; de ondertitel kan daar weg
   (de startpagina-hero draagt de belofte) en alles wordt iets compacter. */
@media (max-width: 480px) {
  .app-header { padding: 0.6rem 0.75rem 0; }
  .app-header p { display: none; }
  .app-header h1 { font-size: 1.05rem; }
  .tab-btn { font-size: 0.78rem; padding: 0.55rem 0.7rem 0.6rem; }
}

/* ── UTILITIES ── */
.text-muted { color: var(--muted); font-size: 0.82rem; }
.badge {
  display: inline-block;
  background: var(--green-light);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  border-radius: 4px;
  padding: 0.1rem 0.4rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
em { font-style: italic; }
