/* "Expert guidance" section on topic pages (inc/topic-guidance.php).
   Cards follow the blog/resources hub cards (assets/css/blog-hub.css) without loading that sheet. */

.tg-fam-violet { --fam: #9B59FF; --fam-ink: #5511BC; --fam-deep: #15002A; }
.tg-fam-teal   { --fam: #20CFE2; --fam-ink: #005668; --fam-deep: #07232D; }
.tg-fam-green  { --fam: #11AB9B; --fam-ink: #006E44; --fam-deep: #0A1F1E; }
.tg-fam-red    { --fam: #FF8FAA; --fam-ink: #B22850; --fam-deep: #281219; }
.tg-fam-orange { --fam: #FBA754; --fam-ink: #A8431C; --fam-deep: #2C1600; }
.tg-fam-purple { --fam: #D27ED5; --fam-ink: #5F2D76; --fam-deep: #201729; }

.tg-section { font-family: Inter, system-ui, sans-serif; color: #17122A; }

.tg-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px 32px;
    margin-bottom: 28px;
}
.tg-eyebrow {
    margin: 0 0 8px;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    background: linear-gradient(90deg, #FF4BF0, #D586FF, #9172FF);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.tg-section .tg-heading { margin-bottom: 8px; }
.tg-sub { margin: 0; max-width: 40rem; font-size: 16px; line-height: 1.55; color: #334155; }

.tg-section a { text-decoration: none; }
.tg-all {
    flex: none;
    font-size: 15px;
    font-weight: 600;
    color: #7A2FC8;
    white-space: nowrap;
}
.tg-all:hover { color: #7A2FC8; text-decoration: underline !important; }

.tg-grid { display: grid; grid-template-columns: 1fr; gap: 32px 24px; }
@media (min-width: 640px) { .tg-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .tg-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.tg-card { position: relative; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.tg-card__media {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    border-radius: 14px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--fam-deep) 0%, var(--fam-ink) 55%, var(--fam) 100%);
}
.tg-card__media .tg-card__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}
.tg-card:hover .tg-card__img { transform: scale(1.04); }
@media (prefers-reduced-motion: reduce) {
    .tg-card__media .tg-card__img { transition: none; }
    .tg-card:hover .tg-card__img { transform: none; }
}
.tg-card__placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    padding: 16px;
    font-size: 18px;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: #ffffff;
}
.tg-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 1;
    padding: 4px 10px;
    border-radius: 9999px;
    background: rgba(9, 10, 11, 0.78);
    color: #ffffff;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.02em;
    line-height: 1.4;
}
.tg-card--upcoming .tg-badge { background: linear-gradient(90deg, #7400B2, #D500C3); }

.tg-card__body { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.tg-section .tg-card__title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.35;
    letter-spacing: -0.01em;
    color: #090A0B;
}
.tg-card__title a { color: inherit; }
/* Whole card opens the item. */
.tg-card__title a::after { content: ''; position: absolute; inset: 0; z-index: 1; }
.tg-card:hover .tg-card__title a,
.tg-card__title a:hover { color: #5511BC; }
.tg-card__title a:focus-visible { outline: 2px solid #7A2FC8; outline-offset: 2px; }
.tg-card__meta { margin: 0; font-size: 13px; line-height: 1.5; color: #64707D; }
.tg-card__meta > span[aria-hidden] { margin: 0 4px; }
.tg-card--upcoming .tg-card__meta { color: #17122A; font-weight: 600; }

.tg-sr {
    position: absolute !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.tg-related {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 8px 16px;
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid #E4DEEE;
    font-size: 15px;
}
.tg-related__label { font-weight: 600; color: #17122A; }
.tg-related ul { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 0; padding: 0; list-style: none; }
.tg-related li { margin: 0; }
.tg-related a { font-weight: 500; color: #17122A; text-decoration: underline !important; text-underline-offset: 3px; }
.tg-related a:hover { color: #5511BC; }

@media (max-width: 767px) {
    .tg-head { flex-direction: column; align-items: flex-start; }
}
