/* Techno+ restoration — local assets & CMS additions */

:root {
  --tps-layout-width: 1200px;
}

#wrap,
#pseudo,
#content {
  width: var(--tps-layout-width) !important;
}

#page.bottom_box {
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-start;
  width: 100%;
}

#maincontent {
  flex: 1 1 auto;
  min-width: 0;
  width: auto !important;
  float: none !important;
  box-sizing: border-box;
}

#sidebar,
.sidebar {
  flex: 0 0 236px;
  width: 220px !important;
  float: none !important;
}

#rightbox {
  width: auto !important;
  max-width: none;
}

#footer {
  width: var(--tps-layout-width) !important;
}

#simplegallery1,
.tps-hero-slide {
  width: 100% !important;
  max-width: calc(var(--tps-layout-width) - 280px);
}

#nav li a,
#nav li a:link,
#nav li a:visited {
  padding: 4px 9px 6px !important;
  font-size: 14px !important;
}

#navbar {
  overflow: visible;
}

#nav {
  display: flex;
  flex-wrap: nowrap;
  width: 100%;
}

#nav > li {
  float: none;
  flex: 0 0 auto;
}

#header {
  background: #163b15 url("../img/legacy/sprite.png") repeat-x left top;
}

#logo a {
  display: block;
  height: 89px;
  padding: 10px 0 0 10px;
}

#logo img {
  max-height: 78px;
  width: auto;
}

#header #title,
#header #slogan {
  float: left;
  width: auto;
  max-width: calc(var(--tps-layout-width) - 380px);
  margin: 18px 0 0 12px;
}

#header #title h1,
#header #slogan h1 {
  margin: 0;
  padding: 0;
  line-height: 1.2;
}

#header #title h1 {
  font-size: 24px;
  color: #e8f5e4;
  text-shadow: 0 1px 0 #000;
}

#header #slogan h1 {
  font-size: 16px;
  color: #9daf7c;
}

.tps-site-contact {
  margin: 0 10px 16px;
  padding: 12px 14px;
  background: #f4fbe6;
  border: 1px solid #cee6a3;
}

.tps-footer-tagline,
.tps-footer-address {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: #454545;
}

#maincontent {
  background: none;
  border-right: 1px solid #d8e4c8;
}

#simplegallery1 {
  border: 1px solid #163b15;
  background: #fff;
  margin-bottom: 12px;
}

.tps-hero-slide {
  position: relative;
  width: 620px;
  height: 270px;
  overflow: hidden;
  background: #f4fbe6;
}

.tps-hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tps-hero-slide.is-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #5a6f52;
  font: 13px/1.4 "Lucida Grande", Tahoma, Verdana, sans-serif;
  text-align: center;
  padding: 1rem;
}

.postList img,
.postList .tps-thumb-slot {
  width: 120px;
  height: 90px;
  object-fit: cover;
  float: left;
  margin-right: 10px;
  border: 1px solid #bdd396;
  background: #e8efe0;
}

.tps-thumb-slot {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: #5a6f52;
  text-align: center;
  padding: 4px;
}

.gallery.tps-gallery {
  margin: 1rem 0;
}

.gallery.tps-gallery .gallery-item {
  float: left;
  margin: 0 0 8px 0;
  text-align: center;
}

.gallery.tps-gallery .gallery-icon img {
  border: 1px solid #bdd396;
  background: #fff;
  padding: 2px;
}

.tps-photo-slot {
  display: inline-block;
  line-height: 0;
}

.tps-gallery-note {
  margin: 0 10px 12px;
  padding: 8px 10px;
  background: #ffffcc;
  border: 1px solid #cee6a3;
  color: #333;
  font-size: 12px;
}

.cms-rich img[src=""],
.cms-rich img[src="data:,"],
.cms-rich img:not([src]) {
  display: none;
}

.tps-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.tps-lightbox img {
  max-width: min(96vw, 960px);
  max-height: 92vh;
  border: 4px solid #fff;
  background: #fff;
}

.tps-lightbox-close {
  position: absolute;
  top: 12px;
  right: 16px;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
}

@media (max-width: 1240px) {
  :root {
    --tps-layout-width: 100%;
  }

  #wrap,
  #pseudo,
  #content,
  #footer,
  #rightbox,
  #simplegallery1,
  .tps-hero-slide {
    width: 100% !important;
    max-width: 100%;
  }

  #page.bottom_box {
    flex-wrap: wrap;
  }

  #maincontent {
    flex: 1 1 100%;
    width: 100% !important;
    padding-right: 10px;
  }

  #sidebar,
  .sidebar {
    flex: 1 1 100%;
    width: auto !important;
  }

  #nav {
    display: block;
    flex-wrap: wrap;
  }

  #nav > li {
    float: left;
  }
}
