/* =========================================================================
   Блог: архів (.ric-blog) і стаття (.ric-article) — єдиний стиль із сайтом.
   Грузиться на архіві blog та одиночних записах. Токени — з chrome.css.
   ========================================================================= */

.ric-blog, .ric-article { font-family: 'Open Sans', Helvetica, sans-serif; color: #333; }
.ric-blog__container, .ric-article__container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* ---- Шапка (темна брендова смуга) ---- */
.ric-blog__head, .ric-article__head { position: relative; overflow: hidden; padding: 48px 0 44px; text-align: center; background: radial-gradient(120% 150% at 50% 0%, #34363b 0%, #1f2024 72%); }
.ric-blog__head::before, .ric-article__head::before { content: ""; position: absolute; inset: 0; pointer-events: none; background-image: radial-gradient(rgba(255,255,255,.05) 1px, transparent 1px); background-size: 20px 20px; }
.ric-blog__head::after, .ric-article__head::after { content: ""; position: absolute; top: -50%; left: 50%; transform: translateX(-50%); width: 700px; height: 440px; pointer-events: none; background: radial-gradient(closest-side, rgba(243,124,34,.20), transparent 72%); }
.ric-blog__head > *, .ric-article__head > * { position: relative; z-index: 1; }

.ric-blog__crumbs, .ric-article__crumbs { font-size: 13px; color: rgba(255,255,255,.55); margin-bottom: 16px; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.ric-blog__crumbs a, .ric-article__crumbs a { color: rgba(255,255,255,.55); text-decoration: none; }
.ric-blog__crumbs a:hover, .ric-article__crumbs a:hover { color: var(--ric-orange); }
.ric-blog__crumbs .ric-sep, .ric-article__crumbs .ric-sep { color: rgba(255,255,255,.3); }
.ric-blog__crumbs .ric-current, .ric-article__crumbs .ric-current { color: rgba(255,255,255,.85); }

.ric-blog__title { margin: 0 0 14px; color: #fff; font-size: clamp(30px, 4.6vw, 48px); font-weight: 800; line-height: 1.05; letter-spacing: -.02em; }
.ric-blog__lead { max-width: 720px; margin: 0 auto; color: rgba(255,255,255,.72); font-size: 16px; line-height: 1.6; }

/* ---- Сітка карток ---- */
.ric-blog__grid { display: flex; flex-wrap: wrap; justify-content: center; align-items: stretch; gap: 24px; margin: 38px 0; }
.ric-bcard { display: flex; flex-direction: column; flex: 0 1 100%; background: #fff; border: 1px solid #e6e6e7; border-radius: 16px; overflow: hidden; transition: transform .2s ease, box-shadow .2s ease; }
.ric-bcard:hover { transform: translateY(-4px); box-shadow: 0 16px 38px rgba(0,0,0,.10); }
.ric-bcard__media { position: relative; display: block; aspect-ratio: 16 / 9; background: #f2f3f5; overflow: hidden; }
.ric-bcard__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.ric-bcard:hover .ric-bcard__media img { transform: scale(1.05); }
.ric-bcard__ph { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; font-size: 40px; color: #cfd3d7; }
.ric-bcard__tag { position: absolute; top: 12px; left: 12px; z-index: 2; background: var(--ric-orange); color: #fff; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; padding: 4px 10px; border-radius: 20px; }
.ric-bcard__body { display: flex; flex-direction: column; flex: 1 1 auto; padding: 18px 20px 20px; }
.ric-bcard__date { font-size: 12px; color: #9a9da2; }
.ric-bcard__title { margin: 6px 0 10px; font-size: 18px; font-weight: 700; line-height: 1.3; }
.ric-bcard__title a { color: #1f2024; text-decoration: none; }
.ric-bcard__title a:hover { color: var(--ric-orange); }
.ric-bcard__excerpt { margin: 0 0 16px; font-size: 14px; color: #61646a; line-height: 1.6; }
.ric-bcard__more { margin-top: auto; align-self: flex-start; color: var(--ric-orange); font-weight: 700; font-size: 14px; text-decoration: none; }
.ric-bcard__more i { font-size: 12px; transition: transform .2s ease; }
.ric-bcard:hover .ric-bcard__more i { transform: translateX(4px); }

/* ---- Пагінація ---- */
.ric-blog__pag { text-align: center; margin: 8px 0 40px; }
.ric-blog__pag .wp-pagenavi { display: inline-flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.ric-blog__pag .wp-pagenavi a, .ric-blog__pag .wp-pagenavi span { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; height: 40px; padding: 0 12px; border: 1px solid #e0e0e0; border-radius: 8px; color: #333; text-decoration: none; font-size: 14px; }
.ric-blog__pag .wp-pagenavi a:hover { border-color: var(--ric-orange); color: var(--ric-orange); }
.ric-blog__pag .wp-pagenavi span.current { background: var(--ric-orange); border-color: var(--ric-orange); color: #fff; }
.ric-blog__empty { text-align: center; color: #888; padding: 50px 0; }

/* ---- Порожній пошук ---- */
.ric-blog__noresult { max-width: 560px; margin: 50px auto; padding: 40px 24px; text-align: center; }
.ric-blog__noresult > i { font-size: 46px; color: #cfd3d7; }
.ric-blog__noresult h2 { margin: 18px 0 8px; font-size: 24px; font-weight: 800; color: #1f2024; }
.ric-blog__noresult p { margin: 0 0 22px; color: #666; line-height: 1.6; }
.ric-blog__searchform .search-bar { display: flex; gap: 8px; }
.ric-blog__searchform .input-group { order: 1; flex: 1 1 auto; }
.ric-blog__searchform input[type="search"] { width: 100%; height: 46px; padding: 0 16px; border: 1px solid #d9dadc; border-radius: 8px; font-size: 15px; }
.ric-blog__searchform input[type="search"]:focus { outline: none; border-color: var(--ric-orange); }
.ric-blog__searchform .submit-search { order: 2; flex: 0 0 auto; width: 52px; height: 46px; border: 0; border-radius: 8px; background: var(--ric-orange); color: #fff; font-size: 16px; cursor: pointer; transition: background-color .2s ease; }
.ric-blog__searchform .submit-search:hover { background: var(--ric-orange-dark); }

/* =========================================================================
   Стаття (.ric-article)
   ========================================================================= */
.ric-article__cat { display: inline-block; margin-bottom: 14px; padding: 5px 14px; border-radius: 20px; background: rgba(243,124,34,.16); color: #ffb274; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; }
.ric-article__title { margin: 0 0 18px; color: #fff; font-size: clamp(26px, 4vw, 40px); font-weight: 800; line-height: 1.12; letter-spacing: -.02em; max-width: 900px; margin-left: auto; margin-right: auto; }
.ric-article__meta { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px; color: rgba(255,255,255,.62); font-size: 14px; }
.ric-article__meta li { display: inline-flex; align-items: center; gap: 7px; }
.ric-article__meta i { color: var(--ric-orange); font-size: 13px; }

.ric-article__hero { margin: -40px auto 0; max-width: 980px; border-radius: 16px; overflow: hidden; box-shadow: 0 22px 54px rgba(0,0,0,.18); position: relative; z-index: 2; }
.ric-article__hero img { display: block; width: 100%; height: auto; }

.ric-article__layout { display: grid; grid-template-columns: 1fr; gap: 24px; margin: 40px 0; }
.ric-article__share .ricoma-share { display: flex; flex-wrap: wrap; gap: 10px; }
.ric-article__main { min-width: 0; }

/* Кнопки поділитися */
.ricoma-share__btn { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 50%; border: 1px solid #e2e3e5; background: #fff; color: #5a5d63; font-size: 16px; text-decoration: none; transition: transform .2s ease, background-color .2s ease, color .2s ease, border-color .2s ease; }
.ricoma-share__btn:hover { background: var(--ric-orange); border-color: var(--ric-orange); color: #fff; transform: translateY(-2px); }

/* Контент статті */
.ric-article__content { color: #333; font-size: 17px; line-height: 1.8; }
.ric-article__content > *:first-child { margin-top: 0; }
.ric-article__content p { margin: 0 0 18px; }
.ric-article__content h2 { margin: 36px 0 14px; font-size: 27px; font-weight: 800; color: #1f2024; letter-spacing: -.01em; }
.ric-article__content h3 { margin: 28px 0 12px; font-size: 21px; font-weight: 700; color: #1f2024; }
.ric-article__content ul, .ric-article__content ol { margin: 0 0 18px; padding-left: 24px; }
.ric-article__content li { margin-bottom: 9px; }
.ric-article__content a { color: var(--ric-orange); text-decoration: underline; }
.ric-article__content img { max-width: 100%; height: auto; border-radius: 12px; margin: 8px 0; }
.ric-article__content blockquote { margin: 0 0 18px; padding: 14px 20px; border-left: 4px solid var(--ric-orange); background: #faf7f4; border-radius: 0 8px 8px 0; color: #444; font-style: italic; }
.ric-article__content table { width: 100%; border-collapse: collapse; margin: 0 0 18px; }
.ric-article__content th, .ric-article__content td { padding: 10px 14px; border: 1px solid #ececec; text-align: left; font-size: 15px; }
.ric-article__content th { background: #f7f7f7; font-weight: 700; }
.ric-article__content iframe { max-width: 100%; border-radius: 12px; }

.ric-article__share-bottom { margin: 30px 0 0; padding-top: 22px; border-top: 1px solid #eee; }
.ric-article__share-bottom .ricoma-share { display: flex; flex-wrap: wrap; gap: 10px; }

/* Попередній / наступний */
.ric-article__nav { display: grid; grid-template-columns: 1fr; gap: 16px; margin: 8px 0 50px; }
.ric-article__nav-link { display: flex; flex-direction: column; gap: 6px; padding: 18px 20px; border: 1px solid #e6e6e7; border-radius: 14px; background: #fff; text-decoration: none; transition: border-color .2s ease, box-shadow .2s ease; }
.ric-article__nav-link:hover { border-color: var(--ric-orange); box-shadow: 0 10px 26px rgba(0,0,0,.07); }
.ric-article__nav-link--next { text-align: right; }
.ric-article__nav-lbl { font-size: 13px; font-weight: 700; color: var(--ric-orange); text-transform: uppercase; letter-spacing: .4px; }
.ric-article__nav-ttl { font-size: 16px; font-weight: 700; color: #1f2024; line-height: 1.3; }

/* Схожі записи */
.ric-article__related { margin: 0 0 50px; }
.ric-article__related-title { margin: 0 0 6px; text-align: center; color: var(--ric-ink); font-size: clamp(22px, 3vw, 30px); font-weight: 800; letter-spacing: -.01em; }
.ric-article__related-title::after { content: ""; display: block; width: 56px; height: 3px; margin: 14px auto 0; background: var(--ric-orange); border-radius: 2px; }

/* ---- Адаптив ---- */
@media (min-width: 600px) {
    .ric-blog__head, .ric-article__head { padding: 64px 0 56px; }
    .ric-bcard { flex-basis: calc((100% - 24px) / 2); }
    .ric-article__nav { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 992px) {
    .ric-bcard { flex-basis: calc((100% - 48px) / 3); }
    .ric-article__layout { grid-template-columns: 56px minmax(0, 800px); justify-content: center; gap: 34px; }
    .ric-article__share .ricoma-share { position: sticky; top: 140px; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
    .ric-bcard, .ric-bcard__media img, .ric-bcard__more i, .ricoma-share__btn, .ric-article__nav-link { transition: none !important; }
}
