/* === Современные CSS переменные === */
:root {
  --primary-color: #ff7043;
  --primary-hover: #ff5722;
  --secondary-color: #26a69a;
  --accent-color: #ffab40;
  
  --bg-primary: #0a0a0a;
  --bg-secondary: #1a1a1a;
  --bg-card: #222222;
  --bg-hover: #2a2a2a;
  
  --text-primary: #ffffff;
  --text-secondary: #e0e0e0;
  --text-muted: #b0b0b0;
  --text-accent: #ff7043;
  
  --border-color: #333333;
  --border-light: #444444;
  
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
  
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* === Сброс стилей === */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg-primary);
  color: var(--text-secondary);
  line-height: 1.6;
  font-size: 16px;
  overflow-x: hidden;
}

/* === Типографика === */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
  margin-bottom: 1rem;
}

h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2rem); }
h3 { font-size: clamp(1.25rem, 3vw, 1.5rem); }
h4 { font-size: clamp(1.1rem, 2.5vw, 1.25rem); }

p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

a {
  color: var(--text-accent);
  text-decoration: none;
  transition: var(--transition-fast);
}

a:hover {
  color: var(--primary-hover);
}

/* === Контейнер === */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* === Header === */
.site-header {
  background: rgba(26, 26, 26, 0.95);
  backdrop-filter: blur(20px);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  border-bottom: 1px solid var(--border-color);
  transition: var(--transition);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0;
  min-height: 55px;
  max-height: 55px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--text-primary);
  transition: var(--transition);
  flex-shrink: 0;
}

.logo:hover {
  transform: scale(1.05);
}

.logo-mark {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
  color: var(--bg-primary);
  font-weight: 900;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  box-shadow: var(--shadow-sm);
}

.nav {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  flex-wrap: nowrap;
}

.nav a {
  color: var(--text-secondary);
  font-weight: 500;
  padding: 0.375rem 0.75rem;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  position: relative;
  white-space: nowrap;
  font-size: 0.9rem;
}

.nav a:hover {
  color: var(--text-primary);
  background: var(--bg-hover);
}

.header-contacts {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-shrink: 0;
}

.header-contacts a {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  color: var(--text-secondary);
  font-weight: 500;
  padding: 0.375rem 0.75rem;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  white-space: nowrap;
  font-size: 0.85rem;
}

.header-contacts a:hover {
  color: var(--text-primary);
  background: var(--bg-hover);
}

.header-contacts i {
  color: var(--primary-color);
}

/* === Burger Menu === */
.burger {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.burger:hover {
  background: var(--bg-hover);
}

.burger span {
  display: block;
  width: 24px;
  height: 3px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: var(--transition);
}

/* === Buttons === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 2rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transition: var(--transition);
}

.btn:hover::before {
  left: 100%;
}

.btn--primary {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
  color: var(--bg-primary);
  box-shadow: var(--shadow-md);
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn--ghost {
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
  background: transparent;
}

.btn--ghost:hover {
  background: var(--primary-color);
  color: var(--bg-primary);
  transform: translateY(-2px);
}

.btn--small {
  padding: 0.625rem 1.5rem;
  font-size: 0.9rem;
}

/* === Hero Section === */
.hero {
  background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
  padding: 6rem 0 4rem;
  position: relative;
  overflow: hidden;
  margin-top: 55px;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 30% 20%, rgba(255, 112, 67, 0.1) 0%, transparent 50%),
              radial-gradient(circle at 70% 80%, rgba(38, 166, 154, 0.1) 0%, transparent 50%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.hero h1 {
  margin-bottom: 1.5rem;
  background: linear-gradient(135deg, var(--text-primary), var(--text-accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero .accent {
  color: var(--primary-color);
  -webkit-text-fill-color: var(--primary-color);
}

.hero p {
  font-size: 1.25rem;
  margin-bottom: 2.5rem;
  color: var(--text-muted);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* === Sections === */
.section {
  padding: 6rem 0;
  position: relative;
}

.section--alt {
  background: var(--bg-secondary);
}

.section-head {
  text-align: center;
  margin-bottom: 4rem;
}

.section-head h2 {
  margin-bottom: 1rem;
}

.section-head p {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
}

/* === Grid System === */
.grid {
  display: grid;
  gap: 2rem;
}

.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }

/* === Cards === */
.card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 2rem;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
  transform: scaleX(0);
  transition: var(--transition);
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-light);
}

.card:hover::before {
  transform: scaleX(1);
}

.card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  margin-bottom: 1.5rem;
  transition: var(--transition);
}

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

.card h3 {
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.card p {
  margin-bottom: 1.5rem;
  color: var(--text-secondary);
}

/* === Icons === */
.icon {
  color: var(--primary-color);
  margin-bottom: 1rem;
  display: block;
}

/* === Forms === */
.form-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

.form {
  display: grid;
  gap: 1.5rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--text-primary);
}

input, textarea, select {
  width: 100%;
  padding: 1rem;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  color: var(--text-primary);
  font-size: 1rem;
  transition: var(--transition);
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(255, 112, 67, 0.1);
}

textarea {
  resize: vertical;
  min-height: 120px;
}

/* === Calculator === */
.calc-form {
  background: var(--bg-card);
  padding: 2rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
}

.calc-result {
  background: var(--bg-secondary);
  padding: 1.5rem;
  border-radius: var(--radius-md);
  border-left: 4px solid var(--primary-color);
  margin-top: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
}

/* === FAQ === */
.faq-list {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  margin-bottom: 1rem;
  border: 1px solid var(--border-color);
  overflow: hidden;
  transition: var(--transition);
}

.faq-item:hover {
  border-color: var(--border-light);
}

.faq-item h3 {
  padding: 1rem 1.25rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0;
  transition: var(--transition);
  font-size: 1rem;
  font-weight: 600;
}

.faq-item h3:hover {
  background: var(--bg-hover);
}

.faq-item h3 i {
  color: var(--primary-color);
  transition: var(--transition);
}

.faq-content {
  max-height: 0;
  overflow: hidden;
  transition: var(--transition);
  padding: 0 1.5rem;
}

.faq-item.active .faq-content {
  max-height: 200px;
  padding: 0 1.25rem 1rem;
}

.faq-item.active h3 i {
  transform: rotate(45deg);
}

/* === Reviews === */
.review {
  text-align: center;
}

.review img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 1rem;
  border: 3px solid var(--primary-color);
}

.stars {
  color: var(--accent-color);
  font-size: 1.2rem;
  margin-top: 1rem;
}

.review-form {
  background: var(--bg-card);
  padding: 2rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  margin-top: 3rem;
}

/* === Footer === */
.site-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 3rem 0 1rem;
}

.footer-inner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--text-primary);
}

.footer-nav {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-nav a {
  color: var(--text-muted);
  transition: var(--transition);
}

.footer-nav a:hover {
  color: var(--primary-color);
}

.footer-contacts {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-contacts p {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
}

.footer-contacts i {
  color: var(--primary-color);
  width: 20px;
}

.footer-socials {
  display: flex;
  gap: 1rem;
}

.footer-socials a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--bg-card);
  border-radius: 50%;
  color: var(--text-muted);
  transition: var(--transition);
}

.footer-socials a:hover {
  background: var(--primary-color);
  color: var(--bg-primary);
  transform: translateY(-2px);
}

.footer-map {
  margin: 2rem 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.footer-map iframe {
  width: 100%;
  height: 300px;
  border: none;
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
  color: var(--text-muted);
}

/* === Utility Classes === */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.mb-3 { margin-bottom: 3rem; }

.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mt-3 { margin-top: 3rem; }

/* === Blog Styles === */
.blog-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.blog-thumb {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
}

.card-content {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.card-content h2 {
  margin-bottom: 1rem;
  font-size: 1.25rem;
}

.card-content h2 a {
  color: var(--text-primary);
  text-decoration: none;
  transition: var(--transition);
}

.card-content h2 a:hover {
  color: var(--primary-color);
}

.card-content p {
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.lead {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  text-align: center;
}

/* === Responsive Design === */
@media (max-width: 1024px) {
  .container {
    padding: 0 1rem;
  }
  
  .hero {
    padding: 6rem 0 4rem;
  }
  
  .section {
    padding: 4rem 0;
  }
  
  .form-wrap {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

@media (max-width: 768px) {
  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    flex-direction: column;
    padding: 1rem;
    border-top: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
    gap: 0.5rem;
  }
  
  .nav.active {
    display: flex;
  }
  
  .burger {
    display: flex;
  }
  
  .header-contacts {
    display: none;
  }
  
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }
  
  .form-row {
    grid-template-columns: 1fr;
  }
  
  .hero h1 {
    font-size: 1.75rem;
  }
  
  .hero p {
    font-size: 1rem;
  }
  
  .card {
    padding: 1.5rem;
  }
  
  .btn {
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
  }
  
  .logo {
    font-size: 1.1rem;
  }
  
  .logo-mark {
    padding: 0.2rem 0.4rem;
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 0.75rem;
  }
  
  .hero {
    padding: 5rem 0 3rem;
  }
  
  .section {
    padding: 3rem 0;
  }
  
  .card {
    padding: 1rem;
  }
  
  .btn {
    padding: 0.625rem 1.25rem;
    font-size: 0.85rem;
  }
}

/* === Animations === */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* === Scroll Animations === */
.card,
.faq-item,
.review {
  animation: fadeInUp 0.6s ease-out;
}

/* === Loading States === */
.loading {
  opacity: 0.7;
  pointer-events: none;
}

.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid var(--primary-color);
  border-top: 2px solid transparent;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* === Notifications === */
.notification {
  position: fixed;
  top: 20px;
  right: 20px;
  background: var(--bg-card);
  color: var(--text-primary);
  padding: 1rem 1.5rem;
  border-radius: var(--radius-md);
  border-left: 4px solid var(--primary-color);
  box-shadow: var(--shadow-lg);
  z-index: 10000;
  transform: translateX(400px);
  transition: var(--transition);
  max-width: 400px;
}

.notification.show {
  transform: translateX(0);
}

.notification--success {
  border-left-color: var(--secondary-color);
}

.notification--error {
  border-left-color: #f44336;
}

.notification--warning {
  border-left-color: var(--accent-color);
}

/* === Form Error States === */
input.error,
textarea.error,
select.error {
  border-color: #f44336;
  box-shadow: 0 0 0 3px rgba(244, 67, 54, 0.1);
}

.field-error {
  color: #f44336;
  font-size: 0.875rem;
  margin-top: 0.5rem;
  display: block;
}

/* === Header Scroll Effect === */
.site-header.scrolled {
  background: rgba(26, 26, 26, 0.98);
  backdrop-filter: blur(20px);
}

.site-header {
  transition: var(--transition);
}

/* === Animation Classes === */
.animate-in {
  animation: fadeInUp 0.6s ease-out forwards;
}

/* === Burger Animation === */
.burger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.burger.active span:nth-child(2) {
  opacity: 0;
}

.burger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -6px);
}

/* === File Input Styling === */
input[type="file"] {
  padding: 0.75rem;
  border: 2px dashed var(--border-color);
  background: var(--bg-secondary);
  cursor: pointer;
  transition: var(--transition);
}

input[type="file"]:hover {
  border-color: var(--primary-color);
  background: var(--bg-hover);
}

input[type="file"]:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(255, 112, 67, 0.1);
}

/* === Enhanced Card Hover Effects === */
.card::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
  transition: var(--transition);
}

.card:hover::after {
  left: 100%;
}

/* === Accessibility Improvements === */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* === Focus Styles === */
*:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

.btn:focus,
input:focus,
textarea:focus,
select:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 112, 67, 0.3);
}

/* === Custom Scrollbar === */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary-hover);
}

/* === Selection Styles === */
::selection {
  background: var(--primary-color);
  color: var(--bg-primary);
}

::-moz-selection {
  background: var(--primary-color);
  color: var(--bg-primary);
}