/* ===== Шапка галереи ===== */

.gallery-header {
    display: flex;
    align-items: baseline;
    justify-content: center;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 4px;
    position: relative;
}

.gallery-header .section_Title {
    width: 100%;
    text-align: center;
}

.gallery-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    gap: 8px;
    font-size: 12px;
    color: var(--text);
    opacity: 0.45;
    font-family: "Vrc", sans-serif;
    padding-bottom: 0;
    margin-bottom: 0;
}

.gallery-meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.gallery-meta-sep {
    opacity: 0.4;
}

/* ===== Группировка по месяцам ===== */
.gallery-month-group {
    margin-bottom: 28px;
}

.gallery-month-label {
    font-family: "Pixy", sans-serif;
    font-size: 13px;
    text-transform: uppercase;
    color: var(--text);
    opacity: 0.55;
    letter-spacing: 1px;
    margin-bottom: 10px;
    padding-bottom: 5px;
    border-bottom: 1px solid var(--border);
    user-select: none;
}

/* ===== Сетка галереи ===== */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 15px;
}

/* ===== Карточка ===== */
.gallery-item {
    display: flex;
    flex-direction: column;
    cursor: pointer;
    background: var(--colorBlock1);
    border: 1px solid transparent;
    padding: 0;
    transition: background 0.12s, border-color 0.12s;
    image-rendering: pixelated;
}

.gallery-item:hover {
    background: var(--colorBlock2);
    border-color: var(--hoverBorder);
}

/* Шапка карточки (автор и дата) */
.gallery-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    border-bottom: 1px solid var(--border);
}

.gallery-item-author {
    font-family: "Pixy", sans-serif;
    font-size: 18px;
    text-transform: uppercase;
    color: var(--text-primary, #fff);
    text-decoration: none;
    letter-spacing: 0.5px;
}

.gallery-item-author:hover {
    color: var(--hoverColor);
}

.gallery-item-date {
    font-family: "Vrc", sans-serif;
    font-size: 11px;
    color: var(--text);
    opacity: 0.5;
}

/* Превью */
.gallery-item-thumb {
    position: relative;
    overflow: hidden;
    flex: 1;
    min-height: 200px;
}

.gallery-item-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.25s ease;
    will-change: transform;
}

.gallery-item:hover .gallery-item-thumb img {
    transform: scale(1.02);
}

/* Подпись снизу с автором */
.gallery-item-caption {
    font-family: "Vrc", sans-serif;
    font-size: 14px;
    color: var(--text);
    padding: 12px 14px;
    border-top: 1px solid var(--border);
    transition: opacity 0.12s;
}

.gallery-item-caption a {
    color: var(--text-primary, #fff);
    text-decoration: none;
    font-family: "Pixy", sans-serif;
    font-size: 12px;
    text-transform: uppercase;
    margin-right: 4px;
}

.gallery-item:hover .gallery-item-caption {
    opacity: 1;
}

/* Пустая галерея */
.gallery-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    color: var(--text);
    opacity: 0.4;
    font-size: 16px;
    text-align: center;
    gap: 5px;
}

.gallery-empty a {
    color: var(--hoverColor);
    text-decoration: none;
}

.gallery-empty a:hover {
    text-decoration: underline;
}

