/* Loker Sosial - Indonesian Job Portal Styles | Mobile-first */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* === Variables === */
:root {
  --color-primary: #2563eb;
  --color-primary-dark: #1d4ed8;
  --color-primary-light: #eff6ff;
  --color-success: #16a34a;
  --color-success-light: #f0fdf4;
  --color-danger: #dc2626;
  --color-text: #1e293b;
  --color-text-muted: #64748b;
  --color-border: #e2e8f0;
  --color-bg: #f8fafc;
  --color-surface: #ffffff;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-full: 999px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 4px 6px rgba(0, 0, 0, 0.07), 0 2px 4px rgba(0, 0, 0, 0.04);
  --container-max: 720px;
}

/* === Base === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--color-bg);
  color: var(--color-text);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
main { flex: 1; }
.hidden { display: none !important; }
:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 2px; }
button:focus:not(:focus-visible), a:focus:not(:focus-visible) { outline: none; }

/* === Layout === */
.container { max-width: var(--container-max); margin: 0 auto; padding: 0 16px; }
.main-content { padding: 24px 0; min-height: calc(100vh - 140px); }

/* === Header === */
.site-header {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  position: sticky; top: 0; z-index: 100;
  box-shadow: var(--shadow-sm);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; height: 56px; }
.logo { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--color-primary); }
.logo svg { width: 28px; height: 28px; flex-shrink: 0; }
.logo-text { font-size: 18px; font-weight: 700; color: var(--color-text); }
.nav { display: none; gap: 16px; }
.nav-link { text-decoration: none; color: var(--color-text-muted); font-size: 14px; font-weight: 500; padding: 4px 0; transition: color 0.2s; }
.nav-link:hover { color: var(--color-primary); }

/* === Page title === */
.page-title { font-size: 22px; font-weight: 700; margin-bottom: 4px; color: var(--color-text); }
.page-subtitle { color: var(--color-text-muted); font-size: 14px; margin-bottom: 24px; }

/* === Job card === */
.job-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden; margin-bottom: 24px;
  box-shadow: var(--shadow-md);
}
.job-card-header {
  display: flex; align-items: center; gap: 12px;
  padding: 16px; border-bottom: 1px solid var(--color-border);
  background: var(--color-primary-light);
}
.company-badge {
  width: 48px; height: 48px; border-radius: var(--radius-md);
  background: var(--color-primary); display: flex;
  align-items: center; justify-content: center;
  color: var(--color-surface); flex-shrink: 0;
}
.company-badge svg { width: 24px; height: 24px; }
.company-name { font-size: 16px; font-weight: 600; color: var(--color-text); }
.company-tagline { font-size: 13px; color: var(--color-text-muted); }
.job-title { font-size: 18px; font-weight: 700; padding: 0 20px; margin-top: 16px; color: var(--color-text); }
.job-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 16px 20px; }
.meta-item { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--color-text-muted); }
.meta-item svg { width: 16px; height: 16px; flex-shrink: 0; color: var(--color-primary); }
.job-tags { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 20px 16px; }
.tag {
  background: var(--color-primary-light); color: var(--color-primary-dark);
  font-size: 12px; font-weight: 500; padding: 4px 12px;
  border-radius: var(--radius-full); white-space: nowrap;
}
.job-section { padding: 16px 20px; border-top: 1px solid var(--color-border); }
.section-title { font-size: 15px; font-weight: 600; margin-bottom: 10px; color: var(--color-text); }
.job-description { font-size: 14px; color: var(--color-text-muted); line-height: 1.7; }
.job-description p { margin-bottom: 8px; }
.job-description p:last-child { margin-bottom: 0; }
.requirements-list { list-style: none; padding: 0; }
.requirement-item { position: relative; padding-left: 24px; font-size: 14px; color: var(--color-text-muted); margin-bottom: 6px; line-height: 1.6; }
.requirement-item::before { content: ""; position: absolute; left: 0; top: 8px; width: 6px; height: 6px; border-radius: 50%; background: var(--color-primary); }
.requirement-item:last-child { margin-bottom: 0; }
.job-actions { display: flex; flex-direction: column; gap: 12px; padding: 20px; }

/* === Buttons === */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: inherit; font-size: 15px; font-weight: 600;
  padding: 12px 24px; border-radius: var(--radius-md);
  border: none; cursor: pointer; text-decoration: none;
  transition: background-color 0.2s, transform 0.1s, box-shadow 0.2s;
  white-space: nowrap; min-height: 44px;
}
.btn:disabled { opacity: 0.6; cursor: not-allowed; }
.btn-primary { background: var(--color-primary); color: var(--color-surface); box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--color-primary-dark); }
.btn-primary:active { transform: translateY(1px); }
.btn-outline { background: transparent; color: var(--color-primary); border: 1.5px solid var(--color-primary); }
.btn-outline:hover { background: var(--color-primary-light); }
.btn-block { width: 100%; }
.btn-apply { font-size: 16px; padding: 14px 24px; }

/* === Form === */
.form-card {
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-lg); padding: 20px; margin-bottom: 24px;
  box-shadow: var(--shadow-md);
}
.form-title { font-size: 20px; font-weight: 700; margin-bottom: 4px; color: var(--color-text); }
.form-subtitle { font-size: 14px; color: var(--color-text-muted); margin-bottom: 24px; }
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 14px; font-weight: 500; margin-bottom: 6px; color: var(--color-text); }
.form-label .required { color: var(--color-danger); margin-left: 2px; }
.form-input, .form-select, .form-textarea {
  width: 100%; font-family: inherit; font-size: 15px;
  padding: 12px 14px; border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm); background: var(--color-surface);
  color: var(--color-text); transition: border-color 0.2s, box-shadow 0.2s; outline: none;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
.form-input::placeholder, .form-textarea::placeholder { color: #94a3b8; }
.form-textarea { min-height: 80px; resize: vertical; }
.form-select {
  appearance: none; -webkit-appearance: none; -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
  background-size: 16px; padding-right: 40px; cursor: pointer;
}
.form-hint { font-size: 12px; color: var(--color-text-muted); margin-top: 4px; }
.form-actions { display: flex; gap: 12px; margin-top: 24px; }
.form-actions .btn { flex: 1; }
.form-input.error, .form-select.error { border-color: var(--color-danger); }
.error-message { font-size: 12px; color: var(--color-danger); margin-top: 4px; display: none; }
.error-message.show { display: block; }

/* === Verification card === */
.verification-card {
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-lg); padding: 32px 24px; text-align: center;
  margin: 24px 0; box-shadow: var(--shadow-md);
}
.verification-icon {
  width: 72px; height: 72px; margin: 0 auto 20px;
  background: var(--color-success-light); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  animation: pulse 2s ease-in-out infinite;
}
.verification-icon svg { width: 36px; height: 36px; color: var(--color-success); }
.verification-title { font-size: 20px; font-weight: 700; margin-bottom: 16px; color: var(--color-text); }
.verification-text { font-size: 15px; color: var(--color-text-muted); line-height: 1.7; margin-bottom: 12px; }
.verification-note {
  font-size: 13px; color: var(--color-text-muted); background: var(--color-bg);
  border-radius: var(--radius-sm); padding: 12px 16px; margin-top: 20px;
  text-align: left; border-left: 3px solid var(--color-primary);
}

/* === Footer === */
.site-footer {
  background: var(--color-surface); border-top: 1px solid var(--color-border);
  padding: 24px 0; text-align: center; margin-top: auto;
}
.site-footer .container { display: flex; flex-direction: column; gap: 8px; align-items: center; }
.site-footer p { font-size: 13px; color: var(--color-text-muted); }
.site-footer .footer-links { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; }
.site-footer a { font-size: 13px; color: var(--color-primary); text-decoration: none; font-weight: 500; }
.site-footer a:hover { text-decoration: underline; }

/* === Animations === */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes pulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.3); }
  50% { transform: scale(1.05); box-shadow: 0 0 0 12px rgba(22, 163, 74, 0); }
}
.view { animation: fadeIn 0.3s ease; }

/* === Responsive: >=640px === */
@media (min-width: 640px) {
  .nav { display: flex; }
  .job-meta { padding: 16px 20px; }
  .job-actions { flex-direction: row; align-items: center; }
  .form-card { padding: 32px; }
}

/* === Responsive: >=768px === */
@media (min-width: 768px) {
  body { font-size: 16px; }
  .page-title { font-size: 26px; }
  .job-title { font-size: 24px; }
  .container { max-width: var(--container-max); }
  .job-card-header { padding: 20px; }
}

/* === Reduced motion === */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
