/* Export guides and a guide's page (M2-PROS, EXP): the design system's tokens only. Cards, tags, notices, buttons, the filter bar and
   the files table are the kit's (components.css); the publication line is institution.css's. */

/* ---------- Head: eyebrow, H1, lead, and the illustrative image beside them from 768 px ---------- */

.guide-head {
  display: grid;
  gap: var(--spacing-24);
  align-items: center;
  grid-template-columns: minmax(0, 1fr);
  padding-block: var(--spacing-24) var(--spacing-32);
}

.guide-head-text h1 {
  max-width: 24ch;
  margin-bottom: var(--spacing-16);
  overflow-wrap: anywhere;
  hyphens: auto;
}

.guide-head-text .lead {
  max-width: var(--size-44rem);
  margin-bottom: 0;
}

.guide-head-text .tags {
  margin-bottom: var(--spacing-16);
}

.guide-figure {
  position: relative;
  margin: 0;
}

.guide-figure img {
  display: block;
  width: 100%;
  aspect-ratio: 10 / 7;
  object-fit: cover;
  border-radius: var(--border-radius-16);
  background: var(--color-background-placeholder);
}

/* ---------- Body ---------- */

.guide-body {
  display: grid;
  /* One column that may shrink below its content: an implicit `auto` column stays as wide as its longest word, which at 150 % text on a
     320 px phone is wider than the 288 px content box (a11y-14); the two-column layout from 992 px sets its own columns below. */
  grid-template-columns: minmax(0, 1fr);
  gap: var(--spacing-32);
  padding-block: var(--spacing-24) var(--spacing-32);
}

.guide-list-title,
.guide-files h2,
.guide-related h2,
.guide-about h2 {
  margin: 0 0 var(--spacing-12);
  font-size: var(--font-size-20);
  line-height: var(--line-height-28);
  overflow-wrap: anywhere;
}

/* ---------- A guide's page: the sections beside the card 'Despre acest ghid' ---------- */

@media (min-width: 992px) {
  .guide-layout {
    grid-template-columns: minmax(0, 1fr) minmax(0, var(--size-22rem));
    align-items: start;
    gap: var(--spacing-48);
  }
}

/* The four sections are the shared .disclosure of components.css (M4-DISCLOSURE, CC-8); only their text is set here */
.guide-sections {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--spacing-12);
  min-width: 0;
}

.guide-section-text {
  display: grid;
  gap: var(--spacing-12);
  overflow-wrap: anywhere;
}

.guide-section-text p {
  margin: 0;
}

.guide-source {
  color: var(--color-text-secondary);
  font-size: var(--font-size-14);
  line-height: var(--line-height-20);
}

/* The side card */
.guide-about {
  min-width: 0;
  padding: var(--spacing-24);
  border: var(--border-width-1) solid var(--color-border);
  border-radius: var(--border-radius-12);
  background: var(--color-surface);
}

.guide-facts {
  display: grid;
  gap: var(--spacing-12);
  margin: 0 0 var(--spacing-24);
}

.guide-facts div {
  display: grid;
  gap: var(--spacing-4);
}

.guide-facts dt {
  font-weight: var(--font-weight-medium);
}

.guide-facts dd {
  margin: 0;
  color: var(--color-text-secondary);
  overflow-wrap: anywhere;
}

.guide-about p {
  margin: 0 0 var(--spacing-12);
}

/* The buttons of the side card: the label wraps inside the button (at 150 % text a Russian label is wider than the card's content),
   so its words may break and the label's span may shrink below its longest word (a11y-14). */
.guide-action {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  padding-inline: var(--spacing-12);
  justify-content: center;
  text-align: center;
  overflow-wrap: anywhere;
}

.guide-action > span {
  min-width: 0;
}

/* 'Continuă explorarea pieței' */
.guide-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-12);
  margin: 0;
  padding: 0;
  list-style: none;
}

/* The list page's notice */
.guide-notice {
  margin: 0;
}
