:root {
  --primary-color: #6a11cb;
  --secondary-color: #2575fc;
  --gradient-primary: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
  --gradient-secondary: linear-gradient(135deg, #7303c0 0%, #ec38bc 100%);
  --dark-bg: #1e1e2e;
  --light-bg: #2d2d42;
  --card-bg: #2a2a40;
  --text-color: #ffffff;
  --text-light: rgba(255, 255, 255, 0.8);
  --border-radius: 12px;
  --menu-width: 250px;
  --header-height: 0px;
}

/* Общие стили */
body {
  background-color: var(--dark-bg);
  color: var(--text-color);
  font-family: 'Roboto', Arial, sans-serif;
  overflow-x: hidden;
  margin: 0;
  padding: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Стили для основного контейнера */
.page-container {
  display: flex;
  flex: 1;
  min-height: 100vh;
}

/* Боковое меню */
.sidebar {
  width: var(--menu-width);
  background-color: var(--light-bg);
  height: 100vh;
  position: fixed;
  left: 0;
  top: 0;
  z-index: 1000;
  transition: all 0.3s ease;
  box-shadow: 5px 0 15px rgba(0, 0, 0, 0.1);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.sidebar-header {
  display: flex;
  align-items: center;
  padding: 20px;
  background: var(--gradient-primary);
}

.sidebar-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.sidebar-logo img {
  height: 40px;
  width: auto;
  margin-right: 10px;
}

.sidebar-logo span {
  color: var(--text-color);
  font-size: 1.5rem;
  font-weight: bold;
}

.sidebar-content {
  padding: 20px 0;
  flex-grow: 1;
}

.sidebar-nav {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-nav-item {
  margin-bottom: 5px;
}

.sidebar-nav-link {
  display: flex;
  align-items: center;
  padding: 12px 20px;
  color: var(--text-light);
  text-decoration: none;
  transition: all 0.3s ease;
  border-left: 3px solid transparent;
}

.sidebar-nav-link i {
  margin-right: 10px;
  font-size: 1.2rem;
}

.sidebar-nav-link:hover, 
.sidebar-nav-link.active {
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--text-color);
  border-left-color: var(--secondary-color);
}

/* Контактная информация в боковом меню */
.sidebar-contacts {
  padding: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: auto;
}

.sidebar-contacts-title {
  color: var(--text-color);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 15px;
}

.sidebar-contact-item {
  display: flex;
  align-items: center;
  margin-bottom: 12px;
}

.sidebar-contact-icon {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 12px;
  flex-shrink: 0;
}

.sidebar-contact-icon i {
  font-size: 0.9rem;
  color: var(--text-color);
}

.sidebar-contact-text {
  color: var(--text-light);
  font-size: 0.9rem;
}

/* Языковое переключение */
.language-switcher {
  padding: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: auto;
}

.language-button {
  background-color: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--text-light);
  padding: 5px 10px;
  margin-right: 5px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.language-button:hover, 
.language-button.active {
  background-color: var(--secondary-color);
  color: var(--text-color);
  border-color: var(--secondary-color);
}

/* Мобильный header */
.mobile-header {
  display: none;
  position: relative;
  height: 60px;
  background: var(--gradient-primary);
  z-index: 100;
  margin-bottom: 20px;
  border-radius: var(--border-radius);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.mobile-header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100%;
  padding: 0 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.mobile-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.mobile-logo img {
  height: 35px;
  width: auto;
}

.mobile-menu-btn {
  background-color: rgba(255, 255, 255, 0.1);
  width: 45px;
  height: 45px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.3);
  color: var(--text-color);
  font-size: 1.3rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.mobile-menu-btn:hover,
.mobile-menu-btn:active {
  background-color: rgba(255, 255, 255, 0.2);
  transform: scale(0.95);
}

.mobile-menu-btn * {
  pointer-events: none;
}

/* Основной контент */
.main-content {
  flex: 1;
  margin-left: var(--menu-width);
  padding: 20px;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.content-wrapper {
  flex: 1 0 auto;
}

/* Hero секция */
.hero-section {
  background: var(--gradient-secondary);
  border-radius: var(--border-radius);
  padding: 40px;
  margin-bottom: 30px;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 70%);
  animation: rotate 20s linear infinite;
  z-index: 1;
}

@keyframes rotate {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--text-color);
}

.hero-subtitle {
  font-size: 1.2rem;
  margin-bottom: 30px;
  color: var(--text-light);
}

.hero-button {
  background-color: var(--text-color);
  color: var(--primary-color);
  border: none;
  padding: 12px 30px;
  border-radius: 30px;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.hero-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

/* Анимированная волна для Hero-секции */
.hero-wave {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 60px;
  background: url('/assets/images/wave.svg');
  background-size: 1000px 100%;
  animation: waveAnimation 20s linear infinite;
  z-index: 1;
}

.hero-wave:before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 60px;
  background: url('/assets/images/wave.svg');
  background-size: 1000px 100%;
  opacity: 0.3;
  animation: wave-reverse 15s linear infinite;
  z-index: 1;
}

.hero-wave:after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 60px;
  background: url('/assets/images/wave.svg');
  background-size: 1000px 100%;
  opacity: 0.6;
  animation-delay: -5s;
  animation: wave-reverse 18s linear infinite;
  z-index: 1;
}

@keyframes waveAnimation {
  0% {
    background-position-x: 0;
  }
  100% {
    background-position-x: 1000px;
  }
}

@keyframes wave-reverse {
  0% {
    background-position-x: 1000px;
  }
  100% {
    background-position-x: 0;
  }
}

/* Карточки функций */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 25px;
  margin-bottom: 30px;
}

.feature-card {
  background-color: var(--card-bg);
  border-radius: var(--border-radius);
  padding: 25px;
  box-shadow: 8px 8px 16px rgba(0, 0, 0, 0.2),
              -8px -8px 16px rgba(255, 255, 255, 0.05);
  transition: all 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-5px);
}

.feature-card-title {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 15px;
  color: var(--text-color);
}

.feature-card-content {
  color: var(--text-light);
  font-size: 0.95rem;
  line-height: 1.6;
}

.feature-card-icon {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 15px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.feature-card-icon i {
  font-size: 1.5rem;
  color: var(--text-color);
}

/* Секция Эволюция телевидения */
.evolution-section {
  margin: 40px 0;
  padding: 0;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: 400px;
}

.evolution-title {
  text-align: center;
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 60px;
  color: var(--text-color);
}

.timeline {
  position: relative;
  width: 100%;
  height: 100%;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  margin-bottom: 50px;
}

/* Основная линия таймлайна */
.timeline::after {
  content: '';
  position: absolute;
  width: 90%;
  height: 4px;
  background: var(--gradient-primary);
  top: 50%;
  left: 5%;
  transform: translateY(-50%);
  z-index: 1;
  border-radius: 2px;
  box-shadow: 0 0 15px rgba(106, 17, 203, 0.5);
  pointer-events: none;
}

.timeline-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  z-index: 2;
  width: 90%;
  margin: 0 auto;
}

.timeline-item {
  position: relative;
  background: var(--card-bg);
  width: 180px;
  min-height: 220px;
  padding: 15px;
  border-radius: var(--border-radius);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 0 10px;
  word-break: break-word;
  hyphens: auto;
}

.timeline-item:nth-child(odd) {
  margin-bottom: 150px;
}

.timeline-item:nth-child(even) {
  margin-top: 150px;
}

/* Вертикальные линии соединения */
.timeline-item::before {
  content: '';
  position: absolute;
  width: 4px;
  height: 75px;
  background: var(--gradient-primary);
  z-index: 1;
  border-radius: 2px;
  pointer-events: none;
}

.timeline-item:nth-child(odd)::before {
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
}

.timeline-item:nth-child(even)::before {
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
}

/* Точки соединения */
.timeline-item::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  background: var(--gradient-primary);
  border-radius: 50%;
  box-shadow: 0 0 15px rgba(106, 17, 203, 0.8);
  z-index: 2;
  pointer-events: none;
}

.timeline-item:nth-child(odd)::after {
  top: calc(100% + 75px);
  left: 50%;
  transform: translateX(-50%);
}

.timeline-item:nth-child(even)::after {
  bottom: calc(100% + 75px);
  left: 50%;
  transform: translateX(-50%);
}

/* Эффект наведения */
.timeline-item:hover {
  transform: scale(1.05);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
  z-index: 10;
}

.timeline-year {
  font-weight: 700;
  font-size: 1.2rem;
  margin-bottom: 15px;
  color: var(--text-color);
}

.timeline-icon {
  width: 70px;
  height: 70px;
  margin: 0 auto 15px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: var(--text-color);
  transition: all 0.3s ease;
}

.timeline-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-color);
  margin-bottom: 10px;
  line-height: 1.3;
}

.timeline-description {
  font-size: 0.85rem;
  color: var(--text-light);
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transition: all 0.3s ease;
}

.timeline-item:hover .timeline-description {
  opacity: 1;
  max-height: 100px;
}

.timeline-item:hover .timeline-icon {
  transform: scale(1.1);
  background: rgba(255, 255, 255, 0.2);
}

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

.fade-in {
  animation: fadeIn 0.5s ease forwards;
}

.fade-in-delay-1 {
  opacity: 0;
  animation: fadeIn 0.5s ease forwards;
  animation-delay: 0.1s;
}

.fade-in-delay-2 {
  opacity: 0;
  animation: fadeIn 0.5s ease forwards;
  animation-delay: 0.2s;
}

.fade-in-delay-3 {
  opacity: 0;
  animation: fadeIn 0.5s ease forwards;
  animation-delay: 0.3s;
}

.fade-in-delay-4 {
  opacity: 0;
  animation: fadeIn 0.5s ease forwards;
  animation-delay: 0.4s;
}

/* Анимация пульсации для HomeTV */
@keyframes gentlePulse {
  0% {
    box-shadow: 0 0 20px rgba(236, 56, 188, 0.6);
  }
  50% {
    box-shadow: 0 0 30px rgba(236, 56, 188, 0.8);
  }
  100% {
    box-shadow: 0 0 20px rgba(236, 56, 188, 0.6);
  }
}

/* ВАЖНО: Стили для карточки HomeTV - размещены после анимаций */
.timeline-item.hometv {
  background: linear-gradient(135deg, #7303c0 0%, #ec38bc 100%);
  transform: scale(1.15);
  box-shadow: 0 0 30px rgba(236, 56, 188, 0.8);
  z-index: 5;
  animation: gentlePulse 3s ease-in-out infinite, fadeIn 0.5s ease forwards 0.4s !important;
  opacity: 0; /* Начальное состояние для анимации */
}

.timeline-item.hometv .timeline-year {
  color: #fff;
  font-size: 1.4rem;
}

.timeline-item.hometv .timeline-title {
  color: #fff;
  font-size: 1.3rem;
}

.timeline-item.hometv .timeline-icon {
  background: rgba(255, 255, 255, 0.3);
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
}

.timeline-item.hometv .timeline-description {
  opacity: 1;
  max-height: 100px;
  color: rgba(255, 255, 255, 0.9);
}

/* Контактная карточка */
.contact-card {
  background-color: var(--card-bg);
  border-radius: var(--border-radius);
  padding: 20px;
  margin-bottom: 30px;
  box-shadow: 8px 8px 16px rgba(0, 0, 0, 0.2),
              -8px -8px 16px rgba(255, 255, 255, 0.05);
}

.contact-card-title {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 15px;
  color: var(--text-color);
  text-align: center;
}

.contact-info {
  margin-bottom: 15px;
}

.contact-info-item {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
}

.contact-info-icon {
  width: 35px;
  height: 35px;
  border-radius: 50%;
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 15px;
  flex-shrink: 0;
}

.contact-info-icon i {
  font-size: 1rem;
  color: var(--text-color);
}

.contact-info-text {
  color: var(--text-light);
  font-size: 0.9rem;
}

.contact-button {
  display: block;
  width: 100%;
  background: var(--gradient-secondary);
  color: var(--text-color);
  border: none;
  padding: 10px;
  border-radius: 30px;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.contact-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

/* Модальное окно */
.modal-content {
  background-color: var(--light-bg);
  color: var(--text-color);
  border-radius: var(--border-radius);
  border: none;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.modal-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 20px 25px;
}

.modal-header .btn-close {
  color: var(--text-color);
  opacity: 0.8;
  filter: invert(1);
}

.modal-title {
  color: var(--text-color);
  font-weight: 600;
}

.modal-body {
  padding: 25px;
}

.form-label {
  color: var(--text-light);
  font-weight: 500;
  margin-bottom: 8px;
}

.form-control {
  background-color: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--text-color);
  border-radius: 8px;
  padding: 10px 15px;
}

.form-control:focus {
  background-color: rgba(255, 255, 255, 0.15);
  border-color: var(--secondary-color);
  color: var(--text-color);
  box-shadow: 0 0 0 3px rgba(106, 17, 203, 0.25);
}

.form-select {
  background-color: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--text-color);
  border-radius: 8px;
  padding: 10px 15px;
}

.form-select:focus {
  background-color: rgba(255, 255, 255, 0.15);
  border-color: var(--secondary-color);
  color: var(--text-color);
  box-shadow: 0 0 0 3px rgba(106, 17, 203, 0.25);
}

.btn-primary {
  background: var(--gradient-primary);
  border: none;
  padding: 10px 20px;
  border-radius: 30px;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

/* Footer */
footer {
  background: linear-gradient(90deg, #232323, #2c2c2c);
  color: var(--text-color);
  padding: 15px 0;
  text-align: center;
  width: 100%;
  margin-top: auto;
}

.footer-brand {
  color: var(--primary-color);
  font-weight: bold;
  margin-right: 5px;
}

/* Адаптивность */
@media (max-width: 991px) {
  .sidebar {
    transform: translateX(-100%);
    box-shadow: none;
    position: fixed;
    top: 0;
    height: 100vh;
    z-index: 1000;
  }
  
  .sidebar.show {
    transform: translateX(0);
    box-shadow: 5px 0 15px rgba(0, 0, 0, 0.1);
  }
  
  .main-content {
    margin-left: 0;
    padding-top: 20px;
  }
  
  .mobile-header {
    display: block;
    margin: 20px 15px;
    width: calc(100% - 30px);
  }
  
  .hero-title {
    font-size: 2rem;
  }
  
  .hero-subtitle {
    font-size: 1rem;
  }
  
  .feature-grid {
    grid-template-columns: 1fr;
  }
  
  /* Адаптивность для таймлайна на мобильных */
  .evolution-title {
    font-size: 2rem;
    margin-bottom: 40px;
  }
  
  .timeline-container {
    flex-direction: column;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    gap: 40px;
  }
  
  .timeline::after {
    width: 4px;
    height: 90%;
    left: 50%;
    top: 5%;
    transform: translateX(-50%);
  }
  
  .timeline-item {
    width: 220px;
    min-height: 180px;
    margin: 0;
  }
  
  .timeline-item:nth-child(odd),
  .timeline-item:nth-child(even) {
    margin: 0;
  }
  
  .timeline-item::before {
    width: 75px;
    height: 4px;
    top: 50%;
    transform: translateY(-50%);
  }
  
  .timeline-item:nth-child(odd)::before {
    left: -75px;
    top: 50%;
    transform: translateY(-50%);
  }
  
  .timeline-item:nth-child(even)::before {
    right: -75px;
    left: auto;
    top: 50%;
    bottom: auto;
    transform: translateY(-50%);
  }
  
  .timeline-item::after {
    top: 50%;
    transform: translateY(-50%);
  }
  
  .timeline-item:nth-child(odd)::after {
    left: -85px;
    top: 50%;
    transform: translateY(-50%);
  }
  
  .timeline-item:nth-child(even)::after {
    right: -85px;
    left: auto;
    top: 50%;
    bottom: auto;
    transform: translateY(-50%);
  }
  
  .timeline-item:nth-child(odd) {
    align-self: flex-end;
  }
  
  .timeline-item:nth-child(even) {
    align-self: flex-start;
  }
  
  /* Обеспечиваем видимость HomeTV карточки на мобильных */
  .timeline-item.hometv {
    background: linear-gradient(135deg, #7303c0 0%, #ec38bc 100%);
    transform: scale(1.15);
    z-index: 100 !important;
  }
}

@media (max-width: 576px) {
  .hero-section {
    padding: 30px 20px;
  }
  
  .hero-title {
    font-size: 1.8rem;
  }
  
  .feature-card,
  .contact-card {
    padding: 20px;
  }
  
  .timeline-item {
    width: 180px;
    min-height: 170px;
  }
}
