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;
  border-radius: 0;
}

.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);
  box-sizing: border-box;
}

.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);
  box-sizing: border-box;
}

/* ====== QUAD SECTION (4 картки 2x2) ====== */
.quad-wrapper {
  width: 62.5vw;
  margin: 0 auto;
  padding: 40px 20px;
}

.quad-section {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2.77vh 1.56vw;
}

.info-card {
  position: relative;
  background-size: cover;
  background-position: center;
  border-radius: 20px;
  overflow: hidden;
  height: 40vh;
  display: flex;
  align-items: flex-end;
  transition: transform 0.3s ease, filter 0.3s ease;
  box-shadow: 0 0 20px rgba(0, 0, 0, 1);
  
  /* зробимо фото яскравішим */
  filter: brightness(1.2) contrast(1.1);
}

.info-card:hover {
  transform: scale(1.02);
  filter: brightness(1.35) contrast(1.15);
}

.card-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.card-content {
  position: relative;
  z-index: 2;
  padding: 25px;
  color: #fff;
}

.card-content h3 {
  font-size: 1.6rem;
  margin-bottom: 10px;
}

.card-content p {
  font-size: 1rem;
  opacity: 0.9;
}

.info-card-link {
  text-decoration: none;
  color: inherit;
}

/* PRO glowing effect */
.info-card.pro h3 {
  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;
}

/* ===== МОБІЛЬНА ОПТИМІЗАЦІЯ ===== */
@media (max-width: 830px) {
  /* Основна мобільна оптимізація */
  body, .main-wrapper, .quad-wrapper, .quad-section {
    width: 100vw;
    padding: 0 5%;
    margin: 0;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding-bottom: 30px;
  }

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

  .quad-wrapper {
    width: 100%;
    padding: 0 5%;
  }

  .quad-section {
    gap: 2vh;
    padding: 0;
    width: 100%;
  }

  /* ===== Картки info-card ===== */
  .info-card {
    width: 100%;
    height: auto;
    margin-bottom: 2vh;
    padding: 0 5%;
    box-sizing: border-box;
  }

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

  /* ===== Реклама ===== */
  .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;
  }
}
