/* ============================================================
   SECURITY — Wireframe panel & radar
   ============================================================ */

.security-section {
    padding: 80px 0;
    position: relative;
    z-index: 1;
}

/* ====== عنوان داخل کادر خط‌کشی ====== */
#security .section-header {
    width: 100% !important;
    max-width: none !important;
    margin: 0 0 34px !important;
    padding: 26px 32px !important;
    position: relative !important;
    text-align: center !important;
    overflow: visible !important;
}

#security .section-header::before {
    content: '' !important;
    position: absolute !important;
    left: calc(-1 * var(--line-ext)) !important;
    right: calc(-1 * var(--line-ext)) !important;
    top: 0 !important;
    bottom: 0 !important;
    height: auto !important;
    border: 0 !important;
    border-top: 1px solid var(--line-strong) !important;
    border-bottom: 1px solid var(--line-strong) !important;
    background: none !important;
    pointer-events: none;
}

#security .section-header::after {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: auto !important;
    border: 0 !important;
    border-left: 1px solid var(--line-strong) !important;
    border-right: 1px solid var(--line-strong) !important;
    background: none !important;
    box-shadow: none !important;
    pointer-events: none;
}

/* ====== کادر اصلی: دو ستون با خطوط خاکستری ====== */
.security-container {
    position: relative;
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    gap: 0;
    align-items: stretch;
    box-shadow:
        inset 1px 0 0 var(--line-strong),
        inset -1px 0 0 var(--line-strong);
}

/* خط افقی بالا — تا لبه صفحه */
.security-container::before,
.security-container::after {
    content: '';
    position: absolute;
    left: calc(-1 * var(--line-ext));
    right: calc(-1 * var(--line-ext));
    height: 1px;
    background: var(--line-px);
    pointer-events: none;
    z-index: 4;
}

.security-container::before { top: 0; }
.security-container::after  { bottom: 0; }

/* ====== ستون چپ: محتوا ====== */
.security-content {
    position: relative;
    z-index: 2;
    padding: 30px 46px 30px 38px;
    border-right: 1px solid var(--line-strong);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

#security .security-title {
    font-family: 'Vazirmatn', 'Inter', sans-serif;
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -1px;
    line-height: 1.25;
    margin: 0 auto !important;
    max-width: 860px;
    color: var(--text);
}

.security-title .highlight {
    background-image: linear-gradient(100deg, var(--hl-1, var(--accent)), var(--hl-2, #2d9fff));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.security-desc {
    font-family: 'Vazirmatn', 'Inter', sans-serif;
    font-size: 0.95rem;
    line-height: 1.8;
    color: var(--text);
    opacity: 0.55;
    max-width: 540px;
    margin-bottom: 20px;
}

.security-desc:last-of-type { margin-bottom: 36px; }

/* ====== باکس مشاوره ====== */
.security-consult-box {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    padding: 0;
    max-width: 640px;
    margin-top: 30px;
}

.security-consult-text {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: 'Vazirmatn', 'Inter', sans-serif;
    font-size: 0.88rem;
    font-weight: 500;
    line-height: 1.6;
    color: var(--text);
    opacity: 0.85;
}

.security-consult-text i {
    color: var(--text-muted);
    font-size: 1.15rem;
    flex: 0 0 auto;
}

/* دکمه امنیتی — هم‌شکل دکمه‌های HERO (.btn-hero.ghost) */
.security-consult-box .cta-btn {
    width: 100%;
    min-width: 0;
    justify-content: center;
    padding: 16px 30px;
    font-family: 'Vazirmatn', 'Inter', sans-serif;
    font-size: 0.68rem;
    font-weight: 500;
    letter-spacing: 0.16em;
    border-radius: 0;
    background: transparent;
    color: var(--text);
    border: 1px solid var(--line-border);
    box-shadow: none;
    transition: background 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

/* نوار نوری و فلش خطی قدیمی حذف شد */
.security-consult-box .cta-btn::after { display: none; }

.security-consult-box .cta-btn i { transition: transform 0.25s ease; }

.security-consult-box .cta-btn:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.03);
    border-color: var(--line-strong);
    box-shadow: none;
}

[data-theme="light"] .security-consult-box .cta-btn:hover {
    background: rgba(0, 0, 0, 0.03);
}

.security-consult-box .cta-btn:hover i { transform: translateX(4px); }

.security-consult-box .cta-btn:focus-visible {
    outline: 1px solid var(--line-strong);
    outline-offset: 4px;
}


/* ====== ستون راست: پنل رادار ====== */
.security-graphic {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 26px 22px;
    min-height: 470px;
    color: var(--text-muted);
    overflow: hidden;
}

/* گرید پس‌زمینه — خاکستری */
.security-grid-bg {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(var(--line-strong) 1px, transparent 1px),
        linear-gradient(90deg, var(--line-strong) 1px, transparent 1px);
    background-size: 52px 52px;
    opacity: 0.55;
    -webkit-mask-image: radial-gradient(circle at center, #000 30%, transparent 80%);
            mask-image: radial-gradient(circle at center, #000 30%, transparent 80%);
    pointer-events: none;
}

/* خطوط ضربدری پنل */
.sg-line {
    position: absolute;
    background: var(--line-px);
    pointer-events: none;
}

.sg-line.h { left: 0; right: 0; top: 50%; height: 1px; }
.sg-line.v { top: 0; bottom: 0; left: 50%; width: 1px; }

/* ---------- رادار ---------- */
.security-radar {
    position: relative;
    width: 68%;
    max-width: 400px;
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    z-index: 2;
}

.radar-svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    color: var(--text-muted);
    overflow: visible;
}

/* چرخش رادار — بسیار ملایم و خاکستری با نوک سبز */
.radar-sweep {
    position: absolute;
    inset: 17.5%;
    border-radius: 50%;
    background: conic-gradient(
        from 0deg,
        rgba(255, 255, 255, 0) 0deg,
        rgba(255, 255, 255, 0) 296deg,
        rgba(255, 255, 255, 0.04) 336deg,
        rgba(255, 255, 255, 0.09) 356deg,
        rgba(72, 255, 145, 0.22) 360deg
    );
    animation: radar-spin 5.5s linear infinite;
}

@keyframes radar-spin {
    to { transform: rotate(360deg); }
}

.radar-core {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 8px;
    height: 8px;
    margin: -4px 0 0 -4px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 10px rgba(72, 255, 145, 0.35);
}

.radar-threat {
    position: absolute;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #ff5f56;
    box-shadow: 0 0 8px 1px rgba(255, 95, 86, 0.35);
    animation: blink-threat 3.2s ease-in-out infinite;
}

.radar-threat.t1 { top: 31%; left: 23%; }
.radar-threat.t2 { top: 71%; left: 71%; animation-delay: 0.8s; }
.radar-threat.t3 { top: 21%; left: 71%; animation-delay: 1.6s; }
.radar-threat.t4 { top: 70%; left: 20%; animation-delay: 2.4s; }

@keyframes blink-threat {
    0%, 100% { opacity: 0.3; transform: scale(0.85); }
    50%      { opacity: 1;   transform: scale(1.2); }
}

/* ---------- متن‌های HUD ---------- */
.radar-hud {
    position: absolute;
    z-index: 5;
    font-family: 'Vazirmatn', 'Inter', sans-serif;
    font-size: 0.58rem;
    letter-spacing: 1.4px;
    line-height: 1.9;
    color: var(--text-muted);
    opacity: 0.85;
}

.radar-hud.top-left     { top: 5%;  left: 5%; }
.radar-hud.top-right    { top: 5%;  right: 5%; text-align: right; }
.radar-hud.bottom-left  { bottom: 5%; left: 5%; }
.radar-hud.bottom-right { bottom: 5%; right: 5%; text-align: right; }

.hud-dash {
    display: block;
    width: 18px;
    height: 1px;
    background: var(--line-px);
    margin: 0 0 10px;
}

.radar-hud.top-right .hud-dash,
.radar-hud.bottom-right .hud-dash {
    margin-left: auto;
}

.radar-hud.top-right .hud-dash:last-child,
.radar-hud.top-left .hud-dash:last-child { margin: 10px 0 0; }

.radar-hud.top-right .hud-dash:last-child { margin: 10px 0 0 auto; }

.hud-row {
    display: flex;
    gap: 22px;
    justify-content: space-between;
}

/* ماتریس‌های نقطه‌ای — خاکستری */
.hud-dots {
    position: absolute;
    width: 56px;
    height: 56px;
    background-image: radial-gradient(circle, var(--text-muted) 1px, transparent 1.5px);
    background-size: 14px 14px;
    opacity: 0.22;
    z-index: 1;
}

.hud-dots.dots-tr { top: 22%; right: 4%; }
.hud-dots.dots-bl { bottom: 22%; left: 4%; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 1100px) {
    #security .security-title { font-size: 1.8rem; }
    .security-content { padding: 34px; }
}

@media (max-width: 900px) {
    .security-container {
        grid-template-columns: 1fr;
        box-shadow:
            inset 1px 0 0 var(--line-strong),
            inset -1px 0 0 var(--line-strong);
    }

    .security-content {
        border-right: 0;
        border-bottom: 1px solid var(--line-strong);
        padding: 34px 24px;
    }

    #security .security-title { font-size: 1.7rem; }
    .security-graphic { min-height: 430px; padding: 24px 16px; }
    .security-radar { width: 72%; }
}

@media (max-width: 768px) {
    .security-section { padding: 60px 0; }

    .security-container::before,
    .security-container::after {
        left: -1200px;
        right: -1200px;
    }
}

@media (max-width: 480px) {
    .security-section { padding: 45px 0; }

    #security .section-header {
        margin-bottom: 26px !important;
        padding: 18px 16px !important;
    }

    #security .section-header::before {
        left: -1200px !important;
        right: -1200px !important;
    }

    .security-content { padding: 26px 16px; }
    .security-consult-box { margin-top: 22px; }
    #security .security-title { font-size: 1.35rem; letter-spacing: -0.5px; }
    .security-desc { font-size: 0.88rem; }

    .security-graphic { min-height: 360px; padding: 18px 10px; }
    .security-radar { width: 76%; }

    .radar-hud { font-size: 0.46rem; letter-spacing: 0.8px; }
    .hud-dash { width: 12px; margin-bottom: 6px; }
    .hud-row { gap: 10px; }
    .hud-dots { display: none; }
}
