/* =====================================================
   MENU.CSS — спільні стилі для article-сторінок
   (fundament, karkas, dakh, ozdoblenia та подібні)
   ===================================================== */

.article-wrap {
  max-width: 800px;
  margin: 0 auto;
  padding: clamp(40px, 8vw, 80px) var(--gap);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--sage);
  transition: color .2s;
  margin-bottom: 36px;
}
.back-link:hover { color: var(--lime); }

.article-title {
  font-family: var(--font-display);
  font-size: clamp(22px, 3.5vw, 38px);
  font-weight: 900;
  color: var(--charcoal);
  line-height: 1.2;
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 3px solid var(--lime);
}

.article-wrap p {
  font-size: 16px;
  color: var(--mid);
  line-height: 1.8;
  margin-bottom: 20px;
}

.article-wrap h2 {
  font-family: var(--font-display);
  font-size: clamp(18px, 2.5vw, 24px);
  font-weight: 700;
  color: var(--charcoal);
  margin: 44px 0 20px;
}

/* ── Список елементів (el-item) ── */
.elements-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 20px 0 40px;
}
.el-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: var(--cream);
  border-radius: var(--radius-md);
  padding: 16px 20px;
}
.el-item::before {
  content: '';
  display: block;
  width: 4px;
  min-height: 100%;
  background: var(--lime);
  border-radius: 4px;
  flex-shrink: 0;
  align-self: stretch;
}
.el-item__text { font-size: 15px; color: var(--mid); line-height: 1.7; }
.el-item__text strong { color: var(--charcoal); }

/* ── Нумерований список шарів (пиріг даху/підлоги) ── */
.layers-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 20px 0 40px;
  counter-reset: layer-counter;
}
.layer-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  background: var(--cream);
  border-radius: var(--radius-md);
  padding: 14px 20px;
  counter-increment: layer-counter;
}
.layer-item__num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  min-width: 28px;
  background: var(--forest);
  color: var(--white);
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  border-radius: 50%;
  flex-shrink: 0;
}
.layer-item__text { font-size: 15px; color: var(--mid); line-height: 1.7; }
.layer-item__text strong { color: var(--charcoal); }

/* ── Картки фундаменту (foundation-cards / f-card) ── */
.foundation-cards {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin: 20px 0 40px;
}
.f-card {
  background: var(--cream);
  border-radius: var(--radius-lg);
  border-left: 5px solid var(--lime);
  padding: 24px 28px;
}
.f-card__title {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  color: var(--forest);
  margin-bottom: 10px;
}
.f-card p { margin-bottom: 0; font-size: 15px; }

/* ── Чеклист ── */
.checklist {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 20px 0 40px;
}
.checklist li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 15px;
  color: var(--mid);
  line-height: 1.7;
}
.checklist li::before {
  content: '✓';
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 12px;
  color: var(--white);
  background: var(--lime);
  border-radius: 50%;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}
.checklist li strong { color: var(--charcoal); }

/* ── Картки технологій ── */
.tech-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin: 20px 0 40px;
}
.tech-card {
  background: var(--cream);
  border-radius: var(--radius-lg);
  border-top: 4px solid var(--lime);
  padding: 24px 22px;
}
.tech-card__title {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: var(--forest);
  margin-bottom: 12px;
}
.tech-card p { font-size: 14px; margin-bottom: 0; }

/* ── Таблиця матеріалів ── */
.materials-table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0 40px;
  font-size: 15px;
}
.materials-table th {
  background: var(--forest);
  color: var(--white);
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 14px 18px;
  text-align: left;
}
.materials-table th:first-child { border-radius: var(--radius-sm) 0 0 0; }
.materials-table th:last-child  { border-radius: 0 var(--radius-sm) 0 0; }
.materials-table td {
  padding: 14px 18px;
  color: var(--mid);
  border-bottom: 1px solid var(--sand);
  line-height: 1.6;
}
.materials-table td:first-child { font-weight: 600; color: var(--charcoal); }
.materials-table tr:last-child td { border-bottom: none; }
.materials-table tr:nth-child(even) td { background: var(--cream); }

/* ── Форма заявки ── */
.article-form {
  background: #1E2A35;
  border-radius: var(--radius-lg);
  padding: clamp(28px, 5vw, 48px);
  margin-top: 52px;
}
.article-form h3 { color: var(--white); margin-bottom: 8px; }
.article-form > p {
  color: rgba(255,255,255,.6);
  font-size: 15px;
  margin-bottom: 24px;
}
.form-row { display: grid; gap: 16px; margin-bottom: 16px; }
.form-row--2 { grid-template-columns: 1fr 1fr; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label {
  font-size: 11px;
  font-weight: 700;
  color: rgba(255,255,255,.5);
  letter-spacing: .06em;
  text-transform: uppercase;
  font-family: var(--font-display);
}
.form-group input {
  background: rgba(255,255,255,.08);
  border: 1.5px solid rgba(255,255,255,.18);
  border-radius: var(--radius-sm);
  color: var(--white);
  padding: 12px 15px;
  font-size: 15px;
  font-family: var(--font-body);
  outline: none;
  transition: border-color .2s, background .2s;
}
.form-group input::placeholder { color: rgba(255,255,255,.3); }
.form-group input:focus {
  border-color: var(--lime);
  background: rgba(255,255,255,.11);
}
.form-success {
  display: none;
  background: rgba(212,134,42,.12);
  border: 1px solid var(--lime);
  border-radius: var(--radius-md);
  padding: 20px;
  text-align: center;
  margin-top: 16px;
}
.form-success.visible { display: block; }
.form-success h4 { color: var(--lime); margin-bottom: 6px; }
.form-success p  { color: rgba(255,255,255,.7); font-size: 14px; margin-bottom: 0; }
.form-error {
  display: none;
  color: #ff8080;
  font-size: 14px;
  background: rgba(255,70,70,.1);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin-top: 10px;
}
.form-error.visible { display: block; }

.back-link--bottom {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--sage);
  transition: color .2s;
  margin-top: 52px;
}
.back-link--bottom:hover { color: var(--lime); }

/* ── GALLERY ── */
.photo-gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin: 20px 0 44px;
}
.photo-gallery__item {
  aspect-ratio: 4/3;
  overflow: hidden;
  border-radius: var(--radius-md);
  cursor: pointer;
  position: relative;
}
.photo-gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .35s ease;
}
.photo-gallery__item:hover img { transform: scale(1.06); }

/* ── LIGHTBOX ── */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.88);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.lightbox.open { display: flex; }
.lightbox__img {
  max-width: 100%;
  max-height: 90vh;
  border-radius: var(--radius-lg);
  object-fit: contain;
  box-shadow: 0 20px 60px rgba(0,0,0,.5);
}
.lightbox__close {
  position: absolute;
  top: 16px; right: 20px;
  font-size: 36px;
  color: #fff;
  cursor: pointer;
  line-height: 1;
  background: none;
  border: none;
  opacity: .7;
  transition: opacity .2s;
}
.lightbox__close:hover { opacity: 1; }
.lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,.12);
  border: none;
  color: #fff;
  font-size: 28px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s;
}
.lightbox__nav:hover { background: rgba(255,255,255,.25); }
.lightbox__prev { left: 16px; }
.lightbox__next { right: 16px; }

/* ── VIDEOS ── */
.video-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin: 20px 0 44px;
}
.v-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #111;
  position: relative;
  aspect-ratio: 9/16;
  cursor: pointer;
}
.v-card video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.v-card__play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,.28);
  transition: background .2s;
}
.v-card__play svg {
  width: 56px;
  height: 56px;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,.4));
  transition: transform .2s;
}
.v-card:hover .v-card__play { background: rgba(0,0,0,.18); }
.v-card:hover .v-card__play svg { transform: scale(1.1); }
.v-card.playing .v-card__play { display: none; }

/* ── RESPONSIVE ── */
@media (max-width: 640px) {
  .tech-cards { grid-template-columns: 1fr; }
  .materials-table { font-size: 13px; }
  .materials-table th,
  .materials-table td { padding: 10px 12px; }
  .photo-gallery { grid-template-columns: repeat(2, 1fr); }
  .video-grid { grid-template-columns: 1fr; }
  .form-row--2 { grid-template-columns: 1fr; }
  .f-card { padding: 18px 18px; }
}
