/* =============================================================================
   Breach Timeline – Slider layout
   breach-timeline.css
   ============================================================================= */

/* ── Section ─────────────────────────────────────────────────────────────── */
.bt-section {
    background: #fff;
    padding: 5rem 0 4rem;
    overflow: hidden;
}

/* ── Header ──────────────────────────────────────────────────────────────── */
.bt-heading {
    color: var(--lapis-lazuli) !important;
    font-family: var(--font-title);
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.bt-subheading {
    color: var(--muted);
    font-size: 0.82rem;
    max-width: 640px;
    margin: 0 auto 2.5rem;
    line-height: 1.5;
}

/* ── Legend ──────────────────────────────────────────────────────────────── */
.bt-legend {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(4, auto);
    gap: 0.45rem 1.5rem;
    padding: 1.25rem 1.5rem;
    border-radius: 8px;
}

/* Col 1 – 4 items */
.bt-legend .bt-sector--financial    { grid-column: 1; grid-row: 1; }
.bt-legend .bt-sector--retail       { grid-column: 1; grid-row: 2; }
.bt-legend .bt-sector--legal        { grid-column: 1; grid-row: 3; }
.bt-legend .bt-sector--entertainment{ grid-column: 1; grid-row: 4; }

/* Col 2 – 4 items */
.bt-legend .bt-sector--government   { grid-column: 2; grid-row: 1; }
.bt-legend .bt-sector--technology   { grid-column: 2; grid-row: 2; }
.bt-legend .bt-sector--healthcare   { grid-column: 2; grid-row: 3; }
.bt-legend .bt-sector--telecoms     { grid-column: 2; grid-row: 4; }

/* Col 3 – 3 items */
.bt-legend .bt-sector--msp          { grid-column: 3; grid-row: 1; }
.bt-legend .bt-sector--hospitality  { grid-column: 3; grid-row: 2; }
.bt-legend .bt-sector--education    { grid-column: 3; grid-row: 3; }

/* Col 4 – 3 items */
.bt-legend .bt-sector--bpo          { grid-column: 4; grid-row: 1; }
.bt-legend .bt-sector--transport    { grid-column: 4; grid-row: 2; }
.bt-legend .bt-sector--critical     { grid-column: 4; grid-row: 3; }

.bt-legend__item {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text);
    white-space: nowrap;
}

.bt-legend__dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
    background: var(--bt-accent, var(--muted));
}

/* Critical infra keeps a circle dot */
.bt-sector--critical .bt-legend__dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

/* ── Sector colour palette ───────────────────────────────────────────────── */
.bt-sector--financial    { --bt-accent: #D8B26F; --bt-bg: rgba(216, 178, 111, 0.10); }
.bt-sector--government   { --bt-accent: #7EADC2; --bt-bg: rgba(126, 173, 194, 0.10); }
.bt-sector--technology   { --bt-accent: #5d91ef; --bt-bg: rgba(93,  145, 239, 0.10); }
.bt-sector--healthcare   { --bt-accent: #e08c00; --bt-bg: rgba(224, 140,   0, 0.10); }
.bt-sector--retail       { --bt-accent: #ca97d2; --bt-bg: rgba(202, 151, 210, 0.10); }
.bt-sector--legal        { --bt-accent: #5cc3ee; --bt-bg: rgba(92,  195, 238, 0.10); }
.bt-sector--transport    { --bt-accent: #6aaa2e; --bt-bg: rgba(106, 170,  46, 0.10); }
.bt-sector--hospitality  { --bt-accent: #c0392b; --bt-bg: rgba(192,  57,  43, 0.10); }
.bt-sector--entertainment{ --bt-accent: #d35400; --bt-bg: rgba(211,  84,   0, 0.10); }
.bt-sector--education    { --bt-accent: #0f6e56; --bt-bg: rgba(15,  110,  86, 0.10); }
.bt-sector--telecoms     { --bt-accent: #4a4a4a; --bt-bg: rgba( 74,  74,  74, 0.10); }
.bt-sector--bpo          { --bt-accent: #1b4ea6; --bt-bg: rgba(27,   78, 166, 0.10); }
.bt-sector--critical     { --bt-accent: #8b1a1a; --bt-bg: rgba(139,  26,  26, 0.10); }
.bt-sector--msp          { --bt-accent: #B2B4B3; --bt-bg: rgba(178, 180, 179, 0.10); }

/* ── Slider wrapper ──────────────────────────────────────────────────────── */
.bt-slider-wrapper {
    position: relative;
}

/* ── Slider track (clips slides) ─────────────────────────────────────────── */
.bt-slider-track {
    position: relative;
    width: 100%;
}

/* ── Individual slide ────────────────────────────────────────────────────── */
.bt-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
}

/* Spacer: stays in normal flow to hold the track height, never visible */
.bt-slide--spacer {
    position: relative !important;
    opacity: 0 !important;
    pointer-events: none !important;
    visibility: hidden;
    display: flex;
}

.bt-slide--active {
    opacity: 1;
    pointer-events: auto;
}

/* ── Year label block ────────────────────────────────────────────────────── */
.bt-year-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--lapis-lazuli);
    text-align: center;
}

.bt-year-number {
    font-family: var(--font-title);
    font-size: clamp(2rem, 4vw, 4rem);
    font-weight: 700;
    color: var(--lapis-lazuli);
    line-height: 1;
}

.bt-slide--current .bt-year-number {
    color: var(--payne-gold);
}

.bt-year-count {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--payne-gold);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    white-space: nowrap;
}

.bt-year-badge {
    display: inline-block;
    padding: 0.2rem 0.65rem;
    border-radius: 20px;
    background: rgba(216, 178, 111, 0.15);
    border: 1px solid var(--payne-gold);
    color: var(--payne-gold);
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* ── Cards grid ──────────────────────────────────────────────────────────── */
.bt-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 0.75rem;
    align-content: start;
}

/* ── Individual card ─────────────────────────────────────────────────────── */
.bt-card {
    background: var(--bt-bg, var(--bg-mid));
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-left: 4px solid var(--bt-accent, rgba(0, 38, 98, 0.3));
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: filter 0.2s ease, transform 0.2s ease;
}

.bt-card:hover {
    filter: brightness(0.94);
    transform: translateY(-2px);
}

.bt-card__body {
    padding: 0.7rem 0.85rem 0.45rem;
    flex: 1;
}

.bt-card__org {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--lapis-lazuli);
    margin-bottom: 0.25rem;
    line-height: 1.2;
}

.bt-card__detail {
    font-size: 0.73rem;
    color: var(--muted);
    line-height: 1.45;
    margin: 0;
}

.bt-card__sector-badge {
    display: block;
    padding: 0.22rem 0.85rem;
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--bt-accent, var(--muted));
    background: rgba(0, 0, 0, 0.04);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

/* ── Dots pagination ─────────────────────────────────────────────────────── */
.bt-dots {
    display: flex;
    justify-content: center;
    gap: 0.35rem;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.bt-dot {
    background: none;
    border: none;
    padding: 0.3rem 0.6rem;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.2s, color 0.2s;
}

.bt-dot span {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--dim);
    letter-spacing: 0.03em;
    pointer-events: none;
}

.bt-dot:hover span {
    color: var(--lapis-lazuli);
}

.bt-dot--active {
    background: var(--lapis-lazuli);
    border-radius: 4px;
}

.bt-dot--active span {
    color: #fff;
}

.bt-dot--active:hover span {
    color: #fff;
}

/* ── Footer note ─────────────────────────────────────────────────────────── */
/* removed */

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 991px) {
    .bt-cards {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    }
}

@media (max-width: 767px) {
    .bt-legend {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(7, auto);
    }

    /* Reflow to 2 columns on mobile */
    .bt-legend .bt-sector--financial    { grid-column: 1; grid-row: 1; }
    .bt-legend .bt-sector--retail       { grid-column: 1; grid-row: 2; }
    .bt-legend .bt-sector--legal        { grid-column: 1; grid-row: 3; }
    .bt-legend .bt-sector--entertainment{ grid-column: 1; grid-row: 4; }
    .bt-legend .bt-sector--government   { grid-column: 1; grid-row: 5; }
    .bt-legend .bt-sector--technology   { grid-column: 1; grid-row: 6; }
    .bt-legend .bt-sector--healthcare   { grid-column: 1; grid-row: 7; }
    .bt-legend .bt-sector--telecoms     { grid-column: 2; grid-row: 1; }
    .bt-legend .bt-sector--msp          { grid-column: 2; grid-row: 2; }
    .bt-legend .bt-sector--hospitality  { grid-column: 2; grid-row: 3; }
    .bt-legend .bt-sector--education    { grid-column: 2; grid-row: 4; }
    .bt-legend .bt-sector--bpo          { grid-column: 2; grid-row: 5; }
    .bt-legend .bt-sector--transport    { grid-column: 2; grid-row: 6; }
    .bt-legend .bt-sector--critical     { grid-column: 2; grid-row: 7; }

    .bt-cards {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 0.5rem;
    }

    .bt-year-number {
        font-size: 2.8rem;
    }
}

@media (max-width: 480px) {
    .bt-section {
        padding: 3rem 0 2.5rem;
    }

    .bt-cards {
        grid-template-columns: 1fr 1fr;
    }

    .bt-legend {
        gap: 0.4rem 0.75rem;
    }
}
