/* src/styles/pages/landing.css */
/* === ЛЕНДИНГ === */
.landing-page {
  background: #f9fbfd;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* === ГЕРОЙ === */
.landing-header {
  background: linear-gradient(135deg, rgba(52, 152, 219, 0.01) 0%, rgba(44, 62, 80, 0.01) 100%),
              url('/hero-bg.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: white;
  min-height: 400px;
  padding: 40px 20px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  text-align: center;
  padding-bottom: 60px;
}

.landing-header h1,
.landing-header p {
  display: none;
}

.landing-buttons {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  z-index: 2;
  position: relative;
  width: 100%;
}

/* === КОНТЕНТ === */
.landing-content {
  max-width: 900px;
  margin: 40px auto;
  padding: 0 20px;
  flex: 1;
}

.landing-content h2 {
  color: #2c3e50;
  margin: 32px 0 16px;
  font-size: 1.8em;
}

.landing-content p {
  font-size: 1.1em;
  line-height: 1.6;
}

/* === ПРЕИМУЩЕСТВА === */
.hero-benefits {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  margin: 40px 0;
}

.benefit-card {
  background: white;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  transition: transform 0.3s, box-shadow 0.3s;
}
.benefit-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 16px rgba(0,0,0,0.08);
}

.benefit-icon {
  font-size: 2.2em;
  margin-bottom: 16px;
}

.benefit-card h3 {
  margin: 0 0 12px 0;
  color: #2c3e50;
  font-size: 1.3em;
}

.benefit-card p {
  color: #6c757d;
  line-height: 1.6;
}

/* === АУДИТОРИЯ === */
.who-it-is-for h2 {
  text-align: center;
  color: #2c3e50;
  font-size: 1.8em;
  margin-bottom: 24px;
}

.audience-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  max-width: 900px;
  margin: 0 auto;
}

.audience-item {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 16px;
  text-align: center;
  font-weight: 500;
  color: #2c3e50;
  transition: background 0.2s;
}
.audience-item:hover {
  background: #e9ecef;
}

/* === ПРЕВЬЮ КАРТЫ === */
.demo-preview {
  margin: 40px 0;
}

.demo-image {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s;
  cursor: zoom-in;
}

.demo-image:hover {
  transform: scale(1.02);
}

.image-caption {
  text-align: center;
  color: #7f8c8d;
  font-style: italic;
  margin-top: 8px;
  font-size: 0.95em;
}

/* === FAQ === */
.landing-faq {
  margin: 40px 0;
}

.landing-faq h2 {
  text-align: center;
  color: #2c3e50;
  font-size: 1.8em;
  margin-bottom: 24px;
}

.faq-item {
  background: #f8f9fa;
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 16px;
}

.faq-item h3 {
  margin: 0 0 8px 0;
  color: #2c3e50;
}

.faq-item p {
  margin: 0;
  color: #6c757d;
  line-height: 1.6;
}

/* === ССЫЛКА НА РЕЛИЗ-НОТЫ === */
.changelog-link {
  text-align: center;
  padding: 30px 20px;
  margin-top: 40px;
  border-top: 1px solid #ecf0f1;
}

.changelog-link p {
  margin: 0;
  font-size: 1.1rem;
  color: #7f8c8d;
}

.changelog-link a {
  color: #3498db;
  font-weight: 600;
  text-decoration: underline;
  transition: color 0.2s;
}

.changelog-link a:hover {
  color: #2980b9;
}

/* === КАРУСЕЛЬ 4 СЛАЙДА === */
.carousel-container {
  position: relative;
  max-width: 900px;
  margin: 40px auto;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.carousel-slide {
  display: flex;
  transition: transform 0.5s ease-in-out;
  width: 400%;
}

.carousel-label {
  font-weight: bold;
  color: #2c3e50;
  margin-bottom: 12px;
  font-size: 1.1em;
  display: inline-block;
  padding: 4px 12px;
  background: #f8f9fa;
  border-radius: 4px;
}

.carousel-image {
  width: 100%;
  max-width: 400px;
  height: auto;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s;
}

.carousel-image:hover {
  transform: scale(1.02);
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid #ddd;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  font-size: 1.2em;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: all 0.2s;
}

.carousel-btn:hover {
  background: #f0f0f0;
  transform: translateY(-50%) scale(1.1);
}

.carousel-btn.prev {
  left: 20px;
}

.carousel-btn.next {
  right: 20px;
}

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 20px 0;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ddd;
  cursor: pointer;
  transition: background 0.2s;
}

.dot.active {
  background: #3498db;
}

.carousel-caption {
  text-align: center;
  margin-top: 24px;
  padding: 20px;
  background: #f8f9fa;
  border-radius: 8px;
  font-size: 1.1em;
  line-height: 1.6;
  color: #34495e;
}

.carousel-caption strong {
  color: #2c3e50;
}

/* === МОДАЛЬНОЕ ОКНО ДЛЯ УВЕЛИЧЕНИЯ ФОТО === */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}

.modal.active {
  display: flex;
  opacity: 1;
  visibility: visible;
}

.modal-content {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px;
  max-width: calc(100vw - 40px);
  max-height: calc(100vh - 60px);
}

.modal-image {
  max-width: 100%;
  max-height: 85vh;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  cursor: zoom-out;
  object-fit: contain;
  transition: transform 0.3s;
}

.modal-image:hover {
  transform: scale(1.01);
}

.modal-close {
  position: absolute;
  top: -24px;
  right: -24px;
  font-size: 32px;
  color: white;
  background: none;
  border: none;
  cursor: pointer;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.5);
  transition: background 0.2s;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Адаптив для мобильных */
@media (max-width: 768px) {
  .landing-header {
    min-height: 350px;
    padding: 30px 20px;
    background-size: contain;
    background-position: center;
    background-color: #2c3e50;
  }

  .landing-buttons {
    flex-direction: column;
    gap: 12px;
  }

  .landing-buttons .btn-landing-primary,
  .landing-buttons .btn-landing-secondary {
    width: 100%;
    max-width: 300px;
  }
}

/* === КАРУСЕЛЬ: описание под изображением === */
.carousel-item {
  flex: 1;
  padding: 16px;
  background: white;
  border: 1px solid #eee;
  border-radius: 8px;
  margin: 0 8px;
  text-align: center;
}

.carousel-caption-text {
  font-size: 0.9rem;
  color: #6c757d;
  margin-top: 12px;
  line-height: 1.5;
  padding: 0 8px;
}

/* === Карта на лендинге === */
.landing-map-section {
  max-width: 1000px;
  width: 100%;
  margin: 40px auto 60px;
  padding: 0 20px;
  text-align: center;
}

.map-section-title {
  font-size: 2em;
  color: #2c3e50;
  margin-bottom: 12px;
}

.map-section-subtitle {
  color: #6c757d;
  font-size: 1.2em;
  margin-bottom: 24px;
}

.landing-map-container {
  position: relative;
  width: 100%;
}

.landing-map {
  height: 600px;
  width: 100%;
  border-radius: 16px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
  margin-bottom: 20px;
  z-index: 1;
}

/* Стилизация атрибуции карты (не убираем — лицензия требует) */
.leaflet-control-attribution {
  background: rgba(255, 255, 255, 0.7) !important;
  color: #7f8c8d !important;
  font-size: 0.85em !important;
  padding: 3px 6px !important;
  border-radius: 4px !important;
  box-shadow: none !important;
  max-width: 200px !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}
.leaflet-control-attribution a {
  color: #7f8c8d !important;
  text-decoration: none !important;
}
.leaflet-control-attribution:hover {
  background: rgba(255, 255, 255, 0.9) !important;
}

/* === Результат высоты — современный дизайн === */
.elevation-display {
  min-height: 40px;
  font-size: 1.15em;
  font-weight: 600;
  padding: 14px 20px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.9);
  transition: all 0.3s ease;
  margin-bottom: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(0, 0, 0, 0.05);
  text-align: center;
  color: #2c3e50;
}

.elevation-display.loading {
  color: #7f8c8d;
  background: rgba(248, 249, 250, 0.9);
  animation: pulse 1.5s ease-in-out infinite;
}

.elevation-display.success {
  color: #27ae60;
  background: rgba(232, 245, 233, 0.5);
  border: 1px solid rgba(39, 174, 96, 0.2);
  box-shadow: 0 2px 10px rgba(39, 174, 96, 0.1);
  animation: fadeIn 0.3s ease-out;
}

.elevation-display.error {
  color: #e74c3c;
  background: rgba(255, 235, 238, 0.95);
  border: 1px solid rgba(231, 76, 60, 0.2);
  box-shadow: 0 2px 10px rgba(231, 76, 60, 0.1);
}

/* === Кнопки слоёв карты === */
.map-layers {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.map-layer-btn {
  background: white;
  border: 2px solid #3498db;
  padding: 12px 24px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 1.05em;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  color: #3498db;
}

.map-layer-btn:hover {
  background: #f0f8ff;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.12);
}

.map-layer-btn.active {
  background: #3498db;
  color: white;
  box-shadow: 0 4px 10px rgba(52, 152, 219, 0.3);
}

.map-layer-btn.active:hover {
  background: #2980b9;
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(52, 152, 219, 0.4);
}

/* === Маркеры высоты с треугольником внизу === */
.elevation-marker-pin {
  position: relative;
  background: rgba(39, 174, 96, 0.85);
  color: white;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 16px;
  font-size: 15px;
  white-space: nowrap;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  min-width: 70px;
  text-align: center;
  transition: all 0.3s ease;
  z-index: 10;

  /* Добавляем черную обводку текста */
  text-shadow:
    -1px -1px 0 #000,
    1px -1px 0 #000,
    -1px 1px 0 #000,
    1px 1px 0 #000; /* черный контур вокруг букв */
}

/* Треугольник-указатель внизу */
.elevation-marker-pin::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-top: 10px solid rgba(39, 174, 96, 0.85);
  z-index: 1;
}

/* === Контейнер для баннера под картой === */
.banner-container {
  position: relative;
  height: 0;
  overflow: hidden;
  margin-top: 16px;
  transition: height 0.3s ease;
}

/* === Баннер под картой === */
.demo-banner {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  background: white;
  padding: 24px 32px;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  z-index: 100;
  max-width: 95%;
  width: 100%;
  text-align: center;
  border: 1px solid #e0e0e0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  opacity: 0;
  visibility: hidden;
}

.demo-banner.slide-up {
  opacity: 1;
  visibility: visible;
  animation: slideUp 0.4s ease-out forwards;
}

.demo-banner.slide-down {
  animation: slideDown 0.3s ease-out forwards;
}

/* Анимации */
@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

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

@keyframes slideUp {
  from {
    transform: translate(-50%, 20px);
    opacity: 0;
  }
  to {
    transform: translate(-50%, 0);
    opacity: 1;
  }
}

@keyframes slideDown {
  to {
    transform: translate(-50%, 20px);
    opacity: 0;
  }
}

.demo-banner-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  width: 100%;
  max-width: 500px;
}

.demo-banner-content p {
  margin: 0;
  font-size: 1.2em;
  color: #2c3e50;
  font-weight: 600;
  line-height: 1.5;
  text-align: center;
}

.demo-banner-close {
  font-size: 1.5em;
  cursor: pointer;
  color: #fff;
  transition: all 0.2s;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #27ae60;
  position: absolute;
  top: 12px;
  right: 12px;
  border: none;
  box-shadow: 0 2px 6px rgba(39, 174, 96, 0.3);
}

.demo-banner-close:hover {
  background: #219653;
  transform: scale(1.1);
  box-shadow: 0 4px 8px rgba(39, 174, 96, 0.4);
}

.demo-banner-close:active {
  transform: scale(0.95);
}

.demo-banner-link {
  background: #27ae60;
  color: white;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  padding: 12px 32px;
  border-radius: 8px;
  font-size: 1.1em;
  display: inline-block;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 6px rgba(39, 174, 96, 0.3);
}

.demo-banner-link:hover {
  background: #219653;
  transform: translateY(-2px);
  box-shadow: 0 6px 8px rgba(39, 174, 96, 0.4);
}

.demo-banner-link:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(39, 174, 96, 0.3);
}

/* === Блокировка кликов по карте при активном баннере === */
.map-click-disabled {
  pointer-events: none;
  opacity: 0.85;
  transition: opacity 0.2s;
}
.map-click-disabled .elevation-display {
  pointer-events: auto;
  opacity: 1;
}

/* === Региональные страницы === */
.region-facts {
  background: white;
  border-radius: 12px;
  padding: 24px;
  margin: 40px 0;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}
.region-facts h2 {
  color: #2c3e50;
  margin-top: 0;
  font-size: 1.8em;
}
.region-facts p {
  line-height: 1.7;
  color: #34495e;
}
.region-facts strong {
  color: #27ae60;
}

/* === Навигация по регионам === */
.regions-nav {
  margin: 60px 0 40px;
  text-align: center;
}
.regions-nav h3 {
  color: #2c3e50;
  font-size: 1.6em;
  margin-bottom: 24px;
}

.regions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  max-width: 900px;
  margin: 0 auto;
}

.region-card {
  display: block;
  background: #f8f9fa;
  border-radius: 10px;
  padding: 20px;
  text-decoration: none;
  color: #2c3e50;
  font-weight: 500;
  text-align: center;
  transition: all 0.2s;
  border: 1px solid #e9ecef;
}
.region-card:hover {
  background: #e3f2fd;
  transform: translateY(-2px);
  border-color: #3498db;
  color: #3498db;
}
.region-card-title {
  font-size: 1.1em;
}