/* ГАРАНТ — общие стили сайта */
body {
    font-family: 'Manrope', sans-serif;
    scroll-behavior: smooth;
    background-color: #f8fafc;
    color: #0f172a;
    overflow-x: hidden;
}

/* Прелоадер (Удалена visibility для устранения некомбинированных анимаций) */
#preloader { transition: opacity 0.5s ease-out; }
.loader-spinner {
    border: 3px solid rgba(59, 130, 246, 0.2); border-left-color: #3b82f6; border-radius: 50%;
    width: 48px; height: 48px; animation: spin 1s linear infinite;
}
@keyframes spin { 100% { transform: rotate(360deg); } }

/* Навигация */
.glass-nav {
    background: rgba(255, 255, 255, 0.85); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}
.nav-link { position: relative; color: #475569; transition: color 0.3s; }
.nav-link:hover { color: #2563eb; }
.nav-link::after {
    content: ''; position: absolute; width: 0; height: 2px;
    bottom: -6px; left: 0; background-color: #3b82f6; transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.nav-link:hover::after { width: 100%; }

/* Компактная шапка (Sticky Header) */
.glass-nav.compact {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.1);
}
.glass-nav.compact .nav-container {
    height: 4rem; /* 64px */
}
@media (min-width: 768px) {
    .glass-nav.compact .nav-container {
        height: 4.5rem; /* 72px */
    }
}

/* Мобильное меню */
.mobile-menu-active { overflow: hidden; }
#mobile-menu { visibility: hidden; }
#mobile-menu.active { visibility: visible; transform: translateX(0); }
.mobile-link { position: relative; display: inline-block; }
.mobile-link::after {
    content: ''; position: absolute; width: 0; height: 3px;
    bottom: -4px; left: 0; background-color: #3b82f6; transition: width 0.3s;
}
.mobile-link:hover::after { width: 100%; }

/* 3D Карточки (Tilt effect) */
.tilt-card { transition: transform 0.1s linear, box-shadow 0.3s ease; transform-style: preserve-3d; }
.tilt-card-inner { transform: translateZ(30px); } 

/* Анимации появления */
.reveal {
    opacity: 0; transform: translateY(30px);
    transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1), transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.active { opacity: 1; transform: translateY(0); }
/* If JS fails, still show content */
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* Text Reveal Animation */
.text-reveal-wrapper { overflow: hidden; display: inline-block; vertical-align: top; }
.text-reveal {
    display: inline-block; transform: translateY(100%);
    transition: transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.active .text-reveal { transform: translateY(0); }

/* Градиенты и текст */
.hero-glow {
    background: radial-gradient(circle at 80% 20%, rgba(59, 130, 246, 0.08) 0%, transparent 40%),
                radial-gradient(circle at 20% 80%, rgba(139, 92, 246, 0.05) 0%, transparent 40%);
}
.text-gradient {
    background-clip: text; -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-image: linear-gradient(90deg, #2563eb, #7c3aed);
}

/* Эффект свечения для карточек */
.glow-effect {
    background: #ffffff; border: 1px solid rgba(0, 0, 0, 0.05); box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.05);
    position: relative; overflow: hidden;
}
.glow-effect::before {
    content: ''; position: absolute; top: var(--y, -100%); left: var(--x, -100%); width: 400px; height: 400px;
    background: radial-gradient(circle closest-side, rgba(59, 130, 246, 0.06), transparent);
    transform: translate(-50%, -50%); pointer-events: none; opacity: 0; transition: opacity 0.3s; z-index: 0;
}
.glow-effect:hover::before { opacity: 1; }

/* До/После */
.ba-slider { position: relative; overflow: hidden; border-radius: 2rem; cursor: ew-resize; }
.ba-after { position: absolute; top: 0; left: 0; width: 50%; height: 100%; overflow: hidden; border-right: 3px solid white; box-shadow: 5px 0 15px rgba(0,0,0,0.1); }
.ba-slider img { display: block; width: 100%; height: 500px; object-fit: cover; }
.ba-input { position: absolute; top: 0; left: 0; width: 100%; height: 100%; opacity: 0; z-index: 10; cursor: ew-resize; }

/* FAQ Аккордеон */
.faq-answer {
    max-height: 0; overflow: hidden; opacity: 0;
    transition: max-height 0.4s ease, margin-top 0.4s ease, opacity 0.4s ease;
}
.faq-item.faq-open .faq-answer { margin-top: 1rem; max-height: 300px; opacity: 1; }
.faq-item.faq-open .faq-icon { transform: rotate(180deg); }

/* Бегущая строка */
.hide-scrollbar::-webkit-scrollbar { display: none; }
.hide-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }
@keyframes marquee { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }
.animate-marquee { animation: marquee 35s linear infinite; }

/* Ошибки / успех JustValidate */
input.phone-mask,
input[type="text"],
input[type="tel"],
textarea {
  transition: border-color 0.25s ease, background-color 0.25s ease, box-shadow 0.25s ease, transform 0.2s ease;
}
.just-validate-error-label {
  color: #ef4444 !important;
  font-size: 0.75rem !important;
  margin-top: 0.35rem !important;
  padding-left: 0.35rem !important;
  font-style: italic;
  animation: garant-label-in 0.28s ease;
}
.just-validate-error-field {
  border-color: #ef4444 !important;
  background: #fef2f2 !important;
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.14) !important;
  animation: garant-field-pulse-error 0.45s ease;
}
.just-validate-success-field {
  border-color: #10b981 !important;
  background: #f0fdf4 !important;
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.14) !important;
  animation: garant-field-pulse-ok 0.4s ease;
}
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-6px); }
  40%, 80% { transform: translateX(6px); }
}
@keyframes garant-label-in {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes garant-field-pulse-error {
  0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.28); }
  100% { box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.14); }
}
@keyframes garant-field-pulse-ok {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.28); }
  100% { box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.14); }
}
.shake, .garant-field-shake { animation: shake 0.45s ease-in-out; }

/* Toast notifications */
.garant-toast-host {
  position: fixed;
  top: 1.25rem;
  right: 1.25rem;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: min(92vw, 380px);
  pointer-events: none;
}
.garant-toast {
  pointer-events: auto;
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 1rem 1rem 1rem 0.95rem;
  border-radius: 1.15rem;
  background: #fff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 22px 50px -20px rgba(15, 23, 42, 0.35);
  opacity: 0;
  transform: translateY(-12px) scale(0.98);
  transition: opacity 0.3s ease, transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.garant-toast.show { opacity: 1; transform: translateY(0) scale(1); }
.garant-toast.hide { opacity: 0; transform: translateY(-8px) scale(0.98); }
.garant-toast-icon {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  flex-shrink: 0;
  color: #fff;
}
.garant-toast-success .garant-toast-icon { background: #10b981; }
.garant-toast-error .garant-toast-icon { background: #ef4444; }
.garant-toast-body { flex: 1; min-width: 0; padding-top: 0.1rem; }
.garant-toast-title {
  font-weight: 900;
  font-size: 0.95rem;
  letter-spacing: -0.01em;
  color: #0f172a;
  margin-bottom: 0.2rem;
}
.garant-toast-text {
  font-size: 0.85rem;
  line-height: 1.4;
  color: #64748b;
  font-weight: 500;
}
.garant-toast-close {
  border: 0;
  background: #f1f5f9;
  color: #64748b;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 999px;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.2s ease, color 0.2s ease;
}
.garant-toast-close:hover { background: #e2e8f0; color: #0f172a; }
@media (max-width: 640px) {
  .garant-toast-host {
    top: auto;
    bottom: calc(5.5rem + env(safe-area-inset-bottom));
    left: 1rem;
    right: 1rem;
    width: auto;
  }
}

/* Плавные модальные окна */
.modal-overlay { opacity: 0; visibility: hidden; transition: opacity 0.3s ease, visibility 0.3s ease; }
.modal-overlay.active { opacity: 1; visibility: visible; }
.modal-content { opacity: 0; transform: scale(0.95) translateY(10px); transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1); }
.modal-overlay.active .modal-content { opacity: 1; transform: scale(1) translateY(0); }
.modal-content-scroll::-webkit-scrollbar { width: 4px; }
.modal-content-scroll::-webkit-scrollbar-thumb { background-color: #cbd5e1; border-radius: 4px; }

/* FAB (Плавающая кнопка) */
.fab-container { padding-top: 20px; padding-left: 20px; }
.fab-container:hover .fab-menu { opacity: 1; transform: translateY(0); pointer-events: auto; }
.fab-menu { padding-bottom: 16px; }
.fab-menu-item { transform: translateY(15px) scale(0.8); transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1); }
.fab-container:hover .fab-menu-item { transform: translateY(0) scale(1); }
.fab-container:hover .fab-menu-item:nth-child(1) { transition-delay: 0.15s; }
.fab-container:hover .fab-menu-item:nth-child(2) { transition-delay: 0.1s; }
.fab-container:hover .fab-menu-item:nth-child(3) { transition-delay: 0.05s; }
.fab-container:hover .fab-menu-item:nth-child(4) { transition-delay: 0s; }

/* Кастомный чекбокс */
.custom-checkbox {
    appearance: none; background-color: #fff; margin: 0; font-size: inherit; color: currentColor;
    width: 1.25em; height: 1.25em; border: 2px solid #cbd5e1; border-radius: 0.3em;
    display: grid; place-content: center; cursor: pointer; transition: all 0.2s ease; flex-shrink: 0;
}
.custom-checkbox::before {
    content: ""; width: 0.7em; height: 0.7em; transform: scale(0); transition: 120ms transform ease-in-out;
    box-shadow: inset 1em 1em white; background-color: white; transform-origin: center;
    clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%);
}
.custom-checkbox:checked { background-color: #3b82f6; border-color: #3b82f6; }
.custom-checkbox:checked::before { transform: scale(1); }
.custom-checkbox.just-validate-error-field,
.custom-checkbox.just-validate-success-field {
  background: #fff !important;
  box-shadow: none !important;
  animation: none !important;
  transform: none !important;
}
.custom-checkbox.just-validate-error-field {
  border-color: #ef4444 !important;
  outline: 2px solid rgba(239, 68, 68, 0.25);
  outline-offset: 2px;
}
.custom-checkbox.just-validate-success-field {
  border-color: #3b82f6 !important;
}
.garant-policy-field { display: block; }
.garant-policy-row {
  display: flex;
  align-items: flex-start;
  gap: 0;
}
.garant-policy-error .just-validate-error-label,
.garant-policy-field > .just-validate-error-label {
  display: block !important;
  width: 100%;
  margin: 0.45rem 0 0 1.85rem !important;
  padding-left: 0 !important;
}

.calc-item input:checked + label { border-color: #3b82f6; background-color: #eff6ff; box-shadow: 0 4px 15px rgba(59, 130, 246, 0.15); }

/* Квиз (Quiz) */
.quiz-option { transition: all 0.3s ease; }
.quiz-option.selected { 
    border-color: #3b82f6; 
    background-color: #eff6ff; 
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.15); 
}
.quiz-step { display: none; opacity: 0; transition: opacity 0.4s ease; }
.quiz-step.active { display: block; opacity: 1; }

.garant-honeypot {
    position: absolute !important; left: -9999px !important; width: 1px !important; height: 1px !important;
    opacity: 0 !important; pointer-events: none !important;
}
.site-credit a { color: #94a3b8; text-decoration: underline; text-underline-offset: 3px; }
.site-credit a:hover { color: #fff; }


/* Social contact buttons */
.social-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  padding: 0.9rem 1.25rem;
  border-radius: 0.95rem;
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.01em;
  transition: transform 0.2s ease, background 0.25s ease, color 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  border: 1px solid transparent;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
  text-decoration: none;
  line-height: 1;
}
.social-btn:hover { transform: translateY(-2px); }
.social-btn:active { transform: translateY(0); }
.social-btn svg, .social-btn i { flex-shrink: 0; }
.social-btn-wa { background: rgba(37,211,102,0.1); color: #25D366; border-color: rgba(37,211,102,0.3); }
.social-btn-wa:hover { background: #25D366; color: #fff; box-shadow: 0 10px 24px rgba(37,211,102,0.28); }
.social-btn-tg { background: rgba(0,136,204,0.1); color: #0088cc; border-color: rgba(0,136,204,0.3); }
.social-btn-tg:hover { background: #0088cc; color: #fff; box-shadow: 0 10px 24px rgba(0,136,204,0.28); }
.social-btn-vk { background: rgba(0,119,255,0.1); color: #0077FF; border-color: rgba(0,119,255,0.3); }
.social-btn-vk:hover { background: #0077FF; color: #fff; box-shadow: 0 10px 24px rgba(0,119,255,0.28); }
.social-btn-max { background: linear-gradient(135deg, rgba(0,194,255,0.12), rgba(123,44,191,0.18)); color: #fff; border-color: rgba(255,255,255,0.14); }
.social-btn-max:hover { background: linear-gradient(135deg, #00C2FF, #7B2CBF); color: #fff; box-shadow: 0 10px 24px rgba(123,44,191,0.35); }
.social-btn-master { background: rgba(148,163,184,0.12); color: #cbd5e1; border-color: rgba(148,163,184,0.25); }
.social-btn-master:hover { background: #64748b; color: #fff; box-shadow: 0 10px 24px rgba(100,116,139,0.28); }
@media (max-width: 640px) {
  .social-btn { padding: 0.8rem 1rem; font-size: 0.82rem; gap: 0.5rem; }
}

.garant-honeypot {
  position: absolute !important; left: -9999px !important; width: 1px !important; height: 1px !important;
  opacity: 0 !important; pointer-events: none !important;
}
.garant-spinner {
  width: 1rem; height: 1rem; border-radius: 999px;
  border: 2px solid rgba(255,255,255,0.35); border-top-color: #fff;
  display: inline-block; animation: spin 0.8s linear infinite;
}
.garant-form-success {
  display: flex; gap: 0.85rem; align-items: flex-start;
  background: #ecfdf5; border: 1px solid #a7f3d0; color: #065f46;
  border-radius: 1rem; padding: 0.9rem 1rem; margin-bottom: 1rem;
  opacity: 0; transform: translateY(-6px); transition: all 0.35s ease;
}
.garant-form-success.show { opacity: 1; transform: translateY(0); }
.garant-form-success-icon {
  width: 2rem; height: 2rem; border-radius: 999px; background: #10b981; color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 800; flex-shrink: 0;
}
.site-credit a { color: #94a3b8; text-decoration: underline; text-underline-offset: 3px; }
.site-credit a:hover { color: #fff; }
.has-mobile-cta { padding-bottom: 5.5rem; }
@media (min-width: 640px) {
  .has-mobile-cta { padding-bottom: 0; }
  .mobile-sticky-cta { display: none !important; }
}
.mobile-sticky-cta {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 45;
  padding: 0.75rem 1rem calc(0.75rem + env(safe-area-inset-bottom));
  background: rgba(255,255,255,0.92); backdrop-filter: blur(16px);
  border-top: 1px solid rgba(15,23,42,0.06);
  box-shadow: 0 -10px 30px rgba(15,23,42,0.08);
}
@media (max-width: 640px) {
  .fab-container { bottom: 5.5rem !important; right: 1rem !important; }
  #scrollTopBtn { bottom: 5.5rem !important; left: 1rem !important; width: 3rem; height: 3rem; }
  .hero-title-mobile { font-size: 2.35rem !important; line-height: 1.1 !important; }
  section.py-24, section.py-32 { padding-top: 4rem !important; padding-bottom: 4rem !important; }
}

/* Landing premium layout */
.landing-hero-media {
  border-radius: 2rem;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 4 / 5;
  max-height: 620px;
  border: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow: 0 30px 60px -30px rgba(15, 23, 42, 0.35);
  position: relative;
  z-index: 10;
}
@media (min-width: 640px) {
  .landing-hero-media { border-radius: 2.5rem; }
}
.landing-benefit-card {
  position: relative;
  overflow: hidden;
  border-radius: 1.75rem;
  padding: 1.5rem 1.35rem 1.6rem;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}
.landing-benefit-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px -20px rgba(37, 99, 235, 0.25);
}
.landing-benefit-icon {
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #2563eb;
  background: #eff6ff;
  border: 1px solid #dbeafe;
  transition: background 0.3s ease, color 0.3s ease, transform 0.3s ease;
}
.landing-benefit-card:hover .landing-benefit-icon {
  background: #2563eb;
  color: #fff;
  transform: scale(1.06);
}
.landing-benefit-bar {
  margin-top: auto;
  height: 3px;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #60a5fa, #2563eb);
  transition: width 0.45s ease;
}
.landing-benefit-card:hover .landing-benefit-bar { width: 3rem; }
.landing-about-accent {
  position: relative;
  padding-left: 1.25rem;
  border-left: 3px solid #2563eb;
}
.landing-about-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1rem;
  border-radius: 999px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  font-size: 0.8rem;
  font-weight: 700;
  color: #334155;
  transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}
.landing-about-chip:hover {
  border-color: #bfdbfe;
  background: #eff6ff;
  transform: translateY(-1px);
}
.landing-price-panel {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 2rem;
  padding: 1.75rem 1.5rem 1.5rem;
  box-shadow: 0 24px 50px -28px rgba(15, 23, 42, 0.22);
}
@media (min-width: 640px) {
  .landing-price-panel {
    padding: 2.25rem 2rem 2rem;
    border-radius: 2.25rem;
    position: sticky;
    top: 7rem;
  }
}
.landing-reviews {
  background: linear-gradient(135deg, #1d4ed8 0%, #1e3a8a 55%, #312e81 100%);
  color: #fff;
  border-radius: 2.5rem;
  padding: 2.5rem 1.75rem;
  box-shadow: 0 30px 60px -30px rgba(30, 64, 175, 0.55);
}
@media (min-width: 640px) {
  .landing-reviews {
    padding: 3.5rem 3.25rem;
    border-radius: 3rem;
  }
}
.landing-service-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.85rem 1.2rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #334155;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}
a.landing-service-chip:hover {
  color: #1d4ed8;
  border-color: #bfdbfe;
  background: #eff6ff;
  transform: translateY(-1px);
}
.landing-service-chip.is-current {
  color: #fff;
  background: #0f172a;
  border-color: #0f172a;
}
.landing-review-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 1.75rem;
  padding: 1.6rem 1.4rem 1.4rem;
  box-shadow: 0 10px 30px -18px rgba(15, 23, 42, 0.18);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.landing-review-card:hover {
  transform: translateY(-4px);
  border-color: #bfdbfe;
  box-shadow: 0 22px 40px -22px rgba(37, 99, 235, 0.28);
}

