/* Анимации для веб-сайта - легкие CSS-анимации без влияния на производительность */

/* Анимация появления элементов */
.fade-in {
  opacity: 0;
  transform: translateY(15px);
  transition: opacity 0.3s ease-out, transform 0.3s ease-out;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Анимации при наведении для портфолио - только для элементов со ссылками */
.portfolio__item .overlay-container {
  position: relative;
  overflow: hidden;
  display: block; /* Ensure it behaves as a block for both div and a tags */
  width: 100%;
  height: 0;
  padding-bottom: 85%; /* Increased height for portfolio items (was 75%) */
}

/* Специальный размер для блог-карточек */
.blog .portfolio__item .overlay-container {
  padding-bottom: 40%; /* Further reduced height for blog items (was 50%) */
}

/* Увеличиваем отступ для заголовков блога */
.blog .portfolio__item-descr h3 {
  margin-top: 20px;
}

.portfolio__item .overlay-container img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover; /* Ensure images cover the area consistently */
}

/* Применяем эффекты только к ссылкам */
.portfolio__item a.overlay-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.3);
  opacity: 0.8;
  transition: opacity 0.2s ease;
  z-index: 1;
  pointer-events: none; /* Ensure it doesn't block clicks on the link */
  border-radius: 15px; 
}

/* Применяем эффекты только к ссылкам */
.portfolio__item a.overlay-container {
  transition: transform 0.2s ease;
}

.portfolio__item a.overlay-container:hover,
.portfolio__item a.overlay-container.hover-enabled:hover {
  transform: scale(1.03);
}

.portfolio__item a.overlay-container:hover::before,
.portfolio__item a.overlay-container.hover-enabled:hover::before {
  opacity: 0;
}

/* Анимация для секции AboutUs */
.about-us__pulse {
  display: inline-block;
  animation-duration: 1.5s;
  animation-iteration-count: 1;
  animation-fill-mode: both;
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
  }
}

/* Анимация для кнопок и ссылок */
.animated-link {
  position: relative;
  transition: color 0.2s ease;
}

.animated-link::after {
  content: '';
  position: absolute;
  width: 0;
  height: 1px;
  bottom: -2px;
  left: 0;
  background-color: currentColor;
  transition: width 0.2s ease;
}

.animated-link:hover::after {
  width: 100%;
}

/* Плавное появление модальных окон */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideIn {
  from { transform: translateY(-20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
} 