/* =====================================================================
   Chi tiết nhu cầu tìm mua công nghệ (Nhucaucongnghe/Detail)
   Hồ sơ nhu cầu B2B — CSS scope trong .tech-demand-detail-page.
   ===================================================================== */
.tech-demand-detail-page {
    --tech-navy: #073B67;
    --tech-primary: #008F95;
    --tech-primary-hover: #007B82;
    --tech-accent: #00A8C6;
    --tech-soft-bg: #F3FAFB;
    --tech-border: #D9E7EC;
    --tech-text: #17324D;
    --tech-muted: #64748B;
    --tech-warning: #C97912;
    --tech-white: #ffffff;

    background: var(--tech-soft-bg);
    color: var(--tech-text);
    padding-bottom: 56px;
}
.tech-demand-detail-page * { box-sizing: border-box; }

.tech-demand-container { max-width: 1240px; margin: 0 auto; padding: 0 20px; }

/* ---- Breadcrumb ---- */
.tech-demand-breadcrumb {
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
    font-size: 13.5px; color: var(--tech-muted); padding: 16px 0 4px;
}
.tech-demand-breadcrumb a { color: var(--tech-primary-hover); text-decoration: none; }
.tech-demand-breadcrumb a:hover { text-decoration: underline; }
.tech-demand-breadcrumb span { color: var(--tech-border); }
.tech-demand-breadcrumb strong {
    color: var(--tech-navy); font-weight: 600;
    max-width: 420px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* ---- Summary hero ---- */
.tech-demand-summary {
    background: var(--tech-white);
    border: 1px solid var(--tech-border);
    border-radius: 16px;
    padding: 24px 26px;
    margin-top: 8px;
}
.tech-demand-badges { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.tech-demand-badge {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 12px; font-weight: 700; letter-spacing: .2px; text-transform: uppercase;
    padding: 4px 10px; border-radius: 6px;
    background: #E9F0F5; color: var(--tech-navy); border: 1px solid var(--tech-border);
}
.tech-demand-status { font-size: 12px; font-weight: 700; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; }
.tech-demand-status--open { background: #E2F5F5; color: #0A6B70; border: 1px solid #A9E0E1; }
.tech-demand-status--processing { background: #FCF1E2; color: var(--tech-warning); border: 1px solid #EBD2AE; }
.tech-demand-status--closed { background: #EEF1F4; color: #5B6B7A; border: 1px solid #D9E0E6; }

.tech-demand-summary__title {
    font-size: 32px; line-height: 1.25; font-weight: 700; color: var(--tech-navy);
    margin: 0 0 10px;
}
.tech-demand-summary__desc { font-size: 15px; color: var(--tech-muted); line-height: 1.55; margin: 0 0 14px; max-width: 760px; }
.tech-demand-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 16px; font-size: 13.5px; color: var(--tech-muted); }
.tech-demand-meta span { display: inline-flex; align-items: center; gap: 6px; }
.tech-demand-meta .bi, .tech-demand-meta .fa { color: var(--tech-primary); }

.tech-demand-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 18px; }
.tech-demand-btn {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: 14px; font-weight: 700; padding: 11px 20px; border-radius: 10px;
    text-decoration: none; cursor: pointer; border: 1px solid transparent;
    transition: background .2s ease, color .2s ease, border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.tech-demand-btn--primary { background: var(--tech-primary); color: #fff; border-color: var(--tech-primary); box-shadow: 0 4px 12px rgba(0,143,149,.18); }
.tech-demand-btn--primary:hover { background: var(--tech-primary-hover); border-color: var(--tech-primary-hover); color: #fff; transform: translateY(-1px); box-shadow: 0 6px 16px rgba(0,123,130,.22); }
.tech-demand-btn--ghost { background: #fff; color: var(--tech-primary-hover); border-color: var(--tech-primary); }
.tech-demand-btn--ghost:hover { background: var(--tech-soft-bg); border-color: var(--tech-primary-hover); color: var(--tech-navy); }
.tech-demand-btn:disabled, .tech-demand-btn.is-disabled { opacity: .55; cursor: not-allowed; pointer-events: none; }

.tech-demand-closed-note {
    margin-top: 16px; padding: 12px 14px; border-radius: 10px;
    background: #EEF1F4; border: 1px solid #D9E0E6; color: #5B6B7A; font-size: 14px;
}

/* ---- Layout ---- */
.tech-demand-layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr);
    gap: 28px;
    margin-top: 24px;
    align-items: start;
}
.tech-demand-content { min-width: 0; display: flex; flex-direction: column; gap: 20px; }

/* ---- Section ---- */
.tech-demand-section {
    background: var(--tech-white);
    border: 1px solid var(--tech-border);
    border-radius: 14px;
    padding: 20px 22px;
}
.tech-demand-section__title {
    font-size: 17px; font-weight: 700; color: var(--tech-navy);
    margin: 0 0 14px; padding-bottom: 10px; border-bottom: 1px solid var(--tech-border);
    display: flex; align-items: center; gap: 8px;
}
.tech-demand-section__title .bi, .tech-demand-section__title .fa { color: var(--tech-primary); font-size: 16px; }
.tech-demand-richtext { font-size: 14.5px; line-height: 1.65; color: var(--tech-text); }
.tech-demand-richtext img { max-width: 100%; height: auto; border-radius: 8px; }
.tech-demand-richtext table { width: 100%; border-collapse: collapse; margin: 8px 0; }
.tech-demand-richtext td, .tech-demand-richtext th { border: 1px solid var(--tech-border); padding: 8px 10px; }

/* ---- Requirement rows (Tiêu chí | Yêu cầu) ---- */
.tech-requirement-table { display: flex; flex-direction: column; }
.tech-requirement-row {
    display: grid; grid-template-columns: minmax(160px, 220px) 1fr; gap: 14px;
    padding: 11px 0; border-bottom: 1px solid var(--tech-border); font-size: 14.5px;
}
.tech-requirement-row:last-child { border-bottom: none; }
.tech-requirement-row dt { color: var(--tech-muted); font-weight: 600; margin: 0; }
.tech-requirement-row dd { color: var(--tech-text); margin: 0; }

/* ---- Chips (hình thức hợp tác) ---- */
.tech-demand-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.tech-demand-chip {
    font-size: 13px; font-weight: 600; padding: 6px 12px; border-radius: 999px;
    background: #E4F4F4; color: #0A6B70; border: 1px solid #BEE4E5;
}

/* ---- Sidebar ---- */
.tech-demand-sidebar { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 84px; }
.tech-demand-card {
    background: var(--tech-white); border: 1px solid var(--tech-border);
    border-radius: 14px; padding: 18px 18px;
}
.tech-demand-card__title { font-size: 14px; font-weight: 700; color: var(--tech-navy); margin: 0 0 12px; }
.tech-demand-info { display: flex; flex-direction: column; gap: 9px; font-size: 13.5px; }
.tech-demand-info__row { display: flex; justify-content: space-between; gap: 12px; }
.tech-demand-info__row dt { color: var(--tech-muted); margin: 0; }
.tech-demand-info__row dd { color: var(--tech-text); font-weight: 600; margin: 0; text-align: right; }

.tech-demand-org { display: flex; align-items: center; gap: 12px; }
.tech-demand-org__avatar {
    width: 44px; height: 44px; flex: 0 0 auto; border-radius: 10px;
    background: var(--tech-navy); color: #fff; font-weight: 700; font-size: 18px;
    display: flex; align-items: center; justify-content: center;
}
.tech-demand-org__name { font-size: 14px; font-weight: 600; color: var(--tech-text); }
.tech-demand-privacy {
    margin-top: 12px; padding: 10px 12px; border-radius: 10px;
    background: var(--tech-soft-bg); border: 1px solid var(--tech-border);
    font-size: 12.5px; color: var(--tech-muted); line-height: 1.5;
    display: flex; gap: 8px;
}
.tech-demand-privacy .bi { color: var(--tech-primary); margin-top: 1px; }

.tech-demand-card--support { background: linear-gradient(180deg, #EAF7F8 0%, #F3FAFB 100%); }
.tech-demand-card--support p { font-size: 13.5px; color: var(--tech-muted); line-height: 1.55; margin: 0 0 12px; }
.tech-demand-card--support .tech-demand-btn { width: 100%; justify-content: center; }

/* ---- Related ---- */
.tech-related-demands { margin-top: 34px; }
.tech-related-demands__title { font-size: 20px; font-weight: 700; color: var(--tech-navy); margin: 0 0 16px; }
.tech-related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.tech-related-card {
    display: flex; flex-direction: column; background: var(--tech-white);
    border: 1px solid var(--tech-border); border-radius: 12px; overflow: hidden;
    text-decoration: none; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.tech-related-card:hover { transform: translateY(-3px); box-shadow: 0 12px 26px rgba(7,59,103,.10); border-color: rgba(0,143,149,.4); }
.tech-related-card__media { aspect-ratio: 16/9; background: #eef2f5; overflow: hidden; }
.tech-related-card__media img { width: 100%; height: 100%; object-fit: cover; }
.tech-related-card__body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.tech-related-card__badge { align-self: flex-start; font-size: 11px; font-weight: 700; text-transform: uppercase; color: var(--tech-primary-hover); background: #E4F4F4; border: 1px solid #BEE4E5; border-radius: 6px; padding: 3px 8px; }
.tech-related-card__title { font-size: 14.5px; font-weight: 600; color: var(--tech-text); line-height: 1.4; margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tech-related-card:hover .tech-related-card__title { color: var(--tech-primary-hover); }
.tech-related-card__meta { margin-top: auto; font-size: 12.5px; color: var(--tech-muted); display: flex; align-items: center; gap: 6px; }

/* ---- CTA cuối ---- */
.tech-demand-endcta {
    display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
    background: linear-gradient(120deg, #E6F5F6 0%, #EEF6FB 100%);
    border: 1px solid var(--tech-border); border-radius: 16px; padding: 22px 26px; margin-top: 30px;
}
.tech-demand-endcta__text h2 { font-size: 18px; font-weight: 700; color: var(--tech-navy); margin: 0 0 4px; }
.tech-demand-endcta__text p { font-size: 14px; color: var(--tech-muted); margin: 0; }

/* ---- Mobile sticky action bar ---- */
.tech-demand-mobilebar {
    display: none;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    gap: 10px; padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
    background: var(--tech-white); border-top: 1px solid var(--tech-border);
    box-shadow: 0 -4px 16px rgba(7,59,103,.08);
}
.tech-demand-mobilebar .tech-demand-btn { flex: 1; justify-content: center; min-height: 44px; }

/* ---- Responsive ---- */
@media (max-width: 992px) {
    .tech-demand-layout { grid-template-columns: 1fr; }
    .tech-demand-sidebar { position: static; }
    .tech-related-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .tech-demand-summary__title { font-size: 26px; }
    .tech-demand-mobilebar { display: flex; }
    .tech-demand-detail-page { padding-bottom: 84px; }
    .tech-demand-actions { display: none; }
}
@media (max-width: 576px) {
    .tech-demand-summary__title { font-size: 23px; }
    .tech-related-grid { grid-template-columns: 1fr; }
    .tech-requirement-row { grid-template-columns: 1fr; gap: 2px; }
    .tech-requirement-row dt { font-size: 13px; }
    .tech-demand-endcta { flex-direction: column; align-items: flex-start; }
}
