:root {
    --bg-main: #050919;
    --bg-card: #11152a;
    --bg-card-soft: #1b2140;
    --accent: #4fd1ff;
    --accent-soft: #2f80ff;
    --text-main: #ffffff;
    --text-muted: #c8cde8;
    --radius-lg: 24px;
    --shadow-soft: 0 22px 40px rgba(0,0,0,0.45);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html {
    width: 100%;
    min-height: 100%;
    overflow-x: hidden;
    background: #050919;
}
body {
    width: 100%;
    min-height: 100vh;
    min-height: 100svh;
    overflow-x: hidden;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background-color: #050919;
    background: radial-gradient(circle at top, #1b2750 0, #050919 55%, #02030a 100%);
    color: var(--text-main);
    line-height: 1.5;
}
.page {
    max-width: 1120px;
    margin: 0 auto;
    padding: 40px 16px 80px;
}
.breadcrumbs {
    margin: 0 0 26px;
    font-size: 14px;
}
.breadcrumbs ol {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    list-style: none;
}
.breadcrumbs li {
    display: flex;
    align-items: center;
    padding-left: 0;
    margin-bottom: 0;
    color: var(--text-muted);
}
.breadcrumbs li::before {
    content: none;
}
.breadcrumbs li:not(:last-child)::after {
    content: ">";
    margin-left: 6px;
    color: rgba(200, 205, 232, 0.55);
}
.breadcrumbs a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.18s ease;
}
.breadcrumbs a:hover {
    color: #ffffff;
}
.breadcrumbs li:last-child span {
    color: var(--text-muted);
}
h1, h2, h3 { font-weight: 700; }
h1 {
    text-align: center;
    font-size: 32px;
    margin-bottom: 16px;
}
.subtitle {
    text-align: center;
    color: var(--text-muted);
    max-width: 640px;
    margin: 0 auto 40px;
    font-size: 15px;
}
.grid-2 {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    gap: 32px;
    align-items: stretch;
    margin-bottom: 48px;
}
.card {
    background: linear-gradient(135deg, #11152a, #171b36);
    border-radius: var(--radius-lg);
    padding: 24px 24px 28px;
    box-shadow: var(--shadow-soft);
    position: relative;
    overflow: hidden;
}
.card::before {
    content: "";
    position: absolute;
    inset: -40%;
    background: radial-gradient(circle at top left,
    rgba(79,209,255,0.12) 0,
    transparent 55%);
    opacity: 0.9;
    pointer-events: none;
}
.card h2 {
    font-size: 20px;
    margin-bottom: 12px;
    position: relative;
    z-index: 1;
}
.card p {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 8px;
    position: relative;
    z-index: 1;
}
.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    background:
        linear-gradient(#121a34, #121a34) padding-box,
        linear-gradient(115deg, rgba(79,209,255,0.68), rgba(94,96,255,0.5), rgba(79,209,255,0.68)) border-box;
    border: 1px solid transparent;
    color: #8fe4ff;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 10px;
    position: relative;
    z-index: 1;
    overflow: hidden;
    isolation: isolate;
    box-shadow: 0 8px 22px rgba(14, 23, 53, 0.34), inset 0 1px 0 rgba(255,255,255,0.05);
    background-size: 100% 100%, 220% 100%;
    animation: badge-border-flow 7s ease-in-out infinite;
}
.badge::after {
    content: "";
    position: absolute;
    top: -80%;
    bottom: -80%;
    left: -36%;
    width: 26%;
    z-index: -1;
    background: linear-gradient(90deg, transparent, rgba(123, 221, 255, 0.2), transparent);
    transform: skewX(-18deg);
    animation: badge-scan 6.8s cubic-bezier(0.45, 0, 0.2, 1) infinite;
}
.badge-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #65dcff;
    box-shadow: 0 0 8px rgba(101, 220, 255, 0.72);
    animation: badge-dot-orbit 4.2s ease-in-out infinite;
}
@keyframes badge-border-flow {
    0%, 100% { background-position: 0 0, 0% 50%; }
    50% { background-position: 0 0, 100% 50%; }
}
@keyframes badge-scan {
    0%, 50% { left: -36%; opacity: 0; }
    58% { opacity: 1; }
    78%, 100% { left: 116%; opacity: 0; }
}
@keyframes badge-dot-orbit {
    0%, 100% {
        transform: scale(0.9);
        box-shadow: 0 0 7px rgba(101, 220, 255, 0.55);
    }
    50% {
        transform: scale(1.15);
        box-shadow: 0 0 13px rgba(101, 220, 255, 0.9);
    }
}
ul {
    list-style: none;
    margin: 6px 0;
    padding-left: 0;
    position: relative;
    z-index: 1;
}
li {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 4px;
    position: relative;
    padding-left: 14px;
}
li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 7px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--accent-soft));
    opacity: 0.9;
}
.mock-visual {
    position: relative;
    height: 250px;
    border-radius: 20px;
    /* background: radial-gradient(circle at 10% 20%, #2f80ff 0, #25c4ff 22%, #192642 60%, #11152a 100%);*/
    box-shadow: 0 18px 34px rgba(0,0,0,0.45);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    z-index: 1;
}

.device-caption {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    text-align: center;
}

.device-figure {
    margin: 0 0 1.5rem;
}

.mock-visual img{
    width: 100%;
    height: auto;
    object-fit: contain;  /* вся картинка внутри блока без обрезки */
    cursor: zoom-in;
    transition: transform 0.35s ease, filter 0.35s ease;
}
.mock-visual:hover img {
    transform: scale(1.025);
    filter: brightness(1.05);
}
.mock-visual-caption {
    font-size: 11px;
    color: rgba(255,255,255,0.75);
}
.faq-group {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    gap: 32px;
    margin-top: 48px;
}
.faq-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.faq-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* faq-item теперь колонка, не строка */
.faq-item {
    background: linear-gradient(145deg, #202945, #19213a);
    color: #edf2ff;
    border: 1px solid rgba(130, 153, 213, 0.2);
    border-radius: 16px;
    padding: 12px 14px;
    box-shadow: 0 10px 24px rgba(0,0,0,0.2), inset 0 1px 0 rgba(255,255,255,0.025);
    cursor: pointer;
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.faq-item:hover {
    transform: translateY(-1px);
    border-color: rgba(111, 190, 255, 0.38);
    box-shadow: 0 14px 30px rgba(0,0,0,0.26), 0 0 0 1px rgba(79,209,255,0.04);
}
.faq-item.active {
    background: linear-gradient(145deg, #253154, #1c2747);
    border-color: rgba(105, 195, 255, 0.48);
    box-shadow: 0 16px 34px rgba(0,0,0,0.28), 0 0 24px rgba(66, 132, 255, 0.07);
}

.faq-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.faq-question {
    color: #f4f7ff;
    font-size: 13px;
    font-weight: 650;
    line-height: 1.4;
}


.faq-body li{
    color: #cbd5ef;
}
.faq-body,
.faq-body p,
.faq-body li {
    color: #cbd5ef;
}

/* Иконка-стрелка */
.faq-icon {
    width: 30px;
    height: 30px;
    border-radius: 9px;
    border: 1px solid rgba(120, 174, 255, 0.28);
    background: rgba(81, 112, 181, 0.2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0;
    color: #a9dfff;
    flex-shrink: 0;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
    transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1), background 0.25s ease, border-color 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
}

/* Рисуем стрелку через псевдоэлемент */
.faq-icon::before {
    content: "";
    width: 7px;
    height: 7px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: translateY(-2px) rotate(45deg);
}

/* При раскрытии блока стрелка поворачивается вверх */
.faq-item.active .faq-icon {
    transform: rotate(180deg);
    color: #ffffff;
    border-color: rgba(111, 215, 255, 0.62);
    background: linear-gradient(135deg, rgba(78, 112, 255, 0.72), rgba(46, 181, 232, 0.72));
    box-shadow: 0 8px 18px rgba(37, 125, 231, 0.22);
}

/* Анимация открытия/закрытия текста */
.faq-body {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transform: translateY(-4px);
    border-top: 1px solid transparent;
    transition: max-height 0.38s ease, opacity 0.25s ease, transform 0.38s ease, margin-top 0.38s ease, padding-top 0.38s ease, border-color 0.38s ease;
}

/* Когда у faq-item есть .active — показываем тело */
.faq-item.active .faq-body {
    max-height: 500px;
    opacity: 1;
    transform: translateY(0);
    margin-top: 11px;
    padding-top: 10px;
    border-color: rgba(130, 153, 213, 0.18);
}
.faq-body ul {
    margin: 0;
}
.faq-body li {
    padding-left: 17px;
    margin-bottom: 7px;
    line-height: 1.5;
}
.faq-body li:last-child,
.faq-body p:last-child {
    margin-bottom: 0;
}
.faq-body li::before {
    top: 8px;
    width: 6px;
    height: 6px;
    background: #62c8f4;
    box-shadow: 0 0 0 3px rgba(98, 200, 244, 0.1);
}

.section-card {
    margin-top: 32px;
    background: linear-gradient(135deg, #11152a, #151a34);
    border-radius: 22px;
    padding: 22px 22px 26px;
    box-shadow: var(--shadow-soft);
}
.section-card h2 {
    font-size: 18px;
    margin-bottom: 10px;
}
.section-card h3 {
    font-size: 15px;
    margin-top: 14px;
    margin-bottom: 6px;
}
.section-card p {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 6px;
}
#faq .faq-body,
#faq .faq-body p,
#faq .faq-body li {
    color: #cbd5ef;
}
.connection-scheme {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 16px auto 0;
    max-width: 100%;
}
.connection-scheme img {
    display: block;
    width: min(100%, 720px);
    max-width: 100%;
    height: auto;
    border-radius: 12px;
}
.wiring-layout-with-scheme {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(340px, 1.1fr);
    gap: 24px;
    align-items: start;
}
.wiring-content {
    min-width: 0;
}
.scheme-panel {
    margin: 2px 0 0;
    padding: 14px;
    background: linear-gradient(145deg, #253154, #1c2747);
    border: 1px solid rgba(105, 195, 255, 0.48);
    border-radius: 16px;
    box-shadow: 0 16px 34px rgba(0,0,0,0.28), 0 0 24px rgba(66, 132, 255, 0.07);
}
.scheme-panel figcaption {
    margin-bottom: 10px;
    color: #f4f7ff;
    font-size: 13px;
    font-weight: 700;
    text-align: center;
}
.scheme-panel img {
    width: 100%;
    background: #ffffff;
    border: 0;
    box-shadow: 0 8px 20px rgba(5, 9, 25, 0.18), 0 0 0 1px rgba(255,255,255,0.05);
}
.image-lightbox {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: grid;
    place-items: center;
    padding: max(24px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
    background: rgba(2, 4, 14, 0.88);
    backdrop-filter: blur(10px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}
.image-lightbox.is-open {
    opacity: 1;
    visibility: visible;
}
.image-lightbox img {
    display: block;
    max-width: min(100%, 1040px);
    max-height: calc(100svh - 48px);
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 16px;
    box-shadow: 0 24px 70px rgba(0,0,0,0.55);
    transform: scale(0.96);
    transition: transform 0.25s ease;
}
.image-lightbox.is-open img {
    transform: scale(1);
}
.image-lightbox-close {
    position: fixed;
    top: max(16px, env(safe-area-inset-top));
    right: max(16px, env(safe-area-inset-right));
    width: 42px;
    height: 42px;
    border: 1px solid rgba(255,255,255,0.24);
    border-radius: 50%;
    background: rgba(17,21,42,0.9);
    color: #ffffff;
    font: 300 28px/1 system-ui, sans-serif;
    cursor: pointer;
}
body.lightbox-open {
    overflow: hidden;
}
.schemes-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: 18px;
    margin-top: 14px;
}

.scheme-card {
    background: #171b36;
    border-radius: 18px;
    padding: 10px 12px 14px;
    box-shadow: 0 14px 26px rgba(0,0,0,0.35);
}

.scheme-title {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
}

.scheme-image {
    border-radius: 12px;
    overflow: hidden;
    background: radial-gradient(circle at top, #2f80ff 0, #11152a 60%);
}

.scheme-image img {
    display: block;
    max-width: 100%;
    height: auto;
}

.scheme-caption {
    font-size: 12px;
    color: #c8cde8;
    margin-top: 6px;
}
@media (max-width: 900px) {
    .grid-2,
    .faq-group {
        grid-template-columns: minmax(0,1fr);
    }
    .page {
        padding: 28px 14px 60px;
    }
    .schemes-grid {
        grid-template-columns: minmax(0,1fr);
    }
    .wiring-layout-with-scheme {
        grid-template-columns: minmax(0,1fr);
    }
}
@media (max-width: 480px) {
    .connection-scheme {
        width: 100%;
        margin-top: 12px;
    }
    .connection-scheme img {
        width: 100%;
        border-radius: 10px;
    }
    .mock-visual img{
        height: 100%;
    }
    .mock-visual {
        height: 230px;

    }
}
@media (prefers-reduced-motion: reduce) {
    .badge,
    .badge::after,
    .badge-dot {
        animation: none;
    }
    .mock-visual img,
    .image-lightbox,
    .image-lightbox img {
        transition: none;
    }
}
