:root {
  --primary: #ccc;
  --primary-dark: #a5121a;
  --secondary: #f5f5f1;
  --dark: #141414;
  --light: #ccc;
  --color-bg: #141414;
  --color-nav: #141414;
  --color-header: #141414;
  --color-text: #ccc;
  --color-accent: #a5121a;
  --color-border: #a5121a;
  --color-border-light: #ccc;
  --font-main: 'Segoe UI', sans-serif;
  --header-height: 96px;
  --header-height-mobile: 57px;
  --z-header: 1001;
  --z-menu: 1100;
  --transition: all .3s ease;
  --transition-fast: .3s cubic-bezier(.4,0,.2,1);
  --radius: 4px;
}

/* Модальные блоки с видео */
.modal-video-block, .video-container {
  position: relative;
  width: 100%;
  height: 350px;
  min-height: 220px;
  max-height: 380px;
  overflow: hidden;
  border-radius: 1rem 1rem 0 0;
}

.modal-video-block video, .video-container video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 1rem 1rem 0 0;
}

.video-gradient {
  position: absolute;
  bottom: 0; left: 0; right: 0; height: 90px;
  background: linear-gradient(to bottom, rgba(20,20,20,0) 0%, #141414 95%);
  pointer-events: none;
  z-index: 2;
  transition: opacity 0.8s;
}

.modal-video-block .logo,
.logo {
  position: absolute;
  bottom: 2.5rem;
  left: 2.5rem;
  width: 9.375rem;
  filter: drop-shadow(0 2px 10px rgba(0,0,0,0.5));
  z-index: 3;
}

.controls {
  position: absolute;
  bottom: 1.875rem;
  right: 2.5rem;
  display: flex;
  gap: .9375rem;
  z-index: 2;
}

/* Кнопки */
.get-quote-btn, .book-now-btn {
  border: 2px solid var(--color-accent);
  background: none;
  color: var(--color-accent);
  font-weight: 700;
  font-size: 1.13em;
  border-radius: var(--radius);
  padding: 0 32px;
  height: 40px;
  align-items: center;
  cursor: pointer;
  transition: var(--transition-fast);
  margin-left: 0;
}

.get-quote-btn:hover, .book-now-btn:hover {
  background: rgba(229, 9, 20, 0.08);
  color: var(--color-accent);
  border-color: var(--color-accent);
  transform: translateY(-1px);
  opacity: 0.95;
}
.get-quote-btn {
padding: 8px 16px;
}
.book-now-btn {
  padding: 8px 16px;
  background: var(--color-accent);
  color: var(--color-text);
  justify-content: center;
  height: 40px;
  text-decoration: none;
}
.book-now-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}
.badges-group {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.actions-group {
  display: flex;
  align-items: center;
  gap: 1rem;
}

#openModal {
  margin: 2.5rem;
  padding: 1rem 2rem;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border: none;
  color: var(--light);
  border-radius: 50px;
  font-size: 1.125rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  z-index: 1;
}

#openModal::before {
  content: '';
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  z-index: -1; opacity: 0;
  transition: var(--transition);
}

#openModal:hover::before { opacity: 1; }
#openModal:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(229, 9, 20, .4);
}
#openModal:active { transform: translateY(0); }

/* Модалка */
.modal {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  display: none;
  z-index: 9999;
  overflow-y: auto;
  animation: fadeIn .4s forwards;
  backdrop-filter: blur(5px);
}

@keyframes fadeIn { to { opacity: 1; } }

.modal-content {
  width: 100%;
  max-width: 56.25rem;
  margin: 3.75rem auto;
  background: var(--dark);
  border-radius: 1rem;
  overflow: hidden;
  position: relative;
  animation: slideUp .6s ease-out;
  border: 2px solid rgba(255,255,255,0.07);
}

@keyframes slideUp {
  from { transform: translateY(50px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: rgba(255,255,255,.15);
  border: none;
  color: #ccc;
  font-size: 1.5rem;
  font-weight: 200;
  cursor: pointer;
  z-index: 1000;
  display: flex;
  align-items: end;
  justify-content: space-around;
  transition: var(--transition);
  backdrop-filter: blur(5px);
}

.close:hover {
  background: rgba(255,255,255,.25);
  transform: rotate(90deg);
}

/* Контент модалки */
.modal-info {
  padding: 2.5rem;
  margin-top: -20px;
}

.modal-info h2 {
  margin: 40px 0 .9375rem;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.2;
}

.modal-info h3 {
  color: #a5121a;
  margin: 2.5rem 0 1.25rem;
  font-size: 1.5rem;
  font-weight: 600;
  padding-bottom: .625rem;
}

.modal-info p {
  margin: .9375rem 0;
  line-height: 1.7;
}
.modal-info strong { font-weight: 600; }

.price-badge {
  display: inline-flex;
  align-items: center;
  padding: .5rem 1rem;
  border-radius: 3.125rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
  border: 2px solid rgba(255,255,255,0.07);
  height: 40px;
}

.price-table {
  width: 100%;
  border-collapse: separate;    /* Важно для скругления! */
  border-spacing: 0;
  border-radius: 16px;          /* Плавные края */
  overflow: hidden;             /* Скроет всё за пределами */
  border: 2px solid rgba(255,255,255,0.07); /* Внешняя рамка */
  font-size: 1rem;
  margin: 1.875rem 0;
  line-height: 1.6;
}

.price-table td {
  padding: 1.6rem 1.3rem;
  vertical-align: top;
  min-width: 210px;
  border: none;                 /* Убираем стандартные внутренние */
  background: transparent;
  transition: var(--transition, all .3s);
}

/* Горизонтальные разделители между строками */
.price-table tr:not(:last-child) td {
  border-bottom: 1.5px solid rgba(255,255,255,0.13);
}

/* Вертикальные разделители между колонками */
.price-table td:not(:last-child) {
  border-right: 1.5px solid rgba(255,255,255,0.08);
}

/* Скругления по углам */
.price-table tr:first-child td:first-child {
  border-top-left-radius: 16px;
}
.price-table tr:first-child td:last-child {
  border-top-right-radius: 16px;
}
.price-table tr:last-child td:first-child {
  border-bottom-left-radius: 16px;
}
.price-table tr:last-child td:last-child {
  border-bottom-right-radius: 16px;
}

/* Дополнительно для заголовков, если нужны */
.price-table th {
  padding: 1.6rem 1.3rem;
  font-weight: bold;
  color: #ccc;
  border: none;
}

/* Стиль для сильного текста внутри ячейки */
.price-table strong {
  display: block;
  margin-bottom: .75rem;
  font-size: 1.2rem;
  color: #ccc;
}


.highlight-box {
  background: rgba(229, 9, 20, .1);
  border-left: 4px solid var(--primary);
  padding: 1.25rem;
  margin: 1.5625rem 0;
  border-radius: 0 .5rem .5rem 0;
}

/* Карточки и группы */
.service-features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin: 2.5rem 0 0;
}

.feature-card {
  background: none;
  border-radius: 1rem;
  border: 2px solid rgba(255,255,255,0.07);
  padding: 2.2rem 2rem 1.6rem 2rem;
  display: flex;
  flex-direction: column;
  min-height: 320px;
}

.feature-card h4 {
  color: var(--primary);
  font-size: 1.2rem;
  font-weight: 700;
  margin: 0 0 16px 0;
  letter-spacing: -0.02em;
  padding-bottom: 12px;
}
.feature-card > div {
  color: #ccc;
  font-size: 1rem;
  line-height: 1.6;
  font-weight: 400;
}

.badges-group, .actions-group {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.chip-modal {
  display: inline-flex;
  align-items: center;
  color: #ccc;
  border-radius: 26px;
  padding: 0.45em 1.35em 0.45em 1.15em;
  font-size: 1em;
  font-weight: 600;
  border: 2px solid rgba(255,255,255,0.07);
  height: 34px;
}

.chip-modal b {
  color: #ccc;
  font-weight: 700;
  font-size: 1.13em;
}

.common-title {
  margin: 40px 0 18px;
  font-size: 1.4em;
  font-weight: bold;
}

/* FAQ */
.faq-item {
  border-top: 1px solid #333;
  padding: 0 28px;
  cursor: pointer;
  transition: background .15s;
  position: relative;
}
.faq-item:last-child { border-bottom: 1px solid #333; }
.faq-question {
  font-size: 1.2em;
  font-weight: 600;
  padding: 18px 0 12px;
  color: #ccc;
  position: relative;
  cursor: pointer;
  transition: color .2s;
}
.faq-question:hover
.faq-question::after {
  content: '▼';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  font-size: .85em;
  transition: transform .3s;
}
.faq-item:hover .faq-question::after,
.faq-item:focus-within .faq-question::after {
  transform: translateY(-50%) rotate(-180deg);
}
.faq-answer {
  max-height: 0;
  overflow: hidden;
  color: #ccc;
  font-size: 1em;
  transition: max-height .4s cubic-bezier(.4,0,.2,1), padding .3s;
  padding: 0;
  margin-bottom: 0;
  pointer-events: none;
  line-height: 1.7;
}
.faq-item:hover .faq-answer,
.faq-item:focus-within .faq-answer {
  max-height: 400px;
  padding: 8px 0 16px;
  margin-bottom: 14px;
  pointer-events: auto;
}

/* Группы бронирования */
.book-now-container {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

/* === MOBILE ADAPTIVE === */
@media (max-width: 900px) {
  .service-features {
    grid-template-columns: 1fr 1fr;
    gap: 1.2rem;
  }
  .modal-content {
    max-width: 98vw;
    margin: 1.5rem 1vw;
  }
  .modal-info {
    padding: 1.2rem;
  }
  .feature-card {
    min-height: 220px;
    padding: 1.2rem 1rem 1rem 1rem;
  }
}
@media (max-width: 600px) {
  :root {
    --header-height: 57px;
  }

  .modal-content {
    max-width: 99vw;
    margin: 1.2rem 0.5vw;
    border-radius: 1rem;
    padding: 0;
  }

  .modal-info {
    padding: 1rem 0.7rem;
    margin-left: 0;
    margin-right: 0;
  }

  .modal-video-block,
  .video-container {
    height: 170px;
    min-height: 150px;
    border-radius: 1rem 1rem 0 0;
  }

  .modal-video-block .logo,
  .logo {
    width: 6.5rem;
    left: 1rem;
    bottom: 1rem;
  }

  .controls {
    right: 1rem;
    bottom: 1rem;
    gap: .6rem;
  }

  .feature-card {
    min-height: 120px;
    padding: 1rem 0.7rem 0.9rem 0.7rem;
  }

  .service-features {
    grid-template-columns: 1fr;
    gap: 0.7rem;
    margin: 1.1rem 0 0;
  }

  .book-now-container,
  .badges-group,
  .actions-group {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.7rem;
  }

  .price-badge,
  .chip-modal {
    font-size: .97em;
    padding: .3rem .8rem;
    height: 34px;
  }

  .common-title {
    margin: 26px 0 12px;
    font-size: 1.13em;
  }

  .close {
    top: 0.7rem;
    right: 0.7rem;
    width: 1.5rem;
    height: 1.5rem;
    font-size: 1.15rem;
  }

  .book-now-container {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.7rem;
    margin-bottom: 1.1rem;
  }

  .book-now-container .actions-group {
    flex-direction: column;
    gap: 0.6rem;
    width: 100%;
  }

  .book-now-container .book-now-btn,
  .book-now-container .get-quote-btn {
    width: 100%;
    min-width: 0;
    margin: 0 auto;
    text-align: center;
    padding: 10px 0;
    font-size: 1.08em;
    min-height: 44px;
  }

  .book-now-container .badges-group {
    flex-direction: row;
    justify-content: center;
    gap: 0.45rem;
    width: 100%;
    margin-top: 0.4rem;
  }

  .book-now-container .chip-modal {
    font-size: 0.93em;
    padding: 0.7em;
    height: 32px;
  }

  .modal-info h2 {
    margin: 40px 0 .9375rem;
    font-size: 1.3rem;
    font-weight: 700;
    line-height: 1.2;
  }

  .modal-info h3 {
    font-size: 1.3rem;
  }

  .modal-description,
  .highlight-box {
    line-height: 1.5;
  }

  .faq-item {
    padding: 0;
  }

  /* ======= Таблица цен ======= */
  .price-table {
    width: 100%;
    border: 2px solid rgba(255,255,255,0.07);
    border-radius: 14px;
    margin: 1rem 0;
    font-size: 1rem;
    line-height: 1.6;
    box-shadow: 0 3px 24px rgba(20,20,20,0.09);
    border-collapse: separate;
    overflow: hidden;
  }

  .price-table tr {
    display: flex;
    flex-direction: column;
    border-bottom: 1px solid rgba(255, 255, 255, 0.13);
  }
  
  .price-table tr:last-child {
    border-bottom: none; /* Это удалит разделитель у последнего блока */
  }



  .price-table td {
    display: block;
    width: 100% !important;
    border: none !important;
    padding: 0.9rem 1rem;
    box-sizing: border-box;
    position: relative;
  }

  .price-table td + td::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background-color: rgba(255, 255, 255, 0.1);
  }

  .price-table strong {
    display: block;
    margin-bottom: 0.4rem;
  }
}
