body {
 background-color: #F8F8FF;
 font-family: Verdana, Helvetica, Arial, sans-serif;
}
h1 {
 font-size: 38px;
 color: #301f17;
 background-color: #808080;
 font-family: "Palatino Linotype", "Book Antiqua", Palatino, serif;
 border: 5px solid #808080;
 border-radius: 10px;
 margin-top: 2px;
 margin-bottom: 6px;
}
h2 {
 font-size: 28px;
 text-align: center;
 color: #301f17;
 padding: 1px;
 font-family: "Palatino Linotype", "Book Antiqua", Palatino, serif;
}
h3 {
 font-size: 24px;
 text-align: center;
 color: #301f17;
 padding: 1px;
 font-family: "Palatino Linotype", "Book Antiqua", Palatino, serif;
}
h4 {
 font-size: 14px;
 text-align: center;
 color: #301f17;
 background-color: #C0C0C0;
 padding: 2px;
 font-family: Verdana, Helvetica, Arial, sans-serif;
 border: 5px solid #C0C0C0;
 border-radius: 10px;
 margin-top: 3px;
 margin-bottom: 0px;
}
section { 
 text-indent: 30px;
 font-size: 18px;
 text-align: justify;
 color: #301f17;
 background-color: #C0C0C0;
 padding: 20px;
 line-height: 30px;
 border: 5px solid #C0C0C0;
 border-radius: 10px;
}
table {
 width: 100%;
}
td.sidebar {
 background-color: #808080;
 vertical-align: top;
 padding: 5px;
 border: 5px solid #808080;
 border-radius: 10px;
} 
td.sidebar>ul {
 list-style: none;
 padding: 5px;
}
td.article {
 background-color: #808080;
 height: 500px;
 width: 100%;
 vertical-align: top;
 padding: 5px;
 text-indent: 20px;
}
td.footer {
 background-color: #808080;
 text-align: center;
 padding: 5px;
}
td.header {
 background-color: #C0C0C0;
 color: black;
 text-align: 20;
 margin-left: 20px; 
 text-indent: 20px;
}  

button {
 display: block;
 background-color: #C0C0C0;
 border: 4px solid #808080;
 color: #301f17;
 padding: 10px 10px;
 text-align: center;
 text-decoration: none;
 display: inline-block;
 font-size: 18px;
 margin: 4px 10px;
 cursor: pointer;
 font-family: Verdana, Helvetica, Arial, sans-serif;
 width: 200px;
 height: 70px;
 border-radius: 10px;
}
/* Эффект при наведении */
button:hover {
  background-color: #C0C0C0;
}
/* Эффект при нажатии */
button:active {
  background-color: #808080;
  transform: translateY(2px); 
}
figcaption {
 text-align: center;
 color: #301f17;
 font-family: "Palatino Linotype", "Book Antiqua", Palatino, serif;
 margin-top: 0; /* Отступ сверху */
 margin-bottom: 5px; 
 margin-left: 35px; 
}
img {
 height: 100%;
 width: 100%;
}
   /* Новый класс для центрирования изображения */
    .center-image {
      display: block;
      margin: 0 auto;
      max-width: 50%; /* Чтобы изображение не вылезало за границы контейнера */
      margin-right: 30%; 
    }
  .logo-container {
      max-width: 70%;
    }
    .logo {
      width: 80%;
      height: auto;
      max-width: 100px; /* Максимальная ширина логотипа */
      display: block;
    }
    .wrapper {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding-top: 2px;
      padding-bottom: 2px;
      padding-left: 5px;
      padding-right: 0;
    }
 .right, .left {
width: 100%
}
 .left {
width: 80%;
margin-right: 0;
}
.right {
width: 130%;
margin-right: 0;
text-align: center;
}
    /* Стили для модального окна */
    .modal {
      display: none;
      position: fixed;
      z-index: 1000;
      left: 0;
      top: 0;
      width: 100%;
      height: 100%;
      background-color: rgba(0, 0, 0, 0.8);
      justify-content: center;
      align-items: center;
    }
    .modal-content {
      max-width: 90%;
      max-height: 90%;
      border-radius: 8px;
      box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
      object-fit: contain; /* Ключевое изменение: сохраняет пропорции */
      width: auto;
      height: auto;
    }
    .close {
      position: absolute;
      top: 20px;
      right: 35px;
      color: white;
      font-size: 40px;
      font-weight: bold;
      cursor: pointer;
      z-index: 1001;
    }
.gallery-container {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
grid-gap: 15px;
padding: 20px;
}
.gallery-item {
overflow: hidden;
border-radius: 5px;
box-shadow: 0 3px 6px rgba(0,0,0,0.16);
transition: transform 0.3s;
}
.gallery-item:hover {
transform: scale(1.03);
}
.gallery-item img {
width: 100%;
height: auto;
display: block;
}
.text-block {
  width: 100%;

 background-color: #C0C0C0; 
 border: 5px solid #C0C0C0;
 border-radius: 10px;
}

.text-block p {
  margin: 0;
}

