/* ==========================================================================
   Стили блоков (stekspb-стиль)
   ========================================================================== */

/* ---- Hero (тёмный баннер, как у stekspb) ---- */
.block-hero {
    position: relative;
    background: linear-gradient(135deg, #1c1c2e 0%, #31314f 100%);
    min-height: 560px;
    display: flex;
    align-items: center;
    padding-top: calc(var(--header-h) + 40px);
    padding-bottom: 80px;
    overflow: hidden;
}
body.dark-mode .block-hero { background: #0e0f1a; }
.block-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 100% 20%, rgba(161, 44, 76, 0.15) 0%, transparent 60%);
    pointer-events: none;
}
.hero-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 60px;
    align-items: center;
    position: relative;
    z-index: 1;
}
.hero-eyebrow {
    display: inline-block;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--sidebar-text);
    background: rgba(255, 255, 255, 0.07);
    padding: 8px 16px;
    border-radius: var(--radius-pill);
    margin-bottom: 28px;
}
.hero-eyebrow i { color: var(--accent); }
.hero-title {
    font-size: clamp(2.6rem, 6vw, 5rem);
    line-height: 1.05;
    color: #ffffff;
    margin-bottom: 24px;
}
.hero-subtitle {
    color: rgba(255, 255, 255, 0.8);
    font-size: clamp(1.05rem, 1.6vw, 1.25rem);
    max-width: 560px;
    margin-bottom: 36px;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 40px; }
.hero-stats { display: flex; gap: 44px; }
.stat { display: flex; flex-direction: column; }
.stat-num { font-family: var(--font-display); font-size: 2rem; font-weight: 800; color: #fff; line-height: 1; }
.stat-label { font-size: 0.85rem; color: rgba(255, 255, 255, 0.7); margin-top: 4px; }

/* Hero 3D-сцена (без изменений, только цвета подстроены) */
.hero-3d-scene { position: relative; width: 100%; height: 460px; perspective: 1200px; pointer-events: none; user-select: none; }
.server-rack { position: absolute; right: 10%; bottom: 0; width: 150px; height: 330px; transform-style: preserve-3d; transform: rotateY(-18deg) rotateX(2deg); animation: rackFloat 6s ease-in-out infinite; }
@keyframes rackFloat { 0%, 100% { transform: rotateY(-18deg) rotateX(2deg) translateY(0); } 50% { transform: rotateY(-18deg) rotateX(2deg) translateY(-8px); } }
.rack-body { position: relative; width: 100%; height: 100%; background: linear-gradient(180deg, #2a3346 0%, #1a2233 50%, #111827 100%); border-radius: 6px; border: 1px solid rgba(255,255,255,0.08); box-shadow: 0 20px 60px rgba(0,0,0,0.5); overflow: hidden; }
.rack-top-grill { height: 22px; background: repeating-linear-gradient(90deg,rgba(255,255,255,0.03) 0px,rgba(255,255,255,0.03) 3px,transparent 3px,transparent 6px); border-bottom: 1px solid rgba(255,255,255,0.05); }
.rack-unit { height: 28px; margin: 2px 8px; background: linear-gradient(90deg,#1e293b 0%,#2a3649 50%,#1e293b 100%); border-radius: 3px; border: 1px solid rgba(255,255,255,0.06); display: flex; align-items: center; padding: 0 6px; gap: 4px; overflow: hidden; }
.rack-unit::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg,transparent 0%,rgba(59,130,246,0.06) 50%,transparent 100%); animation: unitSweep 4s ease-in-out infinite; }
@keyframes unitSweep { 0% { opacity: 0; transform: translateX(-100%); } 50% { opacity: 1; } 100% { opacity: 0; transform: translateX(100%); } }
.rack-unit.blank { background: linear-gradient(90deg,#141c2c,#1a2337,#141c2c); }
.rack-unit.blank::after { display: none; }
.unit-led { width: 5px; height: 5px; border-radius: 50%; flex-shrink: 0; }
.unit-led.green { background: #22c55e; box-shadow: 0 0 6px rgba(34,197,94,0.6); animation: ledPulse 2s ease-in-out infinite; }
.unit-led.blue { background: #3b82f6; box-shadow: 0 0 6px rgba(59,130,246,0.5); animation: ledPulse 2.5s ease-in-out infinite; }
.unit-led.orange { background: #f59e0b; box-shadow: 0 0 6px rgba(245,158,11,0.4); animation: ledPulse 3s ease-in-out infinite; }
.unit-led.slow { animation-delay: 1s; }
@keyframes ledPulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }
.laptop { position: absolute; right: 26%; bottom: 12px; width: 200px; transform-style: preserve-3d; transform: rotateY(-8deg) rotateX(4deg); animation: laptopFloat 5s ease-in-out infinite; }
@keyframes laptopFloat { 0%, 100% { transform: rotateY(-8deg) rotateX(4deg) translateY(0); } 50% { transform: rotateY(-8deg) rotateX(4deg) translateY(-4px); } }
.laptop-screen { width: 100%; height: 130px; background: linear-gradient(135deg,#0f172a,#1e293b); border-radius: 8px 8px 0 0; border: 2px solid #475569; border-bottom: none; position: relative; overflow: hidden; box-shadow: 0 8px 24px rgba(0,0,0,0.4); }
.laptop-screen::before { content: ''; position: absolute; top: 4px; left: 50%; transform: translateX(-50%); width: 6px; height: 3px; background: #1e293b; border-radius: 0 0 2px 2px; }
.laptop-screen::after { content: ''; position: absolute; top: -50%; left: -50%; width: 200%; height: 200%; background: linear-gradient(135deg,transparent 40%,rgba(255,255,255,0.03) 45%,rgba(255,255,255,0.06) 50%,transparent 55%); animation: screenGlare 8s ease-in-out infinite; }
@keyframes screenGlare { 0%, 100% { transform: translateX(-30%) translateY(-20%); } 50% { transform: translateX(30%) translateY(20%); } }
.zabbix-screen {
    position: absolute;
    top: 12px; left: 10px; right: 10px; bottom: 10px;
    background: #0a0f1a;
    border-radius: 4px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* --- Дашборд Zabbix --- */
.zbx-head {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 5px 8px;
    background: #101827;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    flex-shrink: 0;
}
.zbx-dot { width: 6px; height: 6px; border-radius: 50%; }
.zbx-dot.r { background: #f87171; }
.zbx-dot.y { background: #fbbf24; }
.zbx-dot.g { background: #34d399; }
.zbx-title {
    margin-left: auto;
    font-family: var(--font-mono);
    font-size: 7px;
    letter-spacing: 0.06em;
    color: #7dd3fc;
}
.zbx-body { flex: 1; padding: 6px 8px; display: flex; flex-direction: column; gap: 5px; }
.zbx-row { display: flex; align-items: center; gap: 6px; }
.zbx-host {
    font-family: var(--font-mono);
    font-size: 7px;
    color: #e2e8f0;
    width: 52px;
    flex-shrink: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.zbx-bar {
    flex: 1;
    height: 5px;
    background: rgba(255, 255, 255, 0.07);
    border-radius: 2px;
    overflow: hidden;
    position: relative;
}
.zbx-bar i {
    display: block;
    height: 100%;
    border-radius: 2px;
    background: linear-gradient(90deg, #2563eb, #06b6d4);
    animation: zbxBar 3s ease-in-out infinite;
    transform-origin: left;
}
.zbx-row:nth-child(1) .zbx-bar i { animation-delay: 0s; }
.zbx-row:nth-child(2) .zbx-bar i { animation-delay: 0.6s; }
.zbx-row:nth-child(3) .zbx-bar i { animation-delay: 1.2s; }
.zbx-row:nth-child(4) .zbx-bar i { animation-delay: 1.8s; }
.zbx-row:nth-child(5) .zbx-bar i { animation-delay: 2.4s; }
@keyframes zbxBar {
    0%, 100% { transform: scaleX(1); opacity: 1; }
    50% { transform: scaleX(0.6); opacity: 0.75; }
}
.zbx-status {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}
.zbx-status.ok { background: #22c55e; box-shadow: 0 0 5px rgba(34, 197, 94, 0.7); animation: ledPulse 1.6s ease-in-out infinite; }
.zbx-status.warn { background: #f59e0b; box-shadow: 0 0 5px rgba(245, 158, 11, 0.7); animation: ledPulse 0.9s ease-in-out infinite; }
.zbx-foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    flex-shrink: 0;
    font-family: var(--font-mono);
    font-size: 6px;
    color: #64748b;
}
.zbx-problems { color: #34d399; }
.laptop-base { width: 100%; height: 16px; background: linear-gradient(180deg,#334155,#1e293b); border-radius: 0 0 6px 6px; border: 2px solid #475569; border-top: 1px solid #475569; position: relative; box-shadow: 0 6px 20px rgba(0,0,0,0.3); }
.laptop-base::after { content: ''; position: absolute; bottom: 3px; left: 50%; transform: translateX(-50%); width: 28px; height: 6px; background: #1e293b; border-radius: 2px; border: 1px solid #475569; }
.desk-surface { position: absolute; right: 0; bottom: 0; width: 60%; height: 20px; background: linear-gradient(180deg,#2d3748,#1a2332); border-radius: 4px 4px 0 0; box-shadow: 0 -2px 10px rgba(0,0,0,0.3); }
.floor-shadow { position: absolute; right: 8%; bottom: -8px; width: 55%; height: 18px; background: radial-gradient(ellipse,rgba(0,0,0,0.3) 0%,transparent 70%); }

/* ---- Marquee ---- */
.block-marquee {
    padding: 24px 0 !important;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    background: var(--bg-soft);
    overflow: hidden;
}
.marquee { overflow: hidden; }
.marquee-track {
    display: flex;
    gap: 44px;
    width: max-content;
    animation: marquee 30s linear infinite;
    white-space: nowrap;
}
@keyframes marquee {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}
.marquee-item {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
}
.marquee-sep { color: var(--accent); font-size: 1rem; }

/* ---- Text ---- */
.block-text { background: var(--bg); }
.block-text-inner { max-width: 820px; }
.block-text h2 { margin-top: 1.6em; color: var(--accent-2); }
.block-text p { font-size: 1.05rem; }

/* ---- Calculator ---- */
.block-calculator { background: var(--bg-soft); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.calculator-grid { max-width: 680px; margin: 0 auto; }
.calculator-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 44px;
    box-shadow: var(--shadow-md);
}
.calc-title { text-align: center; margin-bottom: 30px; }
.calc-group { margin-bottom: 24px; }
.calc-label { display: block; font-size: 0.92rem; font-weight: 600; color: var(--text-muted); margin-bottom: 10px; }
.calc-label b { color: var(--accent-2); font-size: 1.1rem; }
.seg-control { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 4px; }
.seg-btn { padding: 10px; border: none; border-radius: calc(var(--radius) - 2px); background: transparent; color: var(--text-muted); font-family: var(--font-sans); font-weight: 600; cursor: pointer; transition: all 0.2s ease; }
.seg-btn.active { background: var(--accent); color: #fff; }
.calc-slider { margin-bottom: 24px; }
.range { width: 100%; appearance: none; height: 4px; border-radius: 2px; background: var(--surface-3); outline: none; cursor: pointer; }
.range::-webkit-slider-thumb { appearance: none; width: 18px; height: 18px; border-radius: 50%; background: var(--accent); cursor: pointer; border: 2px solid #fff; box-shadow: 0 0 8px rgba(var(--accent-rgb), 0.35); }
.calc-check { display: flex; gap: 10px; align-items: center; font-size: 0.92rem; color: var(--text-muted); margin-bottom: 10px; cursor: pointer; }
.calc-check input { accent-color: var(--accent); width: 16px; height: 16px; }
.calc-result { display: flex; align-items: baseline; gap: 8px; margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--border); }
.calc-result-label { font-size: 1.1rem; color: var(--text-muted); }
.calc-total { font-family: var(--font-display); font-size: 2.4rem; font-weight: 800; color: var(--accent-2); }
.calc-result-unit { color: var(--text-muted); }
.calc-note { font-size: 0.82rem; color: var(--text-faint); margin: 14px 0 0; display: flex; gap: 6px; align-items: flex-start; }

/* Адаптивность hero */
@media (max-width: 991.98px) {
    .hero-grid { grid-template-columns: 1fr; gap: 40px; }
    .hero-visual { display: none; }
    .block-hero { min-height: auto; }
}
/* Hero без 3D-сцены — одна колонка */
.hero-plain .hero-grid { grid-template-columns: 1fr; max-width: 900px; }