/* Все якорные элементы (заголовки с id) */
[id] {
  scroll-margin-top: 50px; 
}


/* Постер ППМИ-2026 */
.poster-section {
  width: 100%;
  height: 90vh; 
  display: flex;
  
  justify-content: center;
  align-items: center;
  overflow: hidden;
  margin-bottom: 0rem;
  position: relative;
  background:linear-gradient(to top, lab(100% 0.01 -0.01), hwb(199 3% 4%));
  background-color: #f9fafb; 
}

.poster-image {
  max-width: 100%;
  max-height: 90%;
  width: auto;
  height: auto;
  display: block;
  
  box-shadow: 1px 6px 12px lch(0% 0 0 / 0.644);
  transition: transform 0.3s ease;
  object-position: center 30%;
  border-radius: 1rem;
}
@media (max-width: 768px) {
  .poster-image {
    height: auto;
    max-height: none;
  }
}

.poster-image:hover {
  transform: scale(1.05);
}

/* Стили для слайдера */
.carousel {
  position: relative;
  overflow: hidden;
  height: 70vh;
  min-height: 500px;
  max-height: 700px;
}

.carousel-inner {
  display: flex;
  transition: transform 0.5s ease-in-out;
  height: 100%;
}

.carousel-item {
  min-width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
}

.carousel-controls {
  position: absolute;
  top: 50%;
  width: 100%;
  display: flex;
  justify-content: space-between;
  transform: translateY(-50%);
}

.carousel-control {
  background: rgba(0,0,0,0.5);
  color: white;
  border: none;
  padding: 10px 20px;
  cursor: pointer;
  font-size: 24px;
  transition: background 0.3s;
}

.carousel-control:hover {
  background: rgba(0,0,0,0.7);
}

.carousel-indicators {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
}

.carousel-indicator {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  cursor: pointer;
  transition: background 0.3s;
}

.carousel-indicator.active {
  background: white;
}

.carousel-play-pause {
  position: absolute;
  bottom: 20px;
  right: 20px;
  background: rgba(0,0,0,0.5);
  color: white;
  border: none;
  padding: 8px 12px;
  cursor: pointer;
  font-size: 20px;
  border-radius: 4px;
  transition: background 0.3s;
}

.carousel-play-pause:hover {
  background: rgba(0,0,0,0.7);
}

/* Унифицированные заголовки секций */
.section-title {
  color: #000;
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 2.25rem;
}

/* Стили для раздела "О программе" */
.section-about {
  background-color: #fff;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

@media (max-width: 768px) {
  .about-grid {
    grid-template-columns: 1fr;
  }
}

.about-grid h3 {
  font-size: 1.33rem;
  font-weight: 700;
  color: #000;
  margin-bottom: 1rem;
}

.about-grid p {
  color: #333;
  line-height: 1.6;
}

/* Стили для раздела "Календарный план" */
.timeline {
  background: linear-gradient(to bottom, #93c5fd, #ffffff);
  padding: 3rem 1rem;
  border-radius: 1rem;
}

.timeline h2 {
  color: #000;
  text-align: center;
  margin-bottom: 2rem;
}

.timeline-container {
  max-width: 1000px;
  margin: 0 auto;
  position: relative;
  padding: 2rem 0;
}

.timeline-container::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%); /* Точно по центру, с учётом ширины линии */
  width: 3px;
  background: #60a5fa;
  z-index: 0;
}

.timeline-item {
  position: relative;
  margin-bottom: 3rem;
  min-height: 80px;
  display: flex;
  align-items: center;
  gap: 2rem;
}

.timeline-item-left {
  flex-direction: row;
}

.timeline-item-right {
  flex-direction: row-reverse;
}

.timeline-number {
  width: 40px;
  height: 40px;
  background: #60a5fa;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 1.1rem;
  z-index: 2;
  border: 3px solid #ffffff;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  flex-shrink: 0;
  margin: 0 16px;
}

.timeline-content-wrapper {
  flex: 1 1 0%;
  color: rgb(255, 255, 255);
  padding: 0 1rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 350px; /* Ограничиваем ширину контента */
}

.timeline-item-left .timeline-content-wrapper {
  text-align: left;
  align-self: flex-start;
}

.timeline-item-right .timeline-content-wrapper {
  text-align: right;
  align-self: flex-start;
}

.timeline-date {
  font-weight: 700;
  font-size: 1.1rem;
  color: rgb(0, 0, 0);
  margin-bottom: 0.5rem;
}

.timeline-content {
  color: rgb(0, 0, 0);
  line-height: 1.6;
  display: flex;
  align-items: center;
  height: 100%;
}

.timeline-content p {
  color: rgb(0, 0, 0);
  margin: 0;
}

/* Стили для раздела "Документы" */
.documents-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(250px, 300px));
  gap: 1.5rem;
  justify-content: center;
}

@media (max-width: 768px) {
  .documents-grid {
    grid-template-columns: 1fr;
    max-width: 300px;
    margin: 0 auto;
  }
}

.document-card {
  background: linear-gradient(135deg, #4ade80, #38bdf8);
  color: white;
  padding: 1.5rem;
  border-radius: 1rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  transition: transform 0.3s;
  text-decoration: none;
  min-height: 140px;
}

.document-card:hover {
  transform: translateY(-5px);
  text-decoration: none;
  color: white;
}

.document-card h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

/* Стили для раздела "Часто задаваемые вопросы" */
.faq-item {
  border-bottom: 1px solid #e5e7eb;
  margin-bottom: 1rem;
}

.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  background: #f9fafb;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.3s;
}

.faq-question:hover {
  background: #f3f4f6;
}

.faq-answer {
  padding: 1rem;
  background: #fff;
  display: none;
  border-top: 1px solid #e5e7eb;
}

.faq-answer.show {
  display: block;
}

/* Стили для раздела "Контактные лица" */
.contacts-section {
  background-color: #e0e7ff;
  padding: 3rem 1rem;
}

.contacts-section h2 {
  color: #000;
  font-size: 2.5rem;
  text-align: center;
  margin-bottom: 3rem;
}

.contacts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  align-items: stretch;
}

.contact-card {
  background: white;
  padding: 2rem;
  border-radius: 1rem;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
}

.contact-avatar {
  width: 240px;
  height: 240px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 1rem;
  border: 4px solid #3b82f6;
  align-self: center;
}

.contact-name {
  font-size: 1.125rem;
  font-weight: 700;
  color: #000;
  margin-bottom: 0.5rem;
}

.contact-info {
  color: #333;
  line-height: 1.6;
  margin-top: 1rem;
  margin-bottom: 0;
}

.contact-districts {
  margin-top: 0.75rem;
}

.contact-info a {
  color: #0ea5e9;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
}

.contact-info a:hover {
  color: #0284c7;
  text-decoration: underline;
}

.contact-bottom {
  margin-top: 0;
  margin-bottom: 1rem;
}

.contact-large {
  margin-bottom: 0.5rem;
}

.contact-large a {
  color: #3b82f6;
  text-decoration: none;
  font-weight: normal;
  transition: color 0.3s ease;
}

.contact-large a:hover {
  color: #2563eb;
}

.contact-large a:visited {
  color: #9333ea;
}

.contact-large a:visited:hover {
  color: #7e22ce;
}

/* Стили для формы обратной связи в футере */
.footer-form {
  background: #1e293b;
  padding: 3rem 1rem;
  color: white;
}

.footer-form h3 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
}
.form-shifted {
  transform: translateX(25%);
}
/* Стили для левой части футера */
.footer-info {
  font-size: 1rem;
}

.footer-title {
  font-size: 1.5rem;
  font-weight: 700;
}

.footer-text {
  font-size: 1rem;
  font-weight: 400;
}

.footer-btn {
  display: inline-block;
  background: white;
  color: #1e40af;
  padding: 0.5rem 1rem;
  border-radius: 0.25rem;
  font-size: 1rem;
  font-weight: 400;
  text-decoration: none;
  transition: all 0.3s ease;
}

.footer-btn:hover {
  background: #f3f4f6;
  color: #1e3a8a;
  text-decoration: none;
}

.footer-form .form-group {
  margin-bottom: 1rem;
}

.footer-form label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
}

.footer-form input,
.footer-form textarea {
  width: 70%;
  padding: 0.5rem;
  border: none;
  border-radius: 0.5rem;
  background: #334155;
  color: white;
  font-size: 1rem;
}

.footer-form input::placeholder,
.footer-form textarea::placeholder {
  color: #94a3b8;
  font-size: 1rem;
}

.footer-form button {
  width: 33.33%;
  padding: 0.75rem;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  color: white;
  border: none;
  border-radius: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.footer-form button:hover {
  background: linear-gradient(135deg, #2563eb, #1e40af);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

/* Кнопка скачать каталог в стиле кнопки отправить */
.download-catalog-btn {
  display: inline-block;
  padding: 0.75rem 2rem;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  color: white;
  border: none;
  border-radius: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-decoration: none;
}

.download-catalog-btn:hover {
  background: linear-gradient(135deg, #2563eb, #1e40af);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
  color: white;
  text-decoration: none;
}

.footer-form .small-text {
  font-size: 0.75rem;
  color: #94a3b8;
  text-align: left;
  margin-top: 1rem;
}

/* Стили для кнопки "Задать вопрос" в хедере */
.ask-question-btn {
  background: #1e293b;
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s;
}

.ask-question-btn:hover {
  background: #334155;
}

/* Анимация иконки */
.theme-icon {
  transition: transform 0.3s ease;
}

.theme-icon.sun {
  transform: rotate(180deg);
}

/* Улучшенный вид кнопки переключения */
#themeToggle {
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.dark-theme #themeToggle {
  background-color: rgba(45, 55, 72, 0.8);
  border-color: rgba(255, 255, 255, 0.1);
}










/* Стили для темной темы */
.dark-theme {
  background-color: #1a202c;
  color: #e2e8f0;
}


/* Обязательно стилизуйте и html, и body — иначе могут быть "дырки" сверху/снизу */
.dark-theme,
.dark-theme body,
.dark-theme html {
  background-color: #1a202c !important;
  color: #e2e8f0 !important;
}

/* Дополнительно: чтобы фон не "съезжал", если контент короткий */
.dark-theme body {
  min-height: 100vh;
  margin: 0;
}


.dark-theme header {
  background-color: #2d3748;
  border-color: #4a5568;
  color: #e2e8f0;
}

.dark-theme header img[src*="FINCENTER_LOGO"] {
  background-color: #cbd5e0;
  padding: 0.1rem 0.1rem;
  border-radius: 0.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Кнопка "Задать вопрос" в хедере */
.dark-theme .ask-question-btn {
  background: #4a5568;
  color: white;
}

.dark-theme .ask-question-btn:hover {
  background: #718096;
}



/* Постер */
.dark-theme .poster-section {
  background: linear-gradient(to top, #1e293b, #1a1f2b);
}
.dark-theme .poster-image {
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}


/* Слайдер */
.dark-theme .carousel {
  background: #1e293b;
}
.dark-theme .carousel-control {
  background: rgba(0, 0, 0, 0.7);
  color: white;
}
.dark-theme .carousel-control:hover {
  background: rgba(0, 0, 0, 0.9);
}
.dark-theme .carousel-indicator {
  background: rgba(255, 255, 255, 0.3);
}
.dark-theme .carousel-indicator.active {
  background: white;
}
.dark-theme .carousel-play-pause {
  background: rgba(0, 0, 0, 0.7);
  color: white;
}

.dark-theme .section-title {
  color: #f8fafc;
}

.dark-theme .section-about {
  background-color: #2d3748;
}
.dark-theme .section-about h3 {
  color: #e2e8f0;
}
.dark-theme .section-about p {
  color: #cbd5e0;
}


/* Темная тема для секции календаря */
.dark-theme #plan {
  background-color: #1a202c;
}

/* Темная тема для результатов конкурсного отбора */
.dark-theme #results {
  background-color: #1a202c;
}

/* Темная тема для секции документов */
.dark-theme #docs {
  background-color: #1a202c;
}

/* Темная тема для секции FAQ */
.dark-theme #faq {
  background-color: #1a202c;
}

.dark-theme .timeline {
  background: linear-gradient(to bottom, #2d3748, #1e293b);
}
.dark-theme .timeline h2,
.dark-theme .timeline-date,
.dark-theme .timeline-content p {
  color: #e2e8f0;
}
.dark-theme .timeline-container::before {
  background: #4a5568;
}
.dark-theme .timeline-number {
  background: #3b82f6;
}

/* Документы */
.dark-theme .document-card {
  background: linear-gradient(135deg, #1d4ed8, #0891b2);
}
.dark-theme .document-card h3 {
  color: white;
}

/* Каталог ЦИГИ */
.dark-theme #catalog {
  background-color: #1a202c;
}

.dark-theme #catalog .section-title,
.dark-theme #catalog p {
  color: #e2e8f0;
}

/* Убедитесь, что ВСЕ элементы внутри #catalog в темной теме имеют темный фон */
.dark-theme #catalog * {
  background-color: inherit !important;
}

/* Или, если нужно гарантировать конкретный цвет для всех вложенных блоков: */
.dark-theme #catalog .faq-item,
.dark-theme #catalog .faq-question,
.dark-theme #catalog .faq-answer,
.dark-theme #catalog p,
.dark-theme #catalog div,
.dark-theme #catalog section {
  background-color: #1a202c !important;
  color: #e2e8f0 !important; /* для текста */
}


/* FAQ */
.dark-theme .faq-search input {
  background-color: #2d3748;
  border-color: #4a5568;
  color: #e2e8f0;
  caret-color: #60a5fa; /* цвет курсора */
}
.dark-theme .faq-search input::placeholder {
  color: hwb(215 78% 15%);
}
.dark-theme .faq-search input:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}
.dark-theme .faq-item {
  border-color: #4a5568;
}

.dark-theme .faq-question {
  background: #2d3748;
  color: #f8fafc;
  border-color: hwb(0 100% 0%);
}
.dark-theme .faq-question:hover {
  background: #4a5568;
}
.dark-theme .faq-answer {
  background: oklch(27.546% 0.03701 260.041);
  color: #cbd5e0;
  border-color: hsl(219, 21%, 31%);
}




/* Контакты */
.dark-theme .contacts-section {
  background-color: #1e293b;
}
.dark-theme .contact-card {
  background: #2d3748;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);

}
.dark-theme .contact-name {
  color: #f8fafc;
}
.dark-theme .contact-info {
  color: #cbd5e0;
}
.dark-theme .contact-large {
  color: #e2e8f0;
}
.dark-theme .contact-large a {
  color: #93c5fd;
}
.dark-theme .contact-large a:hover {
  color: #60a5fa;
}
/* Дополнительные стили для соцсетей */
.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  color: #60a5fa;
  transition: all 0.3s ease;
}



/* Футер */
.dark-theme .footer-form {
  background: #1a202c;
}
.dark-theme .footer-title {
  color: #f8fafc;
}
.dark-theme .footer-text {
  color: #cbd5e0;
}
.dark-theme .footer-text a {
  color: #93c5fd;
}
.dark-theme .footer-btn {
  background: #4a5568;
  color: white;
}
.dark-theme .footer-btn:hover {
  background: #718096;
}



/* Форма в футере */
.dark-theme .footer-form input,
.dark-theme .footer-form textarea {
  background: #2d3748;
  border-color: #4a5568;
  color: #f8fafc;
}
.dark-theme .footer-form input::placeholder,
.dark-theme .footer-form textarea::placeholder {
  color: #94a3b8;
}
.dark-theme .submit-btn {
  background: linear-gradient(135deg, #60a5fa, #3b82f6);
}
.dark-theme .submit-btn:hover {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
}

/* Кнопка "Наверх" */
.dark-theme #scrollToTop {
  background: #2d3748;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}
.dark-theme #scrollToTop:hover {
  background: #4a5568;
}

/* Прогресс-бар */
.dark-theme #scroll-progress {
  background: #60a5fa;
}




.social-link:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.1);
}

.dark-theme .social-link {
  background: rgba(255, 255, 255, 0.05);
  color: #93c5fd;
}

.dark-theme .social-link:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* Стили для мобильного меню */
.hamburger-lines .hamburger-line.active:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger-lines .hamburger-line.active:nth-child(2) {
  opacity: 0;
}

.hamburger-lines .hamburger-line.active:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -6px);
}

/* Кнопка "Наверх" */
#scrollToTop.show {
  opacity: 1;
  visibility: visible;
}

/* Анимации появления */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Стили для поиска FAQ */
.faq-search {
  margin-bottom: 2rem;
}

.faq-search input {
  width: 100%;
  max-width: 400px;
  padding: 0.75rem 1rem;
  border: 2px solid hwb(220 60% 27%);
  border-radius: 0.5rem;
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

.faq-search input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Улучшенная форма */
.form-group input,
.form-group textarea {
  transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
  border-color: #3b82f6;
}

.form-group.error input,
.form-group.error textarea {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.error-message {
  color: #ef4444;
  font-size: 0.875rem;
  margin-top: 0.25rem;
  display: none;
}

.form-group.error .error-message {
  display: block;
}

/* Анимация успешной отправки */
.form-success {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  padding: 1rem;
  border-radius: 0.5rem;
  margin-bottom: 1rem;
  text-align: center;
  opacity: 0;
  transform: translateY(-10px);
  transition: all 0.3s ease;
}

.form-success.show {
  opacity: 1;
  transform: translateY(0);
}

/* Улучшенные карточки контактов */
.contact-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.contact-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

/* Анимация загрузки */
.loading {
  position: relative;
  pointer-events: none;
}

.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid #ffffff;
  border-radius: 50%;
  border-top-color: transparent;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Улучшенная навигация */
.nav-link {
  position: relative;
  transition: color 0.3s ease;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: #3b82f6;
  transition: width 0.3s ease;
}

.nav-link:hover::after {
  width: 100%;
}

/* Дополнительные анимации для элементов */
.timeline-item,
.contact-card,
.document-card {
  animation: slideInUp 0.6s ease-out;
}

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

/* Улучшенная типографика */
h1, h2, h3, h4, h5, h6 {
  line-height: 1.2;
  letter-spacing: -0.025em;
}

p {
  line-height: 1.6;
}

/* Дополнительные утилиты */
.text-gradient {
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.glass-effect {
  backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Responsive улучшения */
@media (max-width: 640px) {
  .timeline-item {
    flex-direction: column !important;
    align-items: center;
    gap: 1rem;
  }
  
  .timeline-number {
    margin: 0;
    order: 1;
  }

  .timeline-content-wrapper {
    max-width: 100%;
    width: 100%;
    padding: 0;
    order: 2;
  }
  
  .timeline-item-left .timeline-content-wrapper,
  .timeline-item-right .timeline-content-wrapper {
    text-align: center;
    align-self: center;
  }
  
  .timeline-date {
    width: 100%;
    margin-bottom: 1rem;
  }

  .timeline-content {
    width: 100%;
  }
}