* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Segoe UI', sans-serif;
  background-color: #f9f9f9;
  color: #222;
}
.header {
  width: 100%;
  background: linear-gradient(to right, #e8f0ff, #ffffff);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  font-family: 'Segoe UI', sans-serif;
}

/* Верхняя часть */
.header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 25px 40px;
  flex-wrap: wrap;
}

.logo-block {
  display: flex;
  align-items: center;
  gap: 15px;
}

.logo {
  height: 70px;
}

.org-name {
  font-size: 18px;
  font-weight: 600;
  color: #1f3f75;
  line-height: 1.4;
}

/* Контакты */
.contact-info {
  text-align: center;
  font-size: 15px;
  line-height: 1.5;
  color: #444;
}

.contact-info .icon {
  color: #4c6ef5;
  margin-right: 6px;
}

/* Кнопка */
.register-button {
  display: flex;
  justify-content: flex-end;
}

.btn-register {
  background-color: #1f3f75;
  color: #fff;
  border: none;
  padding: 10px 22px;
  border-radius: 25px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  transition: background 0.3s ease;
}

.btn-register:hover {
  background-color: #16306b;
}

/* Навигация */
.nav-container {
  border-top: 1px solid #dbe3f0;
  border-bottom: 1px solid #dbe3f0;
  background-color: #f6f9ff;
}

.nav {
  display: flex;
  justify-content: center;
  padding: 14px 0;
  gap: 30px;
  font-size: 16px;
  font-weight: 500;
}

.nav a {
  color: #1f3f75;
  text-decoration: none;
  position: relative;
  padding: 5px 0;
  transition: color 0.3s ease;
}

.nav a::after {
  content: "";
  display: block;
  height: 2px;
  background: #4c6ef5;
  width: 0%;
  transition: width 0.3s ease;
  margin-top: 5px;
}

.nav a:hover {
  color: #4c6ef5;
}

.nav a:hover::after {
  width: 100%;
}


.article-section {
  background: #ffffff;
  padding: 2rem 1rem;
  font-family: "Segoe UI", sans-serif;
  color: #333;
  line-height: 1.6;
}
.article-container {
  max-width: 800px;
  margin: 0 auto;
}
.article-container h2 {
  font-size: 1.8rem;
  color: #0a4d8c;
  margin-bottom: 1rem;
}
.article-container h3 {
  font-size: 1.3rem;
  margin-top: 1.5rem;
  color: #0f5887;
}
.article-container p {
  margin: 1rem 0;
}
.article-container ul {
  margin: 1rem 0;
  padding-left: 1.2rem;
}
.article-container ul li {
  margin-bottom: 0.5rem;
  list-style: disc;
}

.research-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 2rem;
}

.research-table td,
.research-table th {
    border: 1px solid #ccc;
    padding: 10px;
    font-size: 15px;
}

.research-table th {
    background-color: #f5f5f5;
    text-align: left;
    font-weight: bold;
}

.research-section h3,
.research-section h4 {
    margin-top: 2rem;
}

.test-details {
  padding: 2rem 1rem;
  background: #fafafa;
  color: #333;
}

.test-details h2, .test-details h3 {
  color: #2c3e50;
  margin-top: 1.5rem;
}

.test-details ul {
  padding-left: 1.2rem;
  list-style-type: disc;
  margin-bottom: 1rem;
}

.ref-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
}

.ref-table th, .ref-table td {
  border: 1px solid #ccc;
  padding: 10px;
}

.ref-table th {
  background-color: #f0f0f0;
  font-weight: bold;
}

/* Мобильная адаптация */
@media (max-width: 600px) {
  .article-container {
    padding: 0 1rem;
  }
  .article-container h2 {
    font-size: 1.5rem;
  }
  .article-container h3 {
    font-size: 1.1rem;
  }
}

.footer {
  background-color: #1f3f75;
  color: #ffffff;
  padding: 40px 20px 0;
  font-size: 14px;
}

.footer-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  max-width: 1100px;
  margin: 0 auto;
  padding-bottom: 30px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.footer-logo {
  flex: 1 1 250px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.footer-logo img {
  width: 120px;
  margin-bottom: 10px;
}

.footer-logo p {
  line-height: 1.4;
}

.footer-nav,
.footer-contacts {
  flex: 1 1 200px;
  margin-top: 20px;
}

.footer-nav h4,
.footer-contacts h4 {
  margin-bottom: 10px;
  font-size: 16px;
  font-weight: 600;
}

.footer-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-nav ul li {
  margin-bottom: 8px;
}

.footer-nav ul li a {
  color: #ffffff;
  text-decoration: none;
  transition: color 0.3s;
}

.footer-nav ul li a:hover {
  color: #a2c0ff;
}

.footer-contacts p {
  margin: 6px 0;
}

.footer-bottom {
  text-align: center;
  padding: 20px 10px;
  font-size: 13px;
  color: #ccc;
}

/*Адаптация*/
@media (max-width: 768px) {
  /* Шапка */
  .header-top {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 15px;
  }

  .logo img {
    width: 80px;
  }

  .logo span {
    font-size: 16px;
  }

  .header-middle {
    text-align: left;
    font-size: 14px;
    padding: 10px 15px;
  }

  .nav {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 15px;
  }

  .nav a {
    font-size: 16px;
    display: block;
  }

  /* Блок "О нас" */
  .about-section .container {
    padding: 20px 15px;
  }

  /* Блок "График работы" */
  .schedule-section .table-wrapper {
    overflow-x: auto;
  }

  .schedule-section table {
    min-width: 700px; /* позволяет скроллить таблицу вбок */
  }

  /* Новости */
  .news-section .news-grid {
    flex-direction: column;
    gap: 20px;
  }

  /* Подвал */
  .footer-container {
    flex-direction: column;
    align-items: flex-start;
    padding: 20px 15px;
  }

  .footer-logo img {
    width: 90px;
  }

  .footer-nav, .footer-contacts {
    margin-top: 20px;
  }

  .footer-bottom {
    padding: 15px;
    text-align: left;
  }
}

/* Бургер-меню */
.burger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 5px;
  z-index: 1001;
}

.burger span {
  width: 25px;
  height: 3px;
  background-color: #333;
  transition: all 0.3s ease;
}

.nav-container {
  display: flex;
  justify-content: center;
  align-items: center;
}


@media (max-width: 768px) {
  .burger {
    display: flex;
  }

  .nav-container {
    display: none;
  }

  .nav-container.open {
    display: flex;
    flex-direction: column;
    /* и остальной стиль */
  }

  .burger.burger-active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

  .burger.burger-active span:nth-child(2) {
    opacity: 0;
  }

  .burger.burger-active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }

  .nav-container a {
    padding: 10px 0;
    border-bottom: 1px solid #ddd;
  }
}

/* Адаптив */
@media (max-width: 768px) {
  .header-top {
    flex-direction: column;
    align-items: flex-start;
    padding: 20px;
    gap: 15px;
  }

  .logo-block {
    flex-direction: row;
    align-items: center;
  }

  .org-name {
    font-size: 15px;
    line-height: 1.3;
    max-width: 200px;
  }

  .contact-info {
    font-size: 14px;
  }

  .register-button {
    align-self: stretch;
    justify-content: flex-start;
  }

  .burger {
    display: flex;
    position: absolute;
    top: 25px;
    right: 20px;
  }

  .nav-container {
    display: none;
  }

  .nav-container.open {
    display: flex;
    flex-direction: column;
    /* и остальной стиль */
  }

  .nav {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 15px 20px;
  }

  .nav a {
    font-size: 16px;
    padding: 8px 0;
  }
}

/* Кнопка "Наверх" */
#toTopBtn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  display: none;
  padding: 15px;
  background: linear-gradient(135deg, #4c6ef5 0%, #1f3f75 100%);
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  font-size: 18px;
  box-shadow: 0 4px 15px rgba(76, 110, 245, 0.3);
  transition: all 0.3s ease;
}

#toTopBtn:hover {
  background: linear-gradient(135deg, #3a5ce2 0%, #16306b 100%);
  box-shadow: 0 6px 20px rgba(76, 110, 245, 0.5);
  transform: translateY(-2px);
}

#toTopBtn:active {
  transform: translateY(0);
  box-shadow: 0 2px 10px rgba(76, 110, 245, 0.2);
}