/**
 * serviceitlab.pro — Дополнительные стили
 * Основная стилизация через Tailwind CSS (CDN).
 * Здесь: анимации, компоненты, состояния, адаптивные доработки.
 */

/* ==================== BASE ==================== */

html {
  scroll-behavior: smooth;
}

::selection {
  background-color: rgba(6, 182, 212, 0.3);
  color: #fff;
}

/* ==================== LOGO ==================== */

.logo-icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.5rem;
  background: #2d2d2d;
  border: 1px solid rgba(0, 191, 255, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.3s ease;
}

.logo-icon svg {
  color: #00bfff;
}

.group:hover .logo-icon {
  border-color: rgba(0, 191, 255, 0.5);
  box-shadow: 0 0 16px rgba(0, 191, 255, 0.2);
}

.logo-icon--footer {
  width: 2.25rem;
  height: 2.25rem;
}

.logo-text {
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
  white-space: nowrap;
}

.logo-service {
  color: #ffffff;
  text-transform: uppercase;
}

.logo-it {
  color: #00bfff;
  text-transform: uppercase;
}

.logo-lab {
  color: #ffffff;
}

.group:hover .logo-it {
  color: #33ccff;
}

/* ==================== HEADER ==================== */

#header {
  background: transparent;
}

#header.scrolled {
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
  border-bottom: 1px solid rgba(51, 65, 85, 0.5);
}

.nav-link {
  color: #cbd5e1;
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 0.2s ease;
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: #06b6d4;
  transition: width 0.3s ease;
}

.nav-link:hover {
  color: #06b6d4;
}

.nav-link:hover::after {
  width: 100%;
}

.mobile-nav-link {
  color: #cbd5e1;
  font-weight: 500;
  padding: 0.5rem 0;
  transition: color 0.2s ease;
}

.mobile-nav-link:hover {
  color: #06b6d4;
}

/* ==================== BUTTONS ==================== */

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #06b6d4, #0891b2);
  color: #fff;
  font-weight: 600;
  border-radius: 0.75rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(6, 182, 212, 0.3);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #22d3ee, #06b6d4);
  box-shadow: 0 6px 25px rgba(6, 182, 212, 0.45);
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: #fff;
  font-weight: 600;
  border: 2px solid rgba(6, 182, 212, 0.4);
  border-radius: 0.75rem;
  transition: all 0.3s ease;
}

.btn-secondary:hover {
  border-color: #06b6d4;
  background: rgba(6, 182, 212, 0.1);
  color: #06b6d4;
}

.btn-service {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #06b6d4;
  background: rgba(6, 182, 212, 0.1);
  border: 1px solid rgba(6, 182, 212, 0.3);
  border-radius: 0.5rem;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.btn-service:hover {
  background: #06b6d4;
  color: #fff;
  border-color: #06b6d4;
}

/* ==================== SECTION TITLES ==================== */

.section-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  color: #fff;
  margin-bottom: 1rem;
}

.section-subtitle {
  color: #94a3b8;
  font-size: 1.125rem;
  max-width: 36rem;
  line-height: 1.7;
}

/* ==================== ADVANTAGE CARDS ==================== */

.advantage-card {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(51, 65, 85, 0.5);
  border-radius: 1rem;
  padding: 1.75rem;
  transition: all 0.4s ease;
}

.advantage-card:hover {
  border-color: rgba(6, 182, 212, 0.4);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(6, 182, 212, 0.1);
}

.advantage-icon {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 0.75rem;
  background: rgba(6, 182, 212, 0.1);
  color: #06b6d4;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  transition: all 0.3s ease;
}

.advantage-card:hover .advantage-icon {
  background: #06b6d4;
  color: #fff;
}

/* ==================== SERVICE CARDS ==================== */

.service-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid rgba(51, 65, 85, 0.5);
  border-radius: 1.25rem;
  padding: 2rem;
  transition: all 0.4s ease;
}

.service-card:hover {
  border-color: rgba(6, 182, 212, 0.4);
  transform: translateY(-6px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

.service-card--featured {
  border-color: rgba(6, 182, 212, 0.3);
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.08), rgba(30, 41, 59, 0.6));
}

.service-card-icon {
  width: 4rem;
  height: 4rem;
  border-radius: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
}

/* ==================== STEPS ==================== */

.step-item {
  text-align: center;
  position: relative;
}

.step-number {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  background: linear-gradient(135deg, #06b6d4, #0891b2);
  color: #fff;
  font-size: 1.25rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
  box-shadow: 0 4px 20px rgba(6, 182, 212, 0.4);
  position: relative;
  z-index: 1;
}

/* ==================== FORMS ==================== */

.contact-form {
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(51, 65, 85, 0.5);
  border-radius: 1.25rem;
  padding: 2rem;
}

#callback-form,
#contact-form {
  position: relative;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: #cbd5e1;
  margin-bottom: 0.5rem;
}

.form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(51, 65, 85, 0.6);
  border-radius: 0.75rem;
  color: #fff;
  font-size: 1rem;
  transition: all 0.3s ease;
  outline: none;
}

.form-input::placeholder {
  color: #64748b;
}

.form-input:focus {
  border-color: #06b6d4;
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.15);
}

.form-input.error {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}

.form-input.success {
  border-color: #22c55e;
}

.form-textarea {
  resize: vertical;
  min-height: 6rem;
}

.form-error {
  display: block;
  color: #f87171;
  font-size: 0.75rem;
  margin-top: 0.375rem;
  min-height: 1rem;
}

select.form-input {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 1.25rem;
  padding-right: 2.5rem;
}

select.form-input option {
  background: #1e293b;
  color: #fff;
}

/* ==================== YANDEX MAP ==================== */

.map-container {
  position: relative;
  border-radius: 1rem;
  overflow: hidden;
  border: 1px solid rgba(51, 65, 85, 0.5);
  height: 20rem;
}

@media (min-width: 1024px) {
  .map-container {
    height: 24rem;
  }
}

.map-container iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  filter: grayscale(20%) contrast(1.05);
}

.map-link {
  position: absolute;
  bottom: 1rem;
  right: 1rem;
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #06b6d4;
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  border: 1px solid rgba(6, 182, 212, 0.3);
  transition: all 0.3s ease;
}

.map-link:hover {
  background: #06b6d4;
  color: #fff;
}

/* ==================== FOOTER ==================== */

.footer-link {
  color: #94a3b8;
  transition: color 0.2s ease;
}

.footer-link:hover {
  color: #06b6d4;
}

.social-link {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.75rem;
  background: rgba(51, 65, 85, 0.5);
  color: #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.social-link:hover {
  background: #06b6d4;
  color: #fff;
  transform: translateY(-2px);
}

.social-link--max {
  background: linear-gradient(135deg, #5b4cf0, #3b82f6);
  color: #fff;
  font-weight: 700;
}

.social-link--max:hover {
  background: linear-gradient(135deg, #6d5ff5, #4f93f8);
  color: #fff;
}

.max-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #5b4cf0, #3b82f6);
  color: #fff;
  font-size: 0.5rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  border-radius: 0.25rem;
  flex-shrink: 0;
}

.max-icon--sm {
  width: 1rem;
  height: 1rem;
}

/* ==================== MODAL ==================== */

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal[hidden] {
  display: none;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  animation: fadeIn 0.3s ease;
}

.modal-content {
  position: relative;
  background: #1e293b;
  border: 1px solid rgba(51, 65, 85, 0.6);
  border-radius: 1.25rem;
  padding: 2rem;
  width: 100%;
  max-width: 28rem;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5);
  animation: slideUp 0.3s ease;
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  transition: all 0.2s ease;
}

.modal-close:hover {
  background: rgba(51, 65, 85, 0.5);
  color: #fff;
}

/* ==================== TOAST ==================== */

.toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 110;
  background: #1e293b;
  border: 1px solid rgba(34, 197, 94, 0.3);
  border-radius: 0.75rem;
  padding: 1rem 1.25rem;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
  animation: slideUp 0.4s ease;
  max-width: 24rem;
}

.toast[hidden] {
  display: none;
}

.toast--error {
  border-color: rgba(239, 68, 68, 0.35);
}

.hp-field {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.hp-field input {
  width: 1px;
  height: 1px;
  padding: 0;
  margin: 0;
  border: 0;
  background: transparent;
}

.btn-primary:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

/* ==================== CAPTCHA ==================== */

.captcha-group {
  margin-top: 0.25rem;
}

.captcha-question {
  display: inline-block;
  min-width: 3.5rem;
  padding: 0.1rem 0.45rem;
  border-radius: 0.375rem;
  background: rgba(6, 182, 212, 0.12);
  border: 1px solid rgba(6, 182, 212, 0.25);
  color: #67e8f9;
  font-weight: 700;
  font-size: 0.95rem;
  text-align: center;
  letter-spacing: 0.03em;
  user-select: none;
}

.captcha-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.5rem;
}

.captcha-input.form-input {
  width: auto;
  flex: 1 1 auto;
  min-width: 0;
  text-align: left;
  font-weight: 500;
}

.captcha-refresh {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  min-height: 3rem;
  align-self: stretch;
  border-radius: 0.5rem;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(30, 41, 59, 0.8);
  color: #94a3b8;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
  flex-shrink: 0;
}

.captcha-refresh:hover {
  color: #22d3ee;
  border-color: rgba(34, 211, 238, 0.35);
  background: rgba(34, 211, 238, 0.08);
}

/* ==================== SCROLL REVEAL ANIMATIONS ==================== */

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered delays for grid children */
.reveal:nth-child(2) { transition-delay: 0.1s; }
.reveal:nth-child(3) { transition-delay: 0.2s; }
.reveal:nth-child(4) { transition-delay: 0.3s; }

/* ==================== KEYFRAMES ==================== */

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==================== RESPONSIVE TWEAKS ==================== */

@media (max-width: 640px) {
  .contact-form {
    padding: 1.5rem;
  }

  .toast {
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
  }
}

/* Prevent body scroll when modal is open */
body.modal-open {
  overflow: hidden;
}
