@import url('https://fonts.googleapis.com/css2?family=Noto+Sans:ital,wght@0,100..900;1,100..900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Hebrew:wght@100..900&display=swap');

:root {
    --navy: #000080;
    --red: #dc143c;
}

* {
    margin: 0;
    padding: 0;
    border: 0;
    box-sizing: border-box;

    font-family: 'Noto Sans', sans-serif;
}

body[lang="he"] * {
    font-family: 'Noto Sans Hebrew', sans-serif;
}

body {
    display: flex;
    flex-direction: column;
    align-items: center;

    min-height: 100vh;

    background-color: #eee;
    background-image: url("/img/bg.jpg");
}

hr {
    border-top: 1px solid #000;
}

main {
    flex: 1;
}

header,
main,
footer {
    display: flex;
    justify-content: center;
    width: 100%;
    padding: 1rem 2rem;
}

header {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: 1rem 2rem;
}

.logo {
    width: 100%;
    background-color: #fff;
    text-align: center;
    border: 3px solid var(--navy);
    padding: 20px 0;
    margin-bottom: 20px;
    display: block;
    text-decoration: none;
    cursor: pointer;
}

.logo img {
    /* Fixed height (RU logo at former max-width 400px); width scales by aspect ratio */
    height: 89px;
    width: auto;
    max-width: 100%;
}

h1.heading {
    color: var(--navy);
    font-family: 'Noto Sans', sans-serif;
    font-size: 32px;
    margin: 20px;
}

.main-wrapper {
    display: flex;
    width: 100%;
}

.side-menu {
    border-inline-end: 3px solid var(--red);
    width: 300px;

    text-align: center;
    color: var(--navy);
    font-size: 20px;
    padding: 0 20px;
}

.side-menu h2 {
    text-align: center;
    color: var(--navy);
    font-size: 30px;
}

.side-menu h4 {
    text-align: center;
    color: var(--navy);
    margin-bottom: 20px;
}

.side-menu ul {
    list-style: none;
    margin-bottom: 50px;
    padding: 0;
}

.side-menu li {
    margin-bottom: 40px;
}

.main-content {
    flex: 1;
    padding: 0 50px;
    font-size: 18px;
    /* Dictionary hyphenation when lang is set on body (ru, en, …). Requires soft breaks in supporting browsers. */
    -webkit-hyphens: auto;
    -ms-hyphens: auto;
    hyphens: auto;
    overflow-wrap: break-word;
}

/* Hebrew: no hyphenation at line breaks (typographic convention differs from ru/en). */
body[lang="he"] .main-content {
    -webkit-hyphens: none;
    -ms-hyphens: none;
    hyphens: none;
}

.main-content h1 {
    margin: 1.33em 0 0.67em
}

.main-content h2 {
    margin: 1.66em 0 0.83em
}

.main-content h3 {
    margin: 2em 0 1em
}

.main-content h2,
.main-content h3 {
    color: var(--navy);
    text-align: center;
}

.main-content h3.subheading {
    margin: 0
}

.main-content h4 {
    color: red;
    text-align: end;
    margin: 1.33em 0
}

/* POZ Year Page Styles */
.poz-entries-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
}

.poz-entry-cell {
    border-bottom: 1px solid #000;
    padding: 20px 0;
    width: 100%;
}

.poz-entry-cell:last-child {
    border-bottom: none;
}

.poz-entry-inner {
    width: 70%;
    margin: 0 auto;
    overflow: hidden;
}

.poz-entry-images-container {
    float: left;
    width: auto;
    margin-right: 20px;
    margin-bottom: 10px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.poz-entry-image-container {
    text-align: center;
}

.poz-entry-image-container.poz-entry-associated {
    margin-top: 10px;
}

.poz-entry-image {
    display: block;
    border: 1px solid #000;
    width: 250px;
    height: auto;
    margin: 0 auto;
}

.poz-entry-caption {
    color: var(--red);
    text-align: center;
    margin-top: 5px;
    font-weight: normal;
    font-size: 18px;
    display: block;
    width: 250px;
    max-width: 250px;
}

.poz-entry-text {
    font-size: 18px;
    line-height: 1.6;
    overflow: hidden;
}

.poz-entry-text p {
    margin-bottom: 1em;
    text-indent: 0 !important;
}

.poz-entry-text p:first-child {
    margin-top: 0;
}

.poz-entry-text p:last-child {
    margin-bottom: 0;
}

.main-content h4.subheading {
    margin: 0;
    text-align: center !important;
    color: #000080 !important;
    margin: 1.33em 0 0.67em;
}

.main-content h4.start {
    color: var(--navy);
    text-align: start !important;
}

.main-content h5 {
    margin: 1.67em 0
}

.main-content h6 {
    margin: 2.33em 0
}

.main-content p {
    margin: 1em 0;
    text-indent: 1.2em;
}

body[lang="en"] .main-content p {
    text-indent: 0;
}

body[lang="he"] .main-content p {
    text-indent: 0;
}

.main-content ul,
.main-content ol {
    padding-inline-start: revert;
    margin: 1em 0;
}

.italic {
    font-style: italic;
}

.bold {
    font-weight: bold;
}

/* Short aliases (same as .italic / .bold) */
.i {
    font-style: italic;
}

.b {
    font-weight: bold;
}

img.black-border {
    border: 10px solid #000;
    padding: 6px;
}

h2.black-border {
    margin: 0 auto;
    width: fit-content;
    border: 6px solid;
    padding: 10px;
    color: #000;
    margin-bottom: 1em;
}

.footnotes {
    clear: both;
    margin-top: 3em;
    border-top: 1px solid #000;
    padding-top: 2em;
    font-size: .9em;
    margin-bottom: 3em;
    padding-bottom: 2em;
    border-bottom: 1px solid #000;
}

.footnotes h3:first-child {
    margin-top: 0;
}

.copyright {
    text-align: center;
}

.main-pic,
.main-pic img {
    width: 800px;
}

.main-pic-caption {
    height: 100px;
    background: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    font-size: 20px;
    color: var(--navy);
    border: 3px solid var(--navy);
}

.main-pic-caption p {
    text-indent: 0;
}

.main-content.home {
    padding: 50px;
    font-size: 22px;
    display: flex;
    justify-content: center;
}

img.float-start,
img.float-left {
    float: inline-start;
    margin-inline-end: 20px;
    margin-block-start: 0;
    margin-block-end: 20px;
}

.images-container {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    flex-wrap: nowrap; /* Prevent wrapping - keep all images in one row */
    margin-block-end: 2em;
    gap: 20px;
}

.images-container.no-gap {
    gap: 0;
}

.images-container > div[style*="display: flex"] {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.images-container.no-gap > div[style*="display: flex"] {
    gap: 0;
}

/* For syntax with shared caption (|), make container column to put caption below images */
.images-container.two-images-shared-caption {
    flex-direction: column;
}

.images-container.two-images-shared-caption > div[style*="display: flex"] {
    width: 100%;
}

/* Optional: align edges - first item to right, last item to left */
.images-container.align-edges .images-item:first-child {
    align-items: flex-end;
}

.images-container.align-edges .images-item:last-child {
    align-items: flex-start;
}

.images-container.align-edges.no-gap .images-item:first-child {
    align-items: flex-end;
    justify-content: flex-end;
}

.images-container.align-edges.no-gap .images-item:last-child {
    align-items: flex-start;
    justify-content: flex-start;
}


.images-item {
    flex: 0 1 auto; /* Don't grow, can shrink, auto basis */
    min-width: 0; /* Allow shrinking below content size */
    max-width: 100%; /* Prevent overflow */
    display: flex;
    flex-direction: column;
    align-items: center;
    box-sizing: border-box; /* Include padding/border in width calculation */
}

.images-item img {
    max-width: 100%;
    height: auto;
    display: block; /* Remove inline spacing */
}

.images-container img {
    max-width: 100%;
    height: auto;
}

.images-container .image-caption {
    display: block;
    text-align: center;
    font-size: 0.9em;
    font-style: italic;
    margin-top: 0.5em;
    width: 100%;
}

.columns-container {
    display: flex;
    gap: 2em;
    margin: 1em 0;
}

.columns-container .column {
    flex: 1;
}

.interview-block {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    gap: 0 2em;
    margin: 1em 0 2em;
}

.interview-image {
    grid-column: 1;
    grid-row: 1;
}

.interview-image img {
    max-width: 100%;
    height: auto;
}

.interview-text {
    grid-column: 2;
    grid-row: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    font-style: italic;
}

.interview-text.annotation {
    color: navy;
}

.interview-caption {
    grid-column: 1;
    grid-row: 2;
    margin-top: 0.5em;
}

/* If no image, text spans both columns */
.interview-block:not(:has(.interview-image)) .interview-text {
    grid-column: 1 / -1;
}

.interview-text p {
    margin: 0.5em 0;
}

img.float-end,
img.float-right {
    float: inline-end;
    margin-inline-start: 20px;
    margin-block-start: 0;
    margin-block-end: 20px;
}

p.float-start,
p.float-left {
    float: inline-start;
    margin-inline-end: 20px;
    margin-block-start: 0;
    margin-block-end: 20px;
    display: table;
    width: 1px;
}

p.float-start img,
p.float-left img {
    display: block;
    width: auto;
    height: auto;
    margin: 0;
}

p.float-start .image-caption,
p.float-left .image-caption {
    display: table-caption;
    caption-side: bottom;
    width: 0;
    min-width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

p.float-end,
p.float-right {
    float: inline-end;
    margin-inline-start: 20px;
    margin-block-start: 0;
    margin-block-end: 20px;
    display: table;
    width: 1px;
}

p.float-end img,
p.float-right img {
    display: block;
    width: auto;
    height: auto;
    margin: 0;
}

p.float-end .image-caption,
p.float-right .image-caption {
    display: table-caption;
    caption-side: bottom;
    width: 0;
    min-width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Limit image width in articles (but not main-pic on home page, not album grids) */
.main-content img {
    max-width: 450px;
    height: auto;
}

.main-content .albums-grid img,
.main-content .albums-grid-inline img,
.main-content #album-grid img {
    max-width: none;
}

.main-content img.full-width {
    max-width: none;
}

.main-content .image-caption {
    display: block;
    text-align: center;
    font-size: 0.9em;
    font-style: italic;
    margin-top: 0.5em;
    color: #666;
    line-height: 1.4;
    white-space: normal;
}

.main-pic img {
    max-width: 800px;
}

/* Utility text classes */

.no-indent {
    text-indent: 0 !important;
}

.card {
    background: rgba(255, 240, 192, 0.5);
    padding: 10px 20px;
}

.clear-both {
    clear: both;
}

.center {
    text-align: center !important;
    text-indent: 0 !important;
}

.right {
    text-align: right !important;
}

.end {
    text-align: end !important;
}

.left {
    text-align: left !important;
}

.start {
    text-align: start !important;
}

.full-indent {
    padding-inline-start: 1.2em;
    text-indent: 0 !important;
}

.page-nav {
    margin: 2em 0;
    display: flex;
    justify-content: space-between;
    clear: both;
}

.page-nav.nav-single {
    justify-content: center;
}

.page-nav.nav-double {
    justify-content: space-between;
}

.annotation {
    color: navy;
}

.red {
    color: red !important;
}

a.lang-btn {
    font-size: 40px;
    text-decoration: none;
}

/* Table styles */
.main-content table {
    border-collapse: collapse;
    width: 100%;
    margin: 1em 0;
}

.main-content table td,
.main-content table th {
    border: 2px solid #000;
    padding: 8px;
    text-align: left; /* Default, can be overridden by inline style */
    vertical-align: top;
}

.main-content table th {
    font-weight: bold;
    text-align: left; /* Default, can be overridden by inline style */
}

/* Remove all borders from table */
.main-content table.no-border,
.main-content table.no-border td,
.main-content table.no-border th {
    border: none;
}

/* Spacing between columns */
.main-content table.column-spacing td:not(:first-child),
.main-content table.column-spacing th:not(:first-child) {
    padding-left: 4em;
}

/* Vertical spacing between cell content */
.main-content table.vertical-spacing td,
.main-content table.vertical-spacing th {
    padding-top: 0.5em;
    padding-bottom: 0.5em;
}

/* Search results */
.search-results {
    margin: 1em 0;
}

.search-result-item {
    margin: 1.5em 0;
    padding-left: 1.5em;
}

.search-result-section {
    color: #666;
    font-size: 14px;
}

.search-result-item a {
    display: inline;
    font-size: 1.1em;
    font-weight: 500;
    margin-bottom: 0.5em;
    color: var(--navy);
    text-decoration: underline;
}

.search-result-item .snippet {
    margin-top: 0.5em;
    color: #333;
    line-height: 1.5;
}

.search-results .empty {
    margin: 1em 0;
    padding-left: 1.5em;
    font-style: italic;
    color: #666;
}

/* Running head: wiki "start <||> center <||> end" — flex, center column optically centered */
.running-head {
    text-indent: 0 !important;
    display: flex;
    flex-direction: row;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
    border-top: 2px solid #000;
    border-bottom: 2px solid #000;
    padding: 0.35em 0;
    margin: 0.75em 0;
    gap: 0.5rem;
}

.running-head-start,
.running-head-end {
    flex: 1 1 0;
    min-width: 0;
}

.running-head-start {
    text-align: start;
}

.running-head-center {
    flex: 0 1 auto;
    text-align: center;
    max-width: 50%;
}

.running-head-end {
    text-align: end;
}

/* Table of contents style: text <...> number */
.toc-entry {
    text-indent: 0 !important;
    display: flex;
    align-items: flex-end;
}

.toc-entry .toc-left-dots {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: flex-end;
    padding-right: 0.3em;
}

.toc-entry .toc-left-dots > *:first-child {
    flex-shrink: 1;
    min-width: 0;
}

.toc-entry .toc-dots {
    flex: 1;
    border-bottom: 1px dashed currentColor;
    min-width: 1em;
    height: 1em;
    margin-left: 0.3em;
    flex-shrink: 0;
}

.toc-entry .toc-right {
    flex-shrink: 0;
    white-space: nowrap;
    margin-left: 0.3em;
}

.grey-card {
    background-color: #ccc;
    padding: 20px;
}

blockquote {
    display: flow-root;
    padding-inline-start: 1em;
    border-inline-start: 2px solid #999;
}

.cookie-consent {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 10000;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: #2a2a2a;
    color: #f5f5f5;
    box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.2);
    font-size: 0.95rem;
}

.cookie-consent[hidden] {
    display: none !important;
}

.cookie-consent-text {
    margin: 0;
    max-width: 42rem;
    line-height: 1.45;
}

.cookie-consent-btn {
    flex-shrink: 0;
    padding: 0.5rem 1.25rem;
    border: none;
    border-radius: 4px;
    background: #c9a227;
    color: #1a1a1a;
    font-weight: 600;
    cursor: pointer;
}

.cookie-consent-btn:hover {
    background: #dbb42e;
}