/* Practitioner Pathways — a card per practitioner, signposting the pathways
   they cover. Colours lean on the shared brand tokens so the section flips with
   dark mode; surface overrides live in css/dark-theme.css. */

/* The page is short, so the content block is centred in what is left of the
   viewport below the banner rather than sitting hard against it. */
.practitioner-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
    color: var(--tla-ink);
}

.practitioner-content > .container {
    width: 100%;
}

/* Centre the cards themselves, so a part-filled last row stays balanced
   instead of being left-aligned. */
.practitioner-content .row {
    justify-content: center;
}

/* One-off intro, directly below the banner and above the cards. A surface and
   padding so its shadow has something to sit under. */
.pathways-intro {
    max-width: 72ch;
    margin: 0 auto 2.5rem;
    padding: 1.5rem 1.75rem;
    border-radius: 1rem;
    background: #fff;
    box-shadow: rgba(0, 0, 0, 0.35) 0px 5px 15px;
    font-size: 1.05rem;
    line-height: 1.7;
    text-align: center;
}

/* Capped narrower than its column so it reads as a portrait rather than a wide,
   squat box, and centred in whatever space is left. No min-height: the content
   is short now that the pathways moved to the footer, and `h-100` already
   equalises the cards within a row. */
.practitioner-card {
    max-width: 290px;
    margin-inline: auto;
    border: 1px solid #e6e8eb;
    border-radius: 1rem;
    /* Same white-to-grey ramp the landing page uses, so the cards sit in the
       existing palette rather than introducing a new one. */
    background: linear-gradient(180deg, #fff 0%, #e9ecef 100%);
    box-shadow: rgba(0, 0, 0, 0.35) 0px 5px 15px;
    color: inherit;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.practitioner-card:hover,
.practitioner-card:focus-visible {
    transform: translateY(-4px);
    border-color: var(--tla-accent);
    box-shadow: rgba(0, 0, 0, 0.45) 0px 12px 28px;
    color: inherit;
}

.practitioner-avatar {
    display: block;
    width: 120px;
    height: 120px;
    object-fit: cover;
    border: 4px solid var(--tla-accent);
    background: #fff;
}

/* Above the portrait, so it names the face you are about to see. */
.practitioner-name {
    margin: 0 0 1rem;
    font-size: 1.15rem;
    font-weight: 700;
}

.practitioner-intro {
    margin: 0 0 1rem;
    font-size: 0.9rem;
    line-height: 1.5;
    color: #6c757d;
}

/* The pathways this practitioner signposts, each its own destination. Stacked
   full-width so two pathways of very different name lengths still read as a
   matched pair of buttons rather than two ragged pills. */
.practitioner-pathway-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0 1rem 1.25rem;
    /* The card supplies the surface; a Bootstrap cap background here would
       draw a band across the gradient. */
    background: transparent;
    border-top: 0;
}

.practitioner-pathway-link {
    display: block;
    padding: 0.5rem 0.9rem;
    border-radius: 999px;
    background: var(--tla-accent);
    color: #1f2330;
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1.3;
    text-decoration: none;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.practitioner-pathway-link:hover,
.practitioner-pathway-link:focus-visible {
    background: var(--tla-accent-dark, #d9a800);
    color: #1f2330;
    transform: translateY(-2px);
}

.practitioner-pathway-link i {
    margin-left: 0.4rem;
    font-size: 0.8em;
    /* Reads as a hint on the button, not a second piece of content. */
    opacity: 0.7;
}

.practitioner-no-pathways {
    margin: 0;
    color: var(--tla-muted, #5b6172);
    font-size: 0.85rem;
    font-style: italic;
}

/* Cross-links to the practitioner's OTHER pathways, sitting under the byline
   on every destination page. Ink rather than gold: they are secondary to the
   pathway you are already reading. */
.pathway-siblings {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.pathway-siblings-label {
    color: var(--tla-muted, #5b6172);
    font-size: 0.9rem;
}

.pathway-sibling-link {
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    border: 1px solid #1f2330;
    color: #1f2330;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.pathway-sibling-link:hover,
.pathway-sibling-link:focus-visible {
    background: var(--tla-accent);
    border-color: var(--tla-accent);
    color: #1f2330;
}

.pathway-sibling-link i {
    margin-left: 0.35rem;
    font-size: 0.8em;
    opacity: 0.7;
}

@media (prefers-reduced-motion: reduce) {
    .practitioner-pathway-link,
    .pathway-sibling-link {
        transition: none;
    }

    .practitioner-pathway-link:hover,
    .practitioner-pathway-link:focus-visible {
        transform: none;
    }
}

.practitioner-empty {
    color: var(--tla-muted, #5b6172);
    font-style: italic;
    text-align: center;
}

@media (prefers-reduced-motion: reduce) {
    .practitioner-card {
        transition: none;
    }

    .practitioner-card:hover,
    .practitioner-card:focus-visible {
        transform: none;
    }
}

/* --- One pathway's destination page (newsletter reader + back issues) --- */

/* The cards page centres itself in the viewport; a content page must not, or
   a long issue list would be pushed off-screen. */
.newsletter-content {
    color: var(--tla-ink);
}

.newsletter-byline {
    margin-bottom: 1.5rem;
    color: var(--tla-muted, #5b6172);
    font-size: 0.95rem;
}

.newsletter-byline i {
    margin-right: 0.35rem;
    color: var(--tla-accent);
}

/* Shared surface for both columns, matching the pathway cards' shadow so the
   section reads as one design. */
.newsletter-panel {
    height: 100%;
    padding: 1.25rem 1.35rem;
    border: 1px solid #e6e8eb;
    border-radius: 1rem;
    background: #fff;
    box-shadow: rgba(0, 0, 0, 0.35) 0px 5px 15px;
}

.newsletter-panel-title {
    margin: 0 0 0.9rem;
    font-size: 1.05rem;
    font-weight: 700;
}

.newsletter-count {
    display: inline-block;
    min-width: 1.6rem;
    padding: 0.1rem 0.5rem;
    border-radius: 999px;
    background: var(--tla-accent);
    color: #1f2330;
    font-size: 0.78rem;
    font-weight: 700;
    text-align: center;
}

/* Sits above the list, so the full archive is reachable without scrolling. */
.newsletter-archive-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1.1rem;
    padding: 0.6rem 0.9rem;
    border-radius: 0.75rem;
    background: #1f2330;
    color: #fff;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.2s ease;
}

.newsletter-archive-link:hover,
.newsletter-archive-link:focus-visible {
    background: var(--tla-accent-dark, #d9a800);
    color: #1f2330;
}

.newsletter-issue {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.65rem 0.85rem;
    border: 1px solid #e6e8eb;
    border-radius: 0.75rem;
    background: #f8f9fa;
    color: inherit;
    text-decoration: none;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.newsletter-issue + .newsletter-issue {
    margin-top: 0.5rem;
}

.newsletter-issue:hover,
.newsletter-issue:focus-visible {
    border-color: var(--tla-accent);
    transform: translateX(2px);
    color: inherit;
}

/* The issue already open in the reader beside this list. */
.newsletter-issue.is-current {
    border-color: var(--tla-accent);
    background: #fff8e1;
}

.newsletter-issue-body {
    display: flex;
    min-width: 0;
    flex-direction: column;
}

.newsletter-issue-title {
    overflow: hidden;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.newsletter-issue-date,
.newsletter-posted {
    color: var(--tla-muted, #5b6172);
    font-size: 0.8rem;
}

.newsletter-issue-open {
    color: var(--tla-muted, #5b6172);
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
}

/* Reader header: posted date and title on the left, the download on the right,
   dropping to two rows when there is no room for both. */
.newsletter-reader-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.newsletter-posted {
    margin: 0 0 0.15rem;
}

.newsletter-reader-title {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 700;
}

.newsletter-download {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.5rem 1.1rem;
    border-radius: 999px;
    background: #1f2330;
    color: #fff;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: background-color 0.2s ease;
}

.newsletter-download:hover,
.newsletter-download:focus-visible {
    background: var(--tla-accent-dark, #d9a800);
    color: #1f2330;
}

.newsletter-blurb {
    margin-bottom: 1rem;
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Tall enough to read a page of A4 without scrolling the panel itself. */
.newsletter-frame {
    display: block;
    width: 100%;
    height: min(78vh, 900px);
    border: 1px solid #e6e8eb;
    border-radius: 0.75rem;
    background: #f8f9fa;
}

.newsletter-offsite {
    padding: 2.5rem 1rem;
    border: 1px dashed #ced4da;
    border-radius: 0.75rem;
    text-align: center;
}

.newsletter-offsite-icon {
    margin-bottom: 0.75rem;
    color: var(--tla-accent);
    font-size: 2rem;
}

.newsletter-back {
    display: inline-block;
    margin-bottom: 1.25rem;
    color: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
}

.newsletter-back:hover,
.newsletter-back:focus-visible {
    color: var(--tla-accent-dark, #d9a800);
}

.newsletter-plain-item + .newsletter-plain-item {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e6e8eb;
}

.newsletter-plain-title {
    margin: 0 0 0.2rem;
    font-size: 1.1rem;
    font-weight: 700;
}

.newsletter-empty {
    margin: 0;
    padding: 2rem 0;
    color: var(--tla-muted, #5b6172);
    font-style: italic;
    text-align: center;
}

/* --- Talks layout (video panel + latest list) --- */

.pathway-talk-icon {
    margin-right: 0.5rem;
    color: var(--tla-accent-dark, #d9a800);
}

/* Sits under the players, so it needs its own gap from them. */
.pathway-talk-detail {
    margin-top: 1rem;
}

/* The newsletter's two columns are comparable, so its panels stretch to match.
   Here the player column is much taller than the list, and stretching leaves a
   tall empty box beside it — let the talks panels size to their content. */
.section-main-row .newsletter-panel {
    height: auto;
}

@media (max-width: 991.98px) {
    /* Stacked, the reader would otherwise fill the screen before the list. */
    .newsletter-frame {
        height: 60vh;
    }
}

@media (prefers-reduced-motion: reduce) {
    .newsletter-issue,
    .newsletter-archive-link,
    .newsletter-download {
        transition: none;
    }

    .newsletter-issue:hover,
    .newsletter-issue:focus-visible {
        transform: none;
    }
}

/* --- Tiles: Digital Sparks' grid of videos --- */

/* The grid itself is Bootstrap's (.row + .col-md-4), so there is no
   grid-template here — only the tile.

   The whole tile is one <a>: a square on a dark gradient with the title
   centred in it both ways. Any still the item has sits underneath the
   gradient, which keeps the title readable whatever the picture is. */
.sparks-tile {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 280px;
    margin-inline: auto;
    aspect-ratio: 1;
    padding: 1.25rem;
    overflow: hidden;
    border: 3px solid #f7d140;
    border-radius: 1.25rem;
    background: linear-gradient(145deg, #3b4160 0%, #1f2330 55%, #0e1016 100%);
    color: #fff;
    text-decoration: none;
    box-shadow: 0 6px 16px rgba(15, 17, 24, 0.25);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.sparks-tile::after {
    /* A gold sheen across the top corner: this is the accent the site uses
       everywhere, and it lifts the tile off a flat navy. */
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 100% 0%, rgba(252, 210, 51, 0.32), transparent 55%);
    pointer-events: none;
}

.sparks-tile-still {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    /* YouTube stills are 16:9; cover crops them square rather than
       letterboxing them inside the tile. */
    object-fit: cover;
    opacity: 0.35;
    transition: opacity 0.2s ease;
}

/* The title, in full and centred both ways.
   The tile is a square flex box with the title as its only in-flow child, so
   `align-items` + `justify-content` centre it and `h-100` on the tile keeps
   every box in a row the same size. Deliberately no truncation: telling the
   videos apart at a glance is the entire point of this layout. */
.sparks-tile-title {
    position: relative;
    z-index: 1;
    width: 100%;
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.35;
    text-align: center;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
    overflow-wrap: anywhere;
}

/* Top-left corner: the spark every card carries. */
.sparks-tile-spark {
    position: absolute;
    top: 0.75rem;
    left: 0.9rem;
    z-index: 1;
    color: #f7d140;
    font-size: 1.35rem;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.5));
}

/* The camera before the title, only when the item itself has a video. */
.sparks-tile-title-icon {
    margin-right: 0.4rem;
    color: #f7d140;
    font-size: 0.95em;
}

/* Bottom-right corner: play for a video, an outward arrow for a link that
   opens at source. */
.sparks-tile-badge {
    position: absolute;
    right: 0.75rem;
    bottom: 0.75rem;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    background: var(--tla-accent);
    color: #1f2330;
    font-size: 0.8rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}

.sparks-tile:hover,
.sparks-tile:focus-visible {
    transform: translateY(-4px);
    border-color: #fff;
    color: #fff;
    box-shadow: 0 12px 26px rgba(15, 17, 24, 0.4);
}

.sparks-tile:hover .sparks-tile-still,
.sparks-tile:focus-visible .sparks-tile-still {
    opacity: 0.5;
}

.sparks-tile:focus-visible {
    outline: 3px solid var(--tla-accent);
    outline-offset: 3px;
}

.sparks-tile.is-current {
    border-color: #f7d140;
    box-shadow: 0 0 0 4px #fff, 0 0 0 7px #f7d140;
}

/* The extra-large modal a tile's video opens in. Black bars, never a
   cropped frame: the reader came to watch the whole thing. */
.sparks-modal .modal-content {
    /* The frame fills the body edge to edge; clip it to the rounded corners. */
    overflow: hidden;
}

.sparks-modal .modal-body {
    padding: 0;
}

.sparks-modal .section-video-frame {
    border: 0;
    border-radius: 0;
}

.sparks-modal .section-video-frame video {
    object-fit: contain;
}

/* --- The player that opens above the grid --- */

.sparks-player {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
    /* Scroll target for the tiles' #episode links. */
    scroll-margin-top: 1rem;
}

.sparks-player-media {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 0.75rem;
    background: #000;
}

.sparks-player-media iframe,
.sparks-player-media video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.sparks-player-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    margin: 0;
    padding: 1rem;
    color: #fff;
    font-style: italic;
    text-align: center;
}

.sparks-player-detail {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.sparks-close {
    padding-top: 0.75rem;
    color: inherit;
    font-size: 0.85rem;
    font-weight: 600;
}

@media (max-width: 767.98px) {
    /* Side by side would leave the player too small to watch on a phone. */
    .sparks-player {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    .sparks-tile,
    .sparks-tile-still {
        transition: none;
    }

    .sparks-tile:hover,
    .sparks-tile:focus-visible {
        transform: none;
    }
}
