/* ═══════════════════════════════════════════
   Pages — all content pages
═══════════════════════════════════════════ */

/* ═══ DOCUMENT CARDS ═══ */
.page-cards-grid { display: flex; flex-direction: column; gap: 10px; }

.page-doc-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 18px 20px;
    display: flex; align-items: center; gap: 16px;
    transition: all 0.2s;
}
.page-doc-card:hover { box-shadow: var(--shadow-hover); border-color: var(--accent); }

.pdc-icon {
    width: 44px; height: 44px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.2rem; flex-shrink: 0;
}
.pdc-content { flex: 1; min-width: 0; }
.pdc-content h5 { font-family: var(--f-body); font-weight: 700; font-size: 0.9rem; color: var(--text); margin: 0 0 4px; }
.pdc-content h5 a { color: var(--text); }
.pdc-content h5 a:hover { color: var(--accent); }
.pdc-content p { font-size: 0.8rem; color: var(--text2); margin: 0; line-height: 1.5; }
.pdc-tag {
    display: inline-block; font-size: 0.68rem; font-weight: 700;
    padding: 2px 8px; border-radius: 50px; margin-top: 4px;
    background: rgba(26,81,153,0.06); color: var(--accent);
    border: 1px solid rgba(26,81,153,0.12);
}
.pdc-meta { display: flex; gap: 12px; font-size: 0.75rem; color: var(--text3); font-family: var(--f-mono); margin-top: 4px; }
.pdc-download {
    width: 40px; height: 40px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    background: var(--accent); color: #fff;
    font-size: 1rem; flex-shrink: 0;
    transition: background 0.15s; text-decoration: none;
}
.pdc-download:hover { background: var(--accent2); color: #fff; }

/* ═══ PRICELIST CARDS (clickable to read) ═══ */
.pricelist-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 14px;
}
.pricelist-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    overflow: hidden;
    cursor: pointer;
    transition: all 0.25s;
}
.pricelist-card:hover { box-shadow: var(--shadow-hover); border-color: var(--accent); transform: translateY(-2px); }

.plc-preview {
    height: 140px;
    background: var(--bg3);
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    gap: 8px;
    transition: background 0.2s;
}
.plc-preview i { font-size: 3rem; color: var(--red); }
.plc-read {
    font-size: 0.78rem; font-weight: 700; color: var(--accent);
    padding: 4px 12px; border-radius: 50px;
    background: rgba(26,81,153,0.06); border: 1px solid rgba(26,81,153,0.12);
}
.pricelist-card:hover .plc-preview { background: rgba(26,81,153,0.04); }
.pricelist-card:hover .plc-read { background: var(--accent); color: #fff; }

.plc-info { padding: 14px 16px; }
.plc-info h5 { font-family: var(--f-body); font-weight: 700; font-size: 0.88rem; color: var(--text); margin: 0 0 4px; }
.plc-info p { font-size: 0.78rem; color: var(--text2); margin: 0; }

/* ═══ PDF MODAL ═══ */
.pdf-modal {
    display: none;
    position: fixed; inset: 0;
    background: var(--overlay);
    z-index: 1000;
    align-items: center; justify-content: center;
    padding: 20px;
}
.pdf-modal.active { display: flex; }
.pdf-modal-content {
    background: var(--surface);
    border-radius: var(--r-lg);
    width: 100%; max-width: 1000px;
    height: 90vh;
    display: flex; flex-direction: column;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}
.pdf-modal-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 14px 20px;
    border-bottom: 1px solid var(--border);
}
.pdf-modal-header h4 {
    font-family: var(--f-body); font-weight: 700; font-size: 0.95rem;
    color: var(--text); margin: 0;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.pdf-modal-close {
    width: 36px; height: 36px; border: none; border-radius: 8px;
    background: transparent; color: var(--text3);
    font-size: 1.5rem; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.15s;
}
.pdf-modal-close:hover { background: var(--hover); color: var(--red); }
.pdf-modal-frame { flex: 1; border: none; width: 100%; }

/* ═══ PRICE TABLES ═══ */
.price-table-block { margin-bottom: 24px; }
.price-table-title {
    font-family: var(--f-body); font-weight: 700; font-size: 0.95rem;
    color: var(--text); margin-bottom: 10px; padding-left: 4px;
}

/* ═══ YEAR FILTER ═══ */
.year-filter {
    display: flex; flex-wrap: wrap; gap: 6px;
    margin-bottom: 24px;
}
.year-btn {
    padding: 6px 16px; border-radius: 50px;
    font-family: var(--f-mono); font-size: 0.8rem; font-weight: 600;
    color: var(--text2);
    background: var(--surface); border: 1px solid var(--border);
    text-decoration: none;
    transition: all 0.15s;
}
.year-btn:hover { border-color: var(--accent); color: var(--accent); }
.year-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ═══ MANUALS ═══ */
.manuals-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 16px;
}
.manual-card {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--r-lg); overflow: hidden; transition: all 0.25s;
}
.manual-card:hover { box-shadow: var(--shadow-hover); }
.manual-video { position: relative; padding-bottom: 56.25%; height: 0; background: #000; }
.manual-video iframe, .manual-video video { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
.manual-placeholder {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    background: var(--bg3); color: var(--text3); font-size: 3rem;
}
.manual-info { padding: 16px 18px; }
.manual-info h5 { font-family: var(--f-body); font-weight: 700; font-size: 0.9rem; color: var(--text); margin: 0 0 6px; }
.manual-info p { font-size: 0.8rem; color: var(--text2); margin: 0; line-height: 1.5; }

/* ═══ CONTACTS ═══ */
.contacts-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; }
.contact-card {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--r-lg); padding: 24px;
}
.contact-card h4 { font-family: var(--f-body); font-weight: 700; font-size: 1rem; color: var(--text); margin-bottom: 16px; }
.contact-row {
    display: flex; align-items: flex-start; gap: 10px;
    padding: 8px 0; font-size: 0.88rem; color: var(--text);
}
.contact-row i { color: var(--accent); margin-top: 3px; font-size: 0.9rem; flex-shrink: 0; }
.contact-row a { color: var(--link); }
.contact-requisites { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); }
.contact-extra { margin-top: 12px; font-size: 0.82rem; color: var(--text2); line-height: 1.6; }

/* ═══ EGFNTD NAV ═══ */
.egfntd-nav-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px;
}
.egfntd-nav-grid .svc-card { text-decoration: none; }

/* ═══ GOVERNMENT BODIES ═══ */
.gov-bodies-grid { display: flex; flex-direction: column; gap: 8px; }
.gov-body-card {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--r-lg); padding: 18px 20px;
    display: flex; align-items: center; gap: 14px;
    text-decoration: none; transition: all 0.2s;
}
.gov-body-card:hover { box-shadow: var(--shadow-hover); border-color: var(--accent); }
.gbc-icon {
    width: 44px; height: 44px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.2rem; flex-shrink: 0;
    background: rgba(217,119,6,0.08); color: var(--gold);
}
[data-theme="dark"] .gbc-icon { background: rgba(251,191,36,0.1); }
.gov-body-card h5 { font-family: var(--f-body); font-weight: 700; font-size: 0.9rem; color: var(--text); margin: 0 0 4px; }
.gov-body-card p { font-size: 0.78rem; color: var(--text2); margin: 0; }
.gbc-count { font-family: var(--f-mono); font-size: 0.72rem; color: var(--text3); }
.gbc-arrow { margin-left: auto; color: var(--text3); font-size: 0.9rem; }

/* ═══ DEPOSITARY ═══ */
.depositary-list { display: flex; flex-direction: column; gap: 14px; }
.depositary-card {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--r-lg); overflow: hidden; transition: all 0.2s;
}
.depositary-card:hover { box-shadow: var(--shadow); }
.dep-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 20px; gap: 12px;
}
.dep-name {
    font-family: var(--f-body); font-weight: 700; font-size: 0.92rem;
    color: var(--text); flex: 1;
}
.dep-name a { color: var(--accent); }
.dep-name a:hover { color: var(--accent2); }
.dep-info {
    padding: 0 20px 18px;
    font-size: 0.82rem; color: var(--text2); line-height: 1.65;
    border-top: 1px solid var(--border2);
    padding-top: 14px; margin-top: 0;
}

/* ═══ RESPONSIVE ═══ */
@media (max-width: 768px) {
    .manuals-grid { grid-template-columns: 1fr; }
    .contacts-grid { grid-template-columns: 1fr; }
    .egfntd-nav-grid { grid-template-columns: 1fr; }
    .pricelist-grid { grid-template-columns: 1fr 1fr; }
    .pdf-modal-content { height: 80vh; }
}
@media (max-width: 480px) {
    .pricelist-grid { grid-template-columns: 1fr; }
}

/* НТД гос. органов — таблицы и аккордеон */
.ntdgo-section { margin-bottom: 32px; }

.ntdgo-toolbar {
    display: flex; gap: 12px; align-items: center;
    margin-bottom: 16px; flex-wrap: wrap;
}
.ntdgo-search-box {
    flex: 1; min-width: 280px;
    position: relative;
    display: flex; align-items: center;
}
.ntdgo-search-box i {
    position: absolute; left: 14px; color: var(--text3);
    pointer-events: none;
}
.ntdgo-search-box input {
    width: 100%; padding-left: 40px;
}
.ntdgo-controls { display: flex; gap: 8px; }
.ntdgo-btn {
    background: var(--bg2); border: 1px solid var(--border);
    color: var(--text1); padding: 8px 14px; border-radius: 6px;
    font-size: 0.85rem; cursor: pointer;
    display: inline-flex; align-items: center; gap: 6px;
    transition: all 0.15s;
}
.ntdgo-btn:hover { border-color: var(--accent); color: var(--accent); }

.ntdgo-accordion { display: flex; flex-direction: column; gap: 8px; }
.ntdgo-group {
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg1);
    overflow: hidden;
}
.ntdgo-group.open { border-color: var(--accent); }
.ntdgo-group-header {
    display: flex; justify-content: space-between; align-items: center;
    width: 100%; padding: 14px 18px;
    background: rgba(26,81,153,0.04);
    border: none;
    cursor: pointer;
    text-align: left;
    font-family: inherit;
    transition: background 0.15s;
}
.ntdgo-group-header:hover { background: rgba(26,81,153,0.08); }
.ntdgo-group.open .ntdgo-group-header {
    background: rgba(26,81,153,0.08);
    border-bottom: 1px solid var(--border);
}
.ntdgo-group-title {
    font-weight: 700;
    font-size: 1rem;
    color: var(--text1);
    flex: 1;
}
.ntdgo-group-meta {
    display: flex; align-items: center; gap: 12px;
    color: var(--text3); font-size: 0.85rem;
}
.ntdgo-group-count {
    background: var(--bg2); padding: 3px 10px; border-radius: 12px;
    font-weight: 600;
}
.ntdgo-chevron {
    transition: transform 0.2s;
}
.ntdgo-chevron.rotated { transform: rotate(180deg); }
.ntdgo-group-body {
    padding: 16px 18px;
}
.ntdgo-section-desc {
    color: var(--text2); margin: 0 0 12px 0; font-style: italic;
}
.ntdgo-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: 6px;
}
.ntdgo-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.ntdgo-table thead { background: var(--bg2); }
.ntdgo-table th {
    padding: 12px 14px; text-align: left;
    border-bottom: 2px solid var(--border);
    font-weight: 700; font-size: 0.85rem;
}
.ntdgo-table td {
    padding: 10px 14px; border-bottom: 1px solid var(--border);
    vertical-align: top; line-height: 1.5;
}
.ntdgo-table tbody tr:hover { background: var(--bg2); }
.ntdgo-table tbody tr:last-child td { border-bottom: none; }
.ntdgo-num { width: 50px; text-align: center; color: var(--text3); }
.ntdgo-code { white-space: nowrap; font-weight: 600; }
.ntdgo-table a { color: var(--accent); }
.ntdgo-table a:hover { text-decoration: underline; }