:root {
  --bg-body: #f4eee2;        /* тёплый кремовый фон */
  --bg-main: #ffffff;        /* белый фон блоков */
  --text-main: #111111;
  --text-muted: #555555;
  --accent: #222222;
  --border-soft: #dddddd;
  --shadow-soft: 0 8px 25px rgba(0, 0, 0, 0.08);
  --max-width: 1100px;
  --radius-card: 18px;
}

/* Сброс/базовые */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg-body);
  color: var(--text-main);
  line-height: 1.5;
}

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

/* Общий контейнер */

.page-wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 18px 18px 40px;
}

/* ---------- HEADER ---------- */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}

.site-logo {
  width: 90px;              /* чуть крупнее */
  cursor: zoom-in;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.12));
}

/* Увеличение логотипа по клику */
.site-logo.logo-zoom {
  transform: scale(2.7);
  transform-origin: top left;
  cursor: zoom-out;
  z-index: 999;
}

/* Чтобы увеличенный логотип не обрезался */
.site-header {
  overflow: visible;
}

.brand-text {
  display: flex;
  flex-direction: column;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.brand-text strong {
  font-size: 14px;
}

/* Навигация */

.main-nav {
  display: flex;
  gap: 20px;
  font-size: 14px;
}

.main-nav a {
  text-decoration: none;
  color: var(--text-main);
  position: relative;
  padding-bottom: 4px;
}

.main-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.2s ease;
}

.main-nav a:hover::after {
  width: 100%;
}

.main-nav a.active {
  font-weight: 600;
}

/* ---------- HERO (главный экран) ---------- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1.1fr);
  gap: 40px;
  align-items: stretch;
  margin-bottom: 40px;
}

.hero-text h1 {
  font-size: 38px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 18px;
}

.hero-text h1 span {
  display: block;
}

.hero-subtitle {
  font-size: 16px;
  margin-bottom: 6px;
}

.hero-description {
  font-size: 15px;
  color: var(--text-muted);
}

.hero-image {
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  background: #000;
}

.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------- Два больших блока на главной ---------- */

.main-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin-bottom: 40px;
}

.big-card {
  background: var(--bg-main);
  border-radius: var(--radius-card);
  padding: 26px 24px 24px;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(0, 0, 0, 0.03);
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.big-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.12);
  border-color: rgba(0, 0, 0, 0.08);
}

.big-card-icon {
  font-size: 26px;
  margin-bottom: 10px;
}

.big-card-title {
  font-size: 20px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 10px;
}

.big-card-text {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 18px;
}

.big-card-link {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

/* ---------- Карточки (внутренние страницы) ---------- */

.section {
  margin-bottom: 40px;
}

.section-header {
  margin-bottom: 18px;
}

.section-kicker {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.section-title {
  font-size: 26px;
  text-transform: uppercase;
  letter-spacing: 0.10em;
  margin-bottom: 6px;
}

.section-lead {
  font-size: 14px;
  color: var(--text-muted);
}

/* Сетка карточек */

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

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

.service-card,
.project-card {
  background: var(--bg-main);
  border-radius: var(--radius-card);
  padding: 18px 18px 16px;
  border: 1px solid rgba(0, 0, 0, 0.04);
  box-shadow: var(--shadow-soft);
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.service-card:hover,
.project-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.12);
  border-color: rgba(0, 0, 0, 0.1);
}

/* ОБЩИЕ ПРЕВЬЮ В КАРТОЧКАХ
   высоту можно менять — это влияет на обрезку */

.card-image {
  border-radius: 14px;
  overflow: hidden;
  height: 190px;          /* ГЛАВНЫЕ ПРОЕКТЫ (4 модуля, 3 ремонта) */
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center; /* по центру по умолчанию */
}

/* СПЕЦИАЛЬНЫЕ ПРЕВЬЮ ДЛЯ КАТЕГОРИЙ
   (Container-Umbau & Kioske, Metallbau & kleine Umbauten)
   Здесь можно регулировать И высоту, И сдвиг по вертикали. */

/* высота превью категорий */
.card-image--low,
.card-image--mid {
  height: 170px;          /* сделаны чуть ниже, можно поставить 160 / 180 / 190 */
}

/* сдвиг картинки по вертикали:
   больше процент = сильнее вниз = МЕНЬШЕ НЕБА */
.card-image--low img {
  object-position: center 60%;   /* склад / серый контейнер: меньше неба, больше здания */
}

.card-image--mid img {
  object-position: center 45%;   /* киоск и блоки металлоконструкций */
}

.card-title {
  font-size: 16px;
  font-weight: 600;
}

.card-tagline {
  font-size: 13px;
  color: var(--text-muted);
}

.card-meta {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-muted);
}

/* ---------- Блок "Контакты & О нас" ---------- */

.footer-section {
  margin-top: 20px;
  padding-top: 24px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 24px;
  margin-bottom: 18px;
}

.footer-title {
  font-size: 22px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin-bottom: 10px;
}

.footer-subtitle {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.footer-text {
  font-size: 14px;
  color: var(--text-muted);
}

.contact-list {
  list-style: none;
  font-size: 14px;
}

.contact-list li + li {
  margin-top: 4px;
}

.contact-list a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px dotted rgba(0, 0, 0, 0.4);
}

.contact-list a:hover {
  border-bottom-style: solid;
}

.contact-whatsapp {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #128C7E;
  text-decoration: none;
  border-bottom: 1px dotted rgba(18, 140, 126, 0.7);
}

.contact-whatsapp:hover {
  border-bottom-style: solid;
}

.contact-whatsapp img {
  width: 18px;
  height: 18px;
  display: block;
}

/* Кнопка "Написать e-mail" */

.btn-email {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  margin-top: 8px;
  border-radius: 999px;
  border: none;
  background: #111111;
  color: #ffffff;
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.18s ease, transform 0.1s ease, box-shadow 0.18s ease;
}

.btn-email:hover {
  background: #000000;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
  transform: translateY(-1px);
}

/* Нижняя полоска */

.footer-bottom {
  font-size: 12px;
  color: var(--text-muted);
}

/* ---------- ADAPTIVE ---------- */

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .hero-image {
    order: -1;
    max-height: 340px;
  }

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

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

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

@media (max-width: 640px) {
  .site-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .main-nav {
    flex-wrap: wrap;
    gap: 12px;
    font-size: 13px;
  }

  .hero-text h1 {
    font-size: 30px;
  }

  .card-grid,
  .card-grid.two {
    grid-template-columns: 1fr;
  }

  .page-wrap {
    padding-inline: 14px;
  }
}

/* =========================
   ПРОЕКТ-СТРАНИЦЫ (ГАЛЕРЕЯ + ВИДЕО)
   ========================= */

.back-link {
  font-size: 13px;
  margin-bottom: 8px;
}

.back-link a {
  text-decoration: underline;
  color: #4b5563;
}

.back-link a:hover {
  color: #111827;
}

.project-header h1 {
  margin: 0 0 8px;
  font-size: 26px;
}

.project-meta {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #6b7280;
  margin-bottom: 4px;
}

.project-text {
  font-size: 14px;
  line-height: 1.7;
  max-width: 760px;
}

/* Галерея картинок */

.gallery {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.gallery img {
  border-radius: 16px;
  height: 210px;
  object-fit: cover;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.16);
}

/* Видео (YouTube-вставка) */

.video-wrap {
  margin-top: 18px;
  position: relative;
  padding-bottom: 56.25%; /* 16:9 */
  height: 0;
  overflow: hidden;
  border-radius: 18px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.18);
}

.video-wrap iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Чтобы вся карточка была кликабельной */

.card-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.card-link:hover .card {
  transform: translateY(-2px);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.18);
}

.card {
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

/* Адаптив для галереи */

@media (max-width: 900px) {
  .gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .gallery {
    grid-template-columns: minmax(0, 1fr);
  }

  .gallery img {
    height: 220px;
  }
}

/* ======================
   Lightbox für Galerien
   ====================== */

.gallery img {
  cursor: zoom-in;
}

/* Оверлей */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.lightbox.is-open {
  display: flex;
}

/* Картинка внутри lightbox */
.lightbox-img {
  max-width: 90vw;
  max-height: 90vh;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

/* Кнопки: закрыть и стрелки */
.lightbox-close,
.lightbox-arrow {
  position: absolute;
  border: none;
  background: none;
  color: #fff;
  font-size: 32px;
  cursor: pointer;
  padding: 8px 12px;
}

.lightbox-close {
  top: 16px;
  right: 20px;
}

.lightbox-arrow {
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-prev {
  left: 20px;
}

.lightbox-next {
  right: 20px;
}

.lightbox-close:focus,
.lightbox-arrow:focus {
  outline: none;
}
/* ===================== BLOG ===================== */

.blog-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 1.5rem 4rem;
}

.blog-header h1 {
  font-size: 2.2rem;
  margin-bottom: 0.5rem;
}

.blog-header p {
  max-width: 700px;
  line-height: 1.5;
  color: #555;
}

/* Крупная карточка сверху */
.blog-featured {
  margin-top: 2rem;
  margin-bottom: 2.5rem;
}

/* Общий вид карточек (по умолчанию – мобильный вид) */
.blog-card {
  display: flex;
  flex-direction: row-reverse; /* картинка справа */
  align-items: stretch;
  background: #ffffff;
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
  gap: 1rem;
}

.blog-card-featured {
  padding: 2rem;
}

.blog-card-image {
  flex: 0 0 120px;
  max-width: 150px;
  overflow: hidden;
  border-radius: 12px;
}

.blog-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.blog-card-content {
  flex: 1;
}

.blog-card-meta {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #999;
}

.blog-card-title {
  font-size: 1.1rem;
  margin: 0.4rem 0 0.4rem;
}

.blog-card-excerpt {
  font-size: 0.95rem;
  line-height: 1.4;
  color: #555;
  margin-bottom: 0.75rem;
}

.blog-card-link {
  font-size: 0.9rem;
  text-decoration: none;
  border: 1px solid #222;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  display: inline-block;
  transition: background 0.2s ease, color 0.2s ease;
}

.blog-card-link:hover {
  background: #222;
  color: #fff;
}

/* Фильтры */
.blog-filters {
  margin-top: 0;
  margin-bottom: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.blog-filter-button {
  border: none;
  background: transparent;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  font-size: 0.9rem;
  cursor: pointer;
  border: 1px solid transparent;
}

.blog-filter-button.active {
  border-color: #222;
  background: #222;
  color: #fff;
}

/* Список карточек (нижние статьи) */
.blog-list {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.blog-card.hidden {
  display: none;
}

/* Десктопная раскладка – 3 колонки */
@media (min-width: 900px) {
  .blog-page {
    padding: 4rem 1.5rem 5rem;
  }

  .blog-featured {
    margin-bottom: 3rem;
  }

  .blog-card {
    flex-direction: column; /* картинка сверху, текст снизу */
  }

  .blog-card-image {
    flex: 0 0 auto;
    max-width: 100%;
    height: 180px;
    margin-bottom: 1rem;
  }

  .blog-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.8rem;
  }
}
