/* body override — detail page uses body-bg instead of white */
body { background: var(--body-bg); }

/* ─── HERO ─── */
.detail-hero {
  background: var(--dark-navy);
  position: relative;
  overflow: hidden;
}

/* .detail-hero::before background-image is injected inline (dynamic PHP value) */
.detail-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.18;
}

.detail-hero::after {
  content: '';
  position: absolute;
  right: 0;
  bottom: 0;
  width: 420px;
  height: 100%;
  background: url('/images/bear_symbol.svg') no-repeat bottom right / contain;
  pointer-events: none;
  opacity: 1;
}

@media (max-width: 991px) { .detail-hero::after { width: 260px; } }
@media (max-width: 575px) { .detail-hero::after { display: none; } }

.detail-hero-inner {
  position: relative;
  padding: 3rem 0 3.5rem;
}

.hero-tag {
  display: inline-block;
  background: rgba(230,53,40,0.2);
  border: 1px solid rgba(230,53,40,0.4);
  color: #ff8c85;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 1rem;
}

.detail-hero h1 {
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
  margin-bottom: 1.2rem;
}

.hero-meta-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1.6rem;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.8);
  font-size: 0.82rem;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 999px;
}

.hero-pill svg { color: var(--red); flex-shrink: 0; }

.hero-pill.pill-green {
  background: rgba(34,197,94,0.1);
  border-color: rgba(34,197,94,0.25);
  color: #4ade80;
}

/* ─── MAIN LAYOUT ─── */
.detail-wrap { padding: 2.5rem 0 5rem; }

/* ─── CONTENT BLOCKS ─── */
.section-block {
  background: #fff;
  border-radius: 16px;
  padding: 2rem;
  margin-bottom: 1.25rem;
}

.block-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 1rem;
}

.block-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--dark-navy);
  margin-bottom: 1.2rem;
}

.intro-text {
  font-size: 0.95rem;
  color: #374151;
  line-height: 1.75;
}

/* ─── DETAIL LISTS ─── */
.detail-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.detail-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.9rem;
  color: #374151;
  line-height: 1.55;
}

.detail-list li .li-icon {
  width: 20px;
  height: 20px;
  background: var(--red);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

.detail-list li .li-icon svg { color: #fff; }

.detail-list.offer-list li .li-icon { background: #d1fae5; }
.detail-list.offer-list li .li-icon svg { color: #059669; }

/* ─── BENEFITS GRID ─── */
.benefits-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.benefit-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: #f8f9fb;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem 1.1rem;
}

.benefit-item-icon {
  width: 36px;
  height: 36px;
  background: #fff1f0;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--red);
}

.benefit-item-text {
  font-size: 0.87rem;
  color: #374151;
  line-height: 1.45;
  padding-top: 0.5rem;
}

@media (max-width: 600px) { .benefits-grid { grid-template-columns: 1fr; } }

/* ─── SIDEBAR ─── */
.sidebar-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 1.25rem;
}

.sidebar-card-head {
  padding: 1rem 1.4rem 0.9rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--dark-navy);
  background: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.sidebar-card-head::before {
  content: '';
  display: block;
  width: 3px;
  height: 14px;
  border-radius: 99px;
  background: var(--red);
  flex-shrink: 0;
}

.sidebar-card-body { padding: 1.4rem; }

/* ─── SUMMARY PILLS ─── */
.sum-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
  margin-bottom: 1.2rem;
}

.sum-item {
  background: var(--body-bg);
  border-radius: 10px;
  padding: 0.8rem;
  text-align: center;
}

.sum-val {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--dark-navy);
  line-height: 1;
  margin-bottom: 0.2rem;
}

.sum-lbl {
  font-size: 0.63rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

/* ─── FORM VALIDATION ─── */
.f-input--error {
  border-color: #e63528 !important;
  box-shadow: 0 0 0 3px rgba(230,53,40,0.12) !important;
  animation: shake 0.3s ease;
}

@keyframes shake {
  0%,100% { transform: translateX(0); }
  25%      { transform: translateX(-4px); }
  75%      { transform: translateX(4px); }
}

.f-error {
  display: none;
  font-size: 0.72rem;
  color: #e63528;
  margin-top: -0.6rem;
  margin-bottom: 0.75rem;
  padding-left: 2px;
}

.f-error--show { display: block; }

/* ─── FORM ─── */
.f-note {
  font-size: 0.72rem;
  color: var(--muted);
  text-align: center;
  margin-top: 0.75rem;
  line-height: 1.5;
}

/* ─── CONTACT PERSON ─── */
.person-row {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin-bottom: 1rem;
}

.person-avatar { position: relative; flex-shrink: 0; }

.person-avatar img {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.person-online {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 11px;
  height: 11px;
  background: #22c55e;
  border-radius: 50%;
  border: 2px solid #fff;
}

.person-name { font-size: 0.95rem; font-weight: 800; color: var(--dark-navy); }
.person-role { font-size: 0.76rem; color: var(--muted); margin-top: 0.1rem; }

.person-avail {
  font-size: 0.72rem;
  color: #16a34a;
  font-weight: 600;
  margin-top: 0.25rem;
  display: flex;
  align-items: center;
  gap: 5px;
}

.contact-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 0.6rem;
}

.contact-row strong { display: block; color: var(--dark-navy); font-size: 0.85rem; }

.btn-call {
  display: flex;
  width: 100%;
  text-align: center;
  padding: 0.65rem;
  background: var(--red);
  color: #fff;
  border-radius: 8px;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 700;
  margin-top: 1rem;
  transition: background 0.15s;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-call:hover { background: var(--red-h); color: #fff; }

/* ─── FORM SUCCESS STATE ─── */
.form-success {
  display: none;
  text-align: center;
  padding: 2rem 1rem;
}

.form-success .ok-icon {
  width: 56px;
  height: 56px;
  background: #d1fae5;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
}

.form-success h4 {
  font-size: 1rem;
  font-weight: 800;
  color: var(--dark-navy);
  margin-bottom: 0.4rem;
}

.form-success p {
  font-size: 0.83rem;
  color: var(--muted);
  line-height: 1.6;
}

/* ─── MOBILE STICKY APPLY BAR ─── */
.mob-apply-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 900;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: #fff;
  border-top: 1px solid var(--border);
  box-shadow: 0 -4px 20px rgba(0,0,0,0.08);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.mob-apply-bar--hidden {
  transform: translateY(100%);
  opacity: 0;
  pointer-events: none;
}

.mob-apply-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 15px 24px;
  background: var(--red);
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
  border-radius: 12px;
  transition: background 0.2s;
}

.mob-apply-btn { border-radius: 50px; }
.mob-apply-btn:hover { background: var(--red-h); color: #fff; }

@media (max-width: 768px) {
  .mob-apply-bar { display: block; background: none; box-shadow: none; border: none; }

  /* Push WA + back-to-top above the sticky apply bar */
  .wa-btn      { bottom: 96px !important; }
  .back-to-top { bottom: 158px !important; }
}

/* ─── RESPONSIVE ─── */
@media (max-width: 768px) {
  .detail-hero h1 { font-size: 1.5rem; }
  .hero-meta-pills { gap: 0.4rem; }

  .detail-wrap { padding: 1.5rem 0 6rem; }
  .section-block { padding: 1.25rem; margin-bottom: 0.75rem; }
  .sidebar-card { margin-bottom: 0.75rem; }
  .row.g-4 { --bs-gutter-y: 0.75rem; }

  .sum-grid {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }
  .sum-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-align: left;
    padding: 0.75rem 1rem;
  }
  .sum-val { font-size: 1rem; margin-bottom: 0; }
  .sum-lbl { font-size: 0.62rem; }

  /* Form in sidebar */
  .sidebar-card .f-label  { font-size: 0.68rem; }
  .sidebar-card .f-input  { padding: 0.6rem 0.8rem; font-size: 14px !important; }
  .sidebar-card .f-submit { font-size: 0.85rem; padding: 0.75rem; }
  .sidebar-card .f-note   { font-size: 0.65rem; }
  .sidebar-card .f-error  { font-size: 0.65rem; }
  .detail-hero-inner {
    padding-top: 3rem;
    padding-bottom: 3.5rem;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}
