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

:root {
  --black: #1a1a1a;
  --white: #ffffff;
  --gray-light: #f5f5f5;
  --gray-mid: #e0e0e0;
  --gray-text: #888888;
  --accent-green: #7bc144;
  --accent-orange: #e87722;
  --accent-red: #c0392b;
  --font-main: 'Montserrat', sans-serif;
  --nav-h: 56px;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-main);
  color: var(--black);
  background: var(--white);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { display: block; width: 100%; height: 100%; object-fit: cover; }

a { text-decoration: none; color: inherit; }

ul { list-style: none; }

/* ===== PLACEHOLDER IMAGE (если нет картинки) ===== */
.img-placeholder {
  background: var(--gray-mid);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-text);
  font-size: 12px;
  letter-spacing: 0.05em;
  position: relative;
  overflow: hidden;
}
.img-placeholder::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 10px,
    rgba(0,0,0,0.03) 10px,
    rgba(0,0,0,0.03) 20px
  );
}

/* ===== IMAGE CONTAINERS ===== */
.hero__bg,
.project-card__img,
.portfolio-hero__bg,
.portfolio-card__img {
  position: relative;
  overflow: hidden;
}

/* hero и карточки проектов — обычный img на всю высоту блока */
.hero__bg img,
.project-card__img img,
.portfolio-hero__bg img,
.portfolio-card__img img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* catalog-card использует padding-top трюк — img абсолютный */
.catalog-card__img-wrap {
  position: relative;
  overflow: hidden;
}
.catalog-card__img-wrap img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.contacts-map__placeholder {
  overflow: hidden;
}
.contacts-map__placeholder img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ===== NAVBAR ===== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  border-bottom: 1px solid var(--gray-mid);
  height: var(--nav-h);
  display: flex;
  align-items: center;
}
.navbar__inner {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.navbar__left,
.navbar__right {
  display: flex;
  align-items: center;
  gap: 28px;
}
.navbar__logo {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--black);
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}
.navbar__link {
  font-size: 13px;
  font-weight: 400;
  color: var(--black);
  transition: opacity 0.2s;
  white-space: nowrap;
}
.navbar__link:hover { opacity: 0.55; }
.navbar__link.active { text-decoration: underline; text-underline-offset: 3px; }

/* ===== SECTION TITLE ===== */
.section-title {
  text-align: center;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 32px;
}
.section-title--line::after {
  content: '';
  display: block;
  width: 48px;
  height: 2px;
  background: var(--black);
  margin: 10px auto 0;
}

/* ===== COLOR DOTS ===== */
.color-dots {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 4px;
  font-size: 12px;
  color: var(--gray-text);
}
.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}
.dot--gray   { background: #9e9e9e; }
.dot--orange { background: var(--accent-orange); }
.dot--red    { background: var(--accent-red); }
.dot--black  { background: #222; }
.dot--green  { background: var(--accent-green); }
.dot--yellow { background: #f5c518; }
.dot--blue   { background: #2980b9; }
.dot--purple { background: #8e44ad; }

/* ===== ARROW BTN ===== */
.arrow-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--gray-mid);
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.2s, border-color 0.2s;
}
.arrow-btn:hover { background: var(--black); border-color: var(--black); }
.arrow-btn:hover svg path { stroke: var(--white); }
.arrow-btn svg { width: 14px; height: 14px; }

/* ===== FOOTER ===== */
.footer {
  background: var(--black);
  color: rgba(255,255,255,0.5);
  font-size: 11px;
  text-align: center;
  padding: 14px 24px;
}

/* ===== MOBILE MENU — скрыт по умолчанию ===== */
.mobile-menu {
  display: none;
}

/* ===== BURGER — скрыт по умолчанию ===== */
.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
}
.burger span {
  width: 22px; height: 2px;
  background: var(--black);
  border-radius: 2px;
  transition: 0.3s;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .navbar__left,
  .navbar__right { display: none; }
  .navbar__logo { position: static; transform: none; }
  .burger { display: flex; }

  .mobile-menu {
    display: flex;
    position: fixed;
    inset: var(--nav-h) 0 0 0;
    background: var(--white);
    z-index: 99;
    flex-direction: column;
    padding: 32px 24px;
    gap: 24px;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
  }
  .mobile-menu.open { transform: translateX(0); }
  .mobile-menu .navbar__link { font-size: 18px; font-weight: 500; }
  .site-footer__inner { grid-template-columns: 1fr !important; gap: 24px !important; }
  .footer-bottom { flex-direction: column; gap: 6px; text-align: center; }
}

.site-footer {
  background: var(--black);
  color: rgba(255,255,255,0.85);
  padding: 48px 24px 0;
}
.site-footer__inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 280px 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
}
.footer-brand__logo {
  font-size: 20px;
  font-weight: 700;
  color: var(--white);
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}
.footer-brand__address,
.footer-brand__hours {
  font-size: 13px;
  color: rgba(255,255,255,0.55);
  line-height: 1.7;
}
.footer-brand__hours { margin-top: 10px; }
.footer-nav h4,
.footer-products h4 {
  font-size: 13px;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 14px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.footer-nav ul,
.footer-products ul {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.footer-nav ul li a,
.footer-products ul li a {
  font-size: 13px;
  color: rgba(255,255,255,0.55);
  transition: color 0.2s;
}
.footer-nav ul li a:hover,
.footer-products ul li a:hover { color: var(--white); }
.footer-products ul li a.green { color: var(--accent-green); }

.footer-map {
  height: 180px;
  background: var(--gray-mid);
  position: relative;
  margin: 0 0 0;
}
.footer-map__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}
.footer-map__placeholder {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px 32px;
}
.footer-map__placeholder .img-placeholder {
  height: 180px;
  border-radius: 4px;
}
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 16px 24px;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: rgba(255,255,255,0.35);
}
