/* =============================================================
   ITI Design System — ΦΟΡΕΑΣ posts
   Loaded only on single posts: "Σχετικά με τον φορέα",
   "Ερευνητικές Μονάδες" and the nine research-unit pages.

   These posts keep their content exactly as it is stored — their own
   masthead, their own section menu and their own body, on the Bootstrap
   grid. Everything below restyles that existing markup, so the pages stay
   editable in the admin and nothing had to be rewritten:

     .breadcrumbs.overlay  the masthead band, with its background image
                           set inline on the element by the content
     .position-title       the title inside it
     .position-button      the "Φορέας >" button beside it
     .article-menu         the section menu column
     .menu-head            its first entry
     .article-menu-style   an entry
     .menu-titles          a group label between entries
     .content-container    the body column
     .top-image            the photograph at the top of it
     .title-main           the body heading
     .text-container       the running copy
   ============================================================= */

.art { font-family: var(--iti-font-sans); }

/* =========================================================
   Masthead
   The content sets `background-image` inline on this element, so the
   scrim and the grid are drawn over it with pseudo-elements rather than
   by replacing the background.
   ========================================================= */

.art .breadcrumbs.overlay {
  position: relative;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  color: var(--iti-on-dark);
}
.art .breadcrumbs.overlay::before {
  content: "";
  position: absolute;
  inset: 0;
  /* css/style.css sets `.overlay::before { opacity: .8 }`, which would
     multiply every alpha in the gradient below and wash the scrim out. */
  opacity: 1;
  background: linear-gradient(100deg,
    rgba(4, 18, 31, .96) 0%,
    rgba(4, 18, 31, .88) 38%,
    rgba(4, 18, 31, .5) 70%,
    rgba(4, 18, 31, .25) 100%);
}
.art .breadcrumbs.overlay::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    repeating-linear-gradient(to right, var(--iti-grid-line) 0 1px, transparent 1px 72px),
    repeating-linear-gradient(to bottom, var(--iti-grid-line) 0 1px, transparent 1px 72px);
  mask-image: linear-gradient(105deg, transparent 0%, #000 45%, #000 100%);
}
.art .breadcrumbs.overlay > .container {
  position: relative;
  z-index: 1;
  /* Shallower than the shared masthead's, because this band also carries
     the button block beside the title; at the shared padding the band came
     out 314px against ~210-250 on every other page. */
  padding-block: clamp(1.5rem, 1.1rem + 1.6vw, 2.25rem);
}

.art .breadcrumbs h2,
.art .position-title h2 {
  margin: 0;
  max-width: 22ch;
  font-size: clamp(1.6rem, 1.1rem + 1.9vw, 2.5rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -.02em;
  color: var(--iti-on-dark);
  text-wrap: balance;
}

/* The "Φορέας >" label and its button. css/style.css puts the pair in a
   translucent grey panel (.button-container, #C1C5CF5C) — kept, as it is
   what the page had — but tightened, since 20px of padding on a band that
   is already carrying a title made the whole header too deep. */
.art .position-button {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--iti-s-2);
  background: none;
  padding: 0;
}
.art .position-button .button-container {
  margin: 0;
  padding: var(--iti-s-3) var(--iti-s-4);
  clip-path: var(--iti-clip-sm);
}
.art .prev-button-text h5 {
  margin: 0 0 var(--iti-s-2);
  font-size: var(--iti-fs-xs);
  font-weight: 600;
  letter-spacing: var(--iti-track-label);
  text-transform: uppercase;
  color: var(--iti-on-dark-muted);
}
/* .iti-btn, the site's button, as it is used over the dark hero on the home
   page — uppercase, tracked, 600, notched — but lit, because this one sits on
   a photograph rather than on paper and the glow tokens in this theme are
   built for exactly that ground. Three things do the work: a charged leading
   edge, a chevron that steps forward, and a sweep that crosses the face on
   hover. The fill stays the brand blue so it is still the site's button. */
.art .button-wrap {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  padding: .85rem 1.6rem;
  background: linear-gradient(135deg, var(--iti-blue) 0%, var(--iti-ink-700) 100%);
  border: 1px solid rgba(var(--iti-electric-rgb), .55);
  color: var(--iti-on-dark);
  clip-path: var(--iti-clip-sm);
  border-radius: 0;
  box-shadow: inset 0 1px 0 rgba(var(--iti-electric-rgb), .3),
              0 0 14px rgba(var(--iti-electric-rgb), .25);
  transition: border-color var(--iti-dur) var(--iti-ease),
              box-shadow var(--iti-dur) var(--iti-ease);
}
.art .button-wrap:hover {
  border-color: var(--iti-electric);
  box-shadow: inset 0 1px 0 rgba(var(--iti-electric-rgb), .5),
              var(--iti-glow);
}

/* The charged leading edge — the same lit rail the panels on this site use,
   here standing the button up against the photograph behind it. */
.art .button-wrap::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 2px;
  background: var(--iti-electric);
  box-shadow: var(--iti-electric-glow);
  z-index: 1;
}

/* One gesture: a sweep across the face on hover. It starts and ends off the
   button, so at rest there is nothing to see. */
.art .button-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(105deg,
    transparent 0%,
    rgba(var(--iti-electric-rgb), .32) 46%,
    transparent 72%);
  transform: translateX(-130%);
  transition: transform .62s var(--iti-ease);
}
.art .button-wrap:hover::after { transform: translateX(130%); }

/* The label sits above the sweep, and carries the chevron. */
.art .button-content-wrapper {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
}
/* A chevron drawn from two borders, stepping forward on hover — the same
   movement .iti-btn gives its arrow. */
.art .button-content-wrapper::after {
  content: "";
  width: .4em;
  height: .4em;
  margin-left: .85em;
  border-top: 1.5px solid currentColor;
  border-right: 1.5px solid currentColor;
  transform: rotate(45deg);
  transition: transform var(--iti-dur) var(--iti-ease);
}
.art .button-wrap:hover .button-content-wrapper::after {
  transform: rotate(45deg) translate(2px, -2px);
}

/* The label's metrics, from .iti-btn. Set on the button as well as the label
   so the two agree — css/style.css gives each its own size, and a mismatch
   between them shifts the line box. */
.art .button-wrap,
.art .button-content-wrapper {
  font-family: var(--iti-font-sans);
  font-size: var(--iti-fs-sm);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: .05em;
  text-transform: uppercase;
}

/* Colour only, nothing that affects layout. css/style.css turns the label
   dark on hover in three places, for a button that used to go pale grey. The
   fill stays blue here, so the label stays white.

   These must not carry font-size or padding: putting the metrics in the hover
   rule is what made the button change height as the pointer entered it. */
.art .button-content-wrapper,
.art .button-wrap:hover,
.art .button-wrap:hover .button-content-wrapper,
.art .button-content-wrapper:hover {
  color: var(--iti-on-dark);
}

@media (prefers-reduced-motion: reduce) {
  .art .button-wrap::after { display: none; }
  .art .button-content-wrapper::after,
  .art .button-wrap:hover .button-content-wrapper::after { transition: none; }
}
.art .breadcrumbs a { text-decoration: none; }
/* The content wraps the button in empty <p> tags, which the editor adds;
   they would otherwise open a gap under the label. */
.art .position-button p:empty { display: none; }
.art .position-button p { margin: 0; }

/* =========================================================
   Body ground
   ========================================================= */

.art .container.mt-5 {
  margin-top: 0 !important;
  padding-block: clamp(2.5rem, 1.6rem + 3vw, 4.5rem);
}
.art > .container.mt-5,
.art .breadcrumbs + .container.mt-5 { max-width: var(--iti-wrap); }

/* The whole body sits on paper; the columns below carry the surfaces. */
.art { background: var(--iti-paper); }

/* =========================================================
   Section menu
   ========================================================= */

.art .article-menu { position: sticky; top: 100px; }
.art .article-menu-list {
  padding: var(--iti-s-4) 0;
  background: var(--iti-surface);
  border: 1px solid var(--iti-line);
  border-left: 3px solid var(--iti-rail-accent);
  box-shadow: var(--iti-electric-glow-edge);
  clip-path: var(--iti-clip-sm);
}

/* css/style.css spaces these for a looser list: `.article-menu {
   line-height: 26px }`, `.menu-head { margin: 10px 0 20px }`,
   `.article-menu-style { margin-bottom: 10px }` and 5px of padding on
   .menu-titles. Stacked on top of the padding here it left a very airy
   column, so the margins are cleared and the row keeps its own padding. */
.art .article-menu-list { line-height: 1.4; }
.art .menu-head,
.art .menu-head-top,
.art .about-eng,
.art .article-menu-style { margin: 0; }

/* The section title — .menu-head-top in Greek, .about-eng in English, the
   pair css/style.css styles together — is the one row it styles on its own
   terms: an inline link, larger and in the legacy grey. Because it
   is not one of the padded rows below it, it never picked up their 1rem and sat
   hard against the accent border while everything under it was indented. The
   padding goes on its container, so only where it sits changes and its type is
   left as designed. The 3px accounts for the transparent border every row
   below carries, so the sum below is measured from where their text starts,
   not from where their boxes do. */
.art .menu-head-top,
.art .about-eng {
  /*
   * Outdented by a letter and a half, so the title hangs to the left of the
   * entries it labels instead of starting on the same line as them. `ch` is
   * the width of a character in this element's own font, which is what makes
   * the offset mean the same thing in both languages — "Φορέας" and "About"
   * move by the same 13.5px and stay level with each other, where 1.5 of
   * their OWN average letters would have been 13.2 and 12.1 and left the two
   * a pixel apart.
   */
  padding-left: calc(1rem + 3px - 1.5ch);
  padding-right: 1rem;
}

/* Its colour came from css/style.css too, and not even consistently: the Greek
   title was #464242 (a warm grey) and the English one #343a40 (a cool one),
   against #122230 for every row beneath them. Three near-blacks in one column,
   which reads as a mistake rather than a hierarchy. All three now share the
   body colour; the title keeps its larger size, which is what marks it as a
   title. Hover and focus follow the rows as well — they were a different blue
   (#0056b3 against #0071bb), and the legacy :focus rules pinned the old greys
   back on the moment the entry was tabbed to. */
.art .menu-head-top a,
.art .about-eng a {
  color: var(--iti-text);
}
.art .menu-head-top a:hover,
.art .about-eng a:hover {
  color: var(--iti-blue);
}
/* Focus keeps the body colour, as the rows do — they mark focus with the
   dotted outline, not a colour change. The rule exists only to beat the
   legacy :focus declarations, which would otherwise pin the old greys back on
   as soon as the entry was tabbed to. */
.art .menu-head-top a:focus,
.art .about-eng a:focus {
  color: var(--iti-text);
}

.art .menu-head a,
.art .article-menu-style a {
  display: block;
  padding: .42rem 1rem;
  font-size: .88rem;
  font-weight: 500;
  line-height: 1.4;
  color: var(--iti-text);
  text-decoration: none;
  border-left: 3px solid transparent;
  transition: background var(--iti-dur) var(--iti-ease),
              border-color var(--iti-dur) var(--iti-ease),
              color var(--iti-dur) var(--iti-ease);
}
.art .menu-head a { font-weight: 600; }
.art .menu-head a:hover,
.art .article-menu-style a:hover {
  background: var(--iti-paper);
  border-left-color: var(--iti-electric-dim);
  color: var(--iti-blue);
}

/* Group labels between entries. */
.art .menu-titles {
  margin: var(--iti-s-3) 0 .1rem;
  padding: 0 1rem 0 0;
}
.art .menu-titles b {
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  line-height: 1.4;
  color: var(--iti-electric-ink);
}
.art .menu-titles br { display: none; }

/* Indentation.
   The menu used to be copied into all 22 posts as raw markup, and it carried
   its indentation inline: style="padding-left: 20px" on a group label and
   40px on each entry beneath it. The menu now comes from one definition in
   inc/side-menu.php, which emits these two modifiers instead of the inline
   attributes, so the indentation is set here with everything else that styles
   this column. The values are the ones the inline styles used, so the column
   looks exactly as it did.

   The entry indent sits on the row rather than on its link because the link
   already carries .42rem 1rem of its own padding and the accent border that
   appears on hover; indenting the link would have moved that border in with
   the text and broken the straight edge the column keeps down its left. */
.art .menu-titles--indent { padding-left: 20px; }
.art .article-menu-style--indent { padding-left: 40px; }

/* =========================================================
   Body column
   ========================================================= */

.art .content-container {
  padding: clamp(1.25rem, .8rem + 1.6vw, 2.25rem);
  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);
}
.art .content-container > *:first-child { margin-top: 0; }
.art .content-container > *:last-child { margin-bottom: 0; }

.art .top-image {
  display: block;
  width: 100%;
  height: auto;
  margin-bottom: var(--iti-s-5);
  clip-path: var(--iti-clip-sm);
}

.art .title-main {
  margin: 0 0 var(--iti-s-4);
  font-size: clamp(1.3rem, 1.1rem + .9vw, 1.75rem);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -.01em;
  color: var(--iti-text);
  text-wrap: balance;
}

.art .text-container { color: var(--iti-text); }
.art .text-container p,
.art .content-container p { margin: 0 0 1.05em; }
.art .content-container p:last-child { margin-bottom: 0; }
.art .content-container strong,
.art .content-container b { font-weight: 600; color: var(--iti-text); }

.art .content-container a,
.art .text-links {
  color: var(--iti-blue);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.art .content-container a:hover,
.art .text-links:hover { color: var(--iti-blue-700); }

.art .content-container h2,
.art .content-container h3,
.art .content-container h4,
.art .content-container h5 {
  margin: 1.6em 0 .55em;
  font-weight: 600;
  line-height: 1.25;
  color: var(--iti-text);
}
.art .content-container h2 { font-size: 1.35rem; }
.art .content-container h3 { font-size: 1.18rem; }
.art .content-container h4,
.art .content-container h5 { font-size: 1.05rem; }

.art .content-container ul,
.art .content-container ol { margin: 0 0 1.05em; padding-left: 1.4em; }
.art .content-container li { margin-bottom: .4em; }
.art .content-container ul li { list-style: disc; }
.art .content-container ol li { list-style: decimal; }
.art .content-container img { max-width: 100%; height: auto; }
.art .content-container table { width: 100%; border-collapse: collapse; margin: 0 0 1.05em; }
.art .content-container th,
.art .content-container td {
  border: 1px solid var(--iti-line);
  padding: .5rem .7rem;
  text-align: left;
}

/* =========================================================
   Narrow screens
   ========================================================= */

@media (max-width: 991px) {
  .art .article-menu { position: static; margin-bottom: var(--iti-s-5); }
}
