/* Diretório — site público
   Reproduz o layout de diretorio2.ulusofona.pt (template "Hyperspace" da HTML5 UP com as alterações da Lusófona):
   Arial 14pt em tudo, entrelinha 1.75, texto branco; barra lateral rosa #EF1458 com o menu centrado na vertical;
   secções pretas a ecrã inteiro que entram com fade-up ao chegar ao meio do ecrã; cartões .highlighted. */

/* ---------- Base ---------- */

html { box-sizing: border-box; }
*, *::before, *::after { box-sizing: inherit; }
html, body { margin: 0; padding: 0; }
@media (max-width: 480px) { html, body { min-width: 320px; } }

body { background: #000; }
body.is-preload *, body.is-preload *::before, body.is-preload *::after { animation: none !important; transition: none !important; }

body, input, select, textarea, button {
  color: #fff;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14pt;
  font-weight: normal;
  line-height: 1.75;
}

a {
  color: inherit;
  text-decoration: none;
  border-bottom: dotted 1px rgba(255, 255, 255, 0.35);
  transition: color 0.2s ease, border-bottom-color 0.2s ease;
}
a:hover { color: #ef1458; border-bottom-color: transparent; }
strong, b { color: #fff; font-weight: bold; }
p { margin: 0 0 2em 0; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3 { color: #fff; font-weight: bold; line-height: 1.5; margin: 0 0 0.5em 0; }
h1 { font-size: 2.75em; }
h2 { font-size: 1.75em; }
h3 { font-size: 1.1em; }
@media (max-width: 736px) {
  h1 { font-size: 2em; }
  h2 { font-size: 1.25em; }
  h3 { font-size: 1em; }
}
::placeholder { color: #9f9f9f; opacity: 1; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Formulário de pesquisa ---------- */

form { margin: 0 0 2em 0; }
input[type="text"], input[type="search"], select {
  appearance: none;
  display: block;
  width: 100%;
  height: 2.75em;
  padding: 0 1em;
  background: transparent;
  border: solid 1px rgba(255, 255, 255, 0.15);
  border-radius: 0.25em;
  color: #fff;
  outline: 0;
}
input[type="search"]::-webkit-search-cancel-button { filter: invert(1); opacity: .6; }
input[type="text"]:focus, input[type="search"]:focus, select:focus {
  border-color: #fff;
  box-shadow: 0 0 0 1px #fff;
}
select {
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' preserveAspectRatio='none' viewBox='0 0 40 40'%3E%3Cpath d='M9.4,12.3l10.4,10.4l10.4-10.4c0.2-0.2,0.5-0.4,0.9-0.4c0.3,0,0.6,0.1,0.9,0.4l3.3,3.3c0.2,0.2,0.4,0.5,0.4,0.9 c0,0.4-0.1,0.6-0.4,0.9L20.7,31.9c-0.2,0.2-0.5,0.4-0.9,0.4c-0.3,0-0.6-0.1-0.9-0.4L4.3,17.3c-0.2-0.2-0.4-0.5-0.4-0.9 c0-0.4,0.1-0.6,0.4-0.9l3.3-3.3c0.2-0.2,0.5-0.4,0.9-0.4S9.1,12.1,9.4,12.3z' fill='rgba(255, 255, 255, 0.15)' /%3E%3C/svg%3E");
  background-size: 1.25rem;
  background-repeat: no-repeat;
  background-position: calc(100% - 1rem) center;
  padding-right: 2.75em;
  text-overflow: ellipsis;
}
select option { color: #fff; background: #ef1458; }

#sb-search form { display: flex; gap: 1em; margin: 0 0 2em 0; }
#sb-search .search-field { position: relative; flex: 1 1 auto; min-width: 0; }
#sb-search select { flex: 0 0 15em; width: 15em; }
/* Botão X para limpar a caixa (substitui o nativo, que só existe no Chrome/Safari) */
#sb-search #search { padding-right: 2.75em; }
#sb-search #search::-webkit-search-cancel-button { display: none; }
.search-clear {
  position: absolute; top: 50%; right: 0.7em; transform: translateY(-50%);
  display: flex; align-items: center; justify-content: center;
  width: 1.4em; height: 1.4em; padding: 0 0 0.06em 0;
  border: solid 1.5px rgba(255, 255, 255, 0.55); border-radius: 50%;
  background: transparent; box-shadow: none;
  color: rgba(255, 255, 255, 0.75); font-size: 1em; font-weight: bold; line-height: 1;
  cursor: pointer;
}
.search-clear::before { content: "\00d7"; font-size: 1.2em; }
.search-clear:hover, .search-clear:focus-visible { color: #fff; border-color: #fff; background: rgba(239, 20, 88, 0.47); outline: 0; }
.search-clear[hidden] { display: none; }
@media (max-width: 736px) {
  #sb-search form { flex-direction: column; }
  #sb-search select { flex-basis: auto; width: 100%; }
}

/* Sugestões enquanto se escreve */
.suggestions {
  position: absolute; z-index: 20; top: calc(100% + 4px); left: 0; right: 0;
  margin: 0; padding: 0.3em 0;
  background: #1e1e1e; border: solid 1px rgba(255, 255, 255, 0.15); border-radius: 0.25em;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
  max-height: 22em; overflow-y: auto;
}
.suggestions li { display: flex; justify-content: space-between; gap: 1em; padding: 0.35em 1em; cursor: pointer; line-height: 1.4; }
.suggestions li small { color: rgba(255, 255, 255, 0.55); font-size: 0.6em; font-weight: bold; letter-spacing: 0.25em; text-transform: uppercase; white-space: nowrap; align-self: center; }
.suggestions li[aria-selected="true"], .suggestions li:hover { background: rgba(239, 20, 88, 0.47); }

/* ---------- Barra lateral ---------- */

#sidebar {
  position: fixed; top: 0; left: 0; z-index: 10000;
  width: 18em; height: 100vh;
  padding: 2.5em 2.5em 0.5em 2.5em;
  background: #ef1458;
  cursor: default;
  overflow-x: hidden; overflow-y: auto;
  text-align: right;
}
#sidebar > .inner {
  display: flex; flex-direction: column; justify-content: center;
  min-height: 100%; width: 100%;
  opacity: 1;
  transition: opacity 1s ease;
}
#sidebar .brand { display: inline-block; border: 0; line-height: 0; }
#sidebar .brand img { height: 100px; width: auto; }
#sidebar nav > ul > li {
  position: relative;
  margin: 1.5em 0 0 0;
  padding: 0;
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.15s ease, transform 0.75s ease;
}
/* O logótipo ocupa o primeiro lugar da lista no original: os atrasos começam em 0.65s */
#sidebar nav > ul > li:nth-child(1) { transition-delay: 0.65s; }
#sidebar nav > ul > li:nth-child(2) { transition-delay: 0.85s; }
#sidebar nav > ul > li:nth-child(3) { transition-delay: 1.05s; }
#sidebar nav > ul > li:nth-child(4) { transition-delay: 1.25s; }
#sidebar nav a {
  position: relative; display: block;
  padding: 1.35em 0;
  border: 0; outline: 0;
  color: rgba(255, 255, 255, 0.35);
  font-size: 0.6em; font-weight: bold; letter-spacing: 0.25em; line-height: 1.75;
  text-transform: uppercase; text-decoration: none;
  transition: color 0.2s ease;
}
#sidebar nav a::before, #sidebar nav a::after {
  content: ''; position: absolute; right: 0; bottom: 0;
  width: 100%; height: 0.2em; border-radius: 0.2em;
}
#sidebar nav a::before { background: #ef1458; }
#sidebar nav a::after { background: #fff; max-width: 0; transition: max-width 0.2s ease; }
#sidebar nav a:hover { color: rgba(255, 255, 255, 0.55); }
#sidebar nav a.active { color: #fff; }
#sidebar nav a.active::after { max-width: 100%; }
#sidebar nav a:focus-visible { color: #fff; }

body.is-preload #sidebar > .inner { opacity: 0; }
body.is-preload #sidebar nav ul li { opacity: 0; transform: translateY(2em); }

@media (max-width: 1280px) {
  #sidebar {
    width: 100%; height: 3.5em;
    padding: 0 1.5em;
    line-height: 3.5em;
    overflow: hidden;
    text-align: center;
  }
  #sidebar > .inner { flex-direction: row; align-items: center; justify-content: space-between; height: inherit; min-height: 0; }
  #sidebar .brand img { height: 2.4em; }
  #sidebar nav, #sidebar nav ul { display: flex; height: inherit; line-height: inherit; margin: 0; }
  #sidebar nav { width: 100%; align-items: center; justify-content: space-between; }
  #sidebar nav ul li { display: block; height: inherit; line-height: inherit; margin: 0 0 0 2em; padding: 0; }
  #sidebar nav a { height: inherit; line-height: inherit; padding: 0; }
}
@media (max-width: 736px) {
  #sidebar { display: none; }
}

/* ---------- Secções ---------- */

#wrapper { margin-left: 18em; }
@media (max-width: 1280px) { #wrapper { margin-left: 0; padding-top: 3.5em; } }
@media (max-width: 736px) { #wrapper { padding-top: 0; } }

.wrapper { position: relative; }
.wrapper.style1 { background-color: #000; }
.wrapper > .inner { width: 75em; max-width: 100%; padding: 5em 5em 3em 5em; }
@media (max-width: 1680px) { .wrapper > .inner { padding: 4em 4em 2em 4em; } }
@media (max-width: 1280px) { .wrapper > .inner { width: 100%; } }
@media (max-width: 736px) { .wrapper > .inner { padding: 3em 2em 1em 2em; } }

.wrapper.fullscreen { display: flex; flex-direction: column; justify-content: center; min-height: 100vh; }
@media (max-width: 1280px) { .wrapper.fullscreen { min-height: calc(100vh - 2.5em); } }
@media (max-width: 736px) { .wrapper.fullscreen { padding: 2em 0; min-height: 0; } }

.wrapper.fade-up > .inner { opacity: 1; transform: translateY(0); transition: opacity 1s ease, transform 1s ease; }
.wrapper.fade-up.inactive > .inner,
body.is-preload .wrapper.fade-up > .inner { opacity: 0; transform: translateY(1em); }

/* Intro (pesquisa) */
#pesquisa h1 { font-size: 50px; }
#pesquisa .lead { color: #fff; font-size: 18px; }
@media (max-width: 736px) { #pesquisa h1 { font-size: 34px; } }

/* ---------- Resultados ---------- */

.count { margin: 0 0 1.2em 0; font-size: 15px; color: rgba(255, 255, 255, 0.7); }
.count strong { color: #fff; }

.highlighted {
  background-color: #1e1e1e;
  padding: 15px;
  margin-bottom: 15px;
  border-radius: 10px;
  color: #fff;
  font-size: 18px;
  line-height: 1.2;
  transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
}
.highlighted:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 15px rgba(239, 20, 88, 0.4);
  background-color: #2c2c2c;
}
.highlighted .name { display: block; font-size: 24px; font-weight: bold; margin-bottom: 0.2em; }
.highlighted .line { display: block; margin: 5px 0; color: #fff; }
.highlighted .role { color: #ef1458; font-weight: bold; }
.highlighted .label { font-weight: bold; }
.highlighted .sep { color: rgba(255, 255, 255, 0.35); padding: 0 0.35em; }

/* ---------- Contactos ---------- */

#contactos .row { display: flex; flex-wrap: wrap; align-items: stretch; gap: 0 5em; }
#contactos p { color: #fff; }

.site-footer { padding: 1.5em 5em; border-top: solid 1px rgba(255, 255, 255, 0.15); color: rgba(255, 255, 255, 0.55); font-size: 0.6em; letter-spacing: 0.1em; }
.site-footer a.quiet, .site-footer a.quiet:hover { color: inherit; border: 0; cursor: text; }
@media (max-width: 1680px) { .site-footer { padding: 1.5em 4em; } }
@media (max-width: 736px) { .site-footer { padding: 1.5em 2em; } }
.more-results {
  margin: 2em 0 0 0; padding: 1em 1.25em;
  border-left: 3px solid #ef1458; background: rgba(239, 20, 88, 0.12); border-radius: 0.25em;
  color: rgba(255, 255, 255, 0.85);
}
.more-results strong { color: #fff; }
