*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

@media (max-width: 768px) {
  .tab-content {
    display: none !important;
    position: relative !important;
    opacity: 1 !important;
    transform: none !important;
    margin: 10px 0;
    width: 100% !important;
  }

  .tab-content.active {
    display: block !important;
  }
  .background-wrapper {
    width: 100% !important;
    height: 100% !important;
  }
}

body {
  font-family: Arial, sans-serif;
  background: #2c2c2c;
  color: #e6e6e6;
  overflow-x: hidden;
}
.background-wrapper {
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  position: fixed;
  inset: 0;
  background: linear-gradient(to bottom right, #333232 49.9%, #2c2c2c 50.1%);
  z-index: -1;
}
a {
  color: #e6e6e6;
  text-decoration: none;
}
a:hover {
  color: #0077b5;
}

.site-title {
  font-size: 2em;
  text-align: center;
  color: #e6e6e6;
  margin: 1rem 0;
}
.highlight {
  background: #0077b5;
  color: #fff;
  padding: 1px 2px;
  border-radius: 2px;
}
.logo-header {
  position: relative;
  z-index: 5;
}

.preloader {
  position: fixed;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  background: #2c2c2c;
  z-index: 100;
  animation: fadeOutPreloader 0.5s forwards 2s;
}
.progress-bar {
  width: calc(100vw + 100vh);
  height: 5px;
  background: #0077b5;
  transform-origin: bottom left;
  transform: rotate(45deg) scaleX(0);
  animation: progressAnim 2s forwards;
}
@keyframes progressAnim {
  to {
    transform: rotate(-45deg) scaleX(1);
  }
}
@keyframes fadeOutPreloader {
  to {
    opacity: 0;
    visibility: hidden;
    display: none;
  }
}

.hello,
.language-selection {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0;
  animation: fadeIn 0.5s forwards 2s;
}
.hello {
  top: 40%;
  color: #0077b5;
  font-size: 3em;
  z-index: 200;
}
.language-selection {
  top: 55%;
  display: flex;
  gap: 1rem;
  z-index: 200;
}
@keyframes fadeIn {
  to {
    opacity: 1;
  }
}
.lang-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 1.2em;
  padding: 0.3em 0.6em;
  border: 2px solid #0077b5;
  border-radius: 5px;
  transition: background 0.3s, color 0.3s;
}
.lang-link:hover {
  background: #0077b5;
  color: #fff;
}

.preloader-ru {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: #2c2c2c;
  z-index: 100;
  animation: fadeOutPreloader 0.5s forwards 2s;
}
.preloader-ru .progress-bar {
  animation: progressAnim 2s forwards;
}

.lang-switch {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 0.9em;
  z-index: 200;
}
.lang-switch a {
  font-weight: 500;
}
.lang-switch a.active {
  color: #0077b5;
}

.main-nav {
  position: sticky;
  top: 0;
  z-index: 150;
  background: #404040;
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  padding: 0.7rem 0;
}
.main-nav a {
  padding: 0.3em 0.5em;
  font-size: 0.95em;
  border-bottom: 2px solid transparent;
  transition: border-color 0.3s;
}
.main-nav a:hover,
.main-nav a:focus {
  border-color: #0077b5;
}


.content-wrapper {
  position: relative;
  width: 97%;
  max-width: 900px;
  padding: 0 15px;
  margin: 2rem auto;
  padding-bottom: 2rem;
  overflow: visible;
}

.tab-content {
  position: relative;
  top: 0; left: 0;
  width: calc(100% - 30px);
  max-width: 900px;
  transform: none !important;
  margin: 10px 0;
  padding: 20px;
  background: #383838;
  border: 1px solid #555;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.3);

  opacity: 0;
  transform: translateX(100%);
  transition: transform 0.5s ease, opacity 0.5s ease;
}




.tab-content.active {
  opacity: 1;
  transform: translateX(0);
}
.tab-content.in-right   { transform: translateX(100%); }
.tab-content.in-left    { transform: translateX(-100%); }
.tab-content.out-left   { transform: translateX(-100%); opacity: 0; }
.tab-content.out-right  { transform: translateX(100%);  opacity: 0; }
.blog-entry {
  margin-bottom: 1rem;
  border: 1px solid #555;
  border-radius: 5px;
  overflow: hidden;
}
.blog-entry summary {
  list-style: none;
  cursor: pointer;
  padding: 0.75rem 1rem;
  background: #555555;
  position: relative;
  font-weight: bold;
}
.blog-entry summary::marker {
  display: none;
}
.blog-entry summary::after {
  content: "—";
  position: absolute;
  right: 1rem;
  font-weight: bold;
  transition: transform 0.2s;
}
.blog-entry[open] summary::after {
  transform: rotate(90deg);
}
.blog-entry .note-body {
  padding: 1rem;
  background: #454545;
}
.blog-entry .note-body p:last-of-type {
  font-weight: bold;
}
