/* Reset e variáveis */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --color-primary: #3366CC;
  --color-light: #f5f7fa;
  --color-white: #ffffff;
  --font-serif: Georgia, 'Times New Roman', Times, serif;
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Corpo da página */
body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  background-color: var(--color-light);
  color: #222;
  min-height: 100vh;
}

/* Estrutura da página */
.page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Cabeçalho */
.header {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: .5rem;
  justify-content: space-between;
  padding: 1rem;
  background-color: var(--color-white);
  box-shadow: var(--shadow-sm);
  text-align: center;
}

.logo {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: bold;
}

#logo-cmesf {
  height: auto;
  max-width: 35px;
}

#logo-uncmerj {
  height: auto;
  max-width: 66px;
}

/* Menu lateral */

#sidebar-toggle {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #ddd;
  cursor: pointer;
  background-color: var(--color-white);
}

#sidebar-menu {
  display: none;
  /* opacity: 0; */
  transition: opacity 0.2s ease;
  pointer-events: none;
}

#sidebar-menu.is-opaque {
  display: block;
  /* opacity: 1; */
  pointer-events: auto;
}

#sidebar-menu ul {
  list-style: none;
  padding: 1rem;
}

.sidebar-link {
  display: block;
  background-color: var(--color-primary);
  color: var(--color-white);
  font-weight: bold;
  text-decoration: none;
  padding: 0.5rem 0.75rem;
  border-radius: 4px;
  margin-bottom: 0.5rem;
  transition: filter 0.2s ease;
}

.sidebar-link:hover {
  filter: brightness(1.1);
}

/* Conteúdo principal */
#main-container {
  flex: 1;
  padding: 1rem;
}

/* Tipografia */
h1 {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 100;
  margin-bottom: 1rem;
}

h2,
h3,
h4,
h5,
h6 {
  margin-top: 1.5rem;
  margin-bottom: 1rem;
}

p {
  margin-bottom: 1rem;
  line-height: 1.6;
}

ul {
  margin: 1rem 0;
  padding-left: 1.5rem;
}

li {
  margin-bottom: 0.5rem;
}

.text-bold {
  font-weight: bold;
}

/* Rodapé */
.footer {
  background-color: var(--color-white);
  padding: 1rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
  font-size: 0.9rem;
}

.footer address {
  font-style: normal;
  margin-top: 0.5rem;
  line-height: 1.4;
}

/* Responsividade */
.desktop-only {
  display: none;
}

@media screen and (min-width: 768px) {

  #logo-cmesf {
    max-width: 64px;
  }

  #logo-uncmerj {
    max-width: 132px;
  }

  .container {
    display: flex;
    gap: 1rem;
  }

  #sidebar-toggle {
    display: none;
  }

  #sidebar-menu {
    display: block;
    /* opacity: 1 !important; */
    pointer-events: auto;
    position: relative;
  }

  #main-container {
    flex: 1;
    padding: 2rem 2rem 2rem 0;
  }

  .desktop-only {
    display: inline;
  }

  .header {
    flex: 1 0 100%;
    justify-content: space-between;
    padding: 1rem 2rem;
  }
}