/* Global theme overrides */
:root {
  /* Primary color set to sidebar blue */
  --bs-primary: #667eea;
  --bs-primary-rgb: 102, 126, 234;
  /* Success color set to a darker moderated green */
  --bs-success: #16a34a; /* tailwind emerald-600 like */
  --bs-success-rgb: 22, 163, 74;
  /* Links */
  --bs-link-color: #667eea;
  --bs-link-hover-color: #5a6fe0;
  /* Focus ring */
  --bs-focus-ring-color: rgba(102, 126, 234, 0.25);
}

/* Remove unwanted spacing */
html {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  margin: 0 !important;
  padding: 0 !important;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  background-color: #fff;
}

main {
  flex: 1 0 auto;
}

.footer {
  flex-shrink: 0;
  margin: 0 !important;
  padding-bottom: 0 !important;
}

/* Ensure footer sections don't add spacing */
.footer .newsletter-section,
.footer .container,
.footer .border-top {
  margin-bottom: 0 !important;
  padding-bottom: 0;
}

.footer .border-top:last-child {
  padding-bottom: 1rem;
}

/* Ensure container-fluid doesn't add extra spacing */
.container-fluid {
  padding-bottom: 0;
}

/* Remove any default body margin/padding that might cause issues */
body > * {
  margin-bottom: 0;
}

/* Buttons: make Bootstrap primary variants use brand blue */
.btn-primary {
  --bs-btn-bg: #667eea;
  --bs-btn-border-color: #667eea;
  --bs-btn-hover-bg: #5a6fe0;
  --bs-btn-hover-border-color: #5a6fe0;
  --bs-btn-active-bg: #4f62d1;
  --bs-btn-active-border-color: #4f62d1;
  --bs-btn-disabled-bg: #667eea;
  --bs-btn-disabled-border-color: #667eea;
}

.btn-outline-primary {
  --bs-btn-color: #667eea;
  --bs-btn-border-color: #667eea;
  --bs-btn-hover-bg: #667eea;
  --bs-btn-hover-border-color: #667eea;
  --bs-btn-active-bg: #5a6fe0;
  --bs-btn-active-border-color: #5a6fe0;
}

/* Buttons: make Bootstrap success variants use moderate green */
.btn-success {
  --bs-btn-bg: #16a34a;
  --bs-btn-border-color: #16a34a;
  --bs-btn-hover-bg: #15803d; /* darker hover */
  --bs-btn-hover-border-color: #15803d;
  --bs-btn-active-bg: #166534; /* active */
  --bs-btn-active-border-color: #166534;
  --bs-btn-disabled-bg: #16a34a;
  --bs-btn-disabled-border-color: #16a34a;
}

.btn-outline-success {
  --bs-btn-color: #16a34a;
  --bs-btn-border-color: #16a34a;
  --bs-btn-hover-bg: #16a34a;
  --bs-btn-hover-border-color: #16a34a;
  --bs-btn-active-bg: #15803d;
  --bs-btn-active-border-color: #15803d;
}

/* Utilities: text/border/bg primary */
.text-primary { color: #667eea !important; }
.border-primary { border-color: #667eea !important; }
.bg-primary { background-color: #667eea !important; }
.badge.bg-primary { background-color: #667eea !important; }

/* Utilities: text/border/bg success */
.text-success { color: #16a34a !important; }
.border-success { border-color: #16a34a !important; }
.bg-success { background-color: #16a34a !important; }
.badge.bg-success { background-color: #16a34a !important; }

html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem var(--bs-focus-ring-color);
}

/* Footer Styles */
.footer {
  background-color: #1a1a2e !important;
}

.footer h6 {
  color: #ffffff;
  font-weight: 600;
  margin-bottom: 1rem;
}

.footer-links a {
  color: #9ca3af;
  transition: all 0.3s ease;
  display: inline-block;
}

.footer-links a:hover {
  color: #667eea;
  padding-left: 5px;
  text-decoration: none;
}

.footer .social-links a {
  transition: all 0.3s ease;
}

.footer .social-links a:hover {
  transform: translateY(-3px);
  border-color: #667eea !important;
  color: #667eea !important;
}

.footer .payment-methods i {
  transition: all 0.3s ease;
}

.footer .payment-methods i:hover {
  color: #667eea !important;
  transform: scale(1.1);
}

/* Newsletter Section Styles */
.newsletter-section {
  position: relative;
}

/* Footer Newsletter Section */
.footer .newsletter-section {
  background-color: transparent;
}

.footer .newsletter-section .newsletter-icon {
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(102, 126, 234, 0.1);
  border-radius: 50%;
}

.footer .newsletter-form .form-control {
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  padding: 0.75rem 1.25rem;
  transition: all 0.3s ease;
}

.footer .newsletter-form .form-control::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.footer .newsletter-form .form-control:focus {
  background: rgba(255, 255, 255, 0.15);
  border-color: var(--bs-primary);
  color: #fff;
  box-shadow: 0 0 0 0.25rem rgba(102, 126, 234, 0.25);
}

.footer .newsletter-form .btn {
  font-weight: 600;
  padding: 0.75rem 2rem;
  transition: all 0.3s ease;
}

.footer .newsletter-form .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.newsletter-section .card {
  backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.95);
}

.newsletter-section .input-group-text {
  background-color: #f8f9fa;
}

.newsletter-section input:focus {
  border-color: #667eea;
  box-shadow: none;
}

.newsletter-section .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
  transition: all 0.3s ease;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .newsletter-section h2 {
    font-size: 1.5rem;
  }
  
  .newsletter-section .lead {
    font-size: 1rem;
  }
  
  .footer .newsletter-section h4 {
    font-size: 1.25rem;
  }
  
  .footer .newsletter-form .btn {
    width: 100%;
    margin-top: 0.5rem;
  }
}