/*General Reset*/
h1, h2, h3, p, ul, dl, dt, dd {
  margin: 0;
  padding: 0;
}

hr { display: none; }

body {
  font-family: sans-serif;
  line-height: 1.6;
  padding: 20px;
}

body > * {
    max-width: 1000px;
    margin: 0 auto;    
}

@media (max-width: 600px) {
    body     { padding: 0; }
    body > * { margin: 0; }
}

/* Header */
header {
  margin-bottom: 30px;
  border-radius: 6px;
  padding-top: 20px;
  padding-bottom: 20px;
}

header > * {
  padding-left: 20px;
  padding-right: 20px;
}

header h1 {
  font-size: 2em;
  margin-bottom: 5px;
}

header p {
  font-size: 1em;
}

/* Article */
article {
  padding: 20px;
  margin-bottom: 30px;
  border-radius: 6px;
}

article h2 {
  font-size: 1.5em;
  margin-bottom: 10px;
}

article p, article ul {
  margin-bottom: 15px;
}

/* Links */
a {
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Lists */
ul {
  margin-left: 20px;
}

li {
  margin-bottom: 5px;
}

/* Agenda-style definition list */
dl {
  margin: 20px 0;
}

dt {
  padding: 10px 15px;
  font-weight: bold;
  border-top: 1px solid;
  border-bottom: 1px solid;
}

dd {
  padding: 10px 15px;
  margin: 0;
  border-bottom: 1px solid;
  font-size: 0.95em;
}

/* Footer */
footer {
  text-align: center;
  font-size: 0.9em;
  margin-top: 40px;
}


/* Material Section */
ul.material {
  list-style-type: none;
  display: flex;
  flex-direction: right;
  flex-wrap: wrap;
  gap: 20px;
  margin: 30px 0;
  padding: 0;
}

@media (max-width: 600px) {
  ul.material {
    flex-direction: column;  /* Stack items vertically */
    align-items: center;     /* Center items */
  }

  ul.material li {
      width: 100%;
      box-sizing: border-box;
  }
}

/* Individual Tile */
ul.material li {
  /* so that one can push date tag at the bottom */
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  /* various property so that it looks "nice" */
  border: 1px solid;
  border-left: 6px solid;
  border-radius: 6px;
  padding: 15px;
  min-width: 20%;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  /* this is to be related to the anchor absolute position! */
  position: relative;
}

ul.material li:hover {
  transform: translateY(-3px);
}

ul.material li p a {
    text-decoration: none;
    /* position it against "its closest positioned ancestor": the <li> box */
    /* see https://www.labnol.org/code/19639-turn-div-clickable-link */
    position: absolute;
    /* make it cover everything */
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    /* raises anchor tag above everything else in div */
    z-index: 10;     
    /* make it invisible! */
    opacity: 0;
    filter: alpha(opacity=0);
}

ul.material li p {
  font-size: 0.9em;
  margin: 0;
}

/* The first paragraph is somehow a title */
ul.material li p:first-of-type {
    font-weight: bold;    
    margin-bottom: .5em;
}
/* date tag! */
ul.material li .date-tag {
  display: block;
  margin-top: 12px;
  font-size: 0.8em;
  text-align: right;
  margin-top: auto;
}

.new-flag {
  font-size: 70%;
  padding: 2px 5px;
  border-radius: 3px;
  margin-left: 8px;
  font-weight: bold;
}
