/* === Загальні налаштування === */
html, body {
  margin: 0;
  padding: 0;
  font-family: 'Segoe UI', sans-serif;
  color: #D1D5DB;
  height: auto;
  overflow-x: hidden;
  overflow-y: auto;

  /* 🔁 Градієнт замість картинки */
  background: linear-gradient(to bottom, #0f172a, #1e293b, #334155, #0f172a);
  background-repeat: no-repeat;
  background-attachment: fixed;
  background-size: cover;
}

/* === Хедер === */
.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(-45deg, #0f172a, #1e293b, #334155, #0f172a);
  background-size: 600% 600%;
  animation: gradientShift 15s ease infinite;

  color: white;
  padding: 5px 20px;
  height: 40px;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.header-left {
  display: flex;
  align-items: center;
}

.logo {
  height: 40px;
  width: 40px;
  object-fit: cover;
  border-radius: 4px;
  margin-right: 10px;
}

.site-title {
  font-size: 18px;
  font-weight: bold;
}

.header-right .phone {
  font-size: 16px;
  padding: 0 30px;
  color: #D1D5DB;
  display: flex;
  align-items: center;
}

.header-right .phone svg {
  margin-right: 5px;
}

/* === Гамбургер (з десктопу приховано) === */
.hamburger {
  display: none;
}

/* === Меню === */
nav {
  position: fixed;
  top: 40px;
  left: 0;
  width: 100%;
  background: #0F2C44;
  z-index: 999;
}

nav ul {
  display: flex;
  justify-content: center;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 12px 0;
  gap: 40px;
}

nav a {
  color: #B0BEC5;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s;
}

nav a:hover {
  color: #60A5FA;
}

nav li.current-menu-item a {
  color: #60A5FA;
  font-weight: bold;
  border-bottom: 2px solid #60A5FA;
}

/* === Контейнер === */
.page-container {
  display: flex;
  margin-top: 80px;
  height: calc(100vh - 120px);
  overflow: hidden;
}

.left-fixed {
  flex-basis: 60%;
  background: url('/wp-content/themes/misterfix_final_theme/assets/images/background.jpg') no-repeat center center;
  background-size: cover;
  background-attachment: local;
}

/* === Слайдер у .left-fixed на головній === */
body.page-template-page-front .left-fixed {
  padding: 0;
  background: none !important;
  position: relative;
}

body.page-template-page-front .slider-wrapper {
  height: 100%;
  position: relative;
  overflow: hidden;
}

body.page-template-page-front .slider {
  height: 100%;
  display: flex;
  transition: transform 0.5s ease-in-out;
}

body.page-template-page-front .slider img {
  height: 100%;
  width: 100%;
  object-fit: cover;
  flex-shrink: 0;
}

body.page-template-page-front .slider-controls {
  position: absolute;
  top: 50%;
  width: 100%;
  display: flex;
  justify-content: space-between;
  transform: translateY(-50%);
  z-index: 10;
  pointer-events: none;
}

body.page-template-page-front .slider-controls button {
  background: rgba(0, 0, 0, 0.4);
  border: none;
  color: white;
  font-size: 28px;
  padding: 10px 16px;
  cursor: pointer;
  pointer-events: all;
}

.right-scrollable {
  flex-basis: 40%;
  background: #0A1C2E;
  overflow-y: auto;
  padding: 30px 40px;
  box-sizing: border-box;
  color: #D1D5DB;
  padding-bottom: 40px;
}

/* === Заголовки === */
h2 {
  color: #60A5FA;
  border-bottom: 2px solid #2A4066;
  padding-bottom: 5px;
  margin-bottom: 20px;
}

/* === Футер === */
footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: #0A1C2E;
  color: #9CA3AF;
  text-align: center;
  padding: 10px;
  font-size: 14px;
  z-index: 1000;
  height: 20px;
}

body.page-template-page-kontakty .left-fixed {
  padding: 0;
}

body.page-template-page-kontakty #map {
  width: 100%;
  height: 100%;
}

/* === Адаптація під мобільні === */
@media (max-width: 600px) {
  .site-header {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    height: 60px;
    padding: 5px 15px;
  }

  .header-left {
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .hamburger {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 18px;
    cursor: pointer;
    margin-left: auto;
    margin-right: 30px;
  }

  .hamburger span {
    background: white;
    height: 3px;
    width: 100%;
    border-radius: 2px;
  }

  .header-right {
    display: none;
  }

  nav {
    position: fixed;
    top: 60px;
    left: 0;
    width: 100%;
    max-height: 0; /* 🟡 Початково приховане */
    overflow: hidden;
    z-index: 9999;
    background: radial-gradient(circle at 30% 20%, rgba(96, 165, 250, 0.15), transparent 70%),
                radial-gradient(circle at 70% 60%, rgba(255, 255, 255, 0.05), transparent 80%),
                linear-gradient(to bottom, #0f172a, #1e293b 80%, #0f172a);
    transition: max-height 0.4s ease;
  }

  nav.active {
    max-height: 300px; /* 🟢 Показуємо при відкритті */
  }

  nav ul {
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    margin: 0;
  }

  .page-container {
    height: auto !important;
    overflow: visible !important;
    flex-direction: column;
  }

  .right-scrollable {
    width: 100%;
    height: auto;
    padding: 10px;
	order: 1;
    padding-bottom: 0;
  }

  .left-fixed {
    display: block;
    width: 100%;
    min-height: auto;
    height: auto;
    background: none;
    order: 2;
  }

  /* 🔧 Адаптація слайдера на мобільних */
  body.page-template-page-front .slider-wrapper {
    max-height: 40vh; /* або 50vh — регулюється */
    height: auto;
    position: relative;
    overflow: hidden;
  }

  body.page-template-page-front .slider {
    height: 100%;
    display: flex;
    transition: transform 0.5s ease-in-out;
  }

  body.page-template-page-front .slider img {
    max-height: 100%;
    height: auto;
    width: 100%;
    object-fit: cover;
  }
  
  /* Виправлення стрілок */
  body.page-template-page-front .slider-controls {
    position: absolute;
    left: 0;
    bottom: 20px; /* стрілки будуть 20px від нижнього краю */
    width: 100%;
    display: flex;
    justify-content: space-between;
    z-index: 10;
    pointer-events: none;
    padding: 0 10px;
  }

body.page-template-page-front .slider-controls button {
  pointer-events: all;
  background: rgba(0, 0, 0, 0.4);
  border: none;
  color: white;
  font-size: 22px;
  padding: 4px 6px; /* 🔻 менше фону */
  border-radius: 3px;
  cursor: pointer;
  line-height: 1;
}

/* 🔧 Додатково — зміщення правої стрілки на 5px */
body.page-template-page-front .slider-controls .next {
  margin-right: 20px;
}

  /* 🔧 Спеціальна правка для сторінки "Контакти" */
  body.page-template-page-kontakty .left-fixed {
    background: none !important;
    background-image: none !important;
    min-height: auto;
    padding: 0;
  }

  body.page-template-page-kontakty #map {
    width: 100%;
    height: 240px;
  }

  footer {
    padding: 15px 10px 15px 10px;
  }
}
