/* ============================================================
   CQ Trading Altyapısı sayfasına özel stiller
   (Views/Tech/TradingInfrastructure.cshtml — başka sayfada yüklenmez)
   ============================================================ */

/* ---------- Hero parıltı katmanı ---------- */
.cq-hero-glow {
    pointer-events: none;
    z-index: 0;
    background:
        radial-gradient(420px 280px at 18% 28%, rgba(101, 164, 217, .35), transparent 70%),
        radial-gradient(520px 320px at 82% 70%, rgba(139, 211, 225, .28), transparent 70%);
    animation: cq-glow-drift 12s ease-in-out infinite alternate;
}

@keyframes cq-glow-drift {
    from { transform: translate3d(0, 0, 0) scale(1); opacity: .8; }
    to   { transform: translate3d(0, -30px, 0) scale(1.08); opacity: 1; }
}

/* ---------- İstatistik şeridi ---------- */
.cq-stat { text-align: center; }

.cq-stat-value {
    display: block;
    font-size: 50px;
    line-height: 1.1;
    font-weight: 800;
    color: #232323;
    letter-spacing: -2px;
}

.cq-stat-value small {
    font-size: 24px;
    font-weight: 700;
    margin-left: 2px;
}

.cq-stat-label {
    display: block;
    margin-top: 6px;
    font-size: 15px;
    color: #717580;
}

/* ---------- Koyu topoloji bölümü ---------- */
.cq-topo {
    background: linear-gradient(180deg, #0c1220 0%, #131c30 100%);
}

.cq-eyebrow {
    display: inline-block;
    margin-bottom: 15px;
    padding: 4px 20px;
    border-radius: 30px;
    background: rgba(101, 164, 217, .15);
    border: 1px solid rgba(101, 164, 217, .35);
    color: #8bd3e1;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.cq-topo h3 { color: #ffffff; }
.cq-muted { color: rgba(255, 255, 255, .55); }

/* ---------- Sekmeler (pill tabs) ---------- */
.cq-tabs { gap: 8px; }

.cq-tab-btn {
    border: 1px solid rgba(255, 255, 255, .15);
    background: rgba(255, 255, 255, .05);
    color: rgba(255, 255, 255, .7);
    border-radius: 30px;
    padding: 10px 28px;
    font-size: 14px;
    font-weight: 600;
    transition: background .3s ease, border-color .3s ease, color .3s ease, box-shadow .3s ease;
}

.cq-tab-btn:hover { color: #ffffff; }

.cq-tab-btn.active {
    background: linear-gradient(90deg, #4368b1, #65a4d9);
    border-color: transparent;
    color: #ffffff;
    box-shadow: 0 8px 24px rgba(67, 104, 177, .45);
}

/* JS yokken iki panel alt alta görünür; JS sekmeleri etkinleştirince
   yalnızca aktif panel kalır (.cq-js sınıfı JS tarafından eklenir) */
.cq-js .cq-topo-panel { display: none; }

.cq-js .cq-topo-panel.active {
    display: block;
    animation: cq-fade-in .45s ease;
}

@keyframes cq-fade-in {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}

.cq-flow-title {
    color: rgba(255, 255, 255, .85);
    font-size: 15px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin: 45px 0 30px;
    text-align: center;
}

.cq-flow-note {
    text-align: center;
    font-size: 13.5px;
    color: rgba(255, 255, 255, .5);
    margin-top: 25px;
}

/* ---------- Akış diyagramı ---------- */
.cq-flow {
    display: flex;
    align-items: stretch;
    justify-content: center;
}

.cq-node {
    position: relative;
    flex: 1 1 0;
    max-width: 200px;
    background: rgba(255, 255, 255, .04);
    border: 1px solid rgba(120, 160, 255, .18);
    border-radius: 10px;
    padding: 18px 14px;
    text-align: center;
    cursor: default;
    transition: border-color .3s ease, transform .3s ease, box-shadow .3s ease;
}

.cq-node:hover,
.cq-node:focus {
    border-color: rgba(139, 211, 225, .8);
    transform: translateY(-4px);
    box-shadow: 0 14px 34px rgba(0, 0, 0, .45), 0 0 0 1px rgba(139, 211, 225, .25);
    z-index: 5;
}

.cq-node:focus:not(:focus-visible) { outline: none; }

.cq-node:focus-visible {
    outline: 2px solid #8bd3e1;
    outline-offset: 3px;
}

.cq-tab-btn:focus-visible {
    outline: 2px solid #8bd3e1;
    outline-offset: 3px;
}

.cq-node-kicker {
    display: block;
    font-size: 10px;
    letter-spacing: 1.5px;
    color: #8bd3e1;
    text-transform: uppercase;
    font-weight: 700;
    margin-bottom: 6px;
}

.cq-node-name {
    display: block;
    font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace;
    font-size: 15px;
    font-weight: 700;
    color: #ffffff;
}

.cq-node-role {
    display: block;
    font-size: 12px;
    color: rgba(255, 255, 255, .55);
    margin-top: 6px;
    line-height: 1.5;
}

/* Hover / klavye odağında açılan bilgi kartı */
.cq-node-tip {
    position: absolute;
    left: 50%;
    bottom: calc(100% + 12px);
    transform: translateX(-50%) translateY(6px);
    width: 240px;
    background: #0c1220;
    border: 1px solid rgba(139, 211, 225, .4);
    border-radius: 8px;
    padding: 12px 14px;
    font-size: 12.5px;
    line-height: 1.55;
    color: rgba(255, 255, 255, .85);
    text-align: left;
    opacity: 0;
    visibility: hidden;
    transition: opacity .25s ease, transform .25s ease, visibility .25s;
    pointer-events: none;
    z-index: 20;
    box-shadow: 0 18px 40px rgba(0, 0, 0, .55);
}

.cq-node:hover .cq-node-tip,
.cq-node:focus .cq-node-tip {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* Bağlantı çizgisi: akan veri animasyonu */
.cq-link {
    position: relative;
    flex: 0 0 70px;
    align-self: center;
    height: 2px;
    margin: 0 4px;
    background-image: linear-gradient(90deg, #65a4d9 55%, transparent 45%);
    background-size: 12px 2px;
    animation: cq-dash 1s linear infinite;
}

@keyframes cq-dash {
    from { background-position: 0 0; }
    to { background-position: 12px 0; }
}

@keyframes cq-dash-v {
    from { background-position: 0 0; }
    to { background-position: 0 12px; }
}

/* Ok ucu */
.cq-link::after {
    content: "";
    position: absolute;
    right: -1px;
    top: 50%;
    transform: translateY(-50%);
    border: 5px solid transparent;
    border-left-color: #8bd3e1;
}

/* Çift yönlü bağlantıda ok ucu yok; etiket yönü anlatır (⇄) */
.cq-link--two-way::after { display: none; }

/* Protokol etiketi */
.cq-link::before {
    content: attr(data-label);
    position: absolute;
    left: 50%;
    bottom: 9px;
    transform: translateX(-50%);
    white-space: nowrap;
    font-size: 10.5px;
    letter-spacing: .5px;
    color: #8bd3e1;
    font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace;
}

/* ---------- Bileşen vitrini (spotlight kartlar) ---------- */
.cq-card {
    position: relative;
    height: 100%;
    background: #ffffff;
    border: 1px solid #e8eaf0;
    border-radius: 10px;
    padding: 30px 28px;
    overflow: hidden;
    transition: transform .3s ease, box-shadow .3s ease;
}

.cq-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(220px circle at var(--cq-mx, 50%) var(--cq-my, 50%), rgba(101, 164, 217, .14), transparent 65%);
    opacity: 0;
    transition: opacity .3s ease;
    pointer-events: none;
}

.cq-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 45px rgba(20, 30, 60, .12);
}

.cq-card:hover::before { opacity: 1; }

.cq-card-name {
    display: block;
    font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace;
    font-size: 17px;
    font-weight: 700;
    color: #232323;
    margin-bottom: 8px;
}

.cq-card-role {
    font-size: 14.5px;
    color: #555555;
    margin-bottom: 14px;
    line-height: 1.6;
}

.cq-card-edge {
    display: block;
    font-size: 13px;
    color: #4368b1;
    font-weight: 600;
    line-height: 1.55;
}

.cq-card-edge i { margin-right: 6px; }

/* ---------- Performans bölümü ---------- */
.cq-perf {
    background: linear-gradient(180deg, #131c30 0%, #0c1220 100%);
}

.cq-perf h3 { color: #ffffff; }

.cq-perf-card {
    height: 100%;
    text-align: center;
    border: 1px solid rgba(120, 160, 255, .18);
    border-radius: 12px;
    padding: 40px 25px 35px;
    background: rgba(255, 255, 255, .03);
    transition: border-color .3s ease, transform .3s ease;
}

.cq-perf-card:hover {
    border-color: rgba(139, 211, 225, .6);
    transform: translateY(-5px);
}

.cq-perf-name {
    display: block;
    font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace;
    font-size: 14px;
    font-weight: 700;
    color: #8bd3e1;
    letter-spacing: 1px;
    margin-bottom: 18px;
}

.cq-perf-value {
    display: block;
    font-size: 62px;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -2px;
    line-height: 1;
}

.cq-perf-unit {
    font-size: 26px;
    color: #8bd3e1;
    font-weight: 700;
    margin-left: 4px;
}

.cq-perf-desc {
    color: rgba(255, 255, 255, .6);
    font-size: 14px;
    line-height: 1.6;
    margin: 14px 0 0;
}

.cq-perf-context {
    text-align: center;
    color: rgba(255, 255, 255, .45);
    font-size: 14px;
    margin-top: 35px;
}

/* ---------- Responsive ---------- */
@media (max-width: 991px) {
    .cq-stat-value { font-size: 38px; }

    .cq-flow {
        flex-direction: column;
        align-items: center;
    }

    .cq-node {
        flex: 0 0 auto;
        width: 100%;
        max-width: 320px;
    }

    .cq-link {
        flex: 0 0 50px;
        width: 2px;
        height: 50px;
        margin: 4px 0;
        align-self: center;
        background-image: linear-gradient(180deg, #65a4d9 55%, transparent 45%);
        background-size: 2px 12px;
        animation-name: cq-dash-v;
    }

    .cq-link::after {
        right: auto;
        top: auto;
        bottom: -1px;
        left: 50%;
        transform: translateX(-50%);
        border: 5px solid transparent;
        border-top-color: #8bd3e1;
    }

    .cq-link::before {
        left: auto;
        right: -8px;
        bottom: 50%;
        transform: translate(100%, 50%);
    }

    /* Mobilde hover yok; rol metni yeterli */
    .cq-node-tip { display: none; }

    .cq-perf-value { font-size: 46px; }
}

/* Hareket azaltma tercihi olan kullanıcılar için animasyonları kapat */
@media (prefers-reduced-motion: reduce) {
    .cq-hero-glow,
    .cq-link,
    .cq-js .cq-topo-panel.active {
        animation: none;
    }
}
