/* Сброс */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Montserrat', sans-serif;
  background-color: #f8f8f8;
  color: #333;
  line-height: 1.6;
  -webkit-text-size-adjust: 100%; /* Исправление масштабирования текста в Safari */
}

/* ---------- АНИМАЦИЯ ВЫЕЗЖАНИЯ ШАПКИ СВЕРХУ ---------- */
.topbar-animated {
  position: relative;
  animation: slideDown 0.7s ease forwards;
  transform: translateY(-80px);
  opacity: 0;
}

@keyframes slideDown {
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* ---------- ШАПКА (HEADER) ---------- */
.header {
  background-color: #fff;
  margin: 1rem auto;
  padding: 0.75rem 2rem;
  max-width: 1400px;
  border-radius: 40px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}

/* Логотип */
.header__logo img {
  height: 60px;
  width: auto;
}

/* Навигация */
.header__nav {
  display: flex;
  align-items: center;
}

.header__nav-list {
  list-style: none;
  display: flex;
  gap: 2rem;
}

.header__nav-list a {
  font-family: 'Poppins', sans-serif;
  font-weight: 400;
  text-decoration: none;
  color: #333;
  position: relative;
  padding: 0.25rem 0.6rem;
  border-radius: 20px;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.header__nav-list a:hover {
  background-color: #e5e5e5;
}

/* Бренд (для ПК) */
.header__brand {
  font-size: 1.5rem;
  font-weight: 600;
  color: #333;
}

/* Мобильная версия шапки */
@media (max-width: 768px) {
  .header {
    flex-direction: column;
    align-items: center;
    padding: 0.5rem 1rem; /* Уменьшаем отступы */
  }

  .header__logo img {
    height: 40px; /* Уменьшаем логотип */
  }

  .header__nav {
    display: none; /* Скрываем навигацию на мобильных */
  }

  .header__brand {
    font-size: 1.2rem; /* Уменьшаем шрифт */
    margin-top: 0.5rem; /* Отступ от логотипа */
  }
}

/* ---------- СЕКЦИИ (ОСНОВНОЙ КОНТЕНТ) ---------- */
.section {
  padding: 3rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.7s ease;
}

.section.show {
  opacity: 1;
  transform: translateY(0);
}

.section__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.section__title {
  font-size: 2rem;
  margin-bottom: 1rem;
  font-weight: 700;
  color: #333;
}

.section__description {
  font-weight: 400;
  line-height: 1.5;
  margin-bottom: 2rem;
}

/* Галерея (Nasza Sala, EMS Treningi) */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.photo-grid img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  border-radius: 8px;
  transition: transform 0.3s ease;
}

.photo-grid img:hover {
  transform: scale(1.05);
}

/* Кнопка "Kliknij, aby zobaczyć więcej" */
.show-photos-btn {
  background-color: transparent;
  color: #333;
  border: 1px solid #888;
  padding: 0.75rem 1.5rem;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.3s ease;
  border-radius: 20px;
}

.show-photos-btn:hover {
  background-color: #333;
  color: #fafafa;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Анимация появления фотографий */
@keyframes slideInFromRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Анимация "всасывания" фотографий */
@keyframes suckIntoButton {
  to {
    transform: scale(0);
    opacity: 0;
  }
}

.photo-grid.show {
  display: grid;
  animation: slideInFromRight 0.5s ease forwards;
}

.photo-grid.hide {
  animation: suckIntoButton 0.5s ease forwards;
}

/* ---------- СЕКЦИЯ: EMS Treningi - Na czym polega? ---------- */
.ems-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 2rem;
}

.ems-column {
  text-align: center;
  padding: 1rem;
  border: 1px solid #e5e5e5;
  border-radius: 10px;
  transition: transform 0.3s ease;
}

.ems-column:hover {
  transform: scale(1.05);
}

.ems-column i {
  font-size: 2rem;
  color: #ff4141;
  margin-bottom: 1rem;
}

.ems-column h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.ems-column p {
  font-size: 1rem;
  line-height: 1.5;
  color: #666;
}

.red-line {
  width: 50%;
  height: 2px;
  background-color: #ff4141;
  margin: 1rem auto;
}

/* ---------- ФУТЕР ---------- */
.footer-contact {
  background-color: #fff;
  padding: 2rem;
  margin: 2rem auto;
  max-width: 1400px;
  border-radius: 40px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.footer-contact__content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-contact__left,
.footer-contact__right {
  flex: 1;
  text-align: center;
}

.footer-contact__title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.footer-contact__info {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-contact__info p {
  font-size: 1rem;
  color: #333;
}

.footer-contact__info i {
  margin-right: 0.5rem;
  color: #ff4141;
}

.footer-contact__invitation {
  font-size: 1rem;
  color: #333;
  margin-top: 1rem;
}

.footer-contact__social {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 1rem;
}

.footer-contact__social a {
  color: #ff4141;
  font-size: 1.5rem;
  transition: color 0.3s ease;
}

.footer-contact__social a:hover {
  color: #333;
}

/* --- Адаптив --- */
@media (max-width: 768px) {
  .footer-contact__content {
    flex-direction: column;
    gap: 1rem;
  }

  .footer-contact__left,
  .footer-contact__right {
    text-align: center;
  }

  .section__header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
  .photo-grid img {
    -webkit-object-fit: cover; /* Для Safari */
    object-fit: cover;
  }
  .photo-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }

  .ems-grid {
    grid-template-columns: repeat(1, 1fr);
  }
}