/* assets/css/pdf-gallery.css */
.pdf-gallery {
    display: grid;
    /* Строго 6 колонок одинаковой ширины */
    grid-template-columns: repeat(6, 1fr);
    gap: 15px; /* Немного уменьшили отступ, чтобы всё влезло аккуратно */
    padding: 20px 0;
    font-family: Arial, sans-serif;
    width: 100%;
}

.pdf-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    transition: transform 0.2s, box-shadow 0.2s;
    height: 100%; /* Чтобы все карточки были одинаковой высоты */
    box-sizing: border-box;
}

.pdf-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.1);
}

/* Делаем саму ссылку обёрткой для всего содержимого */
.pdf-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    height: 100%;
    font-size: 13px; /* Слегка уменьшили шрифт, чтобы длинный текст не ломал карточку */
    color: #0066cc;
    text-decoration: none;
    font-weight: bold;
    line-height: 1.3;
}

.pdf-link:hover {
    color: #004499;
}

.pdf-cover {
    width: 100%;
    /* Используем пропорцию обложки A4 вместо фиксированной высоты */
    aspect-ratio: 1 / 1.4; 
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 10px;
    border: 1px solid #eee;
}

/* Адаптированность для мобильных устройств (чтобы на телефонах 6 штук не сжимались в микро-щели) */
@media (max-width: 992px) {
    .pdf-gallery {
        grid-template-columns: repeat(3, 1fr); /* На планшетах: 2 ряда по 3 шт */
    }
}

@media (max-width: 576px) {
    .pdf-gallery {
        grid-template-columns: repeat(2, 1fr); /* На телефонах: 3 ряда по 2 шт */
    }
}