/* An institution's page (item 851, Figma 13646-33153): the look's custom properties, the menu of its parts held
   under the header, the page's buttons and its placeholders. The hero in each of its three looks: org-hero.css
   (item 863). The sections: org-sections.css. The shell -- the font, the room under the fixed header,
   the section heads -- is the catalogue's (catalogue-pages/assets/page.css). Logical properties throughout: Hebrew
   and Arabic read from the right, English and Russian from the left. Colours are the brand's tokens
   (design-system/palette.css). Hovers move, never recolour. Shared with the local authority's page. */

.cil-orgp {
    --orgp-gutter: max(24px, calc((100% - 1420px) / 2));
    --orgp-ease: cubic-bezier(.22, 1, .36, 1);
    --orgp-teal: var(--cil-blue-dark-1);
    padding-bottom: 96px;
}
.cil-orgp :is(h1, h2, h3, p, ol, ul) { margin: 0; }
/* The theme's own list look (css/styles-rtl.css: ul, ol > li) is taken off the lists the page writes without a class.
   A component's list keeps its own room: the reset is stronger than a lone class, and on every component it took the
   rows' room for their cards' shadows (the stories looked cut, item 877), the badges', the sort and filter options' and
   the chips' padding (checked by removing it in the browser: those six alone changed). */
.cil-orgp :is(ol, ul) { list-style: none; }
.cil-orgp :is(ol, ul):not([class]) { padding: 0; }
.cil-orgp :is(ol, ul) > li:not([class]) { margin: 0; padding: 0; }
.cil-orgp :is(ol, ul) > li::before { content: none; }
/* The sections the menu jumps to land under the pinned header and menu. */
.cil-orgp-section { scroll-margin-top: calc(var(--cil-hdr-height, 64px) + 80px); }
.cil-orgp-section:focus { outline: none; }

/* ---- Buttons (Figma 15177:41778, 15177:40409) ---- */
.cil-orgp .cil-orgp-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    height: 48px; padding: 0 32px; border: 1px solid; border-radius: 24px;
    font-size: 16px; font-weight: 700; line-height: 1.2; white-space: nowrap; text-decoration: none;
    transition: transform .2s var(--orgp-ease), box-shadow .2s var(--orgp-ease);
}
.cil-orgp .cil-orgp-btn--primary { border-color: var(--orgp-teal); background: var(--cil-blue); color: var(--cil-black); }
.cil-orgp .cil-orgp-btn--secondary { border-color: var(--cil-black); background: var(--cil-white); color: var(--cil-black); }
.cil-orgp .cil-orgp-btn:is(:hover, :focus, :active) { color: var(--cil-black); text-decoration: none; }
.cil-orgp .cil-orgp-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 12px color-mix(in srgb, var(--cil-black) 14%, transparent); }
.cil-orgp .cil-orgp-btn:active { transform: scale(.97); box-shadow: none; }
.cil-orgp :is(.cil-orgp-btn, a, button):focus-visible { outline: 2px solid var(--orgp-teal); outline-offset: 2px; }
/* The way to the institution's own site (item 862): the classic leaving-arrow, done once -- the arrow flies out through
   its corner and comes back in from the opposite one, inside its own window, while the words lean toward it and a
   line draws under them from where the reading starts. */
.cil-orgp .cil-orgp-btn__away { display: inline-grid; overflow: hidden; width: 18px; height: 18px; }
.cil-orgp .cil-orgp-btn__away svg { grid-area: 1 / 1; }
.cil-orgp .cil-orgp-btn__words { position: relative; inset-inline-start: 0; transition: inset-inline-start .3s var(--orgp-ease); }
.cil-orgp .cil-orgp-btn__words::after {
    content: ""; position: absolute; inset-inline: 0; bottom: -3px; height: 2px; border-radius: 1px; background: currentColor;
    transform: scaleX(0); transform-origin: var(--orgp-start, right); transition: transform .35s var(--orgp-ease);
}
.lang-to-css-ltr .cil-orgp .cil-orgp-btn__words::after { --orgp-start: left; }
.cil-orgp .cil-orgp-btn--away:is(:hover, :focus-visible) .cil-orgp-btn__away svg { animation: cil-orgp-away .55s var(--orgp-ease); }
.cil-orgp .cil-orgp-btn--away:is(:hover, :focus-visible) .cil-orgp-btn__words { inset-inline-start: 2px; }
.cil-orgp .cil-orgp-btn--away:is(:hover, :focus-visible) .cil-orgp-btn__words::after { transform: scaleX(1); }
@keyframes cil-orgp-away {
    0%   { transform: translate(0, 0); }
    45%  { transform: translate(120%, -120%); }
    46%  { transform: translate(-120%, 120%); }
    100% { transform: translate(0, 0); }
}

/* ---- The menu of the page's parts (Figma 13656:564), pinned under the site's header ---- */
.cil-orgp-anchors {
    position: sticky; top: var(--cil-hdr-height, 64px); z-index: 50;
    border-bottom: 1px solid var(--cil-black-light-3); background: var(--cil-white);
}
.cil-orgp-anchors__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-inline: var(--orgp-gutter); }
.cil-orgp-anchors__list { display: flex; gap: clamp(16px, 2vw, 36px); min-width: 0; overflow-x: auto; scrollbar-width: none; }
.cil-orgp-anchors__list::-webkit-scrollbar { display: none; }
.cil-orgp .cil-orgp-anchors__link {
    position: relative; display: block; padding: 18px 0 16px; color: var(--cil-black-regular-6);
    font-size: 16px; line-height: 1.2; white-space: nowrap; transition: color .25s ease;
}
.cil-orgp-anchors__link::after {
    content: ''; position: absolute; inset: auto 0 0; height: 3px; border-radius: 2px 2px 0 0;
    background: var(--cil-blue); transform: scaleX(0); transition: transform .3s var(--orgp-ease);
}
.cil-orgp .cil-orgp-anchors__link:is(:hover, :focus) { color: var(--cil-black); text-decoration: none; }
.cil-orgp-anchors__link:hover::after { transform: scaleX(.4); }
.cil-orgp .cil-orgp-anchors__link[aria-current] { color: var(--orgp-teal); font-weight: 700; }
.cil-orgp-anchors__link[aria-current]::after { transform: scaleX(1); }
.cil-orgp .cil-orgp-anchors__link:focus-visible { outline-offset: -2px; }
.cil-orgp .cil-orgp-anchors__share {
    display: inline-flex; align-items: center; gap: 6px; flex: none; height: 32px; margin: 0; padding: 0 14px;
    border: 1px solid var(--orgp-teal); border-radius: 16px; background: var(--cil-white);
    color: var(--orgp-teal); font: inherit; font-size: 14px; font-weight: 600; transition: transform .2s var(--orgp-ease);
}
.cil-orgp .cil-orgp-anchors__share:hover { background: var(--cil-white); color: var(--orgp-teal); transform: translateY(-1px); }
.cil-orgp .cil-orgp-anchors__share:active { transform: scale(.97); }
.cil-orgp .cil-orgp-anchors__share[aria-expanded="true"] { background: var(--orgp-teal); color: var(--cil-white); }

/* ---- Loading (Figma 14028:2 and each look's "Loading"): the shapes, one slow shimmer ---- */
.cil-orgp-skel { display: block; border-radius: 8px; background: var(--cil-black-light-2); animation: cil-orgp-shimmer 1.6s ease-in-out infinite; }
.cil-orgp-skel--crumbs { width: 240px; height: 14px; }
.cil-orgp-skel--photo { width: 100%; height: 100%; border-radius: 0; }
.cil-orgp-skel--fill { width: 100%; height: 100%; }
.cil-orgp-skel--kind { grid-column: 2; align-self: end; width: 160px; height: 16px; margin-bottom: 8px; }
.cil-orgp-skel--name { grid-column: 2; width: min(420px, 100%); height: 44px; }
.cil-orgp-skel--line { grid-column: 1 / -1; width: min(900px, 100%); height: 16px; margin-top: 24px; }
.cil-orgp-skel--short { width: min(560px, 70%); margin-top: 10px; }
.cil-orgp-skel--btn { width: 180px; height: 48px; border-radius: 24px; }
.cil-orgp-skel--stat { width: 140px; height: 56px; }
.cil-orgp-skel--title { width: 280px; height: 40px; }
.cil-orgp-skel--card { height: 320px; border-radius: 16px; }
.cil-orgp-body--loading { padding-inline: var(--orgp-gutter); }
.cil-orgp-skelHead { display: flex; flex-direction: column; gap: 12px; margin-bottom: 24px; }
.cil-orgp-skelHead .cil-orgp-skel--line { margin-top: 0; width: min(520px, 80%); }
.cil-orgp-skelRow { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
@keyframes cil-orgp-shimmer { 50% { opacity: .55; } }

/* ---- Narrower screens ---- */
@media (max-width: 1079px) {
    .cil-orgp { --orgp-gutter: 16px; }
    .cil-orgp-skelRow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
    .cil-orgp-anchors__inner { gap: 12px; }
    .cil-orgp .cil-orgp-anchors__link { padding-block: 14px 12px; font-size: 14px; }
    .cil-orgp-anchors__share span { display: none; }
    .cil-orgp-skel--card { height: 220px; }
}

@media (prefers-reduced-motion: reduce) {
    /* The way out: the line still draws under the words; the arrow and the words keep still. */
    .cil-orgp .cil-orgp-btn--away:is(:hover, :focus-visible) .cil-orgp-btn__away svg { animation: none; }
    .cil-orgp .cil-orgp-btn__words { transition: none; }
    .cil-orgp .cil-orgp-btn--away:is(:hover, :focus-visible) .cil-orgp-btn__words { inset-inline-start: 0; }
    .cil-orgp .cil-orgp-btn__words::after { transition: transform .15s ease; }
    .cil-orgp .cil-orgp-btn, .cil-orgp-anchors__link::after, .cil-orgp .cil-orgp-anchors__share { transition: none; }
    .cil-orgp .cil-orgp-btn:hover, .cil-orgp .cil-orgp-anchors__share:hover { transform: none; }
    .cil-orgp-skel { animation: none; }
}
