/* ============================================
   main.css — БО Ірпінь. Відбудуємо рідні стіни
   irpin-vidbuduyemo.com.ua
   ============================================ */

:root {
  --blue:        #0057B7;
  --blue-dark:   #003a7a;
  --blue-mid:    #1a6fd4;
  --blue-deep:   #001a40;
  --yellow:      #FFD700;
  --yellow-warm: #e6a800;
  --yellow-light:#ffe566;
  --white:       #FAFAFA;
  --gray-light:  #f0f4f8;
  --gray:        #e2e8f0;
  --text:        #0f172a;
  --text-soft:   #475569;
  --text-muted:  #94a3b8;
  --radius-sm:   8px;
  --radius:      14px;
  --radius-lg:   22px;
  --shadow-sm:   0 1px 8px rgba(0,0,0,0.07);
  --shadow:      0 4px 24px rgba(0,0,0,0.10);
  --shadow-lg:   0 12px 48px rgba(0,0,0,0.14);
  --transition:  all 0.25s cubic-bezier(0.4,0,0.2,1);
  --max-w:       1140px;
  --nav-h:       68px;
}

*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }
html { scroll-behavior:smooth; font-size:16px; }
body {
  font-family: 'Nunito Sans', 'Segoe UI', sans-serif;
  background: var(--white);
  color: var(--text);
  overflow-x: hidden;
  line-height: 1.6;
}
img { max-width:100%; display:block; }
a { text-decoration:none; color:inherit; }
button { cursor:pointer; font-family:inherit; }
ul { list-style:none; }

/* ── TYPOGRAPHY ── */
h1,h2,h3,h4 {
  font-family: 'Playfair Display', Georgia, serif;
  line-height: 1.2;
}
.section-eyebrow {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 10px;
}
.section-title {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 900;
  color: var(--text);
  margin-bottom: 14px;
}
.section-divider {
  width: 52px; height: 4px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--blue), var(--yellow));
  margin-bottom: 40px;
}
.section-divider.light {
  background: linear-gradient(90deg, #fff, var(--yellow));
}

/* ── LAYOUT ── */
.container { max-width:var(--max-w); margin:0 auto; padding:0 24px; }
section { padding: 88px 0; }
section.tight { padding: 56px 0; }

/* ── BUTTONS ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 0.88rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 14px 32px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  border: 2px solid transparent;
  white-space: nowrap;
}
.btn-primary {
  background: var(--yellow);
  color: var(--blue-dark);
  box-shadow: 0 4px 20px rgba(255,215,0,0.35);
}
.btn-primary:hover {
  background: var(--yellow-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(255,215,0,0.45);
}
.btn-outline {
  border-color: rgba(255,255,255,0.55);
  color: white;
}
.btn-outline:hover {
  background: rgba(255,255,255,0.1);
  border-color: white;
  transform: translateY(-2px);
}
.btn-blue {
  background: var(--blue);
  color: white;
  box-shadow: 0 4px 16px rgba(0,87,183,0.3);
}
.btn-blue:hover {
  background: var(--blue-dark);
  transform: translateY(-2px);
}

/* ── CARD BASE ── */
.card {
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

/* ── FADE ANIMATIONS ── */
.fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
.fade-up.visible { opacity:1; transform:translateY(0); }
.fade-up.delay-1 { transition-delay:0.1s; }
.fade-up.delay-2 { transition-delay:0.2s; }
.fade-up.delay-3 { transition-delay:0.3s; }
.fade-up.delay-4 { transition-delay:0.4s; }

@keyframes fadeDown {
  from { opacity:0; transform:translateY(-20px); }
  to   { opacity:1; transform:translateY(0); }
}
@keyframes pulse {
  0%,100% { transform:scale(1); }
  50%      { transform:scale(1.05); }
}

/* ── SCROLL TO TOP ── */
#scrollTop {
  position: fixed;
  bottom: 28px; right: 28px;
  z-index: 150;
  width: 46px; height: 46px;
  background: var(--blue);
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 1.2rem;
  display: flex; align-items:center; justify-content:center;
  box-shadow: var(--shadow);
  opacity: 0; pointer-events:none;
  transition: var(--transition);
}
#scrollTop.show { opacity:1; pointer-events:auto; }
#scrollTop:hover { background:var(--blue-dark); transform:translateY(-3px); }

/* ── COPY BUTTON ── */
.copy-btn {
  width: 100%;
  background: var(--blue);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  padding: 12px 20px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-top: 16px;
  transition: var(--transition);
}
.copy-btn:hover { background:var(--blue-dark); }
.copy-btn.copied { background:#16a34a; }

/* ── MONOBANK BUTTON ── */
.mono-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg,#f5a623,var(--yellow-warm));
  color: white;
  border-radius: var(--radius-sm);
  padding: 13px 20px;
  font-weight: 700;
  font-size: 0.88rem;
  margin-top: 14px;
  transition: var(--transition);
  box-shadow: 0 4px 14px rgba(230,137,10,0.3);
}
.mono-btn:hover { transform:translateY(-2px); box-shadow:0 8px 24px rgba(230,137,10,0.4); }
.mono-btn.disabled {
  background: var(--gray);
  color: var(--text-muted);
  box-shadow: none;
  pointer-events: none;
}

/* ── PROGRESS BAR ── */
#readProgress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--blue), var(--yellow));
  z-index: 9999;
  transition: width 0.1s linear;
}

/* ── SEARCH OVERLAY ── */
.search-overlay {
  position: fixed; inset:0;
  z-index: 500;
  background: rgba(0,20,60,0.88);
  backdrop-filter: blur(8px);
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding-top: 120px;
}
.search-overlay.open { display:flex; }
.search-wrap {
  width: 90%; max-width: 620px;
  display: flex; flex-direction:column; gap:8px;
}
.search-box {
  background: white;
  border-radius: var(--radius);
  padding: 10px 18px;
  display: flex; align-items:center; gap:10px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.35);
}
.search-box input {
  border:none; outline:none;
  font-size: 1.1rem; flex:1;
  font-family: inherit;
  color: var(--text);
  padding: 8px 0;
}
.search-box .close-search {
  background:none; border:none;
  color:var(--text-muted); font-size:1.3rem;
  padding:4px; transition:var(--transition);
}
.search-box .close-search:hover { color:var(--text); }
.search-results {
  background: white;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  display: none;
}
.search-results.show { display:block; }
.search-result-item {
  padding: 14px 20px;
  border-bottom: 1px solid var(--gray-light);
  cursor: pointer;
  transition: var(--transition);
}
.search-result-item:last-child { border-bottom:none; }
.search-result-item:hover { background:var(--gray-light); }
.search-result-item strong {
  display:block;
  color:var(--blue);
  font-size:0.88rem;
  margin-bottom:2px;
}
.search-result-item span { font-size:0.8rem; color:var(--text-soft); }

/* ── LIGHTBOX ── */
.lightbox {
  position: fixed; inset:0;
  z-index: 600;
  background: rgba(0,0,0,0.93);
  display: none;
  align-items: center;
  justify-content: center;
}
.lightbox.open { display:flex; }
.lightbox img {
  max-width: 90vw;
  max-height: 88vh;
  border-radius: var(--radius-sm);
  object-fit:contain;
}
.lightbox-close {
  position:absolute; top:20px; right:24px;
  color:white; font-size:2rem;
  background:none; border:none;
  line-height:1; opacity:0.75;
  transition:var(--transition);
}
.lightbox-close:hover { opacity:1; }

/* ── PARTNER BADGE ── */
.partner-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 50px;
  padding: 8px 18px 8px 10px;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.9);
  font-weight: 600;
}
.partner-badge img { height:28px; width:auto; }

/* ── COOKIE BANNER ── */
#cookieBanner {
  position: fixed;
  bottom: 0; left:0; right:0;
  z-index: 400;
  background: var(--blue-deep);
  color: rgba(255,255,255,0.85);
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 0.85rem;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.2);
  transform: translateY(100%);
  transition: transform 0.4s ease;
}
#cookieBanner.show { transform:translateY(0); }
#cookieBanner a { color:var(--yellow); text-decoration:underline; }
#cookieBanner button {
  background:var(--yellow);
  color:var(--blue-dark);
  border:none;
  border-radius:6px;
  padding:8px 20px;
  font-weight:700;
  font-size:0.82rem;
  white-space:nowrap;
}

/* ── RESPONSIVE ── */
@media(max-width:768px) {
  section { padding:60px 0; }
  .container { padding:0 16px; }
}
@media(max-width:480px) {
  section { padding:48px 0; }
  .btn { padding:12px 22px; font-size:0.82rem; }
}
