:root{
  --accent: #d10202;
  --bg: #000000;
  --text: #ffffff;
  --muted: #858585;
  --container: 1100px;
  --max-width: 1200px;
  font-synthesis: none;
}

*{box-sizing:border-box}
html,body{height:100%; margin:0; padding:0; font-family: "Inter Tight", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial; color:var(--text); background:var(--bg);}
.container{max-width:var(--container); margin:0 auto; padding:1rem;}

.header, .site-header, .site-footer { background: #272727; }
.site-header { border-bottom:1px solid #272727; }
.site-header .header-inner { display:flex; align-items:center; gap:1rem; justify-content:space-between; padding:1rem; }
.logo { font-weight:700; font-size:1.25rem; color:var(--text); text-decoration:none; }
.logoimg { border-radius: 20px; width: 60px;}
.banner { display: flex; justify-content: center; align-items: center; width: 100%; height: 600px; }
.banner img { max-width: 100%; max-height: 100%; object-fit: contain; object-position: center center; }
.main-nav a { margin-left:1rem; color:var(--muted); text-decoration:none; }

/* Галерея миниатюр */
.gallery img {
  width: 200px;
  margin: 10px;
  cursor: pointer;
  border-radius: 6px;
  transition: transform 0.2s ease;
}

.gallery a {
  text-decoration: none;
}

.gallery img:hover {
  transform: scale(1.05);
}

/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  justify-content: center;
  align-items: center;
  z-index: 9999;
  animation: fadeIn 0.3s ease;
}

.lightbox img {
  max-width: 90%;
  max-height: 90%;
  border-radius: 8px;
  transition: opacity 0.4s ease;
  opacity: 1;
}

.lightbox.fade-out img {
  opacity: 0;
}

/* Кнопка закрытия */
.lightbox-close {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 40px;
  color: white;
  cursor: pointer;
  user-select: none;
}

/* Стрелки */
.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  font-size: 50px;
  color: white;
  cursor: pointer;
  user-select: none;
  padding: 10px;
  transform: translateY(-50%);
}

.lightbox-prev { left: 30px; }
.lightbox-next { right: 30px; }

.lightbox-prev:hover,
.lightbox-next:hover,
.lightbox-close:hover {
  color: #ff4444;
}

/* Анимации */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}


.lightbox-prev { left: 30px; }
.lightbox-next { right: 30px; }

.lightbox-prev:hover,
.lightbox-next:hover,
.lightbox-close:hover {
  color: #ff4444;
}

/* Анимации */
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes zoomIn {
  from { transform: scale(0.8); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}


.hero { padding:3rem 0; background: linear-gradient(90deg, rgba(209,2,2,0.06), rgba(209,2,2,0.02)); }
.hero h1 { margin:0 0 .5rem; font-size:2rem; }

.btn {
  display: inline-block;
  padding: 0.6rem 1.2rem;
  background-color: #d32f2f; /* красный */
  color: white;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 2px 6px rgba(211, 47, 47, 0.5);
}

.btn:hover,
.btn:focus {
  background-color: #b71c1c; /* темнее красный */
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(183, 28, 28, 0.7);
  outline: none;
}


.cards { display:grid; grid-template-columns:repeat(auto-fit,minmax(200px,1fr)); gap:1rem; margin-top:1.5rem; }
.card { background:#272727; padding:1rem; border-radius:8px; box-shadow:0 1px 4px rgba(16,24,40,0.04); display:flex; flex-direction:column; gap:.5rem; }
.card img { width:100%; height:140px; object-fit:cover; border-radius:6px; background:#272727; }
.card h3 { margin:.25rem 0; }
.card p { color:var(--muted); margin:0; }

.gallery-grid__wrapper { display:grid; grid-template-columns:repeat(auto-fit,minmax(180px,1fr)); gap:10px; margin-top:1rem; }
.gallery-grid__item img { width:100%; height:150px; object-fit:cover; border-radius:6px; }

.how_we_work__container { display:grid; grid-template-columns: 1fr 1fr; gap:1rem; align-items:center; padding:2rem 0; }
.how_we_work__item { background:#272727; padding:1rem; border-radius:8px; box-shadow:0 1px 4px rgba(16,24,40,0.04); margin-bottom: 10px; }

.contacts .contact-item { background:#272727; padding:1rem; border-radius:8px; }

.site-footer { border-top:1px solid #272727; padding:1.5rem 0; margin-top:2rem; }
.site-footer .container { display:flex; gap:1rem; align-items:flex-start; justify-content:space-between; flex-wrap:wrap; }



.cards .card {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.6s forwards;
  animation-delay: var(--delay);
}

/* Задержки */
.cards .card:nth-child(1) { --delay: 0s; }
.cards .card:nth-child(2) { --delay: 0.1s; }
.cards .card:nth-child(3) { --delay: 0.2s; }
.cards .card:nth-child(4) { --delay: 0.3s; }
.cards .card:nth-child(5) { --delay: 0.4s; }
.cards .card:nth-child(6) { --delay: 0.5s; }
.cards .card:nth-child(7) { --delay: 0.6s; }
.cards .card:nth-child(8) { --delay: 0.7s; }
.cards .card:nth-child(9) { --delay: 0.8s; }
.cards .card:nth-child(10) { --delay: 0.9s; }
.cards .card:nth-child(11) { --delay: 1s; }
.cards .card:nth-child(12) { --delay: 1.1s; }
.cards .card:nth-child(13) { --delay: 1.2s; }
.cards .card:nth-child(14) { --delay: 1.3s; }
.cards .card:nth-child(15) { --delay: 1.4s; }

/* Анимация */
@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ====== КАРТОЧКИ С ИКОНКАМИ ====== */
.card {
  position: relative;
  border-left: 3px solid transparent;
  transition: transform .3s ease, border-color .3s ease;
}

.card:hover {
  transform: translateY(-4px);
  border-left-color: var(--accent);
}

.card-icon {
  width: 42px;
  height: 42px;
  margin-bottom: .75rem;
  color: var(--accent);
}

.card-icon svg {
  width: 100%;
  height: 100%;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

/* ====== КРАСНЫЕ ЗАГОЛОВКИ С ЛИНИЕЙ ====== */
section > h2 {
  position: relative;
  padding-left: 14px;
  margin-top: 3rem;
}

section > h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.2em;
  width: 4px;
  height: 1.2em;
  background: var(--accent);
  border-radius: 2px;
}

/* ====== HERO УСИЛЕНИЕ ====== */
.hero {
  border-left: 4px solid var(--accent);
  padding-left: 1.5rem;
}

/* ====== CTA ====== */
.cta {
  margin: 3rem 0;
  padding: 2rem;
  background: linear-gradient(
    90deg,
    rgba(209,2,2,0.12),
    rgba(209,2,2,0.02)
  );
  border-radius: 10px;
  text-align: center;
}

/* ============================= */
/* ===== СТРАНИЦА УСЛУГ ======= */
/* ============================= */

/* Сетка услуг */
.services-grid {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

/* Карточка услуги как ссылка */
.service-card {
  text-decoration: none;
  color: var(--text);
  cursor: pointer;
  overflow: hidden;
  position: relative;
}

/* Акцентная линия сверху */
.service-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 8px;
  border: 1px solid transparent;
  transition: border-color .3s ease;
  pointer-events: none;
}

/* Hover-эффекты */
.service-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.4);
}

.service-card:hover::before {
  border-color: rgba(209,2,2,0.6);
}

/* Заголовок услуги */
.service-card h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  transition: color .3s ease;
}

.service-card:hover h3 {
  color: var(--accent);
}

/* Описание */
.service-card p {
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--muted);
}

/* Небольшая стрелка-индикатор */
.service-card::after {
  content: "→";
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  font-size: 1.2rem;
  color: var(--accent);
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity .3s ease, transform .3s ease;
}

.service-card:hover::after {
  opacity: 1;
  transform: translateX(0);
}

/* HERO для страницы услуг */
.hero {
  margin-bottom: 2rem;
}

.hero p {
  max-width: 640px;
  color: var(--muted);
}

/* CTA на странице услуг */
.cta {
  box-shadow: 0 10px 40px rgba(0,0,0,0.35);
}

.cta h2 {
  margin-top: 0;
}

.cta p {
  color: #ddd;
}


/* ================= HEADER UPGRADE ================= */

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(39,39,39,0.95);
  backdrop-filter: blur(6px);
  box-shadow: 0 6px 20px rgba(0,0,0,.35);
}

.header-inner {
  min-height: 72px;
}

/* ЛОГО */
.logo {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 0.3px;
}

.logoimg {
  width: 52px;
  height: 52px;
  object-fit: cover;
  border-radius: 14px;
  border: 2px solid rgba(255,255,255,0.08);
}

/* НАВИГАЦИЯ */
.main-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.main-nav a {
  position: relative;
  font-weight: 500;
  color: var(--muted);
  padding: .25rem 0;
  transition: color .3s ease;
}

.main-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width .3s ease;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--text);
}

.main-nav a:hover::after,
.main-nav a.active::after {
  width: 100%;
}

/* КНОПКА МЕНЮ */
.menu-toggle {
  display: none;
  font-size: 26px;
  background: transparent;
  border: none;
  color: var(--text);
  cursor: pointer;
  transition: transform .3s ease;
}

.menu-toggle:hover {
  transform: scale(1.1);
}


/* АНИМАЦИЯ */
@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}


/* ===== CONTACTS PAGE ===== */

.contacts h1 {
  margin-bottom: .5rem;
}

.contacts__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-top: 2rem;
}

.worktime ul {
  padding-left: 1rem;
  margin: .5rem 0 0;
}

.worktime li {
  margin-bottom: .25rem;
}

/* Кнопка телефона */
.btn-phone {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  margin-top: .25rem;
}

/* Языки */
.lang-switch {
  display: flex;
  gap: 6px;
}

.lang-switch button {
  background: transparent;
  border: 1px solid #444;
  color: #fff;
  padding: 4px 8px;
  cursor: pointer;
  font-size: 12px;
}

.lang-switch button.active,
.lang-switch button:hover {
  background: #ff0000;
  color: #000;
}

/* ===== MAP FIX (old browsers safe) ===== */

.map-box {
  position: relative;
  width: 100%;
  padding-top: 100%;
  border-radius: 8px;
  overflow: hidden;
  background: #111;
}

.map-box iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* МОБИЛЬНАЯ ВЕРСИЯ */
@media (max-width: 900px) {

  .menu-toggle {
    display: block;
  }

  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #1f1f1f;
    flex-direction: column;
    align-items: flex-start;
    padding: 1rem;
    gap: 1rem;
    display: none;
    border-top: 1px solid #333;
  }

  .main-nav.open {
    display: flex;
    animation: slideDown .3s ease;
  }

  .main-nav a {
    width: 100%;
    padding: .5rem 0;
    font-size: 1.05rem;
  }

  .map-box {
    padding-top: 75%; /* 4:3 */
  }

  .contacts__inner {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
}