:root {
    --bg-page: #f8f9fa;
    --bg-sidebar: #ffffff;
    --bg-card: #dedede;
    --bg-card-hover: #d2d2d2;
    --text-primary: #121212;
    --text-secondary: #5a5a5a;
    --accent-color: #8b1e24; /* Фірмовий бордовий відтінок логотипу */
    --border-color: #333333;
    --radius-lg: 16px;
    --radius-md: 12px;
    --sidebar-width: 280px;
    --autoplay-time: 5000ms;
  }
  
  * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
  }
  
  html {
    scroll-behavior: smooth;
  }
  
  body {
    font-family: "Noto Sans", sans-serif;
    background-color: var(--bg-page);
    color: var(--text-primary);
    line-height: 1.5;
  }
  .preloader {
	position: fixed;
	left: 0;
	top: 0;
	bottom: 0;
	right: 0;
	z-index: 10000;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	padding: 20px;
	transition: .3s all ease;
	pointer-events: none;
	backface-visibility: hidden;
}

.preloader::before, .preloader::after {
	content: '';
	position: absolute;
	top: 0;
	bottom: 0;
	transition: .2s linear;
	transform: translateX(0);
	pointer-events: none;
}

.preloader::before {
	left: 0;
	right: 50%;
	background: #ffffff;
}

.preloader::after {
	left: 50%;
	right: 0;
	background: #f8f8fb;
}

.preloader.loaded::before, .preloader.loaded::after {
	transition: .4s linear;
}

.preloader.loaded::before {
	transform: translateX(-100%);
}

.preloader.loaded::after {
	transform: translateX(100%);
}

.preloader.loaded .preloader-logo,
.preloader.loaded .preloader-body {
	opacity: 0;
	visibility: hidden;
	transition: 0s;
}

.preloader-logo,
.preloader-body {
	transition: 0s .2s;
}

.preloader-logo {
	position: relative;
	z-index: 10;
	transform: translate3d(0, -50%, 0);
	padding: 40px;
}

.preloader-body {
	position: absolute;
	top: 50%;
	transform: translate3d(0, -50%, 0);
	left: 0;
	right: 0;
	z-index: 10;
	text-align: center;
}

.cssload-container {
	width: 100%;
	height: 50px;
	text-align: center;
}

.cssload-speeding-wheel {
	width: 50px;
	height: 50px;
	margin: 0 auto;
	/*border: 3px solid #88A0F5;*/
	border: 3px solid #8B082D;
	border-radius: 50%;
	border-left-color: #e0e6ea;
	border-bottom-color: #e0e6ea;
	animation: cssload-spin .88s infinite linear;
}

@-webkit-keyframes cssload-spin {
	100% {
		transform: rotate(360deg);
	}
}

@keyframes cssload-spin {
	100% {
		transform: rotate(360deg);
	}
}
  
  /* ==========================================
     ГОЛОВНИЙ КАРКАС (SIDEBAR + MAIN)
     ========================================== */
  .app-layout {
    display: flex;
    min-height: 100vh;
  }
  
  /* Фіксована ліва колонка */
  .sidebar {
    width: var(--sidebar-width);
    flex-shrink: 0;
    background-color: var(--bg-sidebar);
    height: 100vh;
    position: sticky;
    top: 0;
    padding: 40px 28px;
    display: flex;
    flex-direction: column;
    gap: 64px;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.06);
    z-index: 100;
  }
  
  /* Стилізація блоку логотипу */
  .logo-link {
    text-decoration: none;
    display: inline-block;
  }
  
  .logo-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: var(--accent-color);
    font-weight: 700;
  }
  .sidebar__logo {
  text-align: center; /* Відцентровує логотип по горизонталі всередині сайдбару */
}

.logo-badge img {
  width: 150px;
  height: 100px;
  object-fit: contain; /* Запобігає спотворенню пропорцій, якщо оригінальне фото має інше співвідношення сторін */
}
  
    
  /* Меню навігації */
  .nav-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
  }
  
.nav-link {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
  border-radius: 8px; /* Заокруглення як на скриншоті */
  color: #121212;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
}
  
  .nav-link i {
    font-size: 1.35rem;
  }
  
/* Стан наведення (Hover) - блідо-рожевий фон, бордовий текст */
.nav-link:hover:not(.active) {
  background-color: #f7ecee; /* Ваш світлий відтінок */
  color: #8b1e24; /* Ваш бордовий колір */
}
  
  /* Активний стан: такий самий фон, як у "Галерея" за замовчуванням */
.nav-link.active {
  background-color: #8b1e24; 
  color: #ffffff;
  font-weight: 600;
}
  
  .nav-link.active i {
    color: #ffffff;
  }
  .mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--text-primary);
    cursor: pointer;
    padding: 4px;
}
  
  /* ==========================================
     ЦЕНТРАЛЬНА СКРОЛЕНА ОБЛАСТЬ
     ========================================== */
  .main-content {
    flex: 1;
    min-width: 0; /* Важливо для коректної роботи Swiper всередині Flex */
    padding: 24px 32px 64px;
    display: flex;
    flex-direction: column;
    gap: 48px;
  }
  
  .content-section {
    scroll-margin-top: 24px;
  }
  
  .section-header {
    margin-bottom: 20px;
  }
  
  .section-title {
    font-size: 1.75rem;
    font-weight: 700;
  }
  
  .section-subtitle {
    color: var(--text-secondary);
    font-size: 0.95rem;
  }
  
  /* ==========================================
     СЕКЦІЯ 1: EPIC GAMES STORE SLIDER
     ========================================== */

     .gallery-wrapper {
        display: flex;
        flex-direction: column;
        width: 100%;
        max-width: 100%; /* Прибираємо обмеження в 1200px */
        height: 100vh;
        max-height: 1000px;
        gap: 16px; /* Трохи збільшуємо відступ між слайдерами */
        box-sizing: border-box;
      }
  
      /* ГОЛОВНИЙ СЛАЙДЕР */
      .mySwiper {
        width: 100%;
        height: 75%; /* Займає 75% висоти контейнера на мобільному */
      }
  
      /* СЛАЙДЕР МІНІАТЮР */
      .mySwiper2 {
        width: 100%;
        height: 25%; /* Займає 25% висоти контейнера на мобільному */
      }
  
      swiper-slide {
        position: relative;
        text-align: center;
        font-size: 18px;
        background: #444;
        display: flex;
        justify-content: center;
        align-items: center;
      }
      .slide-caption {
        position: absolute;
        bottom: 0;
        left: 0;
        width: 100%;
        padding: 30px 40px;
        background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.5) 60%, rgba(0, 0, 0, 0) 100%);
        color: #ffffff;
        text-align: left;
        box-sizing: border-box;
        pointer-events: none; /* Щоб клік або свайп по тексту не блокував гортання слайдера */
}

.slide-caption h3 {
  font-size: 1.8rem;
  font-weight: 700;
  margin: 0 0 8px 0;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

.slide-caption p {
  font-size: 1rem;
  margin: 0;
  color: #e0e0e0;
  max-width: 80%; /* Щоб текст не розтягувався на всю ширину екрана */
}
  
      swiper-slide img {
        display: block;
        width: 100%;
        height: 100%;
        object-fit: cover;
      }
  
      .mySwiper2 swiper-slide {
        opacity: 0.4;
        cursor: pointer;
      }
  
      .mySwiper2 .swiper-slide-thumb-active {
        opacity: 1;
        border: 2px solid #fff;
        box-sizing: border-box;
      }
  
      /* АДАПТИВНІСТЬ ДЛЯ ДЕСКТОПІВ ТА ПЛАНШЕТІВ (від 768px) */
      @media (min-width: 768px) {
        .gallery-wrapper {
          flex-direction: row; 
          height: 650px; /* Для Full HD можна зробити слайдер трохи вищим */
        }
      
        .mySwiper {
          flex: 1; /* Головний слайдер автоматично займає весь вільний простір */
          min-width: 0; /* Критично важливо для коректної роботи Swiper всередині Flexbox */
          height: 100%;
        }
      
        .mySwiper2 {
          width: 280px; /* Фіксована ширина колонки мініатюр (можете налаштувати під себе) */
          flex-shrink: 0; /* Забороняємо колонці звужуватися */
          height: 100%;
        }
      }
 
    .cinema-video {
      position: relative;
      width: 100%;
      max-width: 1000px; /* Обмежуємо максимальну ширину, щоб на великих моніторах не було гігантським */
      margin: 0 auto; /* Центруємо блок */
      aspect-ratio: 16 / 9;
      border-radius: var(--radius-lg);
      overflow: hidden;
      box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15); /* Красива глибока тінь */
      border: 1px solid var(--border-color);
      background-color: #000;
      margin-top: 20px;
    }

    .cinema-video iframe {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      border: none;
    }


  /* ==========================================
     СЕКЦІЯ 2: КНИГА ПАМ'ЯТІ (BENTO GRID)
     ========================================== */
 
  
  /* ==========================================
     СЕКЦІЯ 3: МАПА
     ========================================== */
.map-controls {
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Група: поле вводу + кнопка */
.map-input-group {
  display: flex;
  gap: 12px;
  max-width: 600px; /* Обмежуємо ширину на великих екранах */
}

/* Стилізація поля вводу (Input) */
.map-input {
  flex: 1;
  padding: 12px 16px;
  border: 1px solid #d2d2d2;
  font-family: "Noto Sans", sans-serif;
  border-radius: 8px; /* Або var(--radius-md) */
  font-size: 1rem;
  color: var(--text-primary);
  background-color: #ffffff;
  outline: none;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.map-input::placeholder {
  color: #999999;
}

/* Ефект при кліку на поле (фокус) */
.map-input:focus {
  border-color: var(--accent-color);
  box-shadow: 0 0 0 4px rgba(139, 30, 36, 0.12); /* Напівпрозоре бордове світіння */
}

/* Стилізація кнопки */
.map-btn {
  padding: 12px 24px;
  background-color: var(--accent-color);
  color: #ffffff;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-family: "Noto Sans", sans-serif;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.2s ease, transform 0.1s ease;
}

.map-btn:hover {
  background-color: #72161b; /* Трохи темніший відтінок бордового при наведенні */
}

.map-btn:active {
  transform: translateY(2px); /* Ефект натискання */
}

/* Стилізація підказок (Hint) */
.map-hint {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.hint-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.hint-item i {
  color: var(--accent-color);
  font-size: 1.1rem;
}

/* Адаптивність для мобільних пристроїв */
@media (max-width: 600px) {
  .map-input-group {
    flex-direction: column;
  }
  
  .map-btn {
    width: 100%; /* Кнопка на всю ширину на телефонах */
  }
  
  .map-hint {
    flex-direction: column;
    gap: 8px;
  }
}

  .map-placeholder {
    height: 602px;
    background-color: var(--bg-card);
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: var(--text-secondary);
    margin-top: 50px;
  }

  
  /* ==========================================
     АДАПТИВНІСТЬ ДЛЯ ПЛАНШЕТІВ ТА МОБІЛЬНИХ
     ========================================== */
  @media (max-width: 1100px) {
    .egs-gallery {
      grid-template-columns: 1fr;
      height: auto;
    }
  
    .main-swiper {
      height: 400px;
    }
  
    .thumbs-swiper .swiper-wrapper {
      flex-direction: row;
    }
  
    .thumb-item {
      height: 80px !important;
    }
  }
  
  @media (max-width: 768px) {
    .app-layout {
      flex-direction: column;
    }
  
    .sidebar {
    width: 100%;
    height: auto;
    position: sticky;
    top: 0;
    padding: 16px 20px;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    z-index: 100;
  }

  /* Показуємо кнопку бургера поверх меню */
  .mobile-menu-btn {
    display: block;
    z-index: 102; 
  }

  /* Навігація перетворюється на бокову плашку справа */
  .sidebar__nav {
    position: fixed;
    top: 0;
    right: -300px; /* Ховаємо меню за правий край екрана */
    width: 260px;
    height: 100vh;
    background-color: var(--bg-sidebar);
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.1);
    padding: 125px 24px 24px; /* Відступ зверху, щоб текст не налізав на кнопку-хрестик */
    transition: right 0.3s ease-in-out;
    z-index: 101;
  }

  /* Клас, який додаватиме JS для виїзду меню */
  .sidebar__nav.open {
    right: 0;
  }

  /* Повертаємо вертикальне відображення пунктів меню */
  .nav-list {
    flex-direction: column;
    gap: 16px;
  }

  /* Повертаємо текст у пункти меню (скасовуємо display: none) */
  .nav-link span {
    display: inline-block !important;
  }
}
  }