/* Scaccarium Static — faithful adaptation of the original Drupal theme */

body {
  background: #8c2c00;
  color: #323232;
  font-family: Corbel, "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans",
               "DejaVu Sans", "Bitstream Vera Sans", "Liberation Sans",
               Verdana, sans-serif;
  font-size: 1em;
  margin: 0;
}

h2, h3, h4, h5, h6 {
  color: #7e8901;
  font-family: Constantia, "Lucida Bright", LucidaBright, "DejaVu Serif",
               "Bitstream Vera Serif", "Liberation Serif", Georgia, serif;
  font-weight: normal;
  margin: 0 0 0.5em;
}

h3 { font-size: 1.5em; }
h4 { font-size: 1.3em; }

p { line-height: 1.3em; margin: 0 0 1em; }

a { color: #b22d00; text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; height: auto; }

/* Page */
#page { background: #f4e7bd; }

/* Header */
#header-outer {
  background: #8c2c00 url('../images/header-stripes.png') bottom left repeat-x;
  border-bottom: 5px solid #c0943c;
}

#header {
  background: url('../images/header-gradient.png') top left repeat-x;
}

#header-inner {
  min-height: 175px;
  position: relative;
  padding: 0 20px;
  z-index: 2;
}

#title { text-align: center; position: relative; z-index: 1; }

#site-name {
  font-family: Helvetica, Verdana, sans-serif;
  font-size: 2em;
  margin: 0;
  padding-top: 1em;
}

#site-name a { color: #f4e7bd; }
#site-name a:hover { text-decoration: none; }

#site-slogan {
  color: #c0943c;
  font-size: 1.1em;
  padding-bottom: 50px;
}

/* Knight-bishop image — positioned in the header */
#knight-bishop-outer {
  display: none;
}

#header-inner::before {
  content: '';
  background: url('../images/header-shalane.jpg') center/contain no-repeat;
  height: 170px;
  width: 150px;
  position: absolute;
  bottom: -5px;
  left: calc(50% - 495px);
  border-radius: 5px;
  z-index: 0;
}

/* Primary nav */
#primary {
  bottom: 0;
  font-size: 0.9em;
  font-weight: bold;
  position: absolute;
  right: 20px;
}

#primary ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 2px;
}

#primary li { margin: 0; }

#primary a {
  background: #c0943c;
  color: #fff;
  display: block;
  padding: 0.3em 0.5em;
  text-decoration: none;
}

#primary a:hover { color: #b22d00; text-decoration: none; }

/* Container */
#container-inner {
  padding: 0 20px 20px;
}

/* Main + sidebar float layout */
#main { width: 100%; }
#main-inner { padding-top: 20px; position: relative; z-index: 1; }

body.sidebar-left #main { float: right; margin-left: -220px; }
body.sidebar-left #main-inner { margin-left: 220px; }
body.sidebar-left #content-inner { padding-left: 20px; }

#content { width: 100%; }
#content-inner { position: relative; z-index: 1; }

/* Sidebar */
#sidebar-left { float: left; width: 220px; }

#sidebar-left-inner {
  border-right: 1px dotted #b79c56;
  margin-top: 0;
  padding: 20px 20px 5px 0;
}

#sidebar-left .block { margin-bottom: 1.5em; }
#sidebar-left .block .content { font-size: 0.9em; }

#sidebar-left ul.menu {
  list-style: none;
  margin: 0;
  padding: 0;
}

#sidebar-left ul.menu li {
  border-bottom: 1px dashed #b79c56;
  padding: 4px 5px 2px 15px;
}

#sidebar-left ul.menu li a {
  color: #323232;
  display: block;
}

#sidebar-left ul.menu li a:hover {
  color: #b22d00;
  font-weight: bold;
  text-decoration: none;
}

/* Tag cloud */
.tagadelic {
  color: #b22d00;
  margin-right: 0.3em;
  line-height: 2;
}

.tagadelic.level1 { font-size: 0.8em; }
.tagadelic.level2 { font-size: 0.9em; }
.tagadelic.level3 { font-size: 1.1em; }
.tagadelic.level4 { font-size: 1.3em; }
.tagadelic.level5 { font-size: 1.5em; }
.tagadelic.level6 { font-size: 1.8em; font-weight: bold; }

/* Sidebar divider */
.sidebar-divider {
  border: none;
  border-top: 1px solid #c0943c;
  margin: 1.5em 0;
}

/* Sidebar images */
.sidebar-images img {
  width: 100%;
  margin-bottom: 0.8em;
  border: 1px solid #b79c56;
  padding: 2px;
}

/* Mission / intro */
#mission {
  background: #f0dfa8;
  border: 1px solid #b79c56;
  margin-bottom: 1em;
  padding: 15px 30px;
  line-height: 1.5em;
}

/* Nodes */
div.node { margin-bottom: 1.5em; }
h3.title { margin-bottom: 0.1em; }
h3.title a { color: #7e8901; }
.type-icon { font-size: 0.8em; margin-right: 0.3em; }
div.submitted { font-size: 0.9em; margin-bottom: 0.5em; color: #666; }

div.meta {
  background: #f0dfa8;
  border: 1px solid #b79c56;
  font-size: 0.9em;
  padding: 4px 8px;
  margin: 0.5em 0;
  overflow: hidden;
  min-height: 1.5em;
  display: flex;
  align-items: center;
}

div.meta.has_terms .node-links {
  flex: 1;
}

div.meta .terms {
  text-align: right;
  margin-left: auto;
}

div.meta ul.links {
  list-style: none;
  margin: 0;
  padding: 0;
}

div.meta ul.links li {
  display: inline;
  padding: 0 0.5em;
  border-right: 1px solid #b79c56;
}

div.meta ul.links li:last-child {
  border-right: none;
}

/* Post list (for list/taxonomy pages) */
.post-list { list-style: none; margin: 0; padding: 0; }
.post-list__item { border-bottom: 1px solid #c0943c; padding: 0.8em 0; }
.post-list__item:last-child { border-bottom: none; }
.post-list__title { font-size: 1em; margin: 0 0 0.1em; }
.post-list__title a { color: #7e8901; }
.post-list__date { font-size: 0.8em; color: #666; margin: 0; }

/* Tags inline */
.tag-list { list-style: none; margin: 0.3em 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.3em; }
.tag-list__item a { background: #c0943c; border-radius: 2px; color: #fff; font-size: 0.75em; padding: 0.1em 0.4em; text-decoration: none; }

/* Footer */
#footer {
  background: #8c2c00;
  clear: both;
  overflow: hidden;
}

#footer-inner {
  padding: 30px 20px 20px;
  text-align: center;
  position: relative;
}

#footer-message {
  color: #401400;
  font-size: 0.8em;
  font-weight: bold;
}

.rss-icon {
  text-decoration: none;
  font-size: 0.9em;
  color: #f4e7bd;
}

/* Tables */
table { border-collapse: collapse; width: 100%; margin-bottom: 1em; }
table thead tr { border-bottom: 3px solid #b79c56; }
table thead th { padding: 0.2em 0.5em; }
table tbody tr { background: #f4e7bd; border-bottom: 1px solid #b79c56; }
table tbody tr:nth-child(odd) { background: #f0dfa8; }
table tbody td { padding: 0.2em 0.5em; }

/* Code */
pre { background: #f0dfa8; border: 1px solid #b79c56; padding: 1em; overflow-x: auto; }
code { font-family: "Courier New", monospace; font-size: 0.9em; }

/* Video */
.video-thumbnail { margin: 1em 0; }
.video-thumbnail img { max-width: 480px; border: 1px solid #b79c56; }
.video-link { margin: 0.5em 0 1em; }

/* 404 */
.error-page { text-align: center; padding: 3rem 1rem; }
.error-page h1 { font-size: 4rem; color: #7e8901; }

/* Clearfix */
.clear-block::after { content: ""; display: table; clear: both; }

/* Responsive */
@media (max-width: 768px) {
  body.fixed #header-inner,
  body.fixed #container-inner,
  body.fixed #footer-inner { width: auto; }

  #knight-bishop-outer { display: none; }

  body.sidebar-left #main { float: none; margin-left: 0; }
  body.sidebar-left #main-inner { margin-left: 0; }
  body.sidebar-left #content-inner { padding-left: 0; }

  #sidebar-left { float: none; width: 100%; }
  #sidebar-left-inner { border-right: none; margin-top: 0; padding: 10px 0; }

  #primary { position: static; text-align: center; margin-top: 0.5em; }
  #primary ul { justify-content: center; flex-wrap: wrap; }

  #header-inner { min-height: auto; padding: 1em; }
  #site-slogan { padding-bottom: 10px; }
}

/* Pagination */
.pagination {
  margin: 2em 0 1em;
  padding: 1em 0;
  border-top: 1px solid #b79c56;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.5em;
  font-size: 0.9em;
}

.pagination__prev,
.pagination__next {
  color: #b22d00;
  font-weight: bold;
}

.pagination__info {
  color: #666;
}
