.gallery {background: #ffffff;
	display: flex;
    justify-content: center;
}

.art {
	max-width:1000px;
}

.gallery-grid {
	display: flex;
	flex-wrap: wrap;
	gap: 20px;
	justify-content: center;
	margin-top:20px;
}
.gallery-card {
	border: 1px solid #ddd;
	border-radius: 8px;
	padding: 12px;
	max-width: 300px;
	cursor: pointer;
	background: #fff;
	transition: transform 0.2s, box-shadow 0.2s;
}
.gallery-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
.gallery-card h3 {
	margin: 0 0 10px 0;
	font-size: 0.8rem;
	color: #333;
}
.gallery-card img {
	max-width: 100%;
	height: auto;
	display: block;
	margin: 0 auto;
	border-radius: 4px;
}
/* Стили для полноэкранного просмотра */
.art-modal {
	display: none;
	position: fixed;
	z-index: 9999;
	top: 0;
	left: 0;
	width: 100vw;
	height: 100vh;
	background-color: rgba(0, 0, 0, 0.85);
	overflow: auto; /* Добавляет прокрутку, если картинка больше экрана */
	padding: 20px;
	box-sizing: border-box;
	cursor: zoom-in; 
}

.art-modal img.zoomed {
  max-width: none;
  max-height: none;
  cursor: zoom-out; /* Курсор-лупа с минусом */
}

.art-modal img {
  margin: auto;
  display: block; /* Убирает лишний нижний отступ, характерный для строчных картинок */
  
  /* Адаптация под размер экрана с отступами по краям */
  max-width: 90vw; 
  max-height: 80vh;
  
  /* Сохранение пропорций */
  width: auto;
  height: auto;
  
  /* Включает рамку (border) в общие размеры, чтобы картинка не вылезала за 90vw/90vh */
  box-sizing: border-box; 
  
  box-shadow: 0 0 25px rgba(0, 0, 0, 0.8);
  border: 20px solid #ffffff;
  border-radius: 4px;
}


/* Убедитесь, что у модального окна задано направление в колонку */
.art-modal.open {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Панель навигации под изображением */
.art-modal-nav {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 15px;
    padding: 8px 20px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 6px;
}

.art-modal-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 0 0 15px 0;
    padding: 0;
}

.art-modal-title {
    color: #ffffff;
    margin: 0 !important;
    padding: 0 !important;
    font-size: 1.4rem;
    line-height: 1 !important;
}

.art-modal-close {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 !important;
    padding: 0 !important;
    color: #ffffff;
    cursor: pointer;
    user-select: none;
    transition: color 0.2s;
}


.art-modal-close:hover {
    color: #ffd700;
}

/* Сами ссылки */
.art-modal-nav a {
    color: #ffffff;
    text-decoration: none;
    font-size: 1.1rem;
    cursor: pointer;
    user-select: none;
}

.art-modal-nav a:hover {
    color: #ffd700;
}

.art-modal-title {
    color: #ffffff;
    margin: 0 0 15px 0;
    font-size: 1.4rem;
    text-align: center;
}
