

.services-header {
  text-align: center;
  margin: 3rem auto 2rem;
  padding: 2rem 0 0 0;
}

.title-header {
  text-align: center;
  margin: 1rem auto 1rem;
}

.services-header h1 {
  font-family: var(--font-main);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--color-primary);
  text-transform: uppercase;
  margin: 0;
  position: relative;
  display: inline-block;
}

.services-header h2 {
  font-family: var(--font-main);
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--color-primary);
  text-transform: uppercase;
  margin: 0;
  position: relative;
  display: inline-block;
}

.title-header h3 {
  font-family: var(--font-main);
  font-size: 1.5rem;
  font-weight: 300;
  color: var(--color-primary);
  text-transform: uppercase;
  margin: 0;
  position: relative;
  display: inline-block;
}

/* Контейнер сетки */
.container_service {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  width: 90%;
  max-width: 1400px;
  margin: 0 auto 4rem;
  padding: 2rem 0;
}

/* Карточка услуги */
.service-card {
  background: white;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.1);
  transition: all 0.4s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.service-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.15);
}

/* Изображение услуги */
.service-image {
  width: 100%;
  height: 250px;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.service-card:hover .service-image {
  transform: scale(1.05);
}

/* Информация об услуге */
.service-info {
  padding: 1.5rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.service-title {
  font-family: var(--font-main);
  font-size: 2rem;
  font-weight: 600;
  color: var(--color-primary);
  margin: 0 0 1rem 0;
  line-height: 1.3;
  text-align: center;
}

/* Адаптивность */
@media (max-width: 1200px) {
  .container_service {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.2rem;
  }
  
  .services-header h1 {
    font-size: 2.2rem;
  }
}

@media (max-width: 768px) {
  .container_service {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    width: 95%;
  }
  
  .services-header h1 {
    font-size: 1.8rem;
  }
  
  .service-image {
    height: 180px;
  }
}

@media (max-width: 480px) {
  .container_service {
    grid-template-columns: 1fr;
    gap: 0.8rem;
    max-width: 400px;
  }
  
  .services-header {
    margin: 2rem auto 1.5rem;
  }
  
  .services-header h1 {
    font-size: 1.5rem;
  }
  
  .service-title {
    font-size: 1.1rem;
  }
}

/* Анимации */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.service-card {
  animation: fadeInUp 0.6s ease-out;
}

/* Задержки для анимации карточек */
.service-card:nth-child(1) { animation-delay: 0.1s; }
.service-card:nth-child(2) { animation-delay: 0.2s; }
.service-card:nth-child(3) { animation-delay: 0.3s; }
.service-card:nth-child(4) { animation-delay: 0.4s; }
.service-card:nth-child(5) { animation-delay: 0.5s; }

/* Декоративные элементы */
.service-card::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(45deg, #605a53, #5a5151, #625d56);
  border-radius: 18px;
  z-index: -1;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.service-card:hover::before {
  opacity: 0.3;
}

.container_subservice {
            display: flex;
            flex-wrap: wrap;
            justify-content: center;
            gap: 30px;
            margin-bottom: 60px;
        }
        
        .subservice-card {
            background: white;
            overflow: hidden;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
            transition: transform 0.3s ease, box-shadow 0.3s ease;
            max-width: 1200px;
            width: 100%;
            padding: 30px;
        }
        

        .subservice-card-no-ti {
            font-family: var(--font-main);
            font-weight: lighter;
            font-size: 1.5rem;
            line-height: 1;
            color: #444;
            text-align: justify;
        }

        .subservice-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
        }
        

        .subservice-image {
            width: 100%;
            height: 350px;
            object-fit: cover;
            display: block;
            border-radius: 8px;
            margin-bottom: 25px;
        }
        
        .subservice-text {
            font-family: var(--font-main);
            font-weight: lighter;
            font-size: 1.5rem;
            line-height: 1;
            color: #444;
            text-align: justify;
            text-indent: 25px;
        }
        .subservice-text-right {
            font-family: var(--font-main);
            font-weight: lighter;
            font-size: 1.5rem;
            line-height: 1;
            color: #444;
            text-align: right;
            text-indent: 25px;
        }
 
p {
    margin-top: 0; /* Отступ сверху */
    margin-bottom: 0; /* Отступ снизу */
   }
        
        
        
        
        
        
        
     

/* Базовые адаптивные стили для изображений */
.photo-frame-left, .photo-frame-right {
    margin: 20px 0;
    max-width: 100%;
}

.photo-frame-left img, .photo-frame-right img {
    width: 100%;
    height: auto;
    display: block;
}

.photo-frame-left figcaption, .photo-frame-right figcaption {
    text-align: center;
    font-style: italic;
    color: #666;
    margin-top: 8px;
    font-size: 14px;
    padding: 0 10px;
}

/* Индивидуальные размеры для десктопной версии */
@media (min-width: 768px) {
    /* Базовые классы позиционирования */
    .photo-frame-left {
        float: left;
        margin: 20px 25px 20px 0;
    }
    
    .photo-frame-right {
        float: right;
        margin: 20px 0 20px 25px;
    }
    
    /* Размеры для конкретных фотографий */
    
    
    
    
    
    
    
    
    
    
    /* Индивидуальные размеры в пикселях */
    
    
    .photo-width-300 { max-width: 300px; }
    
    .photo-width-400 { max-width: 400px; }
    
    .photo-width-500 { max-width: 500px; }
    .photo-width-600 { max-width: 600px; }
    .photo-width-700 { max-width: 700px; }
    .photo-width-800 { max-width: 800px; }
    
    /* Для портретных изображений */
    
    
    
    
    .photo-frame-left img, .photo-frame-right img {
        max-width: 100%;
        width: auto;
    }
}

/* Для планшетов */
@media (max-width: 767px) and (min-width: 481px) {
    .photo-frame-left, .photo-frame-right {
        max-width: 80%;
        margin: 20px auto;
    }
}

/* Для мобильных */
@media (max-width: 480px) {
    .photo-frame-left, .photo-frame-right {
        max-width: 100%;
        margin: 15px 0;
    }
    
    .photo-frame-left figcaption, .photo-frame-right figcaption {
        font-size: 12px;
    }
}

/* Очистка float для контейнеров */
.subservice-card::after {
    content: "";
    display: table;
    clear: both;
}

/* Дополнительные адаптивные стили для текста */
.subservice-text .subservice-text-right {
    line-height: 1.6;
    text-align: justify;
}

@media (max-width: 480px) {
    .subservice-text .subservice-text-right{
        text-align: left;
        font-size: 14px;
        line-height: 1.5;
    }
}

        .subservice-image-text {
            border-radius: 15px;
            box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
            width: 25rem;
            height: 25rem;
            object-fit:cover;
        }
        .subservice-image-stitch {
            border-radius: 15px;
            box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
            width: 25rem;
            height: 35rem;
            object-fit:cover;
        }

        figcaption {
            font-family: var(--font-main);
            font-weight: bold;
            text-align: end;
            color: #040404;
            font-size: 16px;
            margin-right: 10px;
        }

         
@media (max-width: 768px) {
            .subservice-card {
                padding: 20px;
            }
            
            h1 {
                font-size: 2rem;
            }
            
            .content {
                padding: 20px;
            }
            
            .subservice-image {
                height: 250px;
            }
            
            .subservice-text .subservice-text-right{
                font-size: 21px;
            }
            .subservice-card-no-ti {
                font-size: 21px;
            }
            
            
            
            
            
            .subservice-image-text {
                height: 200px;
            }
            
            
    .foto-image-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        width: 95%;
    }
    
    .foto-image-grid figure {
        max-width: 100%;
    }
    
    .foto-image-grid img {
        max-height: 300px;
    }
}
        @media (max-width: 480px) {
            .subservice-image {
                height: 200px;
            }
            
            
            
            
            
            
            
            .subservice-image-text {
                height: 180px;
            }
            
            
                .foto-image-grid {
        gap: 15px;
    }
    
    .foto-image-grid img {
        max-height: 250px;
    }
    
    .foto-image-grid figcaption {
        font-size: 13px;
    }

                .subservice-text .subservice-text-right {
                font-size: 21px;
            }
            .subservice-card-no-ti {
                font-size: 21px;
            }
        }

/* Стили для кликабельных карточек */
.service-card-link {
  text-decoration: none;
  color: inherit;
  display: block;
  transition: all 0.3s ease;
}

.service-card-link:hover,
.service-card-link:focus,
.service-card-link:active {
  text-decoration: none;
  color: inherit;
}

/* Дополнительные стили для красивого hover эффекта */
.service-card-link:hover .service-card {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.container_service a {
  text-decoration: none !important;
  color: inherit !important;
}

.container_service a:hover {
  text-decoration: none !important;
}

.subservice-image {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 20px auto;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

/* Центрирование изображений в контенте */
div[style*="text-align: center"] img {
    max-width: 80%;
    height: auto;
    display: block;
    margin: 20px auto;

}

/* Десктоп - ограничиваем максимальную ширину */
@media (min-width: 1025px) {
    .subservice-image,
    div[style*="text-align: center"] img {
    }
}

/* Планшеты и маленькие десктопы */
@media (max-width: 1024px) and (min-width: 769px) {
    .subservice-image,
    div[style*="text-align: center"] img {
    }
}

/* Планшеты */
@media (max-width: 768px) and (min-width: 481px) {
    .subservice-image,
    div[style*="text-align: center"] img {
        margin: 15px auto;
    }
}

/* Мобильные устройства */
@media (max-width: 480px) {
    .subservice-image,
    div[style*="text-align: center"] img {
        margin: 10px auto;
    }
}

/* Очень маленькие мобильные */
@media (max-width: 360px) {
    .subservice-image,
    div[style*="text-align: center"] img {
        max-width: 200px;
        margin: 8px auto;
    }
}

/* Lazy loading для плавной загрузки */
img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.3s ease;
}

img[loading="lazy"].loaded {
    opacity: 1;
}

/* Оптимизация для Retina дисплеев */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .subservice-image,
    div[style*="text-align: center"] img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Предотвращение layout shift */
.subservice-image,
div[style*="text-align: center"] img {
    aspect-ratio: attr(width) / attr(height);
}

/* Анимация появления изображений */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.subservice-image,
div[style*="text-align: center"] img {
    animation: fadeInUp 0.6s ease-out;
}

        .container-photo {
            max-width: 1200px;
            margin: 0 auto;
            padding: 20px;
        }

        .photo-grid {
            display: grid;
            grid-template-columns: repeat(2, 1fr); /* Всегда 2 колонки */
            gap: 20px;
            width: 100%;
        }

        .photo-item {
            width: 100%;
            overflow: hidden;
            border-radius: 8px;
            box-shadow: 0 4px 8px rgba(0,0,0,0.1);
            transition: all 0.3s ease;
            background: #f5f5f5;
        }

        .photo-item:hover {
            transform: translateY(-5px);
            box-shadow: 0 8px 16px rgba(0,0,0,0.2);
        }

        .photo-item img {
            width: 100%;
            height: auto;
            display: block;
            transition: transform 0.3s ease;
        }

        .photo-item:hover img {
            transform: scale(1.02);
        }

        /* Адаптивность для мобильных устройств */
        @media (max-width: 768px) {
            .photo-grid {
                grid-template-columns: 1fr; /* На мобильных 1 колонка */
                gap: 15px;
            }
            
            .container-photo {
                padding: 15px;
            }
        }

        /* Для очень маленьких экранов */
        @media (max-width: 480px) {
            .photo-grid {
                gap: 10px;
            }
            
            .container-photo {
                padding: 10px;
            }
        }