/* Общие стили */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Montserrat', sans-serif;
  line-height: 1.6;
  color: #444;
  background: #f2f2f2;
}

/* Заголовок сайта */
header {
  text-align: center;
  margin: 20px 0 20px;
}

header h1 {
  font-family: 'Playfair Display', serif;
  font-size: 2.5rem;
  font-weight: 700;
  color: #1a1a1a;
  letter-spacing: 1px;
}

header p {
  font-size: 1.1rem;
  color: #666;
  margin-top: 8px;
}

/* Навигационное меню */
.main-nav {
  display: flex;
  justify-content: center;
  gap: 32px;
  margin: 20px 0 0;
  padding: 0 20px;
  font-family: 'Montserrat', sans-serif;
  font-weight: 500;
  font-size: 1.05rem;
}

.nav-link {
  color: #555;
  text-decoration: none;
  padding: 8px 0;
  position: relative;
  transition: color 0.3s ease;
}

.nav-link:hover {
  color: #000;
}

.nav-link.active {
  color: #000;
  font-weight: 600;
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: #000;
  border-radius: 1px;
}

/* Сетка галереи */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 32px;
  margin: 40px auto;
  padding: 0 20px;
}

/* Карточка картины */
.gallery-item {
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  min-height: 0;
}

/* Ссылка ТОЛЬКО на изображение */
.img-link {
  display: block;
  border-radius: 12px 12px 0 0;
  overflow: hidden;
}

/* Контейнер изображения */
.img-container {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  background: #f8f8f8;
  display: flex;
  align-items: center;
  justify-content: center;
  marign: 10px;
}

.img-container img {
  width: 90%;
  height: 90%;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.img-container:hover img {
  transform: scale(1.5);
}

/* Оверлей с названием */
.overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  color: #fff;
  font-size: 1.2rem;
  font-family: 'Playfair Display', serif;
  font-weight: 500;
  text-align: center;
  padding: 20px;
  pointer-events: none;
}

.img-container:hover .overlay {
  opacity: 1;
}

/* Подпись (не кликабельна) */
.caption {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 90px;
  flex: 1;
}

.caption h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  color: #1a1a1a;
  margin: 0;
  font-weight: 600;
}

.meta {
  font-size: 0.95rem;
  color: #666;
  margin: 0;
}

/* Иконки маркетов */
.market-icons {
  display: flex;
  justify-content: center;
  gap: 12px;
  padding: 10px 0 20px;
  background: #f8f8f8;
  border-top: 1px solid #eee;
}

.market-icons a.market-img-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid #e0e0e0;
  transition: all 0.3s ease;
}

.market-icons a.market-img-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  border-color: #ccc;
}

.market-icon {
  width: 24px;
  height: 24px;
  object-fit: contain;
  opacity: 0.9;
}

/* Страница отдельной картины */
.artwork-container {
  margin: 20px;
  padding: 20px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.artwork-header {
  text-align: center;
  margin-bottom: 30px;
}

.artwork-header h1 {
  font-family: 'Playfair Display', serif;
  font-size: 2.2rem;
  color: #1a1a1a;
  margin-bottom: 8px;
}

.artwork-meta {
  font-size: 1rem;
  color: #666;
  margin-bottom: 20px;
}

.artwork-images {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
  margin: 30px 0;
}

.artwork-images img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  background: #f8f8f8;
  padding: 10px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  cursor: pointer;
  border: 1px solid #eee;
}

.artwork-description {
  margin: 30px 0;
  line-height: 1.8;
  color: #444;
  font-size: 1.05rem;
}

.artwork-links {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin: 20px 0;
  flex-wrap: wrap;
}

.artwork-links a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 10px;
  font-size: 0.95rem;
  text-decoration: none;
  background: #f8f8f8;
  color: #333;
  border: 1px solid #ddd;
  transition: all 0.3s;
}

.artwork-links a:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.artwork-links a[href*="ozon"] {
  color: #757575;
  border-color: #999999;
}

.artwork-links a[href*="ozon"]:hover {
  color: #00000;
  border-color: #000000;
  background: #eeeeee;
}

.artwork-links a[href*="avito"] {
  color: #757575;
  border-color: #999999;
}

.artwork-links a[href*="avito"]:hover {
  color: #000000;
  border-color: #000000;
  background: #eeeeee;
}

/* Нижняя навигация */
.artwork-button-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #f5f5f5;
    width: 100%;
    box-sizing: border-box;
}

.artwork-btn {
    padding: 0 20px 0 20px;
    font-size: 16px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
    font-weight: 500;
    font-size: 1.1rem;
    text-decoration: none;
    text-align: center;
}

.artwork-btn:hover {
    color: #000;
}

.artwork-left-btn {
    color: #555;
}

.artwork-center-btn {
    color: #555;
    margin: 0 auto; /* центрируем, если нужно дополнительное выравнивание */
}

.artwork-right-btn {
    color: #555;
}

/* Футер */
.footer {
  text-align: center;
  margin: 20px;
  padding: 20px 20px;
  background: #1a1a1a;
  color: #ccc;
  border-radius: 12px;
  font-size: 0.95rem;
}

.footer p {
  margin-bottom: 16px;
  color: #eee;
  font-size: 1.05rem;
}

.footer .contacts {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.footer .contacts a {
  color: #aaa;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: color 0.3s;
}

.footer .contacts a:hover {
  color: #fff;
}

.footer .copyright {
  font-size: 0.85rem;
  color: #777;
}

.contact-link {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #aaa;
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.3s ease;
}

.contact-link:hover {
  color: #fff;
}

.footer-icon {
  width: 24px;
  height: 24px;
  object-fit: contain;
  opacity: 0.8;
  filter: invert(1);
}

.footer-icon:hover {
  opacity: 1.0;
}

@media (max-width: 768px) {
  .footer .contacts {
    flex-direction: column;
    gap: 16px;
  }

  .contact-link span {
    font-size: 1rem;
  }
}

/* Лайтбокс (просмотр фото) */
.lightbox {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(245, 245, 245, 0.95);
  justify-content: center;
  align-items: center;
  flex-direction: column;
  backdrop-filter: blur(4px);
}

.lightbox-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 90vw;
  max-height: 90vh;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  padding: 10px;
}

.lightbox-content img {
  max-width: 100%;
  max-height: calc(80vh - 80px);
  object-fit: contain;
  border-radius: 8px;
  background: #fff;
}

.lightbox-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  max-width: 90%;
  margin-top: 12px;
  color: #333;
  font-size: 1.1rem;
  font-family: 'Montserrat', sans-serif;
}

.lightbox-nav button {
  background: #f0f0f0;
  border: 1px solid #ddd;
  color: #333;
  width: 50px;
  height: 50px;
  border-radius: 8px;
  font-size: 1.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.lightbox-nav button:hover {
  background: #000;
  color: #fff;
  border-color: #000;
}

.lightbox-close {
  position: absolute;
  top: -50px;
  right: 0;
  color: #333;
  font-size: 30px;
  font-weight: bold;
  cursor: pointer;
  background: #f0f0f0;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #ddd;
  transition: all 0.3s ease;
}

.lightbox-close:hover {
  background: #000;
  color: #fff;
  border-color: #000;
}

.lightbox-counter {
  color: #555;
  font-size: 1rem;
}

/* Адаптив */
@media (max-width: 768px) {
  header h1 {
    font-size: 2rem;
  }

  .gallery-grid {
    gap: 24px;
    padding: 0 16px;
  }

  .gallery-item {
    min-height: auto;
  }

  .caption {
    min-height: 80px;
    padding: 16px;
  }

  .caption h3 {
    font-size: 1.2rem;
  }

  .meta {
    font-size: 0.9rem;
  }

  .artwork-navigation {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .nav-buttons {
    flex-direction: column;
    width: 100%;
    max-width: 300px;
  }

  .nav-btn {
    width: 100%;
  }

  .gallery-link {
    order: -1;
    margin-bottom: 10px;
  }

  .footer .contacts {
    flex-direction: column;
    gap: 12px;
  }
}

@media (max-width: 500px) {
  .market-icons a.market-img-link {
    width: 36px;
    height: 36px;
  }

  .market-icon {
    width: 22px;
    height: 22px;
  }
}

/* Страница статей */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 32px;
  margin: 40px auto;
  padding: 0 20px;
}

.article-card {
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  text-decoration: none;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.article-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.12);
}

.article-img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-bottom: 1px solid #eee;
  filter: grayscale(50%);
}

.article-card:hover .article-img {
  filter: grayscale(0%);
}


.article-content {
  padding: 20px;
}

.article-content h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  color: #1a1a1a;
  margin-bottom: 10px;
}

.article-preview {
  font-size: 0.95rem;
  color: #555;
  line-height: 1.5;
}

.article-date {
  display: block;
  font-size: 0.85rem;
  color: #888;
  font-weight: 400;
  margin-bottom: 6px;
  font-family: 'Montserrat', sans-serif;
}

/* Адаптив */
@media (max-width: 768px) {
  .articles-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .article-content h3 {
    font-size: 1.2rem;
  }
}

/* Страница статьи */
.one-article-page {
  margin: 20px;
  padding: 0;
}

.one-article-content {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  padding: 40px;
}

.one-article-header {
  text-align: center;
  margin-bottom: 20px;
}

.one-article-header h1 {
  font-family: 'Playfair Display', serif;
  font-size: 2.2rem;
  color: #1a1a1a;
  margin: 10px 0;
}

.one-article-date {
  display: block;
  font-size: 0.9rem;
  color: #777;
  font-weight: 400;
  margin-bottom: 10px;
  text-align: right;
}

.one-article-image-container {
  margin: 20px 0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}

.one-article-full-image {
  width: 100%;
  height: auto;
  display: block;
}

.one-article-text {
  line-height: 1.8;
  color: #444;
  font-size: 1.05rem;
}

.one-article-text p {
  margin-bottom: 0px;
}

.one-article-back-link {
  text-align: center;
  margin: 20px 0 20px;
}

.one-article-back-link a {
  color: #555;
  text-decoration: none;
  font-weight: 500;
  font-size: 1.1rem;
}

.one-article-back-link a:hover {
  color: #000;
}

/* Страница "Обо мне" */
.about-content {
  margin: 40px 20px 40px 20px;
  padding: 0;
  line-height: 1.8;
  color: #444;
  font-size: 1.05rem;
}

/* Пара текст + фото */
.text-image-pair {
  display: flex;
  align-items: center;
  gap: 40px;
  margin: 40px;
  flex-wrap: wrap;
}

.text-image-pair img {
  width: 280px;
  height: 280px;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
  flex-shrink: 0;
}

.text-image-pair p {
  margin: 0;
  flex: 1;
  font-size: 1.05rem;
  color: #444;
}

/* Адаптив: на мобильных — фото сверху или под текстом */
@media (max-width: 768px) {
  .text-image-pair {
    flex-direction: column;
    text-align: center;
    gap: 20px;
  }

  .text-image-pair img {
    width: 240px;
    height: 240px;
  }

  .about-content p {
    font-size: 1rem;
  }
}

