/* Light mode (default) */
body {
  margin: 0;
  background-color: #f5f3f4;
  color: #111;
  font-family: "Lato", sans-serif;
}

em {
  color: #767b91;
}

body.dark-mode em{
  color: #adb5bd;
}

/*Everything goes inside here.*/
.wrapper {
  width: 600px;
  margin: 0 auto;
}

.footer, .title, .links, .box {
  margin-top: 25px;
}

.title, .links, .footer {
  text-align: center;
}

/*Box styling*/
.box {
  border: 1.2px solid #484b6a;
  background-color: #f5f3f4;
  padding: 0.5em 1em;
  color: inherit;
}

/*Unused by default*/
.inner {
}

/*Prevent image overflow.*/
.box img {
  max-width: 100%;
  height: auto;
}

/*Main layout wrapper*/
.main-wrapper {
  margin-left: 0;
}

/*Two-column layout*/
.main {
  columns: 2;
  column-gap: 25px;
}

/*Ensure boxes stay within one column*/
.main .box {
  display: block;
  width: 100%;
  box-sizing: border-box;
}

/*Single-column modifier*/
.single-column {
  columns: 1;
}

/*Footer spacing*/
.footer {
  margin-bottom: 25px;
}

/*Link styles*/
a {
  color: #3366cc;
  text-decoration: underline;
}

a:hover {
  text-decoration: underline;
}

/*Responsive layout adjustments*/
@media(max-width:915px) {
  .wrapper {
    width: 95%;
  }

  .main-wrapper {
    width: 100%;
  }
}

@media (orientation: portrait), (max-width: 480px) {
  .wrapper {
    width: 100%;
  }

  .main-wrapper, .footer {
    margin: 0 auto;
    width: 90%;
  }

  .footer {
    margin-bottom: 25px;
  }
}

/* Dark mode styles */
body.dark-mode {
  background-color: #0d0a0b;
  color: #f0f0f0;
}

body.dark-mode .box {
  border-color: #fafafa;
  background-color: #0d0a0b;
  color: #f0f0f0;
}

body.dark-mode .title,
body.dark-mode .links,
body.dark-mode .footer,
body.dark-mode .inner {
  color: #f0f0f0;
}

body.dark-mode a {
  color: #9dc2ff;
}

body.dark-mode a:hover {
  color: #c1dcff;
}

/* Toggle switch container */
.switch {
  position: absolute;
  top: 10px;
  right: 10px;
  display: inline-block;
  width: 50px;
  height: 24px;
  z-index: 10;
}

/* Hide checkbox */
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

/* The slider */
.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: 0.4s;
  border-radius: 24px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.4s;
  border-radius: 50%;
}

/* Checked state */
input:checked + .slider {
  background-color: #4a90e2;
}

input:checked + .slider:before {
  transform: translateX(26px);
}

/* Positioning context */
.title .box {
  position: relative;
}

.dark-toggle {
  position: absolute;
  top: 10px;
  right: 10px;
  background: none;
  border: none;
  font-size: 1.5em;
  cursor: pointer;
  z-index: 10;
  color: #333;
}

.dark-mode .dark-toggle {
  color: #f0f0f0;
}

.dark-toggle {
  position: absolute;
  top: 10px;
  right: 10px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.toggle-icon {
  width: 24px;
  height: 24px;
  color: #333;
}

body.dark-mode .toggle-icon {
  color: #f0f0f0;
}

.sitemap {
  max-width: 600px;
  margin: 0 auto;
  padding: 1em;
  font-family: inherit;
}

.sitemap ul {
  list-style-type: none;
  padding-left: 1em;
}

.sitemap li {
  margin: 0.25em 0;
}

.sitemap a {
  color: #3366cc;
  text-decoration: none;
}

.sitemap a:hover {
  text-decoration: underline;
}

/* Optional: Indent nested lists visually */
.sitemap ul ul {
  margin-left: 1em;
  border-left: 2px solid #ccc;
  padding-left: 0.75em;
}

/* Responsive YouTube embeds */

.video-container {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  height: 0;
  overflow: hidden;
  max-width: 100%;
}

.video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

#searchInput {
  width: 100%;
  padding: 0.5em 1em;
  margin-top: 25px;
  font-size: 16px;
  box-sizing: border-box;
  border: 1.2px solid #484b6a;
  background-color: #f5f3f4;
  color: #111;
  font-family: inherit;
  border-radius: 4px;
}

/* Dark mode support */
body.dark-mode #searchInput {
  background-color: #0d0a0b;
  color: #f0f0f0;
  border-color: #fafafa;
}

ul#linkList li {
  margin-bottom: 0.5em;
}

blockquote {
  position: relative;
  padding: 1em 1.5em;
  margin: 1.5em 0;
  font-style: italic;
  background: #f5f3f4;
  color: #111;
  border-radius: 10px;
}

blockquote::before {
  content: open-quote;
  font-size: 4em;
  position: absolute;
  left: 10px;
  top: -10px;
  color: #999;
}

blockquote footer {
  margin-top: 1em;
  font-size: 0.9em;
  text-align: right;
  color: #555;
}

body.dark-mode blockquote {
  background: #0d0a0b;
  color: #f0f0f0;
  border-left-color: #9dc2ff;
}

body.dark-mode blockquote footer {
  color: #ccc;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 15px;
  margin-top: 25px;
}

.gallery img {
  width: 100%;
  height: auto;
  border: 1px solid #484b6a;
  border-radius: 8px;
  box-shadow: 2px 2px 6px rgba(0,0,0,0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.gallery img:hover {
  transform: scale(1.03);
  box-shadow: 4px 4px 12px rgba(0,0,0,0.2);
}

/* Dark mode */
body.dark-mode .gallery img {
  border-color: #fafafa;
  box-shadow: 2px 2px 6px rgba(255,255,255,0.1);
}

.gallery figure {
  margin: 0;
}

.gallery figcaption {
  text-align: center;
  font-size: 0.9em;
  color: #666;
  margin-top: 5px;
}

/*Lightbox*/
body.lb-disable-scrolling {
  overflow: hidden;
}

.lightboxOverlay {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 9999;
  background-color: black;
  opacity: 0.8;
  display: none;
}

.lightbox {
  position: absolute;
  left: 0;
  width: 100%;
  z-index: 10000;
  text-align: center;
  line-height: 0;
  font-weight: normal;
  outline: none;
}

.lightbox .lb-image {
  display: block;
  height: auto;
  max-width: inherit;
  max-height: none;
  border-radius: 3px;

  /* Image border */
  border: 4px solid white;
}

.lightbox a img {
  border: none;
}

.lb-outerContainer {
  position: relative;
  width: 250px;
  height: 250px;
  margin: 0 auto;
  border-radius: 4px;

  /* Background color behind image.
     This is visible during transitions. */
  background-color: white;
}

.lb-outerContainer:after {
  content: "";
  display: table;
  clear: both;
}

.lb-loader {
  position: absolute;
  top: 43%;
  left: 0;
  height: 25%;
  width: 100%;
  text-align: center;
  line-height: 0;
}

.lb-cancel {
  display: block;
  width: 32px;
  height: 32px;
  margin: 0 auto;
  background: url(../images/loading.gif) no-repeat;
}

.lb-nav {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  z-index: 10;
}

.lb-container > .nav {
  left: 0;
}

.lb-nav a {
  outline: none;
  background-image: url('data:image/gif;base64,R0lGODlhAQABAPAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==');
}

.lb-prev, .lb-next {
  height: 100%;
  cursor: pointer;
  display: block;
}

.lb-nav a.lb-prev {
  width: 34%;
  left: 0;
  float: left;
  background: url(../images/prev.png) left 48% no-repeat;
  opacity: 0;
  -webkit-transition: opacity 0.6s;
  -moz-transition: opacity 0.6s;
  -o-transition: opacity 0.6s;
  transition: opacity 0.6s;
}

.lb-nav a.lb-prev:hover {
  opacity: 1;
}

.lb-nav a.lb-next {
  width: 64%;
  right: 0;
  float: right;
  background: url(../images/next.png) right 48% no-repeat;
  opacity: 0;
  -webkit-transition: opacity 0.6s;
  -moz-transition: opacity 0.6s;
  -o-transition: opacity 0.6s;
  transition: opacity 0.6s;
}

.lb-nav a.lb-next:hover {
  opacity: 1;
}

.lb-dataContainer {
  margin: 0 auto;
  padding-top: 5px;
  width: 100%;
  border-bottom-left-radius: 4px;
  border-bottom-right-radius: 4px;
}

.lb-dataContainer:after {
  content: "";
  display: table;
  clear: both;
}

.lb-data {
  padding: 0 4px;
  color: #ccc;
}

.lb-data .lb-details {
  width: 85%;
  float: left;
  text-align: left;
  line-height: 1.1em;
}

.lb-data .lb-caption {
  font-size: 13px;
  font-weight: bold;
  line-height: 1em;
}

.lb-data .lb-caption a {
  color: #4ae;
}

.lb-data .lb-number {
  display: block;
  clear: left;
  padding-bottom: 1em;
  font-size: 12px;
  color: #999999;
}

.lb-data .lb-close {
  display: block;
  float: right;
  width: 30px;
  height: 30px;
  background: url(../images/close.png) top right no-repeat;
  text-align: right;
  outline: none;
  opacity: 0.7;
  -webkit-transition: opacity 0.2s;
  -moz-transition: opacity 0.2s;
  -o-transition: opacity 0.2s;
  transition: opacity 0.2s;
}

.lb-data .lb-close:hover {
  cursor: pointer;
  opacity: 1;
}