/*------------------------------------------------------------------
[ AB Topics — bento решетка с теми и чипове ]
------------------------------------------------------------------*/
.topics .sec-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 30px;
    flex-wrap: wrap;
    margin-bottom: 34px;
}
.topics .sec-head p {
    color: var(--ab-muted);
    max-width: 25em;
    margin: 0;
}
.tchips {
    display: flex;
    flex-wrap: wrap;
    margin: 0 0 28px;
    gap: 8px;
}
.tgrid {
    display: grid;
    grid-template-columns: repeat(12,1fr);
    grid-auto-rows: minmax(262px,auto);
    gap: 18px;
}
@media (max-width:980px) {
    .tgrid {
        grid-template-columns: 1fr;
        grid-auto-rows: auto;
    }
}
.tc {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    border-radius: 32px;
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 28px;
    color: #fff;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.45),inset 0 0 0 1px rgba(255,255,255,.08),0 36px 70px -38px rgba(20,35,110,.6),0 3px 8px rgba(20,35,110,.12);
    transform: perspective(1100px) rotateX(var(--rx,0deg)) rotateY(var(--ry,0deg)) translateY(var(--ty,0px));
    transition: transform .3s ease-out,box-shadow .4s,opacity .35s,filter .35s;
}
.tc:hover {
    --ty: -6px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.55),inset 0 0 0 1px rgba(255,255,255,.1),0 50px 90px -40px rgba(20,35,110,.7),0 3px 8px rgba(20,35,110,.12);
}
.tc.dim {
    opacity: .22;
    filter: saturate(.3);
}
.tc::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 4;
    pointer-events: none;
    background: radial-gradient(420px circle at var(--mx,50%) var(--my,0%),rgba(255,255,255,.26),transparent 60%);
    opacity: 0;
    transition: opacity .35s;
    mix-blend-mode: soft-light;
}
.tc:hover::before {
    opacity: 1;
}
.tc::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 3;
    pointer-events: none;
    background: var(--ab-grain);
    mix-blend-mode: overlay;
    opacity: .5;
}
.tc-light::after {
    opacity: .28;
}
.tc>* {
    position: relative;
}
.tc-cat,
.tc-in {
    z-index: 5;
}
.tc-cat {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 13.5px;
    font-weight: 600;
    align-self: flex-start;
    opacity: .92;
}
.tc-cat i {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 0 4px rgba(255,255,255,.22);
}
.tc-light .tc-cat i {
    background: var(--ab-red);
    box-shadow: 0 0 0 4px rgba(255,22,80,.14);
}
.tc h3 {
    font-weight: 800;
    letter-spacing: -.045em;
    line-height: 1;
    margin: 0 0 12px;
}
.tc1 h3 {
    margin-bottom: 16px;
}
.tc p {
    margin: 0;
    max-width: 24em;
    line-height: 1.5;
    color: rgba(255,255,255,.9);
}
.tc1 p {
    max-width: 21em;
}
.q {
    margin-top: 24px;
    display: inline-block;
    padding: 14px 20px;
    border-radius: 999px;
    background: rgba(255,255,255,.16);
    border: 1px solid rgba(255,255,255,.4);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: -.01em;
}
.tc1 {
    grid-column: span 5;
    grid-row: span 2;
}
.tc2 {
    grid-column: span 4;
}
.tc3 {
    grid-column: span 3;
}
.tc4 {
    grid-column: span 3;
}
.tc5 {
    grid-column: span 4;
}
.tc6,
.tc7,
.tc8 {
    grid-column: span 4;
}
.tc-ph {
    position: absolute!important;
    inset: 0;
    z-index: -3;
    background-size: cover;
    background-position: var(--pp,center);
    transition: transform 1.4s cubic-bezier(.2,.8,.2,1);
}
.tc:hover .tc-ph {
    transform: scale(1.07);
}
.tc-tint {
    position: absolute!important;
    inset: 0;
    z-index: -2;
}
.tc-red .tc-ph {
    --pp: 34% 38%;
    filter: grayscale(1) contrast(1.2) brightness(.95);
}
.tc-red .tc-tint {
    background: linear-gradient(170deg,#FF3A6E 0%,#9B0D3A 65%,#3B0415 100%);
    mix-blend-mode: multiply;
}
.tc-navy .tc-ph {
    filter: grayscale(1) contrast(1.15) brightness(1);
}
.tc-navy .tc-tint {
    background: linear-gradient(170deg,#5C86FF 0%,#1E3FC8 55%,#0A1747 100%);
    mix-blend-mode: multiply;
}
.tc-human .tc-ph {
    --pp: 68% 40%;
}
.tc-human .tc-tint {
    background: linear-gradient(0deg,rgba(7,11,32,.88),rgba(7,11,32,.15) 55%,transparent);
}
.tc-light {
    color: var(--ab-text);
    background: radial-gradient(90% 70% at 100% 100%,rgba(47,98,255,.14),transparent 60%),linear-gradient(165deg,#FFFFFF,#EDF1FF);
}
.tc-light p {
    color: var(--ab-muted);
}
.tc-blue {
    background: radial-gradient(110% 80% at 100% 0%,#9DB8FF,transparent 58%),linear-gradient(165deg,#3F6BFF,#1A3BCB);
}
.tc-dark {
    background: radial-gradient(90% 70% at 90% 100%,rgba(255,22,80,.5),transparent 62%),linear-gradient(165deg,#1C2650,#070B18);
}
.tc-mesh {
    background: radial-gradient(85% 95% at 0% 100%,#FF1650,transparent 62%),radial-gradient(90% 80% at 100% 0%,#2F62FF,transparent 66%),linear-gradient(165deg,#4B35E8,#B0125A);
}
.tc:hover .fx.bolt {
    transform: rotate(5deg) translate(-8px,-12px) scale(1.05);
}
.fx.rings {
    right: -34%;
    top: -48%;
    width: 130%;
    aspect-ratio: 1;
    border-radius: 50%;
    background: repeating-radial-gradient(circle,rgba(255,255,255,.34) 0 2px,transparent 2px 36px);
    -webkit-mask-image: radial-gradient(circle,#000 0,transparent 66%);
    mask-image: radial-gradient(circle,#000 0,transparent 66%);
    transition: transform 1.2s cubic-bezier(.2,.8,.2,1);
}
.tc:hover .fx.rings {
    transform: scale(1.14);
}
.fx.dots {
    inset: 0;
    background-image: radial-gradient(rgba(255,255,255,.2) 1px,transparent 1.3px);
    background-size: 22px 22px;
    -webkit-mask-image: linear-gradient(180deg,transparent 10%,#000 70%);
    mask-image: linear-gradient(180deg,transparent 10%,#000 70%);
}
.fx.ribs {
    inset: 0;
    background: repeating-linear-gradient(90deg,rgba(11,16,34,.07) 0 1px,transparent 1px 18px);
    -webkit-mask-image: linear-gradient(135deg,#000,transparent 75%);
    mask-image: linear-gradient(135deg,#000,transparent 75%);
}
.fx.ribs.w {
    background: repeating-linear-gradient(90deg,rgba(255,255,255,.2) 0 1px,transparent 1px 18px);
}
@media (max-width:980px) {
    .tc,
    .tc1,
    .tc2,
    .tc3,
    .tc4,
    .tc5,
    .tc6,
    .tc7,
    .tc8 {
        grid-column: auto;
        grid-row: auto;
        min-height: 280px;
    }
}
@media (max-width:980px) {
    .tc1 {
        min-height: 420px;
    }
}
@media (prefers-reduced-motion:reduce) {
    .tc,
    .tc-ph {
        transition: none;
    }
}
.tc2 .fx.bolt {
    right: -12%;
    bottom: -34%;
    width: 46%;
}
.tc2 p {
    max-width: 15em;
}
.tc-navy .tc-ph {
    --pp: 50% 28%;
}
.tc5 .fx.bolt {
    width: 50%;
}
.tc5 p {
    max-width: 17em;
}
.tc h3 em {
    display: block;
    font-style: normal;
    font-weight: 500;
    font-size: .58em;
    letter-spacing: -.02em;
    line-height: 1.15;
    margin-top: 7px;
    opacity: .82;
}
.tc1 h3 {
    font-size: clamp(2.4rem,4vw,3.8rem);
    max-width: 8em;
}
.tc1 h3 em {
    font-size: .52em;
}
.tc h3 {
    font-size: clamp(1.55rem,2.2vw,2.1rem);
    max-width: 9.5em;
}
.tc p {
    font-size: 14.5px;
}
.tc1 p {
    font-size: 1.04rem;
}
.tc6 p,
.tc5 p {
    max-width: 26em;
}
.tc.sel {
    box-shadow: 0 0 0 3px #fff,0 0 0 6px var(--ab-red),0 50px 90px -40px rgba(20,35,110,.7);
    --ty: -6px;
}
.tchips .chip {
    padding: 9px 16px;
    font-size: 13.5px;
}

/* Брой карти, различен от 8: ширината идва от елемента (tc-w3…tc-w12),
   за да няма дупки в последния ред. На мобилно — пак една колона. */
.tgrid .tc-w3 {
    grid-column: span 3;
    grid-row: auto;
}
.tgrid .tc-w4 {
    grid-column: span 4;
    grid-row: auto;
}
.tgrid .tc-w6 {
    grid-column: span 6;
    grid-row: auto;
}
.tgrid .tc-w12 {
    grid-column: span 12;
    grid-row: auto;
}
@media (max-width:980px) {
    .tgrid .tc-w3,
    .tgrid .tc-w4,
    .tgrid .tc-w6,
    .tgrid .tc-w12 {
        grid-column: auto;
    }
}
