body {
  line-height: 1.7;
  color: #333;
  background-color: #fff;
  margin: 0;
  padding: 0;
}

span {
  font-style: italic;
  color: #000000;
}
main_text {
  text-align: center;
  font-size: 1.5rem;
  font-weight: normal;
  margin-bottom: 1rem;
}
h1 {
  text-align: center;
  white-space: nowrap;
}

/* Pinterest-style Gallery */
.gallery {
  column-count: 4;
  column-gap: 16px;
  padding: 20px 16px;
  max-width: 1400px;
  margin: 0 auto;
  background-color: #ffffff;
}

.gallery .pin {
  display: inline-block;
  width: 100%;
  margin-bottom: 16px;
  break-inside: avoid;
  page-break-inside: avoid;
  background-color: #ffffff;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.gallery .pin:hover {
  transform: scale(1.02);
}

.gallery img {
  width: 100%;
  height: auto;
  display: block;
  background-color: #efefef;
}

.nav-links {
  display: flex;
  justify-content: center;
  gap: 3rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.nav-link {
  text-decoration: none;
  color: inherit;
  font-weight: normal;
  cursor: pointer;
  font-size: 1.2rem;
  padding: 2px 0; /* вертикальные отступы, чтобы линия не "прилипала" */
  position: relative;
  display: inline-block;
}

/* Анимированная линия */
.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 1px;
  width: 0;
  height: 2px; /* толщина линии */
  background-color: currentColor; /* цвет как у текста */
  transition: width 0.3s ease;
}

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

@media (max-width: 1200px) {
  .gallery {
    column-count: 3;
  }
}

@media (max-width: 768px) {
  .gallery {
    column-count: 2;
    column-gap: 12px;
    padding: 12px;
  }

  .gallery .pin {
    margin-bottom: 12px;
  }
}

@media (max-width: 480px) {
  .gallery {
    column-count: 1;
    padding: 8px;
  }
}

.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 1rem;
}
.buttons {
  width: 75px;
  height: 25px;
  background: #ffffff;
  border-width: 0px;
  border-color: #000000;
  color: #000000;
  appearance: none;
  font-size: large;
}

.buttons:hover {
  border-bottom-width: 1px;
  border-color: #000000;
}

.buttons:active {
  border-bottom-width: 1px;
  border-color: #000000;
}

/* Image View Page */
.image-view-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px;
  min-height: calc(100vh - 7vh);
}

.back-button {
  margin-bottom: 20px;
  padding: 10px 20px;
  background: #ffffff;
  border: 1px solid #000000;
  color: #000000;
  cursor: pointer;
  font-size: large;
  transition: background-color 0.2s ease;
}

.back-button:hover {
  background-color: #f0f0f0;
}

.image-wrapper {
  max-width: 90%;
  max-height: 85vh;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #ffffff;
}

.image-wrapper img {
  max-width: 100%;
  max-height: 85vh;
  width: auto;
  height: auto;
  object-fit: contain;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Home Page - Full Screen Gallery */
.home-gallery {
  column-count: 4;
  column-gap: 16px;
  padding: 20px 16px;
  width: 100%;
  min-height: calc(100vh - 20vh);
  background-color: #ffffff;
}

.home-gallery .pin {
  display: inline-block;
  width: 100%;
  margin-bottom: 16px;
  break-inside: avoid;
  page-break-inside: avoid;
  background-color: #ffffff;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.home-gallery .pin:hover {
  transform: scale(1.02);
}

.home-gallery img {
  width: 100%;
  height: auto;
  display: block;
  background-color: #efefef;
}

/* Filters Container */
.filters-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 20px;
  padding: 20px;
  background-color: #f8f8f8;
  border-bottom: 1px solid #e0e0e0;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.filter-group label {
  font-weight: 500;
  color: #000000;
}

.filter-select {
  padding: 8px 12px;
  border: 1px solid #000000;
  background-color: #ffffff;
  color: #000000;
  font-size: 14px;
  cursor: pointer;
  min-width: 150px;
}

.filter-select:hover {
  background-color: #f0f0f0;
}

.clear-filters {
  padding: 8px 16px;
  background-color: #ffffff;
  border: 2px solid #000000;
  color: #000000;
  cursor: pointer;
  font-size: 14px;
  transition: background-color 0.2s ease;
}

.clear-filters:hover {
  background-color: #f0f0f0;
}

/* Responsive filters */
@media (max-width: 768px) {
  .filters-container {
    flex-direction: column;
    gap: 10px;
  }

  .filter-group {
    width: 100%;
    justify-content: space-between;
  }

  .filter-select {
    flex: 1;
  }

  .home-gallery {
    column-count: 2;
  }
}

@media (max-width: 480px) {
  .home-gallery {
    column-count: 1;
  }
}

/* Painting Page */
.painting-page {
  padding: 70px;
  max-width: 1400px;
  margin: 0 auto;
  min-height: calc(100vh - 7vh);
}

.painting-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin-top: 20px;
}

.painting-image-section {
  position: relative;
}

.image-zoom-container {
  position: relative;
  width: 100%;
  background-color: #f8f8f8;
  border: 1px solid #e0e0e0;
  overflow: hidden;
  min-height: 500px;
  display: flex;
  align-items: center;
  justify-content: center;
}

#painting-image {
  max-width: 100%;
  max-height: 80vh;
  width: auto;
  height: auto;
  object-fit: contain;
  transition: transform 0.3s ease;
  cursor: zoom-in;
}

.zoom-controls {
  position: absolute;
  bottom: 20px;
  right: 20px;
  display: flex;
  gap: 10px;
  background-color: rgba(255, 255, 255, 0.9);
  padding: 10px;
  border-radius: 5px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.zoom-btn {
  width: 40px;
  height: 40px;
  border: 1px solid #000000;
  background-color: #ffffff;
  color: #000000;
  font-size: 20px;
  cursor: pointer;
  transition: background-color 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.zoom-btn:hover {
  background-color: #f0f0f0;
}

.painting-info-section {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.painting-title {
  font-size: 2.5em;
  font-weight: bold;
  color: #000000;
  margin: 0;
}

.painting-details {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.detail-row {
  display: flex;
  padding-bottom: 10px;
  border-bottom: 1px solid #e0e0e0;
}

.detail-label {
  font-weight: 600;
  color: #000000;
  min-width: 150px;
}

.detail-value {
  color: #333333;
  flex: 1;
}

.painting-description,
.painting-history {
  line-height: 1.6;
}

.painting-description h2,
.painting-history h2 {
  font-size: 1.5em;
  margin-bottom: 15px;
  color: #000000;
}

.painting-description p,
.painting-history p {
  color: #333333;
  margin: 0;
}

.painting-price-section {
  padding: 20px;
  background-color: #f8f8f8;
  border: 2px solid #000000;
  border-radius: 5px;
}

.price-display {
  display: flex;
  align-items: center;
  gap: 15px;
}

.price-label {
  font-size: 1.2em;
  font-weight: 600;
  color: #000000;
}

.price-value {
  font-size: 1.5em;
  font-weight: bold;
  color: #000000;
}

.contact-button {
  padding: 15px 30px;
  background-color: #000000;
  color: #ffffff;
  border: none;
  font-size: 1.2em;
  font-weight: bold;
  cursor: pointer;
  transition:
    background-color 0.3s ease,
    transform 0.2s ease;
  text-align: center;
  width: 100%;
}

.contact-button:hover {
  background-color: #333333;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.contact-button:active {
  transform: translateY(0);
}

/* Responsive Painting Page */
@media (max-width: 1200px) {
  .painting-content {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .image-zoom-container {
    min-height: 400px;
  }

  #painting-image {
    max-height: 60vh;
  }
}

@media (max-width: 768px) {
  .painting-title {
    font-size: 2em;
  }

  .detail-row {
    flex-direction: column;
    gap: 5px;
  }

  .detail-label {
    min-width: auto;
  }

  .zoom-controls {
    bottom: 10px;
    right: 10px;
    padding: 5px;
  }

  .zoom-btn {
    width: 35px;
    height: 35px;
    font-size: 18px;
  }
}

/* Увеличиваем шрифт в описании */
.painting-history-text {
  font-size: 2rem; /* Можно увеличить до 1.3rem, 1.4rem или даже 1.5rem */
  line-height: 1.6;
  color: #333;
}

/* Дополнительно — можно увеличить заголовок "Описание:" */
.painting-info-section h2 {
  font-size: 1.4rem;
  margin-bottom: 0.5rem;
}

/* Стили для видео в галерее — чтобы оно вело себя как картинка */
.gallery video.m-p-g {
  width: 100%;
  height: auto;
  display: block;
  background-color: #efefef;
  object-fit: cover; /* или object-fit: contain — зависит от желаемого эффекта */
  object-position: center;
}
