/* ==========================================================================
Cottage Popup — isolated styles for #popup-cottage
Fully independent, no reliance on other popup styles
Uses `ctg-` prefix and `--ctg-` variables
=========================================================================== */

#popup-cottage {
  display: none;
}

#popup-cottage.active {
  display: flex;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  overflow: hidden;
}

/* Фон затемнения */
#popup-cottage .ctg__overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 1;
}

/* Основной контейнер */
#popup-cottage .ctg__frame {
  position: relative;
  max-width: 1080px;
  width: 96%;
  margin: 40px auto;
  border: 2px solid var(--ctg-border);
  background: var(--ctg-bg);
  color: var(--ctg-text);
  border-radius: 12px;
  padding: 24px;
  overflow: hidden;
  box-sizing: border-box;
  z-index: 2;
  display: flex;
  flex-direction: column;
}

/* === Переменные цветов === */
#popup-cottage {
  --ctg-bg: #2a2a2a;
  --ctg-panel: #242424;
  --ctg-text: #fff;
  --ctg-muted: #ccc;
  --ctg-border: rgba(255, 255, 255, 0.35);
  --ctg-accent: #ff0000;
  --ctg-accent-hover: #cc0000;
}

/* === Кнопка "Позвоните нам" === */
.ctg__callwrap {
  display: flex;
  justify-content: center;
  margin-bottom: 10px;
}

.ctg-callbtn {
  display: inline-flex;
  align-items: center;
  gap: 40px;
  background: var(--ctg-accent);
  color: var(--ctg-text);
  border: 2px solid #fff;
  border-radius: 10px;
  padding: 12px 80px;
  font-size: 28px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s ease;
}

.ctg-callbtn:hover {
  background: var(--ctg-accent-hover);
}

.ctg-callbtn__icon img {
  width: 64px;
  height: 64px;
  object-fit: contain;
}

/* === Заголовок и описание === */
.ctg__section-title {
  text-align: center;
  font-size: 36px;
  font-weight: 600;
  margin: 6px 0 14px 0;
}

.ctg__description {
  text-align: center;
  color: var(--ctg-muted);
  font-size: 18px;
  margin-bottom: 16px;
}

/* === Блок 1: Беспроводной умный дом (вся ширина) === */
.ctg__full-row {
  margin-bottom: 12px;
}

/* === Блок 1: Беспроводной умный дом — с фоном-изображением === */
.ctg-card--full {
  border: 2px solid var(--ctg-border);
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  background-image: url('../cottage/goriz.jpg'); /* путь к изображению */
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* Затемнение фона */
.ctg-card--full::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1;
}

/* Контент над фоном */
.ctg-card--full .ctg-card__body {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  padding: 16px;
  gap: 16px;
  color: var(--ctg-text);
}

.ctg-card--full .ctg-card__body {
  display: flex;
  flex-direction: column;
  padding: 16px;
  gap: 16px;
  color: var(--ctg-text);
}

.ctg-card--full .ctg-card__title {
  text-align: center;
  font-size: 25px;
  font-weight: 700;
  margin: 0;
}

.ctg-card--full .ctg-card__lists-wrapper {
  display: flex;
  flex-direction: row;
  gap: 32px;
  justify-content: center;
  flex-wrap: wrap;
  width: 100%;
}

.ctg-card--full .ctg-card__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 20px;
  color: var(--ctg-text);
  text-align: left;
  min-width: 280px;
  max-width: 500px;
  flex: 1;
  padding-left: 40px;
}

.ctg-card--full .ctg-card__list li:before {
  content: "";
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-right: 7px;
  background-image: url('../cottage/galka.webp');
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  vertical-align: middle;
}

.ctg-card--full .ctg-card__meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
  margin-top: 10px;
}

.ctg-card--full .ctg-card__price {
  font-size: 22px;
  font-weight: 700;
  color: #ffffff;
  margin: 0;
}

.ctg-card--full .ctg-card__note {
  font-size: 14px;
  color: #ffffffcc;
  margin: 0;
}

.ctg-card--full .ctg-card__buttons {
  display: flex;
  flex-direction: row;
  gap: 12px;
  margin-top: 12px;
  justify-content: center;
}

.ctg-card--full .ctg-btn {
  min-width: 180px;
  font-size: 18px;
  height: 40px;
}

/* === Гибридная сетка: 2/3 + 1/3 === */
.ctg__hybrid-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 12px;
  width: 100%;
}

/* Левая колонка — два горизонтальных блока */
.ctg__main-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* === Горизонтальные блоки: СКУД и Видеонаблюдение === */
.ctg-card--horizontal {
  border: 2px solid var(--ctg-border);
  border-radius: 8px;
  background: var(--ctg-panel);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.ctg-card--horizontal .ctg-card__body {
  display: flex;
  flex-direction: column;
  padding: 16px;
  gap: 12px;
  color: var(--ctg-text);
}

.ctg-card--horizontal .ctg-card__title {
  text-align: center;
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 8px 0;
  color: var(--ctg-text);
}

.ctg-card__row {
  display: flex;
  gap: 16px;
  width: 100%;
}

.ctg-card__content {
  flex: 1;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ctg-card__content .ctg-card__list {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 18px;
  color: var(--ctg-text);
  display: flex;
  flex-direction: column;
  gap: 6px;
}


.ctg-card__actions {
  flex: 0 0 200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-align: center;
}

.ctg-card__actions .ctg-card__price {
  font-size: 20px;
  font-weight: 700;
  color: #ffffff;
  margin: 0;
}

.ctg-card__actions .ctg-card__note {
  font-size: 13px;
  color: #ffffffcc;
  margin: 0;
}

/* === Кнопки — единый стиль как в popup-apartment === */
.ctg-btn {
  height: 40px;
  padding: 0 14px;
  border-radius: 8px;
  border: 1px solid var(--ctg-border);
  background: #fff;
  color: var(--ctg-accent);
  cursor: pointer;
  font-size: 18px;
  width: 100%;
  font-weight: 500;
  transition: background 0.3s ease;
}

.ctg-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

.ctg-btn--accent {
  background: var(--ctg-accent);
  border: none;
  color: var(--ctg-text);
  transition: background 0.3s ease;
}

.ctg-btn--accent:hover {
  background: var(--ctg-accent-hover);
  color: var(--ctg-text);
}

/* === Правая колонка — вертикальный блок (Охранная сигнализация) === */
.ctg__side-col {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.ctg-card--vertical {
  height: 100%;
  border: 2px solid var(--ctg-border);
  border-radius: 8px;
  background: var(--ctg-panel);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.ctg-card--vertical .ctg-card__body {
  display: flex;
  flex-direction: column;
  padding: 16px;
  gap: 12px;
  color: var(--ctg-text);
}

.ctg-card--vertical .ctg-card__title {
  text-align: center;
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 8px 0;
}

.ctg-card--vertical .ctg-card__list {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 18px;
  color: var(--ctg-text);
  display: flex;
  flex-direction: column;
  gap: 6px;
}


.ctg-card--vertical .ctg-card__list li:before {
  content: "";
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-right: 7px;
  background-image: url('../cottage/galka.webp');
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  vertical-align: middle;
}
.ctg__main-col .ctg-card__list li:before {
  content: "";
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-right: 7px;
  background-image: url('../cottage/galka.webp');
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  vertical-align: middle;
}


.ctg-card--vertical .ctg-card__meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
  margin-top: 10px;
}

.ctg-card--vertical .ctg-card__price {
  font-size: 20px;
  font-weight: 700;
  color: #ffffff;
  margin: 0;
}

.ctg-card--vertical .ctg-card__note {
  font-size: 13px;
  color: #ffffffcc;
  margin: 0;
}

.ctg-card--vertical .ctg-card__buttons {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
  width: 100%;
}

/* === Преимущества внизу === */
.ctg__benefits {
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  background: #ffffff;
  border: 2px solid var(--ctg-accent);
  border-radius: 12px;
  padding: 16px 20px;
  gap: 10px;
  color: #000;
  margin-top: 16px;
}

.ctg-benefit {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  text-align: center;
}

.ctg-benefit__img {
  width: 110px;
  height: 110px;
  object-fit: contain;
}

.ctg-benefit__text {
  font-size: 22px !important;
  color: #000 !important;
  font-weight: 500 !important;
  line-height: 1.3;
}

/* === Кнопка закрытия — всегда с красным фоном === */
.ctg__close {
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--ctg-accent); /* Красный фон всегда */
  color: #fff; /* Белый крестик */
  font-size: 36px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 3;
  transition: background 0.3s ease, transform 0.2s ease;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* При наведении — чуть темнее */
.ctg__close:hover {
  background: var(--ctg-accent-hover); /* #cc0000 */
  transform: scale(1.05);
}

/* Убираем дефолтные стили */
.ctg__close:focus {
  outline: none;
}