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

body {
  background: #0F1115;
  font-family: 'Manrope', sans-serif;
  color: #A0A6AD;
  padding: 0 128px 48px;
}

/* ── HEADER ── */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 0 32px;
  position: relative;
  z-index: 10;
}

.logo { height: 72px; display: block; filter: drop-shadow(0 4px 12px rgba(0,0,0,.6)); }

.burger {
  display: flex;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
  padding: 4px;
  position: relative;
  z-index: 200;
}

.burger span {
  display: block;
  width: 32px;
  height: 3px;
  background: #fff;
  border-radius: 2px;
  transition: .3s;
}

/* ── OVERLAY MENU ── */
.overlay {
  position: fixed;
  top: 0; left: 0; right: 0;
  bottom: 0;
  z-index: 100;
  pointer-events: none;
  opacity: 0;
  transition: opacity .3s ease;
}

.overlay-bg {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.8);
  cursor: pointer;
}

nav {
  position: absolute;
  top: 0; right: 0;
  width: 380px;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 80px 32px 32px;
  background: #0F1115;
  transform: translateX(100%);
  transition: transform .3s ease;
}
.menu-back {
  display: none;
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  margin-bottom: 16px;
}

#nav-open:checked ~ .overlay { opacity: 1; pointer-events: all; }
#nav-open:checked ~ .overlay nav { transform: translateX(0); }

/* ── NAV CARDS ── */
.nc {
  flex: 1;
  border: 2px solid #D4A373;
  border-radius: 8px;
  background: var(--bg) center / cover no-repeat;
  overflow: hidden;
  position: relative;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nc::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.3);
  transition: background .3s ease;
}

.nc span {
  position: relative;
  z-index: 1;
  color: #fff;
  font-size: 26px;
  font-weight: 700;
  text-align: center;
  line-height: 1.2;
  transition: transform .3s ease;
}

.nc small {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  color: #A0A6AD;
  font-size: 16px;
  font-weight: 500;
  white-space: nowrap;
  text-align: center;
  line-height: 1.4;
  opacity: 0;
  transition: opacity .3s, transform .3s;
  z-index: 2;
}

.nc:hover::before { background: rgba(0,0,0,.8); }
.nc:hover span { transform: scale(.85); }
.nc:hover small { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ── HEADING ── */
h1 {
  color: #fff;
  font-size: 48px;
  font-weight: 700;
  padding-bottom: 10px;
  border-bottom: 2px solid #fff;
  margin-bottom: 32px;
  display: inline-block;
}

.grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 32px;
}

/* layout */
.card:nth-child(1) { grid-column: span 2; }
.card:nth-child(2) { grid-column: span 4; }

.card:nth-child(3),
.card:nth-child(4),
.card:nth-child(5) { grid-column: span 2; }

.card:nth-child(6) { grid-column: span 4; }
.card:nth-child(7) { grid-column: span 2; }

/* heights */
.card { min-height: 260px; }
.card:nth-child(3),
.card:nth-child(4),
.card:nth-child(5) { min-height: 220px; }

/* redefine row 2 as 3-col */
.grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 24px;
}

.card.sm:nth-child(1) { grid-column: 1 / 3; min-height: 260px; }
.card.lg:nth-child(2) { grid-column: 3 / 7; min-height: 260px; }
.card.md:nth-child(3) { grid-column: 1 / 3; min-height: 240px; }
.card.md:nth-child(4) { grid-column: 3 / 5; min-height: 240px; }
.card.md:nth-child(5) { grid-column: 5 / 7; min-height: 240px; }
.card.lg:nth-child(6) { grid-column: 1 / 4; min-height: 260px; }
.card.sm:nth-child(7) { grid-column: 4 / 7; min-height: 260px; }

/* ── CARD BASE ── */
.card {
  border: 2px solid #D4A373;
  border-radius: 8px;
  background: var(--bg) center / cover no-repeat;
  overflow: hidden;
  position: relative;
  text-decoration: none;
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
}

.card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.3);
  transition: background .3s ease;
}

.card span {
  position: relative;
  z-index: 1;
  color: #fff;
  font-size: 36px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: .02em;
  padding: 0 24px 32px;
  transition: transform .3s ease;
}

.card:hover::before { background: rgba(0,0,0,.8); }
.card:hover span { transform: scale(.8); }
.card:hover small { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ── FOOTER ── */
footer { margin-top: 32px; }

hr { width: 1140px; max-width: 100%; margin: 0 auto 32px; border: none; border-top: 1px solid #A0A6AD; }

.foot { display: flex; align-items: center; justify-content: space-between; }
.foot > img { height: 80px; }

.socials { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.socials strong { color: #fff; font-size: 20px; font-weight: 700; letter-spacing: .05em; }

.icons { display: flex; gap: 20px; align-items: center; }
.icons a { display: flex; opacity: .85; transition: opacity .2s; }
.icons a:hover { opacity: 1; }

.phone { display: flex; align-items: center; gap: 12px; color: #fff; text-decoration: none; }
.phone strong { font-size: 24px; font-weight: 700; }

.phone-n {
  text-decoration: none;
  color: #FFFFFF;
  transition: 0.3s;
}

.phone-n:hover {
  color: #A0A6AD;
}

@media (max-width: 1024px) {
  body { padding: 0 48px 40px; }

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

  .card {
    grid-column: span 1 !important;
    min-height: 220px;
  }

  h1 { font-size: 40px; }
}

@media (max-width: 768px) {
  body { padding: 0 32px 32px; }

  .grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .card {
    min-height: 180px;
  }

  h1 { font-size: 32px; }

  .card span {
    font-size: 24px;
  }

  /* прибираємо hover-ефекти (бо їх нема на мобілці) */
  .card:hover span { transform: none; }
  .card:hover::before { background: rgba(0,0,0,.3); }

    .foot { flex-wrap: wrap; }
  .foot > img { height: 60px; order: 1; }
  .phone { order: 2; }
  .phone strong { font-size: 18px; }
  .socials { order: 3; width: 100%; margin-top: 20px; }
  .socials strong { font-size: 16px; }
}
@media (max-width: 768px) {
  .menu-back {
    display: block;
  }
}

@media (max-width: 768px) {
  nav {
    width: 100%;
    transform: translateY(-100%);
  }

  #menu-toggle:checked ~ .overlay nav {
    transform: translateY(0);
  }
}

@media (max-width: 480px) {
  body { padding: 0 20px 24px; }
  h1 { font-size: 28px; }
  .card span { font-size: 20px; }
  .icons { gap: 14px; }
}
