/* ===== БЛОК ЛИЦЕНЗИЙ НА ГЛАВНОЙ ===== */
.licenses-preview {
    padding: 70px 0;
    background: #fff;
}

.licenses-preview__header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 40px;
}

.licenses-preview__header-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.licenses-preview__title {
    font-size: 32px;
    font-weight: 700;
    color: #2c3e50;
    margin: 0 0 10px;
    text-align: center;
}

.licenses-preview__subtitle {
    font-size: 16px;
    color: #666;
    margin: 0 auto 15px;
    max-width: 600px;
    text-align: center;
}

.licenses-preview__all-link {
    color: #019934;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: color 0.3s;
}

.licenses-preview__all-link:hover {
    color: #017a29;
}

/* Сетка */
.licenses-preview__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

/* Карточка страницы */
.license-page-card {
    background: #fff;
    border: 1px solid #e1e1e1;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
}

.license-page-card:hover {
    transform: translateY(-4px);
    border-color: #019934;
    box-shadow: 0 8px 25px rgba(1, 153, 52, 0.15);
}

/* Изображение */
.license-page-card__image {
    position: relative;
    aspect-ratio: 0.71;
    overflow: hidden;
    background: #f8f9fa;
}

.license-page-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.license-page-card:hover .license-page-card__image img {
    transform: scale(1.05);
}

.license-page-card__overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(1, 153, 52, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    opacity: 0;
    transition: opacity 0.3s ease;
    color: #fff;
    font-size: 14px;
    font-weight: 500;
}

.license-page-card:hover .license-page-card__overlay {
    opacity: 1;
}

/* Информация */
.license-page-card__info {
    padding: 15px;
    text-align: center;
}

.license-page-card__page {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #019934;
    margin-bottom: 4px;
}

.license-page-card__desc {
    display: block;
    font-size: 13px;
    color: #666;
    line-height: 1.4;
}

/* Кнопка */
.licenses-preview__footer {
    text-align: center;
    margin-top: 35px;
}

.licenses-preview__btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 32px;
    background: #019934;
    color: #fff;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.3s ease;
}

.licenses-preview__btn:hover {
    background: #017a29;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(1, 153, 52, 0.3);
}

/* ===== ЛАЙТБОКС ===== */
.license-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.license-lightbox.active {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
}

.license-lightbox__overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.92);
}

.license-lightbox__container {
    position: relative;
    z-index: 2;
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: lightboxIn 0.3s ease;
}

@keyframes lightboxIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

/* Кнопка закрытия */
.license-lightbox__close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.license-lightbox__close:hover {
    background: #e74c3c;
    transform: rotate(90deg);
}

/* Навигация */
.license-lightbox__prev,
.license-lightbox__next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.license-lightbox__prev {
    left: 12px;
}

.license-lightbox__next {
    right: 12px;
}

.license-lightbox__prev:hover,
.license-lightbox__next:hover {
    background: #019934;
}

/* Контент */
.license-lightbox__content {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    background: #f8f9fa;
    min-height: 400px;
    max-height: 65vh;
    overflow: hidden;
}

.license-lightbox__image {
    max-width: 100%;
    max-height: 60vh;
    object-fit: contain;
    border-radius: 4px;
    transition: opacity 0.3s ease;
}

.license-lightbox__loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 3px solid #f0f0f0;
    border-top-color: #019934;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    display: none;
}

@keyframes spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Информация */
.license-lightbox__info {
    padding: 20px 30px;
    border-top: 1px solid #e1e1e1;
    text-align: center;
}

.license-lightbox__counter {
    font-size: 13px;
    color: #999;
    margin-bottom: 6px;
}

.license-lightbox__title {
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    margin: 0 0 4px;
}

.license-lightbox__desc {
    font-size: 14px;
    color: #666;
    margin: 0;
}

/* ===== АДАПТИВНОСТЬ ===== */
@media (max-width: 1024px) {
    .licenses-preview__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .licenses-preview {
        padding: 50px 0;
    }
    
    .licenses-preview__header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .licenses-preview__title {
        font-size: 26px;
    }
    
    .license-lightbox__content {
        padding: 20px;
        min-height: 300px;
    }
    
    .license-lightbox__prev,
    .license-lightbox__next {
        width: 36px;
        height: 36px;
    }
}

@media (max-width: 480px) {
    .licenses-preview__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .license-page-card__info {
        padding: 10px;
    }
    
    .license-lightbox__container {
        width: 100%;
        height: 100%;
        max-height: 100vh;
        border-radius: 0;
    }
    
    .license-lightbox__content {
        flex: 1;
        max-height: 55vh;
    }
}