/* OptiCredit Custom Styles */
:root {
  /* Color Palette */
  --primary-color: #002147; /* Navy Blue */
  --secondary-color: #f0f0f0; /* Light Gray */
  --accent-color: #007bff; /* Bright Blue */
  --text-color: #002147; /* Navy Blue for text */
  --muted-color: #c0c0c0; /* Silver */
  --white: #ffffff;
  --light-bg: #f8f9fa;

  /* Typography */
  --font-primary: "Montserrat", sans-serif;
  --font-secondary: "Open Sans", sans-serif;
}

/* Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-secondary);
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--white);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-primary);
  font-weight: 600;
}

/* Custom Bootstrap Overrides */
.text-primary {
  color: var(--primary-color) !important;
}

.text-accent {
  color: var(--accent-color) !important;
}

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

.btn-primary {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  font-weight: 500;
  padding: 12px 24px;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.btn-primary:hover {
  background-color: #001a35;
  border-color: #001a35;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 33, 71, 0.3);
}

.btn-outline-primary {
  color: var(--primary-color);
  border-color: var(--primary-color);
  font-weight: 500;
  padding: 12px 24px;
  border-radius: 8px;
  transition: all 0.3s ease;
}

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

/* Navigation */
.navbar {
  padding: 1rem 0;
  transition: all 0.3s ease;
}

.navbar-brand {
  font-size: 1.5rem;
  font-weight: 700;
}

.nav-link {
  font-weight: 500;
  color: var(--text-color) !important;
  margin: 0 0.5rem;
  transition: color 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--accent-color) !important;
}

/* Hero Section */
.hero-section {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  padding: 100px 0 50px;
}

.hero-content h1 {
  font-size: 3.5rem;
  line-height: 1.2;
  margin-bottom: 2rem;
}

@media (max-width: 768px) {
  .hero-content h1 {
    font-size: 2.5rem;
  }
}

.feature-item {
  padding: 1rem;
  transition: transform 0.3s ease;
}

.feature-item:hover {
  transform: translateY(-5px);
}

/* Cards */
.card {
  border-radius: 12px;
  transition: all 0.3s ease;
}

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

/* Loan Calculator */
.form-range {
  height: 8px;
}

.form-range::-webkit-slider-thumb {
  background-color: var(--accent-color);
  border: none;
  height: 20px;
  width: 20px;
}

.form-range::-moz-range-thumb {
  background-color: var(--accent-color);
  border: none;
  height: 20px;
  width: 20px;
  border-radius: 50%;
}

/* Multi-step Form */
.progress-steps {
  margin-bottom: 2rem;
}

.progress-steps .d-flex {
  position: relative;
}

.progress-steps .d-flex::before {
  content: "";
  position: absolute;
  top: 25px;
  left: 25px;
  right: 25px;
  height: 2px;
  background-color: var(--muted-color);
  z-index: 1;
}

.step {
  text-align: center;
  position: relative;
  z-index: 2;
  flex: 1;
}

.step-circle {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: var(--muted-color);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 10px;
  font-weight: bold;
  transition: all 0.3s ease;
}

.step.active .step-circle,
.step.completed .step-circle {
  background-color: var(--accent-color);
}

.step-label {
  font-size: 0.9rem;
  color: var(--text-color);
  font-weight: 500;
}

.form-step {
  display: none;
}

.form-step.active {
  display: block;
  animation: fadeIn 0.5s ease-in-out;
}

/* Animations */
html {
  scroll-behavior: smooth;
}

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

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

.slide-in-left {
  animation: slideInLeft 0.8s ease-out;
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.slide-in-right {
  animation: slideInRight 0.8s ease-out;
}

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

/* Accordion */
.accordion-button {
  font-weight: 500;
  color: var(--text-color);
}

.accordion-button:not(.collapsed) {
  background-color: var(--secondary-color);
  color: var(--text-color);
  box-shadow: none;
}

.accordion-button:focus {
  box-shadow: 0 0 0 0.25rem rgba(0, 123, 255, 0.25);
}

/* Contact Cards */
.contact-info .card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

/* Footer */
footer {
  background-color: var(--primary-color) !important;
}

footer a:hover {
  color: var(--accent-color) !important;
}

.social-links a {
  display: inline-block;
  width: 40px;
  height: 40px;
  line-height: 40px;
  text-align: center;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
}

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

/* Responsive Design */
@media (max-width: 768px) {
  .hero-section {
    padding: 80px 0 30px;
  }

  .display-4 {
    font-size: 2rem;
  }

  .display-5 {
    font-size: 1.75rem;
  }

  .btn-lg {
    padding: 10px 20px;
    font-size: 1rem;
  }

  .step-label {
    font-size: 0.8rem;
  }

  .step-circle {
    width: 40px;
    height: 40px;
  }
}

/* Loading States */
.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.loading {
  position: relative;
  pointer-events: none;
}

.loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid transparent;
  border-top: 2px solid #fff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* Form Validation */
.is-invalid {
  border-color: #dc3545;
}

.invalid-feedback {
  display: block;
  color: #dc3545;
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

.is-valid {
  border-color: #28a745;
}

.valid-feedback {
  display: block;
  color: #28a745;
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

/* Success Messages */
.alert-success {
  background-color: #d4edda;
  border-color: #c3e6cb;
  color: #155724;
  border-radius: 8px;
}

.alert-danger {
  background-color: #f8d7da;
  border-color: #f5c6cb;
  color: #721c24;
  border-radius: 8px;
}

/* Utility Classes */
.text-balance {
  text-wrap: balance;
}

.shadow-custom {
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.border-radius-lg {
  border-radius: 12px;
}

.transition-all {
  transition: all 0.3s ease;
}
