:root {
  --maroon: #6E1423;
  --crimson: #9E1B34;
  --crimson-bright: #C4283F;
  --parchment: #F3ECE0;
  --parchment-dim: #E7DDC9;
  --charcoal: #241A17;
  --text-dim: #7A6D63;
  --ok: #2F8F5B;
  --font-display: 'Fraunces', serif;
  --font-body: 'Inter', sans-serif;
  --radius: 12px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--parchment);
  color: var(--charcoal);
  font-family: var(--font-body);
  min-height: 100vh;
}

a { color: inherit; }

/* ---------- Topbar ---------- */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 40px;
  background: var(--maroon);
  color: var(--parchment);
  position: sticky;
  top: 0;
  z-index: 20;
  box-shadow: 0 2px 14px rgba(0,0,0,0.15);
}

.site-brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.site-brand img { width: 42px; height: 42px; border-radius: 50%; }
.site-brand-name { font-family: var(--font-display); font-size: 18px; font-weight: 600; line-height: 1.15; }
.site-brand-sub { font-size: 11px; letter-spacing: 1px; text-transform: uppercase; color: #E7C7C7; }

.staff-login-link {
  font-size: 13px;
  border: 1px solid rgba(243,236,224,0.4);
  padding: 8px 16px;
  border-radius: 999px;
  text-decoration: none;
  transition: background 0.15s ease;
}
.staff-login-link:hover { background: rgba(243,236,224,0.12); }

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(circle at 20% -10%, rgba(196,40,63,0.25), transparent 55%),
    linear-gradient(180deg, var(--maroon) 0%, #4E0E19 100%);
  color: var(--parchment);
  padding: 64px 40px 80px;
  text-align: center;
}

.hero img.hero-logo {
  width: 108px; height: 108px;
  margin-bottom: 20px;
  filter: drop-shadow(0 6px 18px rgba(0,0,0,0.35));
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(30px, 4vw, 46px);
  font-weight: 600;
  margin: 0 0 12px;
  letter-spacing: 0.2px;
}

.hero p {
  max-width: 560px;
  margin: 0 auto;
  color: #E7C7C7;
  font-size: 15px;
  line-height: 1.6;
}

.duty-badge {
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: 22px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(243,236,224,0.3);
  border-radius: 999px;
  padding: 8px 18px;
  font-size: 13.5px;
  color: var(--parchment);
}
.duty-badge .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 8px var(--ok); animation: dutyPulse 1.6s infinite; }
.duty-badge strong { color: #fff; }
@keyframes dutyPulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

.info-btn-row { display: flex; justify-content: center; gap: 12px; margin-top: 16px; flex-wrap: wrap; }
.info-btn {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(243,236,224,0.35);
  color: var(--parchment);
  font-family: var(--font-body);
  font-size: 13.5px;
  padding: 9px 18px;
  border-radius: 999px;
  cursor: pointer;
}
.info-btn:hover { background: rgba(255,255,255,0.16); }

/* ---------- Info modal (Regulasi, Jam Operasional) ---------- */
.info-modal-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(20, 8, 10, 0.65);
  align-items: flex-start; justify-content: center;
  padding: 50px 20px;
  overflow-y: auto;
  z-index: 100;
}
.info-modal-overlay.open { display: flex; }
.info-modal-box {
  background: #FFFDF8;
  border: 1px solid var(--parchment-dim);
  border-radius: var(--radius);
  max-width: 640px;
  width: 100%;
  padding: 32px;
  position: relative;
  box-shadow: 0 20px 50px rgba(0,0,0,0.35);
}
.info-modal-box h2 { font-family: var(--font-display); font-size: 21px; margin: 0 0 18px; }
.info-modal-box h3 { font-family: var(--font-display); font-size: 14.5px; color: var(--crimson); margin: 22px 0 8px; text-transform: uppercase; letter-spacing: 0.4px; }
.info-modal-box h3:first-of-type { margin-top: 0; }
.info-modal-close {
  position: absolute; top: 18px; right: 18px;
  background: none; border: none; font-size: 22px; line-height: 1;
  color: var(--text-dim); cursor: pointer;
}
.info-modal-close:hover { color: var(--crimson); }

.price-table { width: 100%; border-collapse: collapse; margin-bottom: 4px; }
.price-table td { padding: 7px 0; font-size: 13.5px; border-bottom: 1px solid var(--parchment-dim); }
.price-table td.price { text-align: right; white-space: nowrap; font-weight: 600; color: var(--crimson); }
.price-note { color: var(--text-dim); font-weight: 400; font-size: 12px; }
.price-note-block { font-size: 12.5px; color: var(--text-dim); margin: 0 0 10px; }

/* ---------- Foto RS ---------- */
.hospital-photo-section {
  max-width: 1080px;
  margin: -46px auto 0;
  padding: 0 40px;
  position: relative;
  z-index: 2;
}
.hospital-photo {
  position: relative;
  height: 320px;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 18px 40px rgba(52,12,20,0.25);
  background: linear-gradient(135deg, #7A6D63 0%, #4E453E 100%);
  display: flex; align-items: center; justify-content: center;
}
.hospital-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hospital-photo-placeholder {
  color: rgba(255,255,255,0.65);
  font-size: 14px;
  text-align: center;
  padding: 20px;
}
.hospital-photo-placeholder strong { display: block; font-family: var(--font-display); font-size: 18px; color: #fff; margin-bottom: 6px; }

/* ---------- Layanan section ---------- */
.layanan-section {
  max-width: 1080px;
  margin: -46px auto 0;
  padding: 0 32px 80px;
  position: relative;
  z-index: 5;
}

.layanan-heading {
  text-align: center;
  color: var(--parchment);
  font-size: 13px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 18px;
}

.layanan-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 20px;
}

.layanan-card {
  background: #FFFDF8;
  border: 1px solid var(--parchment-dim);
  border-radius: var(--radius);
  padding: 26px 22px;
  text-decoration: none;
  color: var(--charcoal);
  box-shadow: 0 14px 30px rgba(52, 12, 20, 0.18);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.layanan-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 36px rgba(52, 12, 20, 0.24);
}

.layanan-icon {
  width: 46px; height: 46px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--crimson), var(--crimson-bright));
  color: var(--parchment);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
}

.layanan-card h3 {
  font-family: var(--font-display);
  font-size: 17px;
  margin: 0;
}

.layanan-card p {
  font-size: 13.5px;
  color: var(--text-dim);
  line-height: 1.55;
  margin: 0;
  flex: 1;
}

.layanan-cta {
  font-size: 13px;
  font-weight: 600;
  color: var(--crimson);
}

/* ---------- Form page ---------- */
.form-page {
  max-width: 640px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}

.form-page .back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-dim);
  text-decoration: none;
  margin-bottom: 18px;
}
.form-page .back-link:hover { color: var(--crimson); }

.form-card {
  background: #FFFDF8;
  border: 1px solid var(--parchment-dim);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: 0 14px 30px rgba(52, 12, 20, 0.1);
}

.form-card h1 {
  font-family: var(--font-display);
  font-size: 24px;
  margin: 0 0 6px;
}

.form-card .form-desc {
  font-size: 13.5px;
  color: var(--text-dim);
  margin: 0 0 26px;
}

/* ---------- Halaman info (Regulasi, Jam Operasional) ---------- */

.shift-table { width: 100%; border-collapse: collapse; margin-top: 4px; }
.shift-table th, .shift-table td { text-align: left; padding: 10px 12px; font-size: 13.5px; border-bottom: 1px solid var(--parchment-dim); }
.shift-table th { color: var(--text-dim); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: 0.4px; }
.shift-badge-24 { display: inline-block; background: #E1F0E6; color: var(--ok); border-radius: 999px; padding: 2px 10px; font-size: 12px; font-weight: 600; }

.form-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 18px; }
.form-field label { font-size: 13px; font-weight: 600; color: var(--charcoal); }
.form-field .req { color: var(--crimson); }
.form-field .hint { font-size: 12px; color: var(--text-dim); font-weight: 400; }

.form-field input[type="text"],
.form-field input[type="password"],
.form-field input[type="tel"],
.form-field input[type="number"],
.form-field input[type="date"],
.form-field input[type="datetime-local"],
.form-field select,
.form-field textarea {
  border: 1px solid var(--parchment-dim);
  background: #FBF8F1;
  border-radius: 8px;
  padding: 11px 13px;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--charcoal);
  outline: none;
}

.form-field input:focus, .form-field select:focus, .form-field textarea:focus {
  border-color: var(--crimson);
  background: #fff;
}

.form-field textarea { resize: vertical; min-height: 90px; }

.file-drop {
  border: 1.5px dashed var(--parchment-dim);
  border-radius: 8px;
  padding: 18px;
  text-align: center;
  font-size: 13px;
  color: var(--text-dim);
  background: #FBF8F1;
  cursor: pointer;
}
.file-drop.has-file { border-color: var(--ok); color: var(--ok); background: #F1F8F4; }
.file-drop input[type="file"] { display: none; }

.gender-toggle { display: flex; gap: 10px; }
.gender-toggle label {
  flex: 1;
  text-align: center;
  border: 1px solid var(--parchment-dim);
  border-radius: 8px;
  padding: 10px;
  font-size: 13.5px;
  cursor: pointer;
  background: #FBF8F1;
}
.gender-toggle input { display: none; }
.gender-toggle input:checked + span { color: var(--crimson); font-weight: 600; }
.gender-toggle label:has(input:checked) { border-color: var(--crimson); background: #FBEEEF; }

.submit-btn {
  width: 100%;
  background: linear-gradient(135deg, var(--crimson), var(--crimson-bright));
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 14px;
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 6px;
}
.submit-btn:hover { opacity: 0.94; }
.submit-btn:disabled { opacity: 0.6; cursor: not-allowed; }

.form-alert {
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 13px;
  margin-bottom: 18px;
}
.form-alert.error { background: #FCEBEC; color: #A32232; border: 1px solid #F3C6CB; }
.form-alert.success { background: #EAF7EE; color: #226B44; border: 1px solid #BFE6CC; }
.form-alert[hidden] { display: none; }

/* ---------- Success state ---------- */
.success-state {
  text-align: center;
  padding: 20px 0 4px;
}
.success-state .check {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: #EAF7EE;
  color: var(--ok);
  display: flex; align-items: center; justify-content: center;
  font-size: 26px;
  margin: 0 auto 16px;
}
.success-state h2 { font-family: var(--font-display); font-size: 20px; margin: 0 0 8px; }
.success-state p { font-size: 13.5px; color: var(--text-dim); margin: 0 0 20px; }
.success-state .ref-id {
  display: inline-block;
  font-family: monospace;
  background: var(--parchment-dim);
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 13px;
  margin-bottom: 22px;
}

.site-footer {
  text-align: center;
  padding: 26px;
  font-size: 12px;
  color: var(--text-dim);
}

@media (max-width: 560px) {
  .site-header { padding: 14px 18px; }
  .hero { padding: 48px 20px 70px; }
  .layanan-section { padding: 0 16px 60px; }
}
