/* ===== CUSTOM ASTRA FONT FOR LOGO ===== */

/* Astra Font Face Declaration */
@font-face {
  font-family: 'Astra';
  src: url('../fonts/Astra-6RGXq.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
  font-display: swap; /* Improves loading performance */
}

/* Logo-specific font styling */
.navbar-brand {
  font-family: 'Astra', 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
  font-weight: normal;
  letter-spacing: 0.02em;
}

/* Ensure logo font loads properly with fallback */
.navbar-brand.astra-font {
  font-family: 'Astra', 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
}



/* ===== PREMIUM TYPOGRAPHY SYSTEM ===== */

/* Typography Variables */
:root {
  /* Font Families */
  --font-heading: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-body: 'Source Sans Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Font Weights */
  --fw-light: 300;
  --fw-regular: 400;
  --fw-medium: 500;
  --fw-semibold: 600;
  --fw-bold: 700;

  /* Line Heights */
  --lh-tight: 1.2;
  --lh-normal: 1.5;
  --lh-relaxed: 1.6;

  /* Letter Spacing */
  --ls-tight: -0.025em;
  --ls-normal: 0;
  --ls-wide: 0.025em;
}

/* Base Typography Override */
body {
  font-family: var(--font-body) !important;
  font-weight: var(--fw-regular);
  line-height: var(--lh-normal);
  letter-spacing: var(--ls-normal);
}

/* Heading Typography */
h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
  font-family: var(--font-heading) !important;
  font-weight: var(--fw-semibold);
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-tight);
  margin-bottom: 1rem;
}

/* Specific Heading Styles */
h1, .h1 {
  font-weight: var(--fw-bold);
  letter-spacing: -0.03em;
}

h2, .h2 {
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-tight);
}

h3, .h3 {
  font-weight: var(--fw-semibold);
}

h4, .h4, h5, .h5, h6, .h6 {
  font-weight: var(--fw-medium);
}

/* Display Typography */
.display-1, .display-2, .display-3, .display-4, .display-5, .display-6 {
  font-family: var(--font-heading) !important;
  font-weight: var(--fw-bold);
  line-height: var(--lh-tight);
  letter-spacing: -0.04em;
}

/* Body Text Enhancements */
p {
  font-family: var(--font-body);
  line-height: var(--lh-relaxed);
  margin-bottom: 1.25rem;
}

/* Lead Text */
.lead {
  font-family: var(--font-body);
  font-weight: var(--fw-regular);
  line-height: var(--lh-relaxed);
  letter-spacing: var(--ls-normal);
}

/* Font Size Utilities */
.fs-lg {
  font-family: var(--font-body);
  font-weight: var(--fw-regular);
  line-height: var(--lh-relaxed);
}

/* Button Typography */
.btn {
  font-family: var(--font-heading) !important;
  font-weight: var(--fw-medium);
  letter-spacing: var(--ls-wide);
}

/* ===== BUTTON COLOR OVERRIDES ===== */

/* Primary Button Styles */
.btn-primary {
  background-color: #1e3a8a !important;
  border-color: #1e3a8a !important;
  color: #ffffff !important;
}

.btn-primary:hover,
.btn-primary:focus {
  background-color: #1e40af !important;
  border-color: #1e40af !important;
  color: #ffffff !important;
}

.btn-primary:active,
.btn-primary.active {
  background-color: #1d4ed8 !important;
  border-color: #1d4ed8 !important;
  color: #ffffff !important;
}

/* Outline Primary Button Styles */
.btn-outline-primary {
  color: #1e3a8a !important;
  border-color: #1e3a8a !important;
  background-color: transparent !important;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus {
  background-color: #1e3a8a !important;
  border-color: #1e3a8a !important;
  color: #ffffff !important;
}

.btn-outline-primary:active,
.btn-outline-primary.active {
  background-color: #1e40af !important;
  border-color: #1e40af !important;
  color: #ffffff !important;
}

/* Navigation Typography */
.nav-link {
  font-family: var(--font-heading);
  font-weight: var(--fw-medium);
  letter-spacing: var(--ls-normal);
}

/* Form Typography */
.form-label {
  font-family: var(--font-heading);
  font-weight: var(--fw-medium);
}

.form-control, .form-select {
  font-family: var(--font-body);
  font-weight: var(--fw-regular);
}

/* ===== FORM ELEMENT COLOR OVERRIDES ===== */

/* Form Control Focus States */
.form-control:focus,
.form-select:focus {
  border-color: #1e3a8a !important;
  box-shadow: 0 0 0 0.25rem rgba(30, 58, 138, 0.25) !important;
}

/* Form Select Styling */
.form-select {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m1 6 7 7 7-7'/%3e%3c/svg%3e") !important;
}

/* Dark Theme Form Overrides */
[data-bs-theme=dark] .form-control:focus,
[data-bs-theme=dark] .form-select:focus {
  border-color: #60a5fa !important;
  box-shadow: 0 0 0 0.25rem rgba(96, 165, 250, 0.25) !important;
}

[data-bs-theme=dark] .form-select {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23ffffff' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m1 6 7 7 7-7'/%3e%3c/svg%3e") !important;
}

/* Custom color overrides */
:root,
[data-bs-theme=light] {
  --ar-primary: #1e3a8a;
  --ar-primary-rgb: 30, 58, 138;
  --ar-primary-text-emphasis: #1e40af;
  --ar-primary-bg-subtle: #dbeafe;
  --ar-primary-border-subtle: #93c5fd;

  /* Button colors */
  --ar-btn-active-color: #fff;
  --ar-btn-active-bg: #1e3a8a;
  --ar-btn-active-border-color: #1e3a8a;

  /* Link colors */
  --ar-link-color: #1e3a8a;
  --ar-link-hover-color: #1e40af;
}

/* Dark theme overrides */
[data-bs-theme=dark] {
  --ar-primary: #3b82f6;
  --ar-primary-rgb: 59, 130, 246;
  --ar-primary-text-emphasis: #60a5fa;
  --ar-primary-bg-subtle: #1e3a8a;
  --ar-primary-border-subtle: #2563eb;

  --ar-link-color: #60a5fa;
  --ar-link-hover-color: #93c5fd;
}

/* ===== LINK AND INTERACTIVE ELEMENT OVERRIDES ===== */

/* General Link Styles */
a {
  color: #1e3a8a;
  text-decoration: none;
}

a:hover,
a:focus {
  color: #1e40af;
}

/* Navigation Link Styles */
.nav-link {
  color: inherit;
}

.nav-link:hover,
.nav-link:focus {
  color: #1e3a8a;
}

/* Text Primary Color Override */
.text-primary {
  color: #1e3a8a !important;
}

/* Border Primary Color Override */
.border-primary {
  border-color: #1e3a8a !important;
}

/* Background Primary Color Override */
.bg-primary {
  background-color: #1e3a8a !important;
}

/* Back to Top Button */
.btn-scroll-top {
  background-color: #1e3a8a !important;
  border-color: #1e3a8a !important;
}

.btn-scroll-top:hover,
.btn-scroll-top:focus {
  background-color: #1e40af !important;
  border-color: #1e40af !important;
}

/* Social Media Button Overrides */
.btn-secondary {
  background-color: #6b7280 !important;
  border-color: #6b7280 !important;
}

.btn-secondary:hover,
.btn-secondary:focus {
  background-color: #1e3a8a !important;
  border-color: #1e3a8a !important;
}

/* Focus States for Accessibility */
.btn:focus,
.btn-primary:focus,
.btn-outline-primary:focus {
  box-shadow: 0 0 0 0.25rem rgba(30, 58, 138, 0.25) !important;
}

/* Active States */
.btn:active,
.btn.active {
  transform: translateY(1px);
}

/* ===== DARK THEME INTERACTIVE ELEMENT OVERRIDES ===== */

[data-bs-theme=dark] .btn-primary {
  background-color: #3b82f6 !important;
  border-color: #3b82f6 !important;
  color: #ffffff !important;
}

[data-bs-theme=dark] .btn-primary:hover,
[data-bs-theme=dark] .btn-primary:focus {
  background-color: #2563eb !important;
  border-color: #2563eb !important;
  color: #ffffff !important;
}

[data-bs-theme=dark] .btn-outline-primary {
  color: #60a5fa !important;
  border-color: #60a5fa !important;
  background-color: transparent !important;
}

[data-bs-theme=dark] .btn-outline-primary:hover,
[data-bs-theme=dark] .btn-outline-primary:focus {
  background-color: #3b82f6 !important;
  border-color: #3b82f6 !important;
  color: #ffffff !important;
}

[data-bs-theme=dark] .text-primary {
  color: #60a5fa !important;
}

[data-bs-theme=dark] .border-primary {
  border-color: #60a5fa !important;
}

[data-bs-theme=dark] .bg-primary {
  background-color: #3b82f6 !important;
}

[data-bs-theme=dark] .btn-scroll-top {
  background-color: #3b82f6 !important;
  border-color: #3b82f6 !important;
}

[data-bs-theme=dark] .btn-scroll-top:hover,
[data-bs-theme=dark] .btn-scroll-top:focus {
  background-color: #2563eb !important;
  border-color: #2563eb !important;
}

[data-bs-theme=dark] .btn:focus,
[data-bs-theme=dark] .btn-primary:focus,
[data-bs-theme=dark] .btn-outline-primary:focus {
  box-shadow: 0 0 0 0.25rem rgba(59, 130, 246, 0.25) !important;
}

/* ===== FOOTER STYLING OVERRIDES ===== */

/* Footer Link Styles */
.footer-link {
  color: #ffffff !important;
  transition: color 0.3s ease;
}

.footer-link:hover,
.footer-link:focus {
  color: #e5e7eb !important;
}

/* Footer Text Color Override */
.footer .text-white {
  color: #ffffff !important;
}

/* Dark Theme Footer Overrides */
[data-bs-theme=dark] .footer-link {
  color: #ffffff !important;
}

[data-bs-theme=dark] .footer-link:hover,
[data-bs-theme=dark] .footer-link:focus {
  color: #93c5fd !important;
}

[data-bs-theme=dark] .footer .text-white {
  color: #ffffff !important;
}

/* ===== RESPONSIVE DESIGN ENHANCEMENTS ===== */

/* Mobile Touch Targets (minimum 44px) */
@media (max-width: 767.98px) {
  .btn {
    min-height: 44px;
    min-width: 44px;
  }

  .form-control,
  .form-select {
    min-height: 44px;
  }

  .nav-link {
    min-height: 44px;
    display: flex;
    align-items: center;
  }

  /* Mobile Form Spacing */
  .form-label {
    margin-bottom: 0.75rem;
  }

  /* Mobile Button Spacing */
  .btn + .btn {
    margin-top: 0.5rem;
  }
}

/* Tablet Responsive Adjustments */
@media (min-width: 768px) and (max-width: 1023.98px) {
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .form-control-lg,
  .form-select-lg {
    font-size: 1rem;
    padding: 0.75rem 1rem;
  }
}

/* Ensure proper contrast on all screen sizes */
@media (max-width: 991.98px) {
  .footer .text-white {
    font-size: 0.875rem;
    line-height: 1.5;
  }

  .footer-link {
    display: inline-block;
    padding: 0.25rem 0;
  }
}

/* ===== CENTERED NAVIGATION SYSTEM ===== */

/* Desktop Navigation Layout (lg and above) */
@media (min-width: 992px) {
  /* Container for the navbar content */
  .navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
  }

  /* Brand stays on the left */
  .navbar-brand {
    flex: 0 0 auto;
    z-index: 10;
  }

  /* Theme switcher stays on the right */
  .theme-switcher {
    flex: 0 0 auto;
    z-index: 10;
  }

  /* Navigation container - positioned absolutely to center */
  .navbar-collapse {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: auto;
    z-index: 5;
  }

  /* Center the navigation items */
  .navbar-nav.me-auto {
    margin: 0 !important;
    display: flex;
    justify-content: center;
    align-items: center;
  }

  /* Navigation item spacing */
  .navbar-nav .nav-item {
    margin: 0 0.75rem;
  }

  /* Ensure nav links have proper spacing */
  .navbar-nav .nav-link {
    padding: 0.5rem 1rem;
    white-space: nowrap;
  }
}

/* Mobile Navigation (below lg) */
@media (max-width: 991.98px) {
  /* Reset positioning for mobile */
  .navbar-collapse {
    position: static;
    transform: none;
    width: 100%;
  }

  /* Stack navigation items vertically on mobile */
  .navbar-nav {
    text-align: center;
    padding: 1rem 0;
  }

  .navbar-nav .nav-item {
    margin: 0.25rem 0;
  }

  /* Mobile hamburger positioning */
  .navbar-toggler {
    order: 3;
  }

  /* Theme switcher positioning on mobile */
  .theme-switcher {
    order: 2;
  }
}

/* ===== BRAND LOGOS STANDARDIZATION ===== */

/* Brand logos container styling */
.brand-logos-section img {
  /* Standardize logo sizing */
  max-width: 160px;
  max-height: 80px;
  width: auto;
  height: auto;

  /* Center alignment and spacing */
  display: block;
  margin: 0 auto;

  /* Consistent visual appearance */
  object-fit: contain;
  object-position: center;

  /* Smooth transitions */
  transition: opacity 0.3s ease, transform 0.2s ease;

  /* Ensure proper rendering */
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
}

/* Responsive logo sizing */
@media (max-width: 767.98px) {
  .brand-logos-section img {
    max-width: 120px;
    max-height: 60px;
  }
}

@media (min-width: 768px) and (max-width: 991.98px) {
  .brand-logos-section img {
    max-width: 140px;
    max-height: 70px;
  }
}

@media (min-width: 992px) {
  .brand-logos-section img {
    max-width: 160px;
    max-height: 80px;
  }
}

/* Brand logo container alignment */
.brand-logos-section .col {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100px;
  padding: 1rem 0.5rem;
}

/* Hover effects for brand logos */
.brand-logos-section img:hover {
  opacity: 0.8;
  transform: scale(1.05);
}
