body {
  margin: 0;
  font-family: "Inter", sans-serif;
  background: 
    linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.3)),
    url(./imgs/moscow.jpg);
  background-size: cover;
  background-position: center;
  color: #333;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

header {
  background: #c1270c;
  color: white;
  padding: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-radius: 0 0 20px 20px;
}

header h1 {
  margin: 0;
  font-size: 27px;
}

header img {
  height: 50px;
  width: 50px;
  border-radius: 50%;
  object-fit: cover;
  margin-right: 10px;
}

.logo-title {
  display: flex;
  align-items: center;
}

.yo {
  display: flex;
  align-items: center;
  margin-right: 0 auto;
}
header nav {
  display: flex;
  gap: 12px;           /* расстояние между кнопками */
  margin-left: 0 auto;   /* уводим весь блок вправо */
  align-items: center;
}

header nav a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 120px;        /* одинаковая ширина */
  height: 36px;        /* одинаковая высота */
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  color: #333;
  background: #e4e2e2;
  border-radius: 10px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

header nav a:hover {
  background: white;
  color: #c1270c;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

/* Основной блок */
main {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: auto;
  padding: 40px 20px;
}

.container h2 {
  text-align: center;
  font-size: 28px;
  margin-bottom: 20px;
  margin-top: 0;
  color: white;
}

/* Карточки */
.values {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 50px;
  max-width: 900px;
  margin: 0 auto;
  align-items: stretch; /* все карточки одинаковой высоты */
}

.value-card {
  background: white;
  padding: 20px;
  border-radius: 14px;
  box-shadow: 0 6px 16px rgba(0,0,0,0.1);
  font-size: 20px;
  font-weight: bold;
  transition: transform 0.3s, box-shadow 0.3s;

  display: flex;
  flex-direction: column;
}

.value-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 10px 24px rgba(0,0,0,0.15);
}

.value-card img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 10px;
}

.value-card h3 {
  min-height: 50px; /* одинаковое место под заголовки */
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 10px 0;
  text-align: center;
}

.value-card span {
  display: block;
  font-size: 15px;
  font-weight: normal;
  color: #666;
  margin-bottom: 10px;
}

.lessons-list {
  margin-top: auto; /* уводим кнопки вниз */
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.lessons-list a {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  background: #e4e2e2;
  border-radius: 6px;
  text-decoration: none;
  color: #333;
  font-size: 16px;
  transition: background 0.3s;
  height: 20px; /* одинаковая высота кнопок */
}
#lesson-text img,
#literature-text img,
.value-card img {
  max-width: 100% !important;
  height: auto !important;
  display: block;
  margin: 10px auto;  /* центрируем */
  border-radius: 8px; /* чтобы были аккуратнее */
}
.lessons-list a:hover {
  background: #c1270c;
  color: white;
}

/* Контент урока */
#lesson-content {
  display: none;
}

button.back-btn {
  margin-top: 20px;
  background: #c1270c;
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 16px;
  cursor: pointer;
  transition: 0.3s;
}

button.back-btn:hover {
  background: #ffffff;
  color: #c1270c;
}

/* Футер */
footer {
  background: #c1270c;
  color: white;
  text-align: center;
  padding: 15px;
  font-size: 14px;
  border-radius: 20px 20px 0 0;
  margin-top: auto;
}

/* Адаптив */



@media (max-width: 600px) {
  header {
    flex-direction: column;
    align-items: center;
  }

  .yo {
    margin-right: 0;
    margin-top: 10px;
  }

  header nav {
    display: flex;
    gap: 10px;
    margin-top: 10px;
  }

  header nav a {
    flex: 1;
    text-align: center;
    font-size: 16px;
    padding: 10px;
    border-radius: 20px;
    font-weight: bold;
  }

  }
::-webkit-scrollbar {
    width: 8px;
  }
  ::-webkit-scrollbar-thumb {
    background: linear-gradient(#000000, #1A0E01);
}
/* Заголовки внутри lesson-text */
/* Нумерованный список */
/* Ссылки */
/* Адаптивность для телефонов */

/* Контент текста (уроки, введение, литература) */
#lesson-text, #literature-text {
  background: white;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 6px 16px rgba(0,0,0,0.1);
  margin-top: 20px;
  line-height: 1.6;
  font-size: 16px;
  color: #222;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* Заголовки */
#lesson-text h3, #literature-text h3 {
  font-size: 20px;
  margin-bottom: 12px;
  text-align: center;
}

/* Списки */
#lesson-text ol, #literature-text ol {
  padding-left: 20px;
}

#lesson-text ol li, #literature-text ol li {
  margin-bottom: 8px;
  line-height: 1.5;
}

/* Ссылки */
#lesson-text a, #literature-text a {
  color: #0056b3;
  text-decoration: none;
  word-break: break-word;
}

#lesson-text a:hover, #literature-text a:hover {
  text-decoration: underline;
}

/* --- Адаптивность --- */
/* ============== MOBILE FIX: прижим и выравнивание для телефонов ============== */
@media (max-width: 500px) {
  /* контейнеры и базовая сетка */
  .container, .values, .value-card, .lessons-list, #lesson-text, #literature-text {
    box-sizing: border-box !important;
  }

  /* карточки */
  .values {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
    padding: 0 12px !important;
    width: 100% !important;
    margin: 0 !important;
  }

  .value-card {
    width: 100% !important;
    padding: 14px !important;
    border-radius: 10px !important;
    text-align: left !important;
    display: flex !important;
    flex-direction: column !important;
  }

  .value-card img {
    height: 120px !important;
    margin-bottom: 10px !important;
  }

  .value-card h3 {
    font-size: 18px !important;
    text-align: left !important;
    margin: 6px 0 10px !important;
  }

  /* кнопки уроков */
  .lessons-list {
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 8px !important;
  }

  .lessons-list a {
    width: 100% !important;
    padding: 8px 10px !important;
    font-size: 14px !important;
    border-radius: 8px !important;
  }

  /* контент уроков */
  #lesson-text, #literature-text {
    width: calc(100% - 24px) !important;
    margin: 10px 12px !important;
    padding: 14px !important;
    border-radius: 8px !important;
    text-align: left !important;
    font-size: 15px !important;
    line-height: 1.55 !important;
    overflow-x: auto; /* для таблиц */
  }

  #lesson-title {
    text-align: left !important;
    margin: 12px !important;
    font-size: 20px !important;
  }

  /* меню (2 кнопки в ряд) */
  header nav {
    width: 100% !important;
    flex-wrap: wrap;
    justify-content: center !important;
    gap: 8px !important;
  }

  header nav a {
    flex: 1 1 45% !important;
    max-width: 48% !important;
    height: 40px !important;
    padding: 8px !important;
    font-size: 13px !important;
    border-radius: 20px !important;
  }

  /* таблицы */
  #lesson-text table, #literature-text table {
    width: 100% !important;
    border-collapse: collapse;
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    font-size: 14px !important;
  }

  #lesson-text table th, 
  #lesson-text table td,
  #literature-text table th, 
  #literature-text table td {
    padding: 6px 8px !important;
    word-break: break-word;
  }

  html, body {
    overflow-x: hidden !important;
  }
}
@media (max-width: 500px) {
  .lessons-list {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 20px !important;        /* расстояние между кнопками */
    padding: 0 3px !important;
    margin-right: 10px;   /* небольшой отступ от краёв */
  }

  .lessons-list a {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
    max-width: 95% !important;   /* кнопки чуть уже */
    margin: 0 auto;              /* центрируем каждую */
  }
}
@media (max-width: 500px) {
  #lesson-text img,
  #literature-text img,
  .value-card img {
    max-width: 100% !important;
    height: auto !important;
  }
}
.logo-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.college-info {
  display: flex;
  flex-direction: column;
}

.college-info h4 {
  margin: 0;
  font-size: 1.2em;
  font-weight: 600;
}

.address {
  margin: 2px 0 0 0;
  font-size: 0.9em;
  color: #ffffff;
}

