/* ======= ЗАГАЛЬНІ СТИЛІ ======= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "SF Pro Text", "SF Pro Icons", "Helvetica Neue", "Helvetica", "Arial", sans-serif;
  color: #333;
  line-height: 1.6;
  overflow-x: hidden;
}

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

/* ======= СТИЛІ ДЛЯ ШАПКИ ======= */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  transition: all 0.3s ease;
  padding: 20px 0;
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
}

header.scrolled {
  background-color: white;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.8rem;
  font-weight: 700;
  color: #2c3e50;
  text-decoration: none;
  transition: color 0.3s ease;
}

.logo:hover {
  color: #3498db;
}

header nav ul {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 30px;
}

header nav ul li a {
  color: #2c3e50;
  text-decoration: none;
  font-size: 1rem;
  font-weight: 500;
  transition: color 0.3s ease;
  padding: 5px 0;
  position: relative;
}

header nav ul li a::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: #3498db;
  transition: width 0.3s ease;
}

header nav ul li a:hover::after,
header nav ul li a.active::after {
  width: 100%;
}

header nav ul li a:hover,
header nav ul li a.active {
  color: #3498db;
}

/* Гамбургер меню */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 21px;
  cursor: pointer;
  z-index: 1001;
}

.menu-toggle span {
  display: block;
  height: 3px;
  width: 100%;
  background-color: #2c3e50;
  border-radius: 3px;
  transition: all 0.3s ease;
}

.menu-toggle.active span:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
}

header.scrolled .menu-toggle span {
  background-color: #2c3e50;
}

.menu-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  z-index: 999;
  backdrop-filter: blur(5px);
  transition: opacity 0.3s ease;
  opacity: 0;
}

.menu-overlay.active {
  display: block;
  opacity: 1;
}

/* Адаптивність для шапки */
@media (max-width: 992px) {
  header nav ul {
    gap: 25px;
  }
}

@media (max-width: 768px) {
  .menu-toggle {
    display: flex;
  }

  header nav ul {
    position: fixed;
    top: 0;
    right: -100%;
    width: 250px;
    height: 100vh;
    background-color: white;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    transition: right 0.3s ease;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
  }

  header nav ul.active {
    right: 0;
  }

  header nav ul li a {
    font-size: 1.1rem;
  }

  .menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
  }

  .menu-overlay.active {
    display: block;
  }
}

@media (max-width: 576px) {
  .menu-toggle {
    width: 24px;
    height: 18px;
  }
}

/* Анімація появи шапки при завантаженні сторінки */
@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

header {
  animation: fadeInDown 0.5s ease forwards;
}

/* Загальні стилі для галереї */
.gallery-section {
  padding: 4rem 0;
  background-color: #f8f9fa;
}

/* ======= HERO СЕКЦІЯ ======= */
.gallery-hero {
  position: relative;
  background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)), url("About-hero-one.jpg");
  background-size: cover;
  background-position: center;
  height: 60vh;
  min-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: white;
  margin-top: 80px;
  overflow: hidden;
}

.gallery-hero h1 {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 1rem;
  opacity: 0;
  transform: translateY(50px);
  animation: fadeInUp 1s ease 0.3s forwards;
  text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.5);
  background: linear-gradient(135deg, #fff, #f8f9fa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.gallery-hero p {
  font-size: 1.2rem;
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 1s ease 0.6s forwards;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  max-width: 600px;
  margin: 0 auto;
}

/* Стилі для фільтрів */
.gallery-filters {
  padding: 2rem 0;
  background-color: #f8f9fa;
  position: sticky;
  top: 80px;
  z-index: 100;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.filters {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 0.8rem 1.5rem;
  border: 2px solid #3498db;
  border-radius: 5px;
  background: transparent;
  color: #3498db;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.filter-btn:hover,
.filter-btn.active {
  background-color: #3498db;
  color: white;
}

/* Стилі для сітки галереї */
.gallery-grid {
  padding: 3rem 0;
  background-color: white;
}

.gallery-items {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
}

.gallery-item {
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  opacity: 0;
  transform: translateY(20px);
}

.gallery-item.visible {
  opacity: 1;
  transform: translateY(0);
}

.gallery-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.15);
}

.gallery-item-image {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
}

.gallery-item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

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

.gallery-item-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(52, 152, 219, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-item-overlay {
  opacity: 1;
}

.btn-view {
  padding: 0.8rem 1.5rem;
  background: white;
  color: #3498db;
  text-decoration: none;
  border-radius: 5px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.btn-view:hover {
  background: #f8f9fa;
  transform: translateY(-2px);
}

.gallery-item-info {
  padding: 1.5rem;
  background: white;
  position: relative;
  z-index: 2;
}

.gallery-item-info h3 {
  font-size: 1.3rem;
  color: #2c3e50;
  margin: 0 0 0.5rem 0;
  font-weight: 600;
}

.gallery-item-info p {
  color: #7f8c8d;
  margin: 0 0 1rem 0;
  font-size: 0.9rem;
}

/* Модальне вікно */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal.active {
  opacity: 1;
}

.modal-content {
  position: relative;
  max-width: 90%;
  max-height: 90vh;
  transform: scale(0.8);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal.active .modal-content {
  transform: scale(1);
}

.modal-image {
  max-width: 100%;
  max-height: 90vh;
  border-radius: 10px;
  box-shadow: 0 5px 25px rgba(0, 0, 0, 0.2);
}

.modal-close {
  position: absolute;
  top: -40px;
  right: -40px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: white;
  color: #2c3e50;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  font-size: 1.5rem;
  transition: all 0.3s ease;
}

.modal-close:hover {
  background: #3498db;
  color: white;
  transform: rotate(90deg);
}

/* Стилі для категорій */
.category-badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  padding: 0.5rem 1rem;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 15px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #3498db;
  z-index: 2;
}

.gallery-item:hover .category-badge {
  opacity: 1;
}

/* Стилі для тегів */
.gallery-tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.gallery-tag {
  padding: 0.3rem 0.8rem;
  background-color: #f8f9fa;
  border-radius: 15px;
  font-size: 0.8rem;
  color: #6c757d;
  border: 1px solid #e9ecef;
}

/* Стилі для кнопки "Завантажити ще" */
.load-more {
  display: block;
  margin: 2rem auto;
  padding: 1rem 3rem;
  background: #3498db;
  color: white;
  border: none;
  border-radius: 30px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.load-more:hover {
  background: #2980b9;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(52, 152, 219, 0.4);
}

/* ======= СЕКЦІЯ "СЛІДКУЙ ЗА НАМИ" ======= */
.follow-us {
  background-color: #f8f9fa;
  padding: 4rem 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.follow-us h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: #2c3e50;
  font-weight: 700;
}

.follow-us p {
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto 2rem;
  color: #7f8c8d;
}

.social-icons {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: #34495e;
  color: white;
  font-size: 1.2rem;
  transition: background-color 0.3s ease;
  text-decoration: none;
}

.social-icon:hover {
  background-color: #3498db;
  transform: translateY(-3px);
}

.social-tooltip {
  position: absolute;
  bottom: -30px;
  left: 50%;
  transform: translateX(-50%);
  background: #2c3e50;
  color: white;
  padding: 5px 10px;
  border-radius: 5px;
  font-size: 0.8rem;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.social-icon:hover .social-tooltip {
  opacity: 1;
  visibility: visible;
  bottom: -25px;
}

/* ======= ФУТЕР ======= */
.footer-wave {
  height: 50px;
  background-color: #f8f9fa;
  position: relative;
}

.footer-wave::before {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 50px;
  background: #2c3e50;
  clip-path: polygon(0 20px, 100% 0, 100% 100%, 0 100%);
}

footer {
  background-color: #2c3e50;
  color: white;
  padding: 3rem 0 1rem;
  position: relative;
  overflow: hidden;
}

footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Ccircle cx='30' cy='30' r='2'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  z-index: 1;
}

footer .container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.footer-column {
  display: flex;
  flex-direction: column;
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 0.8s ease forwards;
  animation-delay: calc(var(--column-index, 0) * 0.2s);
}

.footer-column:nth-child(1) {
  --column-index: 1;
}
.footer-column:nth-child(2) {
  --column-index: 2;
}
.footer-column:nth-child(3) {
  --column-index: 3;
}
.footer-column:nth-child(4) {
  --column-index: 4;
}

.footer-column h3 {
  font-size: 1.3rem;
  margin-bottom: 1rem;
  color: white;
  position: relative;
  padding-bottom: 15px;
  font-weight: 600;
}

.footer-column h3::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 4px;
  background: linear-gradient(135deg, #3498db, #9b59b6);
  border-radius: 2px;
  transition: width 0.4s ease;
}

.footer-column:hover h3::after {
  width: 100px;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 0.5rem;
  transform: translateX(-20px);
  opacity: 0;
  animation: slideInRight 0.5s ease forwards;
  animation-delay: calc(var(--item-index, 0) * 0.1s + 0.5s);
}

.footer-links li:nth-child(1) {
  --item-index: 1;
}
.footer-links li:nth-child(2) {
  --item-index: 2;
}
.footer-links li:nth-child(3) {
  --item-index: 3;
}
.footer-links li:nth-child(4) {
  --item-index: 4;
}
.footer-links li:nth-child(5) {
  --item-index: 5;
}

.footer-links a {
  color: #bdc3c7;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: #3498db;
}

.footer-contact p {
  margin-bottom: 0.8rem;
  display: flex;
  align-items: center;
  color: #bdc3c7;
}

.footer-contact i {
  margin-right: 0.5rem;
  color: #3498db;
  min-width: 20px;
}

.footer-social {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
}

.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 35px;
  height: 35px;
  border-radius: 50%;
  background-color: #34495e;
  color: white;
  transition: background-color 0.3s ease;
}

.footer-social a:hover {
  background-color: #3498db;
}

.footer-bottom {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid #34495e;
  text-align: center;
  grid-column: 1 / -1;
  opacity: 0;
  animation: fadeIn 1s ease forwards;
  animation-delay: 1s;
}

.footer-bottom p {
  margin: 0;
  color: #bdc3c7;
  font-size: 0.9rem;
}

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

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

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

@keyframes bounce {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

/* АДАПТИВНІСТЬ */
@media (max-width: 1200px) {
  .gallery-items {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2.5rem;
  }
}

@media (max-width: 992px) {
  header nav ul {
    gap: 25px;
  }

  .gallery-hero h1 {
    font-size: 3.5rem;
  }

  .filters {
    gap: 1.5rem;
  }
}

@media (max-width: 768px) {
  .menu-toggle {
    display: flex;
  }

  header nav ul {
    position: fixed;
    top: 0;
    right: -100%;
    width: 250px;
    height: 100vh;
    background-color: white;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    transition: right 0.3s ease;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
  }

  header nav ul.active {
    right: 0;
  }

  header nav ul li a {
    font-size: 1.1rem;
  }

  .menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
  }

  .menu-overlay.active {
    display: block;
  }

  .gallery-hero h1 {
    font-size: 2.2rem;
  }

  .gallery-hero p {
    font-size: 1rem;
  }

  .filters {
    flex-direction: column;
    align-items: center;
  }

  .filter-btn {
    width: 80%;
    max-width: 250px;
  }

  .gallery-items {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
  }

  .follow-us h2 {
    font-size: 2rem;
  }

  .social-icons {
    gap: 0.8rem;
  }

  .social-icon {
    width: 45px;
    height: 45px;
    font-size: 1.1rem;
  }
}

@media (max-width: 576px) {
  .gallery-hero h1 {
    font-size: 1.8rem;
  }

  .gallery-items {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .follow-us h2 {
    font-size: 1.8rem;
  }
}
