:root {
    --bg-color: #f4f6f9;
    --card-bg: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --primary: #0284c7;
    --primary-hover: #0369a1;
    --secondary: #f8fafc;
    --secondary-hover: #e2e8f0;
    --border: #e2e8f0;
    --radius: 10px;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.5;
    __padding: 40px 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Шапка страницы */
.page-header {
    text-align: center;
    margin-bottom: 40px;
}

.page-title {
    font-size: 2.25rem;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.025em;
}

.page-subtitle {
    color: var(--text-muted);
    margin-top: 8px;
    font-size: 1.1rem;
}

/* Сетка карточек */
.brochure-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

/* Карточка */
.brochure-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.brochure-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* Верхняя часть: Метаданные */
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
}

.brochure-code {
    background: #0f172a;
    color: #ffffff;
    padding: 4px 10px;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 5px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.brochure-author {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
    max-width: 150px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Тело карточки */
.card-body {
    padding: 20px;
    flex-grow: 1;
}

.brochure-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 10px;
    line-height: 1.3;
}

.brochure-description {
    color: var(--text-muted);
    font-size: 0.9rem;
    display: -webkit-box;
    -webkit-line-clamp: 4; /* Ограничение описания до 4 строк */
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Подвал карточки */
.card-footer {
    padding: 16px 20px;
    background: #f8fafc;
    border-top: 1px solid var(--border);
    border-bottom-left-radius: var(--radius);
    border-bottom-right-radius: var(--radius);
    display: flex;
    gap: 10px;
}

/* Кнопки */
.btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 14px;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.btn-primary {
    background-color: var(--primary);
    color: #ffffff;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
}

.btn-secondary {
    background-color: var(--secondary);
    color: var(--text-main);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background-color: var(--secondary-hover);
}

/* Модальное окно */
.modal {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(2px);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.modal.active { display: flex; }

.modal-content {
    background: #ffffff;
    width: 100%;
    max-width: 1050px;
    height: 85vh;
    border-radius: var(--radius);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 20px;
    border-bottom: 1px solid var(--border);
    background: var(--secondary);
}

.modal-title { font-weight: 700; color: #0f172a; }

.close-modal-btn {
    background: none; border: none; font-size: 1.5rem; cursor: pointer; color: var(--text-muted);
}

.close-modal-btn:hover { color: #ef4444; }

.modal-body { flex-grow: 1; background: #475569; }

#pdf-viewer { width: 100%; height: 100%; display: block; }

.no-data { text-align: center; color: var(--text-muted); padding: 40px; grid-column: 1 / -1; }

/* Адаптивность для мобильных телефонов */
@media (max-width: 480px) {
    .card-footer {
        flex-direction: column;
    }
    .btn {
        width: 100%;
    }
}

/* Подвал */
.site-footer {
  background: #1f2937;
  color: #9ca3af;
  padding: 24px 0;
  margin-top: 48px;
}

.footer-content {
  text-align: center;
}
.site-footer .block7_l .r1 img {
  width: 33%;
}


