
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}
.photo-grid img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.3s ease;
}
.photo-grid img:hover {
  transform: scale(1.05);
}

.photo-modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0; top: 0;
  width: 98%;
  height: 98%;
  background-color: rgba(0,0,0,0.85);
  justify-content: center;
  align-items: center;
  padding: 1rem;
  flex-direction: column;
}
.photo-modal.active {
  display: flex;
}
.photo-modal img {
  max-width: 90%;
  max-height: 90%;
  border-radius: 10px;
  box-shadow: 0 0 20px rgba(0,0,0,0.5);
}
.photo-modal .close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 2rem;
  color: white;
  cursor: pointer;
  z-index: 1001;
}
.photo-modal .nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(255,255,255,0.85);
  color: #333;
  font-size: 2rem;
  border: none;
  padding: 0.5rem 1rem;
  cursor: pointer;
  border-radius: 6px;
  z-index: 1001;
}
.photo-modal .prev {
  left: 10px;
}
.photo-modal .next {
  right: 10px;
}
.photo-modal .nav-btn:hover {
  background-color: white;
}

/* Адаптация */
@media (max-width: 768px) {
  .photo-modal img {
    max-width: 100%;
    max-height: 70%;
  }
  .photo-modal .close {
    font-size: 1.5rem;
    top: 0.75rem;
    right: 0.75rem;
  }
  .photo-modal .nav-btn {
    font-size: 1.5rem;
    padding: 0.3rem 0.75rem;
  }
}


.photo-modal .caption {
  color: #eee;
  font-size: 1rem;
  margin-top: 1rem;
  text-align: center;
}
@media (max-width: 768px) {
  .photo-modal .caption {
    font-size: 0.9rem;
  }
}


.pdf-viewer {
  display: none;
  width: 90%;
  height: 80%;
  border-radius: 10px;
  box-shadow: 0 0 20px rgba(0,0,0,0.5);
}
@media (max-width: 768px) {
  .pdf-viewer {
    width: 100%;
    height: 70%;
  }
}


.pdf-list {
  margin-top: 2rem;
}
.pdf-item {
  display: flex;
  align-items: center;
  background-color: #f8f8f8;
  border-left: 5px solid #2a9d8f;
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  transition: transform 0.2s ease;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}
.pdf-item img {
  width: 32px;
  margin-right: 1rem;
}
.pdf-item a {
  text-decoration: none;
  font-weight: 600;
  color: #333;
}
.pdf-item:hover {
  transform: scale(1.02);
}
