/* Стили для страницы "Наши работы" */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.page-header {
  background: linear-gradient(135deg, #8B7355 0%, #d4b483 100%);
  padding: 60px 20px;
  text-align: center;
  border-radius: 20px;
  margin: 20px 15px 40px 15px;
}

.page-header h1 {
  color: white;
  font-size: 32px;
  margin-bottom: 15px;
  font-family: 'Segoe UI', 'Comfortaa', sans-serif;
}

.page-header p {
  color: rgba(255,255,255,0.9);
  font-size: 16px;
  font-family: 'Segoe UI', 'Comfortaa', sans-serif;
}

/* Стили для фотоальбома */
.wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
  width: 100%;
  box-sizing: border-box;
}

.tabs {
  margin: 0 0 30px 0;
  padding: 0;
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  list-style: none;
}

.tabs li {
  list-style: none;
  margin: 0;
}

.tabs a {
  display: inline-block;
  background: #f0f0f0;
  border-radius: 50px;
  padding: 10px 24px;
  text-decoration: none;
  font-family: 'Segoe UI', 'Comfortaa', sans-serif;
  font-weight: 500;
  font-size: 15px;
  color: #555;
  transition: all 0.3s ease;
  cursor: pointer;
}

.tabs a:hover {
  background-color: #e0e0e0;
}

.tabs a.active {
  background-color: #8B7355;
  color: white;
}

.portfolio {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  width: 100%;
}

.portfolio li {
  list-style: none;
  margin-bottom: 20px;
  transition: all 0.4s ease;
  width: 100%;
}

.portfolio figure {
  margin: 0;
  position: relative;
  text-align: center;
  border: 2px solid #e0e0e0;
  border-radius: 12px;
  overflow: hidden;
  background: #f5f5f5;
  transition: all 0.3s ease;
  cursor: pointer;
}

.portfolio figure:hover {
  border-color: #8B7355;
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.portfolio figure:hover img {
  transform: scale(1.05);
}

.portfolio figure:hover figcaption {
  opacity: 1;
  bottom: 20px;
}

.portfolio figure:hover h3 {
  opacity: 1;
  top: 20px;
}

.portfolio img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.portfolio figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -50px;
  text-align: center;
  transition: all 0.3s ease;
  opacity: 0;
}

.portfolio a {
  background-color: #8B7355;
  font-family: 'Segoe UI', sans-serif;
  font-weight: 500;
  text-decoration: none;
  color: #fff;
  padding: 8px 20px;
  border-radius: 30px;
  display: inline-block;
  font-size: 13px;
  transition: all 0.2s ease;
}

.portfolio a:hover {
  background-color: #d4b483;
  transform: scale(1.02);
}

.portfolio h3 {
  color: #fff;
  font-family: 'Segoe UI', sans-serif;
  font-weight: 600;
  text-shadow: 0 1px 3px rgba(0,0,0,0.5);
  position: absolute;
  top: -50px;
  left: 0;
  right: 0;
  text-align: center;
  padding: 8px;
  margin: 0;
  font-size: 16px;
  transition: all 0.3s ease;
  opacity: 0;
  background: rgba(0,0,0,0.6);
  border-radius: 8px;
  width: auto;
  display: block;
}

/* Планшеты */
@media (min-width: 600px) {
  .portfolio li {
    width: 50%;
    padding-right: 15px;
  }
  
  .portfolio li:nth-child(even) {
    padding-right: 0;
  }
  
  .portfolio img {
    height: 260px;
  }
}

/* Десктопы */
@media (min-width: 992px) {
  .portfolio li {
    width: 33.333%;
    padding-right: 20px;
  }
  
  .portfolio li:nth-child(3n) {
    padding-right: 0;
  }
  
  .portfolio img {
    height: 280px;
  }
  
  .page-header {
    padding: 80px 40px;
    margin: 20px 20px 50px 20px;
  }
  
  .page-header h1 {
    font-size: 48px;
  }
  
  .tabs a {
    padding: 12px 32px;
    font-size: 16px;
  }
}

/* Телефоны - самые важные стили */
@media (max-width: 599px) {
  .wrap {
    padding: 0 12px;
  }
  
  .tabs {
    gap: 8px;
    margin-bottom: 20px;
  }
  
  .tabs a {
    padding: 7px 16px;
    font-size: 13px;
  }
  
  .portfolio li {
    width: 100%;
    padding-right: 0;
    margin-bottom: 15px;
  }
  
  .portfolio figure {
    margin: 0;
  }
  
  .portfolio img {
    height: 200px;
  }
  
  .portfolio h3 {
    font-size: 14px;
    padding: 6px;
  }
  
  .portfolio a {
    padding: 6px 16px;
    font-size: 12px;
  }
  
  .page-header {
    padding: 40px 15px;
    margin: 15px 12px 30px 12px;
    border-radius: 16px;
  }
  
  .page-header h1 {
    font-size: 28px;
  }
  
  .page-header p {
    font-size: 14px;
  }
}