/* === ГЛОБАЛЬНЫЕ НАСТРОЙКИ === */
html,
body {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  overflow: hidden; /* 👈 ПОЛНОСТЬЮ СКРЫВАЕМ ПРОКРУТКУ */
  width: 100%;
  height: 100vh;
  min-width: 0;
  background: transparent; /* 👈 ПРОЗРАЧНЫЙ ФОН ДЛЯ IFRAME */
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: #ffffff;
}

*,
*::before,
*::after {
  box-sizing: inherit;
}

/* === ОБНУЛЕНИЕ quote-container === */
.quote-container {
  all: unset;
  display: contents; /* 👈 ЭЛЕМЕНТ ИСЧЕЗАЕТ, СОДЕРЖИМОЕ ОСТАЕТСЯ */
}

/* === КАРТОЧКА ЦИТАТЫ === */
.quote-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  border-radius: 12px;
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  max-width: 600px;
  margin: auto; /* 👈 ЦЕНТРИРОВАНИЕ ВО ВСЕХ НАПРАВЛЕНИЯХ */
  text-align: center;
  overflow-wrap: break-word;
  word-wrap: break-word;
  min-height: 100px; /* 👈 МИНИМАЛЬНАЯ ВЫСОТА ДЛЯ СТАБИЛЬНОСТИ */
  width: calc(100% - 2rem); /* 👈 УЧИТЫВАЕМ ОТСТУПЫ */
  
  /* 👈 ПОЗИЦИОНИРОВАНИЕ ПО ЦЕНТРУ ЭКРАНА */
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* === HOVER ЭФФЕКТ === */
@media (hover: hover) {
  .quote-card:hover {
    transform: translate(-50%, -50%) translateY(-2px); /* 👈 СОХРАНЯЕМ ЦЕНТРИРОВАНИЕ */
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
    background: rgba(255, 255, 255, 0.18);
  }
}

/* === ТЕКСТ ЦИТАТЫ === */
.quote-text {
  font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-style: italic;
  font-weight: 600;
  font-size: 1.4rem;
  line-height: 1.4;
  margin-bottom: 0;
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  
  /* 👈 АНИМАЦИЯ ПОЯВЛЕНИЯ */
  opacity: 0;
  animation: fadeIn 1.2s ease-out forwards;
}

@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.95) translateY(20px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes fadeOut {
  to { opacity: 0; transform: scale(0.95) translateY(-20px); }
}

.quote-card.hidden .quote-text {
  animation: fadeOut 0.6s forwards;
}

/* === МОБИЛЬНАЯ АДАПТАЦИЯ === */
@media screen and (max-width: 768px) {
  .quote-card {
    width: calc(100% - 1rem);
    padding: 1.25rem;
    max-width: 500px;
  }
  
  .quote-text {
    font-size: 1.2rem;
  }
}

@media screen and (max-width: 480px) {
  .quote-card {
    width: calc(100% - 0.5rem);
    padding: 1rem;
  }

  .quote-text {
    font-size: 1rem;
    line-height: 1.3;
  }
}

/* === ЗАЩИТА ОТ ПЕРЕПОЛНЕНИЯ === */
.quote-card * {
  max-width: 100%;
  word-break: break-word;
}