/* ==========================================================================
   PGPS — over HermonCMS's base (styles.css): its colours and its fonts,
   and the header of the site (layouts/default.gadx) in the page's flow.
   ========================================================================== */

/* The fonts of the PGPS: Open Sans for the text, Oswald for the titles. */
@import url('../fonts/open-sans/open-sans.css');

@font-face {
  font-family: 'Oswald Light';
  src: url('../fonts/oswald/Oswald-Light-webfont.woff') format('woff');
  font-display: swap;
}

@font-face {
  font-family: 'Oswald';
  src: url('../fonts/oswald/Oswald-Regular-webfont.woff') format('woff');
  font-display: swap;
}

/* The colours of the PGPS on the base's tokens: the "navy" is its bordeaux,
   the "gold" — the accent — the bordeaux on light backgrounds, white on the
   bordeaux ones (below). */
:root {
  --color-primary-navy: #791E26;
  --color-darker-navy: #5e171d;
  --color-gold: #791E26;
  --color-gold-hover: #5e171d;
  --color-dark-text: #212529;
  --color-body-text: #444444;
  --color-gold-shadow: rgba(121, 30, 38, 0.25);
  --color-navy-shadow: rgba(121, 30, 38, 0.12);
}

body {
  font-family: 'Open Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

h1, h2, h3, h4, h5, h6, .font-title {
  font-family: 'Oswald Light', 'Oswald', sans-serif;
  font-weight: normal;
}

/* as on the site of before (its `* { font-family: 'Open Sans' }`): a link in
   a title — the title of a post in a list — in Open Sans, of the weight of
   its titles (500, Bootstrap's); the bold of the base's titles (font-bold)
   is that 500 too — Oswald Light has no bold, and the browser's made one
   came out too heavy */
h1 a, h2 a, h3 a, h4 a, h5 a, h6 a {
  font-family: 'Open Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}
h1.font-bold, h2.font-bold, h3.font-bold, h4.font-bold, h5.font-bold, h6.font-bold,
.font-title.font-bold {
  font-weight: 500;
}
/* the title of a post in a list: the size of the site of before (its h5,
   1.25rem) — a long title is not a block of large text */
h3.font-bold.text-2xl {
  font-size: 1.25rem;
  line-height: 1.45;
}

.font-title-strong {
  font-family: 'Oswald', sans-serif;
}

/* --------------------------------------------------------------------------
   The header: the band of the program (its titles, the languages, the UFV),
   then the bar of the menu — both in the page's flow, as on the site of
   before: the base's bar is fixed over its hero.
   -------------------------------------------------------------------------- */
.site-top {
  background: var(--color-white);
}

.site-top .site-title-1 {
  font-family: 'Oswald Light', sans-serif;
  font-size: 1.15rem;
  line-height: 1.3;
  color: var(--color-dark-text);
}

.site-top .site-title-2 {
  font-family: 'Oswald', sans-serif;
  font-size: 2.1rem;
  line-height: 1.1;
  color: var(--color-primary-navy);
}

.locale-switch a {
  border: 1px solid var(--color-primary-navy);
  color: var(--color-primary-navy);
  font-size: 0.75rem;
  padding: 0.1rem 0.4rem;
  transition: background-color var(--transition-fast), color var(--transition-fast);
}

.locale-switch a + a {
  border-left: none;
}

.locale-switch a:hover,
.locale-switch a.active {
  background: var(--color-primary-navy);
  color: var(--color-white);
}

.navbar.site-bar {
  position: relative;
  top: auto;
  padding: 0;
  background: var(--color-primary-navy);
}

body.has-user-bar .navbar.site-bar {
  top: auto;
}

.navbar.site-bar.scrolled {
  padding: 0;
  box-shadow: none;
}

main.navbar-offset {
  padding-top: 0;
}

@media (max-width: 768px) {
  main.navbar-offset {
    padding-top: 0;
  }
}

html {
  scroll-padding-top: 0;
}

/* the links of the bar: white on the bordeaux, underlined in white; Open
   Sans, 1rem — as on the site of before (its `* { font-family: 'Open Sans' }`
   over the Oswald of the menu) */
.site-bar .nav-link {
  font-family: 'Open Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 1rem;
  font-weight: normal;
  padding: 0.75rem 0;
}

.site-bar .nav-link:hover,
.site-bar .nav-link.active {
  color: var(--color-white);
}

.site-bar .nav-link::after {
  background: var(--color-white);
}

/* --------------------------------------------------------------------------
   The secondary menu, beside the content (comps.vertical_menu)
   -------------------------------------------------------------------------- */
.side-menu {
  border: 1px solid var(--color-border);
  border-top: 3px solid var(--color-primary-navy);
  border-radius: var(--radius-sm);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  background: var(--color-white);
  font-size: 0.95rem;
}

/* its title (Acesso rápido) */
.side-menu .side-menu__title {
  font-family: 'Oswald Light', 'Oswald', sans-serif;
  font-size: 1.15rem;
  color: var(--color-primary-navy);
  padding: 0.75rem 1rem 0.5rem;
  margin: 0;
}

/* its links: room to read and to touch; the one hovered marked at its left */
.side-menu a {
  color: var(--color-body-text);
  line-height: 1.35;
  border-left: 3px solid transparent;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}

.side-menu > ul > li > a {
  padding: 0.6rem 1rem;
}

.side-menu a:hover {
  color: var(--color-primary-navy);
  background: rgba(121, 30, 38, 0.06);
  border-left-color: var(--color-primary-navy);
}

/* the footer's columns are texts of the site (footer.N): a size to read,
   room between them; their links white, underlined on hover, the icons of
   the networks larger */
.site-footer {
  font-size: 0.95rem;
  line-height: 1.6;
}

.site-footer .grid {
  column-gap: 3rem;
  row-gap: 2rem;
}

.site-footer a {
  color: inherit;
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--color-white);
  text-decoration: underline;
}

.site-footer i.bi,
.site-footer i.fa,
.site-footer i.fa-brands {
  font-size: 1.15rem;
  margin-right: 0.35rem;
  vertical-align: -0.1em;
}

/* --------------------------------------------------------------------------
   The page as tall as the window at least: the footer at its foot, no white
   band below it on a short page
   -------------------------------------------------------------------------- */
body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

body > main {
  flex: 1 0 auto;
}

/* --------------------------------------------------------------------------
   The lists of posts (the base's post_list)
   -------------------------------------------------------------------------- */
/* the date and the tags: a size and a grey that read */
.post__date time,
.post__date .post__updated {
  font-size: 0.78rem;
  color: #4b5563;
}

.post__date a {
  font-size: 0.78rem;
}

/* a title of a list in three lines at most — the whole one in the post */
h3.font-bold.text-2xl {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* a post with no cover: a cover of the program in its place, the list
   regular — a light bordeaux, the acronym in the bordeaux; from a tablet up
   only: on a phone, one above the other, it would only push the texts down */
@media (min-width: 768px) {
  article.border-b.py-8:not(:has(img))::before {
    /* the acronym, a text of the site (the layout's --post-cover-label) */
    content: var(--post-cover-label, '');
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 33.333333%;
    height: 12rem;
    border-radius: 0.5rem;
    background: linear-gradient(135deg, #f7eeef 0%, #efdfe1 100%);
    border: 1px solid rgba(121, 30, 38, 0.12);
    color: var(--color-primary-navy);
    font-family: 'Oswald', sans-serif;
    font-size: 2.25rem;
    letter-spacing: 0.08em;
  }
}


/* --------------------------------------------------------------------------
   The base's literal golds and navies, in the colours of the PGPS
   -------------------------------------------------------------------------- */
.back-to-top {
  background-color: var(--color-primary-navy) !important;
  color: var(--color-white) !important;
}

.back-to-top:hover {
  background-color: var(--color-darker-navy) !important;
}

.icon-circle {
  background: rgba(121, 30, 38, 0.12);
}

.form-input-custom:focus {
  box-shadow: 0 0 0 3px rgba(121, 30, 38, 0.28);
}

.btn-gold:hover {
  box-shadow: 0 6px 20px rgba(121, 30, 38, 0.45);
}

.hero {
  background: linear-gradient(135deg, #791E26 0%, #5e171d 50%, #791E26 100%);
}

.hero-bg {
  background: linear-gradient(rgba(121, 30, 38, 0.85), rgba(121, 30, 38, 0.95));
}
