/* ============================================================
   Image-Text Block — Futuristic Dark Edition
   ============================================================ */

.nf-image-text {
    padding: 0;
    position: relative;
    overflow: hidden;
    background:
        linear-gradient(
            135deg,
            rgba(0, 0, 0, 0.82) 0%,
            rgba(51, 51, 51, 0.78) 100%
        ),
        var(--nf-it-bg, none);
    background-attachment: scroll, fixed;
    background-size: auto, cover;
    background-position:
        0 0,
        center center;
    background-repeat: repeat, no-repeat;
}

/* Subtle tech-grid background overlay */
.nf-image-text::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(212, 175, 55, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(212, 175, 55, 0.035) 1px, transparent 1px);
    background-size: 64px 64px;
    pointer-events: none;
    z-index: 0;
}

/* ============================================================
   Grid Layout
   ============================================================ */

.nf-image-text__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 0;
    position: relative;
    z-index: 1;
}

.nf-image-text--image-left .nf-image-text__media {
    order: 1;
}
.nf-image-text--image-left .nf-image-text__content {
    order: 2;
}
.nf-image-text--image-right .nf-image-text__media {
    order: 2;
}
.nf-image-text--image-right .nf-image-text__content {
    order: 1;
}

/* ============================================================
   Content Panel
   ============================================================ */

.nf-image-text__content {
    padding: 80px 10%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
}

/* Glowing vertical accent bar on the outer edge */
.nf-image-text__content::before {
    content: "";
    position: absolute;
    top: 20%;
    bottom: 20%;
    left: 0;
    width: 3px;
    background: linear-gradient(
        to bottom,
        transparent,
        var(--nf-brand-color, #d4af37) 25%,
        var(--nf-brand-color, #d4af37) 75%,
        transparent
    );
    box-shadow: 0 0 16px rgba(212, 175, 55, 0.65);
}

.nf-image-text--image-left .nf-image-text__content {
    padding-left: 12%;
}
.nf-image-text--image-right .nf-image-text__content {
    padding-right: 12%;
}

/* Header block */
.nf-image-text__header {
    margin-bottom: 4px;
}

/* Eyebrow subtitle */
.nf-image-text__subtitle {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-family: "Orbitron", sans-serif;
    font-size: 11px;
    font-weight: 800;
    color: var(--nf-brand-color, #d4af37);
    text-transform: uppercase;
    letter-spacing: 0.32em;
    margin-bottom: 14px;
}

/* Glowing dash before subtitle */
.nf-image-text__subtitle::before {
    content: "";
    display: block;
    width: 28px;
    height: 2px;
    flex-shrink: 0;
    background: var(--nf-brand-color, #d4af37);
    box-shadow: 0 0 8px rgba(212, 175, 55, 0.9);
}

/* Title */
.nf-image-text__title {
    font-family: "Orbitron", sans-serif;
    font-size: clamp(22px, 3.2vw, 40px);
    font-weight: 900;
    line-height: 1.1;
    color: #ffffff;
    margin: 0 0 24px;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

/* Body text */
.nf-image-text__body p {
    font-size: 16px;
    line-height: 1.78;
    color: rgba(255, 255, 255, 0.55);
    margin-bottom: 36px;
    max-width: 500px;
}

/* ============================================================
   Futuristic Button
   ============================================================ */

.nf-button--futuristic {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: transparent;
    border: 1px solid rgba(212, 175, 55, 0.45);
    border-left: 3px solid var(--nf-brand-color, #d4af37);
    color: var(--nf-brand-color, #d4af37);
    padding: 14px 30px;
    font-family: "Orbitron", sans-serif;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    clip-path: polygon(
        0 0,
        calc(100% - 12px) 0,
        100% 12px,
        100% 100%,
        12px 100%,
        0 calc(100% - 12px)
    );
    transition: all 0.4s ease;
    position: relative;
    text-decoration: none;
}

.nf-button--futuristic:hover {
    background: rgba(212, 175, 55, 0.1);
    border-color: var(--nf-brand-color, #d4af37);
    color: #ffffff;
    box-shadow: 0 0 28px rgba(212, 175, 55, 0.22);
    transform: translateX(6px);
}

.nf-button--futuristic .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
    transition: transform 0.3s ease;
}

.nf-button--futuristic:hover .dashicons {
    transform: translateX(4px);
}

/* ============================================================
   Media / Image Panel
   ============================================================ */

.nf-image-text__media {
    position: relative;
    z-index: 1;
    height: 100%;
    min-height: 580px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 40px;
    perspective: 1200px;
}

/* Tilted image wrapper */
.nf-image-text__image-wrapper {
    position: relative;
    width: 100%;
    min-height: 460px;
    transform: rotateY(8deg) skewY(-1.5deg);
    transition: transform 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
    box-shadow:
        -20px 20px 60px rgba(0, 0, 0, 0.65),
        0 0 50px rgba(212, 175, 55, 0.07);
    background: var(
        --header-gradient,
        linear-gradient(135deg, #000000 0%, #333333 100%)
    );
}

.nf-image-text--image-right .nf-image-text__image-wrapper {
    transform: rotateY(-8deg) skewY(1.5deg);
}

/* Image */
.nf-image-text__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.85;
    filter: contrast(1.08) brightness(0.82) saturate(0.88);
    clip-path: polygon(0 6%, 94% 0, 100% 94%, 6% 100%);
}

/* Glowing cutoff frame */
.nf-image-text__cutoff-frame {
    position: absolute;
    inset: -8px;
    border: 1px solid rgba(212, 175, 55, 0.28);
    clip-path: polygon(0 6%, 94% 0, 100% 94%, 6% 100%);
    z-index: 2;
    pointer-events: none;
    box-shadow: 0 0 24px rgba(212, 175, 55, 0.1);
}

/* HUD corner brackets */
.nf-image-text__image-wrapper::before,
.nf-image-text__image-wrapper::after {
    content: "";
    position: absolute;
    width: 32px;
    height: 32px;
    border: 2px solid var(--nf-brand-color, #d4af37);
    z-index: 10;
    pointer-events: none;
    filter: drop-shadow(0 0 6px rgba(212, 175, 55, 0.9));
    transition: all 0.4s ease;
}

.nf-image-text__image-wrapper::before {
    top: -10px;
    left: -10px;
    border-right: none;
    border-bottom: none;
}

.nf-image-text__image-wrapper::after {
    bottom: -10px;
    right: -10px;
    border-left: none;
    border-top: none;
}

/* Scanning line animation */
.nf-image-text__overlay-glow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(
        90deg,
        transparent,
        var(--nf-brand-color, #d4af37),
        transparent
    );
    z-index: 5;
    opacity: 0;
    box-shadow: 0 0 12px var(--nf-brand-color, #d4af37);
    animation: nf-hud-scan 5s 2s infinite linear;
}

@keyframes nf-hud-scan {
    0% {
        top: 0%;
        opacity: 0;
    }
    8% {
        opacity: 0.75;
    }
    92% {
        opacity: 0.75;
    }
    100% {
        top: 100%;
        opacity: 0;
    }
}

/* ============================================================
   HUD Floating Panels  (replaces the broken off-screen lines)
   ============================================================ */

.nf-image-text__ui-element {
    position: absolute;
    z-index: 20;
    pointer-events: none;
}

/* --- Panel 1: Status badge (top-right of image area) --- */
.nf-image-text__ui-element--1 {
    top: 14%;
    right: 6%;
    display: flex;
    align-items: center;
    gap: 9px;
    background: linear-gradient(
        135deg,
        rgba(0, 0, 0, 0.92),
        rgba(51, 51, 51, 0.92)
    );
    border: 1px solid rgba(212, 175, 55, 0.28);
    border-left: 3px solid var(--nf-brand-color, #d4af37);
    padding: 9px 16px;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    clip-path: polygon(0 0, 100% 0, 92% 100%, 0 100%);
    box-shadow:
        0 0 20px rgba(212, 175, 55, 0.07),
        0 4px 24px rgba(0, 0, 0, 0.6);
    animation: nf-slidein-right 0.7s 0.4s cubic-bezier(0.165, 0.84, 0.44, 1)
        both;
}

/* --- Panel 2: Data stat chip (bottom-left of image area) --- */
.nf-image-text__ui-element--2 {
    bottom: 14%;
    left: 6%;
    background: linear-gradient(
        135deg,
        rgba(0, 0, 0, 0.92),
        rgba(51, 51, 51, 0.92)
    );
    border: 1px solid rgba(212, 175, 55, 0.28);
    border-right: 3px solid var(--nf-brand-color, #d4af37);
    padding: 11px 18px;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    clip-path: polygon(8% 0, 100% 0, 100% 100%, 0 100%);
    box-shadow:
        0 0 20px rgba(212, 175, 55, 0.07),
        0 4px 24px rgba(0, 0, 0, 0.6);
    animation: nf-slidein-left 0.7s 0.6s cubic-bezier(0.165, 0.84, 0.44, 1) both;
}

/* Slide-in animations */
@keyframes nf-slidein-right {
    from {
        opacity: 0;
        transform: translateX(18px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes nf-slidein-left {
    from {
        opacity: 0;
        transform: translateX(-18px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Pulsing status dot */
.nf-hud-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
    background: #22c55e;
    box-shadow:
        0 0 8px #22c55e,
        0 0 20px rgba(34, 197, 94, 0.45);
    animation: nf-dot-pulse 2.2s ease-in-out infinite;
}

@keyframes nf-dot-pulse {
    0%,
    100% {
        opacity: 1;
        box-shadow:
            0 0 8px #22c55e,
            0 0 20px rgba(34, 197, 94, 0.45);
    }
    50% {
        opacity: 0.4;
        box-shadow: 0 0 3px #22c55e;
    }
}

/* HUD label text */
.nf-hud-label {
    font-family: "Orbitron", monospace;
    font-size: 9.5px;
    font-weight: 700;
    color: var(--nf-brand-color, #d4af37);
    text-transform: uppercase;
    letter-spacing: 0.18em;
    white-space: nowrap;
}

/* HUD stat value */
.nf-hud-stat__value {
    display: block;
    font-family: "Orbitron", monospace;
    font-size: 22px;
    font-weight: 900;
    color: var(--nf-brand-color, #d4af37);
    line-height: 1;
    text-shadow: 0 0 16px rgba(212, 175, 55, 0.55);
}

/* HUD stat label */
.nf-hud-stat__label {
    display: block;
    font-family: "Orbitron", monospace;
    font-size: 8px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.24em;
    margin-top: 5px;
    white-space: nowrap;
}

/* ============================================================
   Scroll Reveal Animations
   ============================================================ */

.nf-image-text.nf-scroll-reveal .nf-image-text__content {
    opacity: 0;
    transform: translateX(-50px);
    transition:
        opacity 1s cubic-bezier(0.165, 0.84, 0.44, 1),
        transform 1s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.nf-image-text.nf-scroll-reveal .nf-image-text__media {
    opacity: 0;
    transform: translateX(50px);
    transition:
        opacity 1s cubic-bezier(0.165, 0.84, 0.44, 1),
        transform 1s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.nf-image-text.nf-scroll-reveal.is-visible .nf-image-text__content,
.nf-image-text.nf-scroll-reveal.is-visible .nf-image-text__media {
    opacity: 1;
    transform: translateX(0);
}

/* ============================================================
   Responsive
   ============================================================ */

@media (max-width: 991px) {
    .nf-image-text__grid {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .nf-image-text--image-left .nf-image-text__grid {
        direction: ltr;
    }

    .nf-image-text__media {
        order: -1 !important;
        padding: 48px 24px 32px;
        min-height: 380px;
    }

    .nf-image-text__content {
        padding: 48px 24px 64px;
    }

    /* Hide vertical accent bar on mobile — no room */
    .nf-image-text__content::before {
        display: none;
    }

    .nf-image-text__image-wrapper {
        transform: none;
        min-height: 300px;
    }

    .nf-image-text--image-right .nf-image-text__image-wrapper {
        transform: none;
    }

    .nf-image-text__ui-element--1 {
        top: 8%;
        right: 4%;
    }

    .nf-image-text__ui-element--2 {
        bottom: 8%;
        left: 4%;
    }
}

@media (max-width: 640px) {
    .nf-image-text__media {
        min-height: 280px;
        padding: 32px 16px 24px;
    }

    .nf-image-text__content {
        padding: 40px 20px 56px;
    }

    .nf-image-text__title {
        font-size: clamp(20px, 6vw, 28px);
    }

    .nf-hud-stat__value {
        font-size: 18px;
    }
}
