/* ===== OFINanse — Sidebar & Widget Styles ===== */

/* ===== SIDEBAR CONTAINER ===== */
.sidebar {
  position: fixed;
  right: var(--space-4);
  bottom: var(--space-4);
  z-index: var(--z-sticky);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  pointer-events: none;
}

.sidebar > * {
  pointer-events: auto;
}

/* ===== WIDGET BASE ===== */
.sidebar-widget {
  background: white;
  border-radius: var(--radius-xl);
  padding: var(--space-4);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--color-border);
  max-width: 280px;
  transition: transform var(--transition-base);
}

.sidebar-widget:hover {
  transform: translateY(-4px);
}

/* ===== LEAD MAGNET WIDGET ===== */
.lead-magnet-widget {
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
  color: white;
  border: none;
}

.lead-magnet-widget .widget-title {
  color: white;
  font-size: var(--text-base);
  margin-bottom: var(--space-3);
}

.lead-magnet-widget .widget-content {
  color: rgba(255, 255, 255, 0.9);
  font-size: var(--text-sm);
  margin-bottom: var(--space-4);
  line-height: 1.6;
}

.lead-magnet-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  width: 100%;
  padding: var(--space-3);
  background: white;
  color: var(--color-primary);
  border-radius: var(--radius-md);
  font-weight: var(--font-semibold);
  font-size: var(--text-sm);
  transition: var(--transition-base);
}

.lead-magnet-btn:hover {
  background: var(--color-accent);
  color: white;
}

.lead-magnet-btn i {
  width: 18px;
  height: 18px;
}

/* ===== QUICK CONTACT WIDGET ===== */
.quick-contact-widget .widget-title {
  font-weight: var(--font-semibold);
  color: var(--color-primary);
  margin-bottom: var(--space-3);
}

.quick-contact {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.contact-btn {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: var(--color-bg-alt);
  border-radius: var(--radius-md);
  transition: var(--transition-base);
  font-weight: var(--font-medium);
  font-size: var(--text-sm);
}

.contact-btn:hover {
  background: var(--color-accent);
  color: white;
  transform: translateX(4px);
}

.contact-btn i {
  width: 20px;
  height: 20px;
  color: var(--color-accent);
  transition: color var(--transition-fast);
}

.contact-btn:hover i { color: white; }

.contact-btn.telegram:hover { background: #0088cc; }
.contact-btn.whatsapp:hover { background: #25D366; }
.contact-btn.phone:hover { background: var(--color-primary); }

/* ===== SCROLL PROGRESS ===== */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--color-accent), var(--color-gold));
  z-index: var(--z-sticky);
  transition: width var(--transition-fast);
  width: 0%;
}

/* ===== BACK TO TOP ===== */
.back-to-top {
  position: fixed;
  right: var(--space-4);
  bottom: calc(var(--space-4) + 200px);
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  background: var(--color-primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-base);
  z-index: var(--z-sticky);
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background: var(--color-accent);
  transform: translateY(-4px);
}

.back-to-top i {
  width: 20px;
  height: 20px;
}

/* ===== MOBILE ADJUSTMENTS ===== */
@media (max-width: 767px) {
  .sidebar {
    right: var(--space-3);
    bottom: var(--space-3);
    gap: var(--space-2);
  }
  
  .sidebar-widget {
    padding: var(--space-3);
    max-width: 240px;
    font-size: var(--text-xs);
  }
  
  .lead-magnet-widget .widget-title {
    font-size: var(--text-sm);
  }
  
  .lead-magnet-widget .widget-content {
    font-size: var(--text-xs);
  }
  
  .contact-btn {
    padding: var(--space-2) var(--space-3);
    font-size: var(--text-xs);
  }
  
  .contact-btn i {
    width: 16px;
    height: 16px;
  }
  
  .back-to-top {
    width: 40px;
    height: 40px;
    bottom: calc(var(--space-3) + 160px);
  }
}

/* ===== DESKTOP HOVER EFFECTS ===== */
@media (min-width: 1024px) {
  .sidebar-widget {
    animation: float 6s ease-in-out infinite;
  }
  
  .sidebar-widget:nth-child(2) {
    animation-delay: -2s;
  }
  
  .sidebar-widget:nth-child(3) {
    animation-delay: -4s;
  }
  
  @keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
  }
}