/* JigsawTechie Base Styles */

/* Custom CSS Variables */
:root {
  --primary-color: #0d6efd;
  --secondary-color: #6c757d;
  --success-color: #198754;
  --warning-color: #ffc107;
  --danger-color: #dc3545;
  --light-color: #f8f9fa;
  --dark-color: #212529;
  
  --font-family-sans-serif: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --border-radius: 0.375rem;
  --box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
  --box-shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.175);
}

/* Global Styles */
body {
  font-family: var(--font-family-sans-serif);
  line-height: 1.6;
}

/* Custom Button Styles */
.btn-primary {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  transition: all 0.15s ease-in-out;
}

.btn-primary:hover {
  background-color: #0b5ed7;
  border-color: #0a58ca;
  transform: translateY(-1px);
}

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

/* Card Enhancements */
.card {
  border: none;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  transition: all 0.15s ease-in-out;
}

.card:hover {
  box-shadow: var(--box-shadow-lg);
  transform: translateY(-2px);
}

.card-header {
  border-bottom: 1px solid rgba(0, 0, 0, 0.125);
  background-color: rgba(var(--bs-primary-rgb), 0.1);
}

/* Hero Section Styles */
.hero-section {
  background: linear-gradient(135deg, var(--primary-color) 0%, #0b5ed7 100%);
  min-height: 60vh;
  display: flex;
  align-items: center;
}

/* Service Cards */
.service-card {
  transition: all 0.3s ease;
  border: 1px solid rgba(0, 0, 0, 0.125);
}

.service-card:hover {
  border-color: var(--primary-color);
  box-shadow: 0 0.5rem 1rem rgba(var(--bs-primary-rgb), 0.15);
}

/* Form Enhancements */
.form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(var(--bs-primary-rgb), 0.25);
}

.form-select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(var(--bs-primary-rgb), 0.25);
}

/* Navigation Enhancements */
.navbar-brand img {
  transition: all 0.15s ease-in-out;
}

.navbar-brand:hover img {
  transform: scale(1.05);
}

.nav-link {
  transition: color 0.15s ease-in-out;
}

/* Footer Styles */
footer {
  background-color: var(--dark-color);
  color: white;
}

/* Utility Classes */
.text-primary {
  color: var(--primary-color) !important;
}

.bg-primary {
  background-color: var(--primary-color) !important;
}

.shadow-sm {
  box-shadow: var(--box-shadow) !important;
}

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

/* Responsive Adjustments */
@media (max-width: 768px) {
  .display-4 {
    font-size: 2.5rem;
  }
  
  .display-5 {
    font-size: 2rem;
  }
  
  .hero-section {
    min-height: 50vh;
    text-align: center;
  }
  
  .btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
  }
}

@media (max-width: 576px) {
  .container-fluid {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  
  .card-body {
    padding: 1.5rem;
  }
  
  .py-5 {
    padding-top: 2rem !important;
    padding-bottom: 2rem !important;
  }
}

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

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

.slide-up {
  animation: slideUp 0.6s ease-out;
}

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

/* Loading States */
.btn.loading {
  position: relative;
  color: transparent;
}

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

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Accessibility Improvements */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Focus Styles */
.btn:focus,
.form-control:focus,
.form-select:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* Dashboard Bubble */
.dashboard-bubble {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 1050;
}

.dashboard-bubble .dashboard-btn {
  border-radius: 25px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 600;
  padding: 12px 20px;
  transition: all 0.3s ease;
  animation: pulse 2s infinite;
  white-space: nowrap;
  text-decoration: none;
}

.dashboard-bubble .dashboard-btn:hover {
  transform: scale(1.05);
  animation: none;
  text-decoration: none;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(var(--bs-primary-rgb), 0.7);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(var(--bs-primary-rgb), 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(var(--bs-primary-rgb), 0);
  }
}

/* Responsive adjustments for dashboard bubble */
@media (max-width: 768px) {
  .dashboard-bubble {
    bottom: 20px;
    right: 20px;
  }

  .dashboard-bubble .dashboard-btn {
    font-size: 0.9rem;
    padding: 10px 16px;
  }
}

@media (max-width: 480px) {
  .dashboard-bubble .dashboard-btn {
    font-size: 0.8rem;
    padding: 8px 12px;
  }
}

/* Print Styles */
@media print {
  .btn,
  .navbar,
  footer,
  .dashboard-bubble {
    display: none !important;
  }

  .container {
    max-width: none !important;
  }
}
