/* =========================================================================
   Глобальна обвязка сайту: верхня смуга над навігацією + футер.
   Завантажується на всіх сторінках (assets/css/chrome.css).
   Префікс ric-, бренд-токени з теми (#f37c22, Open Sans). Поза .ric-home.
   ========================================================================= */

:root {
    --ric-orange: #f37c22;
    --ric-orange-dark: #d96a16;
    --ric-ink: #1f2024;
    --ric-tbh: 48px; /* висота верхньої смуги */
}

@media (prefers-reduced-motion: no-preference) {
    html { scroll-behavior: smooth; }
}

/* ===================== Прелоадер ===================== */
.ric-preloader {
    position: fixed; inset: 0; z-index: 100000;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 24px;
    background: #fff;
    transition: opacity .5s ease, visibility .5s ease;
}
.ric-preloader__logo { width: 150px; height: auto; animation: ric-pre-pulse 1.6s ease-in-out infinite; }
.ric-preloader__spinner {
    width: 38px; height: 38px; border-radius: 50%;
    border: 3px solid #efece7; border-top-color: var(--ric-orange);
    animation: ric-pre-spin .8s linear infinite;
}
body.ric-loaded .ric-preloader { opacity: 0; visibility: hidden; pointer-events: none; }
@keyframes ric-pre-spin { to { transform: rotate(360deg); } }
@keyframes ric-pre-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .5; } }
@media (prefers-reduced-motion: reduce) {
    .ric-preloader__logo, .ric-preloader__spinner { animation: none; }
    .ric-preloader { transition: none; }
}

/* ===================== Верхня смуга (фіксована, над навігацією) ===================== */
.ric-topbar {
    position: fixed; top: 0; left: 0; width: 100%;
    height: var(--ric-tbh); z-index: 999;
    background-color: #232427;
    background-image: radial-gradient(rgba(255,255,255,.06) 1px, transparent 1px);
    background-size: 18px 18px;
    color: #fff;
    font-family: 'Open Sans', Helvetica, sans-serif;
    font-size: 13px;
    box-shadow: 0 2px 10px rgba(0,0,0,.18);
}
.ric-topbar__inner {
    max-width: 1500px;
    height: var(--ric-tbh);
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: nowrap;
    overflow: hidden;
}

/* --- Фіксований стек: смуга зверху + хедер теми під нею --- */
body .header { top: var(--ric-tbh); transition: top .2s ease; }
body #wrapper { padding-top: calc(110px + var(--ric-tbh)); }
body.home #wrapper { padding-top: var(--ric-tbh); }
/* Шаблон Home 2026 — повний відступ навіть якщо це головна (перебиває .home вище) */
body.ric-home-2026 #wrapper { padding-top: calc(110px + var(--ric-tbh)); }
body .header .header_con .header_nav .header_nav_list .header_nav_title .header_nav_con {
    padding-top: calc(110px + var(--ric-tbh));
}
.admin-bar .ric-topbar { top: 32px; }
body.admin-bar .header { top: calc(var(--ric-tbh) + 32px); }

@media screen and (max-width: 1199px) {
    body #wrapper { padding-top: calc(90px + var(--ric-tbh)); }
    body.ric-home-2026 #wrapper { padding-top: calc(90px + var(--ric-tbh)); }
    body .header .header_con .header_nav .header_nav_list .header_nav_title .header_nav_con {
        padding-top: calc(90px + var(--ric-tbh));
    }
}
@media screen and (max-width: 782px) {
    .admin-bar .ric-topbar { top: 46px; }
    body.admin-bar .header { top: calc(var(--ric-tbh) + 46px); }
}
@media screen and (max-width: 767px) {
    body #wrapper, body.home #wrapper, body.ric-home-2026 #wrapper { padding-top: calc(70px + var(--ric-tbh)); }
}
.ric-topbar__info { display: flex; align-items: center; flex-wrap: wrap; gap: 18px; }
.ric-topbar__item { color: #d6d7da; }
.ric-topbar__item i { color: var(--ric-orange); margin-right: 6px; }
.ric-topbar__actions { display: flex; align-items: center; gap: 8px; }
.ric-topbar__msg {
    display: inline-flex; align-items: center; justify-content: center;
    width: 30px; height: 30px; border-radius: 50%; color: #fff; font-size: 15px;
    text-decoration: none; transition: transform .15s ease, opacity .2s ease;
}
.ric-topbar__msg:hover { transform: translateY(-2px); color: #fff; }
.ric-topbar__msg--viber { background: #7360f2; }
.ric-topbar__msg--telegram { background: #29a9eb; }
.ric-topbar__cta {
    display: inline-flex; align-items: center; gap: 7px;
    background: var(--ric-orange); color: #fff;
    padding: 7px 16px; border-radius: 4px;
    font-size: 13px; font-weight: 600; text-decoration: none;
    transition: background-color .2s ease;
}
.ric-topbar__cta:hover { background: var(--ric-orange-dark); color: #fff; }

@media (max-width: 600px) {
    .ric-topbar__inner { justify-content: center; padding: 0 14px; gap: 10px; }
    .ric-topbar__info { display: none; }
    .ric-topbar__cta { padding: 6px 14px; }
}

/* ===================== Навігація ===================== */
/* Стрілка-індикатор для пунктів з випадайкою */
.header_nav_arrow { display: inline-flex; align-items: center; margin-left: 7px; font-size: 10px; color: #b0b0b0; transition: transform .3s ease, color .2s ease; }
.header_nav_title.on .header_nav_arrow { transform: rotate(180deg); color: var(--ric-orange); }

/* Підкреслювач пункту при наведенні */
.header .header_con .header_nav .header_nav_list .header_nav_title h3 a,
.header .header_con .header_nav .header_nav_list .header_nav_title .h3 a { position: relative; transition: color .25s ease; }
.header .header_con .header_nav .header_nav_list .header_nav_title h3 a::after {
    content: ""; position: absolute; left: 0; bottom: -6px; width: 100%; height: 2px;
    background: var(--ric-orange); transform: scaleX(0); transform-origin: left; transition: transform .3s ease;
}
.header .header_con .header_nav .header_nav_list .header_nav_title:hover h3 a::after { transform: scaleX(1); }

/* ---- Десктоп (≥1200): мегаменю — плавна поява + картки ---- */
@media (min-width: 1200px) {
    .header_nav_title:hover .header_nav_arrow { transform: rotate(180deg); color: var(--ric-orange); }

    body .header .header_con .header_nav .header_nav_list .header_nav_title .header_nav_con {
        display: block !important; opacity: 0; visibility: hidden; transform: translateY(12px);
        transition: opacity .28s ease, visibility .28s ease, transform .28s ease; pointer-events: none;
    }
    body .header .header_con .header_nav .header_nav_list .header_nav_title:hover .header_nav_con {
        opacity: 1; visibility: visible; transform: none; pointer-events: auto;
    }

    .header .header_nav_con dl {
        max-width: 1180px; margin: 0 auto; background: #fff !important;
        display: flex !important; flex-wrap: wrap; justify-content: center; gap: 16px;
        padding: 30px 24px 36px !important; border-radius: 0 0 18px 18px; box-shadow: 0 20px 44px rgba(0,0,0,.12);
    }
    .header .header_nav_con dl dd { display: flex; width: auto !important; margin: 0 !important; padding: 0 !important; flex: 0 0 calc(16.66% - 14px); max-width: 190px; }
    .header .header_nav_con dl dd a {
        display: flex !important; flex-direction: column; gap: 10px; height: 100%; padding: 12px;
        border: 1px solid #eee; border-radius: 12px; background: #fff;
        transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
    }
    .header .header_nav_con dl dd a:hover { transform: translateY(-4px); border-color: #f7d9bd; box-shadow: 0 12px 26px rgba(0,0,0,.10); }
    .header .header_nav_con_img { display: block !important; width: 100%; padding-bottom: 66%; position: relative; background: #fff; border-radius: 8px; overflow: hidden; }
    .header .header_nav_con_img img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: contain; padding: 8px; transition: transform .4s ease; }
    .header .header_nav_con dl dd a:hover .header_nav_con_img img { transform: scale(1.06); }
    .header .header_nav_con dl dd .h2 { margin: 0 !important; font-size: 14px !important; font-weight: 700; color: #1f2024; text-align: center; line-height: 1.3; }
    .header .header_nav_con dl dd a:hover .h2 { color: var(--ric-orange); }
}

/* ---- Мобільне меню (<1200): акуратний слайд-панель з акордеоном ---- */
@media (max-width: 1199px) {
    .header_nav_arrow { margin-left: auto; padding: 10px 4px; font-size: 13px; color: #999; }
    .header .header_con.in { width: min(380px, 90vw) !important; }
    .header .header_con.in .header_nav_list .header_nav_title { border-bottom: 1px solid #f0f0f0; }
    .header .header_con.in .header_nav_list .header_nav_title > .h3 { display: flex !important; align-items: center; }
    .header .header_con.in .header_nav_list .header_nav_title > .h3 > a { flex: 1; }
    .header .header_con.in .header_nav_con dl { padding: 0 0 6px !important; }
    .header .header_con.in .header_nav_con dl dd { display: block; }
    .header .header_con.in .header_nav_con dl dd .h2 { font-size: 15px !important; padding: 8px 0 8px 14px; color: #555; font-weight: 600; }
    .header .header_con.in .header_nav_con dl dd a:hover .h2 { color: var(--ric-orange); }
}

/* ===================== Освіження шапки теми (лого без змін) ===================== */
/* Чистий білий хедер + тінь, щоб не зливався з фоном (п.4) */
body .header {
    background: #fff;
    box-shadow: 0 4px 20px rgba(0,0,0,.08);
}
/* Навігаційна «пігулка» — м'якша тінь і тонка межа */
.header .header_con .header_nav .header_nav_list {
    box-shadow: 0 8px 30px rgba(0,0,0,.09);
    border: 1px solid #f0f0f0;
}
.header .header_con .header_nav .header_nav_list .header_nav_title h3,
.header .header_con .header_nav .header_nav_list .header_nav_title .h3 {
    font-size: 13px;
    letter-spacing: .3px;
}
/* Телефон у шапці — сучасний вигляд замість «страшного» (п.8) */
.header .header_con .header_right .header_tel {
    float: none;
    display: inline-flex;
    align-items: center;
    height: 46px;
    margin-top: 2px;
    padding: 0 24px;
    border-radius: 30px;
    background: var(--ric-orange);
    box-shadow: 0 8px 22px rgba(243,124,34,.38);
    transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease;
}
.header .header_con .header_right .header_tel:hover {
    transform: translateY(-2px);
    background: var(--ric-orange-dark);
    box-shadow: 0 12px 28px rgba(243,124,34,.5);
}
.header .header_con .header_right .header_tel a {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: #fff;
}
.header .header_con .header_right .header_tel i { color: #fff; font-size: 15px; }
.header .header_con .header_right .header_tel span { color: #fff; margin-left: 0; font-weight: 700; font-size: 17px; }

/* ===================== Футер ===================== */
.ric-site-footer {
    background-color: var(--ric-ink);
    background-image: radial-gradient(rgba(255,255,255,.03) 1px, transparent 1px);
    background-size: 22px 22px;
    color: #c7c9cf;
    font-family: 'Open Sans', Helvetica, sans-serif;
    font-size: 15px;
    line-height: 1.6;
}
.ric-site-footer a { color: #c7c9cf; text-decoration: none; transition: color .2s ease; }
.ric-site-footer a:hover { color: var(--ric-orange); }

.ric-site-footer__inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 52px 20px 36px;
    display: flex;
    flex-wrap: wrap;
    gap: 34px 30px;
}
.ric-site-footer__inner > .ric-fcol { flex: 1 1 100%; }

.ric-site-footer__logo { display: inline-block; margin-bottom: 16px; }
.ric-site-footer__logo img { display: block; width: 150px; height: auto; }
.ric-site-footer__about { margin: 0 0 18px; color: #9a9ca3; font-size: 14px; max-width: 360px; }

.ric-site-footer__socials { display: flex; gap: 10px; }
.ric-site-footer__socials a {
    display: inline-flex; align-items: center; justify-content: center;
    width: 38px; height: 38px; border-radius: 50%;
    background: rgba(255,255,255,.08); color: #fff; font-size: 16px;
}
.ric-site-footer__socials a:hover { background: var(--ric-orange); color: #fff; transform: translateY(-2px); }

.ric-fcol__title {
    margin: 0 0 18px; color: #fff; font-size: 16px; font-weight: 700;
    position: relative; padding-bottom: 12px;
}
.ric-fcol__title::after {
    content: ""; position: absolute; left: 0; bottom: 0;
    width: 34px; height: 3px; background: var(--ric-orange); border-radius: 2px;
}
.ric-fcol__list { list-style: none; margin: 0; padding: 0; }
.ric-fcol__list li { margin-bottom: 10px; font-size: 14px; }

.ric-site-footer__phone { display: inline-flex; align-items: center; gap: 9px; margin-bottom: 14px; color: #fff !important; font-size: 19px; font-weight: 800; }
.ric-site-footer__phone i { color: var(--ric-orange); font-size: 15px; }
.ric-site-footer__phone:hover { color: var(--ric-orange) !important; }
.ric-site-footer__meta { margin: 0 0 10px; color: #9a9ca3; font-size: 14px; }
.ric-site-footer__meta i { color: var(--ric-orange); width: 16px; margin-right: 7px; text-align: center; }

.ric-site-footer__messengers { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.ric-fmsg {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 9px 16px; border-radius: 6px; color: #fff !important; font-size: 14px; font-weight: 600;
    transition: opacity .2s ease, transform .15s ease;
}
.ric-fmsg:hover { transform: translateY(-2px); color: #fff !important; }
.ric-fmsg--viber { background: #7360f2; }
.ric-fmsg--telegram { background: #29a9eb; }

.ric-site-footer__bottom {
    border-top: 1px solid rgba(255,255,255,.1);
    max-width: 1280px; margin: 0 auto; padding: 20px;
    display: flex; flex-direction: column; gap: 10px; align-items: center; text-align: center;
}
.ric-site-footer__copy { color: #8a8c93; font-size: 13px; }
.ric-site-footer__copy a { color: #b9bbc1; }
.ric-site-footer__back a { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: #b9bbc1; }
.ric-site-footer__back i { color: var(--ric-orange); }

/* ---- Оплата + реквізити ФОП ---- */
.ric-site-footer__pay {
    border-top: 1px solid rgba(255,255,255,.1);
    max-width: 1280px; margin: 0 auto; padding: 20px;
    display: flex; flex-direction: column; gap: 14px; align-items: center; text-align: center;
}
.ric-fpay { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px; }
.ric-pay-card { display: block; width: 50px; height: auto; border-radius: 5px; box-shadow: 0 2px 7px rgba(0,0,0,.28); }
.ric-fpay__note { color: #9a9ca3; font-size: 13px; max-width: 320px; line-height: 1.45; }
.ric-site-footer__fop { color: #9a9ca3; font-size: 13px; }

/* ---- Tablet ---- */
@media (min-width: 600px) {
    .ric-site-footer__inner { padding-top: 60px; }
    .ric-site-footer__inner > .ric-fcol { flex: 1 1 calc(50% - 15px); }
    .ric-site-footer__inner > .ric-fcol--brand { flex-basis: 100%; }
    .ric-site-footer__bottom { flex-direction: row; justify-content: space-between; text-align: left; }
    .ric-site-footer__pay { flex-direction: row; justify-content: space-between; text-align: left; }
}

/* ---- Desktop ---- */
@media (min-width: 1024px) {
    .ric-site-footer__inner { gap: 34px 26px; }
    .ric-site-footer__inner > .ric-fcol { flex: 1 1 140px; }
    .ric-site-footer__inner > .ric-fcol--brand { flex: 1 1 250px; max-width: 320px; }
    .ric-site-footer__inner > .ric-fcol--contacts { flex: 1 1 200px; }
}
