/* ==================== ПОПАП РЕГИСТРАЦИИ - GLASS STYLE ==================== */
:root {
  --popup-green: #4a7c59;
  --popup-green-light: #5d9367;
  --popup-green-dark: #2c5530;
  --popup-glass: rgba(255, 255, 255, 0.75);
  --popup-glass-green: rgba(74, 124, 89, 0.65);
  --popup-shadow: 0 20px 60px rgba(74, 124, 89, 0.25);
  --popup-border-radius: 24px;
  --popup-transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Оверлей */
.registration-popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.registration-popup-overlay.active {
  opacity: 1;
  visibility: visible;
}

.registration-popup-overlay.show-animation {
  animation: fadeInOverlay 0.4s ease-out forwards;
}

@keyframes fadeInOverlay {
  from {
    opacity: 0;
    visibility: hidden;
  }
  to {
    opacity: 1;
    visibility: visible;
  }
}

/* Главный контейнер попапа - EcoDom card style (горизонтальный) */
.registration-popup {
  background: #fff;
  border-radius: 24px;
  border: 1px solid #000;
  max-width: 900px;
  width: 90%;
  max-height: 90vh;
  overflow: hidden;
  box-shadow: 
    0 24px 70px rgba(0, 0, 0, 0.22),
    0 8px 24px rgba(0, 0, 0, 0.12);
  position: relative;
  transform: scale(0.8) translateY(40px);
  transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  display: flex;
  flex-direction: column;
}

.registration-popup::before {
  content: '';
  position: absolute;
  inset: -2px;
  background:
    linear-gradient(135deg, rgba(47, 111, 78, 0.22) 0%, rgba(47, 111, 78, 0.00) 55%),
    linear-gradient(45deg, rgba(127, 176, 105, 0.16) 0%, rgba(127, 176, 105, 0.00) 60%);
  pointer-events: none;
  z-index: 0;
}

.registration-popup::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    135deg,
    rgba(0, 0, 0, 0.04) 0px,
    rgba(0, 0, 0, 0.04) 1px,
    rgba(0, 0, 0, 0.00) 10px,
    rgba(0, 0, 0, 0.00) 18px
  );
  opacity: 0.22;
  pointer-events: none;
  z-index: 0;
}

.registration-popup > * {
  position: relative;
  z-index: 1;
}

.registration-popup-overlay.active .registration-popup {
  transform: scale(1) translateY(0);
}

/* Кнопка закрытия */
.popup-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: #fff;
  border: 1px solid #000;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: #2c3e2d;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.popup-close:hover {
  background: #4a7c59;
  color: #fff;
  transform: rotate(90deg);
  box-shadow: 0 4px 12px rgba(74, 124, 89, 0.3);
}

/* Горизонтальный layout */
.popup-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 500px;
}

/* Левая часть - Логотип и преимущества */
.popup-left {
  padding: 48px 36px;
  background: linear-gradient(135deg, #f8f6f0 0%, #fefefe 100%);
  border-right: 1px solid #000;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.popup-logo-container {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
}

.popup-logo {
  width: 120px;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 4px 12px rgba(74, 124, 89, 0.2));
}

.popup-title {
  font-size: 28px;
  font-weight: 700;
  color: #2c3e2d;
  margin: 0;
  line-height: 1.2;
}

.popup-subtitle {
  font-size: 15px;
  color: #6b7c6e;
  margin: 0 0 24px;
  line-height: 1.5;
}

/* Преимущества */
.popup-benefits {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.popup-benefits li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 16px;
  background: #fff;
  border: 1px solid #000;
  border-radius: 12px;
  transition: all 0.3s ease;
}

.popup-benefits li:hover {
  transform: translateX(4px);
  box-shadow: 0 4px 12px rgba(74, 124, 89, 0.15);
}

.popup-benefits li i {
  color: #4a7c59;
  font-size: 20px;
  margin-top: 2px;
  flex-shrink: 0;
}

.popup-benefits li div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.popup-benefits li strong {
  font-size: 14px;
  font-weight: 700;
  color: #2c3e2d;
}

.popup-benefits li span {
  font-size: 12px;
  color: #6b7c6e;
  line-height: 1.4;
}

/* Статистика */
.popup-stats {
  display: flex;
  gap: 16px;
  margin-top: auto;
}

.stat-item {
  flex: 1;
  text-align: center;
  padding: 16px;
  background: #fff;
  border: 1px solid #000;
  border-radius: 12px;
}

.stat-number {
  font-size: 24px;
  font-weight: 800;
  color: #4a7c59;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 11px;
  color: #6b7c6e;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

/* Правая часть - Форма регистрации */
.popup-right {
  padding: 48px 36px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 24px;
}

.popup-cta {
  text-align: center;
  margin-bottom: 8px;
}

.popup-cta h3 {
  font-size: 24px;
  font-weight: 700;
  color: #2c3e2d;
  margin: 0 0 8px;
}

.popup-cta p {
  font-size: 14px;
  color: #6b7c6e;
  margin: 0;
}

/* Прокрутка для контента */
.popup-content::-webkit-scrollbar {
  width: 6px;
}

.popup-content::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.05);
  border-radius: 10px;
}

.popup-content::-webkit-scrollbar-thumb {
  background: rgba(74, 124, 89, 0.3);
  border-radius: 10px;
}

.popup-content::-webkit-scrollbar-thumb:hover {
  background: rgba(74, 124, 89, 0.5);
}

.popup-benefits {
  list-style: none;
  padding: 0;
  margin: 0 0 28px;
}

.popup-benefits li {
  display: flex;
  align-items: flex-start;
  padding: 14px 16px;
  margin-bottom: 10px;
  font-size: 15px;
  line-height: 1.6;
  color: rgba(0, 0, 0, 0.85);
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 14px;
  transition: all 0.3s ease;
}

.popup-benefits li:hover {
  background: rgba(255, 255, 255, 0.7);
  border-color: rgba(74, 124, 89, 0.3);
  transform: translateX(4px);
  box-shadow: 0 4px 12px rgba(74, 124, 89, 0.1);
}

.popup-benefits li i {
  color: #4a7c59;
  margin-right: 14px;
  margin-top: 2px;
  font-size: 18px;
  flex-shrink: 0;
}

/* Кнопки */
.popup-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 0;
}

.popup-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px 24px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid #000;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  gap: 10px;
  position: relative;
  overflow: hidden;
}

.popup-btn span {
  position: relative;
  z-index: 1;
}

.popup-btn-primary {
  background: #fff;
  color: #4a7c59;
  border-color: #000;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.popup-btn-primary:hover {
  background: #4a7c59;
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(74, 124, 89, 0.3);
  color: #fff;
  text-decoration: none;
}

.popup-btn-secondary {
  background: #fff;
  color: #4a7c59;
  border-color: #000;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.popup-btn-secondary:hover {
  background: #f8f6f0;
  border-color: #000;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.14);
  text-decoration: none;
  color: #4a7c59;
}

.popup-btn-later {
  background: transparent;
  color: #6b7c6e;
  border-color: rgba(0, 0, 0, 0.25);
  font-size: 14px;
  padding: 12px 20px;
  box-shadow: none;
}

.popup-btn-later:hover {
  background: rgba(248, 246, 240, 0.6);
  border-color: rgba(0, 0, 0, 0.35);
  color: #2c3e2d;
  transform: translateY(-1px);
}

/* Футер попапа */
.popup-footer {
  text-align: center;
  padding-top: 20px;
  margin-top: auto;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.popup-footer p {
  margin: 0;
  font-size: 11px;
  color: #6b7c6e;
  line-height: 1.6;
}

.popup-footer a {
  color: #4a7c59;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.2s ease;
}

.popup-footer a:hover {
  color: #2c5530;
  text-decoration: underline;
}

/* Адаптивность */
@media (max-width: 900px) {
  .popup-layout {
    grid-template-columns: 1fr;
    min-height: auto;
  }
  
  .popup-left {
    border-right: none;
    border-bottom: 1px solid #000;
    padding: 36px 28px;
  }
  
  .popup-right {
    padding: 36px 28px;
  }
  
  .popup-stats {
    justify-content: center;
  }
}

@media (max-width: 600px) {
  .registration-popup {
    width: 95%;
    border-radius: 20px;
    max-width: none;
  }
  
  .popup-left,
  .popup-right {
    padding: 28px 20px;
  }
  
  .popup-title {
    font-size: 22px;
  }
  
  .popup-logo {
    width: 100px;
  }
  
  .popup-cta h3 {
    font-size: 20px;
  }
  
  .popup-btn {
    padding: 14px 20px;
    font-size: 15px;
  }
}

@media (max-width: 480px) {
  .registration-popup {
    width: 100%;
    border-radius: 0;
    max-height: 100vh;
  }
  
  .popup-left,
  .popup-right {
    padding: 24px 16px;
  }
  
  .popup-title {
    font-size: 20px;
  }
  
  .popup-logo {
    width: 80px;
  }
  
  .popup-stats {
    flex-direction: column;
    gap: 12px;
  }
}

/* Анимации для появления элементов */
.registration-popup-overlay.active .popup-logo {
  opacity: 0;
  transform: scale(0.8);
  animation: logoFadeIn 0.6s ease 0.2s forwards;
}

@keyframes logoFadeIn {
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.registration-popup-overlay.active .popup-title {
  opacity: 0;
  transform: translateY(-10px);
  animation: fadeInDown 0.5s ease 0.3s forwards;
}

.registration-popup-overlay.active .popup-subtitle {
  opacity: 0;
  transform: translateY(-10px);
  animation: fadeInDown 0.5s ease 0.4s forwards;
}

@keyframes fadeInDown {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.registration-popup-overlay.active .popup-benefits li {
  opacity: 0;
  transform: translateX(-20px);
  animation: slideInLeft 0.4s ease forwards;
}

.registration-popup-overlay.active .popup-benefits li:nth-child(1) { animation-delay: 0.4s; }
.registration-popup-overlay.active .popup-benefits li:nth-child(2) { animation-delay: 0.5s; }
.registration-popup-overlay.active .popup-benefits li:nth-child(3) { animation-delay: 0.6s; }
.registration-popup-overlay.active .popup-benefits li:nth-child(4) { animation-delay: 0.7s; }

@keyframes slideInLeft {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.registration-popup-overlay.active .popup-stats {
  opacity: 0;
  transform: translateY(10px);
  animation: fadeInUp 0.5s ease 0.8s forwards;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.registration-popup-overlay.active .popup-cta {
  opacity: 0;
  transform: translateY(10px);
  animation: fadeInUp 0.5s ease 0.3s forwards;
}

.registration-popup-overlay.active .popup-btn {
  opacity: 0;
  transform: translateY(20px);
  animation: slideInUp 0.4s ease forwards;
}

.registration-popup-overlay.active .popup-btn-primary { animation-delay: 0.5s; }
.registration-popup-overlay.active .popup-btn-secondary { animation-delay: 0.6s; }
.registration-popup-overlay.active .popup-btn-later { animation-delay: 0.7s; }

@keyframes slideInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.registration-popup-overlay.active .popup-footer {
  opacity: 0;
  animation: fadeIn 0.4s ease 0.8s forwards;
}

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

/* Эффект фокуса для доступности */
.popup-btn:focus,
.popup-close:focus {
  outline: 3px solid rgba(74, 124, 89, 0.4);
  outline-offset: 2px;
}

/* Темная тема (если нужно) */
@media (prefers-color-scheme: dark) {
  .registration-popup {
    background: rgba(30, 30, 30, 0.85);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-color: rgba(255, 255, 255, 0.15);
    color: white;
  }
  
  .popup-header {
    background: rgba(74, 124, 89, 0.7);
    border-color: rgba(255, 255, 255, 0.25);
  }
  
  .popup-benefits li {
    color: #e0e0e0;
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.12);
  }
  
  .popup-benefits li:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(74, 124, 89, 0.5);
  }
  
  .popup-btn-later {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
    border-color: rgba(255, 255, 255, 0.2);
  }
  
  .popup-btn-later:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    color: rgba(255, 255, 255, 0.9);
  }
  
  .popup-btn-secondary {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(74, 124, 89, 0.4);
    color: #7fb069;
  }
  
  .popup-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(74, 124, 89, 0.6);
  }
  
  .popup-footer {
    border-top-color: rgba(255, 255, 255, 0.1);
  }
  
  .popup-footer p {
    color: rgba(255, 255, 255, 0.6);
  }
  
  .popup-footer a {
    color: #7fb069;
  }
  
  .popup-footer a:hover {
    color: #9fc87f;
  }
  
  .popup-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
  }
  
  .popup-content::-webkit-scrollbar-thumb {
    background: rgba(74, 124, 89, 0.4);
  }
  
  .popup-content::-webkit-scrollbar-thumb:hover {
    background: rgba(74, 124, 89, 0.6);
  }
} 