/* ==============================================
   Krew Landing Page - Custom Styles
   ============================================== */

/* Variables */
:root {
  --krew-primary: #5D87FF;
  --krew-secondary: #49BEFF;
  --krew-success: #13DEB9;
  --krew-warning: #FFAE1F;
  --krew-danger: #FA896B;
  --krew-info: #539BFF;
  --scroll-to-top-size: 50px;
}

/* Global Styles */
html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Header Sticky */
.header-krew.sticky-top {
  transition: all 0.3s ease;
}

.header-krew.sticky-top.scrolled {
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* Navbar */
.navbar-brand img {
  transition: all 0.3s ease;
}

.nav-link {
  position: relative;
  transition: color 0.3s ease;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--krew-primary);
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.nav-link:hover::after {
  width: 100%;
}

/* Hero Section */
.hero-section {
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(93, 135, 255, 0.05) 0%, rgba(73, 190, 255, 0.05) 100%);
  z-index: 0;
}

.hero-section > .container {
  position: relative;
  z-index: 1;
}

.dashboard-preview {
  transition: transform 0.3s ease;
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-20px);
  }
}

.dashboard-preview:hover {
  transform: scale(1.02);
}

/* Cards with Hover Effect */
.hover-lift {
  transition: all 0.3s ease;
}

.hover-lift:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.1) !important;
}

/* Placeholder Images */
.placeholder-image {
  transition: all 0.3s ease;
  border: 2px dashed #e0e0e0;
}

.placeholder-image:hover {
  border-color: var(--krew-primary);
  background-color: #f8f9fa !important;
}

/* Tabs */
.nav-tabs {
  border-bottom: 2px solid #e0e0e0;
}

.nav-tabs .nav-link {
  border: none;
  color: #6c757d;
  font-weight: 600;
  padding: 1rem 1.5rem;
  transition: all 0.3s ease;
  border-bottom: 3px solid transparent;
}

.nav-tabs .nav-link:hover {
  color: var(--krew-primary);
  border-bottom-color: var(--krew-primary);
  background-color: transparent;
}

.nav-tabs .nav-link.active {
  color: var(--krew-primary);
  background-color: transparent;
  border-bottom-color: var(--krew-primary);
}

/* Badges */
.badge.bg-primary-subtle {
  font-weight: 600;
  letter-spacing: 0.5px;
}

/* Round Icons */
.round-48, .round-56 {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.round-56 {
  width: 56px;
  height: 56px;
}

/* Buttons */
.btn {
  font-weight: 600;
  transition: all 0.3s ease;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(93, 135, 255, 0.3);
}

.btn-outline-primary:hover {
  transform: translateY(-2px);
}

.btn-white {
  background-color: white;
  color: var(--krew-primary);
}

.btn-white:hover {
  background-color: #f8f9fa;
  color: var(--krew-primary);
}

/* Scroll to Top Button */
.scroll-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: var(--scroll-to-top-size);
  height: var(--scroll-to-top-size);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  box-shadow: 0 5px 15px rgba(93, 135, 255, 0.3);
  transition: all 0.3s ease;
}

.scroll-to-top.show {
  display: flex;
}

.scroll-to-top:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(93, 135, 255, 0.4);
}

/* Footer Links */
.hover-text-white:hover {
  color: white !important;
}

/* Preloader */
.preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.3s ease;
}

.preloader.fade-out {
  opacity: 0;
  pointer-events: none;
}

.lds-ripple {
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.1);
    opacity: 0.8;
  }
}

/* Smooth Animations */
.fade-in {
  animation: fadeIn 0.6s ease-in;
}

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

/* Responsive */
@media (max-width: 991.98px) {
  .display-3 {
    font-size: 2.5rem;
  }
  
  .display-5 {
    font-size: 2rem;
  }

  .hero-section {
    padding-top: 3rem !important;
    padding-bottom: 3rem !important;
  }

  .dashboard-preview {
    margin-top: 2rem;
  }

  .nav-tabs .nav-link {
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
  }

  .scroll-to-top {
    bottom: 20px;
    right: 20px;
    width: 45px;
    height: 45px;
  }
}

@media (max-width: 767.98px) {
  .display-3 {
    font-size: 2rem;
  }
  
  .display-5 {
    font-size: 1.75rem;
  }

  .fs-5 {
    font-size: 1rem !important;
  }

  .btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
  }

  .placeholder-image {
    height: 300px !important;
  }
}

@media (max-width: 575.98px) {
  .hero-section .badge {
    font-size: 0.75rem;
  }

  .nav-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .nav-tabs .nav-link {
    white-space: nowrap;
    padding: 0.75rem;
    font-size: 0.813rem;
  }

  .card-body {
    padding: 1.25rem !important;
  }
}

/* Print Styles */
@media print {
  .header-krew,
  .scroll-to-top,
  .btn,
  footer {
    display: none !important;
  }

  body {
    background: white;
  }

  .hero-section,
  section {
    page-break-inside: avoid;
    padding: 1rem !important;
  }
}

/* Accessibility */
.visually-hidden-focusable:not(:focus):not(:focus-within) {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
  .nav-link::after,
  .hover-lift:hover {
    outline: 2px solid currentColor;
  }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }

  .dashboard-preview {
    animation: none;
  }
}

/* Dark Mode Support (Future) */
@media (prefers-color-scheme: dark) {
  /* Styles for dark mode when implemented */
}
