/* Explain: Styles for the Breaking Bad fandom section, including background, vapor effects, posters, and gallery. */
.bb-section {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    border-top: 1px solid var(--border-color);
    background: #06121a;
}

.bb-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

.bb-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 42%;
    opacity: 0.9;
    filter: saturate(1.05) contrast(1.04) brightness(0.86);
    -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 15%, #000 82%, transparent 100%);
    mask-image: linear-gradient(180deg, transparent 0%, #000 15%, #000 82%, transparent 100%);
}

.bb-scrim {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background:
        linear-gradient(180deg, #0a2840 0%, rgba(10, 40, 64, 0.88) 10%, rgba(8, 18, 22, 0.6) 30%, rgba(7, 14, 16, 0.74) 52%, rgba(44, 34, 9, 0.7) 78%, #362807 100%),
        radial-gradient(120% 80% at 50% 50%, transparent 34%, rgba(3, 8, 10, 0.4) 100%);
}

/* --- Chemical vapor: blue and green fumes drifting upward --- */
.bb-vapor {
    position: absolute;
    inset: 0;
    z-index: 4;
    overflow: hidden;
    pointer-events: none;
    mix-blend-mode: screen;
}

.bb-vapor::before,
.bb-vapor::after {
    content: "";
    position: absolute;
    inset: -35% -25%;
}

.bb-vapor::before {
    background:
        radial-gradient(30% 24% at 18% 80%, rgba(64, 202, 190, 0.26), transparent 70%),
        radial-gradient(26% 20% at 44% 94%, rgba(88, 178, 216, 0.22), transparent 72%),
        radial-gradient(32% 26% at 78% 86%, rgba(70, 210, 184, 0.2), transparent 70%);
    animation: bb-vapor-rise 42s ease-in-out infinite alternate;
}

.bb-vapor::after {
    background:
        radial-gradient(24% 20% at 62% 64%, rgba(124, 220, 200, 0.16), transparent 72%),
        radial-gradient(30% 24% at 26% 56%, rgba(96, 172, 216, 0.16), transparent 74%),
        radial-gradient(22% 18% at 86% 44%, rgba(126, 226, 190, 0.13), transparent 72%);
    filter: blur(16px);
    animation: bb-vapor-sway 64s ease-in-out infinite alternate;
}

@keyframes bb-vapor-rise {
    0% {
        transform: translate3d(-4%, 7%, 0) scale(1);
        opacity: 0.5;
    }
    50% {
        opacity: 0.9;
    }
    100% {
        transform: translate3d(4%, -9%, 0) scale(1.14);
        opacity: 0.72;
    }
}

@keyframes bb-vapor-sway {
    0% {
        transform: translate3d(5%, 5%, 0) scale(1.1);
        opacity: 0.4;
    }
    100% {
        transform: translate3d(-6%, -7%, 0) scale(1);
        opacity: 0.8;
    }
}

.bb-section > .shell {
    position: relative;
    z-index: 5;
}

.bb-lead {
    margin-top: 1.25rem;
    padding-left: 1rem;
    border-left: 2px solid rgba(94, 208, 190, 0.72);
    color: var(--bone-color);
    font-family: var(--font-heading);
    font-size: 1.06rem;
    line-height: 1.6;
}

/* --- Franchise posters --- */
.bb-posters {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.7rem;
}

.bb-poster {
    display: block;
    overflow: hidden;
    border: 1px solid rgba(201, 176, 135, 0.3);
    background: #07120f;
    box-shadow: 0 18px 36px -28px #000;
}

.bb-poster img {
    display: block;
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    object-position: center;
    filter: saturate(0.95) contrast(1.05) brightness(0.9);
    transition: transform 0.6s ease, filter 0.6s ease;
}

.bb-poster:hover img {
    transform: scale(1.04);
    filter: saturate(1) contrast(1.05) brightness(1);
}

.bb-poster__name {
    margin: 0;
    color: var(--bone-color);
    font-family: var(--font-heading);
    font-size: 0.8rem;
    line-height: 1.25;
}

.bb-poster__year {
    margin: 0.3rem 0 0;
    color: var(--text-muted);
    font-size: 0.54rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

/* --- Evenly cropped stills --- */
.bb-gallery {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1px;
    border: 1px solid var(--border-color);
    background: var(--border-color);
}

@media (min-width: 640px) {
    .bb-gallery {
        grid-template-columns: repeat(3, 1fr);
    }
}

.bb-shot {
    position: relative;
    overflow: hidden;
    background: #07100e;
}

.bb-shot img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    object-position: center;
    filter: saturate(0.96) contrast(1.05) brightness(0.92);
    transition: transform 0.7s ease, filter 0.7s ease;
}

.bb-shot:hover img {
    transform: scale(1.04);
    filter: saturate(1) contrast(1.05) brightness(1.02);
}

.bb-shot figcaption {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    padding: 1.5rem 0.85rem 0.75rem;
    background: linear-gradient(180deg, transparent, rgba(4, 12, 10, 0.94));
    color: var(--primary-color);
    font-size: 0.58rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
}

@media (prefers-reduced-motion: reduce) {
    .bb-vapor::before,
    .bb-vapor::after {
        animation: none;
        opacity: 0.45;
    }

    .bb-shot:hover img,
    .bb-poster:hover img {
        transform: none;
    }
}