/* ========== СТИЛИ ДЛЯ ГАЛЕРЕИ ========== */
.gallery-page {
  padding: 40px 0;
  min-height: 60vh;
}

.gallery-hint {
  text-align: center;
  color: #ff6666;
  margin-bottom: 30px;
  font-size: 18px;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 0.7;
  }
  50% {
    opacity: 1;
  }
}

/* Сетка галереи */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 25px;
  margin-top: 20px;
}

.gallery-grid-item {
  border-radius: 15px;
  overflow: hidden;
  border: 2px solid #8b0000;
  box-shadow: 0 10px 25px rgba(139, 0, 0, 0.4);
  height: 280px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
}

.gallery-grid-item::before {
  content: '🔍';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  color: white;
  font-size: 32px;
  background: rgba(139, 0, 0, 0.8);
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  transition: transform 0.3s;
  pointer-events: none;
}

.gallery-grid-item:hover::before {
  transform: translate(-50%, -50%) scale(1);
}

.gallery-grid-item:hover {
  transform: translateY(-10px);
  border-color: #ff4444;
  box-shadow: 0 15px 35px rgba(139, 0, 0, 0.7);
}

.gallery-grid-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s;
}

.gallery-grid-item:hover img {
  transform: scale(1.1);
}

/* Модальное окно */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  justify-content: center;
  align-items: center;
  backdrop-filter: blur(5px);
}

.modal.active {
  display: flex;
}

.modal-content {
  max-width: 90vw;
  max-height: 90vh;
  position: relative;
  animation: zoomIn 0.3s;
}

@keyframes zoomIn {
  from {
    transform: scale(0.9);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.modal-content img {
  max-width: 100%;
  max-height: 90vh;
  object-fit: contain;
  border: 3px solid #8b0000;
  border-radius: 10px;
  box-shadow: 0 0 30px rgba(139, 0, 0, 0.7);
}

.modal-close {
  position: absolute;
  top: -50px;
  right: -10px;
  color: white;
  font-size: 48px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 10px;
  line-height: 1;
  transition: color 0.3s;
  z-index: 1001;
}

.modal-close:hover {
  color: #ff4444;
  transform: scale(1.1);
}

.modal-nav {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  transform: translateY(-50%);
  display: flex;
  justify-content: space-between;
  padding: 0 20px;
  pointer-events: none;
}

.modal-prev,
.modal-next {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(139, 0, 0, 0.8);
  border: 2px solid #ff4444;
  color: white;
  font-size: 36px;
  cursor: pointer;
  pointer-events: auto;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  padding-bottom: 6px;
}

.modal-prev:hover,
.modal-next:hover {
  background: #8b0000;
  transform: scale(1.1);
  border-color: #ff6666;
}

/* Адаптация для мобилок */
@media (max-width: 768px) {
  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
  }

  .gallery-grid-item {
    height: 200px;
  }

  .gallery-hint {
    font-size: 16px;
  }

  .modal-close {
    top: -40px;
    right: 0;
    font-size: 40px;
  }

  .modal-prev,
  .modal-next {
    width: 40px;
    height: 40px;
    font-size: 28px;
  }
}

@media (max-width: 480px) {
  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .gallery-grid-item {
    height: 250px;
  }
}
/* ========== МОБИЛЬНАЯ АДАПТАЦИЯ ДЛЯ ГАЛЕРЕИ ========== */
@media (max-width: 768px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px;
  }

  .gallery-grid-item {
    height: 150px;
  }

  .gallery-hint {
    font-size: 14px;
  }
}

@media (max-width: 480px) {
  .gallery-grid {
    grid-template-columns: 1fr !important;
  }

  .gallery-grid-item {
    height: 200px;
  }
}
/* ========== МОБИЛЬНАЯ АДАПТАЦИЯ ДЛЯ КОНТАКТОВ ========== */
@media (max-width: 768px) {
  .contact-grid {
    grid-template-columns: 1fr !important;
    gap: 20px;
  }

  .contact-info,
  .contact-form {
    padding: 20px;
  }

  .contact-info h2,
  .contact-form h2 {
    font-size: 24px;
  }

  .info-item {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .info-icon {
    margin-bottom: 5px;
  }

  .info-text {
    text-align: center;
  }

  .info-text h3 {
    text-align: center;
  }

  .form-group input,
  .form-group textarea,
  .form-group select {
    padding: 10px;
    font-size: 14px;
  }

  .btn-submit {
    padding: 12px 20px;
    font-size: 16px;
  }
}

@media (max-width: 480px) {
  .page-title h1 {
    font-size: 24px;
  }

  .info-item img {
    width: 100px !important;
    height: 100px !important;
  }
}
