/**
 * FastBlog - 3D Perspective Tunnel Hero Styles
 * Pure CSS3 3D Spatial Fly-through
 *
 * @package FastBlog
 * @version 2.5
 */

.fb-tunnel-hero {
    position: relative;
    width: 100%;
    height: var(--fb-tunnel-height, 100vh);
    min-height: 580px;
    max-height: 1080px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
    -webkit-user-select: none;
    perspective: 1200px;
    -webkit-perspective: 1200px;
    transform-style: preserve-3d;
    -webkit-transform-style: preserve-3d;
    background-color: #030712;
    color: #ffffff;
    box-sizing: border-box;
}

@media (max-width: 768px) {
    .fb-tunnel-hero {
        perspective: 900px;
        -webkit-perspective: 900px;
        min-height: 520px;
        height: var(--fb-tunnel-height, 90svh);
    }
}

/* ==========================================================================
   Фоны, Сетки и Свечения
   ========================================================================== */
.fb-tunnel-hero__bg-grid {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-size: 32px 32px;
    mask-image: radial-gradient(ellipse 75% 75% at 50% 50%, #000 50%, transparent 100%);
    -webkit-mask-image: radial-gradient(ellipse 75% 75% at 50% 50%, #000 50%, transparent 100%);
    z-index: 1;
}

.fb-tunnel-hero--dark .fb-tunnel-hero__bg-grid {
    background-image: radial-gradient(#1e1b4b 1.5px, transparent 1.5px);
    opacity: 0.65;
}

.fb-tunnel-hero--light .fb-tunnel-hero__bg-grid {
    background-image: radial-gradient(#cbd5e1 1.5px, transparent 1.5px);
    opacity: 0.75;
}

.fb-tunnel-hero--ocean .fb-tunnel-hero__bg-grid {
    background-image: radial-gradient(rgba(177, 220, 231, 0.35) 1.5px, transparent 1.5px);
    opacity: 0.55;
}

.fb-tunnel-hero__bg-glow {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
}

.fb-tunnel-hero--dark {
    background: radial-gradient(circle at center, rgba(79, 70, 229, 0.18) 0%, rgba(3, 7, 18, 0.98) 75%), #030712;
}

.fb-tunnel-hero--light {
    background: radial-gradient(circle at center, rgba(99, 102, 241, 0.12) 0%, #f8fafc 75%), #f8fafc;
    color: #0f172a;
}

.fb-tunnel-hero--ocean {
    background: radial-gradient(circle at center, #1b88e5 0%, #1274c5 45%, #0f67b3 80%), #0f67b3;
    color: #ffffff;
}

.fb-tunnel-hero--dark .fb-tunnel-hero__bg-glow {
    background: radial-gradient(circle at center, rgba(99, 102, 241, 0.22) 0%, transparent 70%);
}

.fb-tunnel-hero--light .fb-tunnel-hero__bg-glow {
    background: radial-gradient(circle at center, rgba(99, 102, 241, 0.15) 0%, transparent 70%);
}

.fb-tunnel-hero--ocean .fb-tunnel-hero__bg-glow {
    background: radial-gradient(circle at center, rgba(177, 220, 231, 0.28) 0%, transparent 70%);
}

/* ==========================================================================
   Кольца глубины туннеля (Depth Rings)
   ========================================================================== */
.fb-tunnel-hero__ring {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
}

.fb-tunnel-hero__ring--inner {
    width: 48vmin;
    height: 48vmin;
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.fb-tunnel-hero__ring--outer {
    width: 76vmin;
    height: 76vmin;
    border: 1px dashed rgba(255, 255, 255, 0.12);
}

.fb-tunnel-hero--light .fb-tunnel-hero__ring--outer {
    border-color: rgba(15, 23, 42, 0.1);
}

.fb-tunnel-hero--ocean .fb-tunnel-hero__ring--inner {
    border-color: rgba(177, 220, 231, 0.35);
}

.fb-tunnel-hero--ocean .fb-tunnel-hero__ring--outer {
    border-color: rgba(177, 220, 231, 0.2);
}

/* ==========================================================================
   Центральная якорная типографика
   ========================================================================== */
.fb-tunnel-hero__center-content {
    position: relative;
    z-index: 2;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 0 24px;
    max-width: 680px;
    will-change: transform, opacity;
    transition: transform 0.1s linear, opacity 0.1s linear;
}

.fb-tunnel-hero__badge {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: clamp(1.3rem, 2.8vw, 1.65rem);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.28em;
    color: #818cf8;
    margin-bottom: 22px;
    display: inline-block;
}

.fb-tunnel-hero--light .fb-tunnel-hero__badge {
    color: #4f46e5;
}

.fb-tunnel-hero--ocean .fb-tunnel-hero__badge {
    color: #b1dce7;
}

.fb-tunnel-hero__title {
    font-size: clamp(2.6rem, 7.5vw, 6rem);
    font-weight: 900;
    line-height: 0.92;
    letter-spacing: -0.04em;
    margin: 0;
    text-transform: uppercase;
}

.fb-tunnel-hero--dark .fb-tunnel-hero__title {
    background: linear-gradient(180deg, #ffffff 0%, #cbd5e1 55%, rgba(255, 255, 255, 0.35) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.fb-tunnel-hero--light .fb-tunnel-hero__title {
    background: linear-gradient(180deg, #09090b 0%, #27272a 60%, rgba(9, 9, 11, 0.4) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.fb-tunnel-hero--ocean .fb-tunnel-hero__title {
    color: #ffffff;
    background: none;
    -webkit-text-fill-color: #ffffff;
    text-shadow: 0 4px 24px rgba(0, 0, 0, 0.25);
}

.fb-tunnel-hero__desc {
    margin-top: 18px;
    font-size: clamp(0.9rem, 1.8vw, 1.1rem);
    font-weight: 300;
    line-height: 1.5;
    max-width: 44ch;
}

.fb-tunnel-hero--dark .fb-tunnel-hero__desc {
    color: #94a3b8;
}

.fb-tunnel-hero--light .fb-tunnel-hero__desc {
    color: #64748b;
}

.fb-tunnel-hero--ocean .fb-tunnel-hero__desc {
    color: #e0f2fe;
}

/* ==========================================================================
   Подсказка прокрутки (Scroll to Explore)
   ========================================================================== */
.fb-tunnel-hero__prompt {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: clamp(1.2rem, 2.2vw, 1.45rem);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.22em;
    color: #94a3b8;
    will-change: opacity;
    transition: opacity 0.2s ease;
}

.fb-tunnel-hero--light .fb-tunnel-hero__prompt {
    color: #64748b;
}

.fb-tunnel-hero--ocean .fb-tunnel-hero__prompt {
    color: #b1dce7;
}

.fb-tunnel-hero--ocean .fb-tunnel-hero__prompt-line {
    background: linear-gradient(to bottom, #b1dce7, transparent);
}

.fb-tunnel-hero__prompt-line {
    width: 2px;
    height: 36px;
    background: linear-gradient(to bottom, #6366f1, transparent);
    animation: fb-tunnel-pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes fb-tunnel-pulse {
    0%, 100% { opacity: 0.3; transform: scaleY(0.7); }
    50% { opacity: 1; transform: scaleY(1); }
}

/* ==========================================================================
   3D Сцена и Карточки
   ========================================================================== */
.fb-tunnel-hero__stage {
    position: absolute;
    inset: 0;
    pointer-events: none;
    transform-style: preserve-3d;
    -webkit-transform-style: preserve-3d;
    z-index: 5;
}

.fb-tunnel-card {
    position: absolute;
    left: 50%;
    top: 50%;
    aspect-ratio: 4 / 5;
    width: clamp(180px, 18vw, 270px);
    will-change: transform, opacity;
    transform-origin: center center;
    cursor: pointer;
}

@media (max-width: 768px) {
    .fb-tunnel-card {
        width: clamp(130px, 36vw, 180px);
    }
}

.fb-tunnel-card__inner {
    display: block;
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 16px;
    overflow: hidden;
    background: #0f172a;
    box-shadow: 0 20px 45px -10px rgba(0, 0, 0, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.15);
    text-decoration: none;
    transition: border-color 0.4s ease, box-shadow 0.4s ease, transform 0.3s ease;
}

.fb-tunnel-hero--light .fb-tunnel-card__inner {
    background: #ffffff;
    box-shadow: 0 20px 45px -10px rgba(15, 23, 42, 0.25);
    border: 1px solid rgba(15, 23, 42, 0.12);
}

.fb-tunnel-hero--ocean .fb-tunnel-card__inner {
    background: #094b83;
    box-shadow: 0 20px 45px -10px rgba(7, 43, 77, 0.75);
    border: 1px solid rgba(177, 220, 231, 0.3);
}

.fb-tunnel-hero--ocean .fb-tunnel-card:hover .fb-tunnel-card__inner {
    border-color: #b1dce7;
    box-shadow: 0 0 35px rgba(177, 220, 231, 0.55), 0 25px 50px -10px rgba(5, 36, 64, 0.9);
}

.fb-tunnel-card:hover .fb-tunnel-card__inner {
    border-color: rgba(99, 102, 241, 0.85);
    box-shadow: 0 0 35px rgba(99, 102, 241, 0.4), 0 25px 50px -10px rgba(0, 0, 0, 0.9);
    transform: scale(1.03);
}

.fb-tunnel-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.fb-tunnel-card:hover .fb-tunnel-card__img {
    transform: scale(1.1);
}

.fb-tunnel-card__overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    padding: 16px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.25) 55%, transparent 100%);
    pointer-events: none;
}

.fb-tunnel-card__title {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

/* ==========================================================================
   Интерактивная панель управления (Скраббер, Кнопки, Автополет)
   ========================================================================== */
.fb-tunnel-hero__controls {
    position: absolute;
    bottom: 24px;
    right: 32px;
    z-index: 15;
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 6px 10px;
    border-radius: 30px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

.fb-tunnel-hero--light .fb-tunnel-hero__controls {
    background: rgba(255, 255, 255, 0.8);
    border-color: rgba(15, 23, 42, 0.1);
    box-shadow: 0 8px 25px rgba(15, 23, 42, 0.1);
}

.fb-tunnel-hero--ocean .fb-tunnel-hero__controls {
    background: rgba(15, 103, 179, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-color: rgba(177, 220, 231, 0.35);
    box-shadow: 0 8px 30px rgba(7, 43, 77, 0.45);
}

.fb-tunnel-hero--ocean .fb-tunnel-btn {
    color: #b1dce7;
}

.fb-tunnel-hero--ocean .fb-tunnel-btn:hover {
    background: rgba(177, 220, 231, 0.2);
    color: #ffffff;
}

.fb-tunnel-hero--ocean .fb-tunnel-btn.is-active {
    color: #ffffff;
}

.fb-tunnel-hero--ocean .fb-tunnel-scrubber__track {
    background: rgba(255, 255, 255, 0.25);
}

.fb-tunnel-hero--ocean .fb-tunnel-scrubber__fill {
    background: #b1dce7;
}

.fb-tunnel-hero--ocean .fb-tunnel-scrubber__thumb {
    background: #ffffff;
    box-shadow: 0 0 10px rgba(177, 220, 231, 0.95);
}

@media (max-width: 768px) {
    .fb-tunnel-hero__controls {
        right: auto;
        left: 50%;
        transform: translateX(-50%);
        bottom: 16px;
        padding: 5px 8px;
    }
}

.fb-tunnel-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: #cbd5e1;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
}

.fb-tunnel-hero--light .fb-tunnel-btn {
    color: #475569;
}

.fb-tunnel-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    transform: scale(1.08);
}

.fb-tunnel-hero--light .fb-tunnel-btn:hover {
    background: rgba(15, 23, 42, 0.08);
    color: #0f172a;
}

.fb-tunnel-btn.is-active {
    color: #818cf8;
}

.fb-tunnel-scrubber {
    width: 100px;
    height: 24px;
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 0 4px;
}

@media (max-width: 480px) {
    .fb-tunnel-scrubber {
        width: 70px;
    }
}

.fb-tunnel-scrubber__track {
    position: relative;
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    overflow: visible;
}

.fb-tunnel-hero--light .fb-tunnel-scrubber__track {
    background: rgba(15, 23, 42, 0.15);
}

.fb-tunnel-scrubber__fill {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 0%;
    background: #6366f1;
    border-radius: 4px;
}

.fb-tunnel-scrubber__thumb {
    position: absolute;
    left: 0%;
    top: 50%;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 0 8px rgba(99, 102, 241, 0.8);
    transform: translate(-50%, -50%);
    transition: transform 0.15s ease;
}

.fb-tunnel-scrubber:hover .fb-tunnel-scrubber__thumb {
    transform: translate(-50%, -50%) scale(1.25);
}
