/* === Общие стили === */

body {
  margin: 0;
  font-family: 'Ubuntu_Condensed', sans-serif;
  color: #333;
  background-color: #f9f9f9;
}

a {
  color: #d42800;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

img {
  display: block;
  height: auto;
  max-width: 100%;
  border-radius: 0px;
}

.wrapper {
  max-width: 960px;
  margin: auto;
  padding: 0 1rem;
}

/* === Шапка (темная) === */

.site-header {
  background: linear-gradient(to bottom, #202020, #505050);
  color: white;
  padding: 0.8rem 0; /* Уменьшили высоту */
}

.header-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 960px;
  margin: auto;
  padding: 0 1rem;
}

.site-logo {
  height: 24px;
  width: auto;
  vertical-align: middle;
  margin-right: 0.5rem;
}

.site-title {
  display: flex;
  align-items: center;
  margin: 0;
  font-size: 1.4rem;
  font-weight: 600;
  color: white;
  text-decoration: none;
  font-family: 'Baumans', monospace;
  letter-spacing: 1px;
}

.site-title a {
  color: white;
  text-decoration: none;
}

.site-nav {
  display: flex;
  gap: 1rem;
}

.nav-link {
  color: #c6c6c6;
  text-decoration: none;
  font-weight: 400;
  transition: color 0.2s ease;
}

.nav-link:hover {
  color: white;
}

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

/* === Бургер-меню для мобильных устройств === */

.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 24px;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 1000;
}

.menu-toggle span {
  width: 100%;
  height: 3px;
  background-color: white;
  border-radius: 2px;
}

@media (max-width: 768px) {
  .menu-toggle {
    display: flex;
    right: 2rem;
    top: 1.5rem;
  }

  .site-nav {
    position: fixed;
    top: 60px;
    left: 0;
    width: 100%;
    background-color: #1e1e1e;
    flex-direction: column;
    align-items: center;
    display: none;
    padding: 1rem 0;
  }

  .site-nav.show {
    display: flex;
  }
}

/* === Основной контент (светлый фон) === */

.page-content {
  background-color: #ffffff;
  padding: 2rem 0;
  border-top: 1px solid #e0e0e0;
  border-bottom: 1px solid #e0e0e0;
}

/* === Галерея картины (сетка из 2 колонок) === */

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  padding: 2rem;
}

.painting {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  margin-bottom: 2rem;
  padding: 1.5rem;
  text-align: center;
  border: 1px solid #eee;
}

.painting h2 {
  margin: 0 0 0.5rem;
  font-size: 1.2rem;
  font-weight: 600;
  color: #1e1e1e;
}

.painting p {
  margin: 0 0 1rem;
  color: #666;
  font-size: 0.95rem;
}

.thumbnail {
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: 0px;
  object-fit: contain;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.thumbnail:hover {
  transform: scale(1.02);
}

/* === Страница картины === */

.painting-images {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

/* === Полноэкранный просмотр картинок === */

.modal {
  display: none;
  position: fixed;
  z-index: 9999;
  padding-top: 60px;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.9);
}

.modal-content {
  margin: auto;
  display: block;
  max-width: 90%;
  max-height: 85vh;
  border-radius: 8px;
  transition: transform 0.3s ease;
}

/* Кнопки навигации */
.modal-prev,
.modal-next {
  cursor: pointer;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(0, 0, 0, 0.4); /* Прозрачные кнопки */
  border: none;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  transition: background-color 0.3s ease;
}

.modal-prev:hover,
.modal-next:hover {
  background-color: rgba(0, 0, 0, 0.6);
}

.modal-prev {
  left: 20px;
}

.modal-next {
  right: 20px;
}

/* Кнопка закрытия */
.modal-close {
  position: absolute;
  top: 20px;
  right: 40px;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 2000;
}

/* === Футер (десктоп) === */

.site-footer {
  background: linear-gradient(to bottom, #505050, #202020);
  color: #6f6f6f;
  padding: 1rem 0;
  font-size: 0.85rem;
}

.footer-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 960px;
  margin: auto;
  padding: 0 1rem;
  gap: 1rem;
}

.footer-logo-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.footer-logo {
  height: 64px;
  width: auto;
  vertical-align: middle;
}

.footer-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-grow: 1;
  justify-content: center;
  white-space: nowrap;
}

.footer-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: white;
  font-family: 'Baumans', monospace;
  text-decoration: none;
}

.footer-separator {
  color: #c6c6c6;
}

.footer-copyright {
  white-space: nowrap;
  color: #6f6f6f;
}

/* === Футер (для мобильных устройств) === */

@media (max-width: 768px) {
  .footer-container {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1rem;
  }

  .footer-logo {
    height: 64px;
    margin-bottom: 0.5rem;
  }

  .footer-info {
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    text-align: center;
  }

  .footer-separator {
    display: none;
  }

  .footer-copyright {
    text-align: center;
    font-size: 0.9rem;
    white-space: nowrap;
  }
}

/* === Адаптивность для мобильных устройств === */

@media (max-width: 600px) {
  .nav-link {
    margin: 0 0.5rem;
    font-size: 0.9rem;
  }

  .painting h2 {
    font-size: 1rem;
  }

  .thumbnail {
    max-width: 100%;
  }

  .modal-prev,
  .modal-next {
    width: 40px;
    height: 40px;
  }

  .modal-close {
    right: 20px;
    top: 15px;
  }
}

/* === Ссылки на маркетплейсы с иконками === */

.marketplace-links {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
}

.marketplace-link {
  display: inline-flex;
  align-items: center;
  background-color: #f0f0f0;
  color: #333;
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  font-size: 0.85rem;
  transition: background-color 0.3s ease;
  text-decoration: none;
  gap: 0.5rem;
}

.marketplace-link:hover {
  background-color: #e0e0e0;
}

.marketplace-icon {
  width: 16px;
  height: 16px;
  vertical-align: middle;
}

/* === Форма связи === */

form {
  max-width: 600px;
  margin-bottom: 2rem;
}

.form-group {
  display: block;
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.form-group input,
.form-group textarea {
  display: block;
  width: 100%;
  padding: 0.75rem;
  border-radius: 6px;
  border: 1px solid #ccc;
  background-color: #fff;
  color: #1e1e1e;
  font-size: 1rem;
}

.form-group textarea {
  resize: vertical;
  min-height: 100px;
}

/* === Ссылки на контактные площадки === */

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

.contact-links li {
  margin-bottom: 0.5rem;
}

.contact-links a {
  color: #0078d4;
  text-decoration: none;
}

.contact-links a:hover {
  text-decoration: underline;
}

/* === Разделы на главной странице === */

section {
  padding: 2rem 0;
  scroll-margin-top: 60px; /* Чтобы меню не закрывало заголовок при скролле */
  background-color: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  margin-bottom: 2rem;
  border-radius: 10px;
  overflow: hidden;
}

.wrapper {
  max-width: 960px;
  margin: auto;
  padding: 0 1rem;
}

h2 {
  text-align: center;
  margin: 0;
  padding: 0.75rem 0;
  background-color: #f0f0f0;
  color: #1e1e1e;
  font-size: 1.2rem;
}

.view-more {
  text-align: center;
  margin: 1rem 0;
}

.view-more a {
  font-weight: 500;
  transition: opacity 0.3s ease;
}

.view-more a:hover {
  opacity: 0.7;
}

/* === Блок "О себе" с эффектом растворения === */

.fade-bottom-text {
  position: relative;
  padding-bottom: 40px;
}

.fade-bottom-text::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 40px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0), #f9f9f9);
  pointer-events: none;
  z-index: -1;
}

@media (prefers-color-scheme: dark) {
  .fade-bottom-text::after {
    background: linear-gradient(to bottom, rgba(16, 16, 16, 0), #1e1e1e);
  }
}

/* === Галерея с горизонтальной прокруткой === */

.gallery-scroll {
  display: flex;
  overflow-x: auto;
  gap: 1rem;
  padding: 1rem;
}

.thumbnail-card {
  flex: 0 0 200px;
  background: #fff;
  border-radius: 0px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  text-align: center;
  transition: transform 0.3s ease;
}

.thumbnail-card:hover {
  transform: scale(1.02);
}

.thumbnail-card img {
  max-width: 100%;
  border-radius: 0px;
}

.thumbnail-card p {
  margin: 0.5rem 0;
  font-size: 0.95rem;
  color: #333;
}

/* === Статьи с горизонтальной прокруткой === */

.articles-scroll {
  display: flex;
  overflow-x: auto;
  gap: 1rem;
  padding: 1rem;
}

.article-card {
  flex: 0 0 250px;
  background: #f4f4f4;
  padding: 1rem;
  border-radius: 8px;
  min-height: 100px;
  transition: transform 0.3s ease;
}

.article-card:hover {
  transform: scale(1.02);
}

.article-card h3 {
  margin-top: 0;
  font-size: 1.1rem;
  font-weight: 600;
}

.article-card p {
  font-size: 0.9rem;
  color: #555;
}

/* === Контакты === */

.contact-icons {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  font-size: 1.5rem;
  margin: 1rem 0;
}

.contact-icons a {
  color: #0078d4;
  transition: color 0.3s ease;
}

.contact-icons a:hover {
  color: #005fa3;
}

/* === Секция "Статьи" === */

.articles-list {
  max-width: 960px;
  margin: auto;
  padding: 2rem 1rem;
}

.article-item {
  background-color: #f9f9f9;
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease;
  border-left: 4px solid #0078d4;
}

.article-item:hover {
  transform: scale(1.01);
  background-color: #f4f4f4;
}

.article-item h2 a {
  color: #1e1e1e;
  text-decoration: none;
}

.article-item h2 a:hover {
  text-decoration: underline;
}

.article-item p {
  color: #666;
}

/* === Метаданные статей === */

.meta {
  font-size: 0.9rem;
  color: #666;
  margin-top: 0.5rem;
}

.meta small {
  font-style: italic;
}
