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

@font-face {
  font-family: 'Montserrat';
  src: url('/src/font/Montserrat-Regular.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

html, body {
  height: 100%;
}

body {
  display: flex;
  flex-direction: column;
  background: linear-gradient(to bottom, #000000 0%, #27251a 100%);
  font-family: 'Montserrat', -apple-system, BlinkMacSystemFont,
               'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-weight: 400;
  color: #fff;
  font-size: 16px;
  letter-spacing: 2px;
}

.main {
  flex: 1 0 auto;  
  background: linear-gradient(to bottom, #000000 0%, #27251a 100%);
}

.footer {
  flex: 0 0 auto;
  background: linear-gradient(to bottom, #000000 0%, #27251a 100%);
}

/* Универсальный контейнер */
.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 20px;
}

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

.header {
  width: 100%;
  padding: 10px 0;
}

.header-inner {
  display: flex;
  flex-direction: column;      /* логотип сверху, меню снизу */
  align-items: center;         /* всё по центру по горизонтали */
  justify-content: center;
  gap: 10px;
  text-align: center;
}

.header-logo {
  display: block;
}

.header-logo img {
  display: block;
  max-width: 200px;
  width: 100%;
  height: auto;
  margin: 0 auto;              /* явно по центру */
}

.header-nav {
  width: 100%;
}

.header-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;     /* центруем пункты */
  align-items: center;
  list-style: none;
  gap: 10px 20px;
  padding: 0;
  margin: 0;
}

.header-list-item {
  position: relative;
}

.header-link {
  text-decoration: none;
  color: #fff;
  padding: 8px 12px;
  display: block;
  transition: background-color 0.3s, color 0.3s;
}

.header-link:hover {
  background-color: #ffffff;
  color: #706453;
  font-weight: bold;
}

/* Выпадающее меню "Услуги" */

.services-list {
  display: none;
  position: absolute;
  left: 50%;
  transform: translateX(-50%); /* центрируем под родителем */
  background-color: rgba(2, 2, 2, 0.9);
  list-style: none;
  padding: 10px 0;
  margin: 0;
  z-index: 1000;
  min-width: 220px;
  top: 100%;
}

.header-list-item:hover .services-list {
  display: block;
}

.services-list li {
  margin: 0;
}

.services-list a {
  color: #fff;
  text-decoration: none;
  padding: 6px 15px;
  display: block;
}

/* ------------------ ОБЩИЕ ЗАГОЛОВКИ ------------------ */

.section-title.cemeteries-title {
  font-weight: bold;
  text-align: center;
  font-size: 18px;
  color: #ffffff;
  margin-top: 20px;
}

/* ------------------ БЛОК "ПРЕИМУЩЕСТВА" ------------------ */

.benefits {
  position: relative;
  padding: 80px 0 100px;
  background-image: url("../img/first_page.jpg");
  background-size: cover;
  background-position: center;
  overflow: hidden;
}

.benefits::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.6) 0%,
    rgba(0, 0, 0, 0.1) 90%
  );
  z-index: 1;
}

.line-benefits {
  width: 100%;
  height: 4px;
  background-color: #706453;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 2;
}

.benefits-container {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
}

.benefits-content {
  max-width: 480px;
  padding: 20px 25px;
  color: rgba(255, 255, 255, 0.9);
  text-align: left;
  background-color: rgba(0, 0, 0, 0.4);
  border-radius: 12px;
}

.benefits-title {
  margin-bottom: 10px;
}

.benefit-descr {
  text-align: justify;
  margin-bottom: 20px;
}

.benefit-btn {
  display: inline-block;
  padding: 12px 24px;
  background-color: rgba(255, 255, 255, 0.4);
  border: 1px solid rgba(2, 2, 2, 0.8);
  border-radius: 25px;
  cursor: pointer;
  font-size: 16px;
  font-weight: bold;
  color: rgba(2, 2, 2, 0.8);
  text-decoration: none;
  transition: background-color 0.3s;
  text-align: center;
}

.benefit-btn:hover {
  background-color: rgba(255, 255, 255, 0.6);
}

/* Телефон в правом нижнем углу блока преимуществ */

.icon-benefits {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background-color: rgba(0, 0, 0, 0.5);
  border-radius: 12px;
}

.icon-benefits .icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

/* ------------------ БЛОК "ПОЧЕМУ СТОИТ ПОЛОЖИТЬСЯ НА НАС" ------------------ */

#whywe {
  padding: 40px 0;
  background: linear-gradient(to bottom, #000000 0%, #27251a 100%);
}

.blocks-container {
  max-width: 1140px;
  margin: 20px auto 40px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
}

.block {
  flex: 1 1 calc(25% - 20px);
  max-width: 270px;
  min-width: 220px;
  min-height: 250px;
  background: linear-gradient(0deg, #48452e 0%, #010101 90%);
  color: #fff;
  padding: 15px 10px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.top-text {
  text-align: center;
  margin-bottom: 10px;
  padding: 5px;
}

.line {
  width: 100%;
  height: 4px;
  background-color: #706453;
  margin: 8px 0 10px; /* отступ сверху/снизу */
}

.bottom-text {
  text-align: center;
  font-size: 14px;
  overflow: visible;
}


/* ------------------ БЛОК "ЧТО ДЕЛАТЬ, ЕСЛИ УМЕР БЛИЗКИЙ ЧЕЛОВЕК" ------------------ */

.relatives {
  position: relative;
  padding: 60px 0 40px;
  background-image: url("../img/second_page.jpg");
  background-size: cover;
  background-position: center;
}

.background-overlay {
  position: absolute;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.4);
}

.centered-text {
  position: relative;
  text-align: center;
  color: white;
  margin-bottom: 30px;
  z-index: 1;
}

.rectangle-container {
  position: relative;
  z-index: 1;
  max-width: 400px;
  margin: 0 auto;
  padding: 0 20px;
}

.rectangle {
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: 20px;
  background: linear-gradient(
    to right,
    rgba(217, 217, 217, 0.5) 0%,
    rgba(64, 60, 21, 0.5) 100%
  );
  border: 1px solid #3d3d2a;
  margin: 10px 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 10px 15px;
}

.rectangle-title {
  padding-left: 10px;
  padding-top: 5px;
  color: white;
  font-size: 18px;
}

.rectangle-phone {
  color: black;
  font-weight: bold;
  font-size: 20px;
  padding: 10px;
  text-align: center;
}

.step-button {
  background-color: transparent;
  color: white;
  border: none;
  margin-top: 5px;
  padding-left: 10px;
  cursor: default;
}

/* ------------------ БЛОК "КЛАДБИЩА НОВОКУЗНЕЦКА" ------------------ */

.cemeteries {
  position: relative;
  padding: 60px 0 40px;
}

.cemeteries .background-overlay {
  background-color: transparent;
}

.cemeteries .centered-text {
  margin-bottom: 20px;
}

.cemetery-table {
  margin: 20px auto;
  width: 100%;
  max-width: 900px;
  color: white;
  border-radius: 10px;
  overflow: hidden;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  border: 1px solid #706453;
  padding: 10px;
  text-align: left;
}

.map-container {
  display: flex;
  justify-content: center;
  margin-top: 30px;
}

.map-container iframe {
  width: 100%;
  max-width: 100%;
  height: auto;
  min-height: 280px;
  border: none;
}

/* ------------------ ФУТЕР ------------------ */

.footer {
  width: 100%;
  padding: 20px 0 10px;
  border-top: 4px solid #706453;
}

.footer-container {
  max-width: 1140px;
  margin: 0 auto 10px;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
}

.footer-block {
  flex: 1;
  text-align: center;
}

.footer-btn {
  position: relative;
  display: inline-block;
  padding-top: 15px;
  width: 260px;
  height: 50px;
  background-color: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(2, 2, 2, 0.8);
  border-radius: 25px;
  font-size: 16px;
  font-weight: bold;
  color: rgba(2, 2, 2, 0.8);
  text-align: center;
  text-decoration: none;
  transition: background-color 0.3s;
}

.footer-btn:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

.footer-item {
  display: flex;
  align-items: center;
  margin: 0 15px;
}

.icon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  margin-right: 5px;
}

.icon-last {
  margin-top: 20px;
  margin-right: 10px;
}

.footer__text {
  text-align: center;
  font-size: 14px;
}

/* ------------------ ОБЩИЕ СТИЛИ ДЛЯ СЕРВИСНЫХ СТРАНИЦ ------------------ */

.service-details {
  padding: 40px 20px;
  border-radius: 10px;
  color: #fff;
  margin: 20px 0;
}

.service-title {
  font-size: 28px;
  font-weight: bold;
  text-align: center;
  margin-bottom: 20px;
}

.service-description,
.transport-intro,
.service-conclusion {
  font-size: 18px;
  line-height: 1.6;
  margin-bottom: 20px;
}

.transport-title {
  font-size: 24px;
  font-weight: bold;
  margin-top: 30px;
  margin-bottom: 10px;
}

.transport-list {
  list-style-type: none;
  padding: 0;
}

.transport-list li {
  margin-bottom: 20px;
  padding: 10px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 5px;
}

.transport-list li strong {
  font-size: 20px;
  color: #725838;
  font-weight: bold;
  padding: 20px;
}

.transport-list ul {
  margin-left: 20px;
  margin-bottom: 10px;
}

.transport-section {
  display: flex;
  justify-content: space-between;
  margin: 20px 0;
  padding: 10px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
}

.transport-pros,
.transport-cons {
  width: 48%;
}

.transport-pros h4,
.transport-cons h4 {
  margin-bottom: 10px;
  font-size: 20px;
  color: #fff;
}

.transport-pros ul,
.transport-cons ul {
  list-style-type: disc;
  padding-left: 20px;
}

.transport-pros li,
.transport-cons li {
  margin-bottom: 5px;
  color: #fff;
}

.transport-methods-title {
  font-size: 24px;
  margin: 20px 0;
  text-align: center;
  color: #fff;
  width: 100%;
}

.order {
  padding: 10px;
  width: 100%;
}

.service-benefits {
  width: 100%;
}

.contract {
  text-align: center;
  margin-top: 20px;
  margin-bottom: 10px;
}

.contract-ol {
  margin-left: 20px;
  text-align: left;
  width: 100%;
}

.contract-li {
  margin-bottom: 10px;
}

.slider-section {
  padding: 40px 0 20px;
}

.slider-title {
  text-align: center;
  font-size: 24px;
  font-weight: bold;
  margin-bottom: 20px;
}

.slider {
  position: relative;
  max-width: 700px;     /* уменьшаем ширину для комфорта */
  margin: 0 auto;
  overflow: hidden;      /* прячем остальные слайды */
  border-radius: 10px;
}

.slider-wrapper {
  display: flex;         /* ключевой момент – flex по горизонтали */
  transition: transform 0.4s ease;
}

.slide {
  min-width: 100%;       /* каждый слайд занимает всю ширину слайдера */
  box-sizing: border-box;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* масштабирование изображений */
.slide img {
  width: 100%;
  max-height: 450px;     /* ограничиваем высоту, чтобы не были огромные */
  object-fit: cover;     /* обрезать по краям, но заполнить блок */
  display: block;
}

/* Кнопки */
.slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid #706453;
  color: #fff;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.slider-btn.prev {
  left: 10px;
}

.slider-btn.next {
  right: 10px;
}

/* Точки */
.slider-dots {
  text-align: center;
  margin-top: 10px;
}

.slider-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin: 0 4px;
  border-radius: 50%;
  background-color: #706453;
  opacity: 0.4;
  cursor: pointer;
}

.slider-dot.active {
  opacity: 1;
}

.pdf-section {
  padding: 40px 0;
}

.pdf-viewer {
  width: 100%;
  height: 800px;      /* можно сделать меньше/больше */
  border: none;
}

/* ------------------ МЕДИА-ЗАПРОСЫ (МОБИЛКА) ------------------ */

@media (max-width: 768px) {

  .header-inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .header-list {
    flex-direction: column;
    align-items: center;
    width: 100%;
  }

  .header-list-item {
    width: 100%;
    text-align: center;
  }

  .header-link {
    width: 100%;
  }

  .slider-section {
    padding: 20px 0 10px;
  }

  .slider {
    max-width: 100%;     /* на мобилке по ширине экрана */
  }

  .slide img {
    max-height: 300px;   /* чуть ниже на телефонах */
  }

  .slider-btn {
    width: 32px;
    height: 32px;
    font-size: 18px;
  }

  .pdf-viewer {
    height: 500px;
  }

  .pdf-embed {
    display: none;
  }

  .pdf-link-only {
    display: block;
  }

  /* Блок преимуществ */

  .benefits {
    background-image: none;
    padding: 40px 0 30px;
  }

  .benefits-container {
    flex-direction: column;
    align-items: stretch;
  }

  .benefits-content {
    margin: 0;
    width: 100%;
    max-width: 100%;
    padding: 15px;
    font-size: 14px;
    text-align: left;
  }

  .benefit-btn {
    width: 100%;
    height: auto;
    font-size: 14px;
    padding: 10px;
    margin-top: 10px;
  }

  .icon-benefits {
    width: 100%;
    justify-content: center;
    margin-top: 15px;
  }

  /* Блок "почему мы" */

  .blocks-container {
    flex-direction: column;
    align-items: center;
  }

  .block {
    width: 100%;
    max-width: 320px;
  }

  /* Блок "если умер близкий" */

  .relatives {
    padding: 40px 0 30px;
  }

  .rectangle-container {
    max-width: 100%;
    padding: 0 10px;
  }

  .rectangle {
    max-width: 100%;
  }

  /* Таблица кладбищ */

  .cemetery-table {
    width: 95%;
    margin: 20px auto;
    font-size: 14px;
  }

  th,
  td {
    padding: 8px;
  }

  /* Футер */

  .footer-container {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-block {
    width: 100%;
    text-align: left;
    margin-bottom: 15px;
  }

  .footer-btn {
    width: 100%;
  }

    .footer-block:first-child {
    text-align: center;
  }

  .footer-block:first-child .footer-btn {
    margin-left: auto;
    margin-right: auto;
    display: inline-block;
  }

  /* Сервисные страницы */

  .service-details {
    padding: 20px 10px;
  }

  .service-title {
    font-size: 22px;
  }

  .service-description,
  .transport-intro,
  .service-conclusion {
    font-size: 16px;
  }

  .transport-section {
    flex-direction: column;
  }

  .transport-pros,
  .transport-cons {
    width: 100%;
  }

  .work-types {
    list-style-type: none;
    padding: 0;
    margin: 0;
    display: block;
  }

  .work-types li {
    display: block;
    margin-bottom: 12px;
  }

  .toggle-content {
    padding-left: 20px;
    display: none;
    margin-top: 6px;
  }

  .toggle-button {
    cursor: pointer;
    font-weight: bold;
    margin-left: 10px;
  }

  .work-types-container {
    margin-top: 20px;
    padding: 20px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
  }
}
