﻿/* =====================================================================
   DS - Sector resource pages (ASCI and siblings)
   ---------------------------------------------------------------------
   Page-scoped styles, loaded only by includes/sector-page.php.

   Everything shared with the rest of the site (navbar, footer, buttons,
   eyebrow/section headings, the document-register table that Public Info >
   Manuals already uses) comes from assets/css/style.css and is deliberately
   reused rather than duplicated. The rules below only add what the sector
   template needs on top of that: a full-bleed hero background with a soft
   lavender veil so text stays readable, the feature chips and a few table
   refinements.
   ===================================================================== */

/* ---------------------------------------------------------------
   Page surface
-------------------------------------------------------------- */
.ds-sector-page {
    background: #fbfaff;
}

/* ---------------------------------------------------------------
   Hero
-------------------------------------------------------------- */
.ds-sector-hero {
    position: relative;
    padding: 2rem 0 3.25rem;
    background: var(--ds-primary-tint);
    border-bottom: 1px solid var(--ds-line);
    overflow: hidden;
}

.ds-sector-hero--bg {
    min-height: 520px;
    display: flex;
    align-items: center;
    background-color: var(--ds-primary-tint);
    background-size: cover;
    background-position: center right;
    background-repeat: no-repeat;
}

/* Soft left-to-right wash so the ASCI artwork stays visible on the right
   while the heading, lead and feature cards stay readable on the left. */
.ds-sector-hero--bg::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(90deg, rgba(251, 250, 255, .96) 0%, rgba(251, 250, 255, .88) 34%, rgba(251, 250, 255, .42) 62%, rgba(251, 250, 255, 0) 88%);
}

.ds-sector-hero--bg .container {
    position: relative;
    z-index: 1;
    width: 100%;
}

/* Content column keeps the previous visual rhythm without leaving a large
   blank block on the left. */
.ds-sector-hero__copy {
    max-width: 640px;
    min-width: 0;
}

.ds-sector-hero__title {
    margin: 0;
    font-size: clamp(2rem, 4vw, 2.8rem);
    font-weight: 700;
    line-height: 1.16;
    letter-spacing: -0.02em;
    color: var(--ds-ink);
}
/* Matches the accent treatment already used by .ds-section-title. */
.ds-sector-hero__title span {
    background: linear-gradient(90deg, var(--ds-primary), var(--ds-accent));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.ds-sector-hero__lead {
    margin: 1rem 0 0;
    max-width: 46ch;
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--ds-text);
}

/* ---------------------------------------------------------------
   Content sections (the old overlapping stat strip is gone, so the body
   uses its own normal top padding)
--------------------------------------------------------------- */
.ds-sector-body { padding: 3rem 0 5.5rem; }

/* ---------------------------------------------------------------
   Feature highlights
-------------------------------------------------------------- */
.ds-sector-features {
    list-style: none;
    margin: 1.9rem 0 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .8rem;
}
.ds-sector-feature {
    display: flex;
    gap: .75rem;
    align-items: flex-start;
    padding: .85rem .95rem;
    background: #fff;
    border: 1px solid var(--ds-line);
    border-radius: var(--ds-radius-sm);
    box-shadow: var(--ds-shadow-sm);
}
.ds-sector-feature__icon {
    flex: 0 0 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: var(--ds-primary-soft);
    color: var(--ds-primary-deep);
    font-size: 1.05rem;
}
.ds-sector-feature__title {
    display: block;
    font-family: var(--ds-font-head);
    font-size: .94rem;
    font-weight: 600;
    line-height: 1.35;
    color: var(--ds-ink);
}
.ds-sector-feature__text {
    display: block;
    margin-top: .15rem;
    font-size: .79rem;
    line-height: 1.45;
    color: var(--ds-muted);
}
/* ---------------------------------------------------------------
   Content sections
-------------------------------------------------------------- */
.ds-sector-lead { max-width: 760px; }
.ds-sector-section + .ds-sector-section { margin-top: 4.5rem; }

/* ---------------------------------------------------------------
   Table refinements (on top of the shared document-register table)
-------------------------------------------------------------- */
.ds-sector-name {
    font-weight: 600;
    line-height: 1.5;
    color: var(--ds-ink);
}
.ds-sector-role {
    font-size: .9rem;
    line-height: 1.6;
    color: var(--ds-text);
    min-width: 220px;
}
.ds-sector-tag {
    display: inline-block;
    padding: .28rem .7rem;
    border: 1px solid var(--ds-line);
    border-radius: 999px;
    background: var(--ds-primary-tint);
    color: var(--ds-primary-deep);
    font-size: .76rem;
    font-weight: 600;
    white-space: nowrap;
}
/* Shown wherever the source data simply has no value for the column. */
.ds-sector-dash { color: #aaa4c8; }

.ds-sector-badge {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .3rem .75rem;
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 700;
    white-space: nowrap;
}
.ds-sector-badge--active { background: #e6f7ee; border: 1px solid #bfe6d0; color: #146c43; }
.ds-sector-badge--inactive { background: #fdecec; border: 1px solid #f5c6c6; color: #9b2226; }

.ds-sector-file { display: inline-flex; align-items: center; gap: .45rem; }
.ds-sector-file__ext {
    padding: .2rem .5rem;
    border-radius: 6px;
    background: var(--ds-primary-soft);
    color: var(--ds-primary-deep);
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.ds-sector-empty {
    padding: 2.5rem 1.5rem;
    text-align: center;
    color: var(--ds-muted);
}

/* ---------------------------------------------------------------
   Assessors table: exactly 10 rows visible, rest via vertical scroll.
   Scoped ONLY to the assessors wrapper (data-ds-assessors-scroll) so
   sample-paper tables and every other table are untouched. The
   max-height is set by the inline script in includes/sector-page.php
   (header + first 10 body rows); this CSS only enables the vertical
   scroll inside the existing .table-responsive area and keeps the
   header visible while scrolling. No columns, data or styling change.
-------------------------------------------------------------- */
.ds-assessors-scroll {
    overflow-y: auto;
}
.ds-assessors-scroll > .ds-manuals-table > thead > tr > th {
    position: sticky;
    top: 0;
    z-index: 3;
}

/* ---------------------------------------------------------------
   Responsiveness
-------------------------------------------------------------- */
@media (max-width: 991.98px) {
    .ds-sector-hero { padding: 1.75rem 0 3.25rem; }
    .ds-sector-hero--bg { min-height: 560px; background-position: center; }
}

/* The copy column shrinks instead of overflowing on narrow viewports. */

@media (max-width: 767.98px) {
    .ds-sector-body { padding: 3rem 0 4rem; }
    .ds-sector-section + .ds-sector-section { margin-top: 3.25rem; }
    .ds-sector-features { grid-template-columns: 1fr; }
    .ds-sector-hero--bg { min-height: 620px; }
    .ds-sector-role { min-width: 0; }
}