/*
site.css
Cleaned and documented stylesheet for the Circuitnoise site.
Only selectors used by the current HTML are kept.
*/

/* Base element defaults */
fieldset {
  margin-bottom: 1em;
  padding: 0.5em;
}
form {
  margin: 0;
  padding: 0;
}
hr {
  height: 1px;
  border: 1px solid gray;
}
img {
  border: 0;
}
table {
  margin: 0;
  padding: 0.5em;
  border-collapse: collapse;
}
th {
  text-align: left; /* LTR */
  padding-right: 1em; /* LTR */
  border-bottom: 3px solid #ccc;
}
blockquote {
  font-style: italic;
}
code,
pre {
  font-size: 1em;
}
pre {
  font-size: 0.8em;
  padding: 1em;
  background: #eee;
}
li {
  padding-bottom: 0.3em;
}
h1,
h2,
h3,
h4,
h5,
h6 {
  margin-bottom: 0.25em;
}
h1 {
  font-size: 1.3em;
}
h2 {
  font-size: 1.2em;
}
h3 {
  font-size: 1.1em;
}
h4,
h5,
h6 {
  font-size: 1em;
}
p {
  margin: 0 0 0.5em 0;
}
br {
  line-height: 0.6em;
}
ul {
  list-style-type: none;
}

/* Links */
a,
a:link,
a:active {
  font-weight: bold;
  text-decoration: none;
  color: #930;
}
a:visited {
  color: #630;
}
a:hover {
  text-decoration: underline;
}
li a.active {
  color: #000;
}

/* Page layout */
body {
  margin: 0;
  padding: 0 0 0 3em; /* LTR */
  font-family: trebuchet ms, tahoma, verdana, arial, helvetica;
  font-size: 0.9em;
  line-height: 1.3em;
  border-top: 10px solid gray;
  background-color: #f8f8f8;
}
#header {
  margin-bottom: 2em;
  display: flex;
  align-items: center;
  gap: 12px;
  clear: both;
}
#header img {
  float: left; /* LTR */
  padding: 0 2em 0.5em 0; /* LTR */
}
#header .title {
  order: 1;
  font-size: 2em;
  font-weight: bold;
  padding-top: 0.75em;
}
#header .title a,
#header .title a:link,
#header .title a:visited,
#header .title a:active {
  text-decoration: none;
  color: #000;
}
#header .title a:hover {
  color: #930;
}
#header .header-logo {
  order: 1;
  margin-left: 8px;
  float: none;
  padding: 0;
  width: auto;
  height: auto;
}
#content {
  clear: both;
}
#main {
  width: 700px;
  padding-left: 1em;
  padding-right: 1em;
  vertical-align: top;
}

/* Navigation */
.navlinks {
  padding: 0 0.5em 1.5em 0; /* LTR */
  clear: both;
}
ul.links {
  margin: 0;
  padding: 0;
}
ul.links li {
  display: inline;
  list-style-type: none;
  padding: 0 0.5em;
  border-left: 1px solid #000; /* LTR */
}
ul.links li.first {
  border-left: none; /* LTR */
}
.navlinks .nav-social {
  margin-left: 6px;
}
.navlinks .nav-social a {
  display: inline-block;
  margin-left: 6px;
}
.navlinks .nav-social a:first-child {
  margin-left: 0;
}
.navlinks .nav-social .nav-linktree {
  display: inline-block;
  vertical-align: middle;
  font-size: 0.9em;
  text-decoration: none;
  margin-left: 6px;
  padding: 2px 6px;
  border: 1px solid #000;
  color: #000;
  background-color: transparent;
  line-height: 1.2;
}

/* Language toggle */
.lang {
  display: none;
}
span.lang-de,
span.lang-en {
  display: none;
}
body.lang-de .lang.lang-de,
body.lang-en .lang.lang-en {
  display: block;
}
body.lang-de span.lang-de,
body.lang-en span.lang-en {
  display: inline;
}
.lang-switch {
  margin-left: 6px;
}
.lang-switch button {
  margin-left: 6px;
  padding: 2px 6px;
}
.lang-switch button.active {
  font-weight: bold;
  background-color: #000;
  color: #fff;
  border: 1px solid #000;
}

/* Content blocks */
.title {
  margin: 0 0 0.25em 0;
}
.content {
  margin: 0 0 0.5em 0;
}
.node .title {
  font-size: 1.2em;
}
.node .title a,
.node .title a:link,
.node .title a:active,
.node .title a:visited {
  text-decoration: none;
  font-weight: normal;
}
.node .title a:hover {
  text-decoration: underline;
}

/* Responsive adjustments */
@media (max-width: 900px) {
  body {
    padding: 1em;
    border-top-width: 6px;
  }
  #header {
    flex-wrap: wrap;
    gap: 8px;
  }
  #header .title {
    font-size: 1.5em;
    padding-top: 0;
  }
  #header .header-logo {
    max-width: 80px;
    height: auto;
  }
  #main {
    width: auto;
    padding-left: 0;
    padding-right: 0;
  }
  .navlinks {
    padding: 0 0 1em 0;
  }
  .navlinks ul.links {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 10px;
    margin: 0;
    padding: 0;
  }
  ul.links li {
    border-left: 0;
    padding: 0;
  }
  .lang-switch {
    margin-left: 0;
  }
  .lang-switch button {
    margin-left: 0;
  }
  .navlinks .nav-social {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-left: 0;
  }
  .navlinks .nav-social a,
  .navlinks .nav-social .nav-linktree {
    margin-left: 0;
  }
  table {
    display: block;
    width: 100%;
    overflow-x: auto;
  }
  img,
  iframe {
    max-width: 100%;
    height: auto;
  }
}
