/* ============================================
   BUILVERO UX POLISH & ENHANCEMENTS
   ============================================ */

/* CSS Variables */
:root {
  --bv-primary: #9333ea;
  --bv-primary-dark: #7e22ce;
  --bv-success: #10b981;
  --bv-danger: #ef4444;
  --bv-border: #e5e7eb;
  --bv-transition-fast: 0.15s ease-out;
  --bv-transition-base: 0.2s ease;
  --bv-transition-smooth: 0.3s ease;
}

/* ============================================
   GLOBAL TRANSITIONS & INTERACTIONS
   ============================================ */

/* Smooth transitions for interactive elements */
* {
  transition: background-color var(--bv-transition-base), 
              color var(--bv-transition-base), 
              border-color var(--bv-transition-base);
}

/* Focus States - WCAG AA Compliant */
.btn:focus,
.form-control:focus,
.form-select:focus,
.nav-link:focus {
  outline: 2px solid var(--bv-primary);
  outline-offset: 2px;
  box-shadow: 0 0 0 0.2rem rgba(147, 51, 234, 0.25);
}

/* ============================================
   BUTTON ENHANCEMENTS
   ============================================ */

/* Base button styling */
.btn {
  border-radius: 0.5rem;
  font-weight: 500;
  transition: all var(--bv-transition-fast);
  padding: 0.625rem 1.5rem;
}

.btn-lg {
  padding: 0.75rem 2rem;
  font-size: 1.125rem;
}

.btn-sm {
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
}

/* Button hover effects */
.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary:hover {
  background-color: var(--bv-primary-dark);
  border-color: var(--bv-primary-dark);
  box-shadow: 0 4px 12px rgba(147, 51, 234, 0.3);
}

.btn-outline-primary:hover {
  background-color: var(--bv-primary);
  border-color: var(--bv-primary);
  color: white;
  box-shadow: 0 4px 12px rgba(147, 51, 234, 0.2);
}

/* Disabled state */
.btn:disabled,
.form-control:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Loading state */
.btn.loading {
  position: relative;
  color: transparent;
  pointer-events: none;
}

.btn.loading::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  top: 50%;
  left: 50%;
  margin-left: -8px;
  margin-top: -8px;
  border: 2px solid #ffffff;
  border-radius: 50%;
  border-top-color: transparent;
  animation: bv-spinner 0.6s linear infinite;
}

@keyframes bv-spinner {
  to { transform: rotate(360deg); }
}

/* ============================================
   CARD ENHANCEMENTS
   ============================================ */

/* Base card transitions */
.card {
  transition: all var(--bv-transition-smooth);
}

.card:hover {
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  transform: translateY(-2px);
}

/* ============================================
   BUILVERO LANDING PAGE COMPONENTS
   ============================================ */

/* Section Spacing - Responsive */
.bv-section-spacing-lg {
  padding-top: 6rem;
  padding-bottom: 6rem;
}

.bv-section-spacing-md {
  padding-top: 5rem;
  padding-bottom: 5rem;
}

.bv-section-spacing-sm {
  padding-top: 4rem;
  padding-bottom: 4rem;
}

.bv-section-divider {
  border-top: 1px solid rgba(0, 0, 0, 0.05);
}

/* Hero Section */
.bv-hero-gradient {
  background: radial-gradient(ellipse at top, rgba(147, 51, 234, 0.08) 0%, rgba(147, 51, 234, 0.03) 50%, transparent 100%);
}

.bv-hero-card {
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  transition: transform var(--bv-transition-smooth), box-shadow var(--bv-transition-smooth);
}

@media (min-width: 992px) {
  .bv-hero-card-tilt {
    transform: rotate(-2deg);
  }
  
  .bv-hero-card-tilt:hover {
    transform: rotate(0deg);
  }
}

@media (max-width: 991px) {
  .bv-hero-card-tilt {
    transform: none !important;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  }
}

/* Feature Cards - Unified Styling */
.bv-feature-card {
  background-color: white;
  border: 1px solid var(--bv-border);
  border-radius: 0.75rem;
  padding: 2rem;
  height: 100%;
  transition: all var(--bv-transition-smooth);
}

.bv-feature-card:hover {
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  transform: translateY(-2px);
}

.bv-feature-card-icon {
  font-size: 2.5rem;
  color: var(--bv-primary);
  margin-bottom: 1rem;
  display: block;
}

/* Step Number Circle */
.bv-step-number {
  width: 64px;
  height: 64px;
  font-size: 1.5rem;
}

/* Benefit Icon Circle */
.bv-benefit-icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}

/* Team Avatars */
.bv-team-avatars {
  margin-left: -0.5rem;
}

.bv-avatar {
  width: 40px;
  height: 40px;
  border: 2px solid white;
  margin-left: 0.5rem;
}

/* Invite Section */
.bv-invite-section {
  background: linear-gradient(135deg, #9333ea 0%, #7e22ce 50%, #6b21a8 100%) !important;
  min-height: 400px;
}

.bv-invite-section .text-purple-100 {
  color: rgba(255, 255, 255, 0.9) !important;
}

.bv-invite-section .text-purple-200 {
  color: rgba(255, 255, 255, 0.7) !important;
}

/* Invite Section Buttons */
.bv-invite-section .btn-outline-white {
  border: 2px solid white !important;
  background-color: transparent !important;
  color: white !important;
  font-weight: 500;
  transition: background-color var(--bv-transition-base), transform var(--bv-transition-base);
}

.bv-invite-section .btn-outline-white:hover {
  background-color: rgba(255, 255, 255, 0.1) !important;
  color: white !important;
  border-color: white !important;
  transform: translateY(-1px);
}

.bv-invite-section .btn-white-purple {
  background-color: white !important;
  color: var(--bv-primary) !important;
  border: none !important;
  font-weight: 500;
  transition: background-color var(--bv-transition-base), transform var(--bv-transition-base), box-shadow var(--bv-transition-base);
}

.bv-invite-section .btn-white-purple:hover {
  background-color: #f3e8ff !important;
  color: var(--bv-primary) !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* Invite Message Alert - High Contrast */
.bv-invite-alert {
  background-color: rgba(255, 255, 255, 0.95) !important;
  border: 2px solid rgba(255, 255, 255, 0.8) !important;
  color: #1f2937 !important;
  border-radius: 0.5rem;
  padding: 1.25rem;
}

.bv-invite-alert p {
  color: #1f2937 !important;
  margin-bottom: 0.5rem;
}

.bv-invite-alert .fw-medium {
  color: #111827 !important;
  font-weight: 600;
}

.bv-invite-alert .small {
  color: #374151 !important;
}

/* Text Improvements */
.bv-text-readable {
  color: #374151;
  font-size: 1.125rem;
  line-height: 1.75;
}

/* ============================================
   NAVBAR ENHANCEMENTS
   ============================================ */

.navbar {
  padding-top: 1.25rem;
  padding-bottom: 1.25rem;
  transition: box-shadow var(--bv-transition-base);
}

.navbar.sticky-top {
  backdrop-filter: blur(10px);
  background-color: rgba(255, 255, 255, 0.95);
}

.navbar-brand {
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

.navbar-nav .nav-link {
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
  margin-left: 0.5rem;
  margin-right: 0.5rem;
  transition: color var(--bv-transition-fast);
}

.navbar-nav .nav-link:hover {
  color: var(--bv-primary) !important;
}

/* Mobile Navbar - Smooth Collapse */
@media (max-width: 991px) {
  .navbar-collapse {
    transition: max-height 0.3s ease-in-out;
    overflow: hidden;
  }
  
  .navbar-collapse:not(.show) {
    max-height: 0;
  }
  
  .navbar-collapse.show {
    max-height: 500px;
  }
  
  .navbar-nav .nav-item {
    padding: 0.75rem 0;
  }
  
  .navbar-nav .btn {
    margin: 0.5rem 0;
    width: 100%;
    min-height: 44px; /* Touch-friendly */
  }
  
  .navbar-toggler {
    min-width: 44px;
    min-height: 44px;
    padding: 0.5rem;
  }
}

/* ============================================
   FORM VALIDATION
   ============================================ */

.was-validated .form-control:valid {
  border-color: var(--bv-success);
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%2310b981' d='m2.3 6.73.98-.98-.98-.98-.98.98.98.98zm1.38-1.38L4.3 4.37l.98.98-.98.98-.98-.98z'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right calc(0.375em + 0.1875rem) center;
  background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.was-validated .form-control:invalid {
  border-color: var(--bv-danger);
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23ef4444'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath d='m5.8 3.6.4.4.4-.4M6 8.2V6'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right calc(0.375em + 0.1875rem) center;
  background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

/* ============================================
   ANIMATIONS & MICRO-INTERACTIONS
   ============================================ */

/* Fade In Animation */
.bv-fade-in {
  animation: bv-fadeIn 0.5s ease-in;
}

@keyframes bv-fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Slide In From Bottom - For Scroll Reveals */
.bv-slide-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.bv-slide-up.bv-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Hero Content Fade In */
.bv-hero-content {
  opacity: 0;
  animation: bv-heroFadeIn 0.8s ease-out 0.2s forwards;
}

.bv-hero-card-animate {
  opacity: 0;
  animation: bv-heroFadeIn 0.8s ease-out 0.4s forwards;
}

@keyframes bv-heroFadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================
   FOOTER ENHANCEMENTS
   ============================================ */

footer {
  padding-top: 3rem !important;
  padding-bottom: 3rem !important;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 0;
}

footer h5 {
  color: white;
  font-weight: 600;
  margin-bottom: 1rem;
}

/* ============================================
   RESPONSIVE ADJUSTMENTS
   ============================================ */

@media (max-width: 768px) {
  .bv-section-spacing-lg {
    padding-top: 4rem;
    padding-bottom: 4rem;
  }
  
  .bv-section-spacing-md {
    padding-top: 3rem;
    padding-bottom: 3rem;
  }
  
  .bv-section-spacing-sm {
    padding-top: 2.5rem;
    padding-bottom: 2.5rem;
  }
  
  .display-2 {
    font-size: 2.5rem;
    line-height: 1.2;
  }
  
  .display-4 {
    font-size: 2rem;
    line-height: 1.3;
  }
  
  .bv-text-readable {
    font-size: 1rem;
  }
  
  .btn-lg {
    padding: 0.625rem 1.5rem;
    font-size: 1rem;
    min-height: 44px; /* Touch-friendly */
  }
  
  .bv-invite-section {
    min-height: auto;
    padding: 3rem 0;
  }
}

@media (max-width: 576px) {
  .bv-section-spacing-lg {
    padding-top: 3rem;
    padding-bottom: 3rem;
  }
  
  .bv-section-spacing-md {
    padding-top: 2.5rem;
    padding-bottom: 2.5rem;
  }
  
  .display-2 {
    font-size: 2rem;
  }
  
  .display-4 {
    font-size: 1.75rem;
  }
}

/* ============================================
   SKIP TO CONTENT LINK (Accessibility)
   ============================================ */

.bv-skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--bv-primary);
  color: white;
  padding: 8px 16px;
  text-decoration: none;
  z-index: 1000;
  border-radius: 0 0 4px 0;
}

.bv-skip-link:focus {
  top: 0;
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
  .no-print {
    display: none !important;
  }
}
