/*
Theme Name: Odessa NRC Open World
Theme URI: https://kzohrcvs.odessa.ua/
Author: Cursor
Author URI: https://cursor.com/
Description: Базовая тема WordPress для сайта КЗ Одеський НРЦ Відкриваємо світ
Version: 0.1.0
Requires at least: 6.4
Tested up to: 6.8
Requires PHP: 7.4
Text Domain: odessa-nrc-open-world
*/

html {
    scroll-behavior: smooth;
}

.admin-bar .stricky-header.stricked-menu {
    top: 32px;
}

@media (max-width: 782px) {
    .admin-bar .stricky-header.stricked-menu {
        top: 46px;
    }
}

.page-breadcrumbs-bar {
    position: relative;
    z-index: 2;
    background: #f4f7fb;
    border-bottom: 1px solid rgba(12, 49, 114, 0.08);
}

.page-breadcrumbs-bar__nav {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
    scrollbar-color: rgba(12, 49, 114, 0.28) transparent;
}

.page-breadcrumbs-bar__nav::-webkit-scrollbar {
    height: 4px;
}

.page-breadcrumbs-bar__nav::-webkit-scrollbar-thumb {
    background: rgba(12, 49, 114, 0.28);
    border-radius: 999px;
}

.page-breadcrumbs-bar__icon {
    flex: 0 0 auto;
    color: #4066a8;
    font-size: 13px;
}

.thm-breadcrumb--line {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    white-space: nowrap;
    margin: 0;
}

.thm-breadcrumb--line li {
    font-family: var(--nexin-font);
    text-transform: none;
}

.thm-breadcrumb--line li + li::before {
    content: "/";
    margin: 0 8px;
    color: #8aa0c7;
}

.thm-breadcrumb--line li a {
    font-family: var(--nexin-font);
    color: #5872a4;
    text-transform: none;
}

.thm-breadcrumb--line li a:hover {
    color: #163f8f;
}

.thm-breadcrumb--line li span {

    font-family: var(--nexin-font);
    color: #1b2b4d;
}

.page-header--compact {
    position: relative;
    overflow: hidden;
    background: #0b2f73;
}

.page-header--compact .page-header__bg {
    opacity: 1;
    background:
        radial-gradient(circle at 18% 22%, rgba(255, 201, 152, 0.22) 0, rgba(255, 201, 152, 0) 24%),
        radial-gradient(circle at 82% 18%, rgba(125, 198, 255, 0.2) 0, rgba(125, 198, 255, 0) 22%),
        radial-gradient(circle at 50% 120%, rgba(255, 255, 255, 0.08) 0, rgba(255, 255, 255, 0) 30%),
        linear-gradient(135deg, #0a2f73 0%, #124aa2 52%, #0b2f73 100%);
}

.page-header__shape {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    filter: blur(12px);
    z-index: 0;
}

.page-header__shape--one {
    top: -70px;
    left: -30px;
    width: 220px;
    height: 220px;
    background: rgba(255, 255, 255, 0.07);
}

.page-header__shape--two {
    right: 6%;
    bottom: -90px;
    width: 260px;
    height: 260px;
    background: rgba(255, 201, 152, 0.1);
}

.page-header__inner--compact {
    position: relative;
    z-index: 1;
    padding: 42px 0 42px;
    display: flex;
    justify-content: center;
}

.page-breadcrumbs-bar .container{
    max-width: var(--header-max-width);
    margin: 0 auto;
}

.page-header__content--compact {
    width: 100%;
    max-width: 900px;
    padding: 0 8px;
    text-align: center;
}

.page-header__title--compact {
    margin: 0;
    color: #fff;
    max-width: 760px;
    margin-inline: auto;
    font-size: 44px;
    line-height: 1.12;
    font-weight: 700;
    letter-spacing: -0.02em;
    text-transform: none;
    text-wrap: balance;
    text-shadow: 0 8px 30px rgba(6, 17, 45, 0.24);
    font-family: var(--nexin-font);
}

@media (max-width: 991px) {
    .page-header__inner--compact {
        padding: 38px 0 38px;
    }

    .page-header__title--compact {
        max-width: 680px;
        font-size: 36px;
    }
}

@media (max-width: 767px) {
    .page-breadcrumbs-bar__nav {
        min-height: 40px;
        gap: 8px;
    }

    .page-breadcrumbs-bar__icon,
    .thm-breadcrumb--line li,
    .thm-breadcrumb--line li a {
        font-size: 12px;
    }

    .thm-breadcrumb--line li + li::before {
        margin: 0 6px;
    }

    .page-header__inner--compact {
        padding: 30px 0 30px;
    }

    .page-header__title--compact {
        font-size: 28px;
        line-height: 1.18;
    }
}

.page-content {
    padding: 56px 0 88px;
    background: #f7f9fc;
}

.page-content__inner {
    max-width: var(--header-max-width);
    margin: 0 auto;
}

.page-content__prose {
    padding: 36px 40px;
    border: 1px solid rgba(13, 44, 104, 0.08);
    border-radius: 28px;
    background: #fff;
    box-shadow: 0 16px 45px rgba(15, 39, 84, 0.06);
    color: #33415c;
    font-family: var(--nexin-font);
    font-size: 17px;
    line-height: 1.8;
}

.page-content__prose > *:first-child {
    margin-top: 0;
}

.page-content__prose > *:last-child {
    margin-bottom: 0;
}

.page-content__prose h1,
.page-content__prose h2,
.page-content__prose h3,
.page-content__prose h4,
.page-content__prose h5,
.page-content__prose h6 {
    margin: 1.6em 0 0.7em;
    color: #10284f;
    font-family: var(--nexin-font);
    font-weight: 700;
    line-height: 1.2;
    text-transform: none;
}

.page-content__prose h1 {
    font-size: 2.2rem;
}

.page-content__prose h2 {
    font-size: 1.8rem;
}

.page-content__prose h3 {
    font-size: 1.45rem;
}

.page-content__prose h4 {
    font-size: 1.2rem;
}

.page-content__prose p,
.page-content__prose ul,
.page-content__prose ol,
.page-content__prose table,
.page-content__prose blockquote,
.page-content__prose figure,
.page-content__prose pre {
    margin: 0 0 1.15em;
}

.page-content__prose p {
    color: #43506c;
}

.page-content__prose a {
    color: #184ea8;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    word-break: break-word;
}

.page-content__prose a:hover {
    color: #0d367c;
}

.page-content__prose strong,
.page-content__prose b {
    color: #16284a;
    font-weight: 700;
}

.page-content__prose ul,
.page-content__prose ol {
    padding-left: 1.4em;
}

.page-content__prose li {
    margin-bottom: 0.45em;
}

.page-content__prose li::marker {
    color: #1c56b3;
}

.page-content__prose blockquote {
    padding: 18px 22px;
    border-left: 4px solid #1c56b3;
    border-radius: 0 16px 16px 0;
    background: #f4f8ff;
    color: #20365c;
    font-style: italic;
}

.page-content__prose img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 1.25em auto;
    border-radius: 18px;
}

.page-content__prose figure {
    text-align: center;
}

.page-content__prose figcaption {
    margin-top: 10px;
    color: #6b7892;
    font-size: 14px;
    line-height: 1.5;
}

/* Обгортка таблиці (Gutenberg) — горизонтальний скрол на малих екранах */
.page-content__prose .wp-block-table,
.entry-content .wp-block-table {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 1em 0;
    border-radius: 18px;
}

.page-content__prose table {
    width: 100%;
    max-width: 100%;
    border-collapse: collapse;
    overflow: hidden;
    border-radius: 18px;
    background: #fff;
    box-shadow: inset 0 0 0 1px rgba(13, 44, 104, 0.08);
}

.page-content__prose th,
.page-content__prose td {
    padding: 14px 16px;
    border: 1px solid rgba(13, 44, 104, 0.08);
    text-align: left;
    vertical-align: top;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.page-content__prose th {
    background: #f2f6fc;
    color: #10284f;
    font-weight: 700;
}

.page-content__prose hr {
    margin: 2em 0;
    border: 0;
    border-top: 1px solid rgba(13, 44, 104, 0.12);
}

.page-content__prose pre,
.page-content__prose code {
    font-family: Consolas, Monaco, monospace;
}

.page-content__prose pre {
    padding: 18px 20px;
    border-radius: 18px;
    background: #0f2247;
    color: #f3f6ff;
    overflow-x: auto;
}

.page-content__prose code {
    padding: 0.12em 0.4em;
    border-radius: 6px;
    background: #eef3fb;
    color: #12397d;
    font-size: 0.95em;
}

.page-content__prose pre code {
    padding: 0;
    background: transparent;
    color: inherit;
}

.page-content__prose .alignleft {
    float: left;
    margin: 0.3em 1.4em 1em 0;
}

.page-content__prose .alignright {
    float: right;
    margin: 0.3em 0 1em 1.4em;
}

.page-content__prose .aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

/* Стандартні блоки Gutenberg — у стилі сайту (універсально для .entry-content) */
.entry-content .wp-block-list,
.entry-content ul.wp-block-list,
.entry-content ol.wp-block-list {
    margin: 0 0 1.15em;
    padding-left: 1.4em;
    list-style-position: outside;
}

.entry-content ul.wp-block-list {
    list-style-type: disc;
}

.entry-content ol.wp-block-list {
    list-style-type: decimal;
}

.entry-content .wp-block-list li {
    margin-bottom: 0.45em;
}

.entry-content .wp-block-list li::marker {
    color: #1c56b3;
}

.entry-content .wp-block-paragraph {
    margin: 0 0 1.15em;
}

.entry-content .wp-block-heading {
    margin: 1.6em 0 0.7em;
    color: #10284f;
    font-family: var(--nexin-font);
    font-weight: 700;
    line-height: 1.2;
    text-transform: none;
}

.entry-content .wp-block-quote {
    margin: 0 0 1.15em;
    padding: 18px 22px;
    border-left: 4px solid #1c56b3;
    border-radius: 0 16px 16px 0;
    background: #f4f8ff;
    color: #20365c;
    font-style: italic;
}

.entry-content .wp-block-quote p {
    margin: 0 0 0.5em;
}

.entry-content .wp-block-quote p:last-child {
    margin-bottom: 0;
}

.entry-content .wp-block-separator {
    margin: 2em 0;
    border: 0;
    border-top: 1px solid rgba(13, 44, 104, 0.12);
}

.entry-content .wp-block-image {
    margin: 1.25em auto;
}

.entry-content .wp-block-image img {
    display: block;
    max-width: 100%;
    height: auto;
    border-radius: 18px;
}

.entry-content .wp-block-image figcaption {
    margin-top: 10px;
    color: #6b7892;
    font-size: 14px;
    line-height: 1.5;
    text-align: center;
}

.page-content__prose::after {
    content: "";
    display: block;
    clear: both;
}

.page-content__empty {
    padding: 22px 22px;
    border-radius: 18px;
    border: 1px dashed rgba(13, 44, 104, 0.24);
    background: linear-gradient(180deg, rgba(244, 248, 255, 0.85) 0%, rgba(255, 255, 255, 1) 100%);
    color: #20365c;
}

.page-content__empty-title {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.25;
    color: #10284f;
    margin: 0 0 8px;
}

.page-content__empty-text {
    margin: 0;
    color: #43506c;
    font-size: 15px;
    line-height: 1.6;
}

.page-content--404 .page-content__prose {
    text-align: center;
}

.error-404 {
    padding: 14px 0 2px;
}

.error-404__code {
    font-family: var(--nexin-font);
    font-weight: 800;
    letter-spacing: -0.06em;
    font-size: clamp(56px, 12vw, 120px);
    line-height: 1;
    color: #10284f;
    opacity: 0.12;
    margin: 0 0 10px;
}

.error-404__text {
    margin: 0 auto 18px;
    max-width: 56ch;
    color: #43506c;
    font-size: 16px;
    line-height: 1.7;
}

.error-404__actions {
    display: flex;
    justify-content: center;
}

.error-404__actions .thm-btn {
    padding: 14px 20px;
}

@media (max-width: 991px) {
    .page-content {
        padding: 44px 0 72px;
    }

    .page-content__prose {
        padding: 30px 28px;
        border-radius: 24px;
        font-size: 16px;
    }
}

@media (max-width: 767px) {
    .page-content {
        padding: 30px 0 56px;
    }

    .page-content__prose {
        padding: 22px 18px;
        border-radius: 18px;
        font-size: 15px;
        line-height: 1.75;
    }

    .page-content__prose h1 {
        font-size: 1.9rem;
    }

    .page-content__prose h2 {
        font-size: 1.55rem;
    }

    .page-content__prose h3 {
        font-size: 1.3rem;
    }

    /* Таблиці на мобільному: вигляд карток (ряд = картка з підписами) */
    .page-content__prose table {
        display: block;
        width: 100%;
        max-width: 100%;
        border: none;
        box-shadow: none;
        background: transparent;
    }
    .page-content__prose thead {
        display: none;
    }
    .page-content__prose tbody tr {
        display: block;
        margin-bottom: 1.25rem;
        padding: 1rem 1.1rem;
        background: #f8fafc;
        border: 1px solid rgba(13, 44, 104, 0.1);
        border-radius: 12px;
        box-shadow: 0 2px 8px rgba(13, 44, 104, 0.06);
    }
    .page-content__prose tbody tr:last-child {
        margin-bottom: 0;
    }
    .page-content__prose tbody td {
        display: block;
        padding: 0.5rem 0 0.75rem;
        border: none;
        border-bottom: 1px solid rgba(13, 44, 104, 0.06);
        word-wrap: break-word;
        overflow-wrap: break-word;
        white-space: normal;
        font-size: 0.9375rem;
        line-height: 1.5;
    }
    .page-content__prose tbody td:last-child {
        border-bottom: none;
        padding-bottom: 0;
    }
    .page-content__prose tbody td:first-child {
        padding-top: 0;
    }
    .page-content__prose tbody td::before {
        display: block;
        font-weight: 700;
        color: #10284f;
        font-size: 0.8125rem;
        margin-bottom: 0.35em;
        letter-spacing: 0.02em;
    }
    .page-content__prose tbody td:nth-child(1)::before {
        content: "Період";
    }
    .page-content__prose tbody td:nth-child(2)::before {
        content: "Назва закладу";
    }
    .page-content__prose tbody td:nth-child(3)::before {
        content: "Підстава (Рішення / Розпорядження)";
    }
    .page-content__prose tbody td strong {
        font-weight: 700;
    }

    .page-content__prose .alignleft,
    .page-content__prose .alignright {
        float: none;
        margin: 1.1em auto;
    }
}

/* Кнопка «Нагору» — читається на чорному та світлому фоні; вище виджета доступності */
.scroll-to-top {
    color: #10284f;
    background: #fff;
    padding: 8px 14px 8px 10px;
    height: auto;
    min-height: 40px;
    border-radius: 24px;
    border: 1px solid rgba(16, 40, 79, 0.15);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.18);
    bottom: 90px;
    right: 20px;
}

.scroll-to-top.show {
    bottom: 135px;
    right: -6px;
}

.scroll-to-top:hover {
    color: #0d367c;
    background: #f4f8ff;
    border-color: rgba(24, 78, 168, 0.3);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.22);
}

.scroll-to-top__text {
    color: inherit;
    font-weight: 600;
}

/* Трек полоси — завжди видно, зрозуміло де початок */
.scroll-to-top__wrapper {
    background-color: #dde4f0;
    border: 1px solid rgba(16, 40, 79, 0.2);
    border-radius: 3px;
    min-width: 30px;
}

.scroll-to-top__inner {
    background-color: #184ea8;
    border-radius: 2px;
}

.scroll-to-top:hover .scroll-to-top__wrapper {
    background-color: #d0d9e8;
    border-color: rgba(16, 40, 79, 0.25);
}

.scroll-to-top:hover .scroll-to-top__inner {
    background-color: #0d367c;
}

#chat-popup {
    display: none !important;
}

