@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600&display=swap');

/* === БАЗОВЫЕ СТИЛИ === */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Poppins', sans-serif;
  background-color: #f5f7fa;
  color: #333;
  line-height: 1.6;
}

a {
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
}

/* === ШАПКА === */
header {
  padding: 50px 20px;
  text-align: center;
  color: #fff;
  background: linear-gradient(135deg, #1e3a8a, #1d4ed8);
}

.header-content {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 30px;
  max-width: 800px;
  margin: 0 auto;
}

.header-content img {
  width: 130px;
  height: 130px;
  border-radius: 20px;
  border: 3px solid rgba(255, 255, 255, 0.2);
  object-fit: cover;
}

.header-text {
  text-align: left;
  flex: 1;
  min-width: 300px;
}

.header-text h1 {
  font-size: 2.25rem;
  margin: 0;
  color: #ffffff;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.header-text p {
  font-size: 1rem;
  margin-top: 6px;
  opacity: 0.9;
  color: #e2e8f0;
}

.header-links {
  margin-top: 15px;
}

.header-links a {
  display: inline-block;
  background: rgba(255, 255, 255, 0.15);
  padding: 8px 16px;
  margin-right: 10px;
  margin-bottom: 5px;
  border-radius: 8px;
  font-weight: 500;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.header-links a:hover {
  background: rgba(255, 255, 255, 0.25);
  box-shadow: 0 0 10px rgba(96, 165, 250, 0.5);
  transform: translateY(-2px);
}

/* Адаптивность для шапки */
@media (max-width: 768px) {
  .header-content {
    flex-direction: column;
    text-align: center;
  }

  .header-text {
    text-align: center; 
  }
  
  .header-links a {
    margin: 0 5px 10px 5px; 
  }
}

/* === НАВИГАЦИЯ === */
nav {
  background: #374151;
  text-align: center;
  padding: 12px 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  position: sticky;
  top: 0;
  z-index: 1000;
}

nav a {
  color: #f9fafb;
  margin: 0 15px;
  font-weight: 500;
  padding: 5px 0;
  display: inline-block;
}

nav a:hover {
  color: #60a5fa;
  text-shadow: 0 0 8px rgba(96, 165, 250, 0.3);
}

/* === ОСНОВНОЙ КОНТЕНТ === */
main {
  max-width: 1000px;
  margin: 50px auto;
  background: white;
  border-radius: 14px;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.08);
  padding: 40px;
  border: 1px solid #e5e7eb;
}

section {
  margin-bottom: 40px;
}

/* === ТИПОГРАФИЯ И ТЕКСТ === */
h2 {
  color: #1e40af;
  border-bottom: 2px solid #3b82f6;
  padding-bottom: 6px;
  margin-bottom: 1.5rem;
  font-size: 1.75rem;
}

h3 {
  color: #1e3a8a;
  border-left: 4px solid #3b82f6;
  padding-left: 12px;
  margin-top: 2.5rem;
  font-size: 1.4rem;
}

h4 {
  color: #1e3a8a;
  font-size: 1.2rem;
  margin-top: 0;
}

p {
  margin-bottom: 1.25rem;
}
.text-block {
  text-align: justify;
  line-height: 1.8;
}
.text-block p {
  text-indent: 30px;
  line-height: 1.8;
  text-align: justify; 
}

.text-block h3,
.text-block h4 {
  text-align: left; 
}

.text-block ol p,
.text-block ul p,
.text-block li p {
  text-indent: 0;
}

/* Блоки с фоном */
.block {
  background: #f8fafc;
  border-radius: 12px;
  padding: 20px;
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.02);
  margin-bottom: 20px;
  border: 1px solid #e5e7eb;
}

/* === О "СЕБЕ" (index.html) === */
.info-block {
  display: flex;
  align-items: flex-start;
  gap: 30px;
  flex-wrap: wrap;
}

.photo {
  flex-shrink: 0;
  width: 200px;
  height: 270px;
  border-radius: 14px;
  background: #e5e7eb url('photo.png') center/cover no-repeat;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
  border: 3px solid #e5e7eb;
}

.info-table {
  flex: 1;
  min-width: 260px;
}

.table {
  width: 100%;
  border-collapse: collapse;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.table th,
.table td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid #e5e7eb;
}

.table th {
  color: #1e40af;
  width: 180px;
  font-weight: 500;
  background-color: #f8fafc;
}

.video-circle-section {
  text-align: center;
}

/* === ИНДИВИДУАЛЬНЫЙ РАЗДЕЛ (individual.html) === */
.image-container {
  display: flex;
  justify-content: center;
  margin: 40px 0;
  padding: 25px;
  background: rgba(248, 250, 252, 0.8);
  border-radius: 15px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
  border: 1px solid #e5e7eb;
  flex-direction: column; 
  align-items: center; 
}

.content-image {
  width: 100%;
  max-width: 800px;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  object-fit: cover;
  border: 1px solid #e5e7eb;
}

.content-image:hover {
  transform: translateY(-5px) scale(1.01);
  box-shadow: 0 15px 35px rgba(59, 130, 246, 0.15);
}

/* Стили для подписей рисунков */
.image-container figcaption {
  margin-top: 15px;
  font-style: italic;
  color: #6b7280;
  font-size: 15px;
  line-height: 1.4;
  text-align: center; 
  width: 100%; 
  max-width: 800px; 
}

.materials-list p {
  margin-bottom: 15px;
  padding-bottom: 15px;
  border-bottom: 1px dashed #d1d5db;
}

.materials-list p:last-child {
  border-bottom: none;
}

.material-link {
  display: block;
  padding: 8px 0;
}

.material-link:hover {
  color: #3b82f6;
  transform: translateX(5px);
}

.material-link strong {
  color: #1e3a8a;
}

.material-link:hover strong {
  color: #3b82f6;
}


/* === РЕФЕРАТ (referat.html) === */
.referat-title {
  text-align: center;
  color: #1e3a8a;
  margin-bottom: 30px;
  padding-bottom: 15px;
  border-bottom: 3px solid #3b82f6;
  font-size: 1.8rem;
}

/* Оглавление */
.toc-container {
  background: #f8fafc;
  border-radius: 12px;
  padding: 30px;
  margin: 30px 0 40px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  border: 1px solid #e5e7eb;
}

.toc-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: #1e3a8a;
  margin-bottom: 25px;
  padding-bottom: 15px;
  border-bottom: 2px solid #3b82f6;
  text-align: center;
}

.toc-list {
  list-style-type: none; 
  padding-left: 0; 
  margin: 0;
}

.toc-item {
  margin-bottom: 12px;
  padding: 8px 0;
  border-bottom: 1px dashed #ddd;
}

.toc-item:last-child {
  border-bottom: none;
}

.toc-link,
.toc-sublink {
  display: block; 
  transition: all 0.3s ease;
}

.toc-link {
  color: #374151;
  font-size: 1rem;
}

.toc-sublink {
  color: #6b7280;
  font-size: 0.95rem;
  padding-left: 20px; 
}

.toc-link:hover,
.toc-sublink:hover {
  color: #3b82f6;
  transform: translateX(5px);
}

.toc-subitem {
  margin-left: 0; 
  margin-top: 8px;
  list-style-type: none; 
  padding-left: 0;
}

/* Убираем стрелку для подпунктов */
.toc-sublink::before {
  display: none; 
}

.toc-link:hover,
.toc-sublink:hover {
  color: #3b82f6;
  transform: translateX(5px);
}


.toc-subitem {
  margin-left: 40px;
  margin-top: 8px;
  list-style-type: none;
}



/* Изображения в реферате */
.figure-container {
  margin: 40px 0;
  text-align: center;
}

.figure-caption {
  font-style: italic;
  color: #6b7280;
  margin-top: 10px;
  font-size: 0.9rem;
}

/* Сноски и источники */
.source-ref {
  color: #dc2626;
  font-weight: bold;
  font-size: 0.9em;
  vertical-align: super;
  line-height: 0;
  margin: 0 2px;
  text-decoration: none;
  cursor: pointer;
}

.source-ref:hover {
  text-decoration: underline;
  color: #b91c1c;
}

.sources-list {
  margin-top: 50px;
  padding-top: 20px;
  border-top: 2px solid #e5e7eb;
}

.gost-list {
  list-style-type: none;
  padding-left: 0;
  counter-reset: source-counter;
}

.source-item {
  counter-increment: source-counter;
  margin-bottom: 15px;
  color: #374151;
  font-size: 0.9rem;
  line-height: 1.6;
  padding-left: 2.5em;
  text-indent: -2.5em;
}

.source-item::before {
  content: "[" counter(source-counter) "] ";
  font-weight: bold;
  color: #1e40af;
  margin-right: 0.5em;
}

.source-item a {
  color: #3b82f6;
}

.source-item a:hover {
  text-decoration: underline;
}

/* === НАУЧНЫЕ ТРУДЫ (nauchnye_trudy.html) === */
.section-title {
  margin: 50px 0 30px;
  padding: 18px 25px;
  background: linear-gradient(135deg, #1e40af, #3b82f6);
  color: white;
  border-radius: 12px;
  text-align: center;
  font-size: 1.6rem;
  font-weight: 600;
  box-shadow: 0 6px 15px rgba(59, 130, 246, 0.2);
  position: relative;
  overflow: hidden;
  letter-spacing: 0.5px;
}

.section-title::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
  transition: 0.7s;
}

.section-title:hover::before {
  left: 100%;
}

.section-subtitle {
  font-size: 1rem;
  opacity: 0.9;
  margin-top: 8px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.9);
}

.card-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 35px;
  margin: 25px 0 60px;
}

.card {
  background: #f8fafc;
  border-radius: 14px;
  padding: 25px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.06);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
  border: 1px solid #e5e7eb;
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 30px rgba(59, 130, 246, 0.12);
}

.card h4 {
  color: #1e3a8a;
  line-height: 1.4;
  margin-bottom: 15px;
  font-weight: 600;
}

.card .authors {
  font-weight: 500;
  font-size: 0.9rem;
  color: #4b5563;
  margin-bottom: 15px;
  padding-bottom: 15px;
  border-bottom: 1px solid #d1d5db;
}

.card .source {
  font-size: 0.85rem;
  color: #6b7280;
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid #d1d5db;
  font-style: italic;
  line-height: 1.5;
}

.card p {
  color: #374151;
  line-height: 1.7;
  flex-grow: 1;
  margin-bottom: 20px;
  font-size: 0.95rem;
}

.card a {
  margin-top: auto;
  align-self: flex-start;
  color: #1e40af;
  font-weight: 600;
  padding: 10px 20px;
  background: rgba(59, 130, 246, 0.1);
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 140px;
  text-align: center;
  border: 1px solid rgba(59, 130, 246, 0.2);
}

.card a:hover {
  color: white;
  background: #3b82f6;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
  border-color: #3b82f6;
}

.card a::after {
  content: ' →';
  margin-left: 5px;
  transition: transform 0.3s ease;
}

.card a:hover::after {
  transform: translateX(3px);
}

/* === ФУТЕР === */
footer {
  background-color: #1f2937;
  color: white;
  text-align: center;
  padding: 25px 20px;
  margin-top: 50px;
}

.footer-btn {
  display: inline-block;
  margin: 0 10px;
  padding: 10px 24px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #f9fafb;
  font-weight: 500;
}

.footer-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  box-shadow: 0 0 10px rgba(96, 165, 250, 0.4);
  transform: translateY(-2px);
  color: white;
}

/* === СПИСКИ === */
ul,
ol {
  padding-left: 25px;
  color: #374151;
}

li {
  margin-bottom: 8px;
  line-height: 1.6;
}

/* === АДАПТИВНОСТЬ === */
@media (max-width: 768px) {
  .header-content {
    flex-direction: column;
    text-align: center;
  }

  .header-text {
    text-align: center;
  }

  main {
    padding: 25px;
    margin: 30px 15px;
  }

  .card-container {
    grid-template-columns: 1fr;
    gap: 25px;
  }

  .section-title {
    font-size: 1.4rem;
    padding: 15px;
  }

  .info-block {
    flex-direction: column;
    align-items: center;
  }

  .photo {
    width: 180px;
    height: 240px;
  }

  .table th,
  .table td {
    padding: 8px 10px;
    font-size: 0.95rem;
  }

  .table th {
    width: 120px;
  }

  .toc-container {
    padding: 20px;
  }

  .toc-subitem {
    margin-left: 20px;
  }
}

@media (max-width: 480px) {
  nav a {
    display: block;
    margin: 10px 0;
  }

  .header-text h1 {
    font-size: 1.8rem;
  }

  .card a {
    width: 100%;
    text-align: center;
  }

  .footer-btn {
    display: block;
    margin: 10px auto;
    max-width: 250px;
  }
}