* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Roboto', sans-serif;
  background: linear-gradient(to bottom right, #f9faff, #e6f0ff);
  color: #222;
  overflow-x: hidden;
}

/* Заголовок */
header {
  background-color: #003366;
  color: white;
  padding: 25px 20px;
  animation: fadeIn 1s ease-in-out;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
  position: relative;
}

.header-container img,
header img {
  position: absolute;
  left: 20px;
  height: 80px; 
}

.header-container h1,
header h1 {
  margin: 0;
  font-size: 2rem;
  text-align: center;
}

/* Навігація */
nav {
  background-color: #00509e;
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  padding: 15px;
  animation: slideDown 1s ease;
  position: sticky;
  top: 0;
  z-index: 1000;
}

nav a {
  color: white;
  text-decoration: none;
  font-weight: bold;
  padding: 10px 20px;
  border-radius: 8px;
  background: #0074d9;
  transition: background 0.3s, transform 0.2s;
}

nav a:hover,
nav a.active {
  background: #339af0;
  transform: scale(1.05);
}

/* Контейнер */
.container {
  display: flex;
  gap: 20px;
  padding: 2rem;
  max-width: 1200px;
  margin: auto;
  flex-wrap: wrap;
}

/* Контент */
.main-content {
  max-width: 900px;
  margin: 2rem auto;
  padding: 2rem;
  background-color: #ffffff;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  border-radius: 12px;
  line-height: 1.8;
  font-size: 1.1rem;
  color: #333;
  font-family: 'Roboto', sans-serif;
  animation: fadeIn 0.8s ease-in-out;
}

.main-content h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: #2c3e50;
  text-align: center;
}

.main-content p {
  margin-bottom: 1.2rem;
  text-align: justify;
}

/* PDF список */
.pdf-list {
  flex: 1;
  max-width: 300px;
}

.pdf-list ul {
  list-style: none;
  padding: 0;
}

.pdf-list li {
  background: #e6f0ff;
  border-left: 5px solid #0074d9;
  margin-bottom: 12px;
  padding: 10px 15px;
  font-size: 1.1rem;
  border-radius: 6px;
  transition: background 0.3s;
}

.pdf-list li:hover {
  background: #d0e7ff;
}

.pdf-list a {
  color: #003366;
  text-decoration: none;
  display: block;
}

/* PDF перегляд */
.pdf-viewer {
  flex: 2;
  min-height: 90vh;
}

.pdf-viewer iframe {
  width: 100%;
  height: 100%;
  border: 1px solid #ccc;
  border-radius: 10px;
}

/* Кнопки */
.buttons {
  display: flex;
  flex-direction: column;
  gap: 15px;
  align-items: center;
}

.btn {
  background-color: #0059b3;
  color: white;
  padding: 12px 25px;
  text-decoration: none;
  border-radius: 8px;
  font-size: 1.1em;
  transition: background-color 0.3s ease;
}

.btn:hover {
  background-color: #003d80;
}

/* Підвал */
footer {
  background-color: #003366;
  color: white;
  text-align: center;
  padding: 15px;
  margin-top: 40px;
  font-size: 1rem;
}

/* Анімації */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideDown {
  from { transform: translateY(-20px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}

@keyframes fadeInUp {
  from { transform: translateY(20px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}

/* Адаптив */
@media (max-width: 768px) {
  header,
  .header-container {
    flex-direction: column;
    align-items: center;
  }

  .header-container img,
  header img {
    height: 60px; 
    position: static;
  }

  .header-container h1,
  header h1 {
    font-size: 1.6rem;
  }

  nav {
    gap: 15px;
    padding: 10px;
  }
  .main-content h2,
  .pdf-list h2 {
    font-size: 1.4rem;
  }

  .main-content p,
  .pdf-list li {
    font-size: 1rem;
  }

  .container {
    flex-direction: column;
  }

  .pdf-viewer {
    min-height: 500px;
  }
}
