body {
  font-family: "DM Sans", sans-serif;
  min-height: 100vh;
  background-color: #f0f8ff;
  display: flex;
  flex-direction: column;
}

/* Container margin adjustment */
.container {
  padding-top: 0.5rem;
}

.container.mt-5 {
  margin-top: 2rem !important;
}

/* Main content wrapper to push footer down */
.content-wrapper {
  flex: 1 0 auto;
}

/* Navbar Styles */
.navbar {
  background: transparent;
  font-family: "Space Grotesk", sans-serif;
  position: relative;
  z-index: 1;
  padding: 0.3rem 0;
  margin-bottom: 0;
}
.navbar-brand {
  font-family: "Space Mono", monospace;
  font-weight: 700;
  font-size: 2.4rem;
  letter-spacing: -1px;
  background: #183550;
  background-clip: text; /* Standard syntax */
  -webkit-background-clip: text; /* Safari/Chrome */
  -webkit-text-fill-color: transparent;
  text-shadow: none;
}
h1 {
  font-family: "Outfit", sans-serif;
  font-size: clamp(3rem, 5vw, 4.2rem); /* Responsive font size */
  letter-spacing: -0.03em;
  color: #183550;
  position: relative;
  line-height: 1.1;
  margin-bottom: 1.5rem;
}
h1 .outline {
  -webkit-text-stroke: 2px #183550;
  -webkit-text-fill-color: transparent;
  font-weight: 600;
  text-shadow: 2px 2px 0px rgba(24, 53, 80, 0.1);
}
h2,
h3,
p,
span {
  font-family: "Inter", sans-serif;
  font-weight: 600;
}
.lead {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-weight: 400;
  font-size: clamp(1.1rem, 2vw, 1.3rem);
  letter-spacing: -0.01em;
  opacity: 0.9;
  max-width: 85%;
  color: #183550;
  margin-top: 1.5rem;
  line-height: 1.6;
}
.nav-link {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-weight: 500;
  letter-spacing: -0.2px;
  position: relative;
  padding: 0.5rem 1.8rem;
  font-size: 1.1rem;
  transition: all 0.3s ease;
  opacity: 0.75;
}
.nav-link:hover {
  opacity: 1;
}
.nav-link::after {
  content: "";
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0;
  left: 50%;
  background: #68b0e3;
  transition: all 0.3s ease;
  transform: translateX(-50%);
}
.nav-link:hover::after {
  width: 70%;
}
.nav-link.active {
  opacity: 1;
  font-weight: 600;
}
button {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 600;
  letter-spacing: -0.2px;
}
.hero-section {
  margin-top: 40px;
}
.navbar-nav.mx-auto {
  gap: 1rem;
}

/* Center navbar on desktop only */
@media (min-width: 992px) {
  .navbar-nav.mx-auto {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
  }
}
.search-input {
  min-width: 200px;
  padding: 0.6rem 1rem;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(24, 53, 80, 0.1);
  color: #000;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}
.search-input::placeholder {
  color: rgba(0, 0, 0, 0.5);
}
.search-input:focus {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(24, 53, 80, 0.2);
  box-shadow: 0 0 0 2px rgba(24, 53, 80, 0.1);
}
.search-btn {
  backdrop-filter: blur(5px);
  border: 1px solid rgba(104, 176, 227, 0.3);
  color: #68b0e3;
}
.search-btn:hover {
  background: rgba(104, 176, 227, 0.1);
  border-color: #68b0e3;
  color: #68b0e3;
}
.hero-btn {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 600;
  letter-spacing: 0;
  padding: 0.8rem 2rem;
  font-size: 1.1rem;
  background: #183550;
  border: none;
  transition: all 0.3s ease;
}
.hero-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(24, 53, 80, 0.2);
  background: #183550;
}
/* Add after body styles */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    to bottom,
    rgba(24, 53, 80, 0.02),
    rgba(24, 53, 80, 0.05)
  );
  pointer-events: none;
  z-index: 0;
}
/* Add animation classes */
.fade-in {
  animation: fadeIn 0.8s ease-out;
}
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Footer Styles */
footer {
  padding: 0.8rem 0;
  text-align: center;
  position: relative;
  z-index: 1;
  margin-top: 0.8rem;
  flex-shrink: 0;
  border-radius: 12px 12px 0 0;
}

.footer-solid {
  background: rgba(24, 53, 80, 0.95);
  color: white;
}

.footer-transparent {
  background: rgba(24, 53, 80, 0.1);
  color: #183550;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid rgba(24, 53, 80, 0.15);
  border-radius: 16px 16px 0 0;
}

.footer-transparent p {
  font-weight: 500;
  font-size: 0.9rem;
  margin-bottom: 0;
}

.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: #183550;
  font-size: 1rem;
  transition: all 0.3s ease;
  margin: 0 0.5rem;
  background-color: rgba(255, 255, 255, 0.15);
}

.footer-solid .social-link {
  color: white;
  background-color: rgba(255, 255, 255, 0.1);
}

.social-link:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(24, 53, 80, 0.15);
  background-color: rgba(255, 255, 255, 0.3);
}

/* Glass Morphism Styles */
.glass-effect {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(24, 53, 80, 0.1);
}

.glass-card {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(24, 53, 80, 0.1);
  transition: all 0.3s ease;
}

.glass-card:hover {
  box-shadow: 0 8px 32px rgba(24, 53, 80, 0.15);
  transform: translateY(-5px);
}

.glass-navbar {
  background: rgba(104, 176, 227, 0.08) !important;
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border-bottom: 1px solid rgba(104, 176, 227, 0.15);
  box-shadow: 0 4px 30px rgba(104, 176, 227, 0.08);
}

.glass-container {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 8px 32px rgba(24, 53, 80, 0.08);
}

.glass-input {
  background: #ffffff;
  border: 1px solid rgba(24, 53, 80, 0.3);
  border-radius: 8px;
  padding: 0.8rem 1.2rem;
  color: #183550;
  box-shadow: 0 2px 4px rgba(24, 53, 80, 0.15);
}

.glass-input::placeholder {
  color: rgba(24, 53, 80, 0.5);
}

.glass-btn {
  background: rgba(104, 176, 227, 0.08);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  border: 1px solid rgba(104, 176, 227, 0.3);
  color: #68b0e3;
}

.glass-btn:hover {
  background: rgba(104, 176, 227, 0.15);
  border-color: #68b0e3;
  color: #68b0e3;
}

/* Specific background styles for non-home pages */
body:not(#vanta-bg) {
  background: url('/images/background.jpeg') center/cover no-repeat fixed;
}

.content-container {
  background: white;
  border: 1px solid rgba(24, 53, 80, 0.1);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 8px 32px rgba(24, 53, 80, 0.08);
}

/* Form validation styles */
.form-control:valid:focus,
.form-select:valid:focus {
  border-color: #198754;
  box-shadow: 0 0 0 0.25rem rgba(25, 135, 84, 0.25);
}

.form-control:invalid:focus,
.form-select:invalid:focus {
  border-color: #dc3545;
  box-shadow: 0 0 0 0.25rem rgba(220, 53, 69, 0.25);
}

.form-control.is-invalid,
.form-select.is-invalid {
  border-color: #dc3545;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right calc(0.375em + 0.1875rem) center;
  background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.form-control.is-valid,
.form-select.is-valid {
  border-color: #198754;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23198754' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right calc(0.375em + 0.1875rem) center;
  background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.invalid-feedback {
  display: none;
  width: 100%;
  margin-top: 0.25rem;
  font-size: 0.875em;
  color: #dc3545;
}

.was-validated .form-control:invalid ~ .invalid-feedback,
.form-control.is-invalid ~ .invalid-feedback {
  display: block;
}

/* Dark Search Button Style */
.dark-search-btn {
  background-color: #183550;
  color: white;
  padding: 0.6rem 1rem;
  border: none;
  transition: all 0.3s ease;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.dark-search-btn:hover {
  background-color: #234968;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* ============================================
   RESPONSIVE MEDIA QUERIES
   ============================================ */

/* Mobile devices (portrait phones, less than 576px) */
@media (max-width: 575.98px) {
  /* Typography adjustments */
  h1 {
    font-size: 2.2rem;
    margin-bottom: 1rem;
  }
  
  .lead {
    font-size: 1rem;
    max-width: 100%;
    margin-top: 1rem;
  }
  
  /* Navbar adjustments */
  .navbar-brand {
    font-size: 1.8rem;
  }
  
  .navbar-brand img {
    width: 60px !important;
    height: 60px !important;
  }
  
  .nav-link {
    padding: 0.75rem 1rem;
    font-size: 1rem;
  }
  
  /* Search form - stack vertically on mobile */
  .navbar-nav.ms-auto form {
    flex-direction: column;
    width: 100%;
    gap: 0.5rem;
  }
  
  .search-input,
  .glass-input {
    width: 100% !important;
    min-width: 100%;
    margin-right: 0 !important;
  }
  
  .dark-search-btn,
  .search-btn {
    width: 100%;
    padding: 0.75rem 1rem;
  }
  
  /* Container and content adjustments */
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  
  .content-container {
    padding: 1.5rem;
    margin-bottom: 2rem;
  }
  
  .glass-container {
    padding: 1.5rem;
  }
  
  /* Hero section */
  .hero-section {
    margin-top: 20px;
  }
  
  .hero-btn {
    width: 100%;
    padding: 1rem 1.5rem;
    font-size: 1rem;
  }
  
  /* Cards and glass effects */
  .glass-card {
    margin-bottom: 1rem;
  }
  
  /* Touch targets - minimum 44x44px */
  button,
  .btn,
  a.btn {
    min-height: 44px;
    padding: 0.75rem 1.5rem;
  }
  
  /* Form elements */
  .form-control,
  .form-select {
    font-size: 16px; /* Prevents zoom on iOS */
    padding: 0.75rem;
  }
  
  /* Footer adjustments */
  footer {
    padding: 1.5rem 0;
  }
  
  .social-link {
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
  }
}

/* Tablet devices (landscape phones and portrait tablets, 576px to 991px) */
@media (min-width: 576px) and (max-width: 991.98px) {
  /* Typography */
  h1 {
    font-size: 3rem;
  }
  
  .lead {
    font-size: 1.15rem;
    max-width: 90%;
  }
  
  /* Navbar */
  .navbar-brand {
    font-size: 2rem;
  }
  
  .navbar-brand img {
    width: 70px !important;
    height: 70px !important;
  }
  
  /* Search form - horizontal on tablet */
  .search-input,
  .glass-input {
    min-width: 180px;
  }
  
  /* Content spacing */
  .content-container {
    padding: 2rem;
  }
  
  /* Hero section */
  .hero-section {
    margin-top: 30px;
  }
}

/* Large tablets and small desktops (992px to 1199px) */
@media (min-width: 992px) and (max-width: 1199.98px) {
  .navbar-brand {
    font-size: 2.2rem;
  }
  
  .search-input,
  .glass-input {
    min-width: 180px;
  }
}

/* Extra small devices - specific adjustments */
@media (max-width: 374.98px) {
  h1 {
    font-size: 1.8rem;
  }
  
  .navbar-brand {
    font-size: 1.5rem;
  }
  
  .navbar-brand img {
    width: 50px !important;
    height: 50px !important;
  }
  
  .content-container {
    padding: 1rem;
  }
}

/* Landscape orientation adjustments */
@media (max-height: 500px) and (orientation: landscape) {
  .hero-section {
    margin-top: 10px;
  }
  
  h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
  }
  
  .lead {
    margin-top: 0.5rem;
  }
}

/* Print styles */
@media print {
  .navbar,
  footer,
  .search-input,
  .search-btn,
  .dark-search-btn {
    display: none;
  }
  
  body {
    background: white;
  }
  
  .content-container {
    box-shadow: none;
    border: 1px solid #ccc;
  }
}

/* ============================================
   PERFORMANCE OPTIMIZATIONS
   ============================================ */

/* Reduce repaints for animated elements */
.hero-btn,
.nav-link,
.glass-card,
.social-link,
button,
.btn {
  will-change: transform;
}

/* Contain layout shifts */
.content-container,
.glass-container {
  contain: layout style;
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Optimize font rendering */
body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
