:root {
  --primary-color: #3B82F6;
  --primary-dark: #2563EB;
  --primary-light: #93C5FD;
  --primary-very-light: #EFF6FF;
  --secondary-color: #FFFFFF;
  --text-color: #1E293B;
  --text-light: #64748B;
  --gray-light: #F1F5F9;
  --gray: #E2E8F0;
  --success: #10B981;
  --warning: #F59E0B;
  --danger: #EF4444;
  --box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --border-radius: 8px;
  --transition: all 0.3s ease;
  --container-width: 1200px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Roboto', 'Arial', sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--text-color);
  background-color: var(--gray-light);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* WebP Support Detection */
.webp body {
  background-image: url('data:image/webp;base64,UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA');
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Lazy Loading для изображений */
img[loading="lazy"] {
  opacity: 0;
  transition: opacity 0.3s ease;
}

img[loading="lazy"].loaded,
img[loading="lazy"]:not([src*="placeholder"]) {
  opacity: 1;
}

/* Picture элементы для WebP */
picture {
  display: block;
}

picture img {
  width: 100%;
  height: auto;
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--primary-dark);
}

a:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

ul {
  list-style: none;
}

.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 1rem;
}

/* Screen Reader Only */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Skip Link для accessibility */
.skip-link {
  position: absolute;
  top: -40px;
  left: 6px;
  background: var(--primary-color);
  color: white;
  padding: 8px;
  text-decoration: none;
  border-radius: 4px;
  z-index: 1000;
  font-weight: 600;
}

.skip-link:focus {
  top: 6px;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 500;
  text-align: center;
  border-radius: var(--border-radius);
  border: none;
  cursor: pointer;
  transition: var(--transition);
  line-height: 1.5;
  text-decoration: none;
}

.btn:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.2);
}

.btn-primary {
  background-color: var(--primary-color);
  color: white;
}

.btn-primary:hover {
  background-color: var(--primary-dark);
  color: white;
}

.btn-outline {
  background-color: transparent;
  color: var(--primary-color);
  border: 1px solid var(--primary-color);
}

.btn-outline:hover {
  background-color: var(--primary-color);
  color: white;
}

.btn-outline-primary {
  background-color: transparent;
  color: var(--primary-color);
  border: 1px solid var(--primary-color);
}

.btn-outline-primary:hover {
  background-color: var(--primary-very-light);
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

.btn-lg {
  padding: 1rem 2rem;
  font-size: 1.125rem;
}

.btn-block {
  display: block;
  width: 100%;
}

/* Order Button Styles */
.btn-order {
  background-color: var(--success);
  color: white;
  font-weight: 600;
  position: relative;
  overflow: hidden;
}

.btn-order:hover {
  background-color: #059669;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-order:active {
  transform: translateY(0);
}

.btn-order::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.btn-order:hover::before {
  left: 100%;
}

/* Header */
header {
  background-color: white;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
}

.logo a {
  display: flex;
  align-items: center;
  color: var(--text-color);
  font-weight: 700;
  font-size: 1.5rem;
}

.logo img {
  height: 40px;
  width: 9rem;
  margin-right: 0.5rem;
}

#logo-placeholder, #footer-logo-placeholder {
  width: 40px;
  height: 40px;
  background-color: var(--primary-color);
  border-radius: 50%;
}

.main-menu {
  display: flex;
}

.main-menu li {
  margin: 0 1rem;
}

.main-menu a {
  color: var(--text-color);
  font-weight: 500;
  padding: 0.5rem 0;
  position: relative;
}

.main-menu a:hover {
  color: var(--primary-color);
}

.main-menu a.active {
  color: var(--primary-color);
}

.main-menu a.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--primary-color);
}

.header-buttons {
  display: flex;
  align-items: center;
}

.phone-number {
  margin-right: 1.5rem;
  color: var(--text-color);
  font-weight: 500;
  display: flex;
  align-items: center;
}

.phone-number i {
  color: var(--primary-color);
  margin-right: 0.5rem;
}

.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
  width: 40px;
  height: 40px;
  position: relative;
  z-index: 1001;
}

.mobile-menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--text-color);
  margin: 5px auto;
  transition: var(--transition);
}

.mobile-menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -7px);
}

.mobile-menu {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: white;
  padding: 5rem 1.5rem 2rem;
  z-index: 1000;
  overflow-y: auto;
  text-align: center;
}

.mobile-menu.active {
  display: block;
}

.mobile-menu-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 40px;
  height: 40px;
  background-color: var(--primary-color);
  border: none;
  border-radius: var(--border-radius);
  cursor: pointer;
  color: white;
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  z-index: 1002;
}

.mobile-menu-close:hover {
  background-color: var(--primary-dark);
}

.mobile-menu ul {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-width: 300px;
  margin: 0 auto;
}

.mobile-menu li {
  border-radius: var(--border-radius);
  overflow: hidden;
}

.mobile-menu a {
  color: var(--text-color);
  font-weight: 500;
  font-size: 1.25rem;
  display: block;
  padding: 1rem;
  transition: var(--transition);
  background-color: var(--gray-light);
  border-radius: var(--border-radius);
}

.mobile-menu a:hover,
.mobile-menu a.active {
  color: white;
  background-color: var(--primary-color);
}

/* Section Titles */
.section-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-color);
  margin-bottom: 2rem;
  text-align: center;
  position: relative;
  padding-bottom: 1rem;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 3px;
  background-color: var(--primary-color);
  border-radius: 3px;
}

/* Footer */
footer {
  background-color: #1E293B;
  color: white;
  padding: 4rem 0 1rem;
  margin-top: 4rem;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  margin-bottom: 3rem;
}

.footer-logo {
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
}

.footer-logo img {
  height: 40px;
  width: 40px;
  margin-right: 0.5rem;
}

.footer-logo span {
  font-weight: 700;
  font-size: 1.5rem;
  color: white;
}

.social-links {
  display: flex;
  margin-top: 1.5rem;
}

.social-links a {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  margin-right: 0.75rem;
  transition: var(--transition);
}

.social-links a:hover {
  background-color: var(--primary-color);
  transform: translateY(-3px);
}

.footer-column h3 {
  color: white;
  font-size: 1.25rem;
  margin-bottom: 1.5rem;
  position: relative;
  padding-bottom: 0.75rem;
}

.footer-column h3::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 50px;
  height: 2px;
  background-color: var(--primary-color);
}

.footer-links li {
  margin-bottom: 0.75rem;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.7);
  transition: var(--transition);
}

.footer-links a:hover {
  color: white;
  padding-left: 5px;
}

.contact-info {
  list-style: none;
  padding: 0;
}

.contact-info > div,
.contact-info li {
  margin-bottom: 1rem;
  display: flex;
  align-items: flex-start;
}

.contact-info i {
  color: var(--primary-color);
  margin-right: 0.75rem;
  margin-top: 0.25rem;
}

.contact-info a {
  color: rgba(255, 255, 255, 0.7);
}

.contact-info a:hover {
  color: white;
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.875rem;
}

/* Page Header */
.page-header {
  background-color: var(--primary-color);
  color: white;
  padding: 2rem 0;
  margin-bottom: 2rem;
}

.page-header h1 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.breadcrumbs {
  display: flex;
  align-items: center;
  font-size: 0.875rem;
}

.breadcrumbs a {
  color: rgba(255, 255, 255, 0.8);
}

.breadcrumbs a:hover {
  color: white;
}

.breadcrumbs i {
  margin: 0 0.5rem;
  font-size: 0.75rem;
}

.breadcrumbs span {
  color: white;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  z-index: 1100;
  overflow: auto;
  padding: 1rem;
}

.modal.active {
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-content {
  background-color: white;
  padding: 2rem;
  border-radius: var(--border-radius);
  max-width: 500px;
  width: 100%;
  position: relative;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  animation: modalFadeIn 0.3s ease-out;
}

.modal-lg {
  max-width: 800px;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.close-modal {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 1.5rem;
  color: var(--text-light);
  cursor: pointer;
  line-height: 1;
}

.close-modal:hover {
  color: var(--danger);
}

.modal h3 {
  margin-bottom: 1.5rem;
  color: var(--text-color);
  font-size: 1.5rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--text-color);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--gray);
  border-radius: var(--border-radius);
  font-family: inherit;
  font-size: 1rem;
  transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-group input:invalid,
.form-group textarea:invalid {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.form-group input:valid,
.form-group textarea:valid {
  border-color: var(--success);
}

.success-icon {
  font-size: 4rem;
  color: var(--success);
  display: block;
  text-align: center;
  margin-bottom: 1rem;
}

.modal-body {
  text-align: center;
}

.modal-body h3 {
  margin-bottom: 1rem;
}

.modal-body p {
  margin-bottom: 1.5rem;
  color: var(--text-light);
}

.close-btn {
  margin-top: 1rem;
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

@media (prefers-contrast: high) {
  :root {
    --primary-color: #0066cc;
    --text-color: #000000;
    --text-light: #333333;
  }
  
  .btn {
    border: 2px solid currentColor;
  }
}

/* Responsive Styles */
@media (max-width: 1024px) {
  .container {
    max-width: 100%;
    padding: 0 2rem;
  }

  .footer-content {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .main-menu {
    display: none;
  }

  .mobile-menu-toggle {
    display: block;
  }

  .header-buttons {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .phone-number {
    margin-right: 0.5rem;
    font-size: 0.875rem;
  }

  .phone-number span {
    display: none;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .section-title {
    font-size: 1.75rem;
  }
}

@media (max-width: 576px) {
  .container {
    padding: 0 1rem;
  }

  .header-wrapper {
    padding: 0.75rem 0;
  }

  .logo img {
    height: 32px;
    width: 7rem;
  }

  .header-buttons {
    gap: 0.25rem;
  }

  .phone-number {
    margin-right: 0.25rem;
    font-size: 0.75rem;
  }

  .phone-number i {
    margin-right: 0.25rem;
  }

  .section-title {
    font-size: 1.5rem;
  }

  .page-header h1 {
    font-size: 2rem;
  }
}

@media (max-width: 480px) {
  .header-buttons {
    gap: 0.125rem;
  }

  .phone-number {
    font-size: 0.7rem;
    margin-right: 0.125rem;
  }

  .phone-number i {
    margin-right: 0.125rem;
    font-size: 0.7rem;
  }
}

@media (max-width: 360px) {
  /* Скрываем email только на очень маленьких экранах */
  .phone-number[href^="mailto"] {
    display: none;
  }
}

/* Print Styles */
@media print {
  .mobile-menu,
  .mobile-menu-toggle,
  .btn,
  .social-links {
    display: none !important;
  }
  
  body {
    font-size: 12pt;
    line-height: 1.4;
    color: #000;
    background: #fff;
  }
  
  .container {
    max-width: none;
    padding: 0;
  }
  
  h1, h2, h3 {
    page-break-after: avoid;
  }
  
  a[href^="http"]:after {
    content: " (" attr(href) ")";
    font-size: 10pt;
    color: #666;
  }
}