/* Летописна книга - /chronicle и /chronicle-all.
   Банер + главна карта (най-новото издание) + предишни издания / архив.
   Корицата и заглавната снимка са в assets/images/chronicle/. */

.sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

.chron-banner {
    display: block; line-height: 0; border-radius: 16px; overflow: hidden;
    margin: 24px 0 28px; box-shadow: 0 8px 26px rgba(26, 54, 93, .10);
}
.chron-banner img { width: 100%; height: auto; display: block; }

.chron-main { background: var(--light-gray); padding: 24px 0 70px; }

/* Обща корица (снимка) + годината в капсулче долу */
.cv {
    position: relative; border-radius: 12px; overflow: hidden; aspect-ratio: 520/735;
    box-shadow: 0 14px 30px rgba(0,0,0,.25); width: 100%; height: auto;
}
.cv img, .cv picture { display: block; width: 100%; height: 100%; object-fit: cover; }
.cv-yr {
    position: absolute; left: 50%; transform: translateX(-50%); bottom: 7%;
    background: rgba(16, 33, 71, .92); color: #fff; font-weight: 700; letter-spacing: .04em;
    font-size: .95rem; padding: 5px 16px; border-radius: 999px; white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0,0,0,.35);
}

/* ---- Главна карта: най-новото издание ---- */
.chron-feature {
    display: grid; grid-template-columns: 210px 1fr 270px; gap: 26px;
    background: #fff; border-radius: 18px; padding: 34px;
    box-shadow: 0 10px 34px rgba(26,54,93,.09);
    border-left: 6px solid var(--primary-green); align-items: center;
}
.chron-feature > .cv { width: 210px; }
.chron-feat-body .badge {
    display: inline-block; background: #E8F0FE; color: var(--primary-blue);
    font-size: .78rem; font-weight: 700; letter-spacing: .06em;
    padding: 6px 12px; border-radius: 6px; margin-bottom: 12px;
}
.chron-feat-body h2 { color: var(--primary-blue); font-size: 1.9rem; margin: 0 0 12px; }
.chron-feat-body > p {
    color: var(--text-light); line-height: 1.65; margin: 0 0 18px;
    white-space: nowrap; font-size: .92rem;
}
.chron-meta { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 22px; }
.chron-meta span {
    background: var(--light-gray); color: var(--text-dark); font-size: .85rem;
    padding: 7px 13px; border-radius: 8px; display: inline-flex; align-items: center; gap: 7px;
}
.chron-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.chron-btn {
    padding: 14px 24px; border-radius: 10px; font-weight: 700; text-decoration: none;
    display: inline-flex; align-items: center; gap: 9px; font-size: .98rem;
    transition: background-color .2s ease, transform .2s ease;
}
.chron-btn-green { background: var(--primary-green); color: #fff; }
.chron-btn-green:hover { background: #3d9140; color: #fff; transform: translateY(-1px); }
.chron-btn-out { background: #fff; color: var(--primary-blue); border: 1.5px solid #D4DCE8; }
.chron-btn-out:hover { border-color: var(--primary-blue); color: var(--primary-blue); }

.chron-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.chron-stat { border-radius: 14px; padding: 18px; display: flex; flex-direction: column; gap: 6px; }
.chron-stat svg { width: 26px; height: 26px; }
.chron-stat .num { font-size: 1.9rem; font-weight: 800; line-height: 1; }
.chron-stat .lbl { font-size: .9rem; color: var(--text-light); }

/* ---- Предишни издания (на главната) и архив (/chronicle-all) ---- */
.chron-prev { margin-top: 48px; }
.chron-prev-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.chron-prev-head h2 { color: var(--primary-blue); font-size: 1.6rem; margin: 0; display: flex; align-items: center; gap: 10px; }
.chron-prev-head a { color: var(--primary-green); font-weight: 600; text-decoration: none; white-space: nowrap; }
.chron-prev-head a:hover { text-decoration: underline; }

.chron-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 22px; }
.chron-card {
    background: #fff; border-radius: 14px; padding: 16px; box-shadow: 0 6px 20px rgba(26,54,93,.07);
    display: flex; gap: 16px; align-items: stretch;
}
.chron-card-cover { width: 134px; flex-shrink: 0; }
.chron-card-cover .cv { border-radius: 8px; box-shadow: 0 8px 20px rgba(0,0,0,.2); }
.chron-card-cover .cv-yr { font-size: .62rem; padding: 3px 9px; bottom: 6%; }
.chron-card-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.chron-card-main h3 { color: var(--primary-blue); font-size: 1.05rem; margin: 0 0 12px; line-height: 1.3; }
.chron-card-main ul { list-style: none; margin: 0 0 12px; padding: 0; font-size: .85rem; color: var(--text-light); flex: 1; }
.chron-card-main li { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; white-space: nowrap; }
.chron-card-main li strong { color: var(--text-dark); font-weight: 700; }
.chron-card-main li svg { width: 15px; height: 15px; flex-shrink: 0; color: var(--primary-blue); opacity: .65; }
.chron-card-size { font-size: .78rem; color: var(--text-light); margin: 0 0 12px; }
.chron-card-actions { display: flex; gap: 8px; margin-top: auto; }
.chron-card-actions a {
    flex: 1; text-align: center; padding: 9px 6px; border-radius: 8px; font-size: .85rem;
    font-weight: 600; text-decoration: none;
}
.chron-card-view { background: var(--primary-green); color: #fff; }
.chron-card-view:hover { background: #3d9140; color: #fff; }
.chron-card-pdf { border: 1.5px solid #D4DCE8; color: var(--primary-blue); }
.chron-card-pdf:hover { border-color: var(--primary-blue); }

/* ---- Заглавна лента на архива ---- */
.chron-all-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 26px; }
.chron-all-head h1 { color: var(--primary-blue); font-size: 1.9rem; margin: 0; }
.chron-all-head .count { color: var(--text-light); font-size: .95rem; }
.chron-back { color: var(--primary-green); font-weight: 600; text-decoration: none; }
.chron-back:hover { text-decoration: underline; }

@media (max-width: 992px) {
    .chron-feature { grid-template-columns: 180px 1fr; }
    .chron-feature > .cv { width: 180px; }
    .chron-stats { grid-column: 1 / -1; grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 700px) {
    .chron-feature { grid-template-columns: 1fr; text-align: center; padding: 22px; }
    .chron-feature > .cv { width: 180px; max-width: 180px; margin: 0 auto; }
    .chron-feat-body > p { margin-left: auto; margin-right: auto; white-space: normal; font-size: 1rem; }
    .chron-meta, .chron-actions { justify-content: center; }
    .chron-stats { grid-template-columns: 1fr 1fr; }
    .chron-all-head h1 { font-size: 1.5rem; }
}
