/* =========================================================================
   1. Base & Global Styles
   ========================================================================= */

:root {
  --primary-color: #79a78d;
  --text-color: #333;
  --border-radius: 8px;
  --animation-time: 3s;
  --border-style: 2px solid var(--primary-color);
}

/* Сброс и базовая настройка страницы */
body {
  margin: 0;
  font-family: 'Open Sans', sans-serif;
  background-color: #ffffff;
  color: var(--text-color);
  overflow-x: hidden;
}

/* Тело для фоновых слоёв (Tilda) */
.t-body {
  position: relative;
  overflow-x: hidden;
}


/* =========================================================================
   2. Global Background & Animations
   ========================================================================= */

/* Фоновые слои с изображениями и анимацией */
.t-body:before,
.t-body:after,
.bg-image {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  pointer-events: none;
  opacity: 0;
  will-change: opacity, transform;
  animation: backgroundAnimation 15s infinite;
}

/* Первый слой */
.bg-image {
  z-index: -1;
  background-image: url('https://static.tildacdn.com/tild3636-3139-4230-b135-383139326333/DALLE_2025-03-20_225.webp');
  animation-delay: 0s;
}

/* Второй слой */
.t-body:after {
  z-index: -2;
  background-image: url('https://static.tildacdn.com/tild3730-3233-4466-a336-623939643233/DALLE_2025-03-20_181.webp');
  animation-delay: 5s;
}

/* Третий слой */
.t-body:before {
  z-index: -3;
  background-image: url('https://static.tildacdn.com/tild6364-6133-4636-b333-393930663936/Snapshot_1.JPG');
  animation-delay: 10s;
}

/* Анимация появления, увеличения и исчезновения фоновых изображений */
@keyframes backgroundAnimation {
  0% {
    opacity: 0;
    transform: scale(1);
  }
  5% {
    opacity: 1;
    transform: scale(1.02);
  }
  25% {
    opacity: 1;
    transform: scale(1.07);
  }
  35% {
    opacity: 1;
    transform: scale(1.1);
  }
  40% {
    opacity: 0.5;
    transform: scale(1.11);
  }
  45% {
    opacity: 0;
    transform: scale(1.12);
  }
  100% {
    opacity: 0;
    transform: scale(1.12);
  }
}

/* Мобильная версия анимации */
@media screen and (max-width: 768px) {
  @keyframes backgroundAnimation {
    0% {
      opacity: 0;
      transform: scale(1);
    }
    5% {
      opacity: 1;
      transform: scale(1.02);
    }
    25% {
      opacity: 1;
      transform: scale(1.05);
    }
    35% {
      opacity: 1;
      transform: scale(1.07);
    }
    40% {
      opacity: 0.5;
      transform: scale(1.08);
    }
    45% {
      opacity: 0;
      transform: scale(1.1);
    }
    100% {
      opacity: 0;
      transform: scale(1.1);
    }
  }
}

/* Фоновый цвет под всеми слайдами */
body:after {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -4;
  background-color: var(--primary-color);
  pointer-events: none;
}


/* =========================================================================
   3. Global Utility & Decorative Elements
   ========================================================================= */

/* Звёздочка и линии в верхней зоне */
.star-top {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 20px 0;
}

.star-line {
  flex: 1;
  height: 1px;
  background: var(--primary-color);
  opacity: 0.5;
  animation: lineFlow var(--animation-time) ease-in-out infinite;
}

@keyframes lineFlow {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

.star-top svg {
  width: 32px;
  height: 32px;
  fill: #D4AF37;
  margin: 0 10px;
  will-change: transform, filter;
  animation: starEffect 4s ease-in-out infinite;
}

@keyframes starEffect {
  0% { transform: translateY(0) rotate(0deg) scale(1); filter: brightness(1); }
  20% { transform: translateY(-30px) rotate(90deg) scale(1); filter: brightness(1); }
  30% { transform: translateY(-30px) rotate(90deg) scale(1, 0.8); filter: brightness(2); }
  40% { transform: translateY(-30px) rotate(90deg) scale(1); filter: brightness(1); }
  100% { transform: translateY(0) rotate(360deg) scale(1); filter: brightness(1); }
}

/* Эффект отблеска для заголовков (бегущая линия) */
@keyframes shine {
  0% { left: -100%; }
  100% { left: 100%; }
}

/* Анимация пульсации вертикального разделителя */
@keyframes dividerPulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

/* Анимация бегущего разделителя */
@keyframes dividerFlow {
  from { background-position: 0% 50%; }
  to { background-position: 100% 50%; }
}


/* =========================================================================
   4. Contacts Block Components
   ========================================================================= */

/* Контейнер для блока «Контакты» */
.contacts-section {
  padding: 80px 40px;
  background: transparent;
  margin: 0 auto;
  position: relative;
  text-align: center;
}

/* Заголовок "Контакты" */
.contacts-header {
  margin-bottom: 30px;
  text-align: center;
}

.contacts-header h2 {
  font-family: 'Playfair Display', serif;
  font-size: 32px;
  color: var(--primary-color);
  text-transform: uppercase;
  margin: 0 auto;
  padding: 8px 16px;
  border: var(--border-style);
  border-radius: var(--border-radius);
  display: inline-block;
  overflow: hidden;
  position: relative;
}

.contacts-header h2::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(120deg, transparent, rgba(121,167,141,0.4), transparent);
  transform: skewX(-25deg);
  will-change: transform;
  animation: shine var(--animation-time) infinite;
}

/* Блок с названием компании */
.company-block {
  margin-bottom: 60px;
  text-align: center;
}

.company-block h3 {
  font-family: 'Playfair Display', serif;
  font-size: 28px;
  color: var(--primary-color);
  margin: 0 auto;
  padding: 8px 16px;
  border: var(--border-style);
  border-radius: var(--border-radius);
  display: inline-block;
  overflow: hidden;
  position: relative;
}

.company-block h3::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(120deg, transparent, rgba(121,167,141,0.4), transparent);
  transform: skewX(-25deg);
  will-change: transform;
  animation: shine var(--animation-time) infinite;
}

/* Контейнер колонок с контактной информацией и картами */
.contacts-columns {
  display: flex;
  gap: 40px;
  align-items: flex-start;
  flex-wrap: nowrap;
  justify-content: center;
}

.contact-column {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Контактная информация – используем семантический тег  */
address.contact-info {
  padding: 20px;
  background: #ffffff;
  border: var(--border-style);
  border-radius: var(--border-radius);
  box-shadow: 0 2px 8px rgba(121,167,141,0.2);
  min-height: 220px;
  font-style: normal;
}

address.contact-info h3 {
  font-family: 'Playfair Display', serif;
  font-size: 24px;
  color: var(--primary-color);
  margin-bottom: 10px;
}

address.contact-info p {
  font-size: 18px;
  line-height: 1.6;
  color: var(--text-color);
  margin: 0;
}

/* Карты – фиксированный размер и рамка */
.map-container {
  border: var(--border-style);
  border-radius: var(--border-radius);
  overflow: hidden;
  width: 100%;
  height: 350px;
}

.map-container iframe {
  width: 100%;
  height: 100%;
  border: 0;
  loading: lazy;
}

/* Вертикальный разделитель между колонками */
.vertical-divider {
  width: 2px;
  background: linear-gradient(180deg, rgba(121,167,141,0) 0%, var(--primary-color) 50%, rgba(121,167,141,0) 100%);
  margin: 0 20px;
  will-change: opacity;
  animation: dividerPulse var(--animation-time) ease-in-out infinite;
}

/* Адаптивность для блока «Контакты» */
@media (max-width: 640px) {
  .contacts-columns {
    flex-direction: column;
    align-items: center;
  }
  .vertical-divider {
    display: none;
  }
  .contacts-header h2 {
    font-size: 28px;
    padding: 6px 12px;
  }
  .company-block h3 {
    font-size: 22px;
    padding: 6px 12px;
  }
}

/* Специфичные адаптивные правки для некоторых записей */
@media screen and (max-width: 479px) {
  #rec908255905 .t396__artboard,
  #rec908255905 .t396__filter,
  #rec908255905 .t396__carrier {
      height: 2300px;
  }
  #rec908285749 .t396__artboard,
  #rec908285749 .t396__filter,
  #rec908285749 .t396__carrier {
      height: 1780px;
  }
}


/* =========================================================================
   5. Premium Trust Section & Cards Components
   ========================================================================= */

/* Контейнер секции «Premium Trust» */
.premium-trust-section {
  position: relative;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 100px 40px;
  background: transparent;
  z-index: 0;
}

/* Убираем дополнительные фоновые эффекты */
.premium-trust-section::before,
.side-fade {
  display: none;
}

/* Блок заголовка (Header Frame) */
.header-frame {
  max-width: 800px;
  margin: 40px auto;
  padding: 30px 20px;
  background-color: #ffffff;
  border: 3px solid var(--primary-color);
  border-radius: 10px;
  text-align: center;
  box-shadow: 0 2px 10px rgba(121,167,141,0.2);
  position: relative;
  z-index: 1;
}

.header-frame h1 {
  margin: 0;
  font-family: 'Playfair Display', serif;
  font-size: 36px;
  color: var(--primary-color);
  text-transform: uppercase;
  letter-spacing: 2px;
  transition: transform 0.5s ease;
  will-change: color;
  animation: headerColor 6s ease-in-out infinite;
}

@keyframes headerColor {
  0%, 100% { color: var(--primary-color); }
  50% { color: #68a66a; }
}

.header-frame h1 .header-subtitle {
  display: block;
  font-family: 'Playfair Display', serif;
  font-size: 20px;
  color: #555;
  margin-top: 10px;
  letter-spacing: 1px;
  transition: color 0.5s ease, transform 0.5s ease;
}

.header-frame h1 .header-subtitle:hover {
  color: #444;
  transform: translateX(5px);
}

.header-frame h1::after {
  content: "";
  display: block;
  width: 80px;
  height: 2px;
  background: var(--primary-color);
  margin: 16px auto 0;
}

/* Сетка карточек */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto 40px;
  z-index: 1;
  contain: layout style;
}

/* Карточка */
.card {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: var(--border-radius);
  padding: 25px 20px;
  text-align: center;
  transition: transform 0.5s ease, box-shadow 0.5s ease;
  position: relative;
  overflow: hidden;
  will-change: transform;
  animation: cardSway 4s ease-in-out infinite;
}

@keyframes cardSway {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-2px) rotate(0.5deg); }
}

.card:hover {
  transform: scale(1.03) rotate(0.5deg);
  box-shadow: 0 8px 24px rgba(121,167,141,0.3);
}

.card::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 2px solid transparent;
  border-radius: var(--border-radius);
  transition: border 0.5s ease;
  z-index: 1;
}

.card:hover::after {
  border: 2px solid var(--primary-color);
}

/* Иконка карточки */
.card-icon {
  font-size: 48px;
  margin-bottom: 15px;
  background: linear-gradient(45deg, var(--primary-color), var(--primary-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  will-change: transform;
  animation: iconSwing 4s ease-in-out infinite;
  transition: transform 0.5s ease;
}

@keyframes iconSwing {
  0%, 100% { transform: rotate(0deg); }
  50% { transform: rotate(3deg); }
}

.card:hover .card-icon {
  animation: none;
  transform: scale(1.05);
}

/* Заголовок карточки */
.card-title {
  font-size: 22px;
  color: var(--text-color);
  margin: 10px 0;
  position: relative;
  padding-bottom: 8px;
  transition: text-shadow 0.5s ease;
}

.card-title::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 2px;
  background: linear-gradient(90deg, rgba(121,167,141,0) 0%, var(--primary-color) 50%, rgba(121,167,141,0) 100%);
  background-size: 200% 100%;
  will-change: background-position;
  animation: dividerFlow var(--animation-time) linear infinite;
}

.card:hover .card-title {
  text-shadow: 0 0 5px var(--primary-color);
}

/* Описание карточки */
.card-desc {
  font-size: 16px;
  color: #666;
  line-height: 1.6;
  transition: color 0.5s ease;
}

.card:hover .card-desc {
  color: #444;
}

/* Нижний разделитель */
.bottom-separator {
  margin: 60px 0 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  position: relative;
  z-index: 1;
}

.bottom-separator .separator-line {
  height: 1px;
  background: #e0e0e0;
  flex-grow: 1;
  max-width: 150px;
}

.bottom-separator .separator-emblem {
  width: 24px;
  height: 24px;
}

/* Адаптивные правки для секции Premium Trust */
@media (max-width: 992px) {
  .cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .premium-trust-section {
    padding: 40px 10px;
  }
  .header-frame h1 {
    font-size: 28px;
  }
  .header-frame h1 .header-subtitle {
    font-size: 18px;
  }
  .cards-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}