* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Times New Roman', serif;
  font-size: 18px;
}

body {
  background-color: #f5f5f5;
  color: #333;
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  word-break: break-word;
}

h1, h2, h3 {
  color: #2c3e50;
  margin: 20px 0 10px;
}

.h3, .h4, .h5 {
  margin-top: 24px;
  margin-bottom: 18px;
  font-weight: bold;
  font-size: 18px;
  text-indent: 1.25cm;
}

.h3 {
  margin-top: 0.8cm;
}

.h4 {
  margin-top: 0.8cm;
}

.h5 {
  margin-top: 0.6cm;
}

hr {
  border: none;
  height: 1px;
  background-color: #ddd;
  margin: 20px 0;
}

.text-center {
  text-align: center;
  text-indent: 0;
}

#topblock {
  background-color: #2c3e50;
  color: white;
  padding: 10px 0;
}

#donntu {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: flex-end;
  gap: 20px;
}

#donntu a {
  color: white;
  text-decoration: none;
  font-weight: 500;
}

#donntu a:hover {
  text-decoration: underline;
}

#header {
  background-color: #3498db;
  color: white;
  padding: 30px 0;
  display: flex;
  justify-content: center;
}

#header-content {
  width: 90%;
  max-width: 1200px;
  display: flex;
  gap: 30px;
  align-items: center;
}

#photomag {
  flex-shrink: 0;
}

#photomag img {
  width: 180px;
  height: 240px;
  border-radius: 5px;
  object-fit: cover;
  border: 3px solid white;
}

#headertext div {
  margin-bottom: 10px;
  font-size: 20px;
  font-weight: bold;
}

#headertext a {
  color: white;
  font-size: 20px;
  text-decoration: none;
}

#headertext a:hover {
  text-decoration: underline;
}

#middleblock {
  width: 90%;
  max-width: 1200px;
  margin: 30px auto;
  display: flex;
  gap: 30px;
}

#menu {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 200px;
}

#menub {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 15px;
    background-color: #2c3e50;
  }
  .mitemb {
    padding: 10px 15px;
    background-color: #3498db;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    text-align: center;
    font-size: 14px;
  }

@media (max-width: 991px) {
  #middleblock {
    flex-direction: column;
    width: 100%;
    padding: 0 24px;
  }
  
  #menu {
    flex-direction: row;
    width: 100%;
    flex-wrap: wrap;
  }
  
  #menu .button {
    flex: 1;
    min-width: 170px;
  }
  
  #header-content {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 480px) {
   #menub {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    padding: 10px;
    background-color: #2c3e50;
  }
  
  .mitemb {
    padding: 10px 15px;
    background-color: #3498db;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    text-align: center;
    font-size: 14px;
  }
}

.button {
  padding: 12px 15px;
  background-color: #3498db;
  color: white;
  text-decoration: none;
  border-radius: 5px;
  text-align: center;
  transition: background-color 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.button:hover {
  background-color: #2980b9;
}

.colorfix {
  background-color: #2c3e50;
}

#maintext,
#referat,
#nauch,
#individual {
  flex: 1;
  background-color: white;
  padding: 30px;
  border-radius: 5px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.video-wrapper {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* Соотношение 16:9 */
    margin: 20px 0;
  justify-content: center;
}

.video-wrapper video {
    position: absolute;
    top: 0;
    left: 0;
    width: 50%;
    height: 100%;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.resume {
  display: grid;
  grid-template-columns: 230px 1fr;
}

.resume .c1 {
  font-weight: bold;
}

.resume .c1,
.resume .c2 {
  border-bottom: solid 1px #eee;
  padding: 16px 8px;
}

.resume .even {
  background-color: #f9f9f9;
  border-top: solid 1px #eee;
}

.resume ol,
.resume ul {
  margin-left: 20px;
}

.resume li {
  margin-bottom: 5px;
}

@media (max-width: 680px) {
  .resume {
    grid-template-columns: 1fr;
  }
}

.referat {
  text-align: justify;
  line-height: 1.5;
  font-family: 'Times New Roman', serif;
  font-size: 14pt;
}

.referat p {
  text-indent: 1.25cm;
  margin-bottom: 0.5cm;
}

.referat caption {
  text-indent: 1.25cm;
  font-family: 'Times New Roman', serif;
  font-size: 14pt;
}

/* Исключения для центрированных заголовков */
.referat #vvedenie h2, /* Введение */
.referat #vyvody h2, /* Выводы */
.referat #spisok-istochnikov h2 { /* Список источников */
  font-size: 14pt;
  text-align: center;
}

.referat table {
  width: 100%;
  border-collapse: collapse;
  margin: 1cm 0;
  font-size: 12pt;
}

.referat table, .referat th, .referat td {
  border: 1px solid black;
}

.referat th, .referat td {
  padding: 0.3cm;
  text-align: left;
  word-break: break-word;
}

.referat .figure {
  text-align: center;
  margin: 1cm 0;
}

.referat .figure img {
  max-width: 100%;
  height: auto;
}

.referat .figure p {
  text-indent: 0;
  margin-top: 0.3cm;
  font-style: normal;
}

.referat ul {
  margin: 0.5cm 0;
  padding-left: 1.5cm;
}

.referat ol {
  padding-left: 30px;
}

.referat li {
  margin-bottom: 0.3cm;
}

.referat .ul-change ul {
  list-style-type: none;
  margin: 0.5cm 0;
  padding-left: 1.5cm;
}

.referat .ul-change ul li {
  margin-bottom: 0.3cm;
  position: relative;
  padding-left: 0.5cm;
}

.referat .ul-change ul li:before {
  content: "–";
  position: absolute;
  left: 0;
}

.referat .ul-change ol {
  margin: 0.5cm 0;
  padding-left: 1.5cm;
}

.referat .ul-change li {
  margin-bottom: 0.3cm;
}

.referat .references {
  text-indent: 1.25cm;
  margin-bottom: 0.5cm;
}

.referat .references li {
  margin-bottom: 18px;
  text-indent: -3px;
  padding-left: 3px;
}

.referat .toc ul {
  list-style-type: none;
  padding-left: 0;
}

.referat .toc li {
  margin-bottom: 0.3cm;
}

.referat .comment {
  text-align: center;
  text-indent: 0;
  margin-bottom: 1cm;
  font-style: normal;
}

/* Стили для ссылок */
.referat a {
  color: #000000;
  text-decoration: none;
}

.referat a:hover {
  text-decoration: underline;
}

/* Убираем курсив везде */
.referat * {
  font-style: normal !important;
}




.individual {
  text-align: justify;
  line-height: 1.5;
  font-family: 'Times New Roman', serif;
  font-size: 14pt;
}

.individual p {
  text-indent: 1.25cm;
  margin-bottom: 0.5cm;
}

.individual caption {
  text-indent: 1.25cm;
  font-family: 'Times New Roman', serif;
  font-size: 14pt;
}

/* Исключения для центрированных заголовков */
.individual #vvedenie h2, /* Введение */
.individual #vyvody h2, /* Выводы */
.individual #spisok-istochnikov h2 { /* Список источников */
  font-size: 14pt;
  text-align: center;
}

.individual table {
  width: 100%;
  border-collapse: collapse;
  margin: 1cm 0;
  font-size: 12pt;
}

.individual table, .individual th, .individual td {
  border: 1px solid black;
}

.individual th, .individual td {
  padding: 0.3cm;
  text-align: left;
  word-break: break-word;
}

.individual .figure {
  text-align: center;
  margin: 1cm 0;
}

.individual .figure img {
  max-width: 100%;
  height: auto;
}

.individual .figure p {
  text-indent: 0;
  margin-top: 0.3cm;
  font-style: normal;
}

.individual ul {
  margin: 0.5cm 0;
  padding-left: 1.5cm;
}

.individual ol {
  padding-left: 30px;
}

.individual li {
  margin-bottom: 0.3cm;
}

.individual .ul-change ul {
  list-style-type: none;
  margin: 0.5cm 0;
  padding-left: 1.5cm;
}

.individual .ul-change ul li {
  margin-bottom: 0.3cm;
  position: relative;
  padding-left: 0.5cm;
}

.individual .ul-change ul li:before {
  content: "–";
  position: absolute;
  left: 0;
}

.individual .ul-change ol {
  margin: 0.5cm 0;
  padding-left: 1.5cm;
}

.individual .ul-change li {
  margin-bottom: 0.3cm;
}

.individual .references {
  text-indent: 1.25cm;
  margin-bottom: 0.5cm;
}

.individual .references li {
  margin-bottom: 18px;
  text-indent: -3px;
  padding-left: 3px;
}

.individual .toc ul {
  list-style-type: none;
  padding-left: 0;
}

.individual .toc li {
  margin-bottom: 0.3cm;
}

.individual .comment {
  text-align: center;
  text-indent: 0;
  margin-bottom: 1cm;
  font-style: normal;
}

/* Стили для ссылок */
.individual a {
  color: #000000;
  text-decoration: none;
}

.individual a:hover {
  text-decoration: underline;
}

/* Убираем курсив везде */
.individual * {
  font-style: normal !important;
}



.nauch {
  text-align: justify;
  line-height: 1.5;
  font-family: 'Times New Roman', serif;
  font-size: 14pt;
}

.nauch p {
  text-indent: 1.25cm;
  margin-bottom: 0.5cm;
}

.nauch caption {
  text-indent: 1.25cm;
  font-family: 'Times New Roman', serif;
  font-size: 14pt;
}

/* Исключения для центрированных заголовков */
.nauch #vvedenie h2, /* Введение */
.nauch #vyvody h2, /* Выводы */
.nauch #spisok-istochnikov h2 { /* Список источников */
  font-size: 14pt;
  text-align: center;
}

.nauch table {
  width: 100%;
  border-collapse: collapse;
  margin: 1cm 0;
  font-size: 12pt;
}

.nauch table, .nauch th, .nauch td {
  border: 1px solid black;
}

.nauch th, .nauch td {
  padding: 0.3cm;
  text-align: left;
  word-break: break-word;
}

.nauch .figure {
  text-align: center;
  margin: 1cm 0;
}

.nauch .figure img {
  max-width: 100%;
  height: auto;
}

.nauch .figure p {
  text-indent: 0;
  margin-top: 0.3cm;
  font-style: normal;
}

.nauch ul {
  margin: 0.5cm 0;
  padding-left: 1.5cm;
}

.nauch ol {
  padding-left: 30px;
}

.nauch li {
  margin-bottom: 0.3cm;
}

.nauch .ul-change ul {
  list-style-type: none;
  margin: 0.5cm 0;
  padding-left: 1.5cm;
}

.nauch .ul-change ul li {
  margin-bottom: 0.3cm;
  position: relative;
  padding-left: 0.5cm;
}

.nauch .ul-change ul li:before {
  content: "–";
  position: absolute;
  left: 0;
}

.nauch .ul-change ol {
  margin: 0.5cm 0;
  padding-left: 1.5cm;
}

.nauch .ul-change li {
  margin-bottom: 0.3cm;
}

.nauch .references {
  text-indent: 1.25cm;
  margin-bottom: 0.5cm;
}

.nauch .references li {
  margin-bottom: 18px;
  text-indent: -3px;
  padding-left: 3px;
}

.nauch .toc ul {
  list-style-type: none;
  padding-left: 0;
}

.nauch .toc li {
  margin-bottom: 0.3cm;
}

.nauch .comment {
  text-align: center;
  text-indent: 0;
  margin-bottom: 1cm;
  font-style: normal;
}

/* Стили для ссылок */
.nauch a {
  color: #000000;
  text-decoration: none;
}

.nauch a:hover {
  text-decoration: underline;
}

/* Убираем курсив везде */
.nauch * {
  font-style: normal !important;
}

.nauch h3 {
	color: #2980b9;
	margin: 30px 0 20px 0;
	border-left: 4px solid #3498db;
	padding-left: 10px;
}
.nauch .publication {
	background: #f8f9fa;
	padding: 20px;
	margin: 15px 0;
	border-radius: 5px;
	border-left: 4px solid #3498db;
}
.nauch .publication h4 {
	margin: 0 0 10px 0;
	color: #2c3e50;
}
.nauch .publication .h3 {
	color: #3498db;
	text-decoration: none;
	font-weight: bold;
}
.nauch .publication .h3:hover {
	text-decoration: underline;
}
.nauch .publication p {
	margin: 8px 0;
	text-align: justify;
}