/**
 * Premium Design Enhancement for 39mebel
 * Modern, warm, premium aesthetic for kitchen furniture business
 * 
 * @package Mebel39
 */

/* ========================================
   CSS VARIABLES — Warm Premium Palette
   ======================================== */

:root {
  /* Primary — тёплый коричневый (замена синему) */
  --color-primary: #8B5E3C;
  --color-primary-hover: #6F4A2E;
  --color-primary-light: #A67B5B;
  --color-primary-bg: rgba(139, 94, 60, 0.08);
  
  /* Secondary — тёплый бежевый */
  --color-secondary: #D4A574;
  --color-secondary-hover: #C49464;
  --color-secondary-bg: rgba(212, 165, 116, 0.1);
  
  /* Accent — золотистый для CTA */
  --color-accent: #C9A96E;
  --color-accent-hover: #B8944F;
  
  /* Neutrals — тёплые серые */
  --color-text-dark: #2D2418;
  --color-text-medium: #5C4A3A;
  --color-text-light: #8B7355;
  --color-text-muted: #A89585;
  
  /* Backgrounds — тёплые оттенки */
  --color-bg-white: #FDFBF7;
  --color-bg-cream: #F8F3EB;
  --color-bg-warm: #F0E8DA;
  --color-bg-dark: #1A1410;
  
  /* Borders — тёплые */
  --color-border: #E8DDD0;
  --color-border-light: #F0E8DA;
  --color-border-focus: var(--color-primary);
  
  /* Shadows — тёплые, мягкие */
  --shadow-sm: 0 2px 8px rgba(45, 36, 24, 0.06);
  --shadow-md: 0 4px 16px rgba(45, 36, 24, 0.08);
  --shadow-lg: 0 8px 32px rgba(45, 36, 24, 0.12);
  --shadow-xl: 0 16px 48px rgba(45, 36, 24, 0.15);
  --shadow-glow: 0 0 0 3px rgba(139, 94, 60, 0.2);
  
  /* Typography — премиум шрифты */
  --font-heading: 'Playfair Display', 'Georgia', serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-accent: 'Cormorant Garamond', 'Georgia', serif;
  
  /* Spacing — современная сетка */
  --spacing-xs: 4px;
  --spacing-sm: 8px;
  --spacing-md: 16px;
  --spacing-lg: 24px;
  --spacing-xl: 32px;
  --spacing-2xl: 48px;
  --spacing-3xl: 64px;
  
  /* Border Radius — мягкие скругления */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;
  
  /* Transitions — плавные */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========================================
   BASE — Улучшенная типографика
   ======================================== */

body {
  color: var(--color-text-dark);
  background: var(--color-bg-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--color-text-dark);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
}

h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 600;
}

h3 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 600;
}

p {
  color: var(--color-text-medium);
  line-height: 1.7;
  max-width: 65ch;
}

/* ========================================
   BUTTONS — Премиум стиль
   ======================================== */

button, .btn, input[type="submit"], input[type="button"] {
  font-family: var(--font-body);
  font-weight: 600;
  letter-spacing: 0.02em;
  border-radius: var(--radius-md);
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

button::before, .btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.6s ease, height 0.6s ease;
}

button:hover::before, .btn:hover::before {
  width: 300px;
  height: 300px;
}

/* Primary Button */
.btn-primary, button[type="submit"], .wp-block-button__link {
  background: var(--color-primary);
  color: white;
  border: none;
  padding: 14px 32px;
  font-size: 16px;
  box-shadow: var(--shadow-md);
}

.btn-primary:hover, button[type="submit"]:hover {
  background: var(--color-primary-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* Secondary Button */
.btn-secondary {
  background: transparent;
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
  padding: 12px 30px;
}

.btn-secondary:hover {
  background: var(--color-primary-bg);
  transform: translateY(-2px);
}

/* Accent Button */
.btn-accent {
  background: linear-gradient(135deg, var(--color-accent), var(--color-secondary));
  color: white;
  border: none;
  padding: 14px 32px;
  box-shadow: var(--shadow-md);
}

.btn-accent:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-xl);
}

/* ========================================
   CARDS — Premium Cards
   ======================================== */

.card, .home-hero-card, .home-hero-proof-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: var(--spacing-xl);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border-light);
  transition: all var(--transition-slow);
}

.card:hover, .home-hero-card:hover, .home-hero-proof-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--color-primary-light);
}

/* ========================================
   HERO SECTION — Улучшенный
   ======================================== */

.home-hero, .hero-section {
  background: linear-gradient(135deg, var(--color-bg-dark) 0%, #2D2418 50%, var(--color-primary) 100%);
  position: relative;
  overflow: hidden;
}

.home-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.5;
}

.home-hero-title {
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 700;
  color: white;
  line-height: 1.15;
  text-shadow: 0 2px 20px rgba(0,0,0,0.3);
  margin-bottom: var(--spacing-lg);
}

.home-hero-subtitle {
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.6;
  margin-bottom: var(--spacing-xl);
  max-width: 60ch;
}

.home-hero-buttons {
  display: flex;
  gap: var(--spacing-md);
  flex-wrap: wrap;
}

.home-hero-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--spacing-lg);
  margin-top: var(--spacing-2xl);
}

.home-hero-metric-card {
  text-align: center;
  padding: var(--spacing-lg);
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.home-hero-metric-value {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--color-accent);
  display: block;
  margin-bottom: var(--spacing-xs);
}

.home-hero-metric-label {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.4;
}

/* ========================================
   NAVIGATION — Улучшенная с hover-эффектами
   ======================================== */

.site-header {
  background: rgba(253, 251, 247, 0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-base);
}

.site-header.scrolled {
  box-shadow: var(--shadow-md);
  background: rgba(253, 251, 247, 0.98);
}

.main-navigation a {
  color: var(--color-text-dark);
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  font-size: 0.85rem;
  padding: var(--spacing-sm) var(--spacing-md);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  position: relative;
}

.main-navigation a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--color-primary);
  transform: translateX(-50%);
  transition: width var(--transition-base);
}

.main-navigation a:hover {
  color: var(--color-primary);
  background: var(--color-primary-bg);
}

.main-navigation a:hover::after {
  width: 80%;
}

.main-navigation .current-menu-item a {
  color: var(--color-primary);
  background: var(--color-primary-bg);
}

.main-navigation .current-menu-item a::after {
  width: 80%;
}

/* Mobile menu improvements */
.mobile-menu-toggle {
  background: transparent;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: var(--spacing-sm);
  transition: all var(--transition-fast);
}

.mobile-menu-toggle:hover {
  border-color: var(--color-primary);
  background: var(--color-primary-bg);
}

/* ========================================
   COOKIE BANNER — Цвета в тон дизайну (переопределение Elementor cookie banner)
   ======================================== */

#cookie-banner, .cookie-banner {
  background: var(--color-bg-dark) !important;
  color: white !important;
  border-top: 3px solid var(--color-accent) !important;
  font-family: var(--font-body) !important;
}

/* Higher specificity for cookie buttons */
#cookie-banner .cookie-btn,
.cookie-banner .cookie-btn,
#cookie-banner button,
.cookie-banner button {
  background: var(--color-accent) !important;
  color: white !important;
  border: none !important;
  padding: 12px 28px !important;
  border-radius: var(--radius-md) !important;
  font-weight: 600 !important;
  font-size: 14px !important;
  text-transform: none !important;
  letter-spacing: 0.02em !important;
  transition: all var(--transition-base) !important;
}

#cookie-banner .cookie-btn:hover,
.cookie-banner .cookie-btn:hover,
#cookie-banner button:hover,
.cookie-banner button:hover {
  background: var(--color-accent-hover) !important;
  transform: translateY(-2px) !important;
  box-shadow: var(--shadow-md) !important;
}

#cookie-banner a,
.cookie-banner a {
  color: rgba(255, 255, 255, 0.8) !important;
  text-decoration: underline !important;
}

#cookie-banner a:hover,
.cookie-banner a:hover {
  color: var(--color-accent) !important;
}

/* ========================================
   FOOTER — Современный с карточками
   ======================================== */

.site-footer {
  background: var(--color-bg-dark);
  color: rgba(255, 255, 255, 0.8);
  padding: var(--spacing-3xl) 0 var(--spacing-xl);
  position: relative;
}

.site-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-accent), var(--color-secondary));
}

.site-footer h4 {
  color: white;
  font-family: var(--font-heading);
  font-size: 1.25rem;
  margin-bottom: var(--spacing-lg);
  position: relative;
  padding-bottom: var(--spacing-sm);
}

.site-footer h4::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 2px;
  background: var(--color-accent);
}

.site-footer a {
  color: rgba(255, 255, 255, 0.7);
  transition: all var(--transition-fast);
  display: inline-block;
}

.site-footer a:hover {
  color: var(--color-accent);
  transform: translateX(4px);
}

/* Footer social icons */
.site-footer .social-links {
  display: flex;
  gap: var(--spacing-md);
  margin-top: var(--spacing-lg);
}

.site-footer .social-links a {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-full);
  transition: all var(--transition-base);
}

.site-footer .social-links a:hover {
  background: var(--color-accent);
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

/* Footer cards */
.footer-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg);
  margin-bottom: var(--spacing-lg);
  transition: all var(--transition-base);
}

.footer-card:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--color-accent);
  transform: translateY(-2px);
}

/* ========================================
   ANIMATIONS — Плавные переходы
   ======================================== */

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

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

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.animate-fade-in-up {
  animation: fadeInUp 0.8s ease-out forwards;
}

.animate-fade-in {
  animation: fadeIn 0.6s ease-out forwards;
}

/* Staggered animations for lists */
.stagger-children > * {
  opacity: 0;
  animation: fadeInUp 0.6s ease-out forwards;
}

.stagger-children > *:nth-child(1) { animation-delay: 0.1s; }
.stagger-children > *:nth-child(2) { animation-delay: 0.2s; }
.stagger-children > *:nth-child(3) { animation-delay: 0.3s; }
.stagger-children > *:nth-child(4) { animation-delay: 0.4s; }
.stagger-children > *:nth-child(5) { animation-delay: 0.5s; }

/* ========================================
   RESPONSIVE — Мобильная адаптация
   ======================================== */

@media (max-width: 768px) {
  .home-hero-title {
    font-size: 2rem;
  }
  
  .home-hero-metrics {
    grid-template-columns: 1fr;
  }
  
  .home-hero-buttons {
    flex-direction: column;
  }
  
  .btn-primary, .btn-secondary, .btn-accent {
    width: 100%;
    text-align: center;
  }
}

/* ========================================
   UTILITIES — Дополнительные классы
   ======================================== */

.text-gradient {
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.bg-warm {
  background: var(--color-bg-cream);
}

.border-warm {
  border-color: var(--color-border);
}

.shadow-premium {
  box-shadow: var(--shadow-lg);
}

.rounded-premium {
  border-radius: var(--radius-xl);
}
