:root{
  --blue:#1f4fd8;
  --yellow:#f2c94c;
  --text:#1f2937;
  --muted:#41444a;
  --border:#e5e7eb;

  /* ЄДИНИЙ фон сторінки (регулюй тільки тут) */
  --page-bg: rgba(177, 185, 191, 0.22);
}

.header-title h3 { margin:0; font-size:16px; font-weight:600; }

*{ box-sizing:border-box; }

html, body{
  margin:0;
  padding:0;
  min-height:100%;
  background: var(--page-bg);
}

body{
  font-family: system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif;
  color: var(--text);
  line-height: 1.6;
}

a{ text-decoration:none; color:inherit; }

/* ---------- HEADER ---------- */
.site-header{
  position: sticky;
  top: 0;
  z-index: 1000;
  background: #E0E4E5;
  box-shadow: 0 8px 24px rgba(0,0,0,0.06);
}

.header-inner{
  max-width: 1200px;
  margin: 0 auto;
  padding: 12px 24px;
  display:flex;
  align-items:center;
  gap:16px;
}

.logo-img{ height:50px; width:auto; display:block; }

.header-icons{
  margin-left:auto;
  display:flex;
  gap:12px;
  background: #ffeeee1f;
  align-items:center;
}

.icon-link{
  width:36px;
  height:36px;
  border-radius:8px;
  border:1px solid var(--border);
  display:flex;
  align-items:center;
  justify-content:center;
  background:#fff0;
  transition: all .2s ease;
}

.icon-link img{ width:25px; height:25px; display:block; }

.icon-link:hover{
  background: #aef6b2;
  transform: translateY(-3px);
}

/* ---------- HERO ---------- */
.hero{
  position: relative;
  height: 250px;
  width: 100%;
  background-image: url("background.jpg"); /* рекомендую такий шлях */
  background-size: cover;
  background-position: center;
  display:flex;
  align-items:center;
}

.hero-overlay{
  position:absolute;
  inset:0;
  background: rgba(15,23,42,0.45);
}

.hero-content{
  position:relative;
  max-width:1200px;
  margin:0 auto;
  padding:0 24px;
  color:#fff;
}

/* ---------- MAIN ---------- */
main{
  width:100%;
  background: transparent;
  padding: 64px 24px;
  display:flex;
  flex-direction:column;
  gap:32px; /* трохи менше, щоб не було "дір" */
}

/* ВАЖЛИВО: ширина 100% + max-width */
.section,
.contact{
  width:100%;
  max-width:1200px;
  margin:0 auto;
}

/* секції як "картки" */
.section{
  background: rgba(255, 255, 253, 0.88);
  border-radius: 24px;
  padding: 32px;

  display:grid;
  grid-template-columns:1fr 1fr;
  gap:48px;
  align-items:center;
}

.section:nth-child(even){ direction: rtl; }
.section:nth-child(even) > *{ direction:ltr; }

.text-block p{ color: var(--muted); }

.media{ width:100%; }

.media-img{
  display:block;
  width:100%;
  height:auto;
  border-radius:16px;
  border:1px solid var(--border);
}

/* ---------- VIDEO CARD ---------- */
.media.clickable.video-preview{
  width:100%;
  padding:20px;
  display:flex;
  justify-content:center;
  align-items:center;
}

.media-video{
  width:100%;
  height:auto;
  border-radius:16px;
  border:1px solid var(--border);
}

/* ---------- CONTACT ---------- */
.contact{
  background:#fff;
  padding: 48px;
  border-radius:24px;
  border:1px solid var(--border);
}

.contact h2{
  margin-top:0;
  margin-bottom: 24px;
}

form{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:24px;
}

form input,
form textarea{
  width:100%;
  padding:12px 14px;
  border-radius:8px;
  border:1px solid var(--border);  /* межі точно будуть */
  background:#fff;                  /* щоб не було прозоро */
  color: var(--text);
  font-size:14px;
  outline: none;
}

form input:focus,
form textarea:focus{
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(31,79,216,0.15);
}

textarea{
  grid-column:1 / -1;
  min-height:120px;
  resize:vertical;
}

.form-actions{
  grid-column:1 / -1;
  display:flex;
  gap:16px;
  justify-content:flex-end;
}

.btn-reset{
  background:transparent;
  border:1px solid var(--border);
  padding:10px 16px;
  border-radius:8px;
}

.btn-submit{
  background: var(--yellow);
  border:none;
  padding:10px 20px;
  border-radius:8px;
  font-weight:600;
}

/* ---------- LIGHTBOX ---------- */
.media-img.clickable{ cursor: zoom-in; }

.lightbox{
  position:fixed;
  inset:0;
  background: rgba(15,23,42,0.85);
  display:none;
  align-items:center;
  justify-content:center;
  z-index:9999;
  padding:32px;
}

.lightbox.open{ display:flex; }

.lightbox-img{
  max-width:95vw;
  max-height:90vh;
  border-radius:12px;
  box-shadow:0 40px 120px rgba(0,0,0,.6);
  cursor:zoom-out;
  transition: transform .3s ease;
}

.lightbox-img:hover{ transform: scale(1.05); }

.lightbox-close{
  position:absolute;
  top:20px;
  right:28px;
  font-size:42px;
  color:#fff;
  cursor:pointer;
  user-select:none;
}

/* щоб кнопка "Надіслати" мала стан "відправляємо..." */
.btn-submit[disabled]{
  opacity: 0.65;
  cursor: not-allowed;
}

/* щоб повідомлення модалки/успіху виглядало акуратно, якщо захочеш додати */
.form-note{
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 14px;
}

/* ---------- SUBMIT LOADING STATE ---------- */
.btn-submit[disabled]{
  opacity: 0.65;
  cursor: not-allowed;
}

.btn-submit.is-loading{
  position: relative;
  padding-left: 42px; /* місце під спінер */
}

.btn-submit.is-loading::before{
  content: "";
  position: absolute;
  left: 14px;
  top: 50%;
  width: 16px;
  height: 16px;
  margin-top: -8px;
  border-radius: 50%;
  border: 2px solid rgba(0,0,0,0.25);
  border-top-color: rgba(0,0,0,0.75);
  animation: spin 0.8s linear infinite;
}

@keyframes spin{
  to { transform: rotate(360deg); }
}
.hp-field{
  position: absolute !important;
  left: -9999px !important;
  top: -9999px !important;
  height: 1px !important;
  width: 1px !important;
  opacity: 0 !important;
  pointer-events: none !important;
}
