/* RemotAja shared.css v10.5.0 */
@import url('/assets/css/tokens.css');
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/**
 * RemotAja — Shared Design System
 * =================================
 * Load file ini di SEMUA halaman kecuali dashboard (pakai dashboard.css).
 *
 * Usage:
 *   <link rel="stylesheet" href="/assets/css/shared.css">
 *   atau dari subdomain:
 *   <link rel="stylesheet" href="https://remotaja.id/assets/css/shared.css">
 *
 * Isi:
 *   1. Design tokens (:root)
 *   2. CSS Reset
 *   3. Typography
 *   4. Mobile fixes universal
 *   5. Layout utilities
 *   6. Komponen universal (topbar, footer, wa-float, btn)
 */

/* ══════════════════════════════════════════════════════════
   1. DESIGN TOKENS
   ══════════════════════════════════════════════════════════ */
/* Tokens di bawah ini HARUS sama dengan tokens.css */
:root {
  /* Background */
  --bg:     #020508;
  --bg2:    #050c15;
  --bg3:    #09122a;
  --card:   #060e1a;

  /* Border */
  --border: rgba(56,189,248,.07);
  --b2:     rgba(56,189,248,.16);
  --b3:     rgba(56,189,248,.30);

  /* Text */
  --text:   #eef6ff;
  --text2:  #7fa8c8;
  --text3:  #5a7a9a;

  /* Brand colors */
  --sky:    #38bdf8;
  --teal:   #2dd4bf;
  --green:  #4ade80;
  --yellow: #facc15;
  --red:    #f87171;
  --orange: #fb923c;

  /* Typography */
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono: 'Consolas', 'SF Mono', 'Fira Code', monospace;

  /* Spacing */
  --r:  8px;
  --rm: 12px;
  --rl: 16px;

  /* Transition */
  --t: .18s ease;
}

/* ══════════════════════════════════════════════════════════
   2. CSS RESET
   ══════════════════════════════════════════════════════════ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

button, a, [role="button"], input, select, label, textarea {
  touch-action: manipulation;
}

html {
  overflow-x: hidden;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  }

img, video, svg { max-width: 100%; height: auto; }
a { color: var(--sky); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ══════════════════════════════════════════════════════════
   3. TYPOGRAPHY
   ══════════════════════════════════════════════════════════ */
h1 { font-size: clamp(26px, 5vw, 42px); font-weight: 800; letter-spacing: -.6px; line-height: 1.2; }
h2 { font-size: clamp(20px, 4vw, 32px); font-weight: 700; letter-spacing: -.4px; line-height: 1.3; }
h3 { font-size: clamp(16px, 3vw, 22px); font-weight: 600; line-height: 1.4; }
p  { line-height: 1.75; color: var(--text2); }

/* ══════════════════════════════════════════════════════════
   4. MOBILE FIXES UNIVERSAL
   ══════════════════════════════════════════════════════════ */
/* iOS zoom prevention — input harus 16px+ */
input, select, textarea, button {
  font-size: 16px;
  font-family: var(--font);
}

/* iOS safe area */
.safe-bottom { padding-bottom: env(safe-area-inset-bottom); }
.safe-all {
  padding-top:    env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
  padding-left:   env(safe-area-inset-left);
  padding-right:  env(safe-area-inset-right);
}

/* Table horizontal scroll */
table {
  display: block;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}

/* ══════════════════════════════════════════════════════════
   5. LAYOUT UTILITIES
   ══════════════════════════════════════════════════════════ */
.container  { max-width: 880px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 32px); }
.container-sm { max-width: 640px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 32px); }
.section    { padding: 56px clamp(16px, 4vw, 32px); }
.divider    { height: 1px; background: linear-gradient(90deg, transparent, var(--border) 20%, var(--b2) 50%, var(--border) 80%, transparent); }
.text-mono  { font-family: var(--mono); }
.text-muted { color: var(--text3); }
.text-sky   { color: var(--sky); }

/* ══════════════════════════════════════════════════════════
   6. KOMPONEN UNIVERSAL
   ══════════════════════════════════════════════════════════ */

/* ── Topbar / Navbar ── */
.ra-topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(16px, 4vw, 32px);
  height: 56px;
  background: rgba(2, 5, 8, .90);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.ra-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
}
.ra-brand:hover { text-decoration: none; }
.ra-logo {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--sky), var(--teal));
  display: flex; align-items: center; justify-content: center;
  font-weight: 900; font-size: 14px; color: #fff;
  flex-shrink: 0;
}
.ra-brand-name { font-size: 15px; font-weight: 800; letter-spacing: -.3px; }
.ra-brand-sub  { font-size: 10px; color: var(--text3); font-family: var(--mono); text-transform: uppercase; letter-spacing: .5px; }
.ra-topbar-right { display: flex; align-items: center; gap: 10px; }
.ra-back-btn {
  font-size: 12px; color: var(--text3);
  border: 1px solid var(--border);
  padding: 5px 12px; border-radius: 20px;
  transition: all var(--t);
}
.ra-back-btn:hover { border-color: var(--b2); color: var(--sky); text-decoration: none; }

/* ── Footer ── */
.ra-footer {
  text-align: center;
  padding: 28px clamp(16px, 4vw, 32px) max(28px, env(safe-area-inset-bottom));
  font-size: 12px;
  color: var(--text3);
  border-top: 1px solid var(--border);
  line-height: 2;
}
.ra-footer a { color: var(--text3); }
.ra-footer a:hover { color: var(--sky); text-decoration: none; }
.ra-footer-links { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin-bottom: 8px; }

/* ── WA Float Button ── */
.ra-wa-float {
  position: fixed;
  bottom: max(24px, env(safe-area-inset-bottom) + 16px);
  right: 20px;
  z-index: 200;
  width: 52px; height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, #25D366, #128C7E);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  box-shadow: 0 4px 20px rgba(37,211,102,.4);
  transition: transform var(--t), box-shadow var(--t);
  text-decoration: none;
}
.ra-wa-float:hover {
  transform: scale(1.1) translateY(-2px);
  box-shadow: 0 6px 28px rgba(37,211,102,.5);
  text-decoration: none;
}

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 24px; border-radius: var(--rm);
  font-size: 14px; font-weight: 600; font-family: var(--font);
  cursor: pointer; border: none; text-decoration: none;
  transition: transform var(--t), box-shadow var(--t), background var(--t);
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary {
  background: linear-gradient(135deg, var(--sky), var(--teal));
  color: #fff;
  box-shadow: 0 0 20px rgba(56,189,248,.2);
}
.btn-primary:hover { box-shadow: 0 4px 28px rgba(56,189,248,.35); }
.btn-outline {
  background: transparent;
  border: 1px solid var(--b2);
  color: var(--sky);
}
.btn-outline:hover { background: rgba(56,189,248,.06); }
.btn-wa {
  background: linear-gradient(135deg, #25D366, #128C7E);
  color: #fff;
}
.btn-wa:hover { box-shadow: 0 4px 20px rgba(37,211,102,.3); }
.btn-sm { padding: 7px 16px; font-size: 12.5px; border-radius: 20px; }
.btn-block { width: 100%; justify-content: center; }

/* ── Card ── */
.ra-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--rm);
  padding: 20px;
  transition: border-color var(--t);
}
.ra-card:hover { border-color: var(--b2); }

/* ── Badge / Tag ── */
.ra-tag {
  display: inline-block;
  font-size: 10px; font-weight: 600;
  letter-spacing: .6px; text-transform: uppercase;
  color: var(--sky); background: rgba(56,189,248,.08);
  border: 1px solid rgba(56,189,248,.15);
  padding: 3px 10px; border-radius: 20px;
  font-family: var(--mono);
}

/* ── Section header ── */
.sec-hd { margin-bottom: 28px; }
.sec-tag { font-size: 10px; font-weight: 600; letter-spacing: .8px; text-transform: uppercase; color: var(--sky); font-family: var(--mono); margin-bottom: 8px; }
.sec-title { margin-bottom: 10px; }
.sec-desc { font-size: 14px; max-width: 560px; }

/* ── Grid ── */
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }

/* ══════════════════════════════════════════════════════════
   7. PAGE BACKGROUND GRID (opsional)
   ══════════════════════════════════════════════════════════ */
.ra-grid-bg::before {
  content: '';
  position: fixed; inset: 0;
  background-image:
    linear-gradient(rgba(56,189,248,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(56,189,248,.025) 1px, transparent 1px);
  background-size: 44px 44px;
  pointer-events: none;
  z-index: 0;
}

/* ══════════════════════════════════════════════════════════
   8. BREAKPOINTS
   ══════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .hide-mobile { display: none !important; }
}
@media (min-width: 769px) {
  .hide-desktop { display: none !important; }
}
@media (max-width: 480px) {
  .ra-footer-links { gap: 10px; font-size: 11px; }
}
@media (max-width: 360px) {
  .btn { padding: 10px 16px; font-size: 13px; }
}

/* Word wrap hanya untuk konten teks */
p, .content, .mbody, .ec-body, td, .act-m, .info-box, .warn-box { word-break: break-word; overflow-wrap: break-word; }
