/* лицензия и приложения: отдельная полоса во всю ширину */

:root {
    --lic-panel: #eef1ff;
    --lic-paper-shadow: 0 1px 2px rgba(20, 30, 90, 0.08), 0 14px 30px rgba(20, 30, 90, 0.14);
}

[data-theme="dark"] {
    --lic-panel: #232845;
    --lic-paper-shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 14px 30px rgba(0, 0, 0, 0.45);
}

.lic-section {
    background: var(--bg-white);
    padding: 90px 0 100px;
    margin-top: 40px;
    transition: background 0.3s ease;
}

.lic-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 60px;
}

.lic-title {
    margin-bottom: 44px;
}

/* панель с документами */

.lic-panel {
    background: var(--lic-panel);
    border-radius: 26px;
    padding: 40px 44px 32px;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: background 0.3s ease;
}

.lic-carousel {
    position: relative;
}

.lic-track {
    display: flex;
    gap: 22px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 4px;
    scroll-behavior: smooth;
    padding: 4px 4px 10px;
    scrollbar-width: none;
    outline: none;
}

.lic-track::-webkit-scrollbar {
    display: none;
}

.lic-item {
    flex: 0 0 calc((100% - 3 * 22px) / 4);
    scroll-snap-align: start;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.lic-thumb {
    display: block;
    width: 100%;
    aspect-ratio: 793 / 1122;
    padding: 0;
    border: none;
    border-radius: 4px;
    background: #fff;
    overflow: hidden;
    cursor: zoom-in;
    box-shadow: var(--lic-paper-shadow);
}

.lic-thumb:focus-visible {
    outline: 3px solid #4054FF;
    outline-offset: 3px;
}

.lic-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
}

.lic-item figcaption {
    display: flex;
    flex-direction: column;
    gap: 4px;
    line-height: 1.4;
}

.lic-item figcaption strong {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-main);
}

.lic-item figcaption span {
    font-size: 13px;
    color: var(--text-muted);
}

.lic-arrow {
    position: absolute;
    top: 40%;
    transform: translateY(-50%);
    z-index: 2;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: none;
    background: var(--bg-card);
    color: #4054FF;
    font-size: 15px;
    cursor: pointer;
    box-shadow: 0 6px 18px var(--shadow-md);
}

.lic-arrow--prev { left: -20px; }
.lic-arrow--next { right: -20px; }

.lic-arrow[hidden] {
    display: none;
}

.lic-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.lic-dots:not(:empty) {
    margin-top: 18px;
}

.lic-dot {
    width: 9px;
    height: 9px;
    padding: 0;
    border-radius: 50%;
    border: none;
    background: rgba(64, 84, 255, 0.25);
    cursor: pointer;
}

.lic-dot.active {
    background: #4054FF;
}

/* адаптив */

@media (max-width: 1200px) {
    .lic-inner { padding: 0 40px; }
}

@media (max-width: 768px) {
    .lic-section { padding: 70px 0 80px; }
    .lic-inner { padding: 0 30px; }

    .lic-item { flex-basis: calc((100% - 2 * 22px) / 3); }
    .lic-arrow--prev { left: -14px; }
    .lic-arrow--next { right: -14px; }
}

@media (max-width: 600px) {
    .lic-section { padding: 56px 0 64px; margin-top: 20px; }
    .lic-inner { padding: 0 16px; }
    .lic-title { font-size: 28px; margin-bottom: 28px; }
    .lic-panel { padding: 24px 18px 20px; border-radius: 20px; }
    .lic-track { gap: 16px; }
    .lic-item { flex-basis: 72%; scroll-snap-align: center; }
    .lic-arrow { display: none; }
}

/* полноэкранный просмотр */

.lic-lightbox {
    position: fixed;
    inset: 0;
    z-index: 100000;
    background: rgba(10, 12, 20, 0.88);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
    user-select: none;
}

.lic-lightbox.open {
    opacity: 1;
    visibility: visible;
}

body.lic-lock {
    overflow: hidden;
}

.lic-lb-stage {
    position: relative;
    max-width: calc(100vw - 200px);
    max-height: calc(100vh - 110px);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lic-lb-img {
    display: block;
    max-width: calc(100vw - 200px);
    max-height: calc(100vh - 110px);
    object-fit: contain;
    background: #fff;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    transform: scale(0.96);
    transition: transform 0.3s ease, opacity 0.2s ease;
    cursor: zoom-in;
}

.lic-lightbox.open .lic-lb-img {
    transform: scale(1);
}

.lic-lightbox.zoomed .lic-lb-img {
    transform: scale(2.2);
    cursor: zoom-out;
    transition: transform 0.3s ease;
}

.lic-lb-img.switching {
    opacity: 0;
}

.lic-lb-counter {
    position: absolute;
    top: 14px;
    left: 18px;
    color: #fff;
    font-size: 15px;
    font-weight: 500;
    opacity: 0.9;
}

.lic-lb-tools {
    position: absolute;
    top: 6px;
    right: 10px;
    display: flex;
    gap: 4px;
}

.lic-lb-btn {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: #fff;
    font-size: 19px;
    cursor: pointer;
    text-decoration: none;
    opacity: 0.85;
    transition: opacity 0.2s ease, background 0.2s ease;
}

.lic-lb-btn:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.12);
}

.lic-lb-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 56px;
    height: 56px;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: #fff;
    font-size: 26px;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.2s ease, background 0.2s ease;
}

.lic-lb-nav:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.12);
}

.lic-lb-nav--prev { left: 24px; }
.lic-lb-nav--next { right: 24px; }

.lic-lb-caption {
    position: absolute;
    bottom: 14px;
    left: 50%;
    transform: translateX(-50%);
    max-width: 90vw;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    text-align: center;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
}

.lic-lightbox.single .lic-lb-nav,
.lic-lightbox.single .lic-lb-counter {
    display: none;
}

@media (max-width: 768px) {
    .lic-lb-stage,
    .lic-lb-img {
        max-width: 100vw;
        max-height: calc(100vh - 130px);
    }

    .lic-lb-nav {
        top: auto;
        bottom: 40px;
        transform: none;
        width: 46px;
        height: 46px;
        font-size: 22px;
    }

    .lic-lb-nav--prev { left: 12px; }
    .lic-lb-nav--next { right: 12px; }

    .lic-lb-caption {
        bottom: 54px;
        max-width: calc(100vw - 130px);
        font-size: 13px;
    }

    .lic-lb-btn[data-act="fullscreen"] {
        display: none;
    }
}

.lic-lb-btn[hidden] {
    display: none;
}
