body {
  margin: 0;
  font-family: 'Segoe UI', Tahoma, sans-serif;
  background: url('../images/bg.png') no-repeat center center fixed;
  background-size: cover;
  background-repeat: no-repeat;
  background-attachment: fixed;
  background-position: center;
  color: #fff;
  overflow-x: hidden;
}

header {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  background-color: rgba(20, 20, 30, 0.85);
  padding: 15px 30px;
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(8px);
}

.left-side {
  display: flex;
  align-items: center;
  gap: 30px;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.site-logo img {
  width: 40px;
  height: 40px;
}

.site-name {
  font-size: 20px;
  font-weight: bold;
}

.nav-buttons {
  display: flex;
  gap: 20px;
}

.nav-button {
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
  position: relative;
}

.nav-button:hover {
  background: linear-gradient(90deg, #ff1a1a, #ff4d4d, #cc0000, #ff1a1a);
  background-size: 300%;
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  animation: redPulse 2.5s linear infinite;
}

.nav-button-pro {
  background: linear-gradient(90deg, #ff1a1a, #ff4d4d, #cc0000, #ff1a1a);
  background-size: 300%;
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  animation: redPulse 2.5s linear infinite;
}

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

.language-select {
  display: flex;
  align-items: center;
  gap: 10px;
}

#lang-selector-top {
  background-color: rgba(30,30,40,0.9);
  border: 1px solid #ff1a1a;
  color: #fff;
  border-radius: 8px;
  padding: 5px 10px;
  font-size: 14px;
  cursor: pointer;
}

#lang-selector-top option {
  background-color: #20202a;
  color: #fff;
}

#lang-selector-top:focus {
  outline: none;
}

.center-copy {
  display: flex;
  justify-content: center;
  pointer-events: none;
}

.center-copy .copyright {
  font-size: 14px;
  color: #ccc;
  pointer-events: auto;
}

.main-wrapper {
  display: flex;
  justify-content: center;
  align-items: flex-start;  
  gap: 20px;
}

.sidebar.left-ads {
  position: fixed;
  top: 70px;
  left: 0;
  width: 16.302%;
  height: 92vh;
  z-index: 999;
  box-shadow: 0 0 20px rgba(0, 0, 0, 1);
}

.sidebar.right-ads {
  position: fixed;
  top: 70px;
  right: 0;
  width: 16.302%;
  height: 92vh;
  z-index: 999;
  box-shadow: 0 0 20px rgba(0, 0, 0, 1);
}

.ad-link {
  display: block;
  width: 100%;
  height: 100%;
  text-decoration: none;
  color: inherit;
}

.ad-block {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.ad-block img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ad-overlay-text {
  position: absolute;
  top: 30px;
  left: 0;
  width: 100%;
  padding: 0 12px;
  text-align: center;
  color: #fff;
  font-size: 18px;
  line-height: 1.4;
  text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.6);
}

.ad-subtitle {
  position: absolute;
  bottom: 30px;
  left: 0;
  width: 100%;
  padding: 0 12px;
  text-align: center;
  color: #fff;
  font-size: 20px;
  line-height: 1.3;
  text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.6);
}

.main-content {
  max-width: 62.5vw;
  width: 100%;
  margin: 0 auto;
}

.sections {
  display: flex;
  flex-direction: column;
  gap: 3.7037vh;
  padding: 40px 0;
}

.wide-section {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-size: cover;
  background-position: center;
  min-height: 280px;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 0 20px rgba(0, 0, 0, 1);
  transition: transform 0.3s ease;  
}

.section-content {
  z-index: 2;
  padding: 40px;
  color: #fff;
  max-width: 60%;
}

.section-content h2 {
  font-size: 2rem;
  margin-bottom: 10px;
}

.section-content p {
  font-size: 1.1rem;
  opacity: 0.9;
}

.section-overlay {
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  width: 100%;
  background: linear-gradient(to left, rgba(0, 0, 0, 1), rgba(0, 0, 0, 0.5), rgba(0,0,0,0.15), rgba(0,0,0,0));
  transition: all 0.8s ease;
  z-index: 1;
}

.wide-section:hover .section-overlay {
  transform: translateX(100%);
  opacity: 0;
}

/* ===== МОБІЛЬНА ОПТИМІЗАЦІЯ ===== */
@media (max-width: 830px) {
  body, .main-wrapper, .sections, .wide-section {
    width: 100vw;
    padding: 0 5%;
    margin: 0;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding-bottom: 30px;
  }

  .main-content {
    max-width: 100vw;
  }

  .main-wrapper {
    gap: 5vh;
    width: 100vw;
  }

  .sections {
    gap: 2vh;
    padding: 0;
    width: 100%;
  }

  .wide-section {
    width: 100%;
    min-height: auto;
    margin-bottom: 2vh;
    padding: 0 5%;
    box-sizing: border-box;
    flex-direction: column;
    justify-content: center;
  }

  .section-content {
    padding: 20px;
    max-width: 100%;
  }

  /* ===== Реклама ===== */
  .sidebar.left-ads,
  .sidebar.right-ads,
  .ad-block {
  width: 100%;       /* як у карток */
  height: 20vh;      /* висота банера */
  margin-bottom: 2vh; /* невеликий vertical gap як у карток */
  padding: 0 5%;     /* бокові відступи як у карток */
  box-sizing: border-box;
}

  .ad-block img {
    width: 100%;
    max-width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }

  .sidebar.left-ads,
  .sidebar.right-ads {
    position: relative;
    top: 0;
    left: 0;
    right: 0;
    box-shadow: none;
  }
  /* Ховаємо зайве */
  .center-copy,
  .language-select,
  .site-logo {
    display: none;
  }

  /* Верхня панель */
  header {
    width: 100vw;
    min-height: 50px;
    padding: 10px 0;
    background-color: rgba(20, 20, 30, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
  }

  header *:not(.center-copy):not(.language-select):not(.site-logo) {
    font-size: clamp(12px, 3vw, 18px);
  }
}

.bottom-panel {
  display: none; /* ❌ ховаємо на десктопі */
  width: 100vw;
  min-height: 60px;
  background-color: rgba(20, 20, 30, 0.95);
  position: fixed;
  bottom: 0;
  left: 0;
  z-index: 1000;
  padding: 0 10px;
  color: #fff;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.5);
  font-size: clamp(12px, 3vw, 16px);

  /* display: flex; <-- забираємо тут */
  justify-content: center;
  align-items: center;
}

.bottom-panel .panel-content {
  display: flex;
  justify-content: center;     
  align-items: center;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  gap: 10px;
}

.bottom-panel .panel-content .center-copy,
.bottom-panel .panel-content .language-select {
  display: flex;
  align-items: center;
  color: #fff;
}

.bottom-panel .language-select select {
  background-color: rgba(30,30,40,0.9);
  border: 1px solid #ff1a1a;
  color: #fff;
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
}

.bottom-panel .language-select select:hover {
  background-color: rgba(50,50,60,0.95);
}

.bottom-panel .language-select select:focus {
  outline: none;
}

.bottom-panel .language-select select option {
  background-color: #20202a;
  color: #fff;
}

/* Мобільна версія */
@media (max-width: 830px) {
  .bottom-panel {
    display: flex;  /* ✅ показуємо тільки на мобілках */
    justify-content: center;
    align-items: center;
    padding: 0 10px;
  }

  .bottom-panel .panel-content {
    gap: 11.62vw;
  }
}
