/* ============================================
   Стили для страницы услуг
   ============================================ */

.services-hero {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 1.5rem 2rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px var(--shadow-color);
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.services-hero h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 0.25rem;
}

.services-hero h1 i {
    color: var(--link-color);
}

.services-hero p {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 0;
}

.service-card {
    background: var(--card-bg);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px var(--shadow-color);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    margin: 0 auto;
    border: 1px solid var(--card-border);
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px var(--shadow-color-hover);
}

.service-image {
    width: 100%;
    object-fit: cover;
    border-bottom: 2px solid var(--border-color);
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.service-image:hover {
    opacity: 0.85;
}

.service-content {
    padding: 0.75rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.service-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.4rem;
    line-height: 1.3;
}

.service-description {
    color: var(--text-muted);
    line-height: 1.4;
    flex-grow: 1;
    font-size: 0.75rem;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--card-bg);
    border-radius: 12px;
    box-shadow: 0 2px 4px var(--shadow-color);
    border: 1px solid var(--card-border);
}

.empty-state i {
    font-size: 4rem;
    color: var(--border-color);
    margin-bottom: 1rem;
}

.empty-state h3 {
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: var(--text-muted);
}

.category-section {
    margin-bottom: 3rem;
}

.category-header {
    text-align: center;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--border-color);
}

.category-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 0.4rem;
}

.category-description {
    color: var(--text-muted);
    font-size: 0.9rem;
    max-width: 700px;
    margin: 0 auto;
}

.section-divider {
    height: 1px;
    background: var(--border-color);
    margin: 2rem 0;
}

/* ============================================
   Image Lightbox Modal with Zoom
   ============================================ */

.image-lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    padding: 0;
    box-sizing: border-box;
}

.image-lightbox.active {
    display: flex;
}

.image-lightbox-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    box-sizing: border-box;
}

.image-lightbox-img-container {
    position: relative;
    overflow: hidden;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    flex: 1;
}

.image-lightbox-img {
    max-width: none;
    max-height: none;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
    transition: transform 0.15s ease, opacity 0.2s ease;
    transform-origin: center center;
    user-select: none;
    -webkit-user-drag: none;
}

.image-lightbox-img.loading {
    opacity: 0;
    visibility: hidden;
}

/* Отключаем transition при начальной загрузке */
.image-lightbox-img.no-transition {
    transition: none !important;
}

.image-lightbox-img.zoomed {
    cursor: grab;
}

.image-lightbox-img.dragging {
    cursor: grabbing;
    transition: none;
}

.image-lightbox-close {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.6);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.75rem;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    opacity: 0.9;
    transition: all 0.2s ease;
    z-index: 10001;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.image-lightbox-close:hover {
    opacity: 1;
    background: rgba(0, 0, 0, 0.8);
    border-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.1);
}

/* Zoom controls - below image */
.image-lightbox-zoom {
    position: relative;
    display: flex;
    gap: 0.5rem;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.5);
    padding: 0.4rem 0.75rem;
    border-radius: 20px;
    margin-top: 1rem;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
}

.image-lightbox-zoom-btn {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: white;
    font-size: 1.1rem;
    cursor: pointer;
    padding: 0.35rem 0.5rem;
    border-radius: 6px;
    opacity: 0.9;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-lightbox-zoom-btn:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.3);
}

.image-lightbox-zoom-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.image-lightbox-zoom-level {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.8rem;
    min-width: 45px;
    text-align: center;
    font-weight: 500;
}

/* Image caption */
.image-lightbox-caption {
    background: rgba(0, 0, 0, 0.5);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-top: 1rem;
    text-align: center;
    max-width: 90%;
}

.image-lightbox-caption h5 {
    margin: 0 0 0.25rem 0;
    font-size: 0.9rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
}

.image-lightbox-caption p {
    margin: 0;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.3;
}

/* ============================================
   Адаптивность
   ============================================ */

@media (max-width: 768px) {
    .services-hero {
        padding: 1.25rem 1.5rem;
        margin-bottom: 1.25rem;
    }
    
    .services-hero h1 {
        font-size: 1.5rem;
    }
    
    .services-hero p {
        font-size: 0.875rem;
    }
    
    .service-content {
        padding: 0.6rem;
    }
    
    .service-title {
        font-size: 0.8rem;
        margin-bottom: 0.3rem;
    }
    
    .service-description {
        font-size: 0.7rem;
        -webkit-line-clamp: 2;
    }
    
    .category-section {
        margin-bottom: 2rem;
    }
    
    .category-header {
        margin-bottom: 1rem;
    }
    
    .category-title {
        font-size: 1.2rem;
    }
    
    .category-description {
        font-size: 0.85rem;
    }
    
    .image-lightbox-zoom {
        padding: 0.3rem 0.5rem;
        margin-top: 0.75rem;
    }
    
    .image-lightbox-zoom-btn {
        font-size: 1rem;
        padding: 0.3rem 0.4rem;
    }
    
    .image-lightbox-close {
        top: 10px;
        right: 10px;
        width: 40px;
        height: 40px;
        font-size: 1.25rem;
        padding: 0.5rem;
    }
    
    .image-lightbox-img-container {
        height: calc(100vh - 200px);
    }
    
    .image-lightbox-caption {
        padding: 0.5rem 0.75rem;
        margin-top: 0.75rem;
    }
    
    .image-lightbox-caption h5 {
        font-size: 0.85rem;
    }
    
    .image-lightbox-caption p {
        font-size: 0.75rem;
    }
}

@media (max-width: 576px) {
    .service-content {
        padding: 0.5rem;
    }
    
    .service-title {
        font-size: 0.75rem;
    }
    
    .service-description {
        font-size: 0.65rem;
    }
}

