/* Общий стиль */
* {
  box-sizing: border-box;
}

html {
  height: 100%;
  font-family: 'Times New Roman', Times, serif;
  background-color: white;
  background-size: cover;
  background-repeat: no-repeat;
  background-attachment: fixed;
  background-position: center;
}

body {
  min-height: 100%;
  margin: 0;
  display: flex;
  flex-direction: column;
}

/* Шапка */
header {
  background: #004b8d;
  padding: 10px;
  max-width: 100%;
  flex-wrap: wrap;
  box-sizing: border-box;
}

.container {
  flex: 1;
}

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  padding: 15px 30px;
  background: rgb(255, 255, 255);
  backdrop-filter: blur(6px);
  color: #004b8d;
  position: relative;
}

.logo {
  height: 65px;
  width: auto;
}

.logo_1 {
  height: 70px;
  width: auto;
  display: block;
  margin: 15px auto 0; /* 15px сверху */
}

.profsojuz {
  font-size: 50px;
  margin-left: auto;
  height: 55px;
}

.header-right {
  margin-left: auto;
  font-size: 14px;
  text-align: right;
}

.header-bottom {
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
}

/* Меню */
.main-nav {
  background: linear-gradient(
    to bottom,
    rgb(0, 56, 141) 0%,
    rgb(1, 52, 140) 45%,
    rgb(27, 67, 215)
  );
  background-blend-mode: overlay;
  backdrop-filter: blur(6px);
  padding: 10px 0;
  text-align: center;
  box-shadow:
    inset 0 2px 3px rgba(255, 255, 255, 0.3),
    inset 0 -2px 5px rgba(0, 0, 0, 0.4),
    0 2px 4px rgba(0, 0, 0, 0.4);
}

.main-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.main-nav li {
  margin: 0;
  font-size: 18px;
}

.main-nav a {
  display: inline-block;
  padding: 10px 20px;
  color: #fff;
  text-decoration: none;
  border-radius: 6px;
  transition: all 0.3s ease;
  font-weight: 700;
}

.main-nav a:hover {
  background: rgba(255, 255, 255, 0.71);
}

/* Контейнеры */
.main-container,
.main-container_1 {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin: 20px auto;
  padding: 0 15px;
  max-width: 1500px;
  width: 100%;
}

/* Новости */
.news-container {
  flex: 2;
  background-color: rgba(0,0,0,0.12);
  padding: 10px;
  border-radius: 8px;
}

.news-container_1 {
  flex: 3;
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* 3 карточки в ряд всегда */
  gap: 20px;
  padding: 20px;
  background-color: rgba(0,0,0,0.12);
  border-radius: 8px;
  width: 100%;
  margin: 0;
}

/* Карточки новостей */
.news-card {
  background: rgba(255, 255, 255, 0.64);
  padding: 10px;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  display: flex;
  flex-direction: column;
  z-index: 1;
}

.news-card img {
  width: 100%;
  height: auto;
  object-fit: cover;
  border-bottom: 1px solid #ccc;
}

.news-card h3 {
  margin: 10px 0;
}

.news-card .lead {
  font-size: 14px;
  color: #333;
  font-weight: bold;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.news-card .read-more {
  margin-top: auto;
  display: inline-block;
  padding: 8px 12px;
  background: #004b8d;
  color: #ffffff;
  text-decoration: none;
  border-radius: 5px;
}

/* Главная новость */
.featured-news-container {
  flex: 1;
  grid-column: 1 / -1;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  margin-bottom: 10px;
  padding: 10px 20px;
}

.featured-news-card {
  flex: 1;
  background: rgba(255, 255, 255, 0.64);
  padding: 10px;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.73);
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
}

.featured-news-card img {
  width: 100%;
  height: auto;
  object-fit: cover;
  aspect-ratio: 19/9;
  border-bottom: 1px solid #ccc;
}

.featured-news-card h3 {
  margin: 10px 0;
}

.featured-news-card .lead {
  font-size: 14px;
  color: #333;
  font-weight: bold;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.featured-news-card .read-more {
  margin-top: auto;
  display: inline-block;
  padding: 8px 12px;
  background: #004b8d;
  color: #ffffff;
  text-decoration: none;
  border-radius: 5px;
  text-align: center;
}

/* Сайдбар */
.sidebar {
  flex: 1;
  max-width: 350px;
  padding: 20px;
  text-align: center;
  border-radius: 8px;
  margin: 0 auto;
}

.sidebar_1 {
  background-color: rgba(0, 0, 0, 0.16);
  width: 100%;
  max-width: 380px;
  padding: 10px;
  text-align: center;
  border-radius: 8px;
  margin: 0 auto;
  position: static;
}

.portrait {
  width: 100%;
  height: auto;
  border-radius: 8px;
}

.quote {
  margin: 10px 0;
  font-style: italic;
  font-size: large;
}

.name {
  font-weight: bold;
  font-size: large;
}

.join-button {
  display: inline-block;
  padding: 10px 15px;
  background: #004b8d;
  color: white;
  text-decoration: none;
  border-radius: 5px;
}

/* Страница поста */
.post-container {
  max-width: 800px;
  margin: 30px auto;
  background: #fff;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.post-container .post-title {
  font-size: 28px;
  margin-bottom: 15px;
}

.post-container .post-image {
  max-width: 100%;
  max-height: 400px;
  object-fit: contain;
  display: block;
  margin: 0 auto 15px;
  border-radius: 6px;
}

.post-container .post-lead {
  font-weight: bold;
  font-size: 18px;
  margin-bottom: 15px;
  word-wrap: break-word;
  overflow-wrap: break-word;
  z-index: 1;
}

.post-container .post-text {
  font-size: 16px;
  line-height: 1.6;
  text-align: justify;
  word-wrap: break-word;
  overflow-wrap: break-word;
  z-index: 1;
}

.edit-button,
.delete-button {
  display: inline-block;
  margin-top: 20px;
  padding: 10px 15px;
  color: white;
  text-decoration: none;
  border-radius: 4px;
  z-index: 1;
}

.edit-button {
  background: #007bff;
}

.edit-button:hover {
  background: #0056b3;
}

.delete-button {
  background: #dc3545;
  margin-left: 10px;
}

.delete-button:hover {
  background: #a71d2a;
}

/* Формы постов */
.post-form {
  max-width: 600px;
  margin: 0 auto;
  background: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  z-index: 1;
}

.featured-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  font-weight: bold;
  cursor: pointer;
}

.dobavit {
  font-weight: normal;
  margin-top: 10px;
}

.inputs {
  font-weight: bold;
}

.post-form label {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
}

.post-form input,
.post-form textarea {
  width: 100%;
  margin-bottom: 15px;
  font-size: 16px;
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 5px;
  resize: vertical;
  font-family: inherit;
}

.post-form button {
  display: inline-block;
  padding: 10px 15px;
  background: #004b8d;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

.post-form button:hover {
  background: #003364;
}

/* Футер */
footer {
  background: #004b8d;
  color: white;
  text-align: center;
  padding: 10px;
  margin-top: auto;
  z-index: 1;
}

/* Страница входа */
.login-container {
  max-width: 400px;
  margin: 60px auto;
  padding: 30px;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  text-align: center;
  color: #fff;
  z-index: 1;
}

.login-container h2 {
  margin-bottom: 20px;
  font-weight: 600;
}

.login-form .form-group {
  text-align: left;
  margin-bottom: 15px;
}

.login-form label {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  font-weight: 500;
}

.login-form input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 6px;
  border: none;
  background: rgba(255,255,255,0.15);
  color: #fff;
  font-size: 14px;
}

.login-form input:focus {
  outline: none;
  background: rgba(255,255,255,0.25);
}

.login-form button {
  width: 100%;
  padding: 10px;
  background: #4cafef;
  border: none;
  border-radius: 6px;
  color: white;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s ease;
}

.login-form button:hover {
  background: #3a9ddd;
}

/* Адаптивность */
@media (max-width: 992px) {
  .profsojuz {
    font-size: 40px;
    height: 45px;
  }
}

@media (max-width: 768px) {
  .main-container,
  .main-container_1 {
    flex-direction: column;
    padding: 0 10px;
  }

  .sidebar {
    max-width: 100%;
    order: -1;
  }

  .news-container_1 {
    grid-template-columns: 1fr;
  }

  .main-nav a {
    padding: 8px 12px;
    font-size: 16px;
  }
}

@media (max-width: 480px) {
  .logo {
    height: 45px;
  }

  .profsojuz {
    font-size: 30px;
    height: 35px;
  }

  .main-nav li {
    font-size: 16px;
  }

  .header-right {
    font-size: 12px;
  }
}

.hop {
    padding: 2% 100px;
}

.news-card img {
    width: 100%;
    height: 70%;
    object-fit: cover;
    border-bottom: 1px solid #ccc;
}

.featured-news-card img {
    width: 100%;
    height: 75%;
    object-fit: cover;
    aspect-ratio: 19/9;
    border-bottom: 1px solid #ccc;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between; /* расталкивает блоки по сторонам */
  flex-wrap: wrap;
}

.header-left {
  flex: 0 0 auto;
}

.header-middle {
  flex: 1 1 auto;
  display: flex;
  justify-content: center;  /* по горизонтали */
  align-items: flex-end;    /* прижать картинку к низу контейнера */
  height: 70px;             /* фиксируем высоту */
}

.header-contacts {
  flex: 0 0 auto;
  text-align: right;
  margin-left: auto; /* прижимает к правому краю */
}

.header-contacts p {
  margin: 0;
  font-size: 14px;
}