/* =============================================================
   ITI Design System — Plain pages and search results

   Loaded on any page that has no template of its own, and on search
   results. The content on those pages is whatever the editor stored, so
   this sheet sets the surface and the running typography and leaves the
   markup alone.
   ============================================================= */

.doc { font-family: var(--iti-font-sans); }

.doc-body {
  padding: clamp(1.25rem, .8rem + 1.6vw, 2.5rem);
  background: var(--iti-surface);
  border: 1px solid var(--iti-line);
  clip-path: var(--iti-clip);
  font-size: 1rem;
  line-height: 1.75;
  color: var(--iti-text);
}
.doc-body > *:first-child { margin-top: 0; }
.doc-body > *:last-child { margin-bottom: 0; }

/* ---------- Running copy ---------- */

.doc-body p { margin: 0 0 1.05em; }
.doc-body strong, .doc-body b { font-weight: 600; color: var(--iti-text); }
.doc-body em, .doc-body i { color: inherit; }

.doc-body a {
  color: var(--iti-blue);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.doc-body a:hover { color: var(--iti-blue-700); }

.doc-body h1, .doc-body h2, .doc-body h3,
.doc-body h4, .doc-body h5, .doc-body h6 {
  margin: 1.6em 0 .55em;
  font-weight: 600;
  line-height: 1.25;
  color: var(--iti-text);
  text-wrap: balance;
}
.doc-body h1 { font-size: 1.6rem; }
.doc-body h2 { font-size: 1.35rem; }
.doc-body h3 { font-size: 1.18rem; }
.doc-body h4, .doc-body h5, .doc-body h6 { font-size: 1.05rem; }

.doc-body ul, .doc-body ol { margin: 0 0 1.05em; padding-left: 1.4em; }
.doc-body li { margin-bottom: .4em; }
.doc-body ul li { list-style: disc; }
.doc-body ol li { list-style: decimal; }
/* Editors sometimes nest a list purely to indent it, marking the outer item
   `list-style-type: none` inline. Don't reintroduce a bullet there. */
.doc-body li[style*="none"] { list-style: none; }

.doc-body img { max-width: 100%; height: auto; }
.doc-body figure { margin: 0 0 1.05em; }
.doc-body blockquote {
  margin: 0 0 1.05em;
  padding: .3rem 0 .3rem 1.1rem;
  border-left: 3px solid var(--iti-electric);
  color: var(--iti-text-muted);
}
.doc-body hr {
  margin: var(--iti-s-6) 0;
  border: 0;
  border-top: 1px solid var(--iti-line);
}

/* Wide content gets its own scroller rather than pushing the page sideways. */
.doc-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 1.05em;
}
.doc-body th, .doc-body td {
  border: 1px solid var(--iti-line);
  padding: .5rem .7rem;
  text-align: left;
}
.doc-body pre {
  overflow-x: auto;
  padding: var(--iti-s-4);
  background: var(--iti-paper);
  border: 1px solid var(--iti-line);
  font-family: var(--iti-font-mono);
  font-size: .85rem;
}

/* ---------- Search results ----------
   The theme's own list, set like the announcement and project listings
   rather than like Astra's blog loop. */

/* This list lives inside .doc-body, whose generic rules give list items a
   disc and a bottom margin — meant for prose, not for this. */
.doc-body .search-results,
.search-results {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--iti-line);
}
.doc-body .search-results > li { list-style: none; margin-bottom: 0; }

.search-result {
  position: relative;
  margin: 0;
  padding: var(--iti-s-4) 2.25rem var(--iti-s-4) 0;
  list-style: none;
  border-bottom: 1px solid var(--iti-line);
  transition: background var(--iti-dur) var(--iti-ease);
}
.search-result:last-child { border-bottom: 0; }
.search-result:hover,
.search-result:focus-within { background: var(--iti-paper); }

.search-result__meta {
  display: flex;
  align-items: baseline;
  gap: var(--iti-s-3);
  flex-wrap: wrap;
  margin: 0 0 .25rem;
}
.search-result__type {
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: var(--iti-track-label);
  text-transform: uppercase;
  color: var(--iti-ember-ink);
}
.search-result__type::before { content: "["; opacity: .6; }
.search-result__type::after  { content: "]"; opacity: .6; }
.search-result__date {
  font-size: .78rem;
  font-weight: 500;
  color: var(--iti-text-muted);
}

.search-result__title {
  margin: 0 0 .3rem;
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--iti-text);
}
.search-result__link { color: inherit; text-decoration: none; }
/* Stretched over the row, so the whole row is clickable while the link
   still names only the result. */
.search-result__link::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
}
.search-result__link:focus-visible { outline: none; }
/* Keyboard only. :focus-within has no -visible counterpart — it asks
   "is focus inside me", which a mouse click answers too, so clicking a
   card used to leave it ringed. :has() asks whether the link inside is
   focused the way a keyboard focuses it. */
.search-result:has(a:focus-visible) {
  outline: 2px solid var(--iti-electric);
  outline-offset: 2px;
}
.search-result:hover .search-result__title,
.search-result:focus-within .search-result__title { color: var(--iti-blue); }

.search-result__excerpt {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0;
  font-size: .92rem;
  line-height: 1.6;
  color: var(--iti-text-muted);
}

.search-result__go {
  position: absolute;
  right: .4rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--iti-text-decor);
  transition: transform var(--iti-dur) var(--iti-ease),
              color var(--iti-dur) var(--iti-ease);
}
.search-result:hover .search-result__go {
  color: var(--iti-blue);
  transform: translateY(-50%) translateX(3px);
}

.search-empty {
  margin: 0;
  font-size: .95rem;
  color: var(--iti-text-muted);
}

/* ---------- Pagination ---------- */

.search-pager {
  display: flex;
  flex-wrap: wrap;
  gap: var(--iti-s-2);
  margin-top: var(--iti-s-6);
  padding-top: var(--iti-s-5);
  border-top: 1px solid var(--iti-line);
}
.search-pager a,
.search-pager span {
  padding: .35rem .8rem;
  font-size: .88rem;
  color: var(--iti-text);
  text-decoration: none;
  border: 1px solid var(--iti-line);
}
.search-pager a:hover { border-color: var(--iti-electric-dim); color: var(--iti-blue); }
.search-pager .current {
  background: var(--iti-ink-700);
  border-color: var(--iti-ink-700);
  color: var(--iti-on-dark);
}

/* =========================================================
   Βράβευση καλύτερων δημοσιεύσεων
   =========================================================
   The award page carried its styling in 24 style attributes: the accent
   colour on every icon, the centring on the year headings, the spacing
   between entries. Those are here now, keyed to classes the content
   carries. Every icon it had is still in the content — only the colour
   moved.
   ========================================================= */

/* =========================================================
   Awards page — the two-column layout and its contents menu
   =========================================================
   The page is three long sections and was a single scroll. The menu is part
   of the content, so the grid is declared on the wrapper the content
   provides rather than on .doc-body, which other documents share. */

/* On this page the card is the CONTENT column, not the whole document: the
   contents menu belongs beside it, on the page ground, rather than inside
   the panel it indexes. Done by moving .doc-body's own card onto
   .award-main, so neither the template nor the page's markup has to know. */
.page-id-33753 .doc-body {
  padding: 0;
  background: none;
  border: 0;
  clip-path: none;
}
.page-id-33753 .award-main {
  padding: clamp(1.25rem, .8rem + 1.6vw, 2.5rem);
  background: var(--iti-surface);
  border: 1px solid var(--iti-line);
  clip-path: var(--iti-clip);
}
.page-id-33753 .award-main > *:first-child { margin-top: 0; }
.page-id-33753 .award-main > *:last-child { margin-bottom: 0; }

.award-layout {
  display: grid;
  grid-template-columns: minmax(0, 15rem) minmax(0, 1fr);
  gap: var(--iti-s-7);
  align-items: start;
}
.award-main { min-width: 0; }   /* so long citations wrap instead of widening the grid */

/* Sticky, because the point of it is to be reachable from halfway down a
   section. The offset clears the site header, which is sticky too. */
.award-toc {
  position: sticky;
  top: var(--iti-s-8, 5rem);
  padding: var(--iti-s-5);
  background: var(--iti-surface);
  border: 1px solid var(--iti-line);
  border-left: 3px solid var(--iti-electric);
  clip-path: var(--iti-clip-sm);
}
/* Qualified with .doc-body: the document styles set the marker on
   `.doc-body ul li`, which outranks a bare `.award-toc li`. */
.doc-body .award-toc ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.doc-body .award-toc li {
  margin: 0;
  list-style: none;
}
.doc-body .award-toc li + li { margin-top: var(--iti-s-3); }
.award-toc a {
  display: block;
  padding: var(--iti-s-2) 0;
  font-size: var(--iti-fs-sm);
  font-weight: 600;
  line-height: var(--iti-lh-body);
  color: var(--iti-text);
  text-decoration: none;
  border-left: 2px solid transparent;
  padding-left: var(--iti-s-3);
  transition: color var(--iti-dur) var(--iti-ease),
              border-color var(--iti-dur) var(--iti-ease);
}
.award-toc a:hover,
.award-toc a:focus-visible {
  color: var(--iti-blue-700);
  border-left-color: var(--iti-electric);
}
.award-toc a:focus-visible {
  outline: 2px solid var(--iti-electric);
  outline-offset: 2px;
}

/* An anchored heading must not land under the sticky site header. */
.doc-body .award-year[id] { scroll-margin-top: var(--iti-s-8, 5rem); }

@media (max-width: 991px) {
  .award-layout {
    grid-template-columns: 1fr;
    gap: var(--iti-s-6);
  }
  /* Stacked above the content it indexes, so it stops being sticky —
     a bar following you down a phone screen is in the way, not in hand. */
  .award-toc { position: static; }
  .award-toc ul {
    display: flex;
    flex-wrap: wrap;
    gap: var(--iti-s-2) var(--iti-s-5);
  }
  .award-toc li + li { margin-top: 0; }
}

/* The full reference under a winner's name. The name answers "who", this
   answers "which paper" — so it is present but quieter. */
.doc-body .award-citation {
  display: block;
  margin-top: var(--iti-s-3);
  font-size: var(--iti-fs-sm);
  font-weight: 400;
  line-height: var(--iti-lh-body);
  color: var(--iti-text-muted);
}
.doc-body .award-citation a { color: var(--iti-blue-700); }

/* The lists in the process section. The content used to carry • characters
   in plain text; these are real lists now. */
.doc-body .award-terms { margin: 0 0 var(--iti-s-5) var(--iti-s-5); }
.doc-body .award-terms li { margin-bottom: var(--iti-s-2); }

/* The first section opens the page now that the intro has moved to the end,
   so it takes no rule above it. Addressed by its anchor rather than by
   position: :has() carries the specificity of its argument, so the rule that
   draws the rule above each year (three classes inside the :has) outranks a
   plain :first-child override. An id here settles it and says which section
   is meant. */
.page-id-33753 .doc-body .container:has(#awards-2024) {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

/* The year heading — "Αποτελέσματα βράβευσης … για το έτος 2025", with an
   award mark either side of it. Centred, as it was, and given the weight the
   rest of the site gives a section heading. */
.doc-body .award-year {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--iti-s-3);
  /* A band, not a line of text. Each year is a separate set of results, and
     the page is long enough that another centred heading in the flow read as
     one more paragraph rather than the start of a new block. */
  /* css/style.css makes .position-title a flex container, so this heading is
     a flex item and sizes to its text — as a plain heading that was
     invisible, but a band has to reach both edges of the column. */
  flex: 1 1 100%;
  margin: 0 0 var(--iti-s-6);
  padding: var(--iti-s-4) var(--iti-s-5);
  background: var(--iti-paper);
  border: 1px solid var(--iti-line);
  clip-path: var(--iti-clip-sm);
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: .01em;
  color: var(--iti-text);
  text-align: center;
  text-wrap: balance;
}

/* The gap belongs to the section, so it is set on the wrapper the content
   puts around each year heading rather than on the heading — the heading is
   inside two divs, and a margin there would sit inside the band.

   The child chain is spelled out because a loose :has(.award-year) also
   matches the container that wraps the whole document, which would have
   drawn this rule across the top of the page. Degrades quietly where :has()
   is unsupported: the band stays, only the rule above it is lost. */
.page-id-33753 .doc-body .container:has(> .row > .position-title > .award-year) {
  margin-top: var(--iti-s-9);
  padding-top: var(--iti-s-7);
  border-top: 2px solid var(--iti-line-strong);
}

/* The rule the content already carries between the two years. The border
   above does the separating now, so this would be a second line saying the
   same thing. */
.page-id-33753 .doc-body hr { display: none; }

/* The award mark. It was #026bb0 inline, which is a blue the site does not
   use; --iti-blue is the one it was reaching for. */
.doc-body .award-mark {
  color: var(--iti-blue);
  flex: none;
}
/* Beside a winner's name it sat at 20px with a 10px gap. */
.doc-body li .award-mark {
  margin-right: var(--iti-s-3);
  font-size: 1.15rem;
}

/* One award and its citation. The 40px that separated them was on every
   entry; it belongs to the relationship, not to each item. */
.doc-body .award-entry {
  margin-bottom: var(--iti-s-6);
  list-style: none;
}
.doc-body .award-entry:last-child { margin-bottom: 0; }
.doc-body .award-entry--bare { list-style: none; }

/* The category above each winner — "Βραβείο καλύτερης δημοσίευσης σε
   Περιοδικό". It is a bare h5 in the content, which the document styles set
   at body size; give it the quiet label treatment instead so the winners'
   names stand clear of it.

   Scoped to the page, because an h5 carries no hint of being a label — a
   plain heading on some other document would not want to be uppercased and
   greyed. The award-* classes below need no such guard: they exist only in
   this page's content. */
.page-id-33753 .doc-body h5 {
  margin: var(--iti-s-6) 0 var(--iti-s-3);
  font-size: var(--iti-fs-sm);
  font-weight: 600;
  letter-spacing: var(--iti-track-label);
  text-transform: uppercase;
  color: var(--iti-text-muted);
}
