:root {
  --primary-color: #0e76bc;
  --primary-dark: #085890;
  --primary-light: #3498db;
  --secondary-color: #2c3e50;
  --accent-color: #f39c12;
  --text-color: #333;
  --text-light: #666;
  --border-color: #e0e0e0;
  --bg-light: #f5f7fa;
  --box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  --transition: all 0.3s ease;
}

/* Секция проектов */
.projects-section {
  padding: 80px 0;
  background-color: white;
}

.section-title {
  font-size: 36px;
  color: var(--secondary-color);
  margin-bottom: 50px;
  text-align: center;
  position: relative;
  padding-bottom: 15px;
}

.section-title:after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 3px;
  background-color: var(--primary-color);
}

/* Фильтры проектов */
.project-filters {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 40px;
}

.filter-btn {
  padding: 10px 18px;
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 30px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-color);
  transition: var(--transition);
}

.filter-btn:hover, .filter-btn.active {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(14, 118, 188, 0.2);
}

/* Сетка проектов */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 30px;
}

.project-card {
  background: white;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--box-shadow);
  transition: var(--transition);
  cursor: pointer;
  position: relative;
  top: 0;
  display: block;
  text-decoration: none;
  height: 100%;
}

.project-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.card-image {
  width: 100%;
  height: 220px;
  object-fit: cover;
  transition: var(--transition);
}

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

.card-content {
  padding: 20px;
}

.card-title {
  font-size: 20px;
  color: var(--primary-color);
  margin-bottom: 12px;
  font-weight: 600;
  transition: var(--transition);
}

.project-card:hover .card-title {
  color: var(--primary-dark);
}

.card-date {
  font-size: 14px;
  color: var(--accent-color);
  margin-top: 15px;
  font-weight: 500;
  display: flex;
  align-items: center;
}

.card-date:before {
  content: "";
  display: inline-block;
  width: 16px;
  height: 16px;
  margin-right: 6px;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="%23f39c12" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="4" width="18" height="18" rx="2" ry="2"></rect><line x1="16" y1="2" x2="16" y2="6"></line><line x1="8" y1="2" x2="8" y2="6"></line><line x1="3" y1="10" x2="21" y2="10"></line></svg>');
  background-size: contain;
  background-repeat: no-repeat;
}

.card-description {
  font-size: 15px;
  color: var(--text-light);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.6;
}

/* Анимация для карточек */
.project-card {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.5s forwards;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Детальная страница проекта */
.item-detail {
  max-width: 1000px;
  margin: 50px auto;
  padding: 30px;
  background: white;
  border-radius: 12px;
  box-shadow: var(--box-shadow);
}

.detail-header {
  margin-bottom: 30px;
}

.detail-title {
  font-size: 32px;
  color: var(--primary-color);
  margin-bottom: 20px;
}

.detail-image {
  width: 100%;
  max-height: 500px;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 30px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  transition: var(--transition);
}

.detail-image:hover {
  transform: scale(1.02);
}

.detail-description {
  font-size: 16px;
  color: var(--text-color);
  line-height: 1.8;
  margin-bottom: 30px;
}

.detail-info {
  background: var(--bg-light);
  padding: 20px;
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}

.detail-info p {
  margin: 0;
}

.detail-meta {
  display: flex;
  gap: 30px;
  margin-bottom: 30px;
  color: var(--text-light);
  flex-wrap: wrap;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.meta-item i {
  color: var(--primary-color);
}

.back-button {
  display: inline-block;
  padding: 12px 24px;
  background: var(--primary-color);
  color: white;
  text-decoration: none;
  border-radius: 5px;
  margin-bottom: 30px;
  transition: var(--transition);
  font-weight: 500;
}

.back-button:hover {
  background: var(--primary-dark);
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(14, 118, 188, 0.2);
}

.back-button:active {
  transform: translateY(0);
}

/* Галерея проекта */
.project-gallery {
  margin: 30px 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 15px;
}

.gallery-item {
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  position: relative;
  height: 200px;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.gallery-item:hover img {
  transform: scale(1.1);
}

.gallery-item:after {
  content: "+";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 40px;
  opacity: 0;
  transition: var(--transition);
}

.gallery-item:before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(14, 118, 188, 0.5);
  opacity: 0;
  transition: var(--transition);
}

.gallery-item:hover:after,
.gallery-item:hover:before {
  opacity: 1;
}

/* Похожие проекты */
.similar-projects {
  margin-top: 50px;
}

.similar-title {
  font-size: 24px;
  color: var(--secondary-color);
  margin-bottom: 25px;
  position: relative;
  padding-bottom: 10px;
}

.similar-title:after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 3px;
  background-color: var(--primary-color);
}

/* Адаптивность */
@media (max-width: 992px) {
  .projects-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
  }
  
  .section-title {
    font-size: 30px;
  }
  
  .detail-title {
    font-size: 28px;
  }
  
  .project-gallery {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }
}

@media (max-width: 768px) {
  .projects-section {
    padding: 60px 0;
  }
  
  .projects-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
  }
  
  .card-image {
    height: 180px;
  }
  
  .section-title {
    font-size: 26px;
    margin-bottom: 30px;
  }
  
  .card-title {
    font-size: 18px;
  }
  
  .detail-title {
    font-size: 24px;
  }
  
  .item-detail {
    margin: 30px 15px;
    padding: 20px;
  }
  
  .back-button {
    padding: 10px 20px;
    font-size: 14px;
  }
  
  .meta-item {
    font-size: 14px;
  }
}

@media (max-width: 576px) {
  .projects-grid {
    grid-template-columns: 1fr;
  }
  
  .projects-section {
    padding: 40px 15px;
  }
  
  .section-title {
    font-size: 22px;
  }
  
  .card-image {
    height: 200px;
  }
  
  .detail-title {
    font-size: 20px;
  }
  
  .detail-meta {
    flex-direction: column;
    gap: 10px;
  }
  
  .project-gallery {
    grid-template-columns: 1fr 1fr;
  }
  
  .gallery-item {
    height: 150px;
  }
}