/* ====== GLOBAL BASE ====== */
*,
*::before,
*::after { box-sizing: border-box; }

html, body { height: 100%; }

:root{
  --slider-width: 420px;   /* slider width on desktop */
  --side-margin: 24px;     /* page side padding */
  --safe-top: env(safe-area-inset-top);
  --safe-bottom: env(safe-area-inset-bottom);
}

body{
  min-height: 100svh;          /* корректнее, чем 100vh на мобилках */
  overflow-x: hidden;          /* без горизонтального скролла */
  -webkit-text-size-adjust: 100%;
  margin: 0;
  font-family: Arial, sans-serif;
}

img, video{
  max-width: 100%;
  height: auto;
  display: block;
}

/* ====== HEADER ====== */
.site-header {
  position: relative;
  width: 100%;
  min-height: 160px;           
  padding-top: max(0px, var(--safe-top));
  overflow: visible;           
}

.header-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.header-overlay {
  position: static;
  z-index: 10;
  padding: 10px;
}

/* Кнопка гамбургера */
.hamburger {
  background: transparent;
  border: none;
  font-size: 32px;
  color: white;
  cursor: pointer;
  position: relative;
  z-index: 31;  /* поверх всего */
}

/* overlay не должен быть позиционированным родителем */
.header-overlay { position: static; }

@media (max-width: 768px) {
  .site-header { min-height: 140px; }
  .hamburger { font-size: 28px; }
}

@media (max-width: 480px) {
  .site-header { min-height: 120px; }
  .hamburger { font-size: 26px; }
}

/* ====== SLIDING MENU ====== */
.menu {
  position: fixed;
  top: 0;
  left: -100%;
  width: 25%;
  height: 100%;
  background-color: rgba(0,0,0,0.95);
  padding: 30px 20px;
  transition: left 0.3s ease;
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.menu.show { left: 0; }

.menu-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(0,0,0,0.4);
  display: none;
  z-index: 15;
}
.menu-overlay.show { display: block; }

.menu ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.menu li {
  font-size: 20px;
  font-weight: bold;
  color: white;
  cursor: pointer;
  padding: 10px 0;
}

.menu li a {
  color: inherit;
  text-decoration: none;
  transition: color 0.3s;
}
.menu li a:hover { color: #00aaff; }

@media (max-width: 768px) {
  .menu { width: 60%; padding: 24px; }
  .menu li { font-size: 18px; padding: 12px 0; }
}

/* ====== PAGE LAYOUT ====== */
.page-wrap{
  max-width: 1200px;
  margin: 28px auto;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 100px;
  padding: 28px var(--side-margin);
  box-sizing: border-box;
}

.content-left {
  flex: 1 1 auto;
  min-width: 260px;
  color: #111;
  line-height: 1.6;
}

.content-right {
  flex: 0 0 var(--slider-width);
  max-width: var(--slider-width);
  min-width: 260px;
  margin-left: auto;
}

/* Слайдер */
.slider-box{
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 10px;
  box-shadow: 0 8px 28px rgba(0,0,0,0.22);
}

.slider-box .slide{
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 420ms ease;
  pointer-events: none;
}
.slider-box .slide.show{
  opacity: 1;
  z-index: 2;
}

.slider-box img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  user-select: none;
  -webkit-user-drag: none;
  background-color: transparent;
}

@media (max-width: 992px){
  .page-wrap{
    flex-direction: column;
    gap: 20px;
    padding: 18px var(--side-margin);
  }
  .content-left,
  .content-right{
    width: 100%;
    max-width: 100%;
    flex: 1 1 100%;
  }
}

@media (max-width:420px){
  :root{ --side-margin: 12px; --slider-width: 100%; }
  .page-wrap{ padding: 12px var(--side-margin); gap: 16px; }
  .content-left h2 { font-size: 1.5rem; }
  .content-left h3 { font-size: 1.2rem; }
}

/* ====== FOOTER ====== */
.site-footer{
  position: relative;
  width: 100%;
  min-height: 140px;
  padding-bottom: max(12px, env(safe-area-inset-bottom));
  overflow: visible;
}

.site-footer .footer-bg{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
  pointer-events: none;
}

.site-footer .footer-inner{
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 16px;
  padding: 16px 28px;
}

.site-footer .social-icons{
  display: flex;
  gap: 16px;
}
.site-footer .social-icons img{
  width: 32px;
  height: 32px;
  object-fit: contain;
  display: block;
}

@media (max-width: 768px){
  .site-footer .footer-inner{ padding: 12px 16px; gap: 12px; }
  .site-footer .social-icons img{ width: 28px; height: 28px; }
}
@media (max-width: 480px){
  .site-footer .social-icons img{ width: 24px; height: 24px; }
}

/* ====== COOKIE BANNER ====== */
#cookie-banner {
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  background-color: white;
  padding: 24px 36px;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
  z-index: 9999;
  text-align: center;
  display: none;
}

#cookie-banner p {
  margin-bottom: 16px;
  font-size: 16px;
  color: #111;
}

.cookie-buttons button {
  margin: 0 10px;
  padding: 8px 16px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
}

.cookie-buttons button#accept-cookies {
  background-color: #4CAF50; color: white;
}
.cookie-buttons button#decline-cookies {
  background-color: #f44336; color: white;
}

body.cookie-active > *:not(#cookie-banner) {
  filter: blur(3px);
  pointer-events: none;
}

body.menu-open { overflow: hidden; }
