/* ============================================
   АВТОМАГНАТ - CSS ДИЗАЙН-СИСТЕМА
   Статический сайт СТО, Краснодар
   ============================================ */

/* ПОДКЛЮЧЕНИЕ ШРИФТОВ */
@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@500;700&family=Source+Sans+3:wght@400;600&display=swap');

/* ============================================
   CSS VARIABLES (Дизайн-система)
   ============================================ */
:root {
  /* Основные цвета */
  --color-bg-primary: #0D0D0D;
  --color-bg-secondary: #1A1A1A;
  --color-bg-tertiary: #252525;

  /* Акценты */
  --color-accent: #E31E24;
  --color-accent-hover: #FF2D33;
  --color-accent-dark: #B8181D;

  /* Текст */
  --color-text-primary: #FFFFFF;
  --color-text-secondary: #A0A0A0;
  --color-text-muted: #666666;

  /* Утилитарные */
  --color-border: #333333;
  --color-overlay: rgba(0, 0, 0, 0.6);
  --color-success: #22C55E;

  /* Тени и эффекты */
  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.3);
  --shadow-glow: 0 0 20px rgba(227, 30, 36, 0.15);

  /* Скругления */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;

  /* Переходы */
  --transition-fast: 0.2s ease;
  --transition-base: 0.3s ease;

  /* Типографика */
  --font-heading: 'Oswald', sans-serif;
  --font-body: 'Source Sans 3', sans-serif;

  /* Размеры текста */
  --text-xs: 0.75rem;     /* 12px */
  --text-sm: 0.875rem;    /* 14px */
  --text-base: 1rem;      /* 16px */
  --text-lg: 1.125rem;    /* 18px */
  --text-xl: 1.25rem;     /* 20px */
  --text-2xl: 1.5rem;     /* 24px */
  --text-3xl: 2rem;       /* 32px */
  --text-4xl: 2.5rem;     /* 40px */
  --text-5xl: 3.5rem;     /* 56px */
  --text-hero: 3.5rem;    /* 56px — fits "АВТОСЕРВИС В КРАСНОДАРЕ" on one line */
}

/* ============================================
   RESET / NORMALIZE
   ============================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--color-text-secondary);
  background-color: var(--color-bg-primary);
  overflow-x: hidden;
}

body.no-scroll {
  overflow: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

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

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

ul, ol {
  list-style: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* ============================================
   ТИПОГРАФИКА
   ============================================ */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--color-text-primary);
  line-height: 1.2;
  margin-bottom: 1rem;
}

h1 {
  font-size: var(--text-5xl);
}

h2 {
  font-size: var(--text-4xl);
}

h3 {
  font-size: var(--text-3xl);
}

h4 {
  font-size: var(--text-2xl);
}

p {
  margin-bottom: 1rem;
}

strong {
  font-weight: 600;
  color: var(--color-text-primary);
}

/* ============================================
   LAYOUT / CONTAINER
   ============================================ */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.container-wide {
  max-width: 1400px;
}

.section {
  padding: 4rem 0;
}

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

/* ============================================
   HEADER (Шапка сайта)
   ============================================ */
.topbar {
  background-color: var(--color-bg-secondary);
  padding: 0.75rem 0;
  font-size: var(--text-sm);
}

.topbar-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
}

.topbar-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--color-text-secondary);
}

.topbar-item svg {
  width: 16px;
  height: 16px;
  color: var(--color-accent);
}

.topbar-item a {
  color: var(--color-text-secondary);
}

.topbar-item a:hover {
  color: var(--color-text-primary);
}

.header {
  background-color: var(--color-bg-primary);
  position: sticky;
  top: 0;
  z-index: 100;
  transition: background-color var(--transition-base), backdrop-filter var(--transition-base);
}

.header.scrolled {
  background-color: rgba(13, 13, 13, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 72px;
}

.logo {
  font-family: var(--font-heading);
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--color-text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo-accent {
  color: var(--color-accent);
}

.nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-link {
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-secondary);
  transition: color var(--transition-fast);
  position: relative;
}

.nav-link:hover {
  color: var(--color-text-primary);
}

.nav-link.has-dropdown {
  cursor: pointer;
}

/* Dropdown меню */
.dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 1rem);
  left: 50%;
  transform: translateX(-50%);
  background-color: var(--color-bg-secondary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  min-width: 500px;
  display: none;
  opacity: 0;
  transition: opacity var(--transition-base);
  box-shadow: var(--shadow-card);
}

.dropdown.is-open .dropdown-menu {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  opacity: 1;
}

.dropdown-link {
  padding: 0.75rem;
  border-radius: var(--radius-sm);
  transition: background-color var(--transition-fast);
  color: var(--color-text-secondary);
  font-size: var(--text-sm);
}

.dropdown-link:hover {
  background-color: var(--color-bg-tertiary);
  color: var(--color-text-primary);
}

/* Бургер меню */
.burger {
  display: none;
  flex-direction: column;
  gap: 4px;
  width: 28px;
  height: 24px;
  cursor: pointer;
}

.burger-line {
  width: 100%;
  height: 3px;
  background-color: var(--color-text-primary);
  transition: transform var(--transition-fast), opacity var(--transition-fast);
}

.burger.active .burger-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

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

.burger.active .burger-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Мобильное меню */
.mobile-menu {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background-color: rgba(13, 13, 13, 0.98);
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  z-index: 99;
  opacity: 0;
  transition: opacity var(--transition-base);
}

.mobile-menu.active {
  display: flex;
  opacity: 1;
}

.mobile-nav-link {
  font-family: var(--font-heading);
  font-size: var(--text-3xl);
  color: var(--color-text-primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.mobile-phone {
  font-size: var(--text-2xl);
  color: var(--color-accent);
  margin-top: 2rem;
}

/* ============================================
   FOOTER (Подвал)
   ============================================ */
.footer {
  background-color: var(--color-bg-primary);
  border-top: 1px solid var(--color-border);
  padding: 3rem 0 1rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-col h4 {
  font-size: var(--text-lg);
  margin-bottom: 1rem;
  color: var(--color-accent);
}

.footer-col p,
.footer-col address {
  font-style: normal;
  font-size: var(--text-sm);
  line-height: 1.8;
  color: var(--color-text-secondary);
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-link {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  transition: color var(--transition-fast);
}

.footer-link:hover {
  color: var(--color-accent);
}

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

/* ============================================
   BUTTONS (Кнопки)
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 2rem;
  font-family: var(--font-heading);
  font-size: var(--text-base);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
  border: none;
}

.btn-primary {
  background: var(--color-accent);
  color: var(--color-text-primary);
}

.btn-primary:hover {
  background: var(--color-accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(227, 30, 36, 0.3);
}

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

.btn-secondary:hover {
  background: var(--color-accent);
  color: var(--color-text-primary);
}

.btn-large {
  padding: 1.125rem 2.5rem;
  font-size: var(--text-lg);
}

/* ============================================
   CARDS (Карточки)
   ============================================ */
.card {
  background: var(--color-bg-secondary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  transition: border-color var(--transition-base), box-shadow var(--transition-base), transform var(--transition-base);
}

.card:hover {
  border-color: var(--color-accent);
  box-shadow: var(--shadow-glow);
  transform: translateY(-4px);
}

.card-icon {
  width: 48px;
  height: 48px;
  color: var(--color-accent);
  margin-bottom: 1rem;
}

.card-title {
  font-size: var(--text-xl);
  margin-bottom: 0.5rem;
  color: var(--color-text-primary);
}

.card-description {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  margin-bottom: 1rem;
  line-height: 1.6;
}

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--color-accent);
  font-weight: 600;
  font-size: var(--text-sm);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.card-link:hover {
  gap: 0.75rem;
}

/* ============================================
   GRID / LAYOUT UTILITIES
   ============================================ */
.grid {
  display: grid;
  gap: 2rem;
}

.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background: linear-gradient(135deg, #0D0D0D 0%, #1A1A1A 50%, #0D0D0D 100%);
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(circle at 20% 50%, rgba(227, 30, 36, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 50%, rgba(227, 30, 36, 0.05) 0%, transparent 50%);
  pointer-events: none;
}

.hero .container {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 900px;
  width: 100%;
}

.hero-subtitle {
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  color: var(--color-accent);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 1rem;
  display: inline-block;
  padding-left: 3rem;
  position: relative;
}

.hero-subtitle::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 2.5rem;
  height: 2px;
  background: var(--color-accent);
}

.hero h1 {
  font-size: var(--text-hero);
  line-height: 1.1;
  margin-bottom: 1.5rem;
  color: var(--color-text-primary);
}

.hero-description {
  font-size: var(--text-lg);
  color: var(--color-text-secondary);
  margin-bottom: 2.5rem;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-features {
  margin-top: 4rem;
  display: flex;
  justify-content: center;
  gap: 3rem;
  flex-wrap: wrap;
}

.hero-feature {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
}

.hero-feature svg {
  width: 24px;
  height: 24px;
  color: var(--color-accent);
}

/* ============================================
   SECTION HEADERS
   ============================================ */
.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-title {
  font-size: var(--text-5xl);
  margin-bottom: 1rem;
}

.section-subtitle {
  font-size: var(--text-lg);
  color: var(--color-text-secondary);
  font-family: var(--font-body);
  text-transform: none;
}

/* ============================================
   BREADCRUMBS (Хлебные крошки)
   ============================================ */
.breadcrumbs {
  padding: 1.5rem 0;
  font-size: var(--text-sm);
}

.breadcrumbs-list {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.breadcrumbs-item {
  color: var(--color-text-secondary);
}

.breadcrumbs-item:not(:last-child)::after {
  content: '→';
  margin-left: 0.5rem;
  color: var(--color-text-muted);
}

.breadcrumbs-link {
  color: var(--color-text-secondary);
  transition: color var(--transition-fast);
}

.breadcrumbs-link:hover {
  color: var(--color-accent);
}

/* ============================================
   SIDEBAR (Боковая панель)
   ============================================ */
.content-with-sidebar {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 3rem;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.sidebar-widget {
  background: var(--color-bg-secondary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
}

.sidebar-widget h3 {
  font-size: var(--text-xl);
  margin-bottom: 1rem;
  color: var(--color-accent);
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.sidebar-nav-link {
  padding: 0.75rem;
  border-radius: var(--radius-sm);
  color: var(--color-text-secondary);
  transition: background-color var(--transition-fast), color var(--transition-fast);
  font-size: var(--text-sm);
}

.sidebar-nav-link:hover,
.sidebar-nav-link.active {
  background-color: var(--color-bg-tertiary);
  color: var(--color-text-primary);
}

/* ============================================
   CTA BLOCK (Призыв к действию)
   ============================================ */
.cta-block {
  background: linear-gradient(135deg, var(--color-accent-dark) 0%, var(--color-accent) 100%);
  padding: 4rem 2rem;
  text-align: center;
  border-radius: var(--radius-lg);
  margin: 4rem 0;
  position: relative;
  overflow: hidden;
}

.cta-block::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 10px,
    rgba(255, 255, 255, 0.03) 10px,
    rgba(255, 255, 255, 0.03) 20px
  );
  pointer-events: none;
}

.cta-title {
  font-size: var(--text-4xl);
  color: var(--color-text-primary);
  margin-bottom: 1rem;
  position: relative;
}

.cta-description {
  font-size: var(--text-lg);
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 2rem;
  position: relative;
}

.cta-block .btn {
  background: white;
  color: var(--color-accent);
  position: relative;
}

.cta-block .btn:hover {
  background: var(--color-text-primary);
  transform: scale(1.05);
}

/* ============================================
   MOBILE FIXED CTA BUTTON
   ============================================ */
.mobile-cta-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1rem;
  background: var(--color-bg-primary);
  border-top: 2px solid var(--color-accent);
  z-index: 98;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
}

.mobile-cta-bar .btn {
  width: 100%;
}

/* ============================================
   ANIMATIONS
   ============================================ */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

.animate-on-scroll:nth-child(2) { transition-delay: 0.1s; }
.animate-on-scroll:nth-child(3) { transition-delay: 0.2s; }
.animate-on-scroll:nth-child(4) { transition-delay: 0.3s; }
.animate-on-scroll:nth-child(5) { transition-delay: 0.4s; }
.animate-on-scroll:nth-child(6) { transition-delay: 0.5s; }

/* ============================================
   RESPONSIVE / MOBILE
   ============================================ */

/* Tablet */
@media (max-width: 1024px) {
  :root {
    --text-hero: 3rem;
    --text-5xl: 2.5rem;
    --text-4xl: 2rem;
  }

  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .content-with-sidebar {
    grid-template-columns: 1fr;
  }

  .sidebar {
    order: -1;
  }
}

/* Mobile */
@media (max-width: 768px) {
  :root {
    --text-hero: 2.5rem;
    --text-5xl: 2rem;
    --text-4xl: 1.75rem;
    --text-3xl: 1.5rem;
  }

  .container {
    padding: 0 1rem;
  }

  .section {
    padding: 3rem 0;
  }

  /* Header mobile */
  .topbar {
    display: none;
  }

  .header-content {
    height: 60px;
  }

  .nav {
    display: none;
  }

  .burger {
    display: flex;
  }

  .mobile-cta-bar {
    display: none;
  }

  /* Hero mobile */
  .hero {
    min-height: 80vh;
    padding: 2rem 0;
  }

  .hero h1 {
    font-size: var(--text-hero);
  }

  .hero-buttons {
    flex-direction: column;
  }

  .hero-features {
    flex-direction: column;
    gap: 1rem;
  }

  /* Grids mobile */
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  /* Cards mobile */
  .card {
    padding: 1.25rem;
  }

  /* Dropdown disable на mobile */
  .dropdown-menu {
    display: none !important;
  }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.text-center {
  text-align: center;
}

.text-accent {
  color: var(--color-accent);
}

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

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

/* ============================================
   КОНЕЦ ФАЙЛА
   ============================================ */
