/* assets/css/page-blocks.css
 *
 * Общие блоки страниц-разделов: /authors, /new-books, /bestsellers, /preorders,
 * /collaboration, /partnership, /other. Подключается через pgh_css_link()
 * из includes/page_helpers.php. Цвета — переменные из /css/global.css.
 * Все классы с префиксом pgh-/au- — чтобы не пересечься со стилями других страниц.
 */

/* ---------- Шапка раздела ---------- */
.pgh-hero {
    background: linear-gradient(120deg, var(--hero-from, var(--dark-teal)), var(--hero-to, var(--dark-cyan)));
    color: #fff;
    padding: 52px 20px;
    text-align: center;
}
.pgh-hero h1 {
    font-family: 'PT Serif', serif;
    font-size: 2.1rem;
    margin: 0 0 10px;
}
.pgh-hero p {
    max-width: 660px;
    margin: 0 auto;
    opacity: .95;
    line-height: 1.6;
}

/* ---------- Контейнеры и заголовки ---------- */
.pgh-wrap { max-width: 1200px; margin: 0 auto; padding: 34px 20px 60px; width: 100%; }
.pgh-wrap--narrow { max-width: 900px; }
.pgh-title {
    font-family: 'PT Serif', serif;
    color: var(--ink-black);
    font-size: 1.5rem;
    margin: 0 0 18px;
}
.pgh-lead { color: #444; line-height: 1.75; max-width: 780px; margin: 0 0 28px; }
.pgh-empty {
    background: #f5f5f5;
    border-radius: 14px;
    padding: 36px;
    text-align: center;
    color: #666;
}
.pgh-empty a, .pgh-note a { color: var(--dark-cyan); font-weight: 600; }
.pgh-note {
    margin-top: 34px;
    padding: 16px 20px;
    background: #eef6f6;
    border-radius: 12px;
    color: #355;
    font-size: 14.5px;
}

/* ---------- Каталожные страницы ---------- */
.pgh-cell { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.pgh-cell .product-card { height: auto; flex: 1; }
.pgh-release {
    background: var(--golden-orange);
    color: var(--ink-black);
    border-radius: 8px;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 700;
    text-align: center;
}

/* ---------- Пагинация ---------- */
.pgh-pagination { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 30px 0 10px; }
.pgh-pagination a, .pgh-pagination .gap {
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 14px;
    text-decoration: none;
    background: #f0f4f4;
    color: var(--ink-black);
}
.pgh-pagination .gap { background: none; color: #999; padding: 8px 4px; }
.pgh-pagination a:hover { background: #dfeaea; }
.pgh-pagination a.active { background: var(--dark-cyan); color: #fff; }

/* ---------- Авторы ---------- */
.pgh-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; border-bottom: 2px solid #e6eeee; }
.pgh-tabs a {
    text-decoration: none;
    color: #567;
    padding: 10px 18px;
    font-weight: 600;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
}
.pgh-tabs a.active { color: var(--dark-teal); border-bottom-color: var(--dark-cyan); }
.pgh-tabs .cnt {
    display: inline-block;
    margin-left: 4px;
    padding: 1px 8px;
    border-radius: 10px;
    background: #eef3f3;
    font-size: 12px;
}

.pgh-toolbar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 14px; margin-bottom: 22px; }
.pgh-toolbar select { padding: 9px 14px; border-radius: 8px; border: 1px solid #ddd; background: #fff; }
.pgh-search { display: flex; flex: 1; max-width: 420px; }
.pgh-search input {
    flex: 1;
    min-width: 0;
    padding: 9px 14px;
    border: 1px solid #ddd;
    border-right: none;
    border-radius: 8px 0 0 8px;
    font-size: 14px;
}
.pgh-search button {
    padding: 0 16px;
    border: none;
    background: var(--dark-cyan);
    color: #fff;
    border-radius: 0 8px 8px 0;
    cursor: pointer;
}
.pgh-search button:hover { background: var(--dark-teal); }

.au-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px; }
.au-card {
    background: #fff;
    border-radius: 14px;
    padding: 24px 16px 20px;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0, 0, 0, .07);
    transition: transform .25s, box-shadow .25s;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.au-card:hover { transform: translateY(-4px); box-shadow: 0 14px 30px rgba(0, 0, 0, .12); }
.au-avatar {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    background: var(--pearl-aqua);
    color: var(--dark-teal);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'PT Serif', serif;
    font-size: 2rem;
    font-weight: 700;
    overflow: hidden;
    text-decoration: none;
    margin-bottom: 12px;
}
.au-avatar img { width: 100%; height: 100%; object-fit: cover; }
.au-name {
    font-family: 'PT Serif', serif;
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--ink-black);
    text-decoration: none;
    line-height: 1.3;
    word-break: break-word;
}
a.au-name:hover { color: var(--dark-cyan); }
.au-meta { margin-top: 8px; display: flex; flex-direction: column; gap: 3px; font-size: 13px; color: #778; }
.au-meta i { color: var(--dark-cyan); margin-right: 3px; }

/* ---------- Карточки направлений (сотрудничество, партнёрам, прочее) ---------- */
.pgh-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 20px; margin-bottom: 40px; }
.pgh-card {
    background: #fff;
    border-radius: 14px;
    padding: 24px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, .07);
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
}
a.pgh-card { transition: transform .25s, box-shadow .25s; }
a.pgh-card:hover { transform: translateY(-4px); box-shadow: 0 14px 30px rgba(0, 0, 0, .12); }
.pgh-card .ico {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    background: var(--pearl-aqua);
    color: var(--dark-teal);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    margin-bottom: 14px;
}
.pgh-card h3 { font-family: 'PT Serif', serif; font-size: 1.12rem; margin: 0 0 8px; color: var(--ink-black); }
.pgh-card p { font-size: 14.5px; color: #555; line-height: 1.6; margin: 0; }
.pgh-card .more { margin-top: 12px; font-weight: 600; font-size: 14px; color: var(--dark-cyan); }
.pgh-card ul { margin: 0; padding: 0; list-style: none; }
.pgh-card li { padding: 5px 0; font-size: 14.5px; }
.pgh-card li a { color: var(--dark-cyan); text-decoration: none; }
.pgh-card li a:hover { text-decoration: underline; }

/* ---------- Форма обращения ---------- */
.pgh-form-box {
    background: #fff;
    border-radius: 16px;
    padding: 30px 32px;
    box-shadow: 0 5px 24px rgba(0, 0, 0, .08);
    max-width: 760px;
    scroll-margin-top: 160px;
}
.pgh-form-hint { color: #666; margin: -6px 0 18px; font-size: 14.5px; }
.pgh-row { display: flex; gap: 16px; }
.pgh-row .pgh-field { flex: 1; min-width: 0; }
.pgh-field { margin-bottom: 16px; }
.pgh-field label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; color: var(--ink-black); }
.pgh-field .opt { font-weight: 400; color: #999; }
.pgh-field input, .pgh-field select, .pgh-field textarea {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid #d5dcdc;
    border-radius: 10px;
    font-size: 15px;
    background: #fff;
}
.pgh-field textarea { resize: vertical; min-height: 130px; }
.pgh-field input:focus, .pgh-field select:focus, .pgh-field textarea:focus {
    outline: none;
    border-color: var(--dark-cyan);
    box-shadow: 0 0 0 3px rgba(10, 147, 150, .15);
}
.pgh-submit {
    background: var(--dark-cyan);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 12px 30px;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    transition: background .2s;
}
.pgh-submit:hover { background: var(--dark-teal); }
.pgh-consent { margin: 12px 0 0; font-size: 12.5px; color: #888; }
.pgh-consent a { color: var(--dark-cyan); }
.pgh-alert { border-radius: 10px; padding: 12px 16px; margin-bottom: 18px; font-size: 14.5px; }
.pgh-alert.ok { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.pgh-alert.err { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }
/* Ловушка для ботов: убрана за экран, а не через display:none (часть ботов display:none пропускает) */
.pgh-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

@media (max-width: 640px) {
    .pgh-hero h1 { font-size: 1.7rem; }
    .pgh-row { flex-direction: column; gap: 0; }
    .pgh-form-box { padding: 22px 18px; }
    .pgh-search { max-width: none; }
}