/* ============================================================
   Detail page styles — 유형 상세 / 모집공고 상세
   Builds on styles.css tokens
   ============================================================ */

/* --- Breadcrumb / subnav --- */
.subnav {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.subnav__inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 14px 32px;
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--ink-500);
}
.subnav a { color: var(--ink-500); }
.subnav a:hover { color: var(--navy-700); }
.subnav .sep { color: var(--ink-300); }
.subnav .current { color: var(--ink-900); font-weight: 600; }

/* --- Detail hero (compact) --- */
.dhero {
  background:
    radial-gradient(900px 400px at 100% 0%, rgba(255,107,71,0.06), transparent 60%),
    linear-gradient(180deg, #FFFFFF 0%, #F4F6FB 100%);
  border-bottom: 1px solid var(--line);
}
.dhero__inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 40px 32px 44px;
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 40px;
  align-items: flex-start;
}
.dhero__micro {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 11px;
  border-radius: var(--r-pill);
  background: var(--coral-50);
  color: var(--coral-600);
  font-size: 12px; font-weight: 600;
  letter-spacing: 0.01em;
  margin-bottom: 14px;
}
.dhero__micro.navy { background: var(--navy-50); color: var(--navy-700); }
.dhero__micro.green { background: var(--green-50); color: var(--green-700); }
.dhero__title {
  font-size: 38px;
  font-weight: 700;
  letter-spacing: -0.035em;
  color: var(--ink-900);
  margin: 0 0 12px;
  line-height: 1.18;
  text-wrap: balance;
}
.dhero__sub {
  font-size: 17px;
  color: var(--ink-500);
  margin: 0 0 26px;
  line-height: 1.6;
  max-width: 720px;
}
.dhero__region {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 14px; color: var(--ink-500);
  margin-bottom: 22px;
}
.dhero__region svg { color: var(--navy-600); }

.dhero__btns {
  display: flex; gap: 10px; flex-wrap: wrap;
}
.btn-solid {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 18px;
  background: var(--navy-900);
  color: white;
  border: 1px solid var(--navy-900);
  border-radius: 10px;
  font-weight: 600;
  font-size: 14px;
  transition: background .15s, transform .15s;
}
.btn-solid:hover { background: var(--navy-800); }
.btn-outline {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 18px;
  background: var(--surface);
  color: var(--ink-700);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  font-weight: 500;
  font-size: 14px;
  transition: border-color .15s, color .15s, background .15s;
}
.btn-outline:hover { border-color: var(--navy-500); color: var(--navy-900); background: var(--navy-25); }
.btn-coral {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 18px;
  background: var(--coral-500);
  color: white;
  border: 1px solid var(--coral-500);
  border-radius: 10px;
  font-weight: 600;
  font-size: 14px;
  box-shadow: 0 6px 18px rgba(255,107,71,0.25);
  transition: background .15s, transform .15s;
}
.btn-coral:hover { background: var(--coral-600); }

/* --- Hero pullout card (right) --- */
.pullout {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.pullout__head {
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 10px;
  background: var(--amber-50);
  color: var(--amber-700);
}
.pullout__head .ttl { font-size: 13px; font-weight: 700; letter-spacing: -0.01em; }
.pullout__body { padding: 18px; font-size: 13px; color: var(--ink-700); line-height: 1.65; }
.pullout__body b { color: var(--ink-900); }
.pullout__list { list-style: none; padding: 0; margin: 10px 0 0; display: flex; flex-direction: column; gap: 10px; }
.pullout__list li {
  display: flex; gap: 8px;
  font-size: 13px; color: var(--ink-700);
  line-height: 1.55;
}
.pullout__list li::before {
  content: "";
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--amber-500);
  margin-top: 7px;
  flex-shrink: 0;
}

/* Status pullout (for notice) */
.pullout--status .pullout__head { background: var(--green-50); color: var(--green-700); }
.pullout--status .pulse {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--green-500);
  box-shadow: 0 0 0 4px rgba(16,185,129,0.16);
  margin-right: 8px;
}
.dday {
  text-align: center;
  padding: 8px 0 4px;
}
.dday__big {
  font-size: 44px;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--coral-600);
  line-height: 1;
}
.dday__small {
  font-size: 12px;
  color: var(--ink-500);
  margin-top: 6px;
}
.deadline-row {
  display: flex; justify-content: space-between;
  padding: 12px 0;
  font-size: 13px;
  border-top: 1px solid var(--line);
}
.deadline-row .k { color: var(--ink-500); }
.deadline-row .v { color: var(--ink-900); font-weight: 600; }

/* ============================================================
   Page layout — detail content
   ============================================================ */
.dpage {
  max-width: 1440px;
  margin: 0 auto;
  padding: 40px 32px 56px;
}

/* --- Section card --- */
.section-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  padding: 28px;
  margin-bottom: 24px;
}
.section-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}
.section-head h2 {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--ink-900);
  margin: 0;
  display: flex; align-items: center; gap: 10px;
}
.section-head h2 .num {
  display: inline-grid; place-items: center;
  width: 26px; height: 26px;
  border-radius: 8px;
  background: var(--navy-900);
  color: white;
  font-size: 13px;
  font-weight: 700;
}
.section-head h2 .count {
  display: inline-grid; place-items: center;
  min-width: 22px; height: 22px;
  padding: 0 8px;
  border-radius: var(--r-pill);
  background: var(--coral-50);
  color: var(--coral-600);
  font-size: 12px;
  font-weight: 700;
  margin-left: 4px;
}
.section-head .more {
  font-size: 13px; font-weight: 500;
  color: var(--ink-500);
  display: inline-flex; align-items: center; gap: 4px;
}
.section-head .more:hover { color: var(--navy-900); }

/* --- KPI grid (4-col) --- */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
}
.kpi {
  background: var(--surface);
  padding: 22px 24px;
  display: flex; flex-direction: column; gap: 10px;
}
.kpi__head {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px;
  color: var(--ink-500);
  font-weight: 500;
}
.kpi__head .ico {
  display: grid; place-items: center;
  width: 28px; height: 28px;
  border-radius: 8px;
  background: var(--navy-50);
  color: var(--navy-700);
}
.kpi__value {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--ink-900);
  line-height: 1.2;
}
.kpi__hint {
  font-size: 12px;
  color: var(--ink-400);
}

/* Variant: notice 8-cell info table */
.info-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
}
.info-cell {
  background: var(--surface);
  padding: 18px 20px;
  display: flex; flex-direction: column; gap: 6px;
}
.info-cell__label {
  font-size: 12px;
  color: var(--ink-500);
  font-weight: 500;
  display: flex; align-items: center; gap: 5px;
}
.info-cell__value {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink-900);
}
.info-cell__hint {
  font-size: 11px;
  color: var(--ink-400);
}

/* --- Split layout (2-col) --- */
.split {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 24px;
  margin-bottom: 24px;
}
@media (max-width: 980px) {
  .split { grid-template-columns: 1fr; }
}

/* --- Checklist --- */
.checklist {
  display: flex; flex-direction: column;
  gap: 14px;
}
.check-item {
  display: flex; gap: 14px;
  padding: 16px 18px;
  background: var(--navy-25);
  border: 1px solid var(--line);
  border-radius: 12px;
  transition: border-color .15s, background .15s;
}
.check-item:hover { border-color: var(--navy-100); background: var(--navy-50); }
.check-item__ico {
  width: 28px; height: 28px;
  border-radius: 8px;
  background: var(--green-50);
  color: var(--green-700);
  display: grid; place-items: center;
  flex-shrink: 0;
}
.check-item__body { flex: 1; min-width: 0; }
.check-item__title {
  font-size: 14px; font-weight: 600;
  color: var(--ink-900);
  margin-bottom: 4px;
  letter-spacing: -0.01em;
}
.check-item__desc {
  font-size: 13px;
  color: var(--ink-500);
  line-height: 1.55;
}

/* --- Target tags panel --- */
.target-panel {
  background: linear-gradient(180deg, var(--coral-50) 0%, #FFFFFF 100%);
  border: 1px solid var(--coral-100);
  border-radius: var(--r-xl);
  padding: 28px;
  height: 100%;
}
.target-panel h3 {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--ink-900);
  margin: 0 0 6px;
  display: flex; align-items: center; gap: 10px;
}
.target-panel h3 .sparkle { color: var(--coral-500); }
.target-panel .desc {
  font-size: 13px;
  color: var(--ink-500);
  margin-bottom: 20px;
}
.target-list { display: flex; flex-wrap: wrap; gap: 8px; }
.target-tag {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 14px;
  background: var(--surface);
  border: 1px solid var(--coral-100);
  border-radius: var(--r-pill);
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-700);
  transition: border-color .15s, color .15s;
}
.target-tag:hover {
  border-color: var(--coral-500);
  color: var(--coral-600);
}
.target-tag .em {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--coral-100);
  color: var(--coral-600);
  display: grid; place-items: center;
  font-size: 10px; font-weight: 700;
}

/* --- Notice cards (smaller, for current 모집공고 list on type page) --- */
.notice-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
@media (max-width: 1100px) { .notice-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 720px) { .notice-grid { grid-template-columns: 1fr; } }

.ncard {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 20px;
  transition: transform .2s, box-shadow .2s, border-color .2s;
  display: flex; flex-direction: column;
  gap: 14px;
}
.ncard:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--navy-500);
}
.ncard__top {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px;
}
.ncard__status {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 600;
  padding: 3px 9px;
  border-radius: var(--r-pill);
  background: var(--green-50);
  color: var(--green-700);
}
.ncard__status .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--green-500); }
.ncard__status--soon { background: var(--coral-50); color: var(--coral-600); }
.ncard__status--soon .dot { background: var(--coral-500); }
.ncard__status--end { background: var(--bg); color: var(--ink-400); }
.ncard__status--end .dot { background: var(--ink-300); }
.ncard__dday {
  font-size: 12px;
  font-weight: 700;
  color: var(--coral-600);
  letter-spacing: -0.01em;
}
.ncard__title {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink-900);
  line-height: 1.4;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ncard__meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 12px 14px;
  background: var(--navy-25);
  border-radius: 10px;
  font-size: 12px;
}
.ncard__meta .row { display: flex; flex-direction: column; gap: 2px; }
.ncard__meta .k { color: var(--ink-400); font-size: 11px; }
.ncard__meta .v { color: var(--ink-900); font-weight: 600; font-size: 13px; }
.ncard__foot {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--ink-500);
}
.ncard__cta {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-900);
}
.ncard:hover .ncard__cta { color: var(--navy-700); }

/* --- Map placeholder --- */
.map-wrap {
  position: relative;
  height: 360px;
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--line);
  background:
    linear-gradient(135deg, #E8EEF7 0%, #DDE5F0 100%);
}
.map-wrap::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(70,105,176,0.10) 1px, transparent 1px),
    linear-gradient(90deg, rgba(70,105,176,0.10) 1px, transparent 1px),
    linear-gradient(rgba(70,105,176,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(70,105,176,0.05) 1px, transparent 1px);
  background-size: 80px 80px, 80px 80px, 20px 20px, 20px 20px;
}
.map-wrap::after {
  content: "";
  position: absolute;
  top: 30%; left: 25%;
  width: 60%; height: 50%;
  background: rgba(70,105,176,0.10);
  border: 2px dashed rgba(70,105,176,0.35);
  border-radius: 12px;
  transform: rotate(-2deg);
}
.map-pin {
  position: absolute;
  top: 48%; left: 52%;
  transform: translate(-50%, -100%);
  z-index: 3;
}
.map-pin__bubble {
  background: var(--navy-900);
  color: white;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: var(--shadow-lg);
  position: relative;
  display: inline-flex; align-items: center; gap: 8px;
}
.map-pin__bubble::after {
  content: "";
  position: absolute;
  bottom: -6px; left: 50%;
  transform: translateX(-50%) rotate(45deg);
  width: 12px; height: 12px;
  background: var(--navy-900);
}
.map-pin__dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--coral-500);
  box-shadow: 0 0 0 4px rgba(255,107,71,0.30);
}
.map-soon {
  position: absolute;
  top: 16px; right: 16px;
  z-index: 3;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px;
  background: rgba(11,20,36,0.85);
  color: white;
  border-radius: var(--r-pill);
  font-size: 12px; font-weight: 500;
}
.map-region {
  position: absolute;
  bottom: 16px; left: 16px;
  z-index: 3;
  padding: 10px 14px;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(6px);
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-900);
  display: inline-flex; align-items: center; gap: 8px;
  box-shadow: var(--shadow-sm);
}
.map-region svg { color: var(--coral-600); }

/* --- Map POI category filters (client-side Kakao categorySearch) --- */
.map-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 14px;
}
.map-filters__hint {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-500);
  margin-right: 2px;
}
.map-filter {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: var(--surface);
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-700);
  line-height: 1;
  cursor: pointer;
  transition: border-color .15s, background .15s, color .15s;
}
.map-filter:hover { border-color: var(--navy-500); }
.map-filter__dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--cat, var(--navy-500));
  flex-shrink: 0;
}
.map-filter[aria-pressed="true"] {
  border-color: var(--cat, var(--navy-600));
  background: var(--navy-25);
  color: var(--ink-900);
  font-weight: 600;
  box-shadow: inset 0 0 0 1px var(--cat, var(--navy-600));
}
.map-filter__count {
  display: none;
  min-width: 16px;
  padding: 1px 6px;
  border-radius: var(--r-pill);
  background: var(--cat, var(--navy-600));
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  text-align: center;
}
.map-filter.is-loading { opacity: .55; pointer-events: none; }
.map-filter.is-loading .map-filter__dot {
  animation: map-filter-pulse .9s ease-in-out infinite;
}
@keyframes map-filter-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }
@media (max-width: 600px) {
  .map-filters__hint { width: 100%; margin-bottom: 2px; margin-right: 0; }
}

/* --- Notice alert (light, official-source guidance) --- */
.notice-alert {
  background: linear-gradient(180deg, var(--amber-50) 0%, #FFFFFF 100%);
  border: 1px solid #FCE7B3;
  border-radius: var(--r-xl);
  padding: 28px;
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 20px;
  align-items: flex-start;
}
.notice-alert__ico {
  width: 48px; height: 48px;
  border-radius: 14px;
  background: var(--amber-500);
  color: white;
  display: grid; place-items: center;
}
.notice-alert h3 {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--ink-900);
  margin: 0 0 6px;
}
.notice-alert .lead {
  font-size: 13px;
  color: var(--ink-500);
  margin: 0 0 14px;
}
.notice-alert__list {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column;
  gap: 10px;
}
.notice-alert__list li {
  display: flex; gap: 10px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink-700);
}
.notice-alert__list li .b {
  flex-shrink: 0;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--amber-500);
  color: white;
  display: grid; place-items: center;
  font-size: 10px; font-weight: 700;
  margin-top: 1px;
}
.notice-alert__list li b { color: var(--ink-900); }
.notice-alert__meta {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px dashed #FCE7B3;
  font-size: 12px;
  color: var(--ink-400);
  display: flex; gap: 16px;
}
.notice-alert__meta b { color: var(--ink-700); font-weight: 600; }

/* --- Responsive --- */
@media (max-width: 980px) {
  .dhero__inner { grid-template-columns: 1fr; padding: 32px 24px; }
  .dhero__title { font-size: 28px; }
  .kpi-grid, .info-grid { grid-template-columns: repeat(2, 1fr); }
  .dpage { padding: 24px; }
  .section-card { padding: 20px; }
}

/* ============================================================
   Mobile overflow guard (detail pages)
   The shared .app min-width:0 reset lives in design-system.css.
   Here we make the detail-page grid tracks explicitly shrinkable
   so the auto-min (minmax(auto,1fr)) never forces horizontal
   overflow on narrow viewports. Mirrors the breakpoints above.
   ============================================================ */
.dhero__inner { grid-template-columns: minmax(0, 1fr) 340px; }
.kpi-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.info-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.notice-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.split { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); }
.ncard__meta { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.notice-alert { grid-template-columns: 56px minmax(0, 1fr); }
@media (max-width: 1100px) { .notice-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 980px) {
  .dhero__inner { grid-template-columns: minmax(0, 1fr); }
  .kpi-grid, .info-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 720px) { .notice-grid { grid-template-columns: minmax(0, 1fr); } }
