/*!
 * Dominion Claim Solutions - Main Stylesheet
 * Version: 2.1.0
 * Author: Dominion Claim Solutions
 * License: Proprietary
 * Features: Modern CSS with Tailwind CSS integration and Container Queries
 */

/* Tailwind CSS directives for v4 */
@import url("tailwindcss/preflight");
@import url("tailwindcss/utilities");

/* Form.io CSS for application modal */
@import url("formiojs/dist/formio.full.min.css");

/* Custom Form.io theme overrides (must come after default Form.io CSS) */
@import url("./styles/formio-theme.css");

/* ------------------------------------*\
  #BUTTON-COMPONENTS
  Reusable button styles consistent with design system
\*------------------------------------ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 0.75rem;
  transition: all 0.2s ease-in-out;
  cursor: pointer;
  border: 2px solid transparent;
  font-family: inherit;
  line-height: 1.5;
  white-space: nowrap;
}

.btn:focus {
  outline: 2px solid currentcolor;
  outline-offset: 2px;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  pointer-events: none;
}

/* Button sizes */
.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

.btn {
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
}

.btn-lg {
  padding: 1rem 2rem;
  font-size: 1.125rem;
}

/* Primary button */
.btn-primary {
  background-color: #1a3558;
  color: white;
  border-color: #1a3558;
}

.btn-primary:hover {
  background-color: #142a47;
  border-color: #142a47;
  color: white;
  text-decoration: none;
}

.btn-primary:focus {
  outline-color: #1a3558;
}

/* Secondary button */
.btn-secondary {
  background-color: transparent;
  color: #1a3558;
  border-color: #1a3558;
}

.btn-secondary:hover {
  background-color: #1a3558;
  color: white;
  text-decoration: none;
}

.btn-secondary:focus {
  outline-color: #1a3558;
}

/* Apply button - special styling for application CTAs */
.btn-apply {
  background: linear-gradient(135deg, #1a3558 0%, #2563eb 100%);
  color: white;
  border-color: transparent;
  box-shadow: 0 4px 14px 0 rgb(26 53 88 / 25%);
  position: relative;
  overflow: hidden;
}

.btn-apply::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgb(255 255 255 / 20%),
    transparent
  );
  transition: left 0.5s ease;
}

.btn-apply:hover::before {
  left: 100%;
}

.btn-apply:hover {
  background: linear-gradient(135deg, #142a47 0%, #1d4ed8 100%);
  color: white;
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px 0 rgb(26 53 88 / 35%);
}

.btn-apply:focus {
  outline-color: #1a3558;
}

.btn-apply:active {
  transform: translateY(0);
  box-shadow: 0 4px 14px 0 rgb(26 53 88 / 25%);
}

/* ------------------------------------*\
  #CRITICAL-CSS
  Priority styles for above-the-fold content
\*------------------------------------ */

/* Reset and Base Styles with improved performance */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ------------------------------------*\
  #CONTAINER-QUERIES
  Modern responsive design with container queries
\*------------------------------------ */

/* Define container contexts */
.hero,
.services,
.contact,
.container {
  container-type: inline-size;
}

/* Prevent layout shift and improve font loading */
html {
  scroll-behavior: smooth;
  font-size: 16px;
  text-size-adjust: 100%;
}

/* Optimize rendering performance */
body {
  font-family: var(
    --font-montserrat,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    Oxygen,
    Ubuntu,
    Cantarell,
    sans-serif
  );
  line-height: 1.6;
  color: var(--text-primary);
  overflow-x: hidden;
  background-color: var(--bg-primary);
  position: relative;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizespeed;
  transition:
    font-family 0.25s ease,
    color 0.25s ease;
}

/* Apply loaded fonts when ready */
.fonts-loaded body {
  font-family: var(
    --font-montserrat,
    "Montserrat",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    sans-serif
  );
}

/* Hero Section - Enhanced with Professional Gradient and Logo */
.hero {
  position: relative;
  min-height: 100vh;
  background:
    linear-gradient(
      135deg,
      var(--primary-navy) 0%,
      var(--navy-light) 25%,
      var(--primary-blue) 50%,
      var(--navy-medium) 75%,
      var(--primary-navy) 100%
    ),
    radial-gradient(
      ellipse at top left,
      rgb(255 255 255 / 10%) 0%,
      transparent 50%
    ),
    radial-gradient(
      ellipse at bottom right,
      rgb(212 160 23 / 10%) 0%,
      transparent 50%
    );
  background-size:
    100% 100%,
    80% 80%,
    60% 60%;
  background-position:
    center,
    top left,
    bottom right;
  background-attachment: fixed;
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem 2rem 3rem;
  overflow: hidden;
  transform: translate3d(0, 0, 0);
  will-change: transform;
  backface-visibility: hidden;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1200px;
  margin: 0 auto;
  transform: translate3d(0, 0, 0);
}

.hero-title {
  font-size: var(--s3);
  font-weight: 700;
  margin-bottom: 1.2rem;
  color: var(--white);
  transform: translate3d(0, 0, 0);
}

/* High-priority elements */
.logo-link {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}

/* Footer-specific modifications */
.footer-logo .logo-link {
  width: 100%;
  height: 100%;
  margin-left: 6px;
}

/* Reset and Base Styles */
:root {
  /* Color Palette */
  --primary-navy: #1a3558;
  --primary-blue: #2d4a6b;
  --secondary-gray: #4a6279;
  --accent-gold: #fff;
  --neutral-white: #fff;
  --white: #fff;

  /* Font stacks (overridden by runtime swap helper when available) */
  --font-montserrat:
    "Montserrat", system-ui, -apple-system, blinkmacsystemfont, "Segoe UI",
    roboto, arial, sans-serif;
  --font-playfair: "Playfair Display", georgia, "Times New Roman", serif;
  --font-inter:
    "Inter", system-ui, -apple-system, blinkmacsystemfont, "Segoe UI", roboto,
    arial, sans-serif;

  /* Critical Gradients */
  --gradient-primary: linear-gradient(
    135deg,
    var(--primary-navy) 0%,
    var(--navy-light) 100%
  );
  --gradient-gold: linear-gradient(
    135deg,
    var(--white) 0%,
    rgb(255 255 255 / 90%) 100%
  );
  --gradient-footer: linear-gradient(
    135deg,
    rgb(255 255 255 / 10%) 0%,
    rgb(255 255 255 / 5%) 100%
  );

  /* System-based Typography Scale with Enhanced Fluid Scaling */
  --s-1: clamp(0.875rem, 0.8vw + 0.6rem, 1rem);
  --s0: clamp(1rem, 1vw + 0.7rem, 1.125rem);
  --s1: clamp(1.25rem, 1.5vw + 0.9rem, 1.5rem);
  --s2: clamp(1.5rem, 2vw + 1rem, 2rem);
  --s3: clamp(2rem, 3vw + 1.2rem, 2.75rem);
  --s4: clamp(2.5rem, 4vw + 1.5rem, 3.5rem);
  --s5: clamp(3rem, 5vw + 2rem, 4.5rem);

  /* Legacy font sizes for compatibility */
  --font-size-3xl: var(--s4);
  --font-size-4xl: var(--s5);

  /* Color Variations */
  --navy-light: #2d4a6b;
  --navy-dark: #0f1f33;
  --navy-medium: #1f4068;
  --gray-light: #8fa4b8;
  --gray-dark: #556b7f;
  --gold-light: #fff;
  --gold-dark: #f5f5f5;

  /* Semantic Colors */
  --bg-primary: var(--neutral-white);
  --bg-secondary: #f8fafc;
  --bg-accent: #fefcf7;
  --text-primary: var(--primary-navy);
  --text-secondary: var(--secondary-gray);
  --text-accent: var(--white);

  /* Shadows */
  --shadow-light: 0 2px 4px rgb(26 53 88 / 10%);
  --shadow-medium: 0 4px 12px rgb(26 53 88 / 15%);
  --shadow-heavy: 0 8px 20px rgb(26 53 88 / 20%);
  --shadow-gold: 0 4px 12px rgb(255 255 255 / 30%);
}

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

/* Utility Classes */
.no-underline {
  text-decoration: none;
}

.inherit-color {
  color: inherit;
}

.contact-link {
  color: var(--secondary-gray);
  text-decoration: none;
  transition: color 0.3s ease;
}

.contact-link:hover {
  color: var(--primary-blue);
}

/* Accessibility */
.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;
}

/* Alpine.js best practice to avoid FOUC */
[x-cloak] {
  display: none !important;
}

/* htmx best practice: subtle busy state and indicator hook */
[aria-busy="true"] {
  cursor: progress;
}

.htmx-indicator {
  display: none;
}

.htmx-request .htmx-indicator {
  display: inline-block;
}

/* Skip Navigation Link */
.skip-nav {
  position: absolute;
  top: -40px;
  left: 6px;
  background: var(--primary-navy);
  color: white;
  padding: 8px;
  text-decoration: none;
  border-radius: 4px;
  z-index: 10000;
  font-weight: 600;
  transition: top 0.3s ease;
}

.skip-nav:focus {
  top: 6px;
}

/* Focus styles for keyboard navigation */
:focus-visible {
  outline: 2px solid var(--white);
  outline-offset: 2px;
}

/* Remove focus outline for mouse users */
:focus:not(:focus-visible) {
  outline: none;
}

/* Top border gradient for visual separation */

body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(
    90deg,
    var(--primary-navy) 0%,
    var(--white) 50%,
    var(--primary-navy) 100%
  );
  z-index: 1001;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Navigation */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgb(255 255 255 / 95%);
  backdrop-filter: blur(10px);
  z-index: 1000;
  padding: 1rem 0;
  transition: all 0.3s ease;
  border-bottom: 1px solid rgb(26 53 88 / 10%);
  box-shadow: var(--shadow-light);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Logo Styles */
.logo-container {
  display: flex;
  align-items: center;
  gap: 12px;
  transition: transform 0.2s ease;
  cursor: pointer;
}

.logo-container:hover {
  transform: scale(1.02);
}

/* Logo Image Styles */
.logo-image {
  transition: all 0.3s ease;
  filter: drop-shadow(0 2px 4px rgb(26 53 88 / 10%));
}

.nav-logo-img {
  height: 50px;
  width: auto;
  max-width: 200px;
  object-fit: contain;
}

.nav-logo-img:hover {
  transform: scale(1.05);
  filter: drop-shadow(0 4px 8px rgb(212 160 23 / 30%));
}

.logo-container:hover .logo-text h2 {
  color: var(--text-accent);
}

.logo-container:hover .logo-text p {
  color: var(--text-accent);
}

.hero-logo {
  text-align: center;
  margin-top: 3.5rem;
  margin-bottom: 1.2rem;
  position: relative;
  z-index: 10;
}

.hero-logo-shield {
  width: 240px;
  height: 240px;
  background: linear-gradient(
    135deg,
    rgb(255 255 255 / 15%) 0%,
    rgb(255 255 255 / 5%) 50%,
    rgb(26 53 88 / 10%) 100%
  );
  border: 2px solid rgb(255 255 255 / 20%);
  border-radius: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 5rem;
  color: var(--white);
  box-shadow:
    0 20px 60px rgb(0 0 0 / 30%),
    0 8px 32px rgb(26 53 88 / 40%),
    inset 0 1px 0 rgb(255 255 255 / 15%);
  margin: 0 auto 2rem;
  backdrop-filter: blur(20px);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.hero-logo-shield::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgb(255 255 255 / 20%),
    transparent
  );
  transition: left 0.6s ease;
}

.hero-logo-shield:hover::before {
  left: 100%;
}

.hero-logo-shield:hover {
  transform: translateY(-8px) scale(1.05);
  box-shadow:
    0 30px 80px rgb(0 0 0 / 40%),
    0 12px 40px rgb(26 53 88 / 50%),
    inset 0 1px 0 rgb(255 255 255 / 25%);
  border-color: rgb(255 255 255 / 30%);
}

.hero-logo-img {
  height: clamp(380px, 17.5vw + 250px, 520px);
  width: auto;
  max-width: clamp(730px, 55vw + 410px, 1180px);
  object-fit: contain;
  filter: drop-shadow(0 8px 24px rgb(0 0 0 / 30%))
    drop-shadow(0 4px 12px rgb(26 53 88 / 40%));
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  z-index: 5;
  display: block;
  margin: 0 auto;
}

.hero-logo-img:hover {
  transform: scale(1.02) translateY(-4px);
  filter: drop-shadow(0 12px 32px rgb(0 0 0 / 40%))
    drop-shadow(0 6px 16px rgb(26 53 88 / 50%));
}

/* Legacy logo shield styles - keeping for fallback */
.logo-shield {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #1a3558 0%, #2d4a6b 100%);
  border: 2px solid #d4a017;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgb(26 53 88 / 20%);
}

.logo-shield:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgb(212 160 23 / 30%);
}

.logo-shield i {
  color: #d4a017;
  font-size: 1.2rem;
  transition: transform 0.2s ease;
}

.logo-shield:hover i {
  transform: scale(1.1);
}

.logo-text h2 {
  color: var(--text-primary);
  font-family: Montserrat, sans-serif;
  font-weight: 700;
  font-size: 1.3rem;
  margin: 0;
  line-height: 1.2;
  transition: color 0.3s ease;
  font-variant: small-caps;
  letter-spacing: 0.5px;
}

.logo-text p {
  color: var(--text-secondary);
  font-family: Montserrat, sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  margin: 0;
  letter-spacing: 0.5px;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.nav-link {
  text-decoration: none;
  color: #1a3558;
  font-weight: 600;
  font-family: Montserrat, sans-serif;
  transition: all 0.2s ease;
  position: relative;
  padding: 0.5rem 0;
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary-blue), var(--navy-light));
  transition: width 0.2s ease;
}

.nav-link:hover::after {
  width: 100%;
}

.nav-link:hover {
  color: var(--primary-blue);
}

.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 44px;
  height: 44px;
  cursor: pointer;
  border: none;
  background: transparent;
  border-radius: 8px;
  padding: 8px;
  position: relative;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hamburger:hover {
  background-color: rgb(26 53 88 / 10%);
  transform: scale(1.05);
}

.hamburger:focus {
  outline: 2px solid var(--primary-blue);
  outline-offset: 2px;
}

.bar {
  width: 24px;
  height: 2.5px;
  background: linear-gradient(90deg, var(--primary-navy), var(--navy-light));
  border-radius: 2px;
  position: relative;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 2px rgb(0 0 0 / 10%);
}

.bar:nth-child(1) {
  margin-bottom: 5px;
  transform-origin: center;
}

.bar:nth-child(2) {
  margin-bottom: 5px;
  transform-origin: center;
}

.bar:nth-child(3) {
  transform-origin: center;
}

/* Active hamburger animation */
.hamburger.active .bar:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
  background: linear-gradient(90deg, var(--primary-blue), var(--navy-medium));
}

.hamburger.active .bar:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.hamburger.active .bar:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
  background: linear-gradient(90deg, var(--primary-blue), var(--navy-medium));
}

/* Hover effect for individual bars - subtle fade */
.hamburger:hover .bar {
  background: linear-gradient(90deg, var(--primary-blue), var(--navy-light));
  opacity: 0.8;
  transform: scaleY(1.1);
}

.hamburger:not(.active):hover .bar:nth-child(1) {
  transform: scaleY(1.1) translateX(2px);
}

.hamburger:not(.active):hover .bar:nth-child(2) {
  opacity: 0.9;
  transform: scaleY(1.1);
}

.hamburger:not(.active):hover .bar:nth-child(3) {
  transform: scaleY(1.1) translateX(-2px);
}

/* Breathing animation when menu is closed */
@keyframes breathe {
  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.02);
  }
}

@keyframes slideInFromLeft {
  0% {
    transform: translateX(-100%);
    opacity: 0;
  }

  100% {
    transform: translateX(0);
    opacity: 1;
  }
}

.hamburger:not(.active):hover {
  animation: breathe 2s ease-in-out infinite;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      circle at 20% 80%,
      rgb(255 255 255 / 12%) 0%,
      transparent 60%
    ),
    radial-gradient(circle at 80% 20%, rgb(212 160 23 / 8%) 0%, transparent 60%),
    radial-gradient(circle at 50% 50%, rgb(45 74 107 / 5%) 0%, transparent 70%),
    linear-gradient(
      45deg,
      rgb(26 53 88 / 5%) 0%,
      transparent 50%,
      rgb(45 74 107 / 3%) 100%
    );
  animation: heroGlow 6s ease-in-out infinite alternate;
  z-index: 1;
}

@keyframes heroGlow {
  0% {
    opacity: 0.6;
    transform: scale(1);
  }

  100% {
    opacity: 1;
    transform: scale(1.02);
  }
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: url('data:image/svg+xml,<svg width="60" height="60" viewBox="0 0 60 60" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd"><g fill="rgba(255,255,255,0.03)" fill-opacity="0.3"><circle cx="7" cy="7" r="1"/><circle cx="27" cy="7" r="1"/><circle cx="47" cy="7" r="1"/><circle cx="7" cy="27" r="1"/><circle cx="27" cy="27" r="1"/><circle cx="47" cy="27" r="1"/><circle cx="7" cy="47" r="1"/><circle cx="27" cy="47" r="1"/><circle cx="47" cy="47" r="1"/></g></svg>')
    repeat;
  animation: floatPattern 20s linear infinite;
  pointer-events: none;
  z-index: 1;
}

@keyframes floatPattern {
  0% {
    transform: translateY(0) translateX(0);
  }

  100% {
    transform: translateY(-60px) translateX(-60px);
  }
}

.hero-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  text-align: center;
  position: relative;
  z-index: 2;
}

.hero-subtitle {
  font-size: 1.2rem;
  margin-bottom: 1.5rem;
  opacity: 0.9;
  line-height: 1.6;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero-buttons {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 1.2rem;
}

.btn {
  padding: 14px 28px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
  font-family: Montserrat, sans-serif;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-block;
  border: none;
  cursor: pointer;
  font-size: 1.05rem;
  position: relative;
  overflow: hidden;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  box-shadow: 0 5px 15px rgb(0 0 0 / 15%);
  text-align: center;
  white-space: nowrap;
}

.btn-primary {
  background: #1a3558;
  color: #fff;
  border: 2px solid #1a3558;
  text-shadow: none;
  font-weight: 800;
}

.btn-primary:hover {
  background: #2d4a6b;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgb(0 0 0 / 20%);
  border-color: #2d4a6b;
}

.btn-secondary {
  background: rgb(255 255 255 / 20%);
  color: white;
  border: 2px solid #fff;
  backdrop-filter: blur(10px);
  text-shadow: 0 2px 4px rgb(0 0 0 / 50%);
}

.btn-secondary:hover {
  background: rgb(255 255 255 / 30%);
  color: white;
  border-color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgb(0 0 0 / 20%);
  text-shadow: 0 2px 5px rgb(0 0 0 / 60%);
}

.btn-apply {
  background: linear-gradient(
    135deg,
    var(--primary-blue) 0%,
    var(--navy-light) 100%
  );
  color: white;
  border: 2px solid var(--primary-blue);
  text-shadow: 0 1px 2px rgb(0 0 0 / 30%);
}

.btn-apply:hover {
  background: linear-gradient(
    135deg,
    var(--navy-light) 0%,
    var(--primary-navy) 100%
  );
  color: white;
  border-color: var(--navy-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgb(26 53 88 / 25%);
  text-shadow: 0 2px 4px rgb(0 0 0 / 40%);
}

/* Scroll offset for fixed navigation */
section {
  scroll-margin-top: 100px; /* Adjust for fixed navbar height + extra spacing */
}

/* Services Section with Fluid Spacing */
.services {
  padding: clamp(60px, 8vh + 20px, 80px) 0;
  background: linear-gradient(180deg, #fff 0%, #f8fafc 100%);
  position: relative;
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-header h2 {
  font-family: Montserrat, sans-serif;
  font-size: 3.5rem;
  font-weight: 700;
  color: #1a3558;
  margin-bottom: 1rem;
  position: relative;
  line-height: 1.2;
  text-shadow: 0 2px 4px rgb(0 0 0 / 10%);
}

.section-header h2::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--white), var(--gray-light));
  transition: width 0.6s ease;
}

.section-header h2:hover::after {
  width: 80px;
}

.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

/* Media queries for responsive grid - fallback for container queries */
@media (width >= 768px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (width >= 1024px) {
  .services-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.service-card {
  background: white;
  padding: 2rem;
  border-radius: 16px;
  box-shadow: 0 4px 6px rgb(26 53 88 / 10%);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid #e5e7eb;
  text-align: center;
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.service-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(
    90deg,
    var(--primary-blue),
    var(--secondary-gray)
  );
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.service-card:hover::before {
  transform: scaleX(1);
}

.service-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 20px 40px rgb(26 53 88 / 15%);
}

.service-icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(
    135deg,
    var(--primary-navy) 0%,
    var(--navy-light) 100%
  );
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  font-size: 1.5rem;
  color: white;
  box-shadow: var(--shadow-medium);
}

/* Heroicons SVG Styles */
.icon-svg {
  width: 1.5rem;
  height: 1.5rem;
  display: inline-block;
  vertical-align: middle;
}

.service-icon .icon-svg {
  width: 2rem;
  height: 2rem;
  color: white;
}

.icon-xl .icon-svg,
.icon-svg.icon-xl {
  width: 2.5rem;
  height: 2.5rem;
}

.icon-lg .icon-svg,
.icon-svg.icon-lg {
  width: 1.75rem;
  height: 1.75rem;
}

.icon-sm .icon-svg,
.icon-svg.icon-sm {
  width: 1.25rem;
  height: 1.25rem;
}

.social-icon .icon-svg {
  width: 1.25rem;
  height: 1.25rem;
}

/* Inline icon styles for lists and text */
.service-list li span[data-heroicon],
.contact-info p span[data-heroicon] {
  display: inline-block;
  vertical-align: middle;
  margin-right: 0.5rem;
}

.service-list li span[data-heroicon] .icon-svg,
.contact-info p span[data-heroicon] .icon-svg {
  width: 1.25rem;
  height: 1.25rem;
}

/* Ensure inline SVGs display correctly */
span[data-heroicon] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

span[data-heroicon] .icon-svg {
  display: block;
}

.service-card h3 {
  font-family: Montserrat, sans-serif;
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: #1a3558;
}

.service-card p {
  color: var(--secondary-gray);
  line-height: 1.6;
}

/* ------------------------------------*\
  #CONTAINER-QUERIES-IMPLEMENTATION
  Component-based responsive design
\*------------------------------------ */

/* Services container queries */
@container (max-width: 600px) {
  .services-grid {
    grid-template-columns: 1fr;
    gap: clamp(1rem, 3vw, 1.5rem);
  }

  .service-card {
    padding: clamp(1.5rem, 4vw, 2rem);
  }

  .service-card h3 {
    font-size: clamp(1.25rem, 3vw, 1.5rem);
  }

  .service-card p {
    font-size: clamp(0.9rem, 2.5vw, 1rem);
  }
}

@container (min-width: 601px) and (max-width: 900px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: clamp(1.5rem, 4vw, 2rem);
  }
}

@container (min-width: 901px) {
  .services-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: clamp(2rem, 5vw, 2.5rem);
  }
}

/* Hero container queries */
@container (max-width: 480px) {
  .hero-content {
    padding: clamp(2rem, 5vw, 3rem);
  }

  .hero-title {
    font-size: clamp(1.75rem, 5vw, 2.25rem);
    margin-bottom: clamp(1rem, 3vw, 1.5rem);
  }

  .hero-subtitle {
    font-size: clamp(1rem, 3vw, 1.125rem);
    margin-bottom: clamp(1.5rem, 4vw, 2rem);
  }

  .hero-buttons {
    flex-direction: column;
    gap: clamp(0.75rem, 2vw, 1rem);
  }

  .hero-buttons .btn {
    width: 100%;
    padding: clamp(0.75rem, 3vw, 1rem) clamp(1.5rem, 5vw, 2rem);
  }
}

@container (min-width: 481px) and (max-width: 768px) {
  .hero-buttons {
    flex-direction: row;
    gap: clamp(1rem, 3vw, 1.5rem);
  }

  .hero-buttons .btn {
    flex: 1;
    max-width: 200px;
  }
}

/* Careers Section */
.careers {
  padding: clamp(60px, 8vh + 20px, 80px) 0;
  background: linear-gradient(180deg, #fff 0%, #f8fafc 100%);
  position: relative;
}

.careers .section-header h2 {
  font-family: Montserrat, sans-serif;
  font-size: clamp(2rem, 4vw + 1rem, 2.5rem);
  font-weight: 700;
  margin-bottom: clamp(1rem, 3vw, 1.5rem);
  line-height: 1.2;
  color: var(--text-primary);
}

.careers-content {
  margin: 0 auto;
  text-align: center;
}

#careers .services-grid {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  justify-content: center;
  gap: 2rem;
  max-width: 900px;
  margin: 0 auto;
}

@media (width >= 1024px) {
  #careers .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.careers-intro {
  font-size: 1.125rem;
  color: var(--text-color);
  margin-bottom: 2rem;
  line-height: 1.6;
}

.careers-message {
  margin-top: 2rem;
}

.future-opportunities {
  background: linear-gradient(
    135deg,
    rgb(26 53 88 / 5%) 0%,
    rgb(59 130 246 / 8%) 100%
  );
  border: 1px solid rgb(26 53 88 / 10%);
  border-radius: 12px;
  padding: 2.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.future-opportunities::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(
    90deg,
    var(--primary-navy) 0%,
    var(--primary-blue) 100%
  );
}

.opportunity-icon {
  font-size: 2.5rem;
  color: var(--primary-blue);
  margin-bottom: 1.5rem;
}

.future-opportunities h3 {
  font-family: var(--font-playfair), serif;
  font-size: 1.75rem;
  color: var(--primary-navy);
  margin-bottom: 1.25rem;
  font-weight: 600;
}

.future-opportunities p {
  font-size: 1.125rem;
  line-height: 1.7;
  color: var(--text-color);
  margin-bottom: 1.5rem;
}

.check-back-message {
  background: rgb(26 53 88 / 5%);
  border-left: 4px solid var(--primary-blue);
  padding: 1.25rem;
  margin: 1.5rem 0 !important;
  border-radius: 0 8px 8px 0;
  font-style: italic;
}

.check-back-message strong {
  color: var(--primary-navy);
  font-weight: 700;
}

.contact-encourage {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgb(26 53 88 / 10%);
}

.contact-encourage i {
  color: var(--primary-blue);
  margin-right: 0.5rem;
}

.careers-contact-link {
  color: var(--primary-blue);
  text-decoration: none;
  font-weight: 600;
  border-bottom: 2px solid transparent;
  transition: border-color 0.3s ease;
}

.careers-contact-link:hover {
  border-bottom-color: var(--primary-blue);
}

@media (width <= 768px) {
  .future-opportunities {
    padding: 2rem 1.5rem;
  }

  .future-opportunities h3 {
    font-size: 1.5rem;
  }

  .future-opportunities p {
    font-size: 1rem;
  }
}

/* Contact Section with Fluid Spacing */
.contact {
  padding: clamp(60px, 8vh + 20px, 80px) 0;
  background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
  position: relative;
}

.contact .section-header h2 {
  font-family: Montserrat, sans-serif;
  font-size: clamp(2rem, 4vw + 1rem, 2.5rem);
  font-weight: 700;
  margin-bottom: clamp(1rem, 3vw, 1.5rem);
  line-height: 1.2;
  text-shadow: 0 2px 4px rgb(0 0 0 / 30%);
  color: var(--text-primary);
}

/* Ensure responsive design for contact section header */
@media (width <= 768px) {
  .contact .section-header h2 {
    font-size: 2.5rem;
  }
}

@media (width <= 480px) {
  .contact .section-header h2 {
    font-size: 2rem;
  }
}

.services .section-header h2 {
  font-family: Montserrat, sans-serif;
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  line-height: 1.2;
  text-shadow: 0 2px 4px rgb(0 0 0 / 30%);
  color: var(--text-primary);
}

/* Ensure responsive design for services section header */
@media (width <= 768px) {
  .services .section-header h2 {
    font-size: 2.5rem;
  }
}

@media (width <= 480px) {
  .services .section-header h2 {
    font-size: 2rem;
  }
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;

  /* Make cards equal height across the row */
  align-items: stretch;
  grid-auto-rows: 1fr;
}

/* Media queries for responsive contact grid */
@media (width >= 768px) {
  .contact-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (width >= 1024px) {
  .contact-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* New Contact Layout with Map */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.contact-layout-single {
  display: block;
  max-width: 1200px;
  margin: 0 auto;
}

.contact-info-section {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

/* Address map styles - Zero out all spacing to prevent white bar above map */
.address-map-container {
  margin: 0 -1.5rem -1.5rem !important; /* Zero top margin to prevent white bar, negative margins to break out of card padding */
  margin-top: 0 !important; /* Explicitly zero top margin */
  padding: 0 !important;
  padding-top: 0 !important;
  border: 1px solid #e5e7eb;
  border-top: 0 !important; /* Remove top border that could cause white bar */
  border-radius: 0 0 8px 8px; /* Only round bottom corners */
  overflow: hidden;
  box-shadow: 0 2px 8px rgb(0 0 0 / 10%);
  display: flex; /* Flex container to eliminate any internal gaps */
  position: relative; /* Ensure proper stacking */
}

.address-map-display {
  width: 100%;
  height: 250px;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-top: 0 !important;
  position: relative;
  overflow: hidden;
  background-color: #e5e7eb; /* Light grey background to match map loading tiles */
  display: block; /* Ensure no inline gaps */
  line-height: 0 !important; /* Remove any line-height spacing */
}

/* Ensure parent article/contact-card doesn't add top spacing to map container */
.contact-card .address-map-container,
.address-card .address-map-container,
article.address-card .address-map-container {
  margin-top: 0 !important;
  padding-top: 0 !important;
  border-top: 0 !important;
}

/* Ensure address element doesn't create gap with map */
.address-card address + .address-map-container {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* Address spacing - keep natural margin but ensure no white bar above map */
.address-card address {
  margin-bottom: 1.5rem; /* Spacing between address and map */
  margin-top: 0 !important; /* Ensure no top margin creates gap */
  padding-bottom: 0 !important;
}

/* Ensure Leaflet maps fill container perfectly */
.address-map-display #office-map {
  display: block;
  width: 100%;
  height: 100%;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-top: 0 !important;
  background: transparent;
  outline: none;
}

#office-map:focus-visible {
  outline: 3px solid #2563eb;
  outline-offset: 2px;
}

.address-map-display .leaflet-container {
  width: 100% !important;
  height: 100% !important;
  font: inherit;
}

.map-noscript-message {
  margin: 0;
  padding: 1rem;
  font-size: 0.875rem;
  color: #334155;
  background-color: #f8fafc;
}

.map-noscript-message a {
  color: #1d4ed8;
  text-decoration: underline;
}

.map-fallback-message {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Custom map marker styles */
.custom-div-icon {
  background: transparent !important;
  border: none !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

/* Map popup customization */
.leaflet-popup-content-wrapper {
  border-radius: 8px !important;
  box-shadow: 0 4px 12px rgb(0 0 0 / 15%) !important;
  background: #fff !important; /* ensure high-contrast background */
}

.leaflet-popup-tip {
  background: white !important;
}

.map-header {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

/* Accessibility: ensure sufficient contrast inside Leaflet popups on all devices */
.leaflet-popup-content,
.leaflet-popup-content p,
.leaflet-popup-content span {
  color: #334155 !important; /* slate-700: >= 4.5:1 on white */
  font-size: 13px !important; /* avoid 12px small-text edge case */
}

/* Enforce inherited accessible color/size on all descendants to override inline styles */
.leaflet-popup-content * {
  color: inherit !important;
  font-size: inherit !important;
}

/* Stronger override for inline-styled spans injected by map libraries */
.leaflet-popup-content span[style],
.leaflet-popup-content > div > span[style] {
  color: #334155 !important;
  font-size: 13px !important;
}

/* Responsive layout for contact section */
@media (width >= 768px) {
  .contact-info-section {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: auto auto;
  }

  /* Email and Phone on first row */
  .contact-info-section .contact-card:nth-child(1),
  .contact-info-section .contact-card:nth-child(2) {
    grid-row: 1;
  }

  /* Address card spans full width on second row */
  .contact-info-section .address-card {
    grid-column: 1 / -1;
    grid-row: 2;
  }
}

@media (width >= 1024px) {
  .contact-info-section {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }

  .address-map-display {
    height: 300px;
  }
}

.contact-card {
  background: white;
  padding: 3.5rem 2rem 2rem;
  border-radius: 16px;
  box-shadow: 0 4px 6px rgb(26 53 88 / 10%);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid #e5e7eb;
  text-align: center;
  position: relative;
  overflow: hidden;
  cursor: pointer;

  /* Equal-height cards */
  height: 100%;
  display: flex;
  flex-direction: column;
}

.contact-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(
    90deg,
    var(--primary-blue),
    var(--secondary-gray)
  );
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.contact-card:hover::before {
  transform: scaleX(1);
}

.contact-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 20px 40px rgb(26 53 88 / 15%);
}

.contact-card .contact-icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(
    135deg,
    var(--primary-navy) 0%,
    var(--navy-light) 100%
  );
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  font-size: 1.5rem;
  color: white;
  box-shadow: var(--shadow-medium);
}

.contact-card h3 {
  font-family: Montserrat, sans-serif;
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: #1a3558;
}

.contact-card p {
  color: var(--secondary-gray);
  line-height: 1.6;
}

/* Contact divider for combined email/phone card */
.contact-divider {
  width: 60px;
  height: 2px;
  background: linear-gradient(
    90deg,
    var(--primary-blue),
    var(--secondary-gray)
  );
  margin: 1.5rem auto;
  border-radius: 1px;
}

/* Add extra space above the Phone section */
.contact-divider + .contact-icon {
  margin-top: 1.5rem;
}

/* Map container styles */
.map-container {
  margin-top: 1.5rem;
}

.map-container iframe {
  border: 0;
  border-radius: 8px;
  box-shadow: var(--shadow-light);
  transition: box-shadow 0.3s ease;
}

.contact-card:hover .map-container iframe {
  box-shadow: var(--shadow-medium);
}

.map-link {
  margin-top: 0.75rem;
}

.map-link a {
  color: var(--secondary-gray);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.3s ease;
}

.map-link a:hover {
  color: var(--white);
}

/* Address card specific styling */
.address-card {
  grid-column: span 1;
}

.address-card address {
  font-style: normal;
}

/* Override: Remove top margin to prevent white bar */
.address-card .address-map-display {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* Contact container queries */
@container (max-width: 640px) {
  .contact-grid {
    grid-template-columns: 1fr;
    gap: clamp(1rem, 4vw, 1.5rem);
  }

  .contact-card {
    padding: clamp(2rem, 5vw, 3rem) clamp(1rem, 4vw, 2rem)
      clamp(1rem, 4vw, 2rem);
  }

  .contact-card h3 {
    font-size: clamp(1.25rem, 4vw, 1.5rem);
    margin-bottom: clamp(1rem, 3vw, 1.5rem);
  }

  .contact-card p {
    font-size: clamp(0.9rem, 3vw, 1rem);
  }
}

@container (min-width: 641px) {
  .contact-grid {
    grid-template-columns: 1fr 1.2fr;
    gap: clamp(1.5rem, 4vw, 2rem);
    align-items: stretch;
  }
}

/* Footer */
.footer {
  background: linear-gradient(
    135deg,
    var(--primary-navy) 0%,
    var(--navy-light) 100%
  );
  color: white;
  padding: 60px 0 20px;
  position: relative;
}

.footer-content {
  display: grid;

  /* Left logo, right social */
  grid-template-columns: 1fr auto;
  gap: 2rem;
  margin-bottom: 2rem;
  align-items: center;
}

/* Push the second section (Follow Us) to the far right */
.footer-content .footer-section:last-child {
  justify-self: end;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-logo-img {
  height: 110px;
  width: auto;
  max-width: 360px;
  object-fit: contain;
  transition:
    transform 0.2s ease,
    opacity 0.2s ease;
}

.footer-logo .logo-link {
  display: inline-block;
  cursor: pointer;
}

.footer-logo .logo-link:hover .footer-logo-img {
  transform: scale(1.05);
  opacity: 0.9;
}

.footer-logo .logo-shield {
  width: 35px;
  height: 35px;
  transition: all 0.2s ease;
}

.footer-logo:hover .logo-shield {
  transform: scale(1.05);
}

.footer-logo .logo-text h3 {
  color: white;
  font-family: Montserrat, sans-serif;
  font-weight: 700;
  font-size: 1.3rem;
  margin: 0;
  line-height: 1.2;
  transition: color 0.3s ease;
  font-variant: small-caps;
  letter-spacing: 0.5px;
}

.footer-logo .logo-text p {
  color: var(--secondary-gray);
  font-family: Montserrat, sans-serif;
  font-size: 0.6rem;
  font-weight: 600;
  margin: 0;
  letter-spacing: 0.5px;
}

.footer-section h4 {
  font-family: Montserrat, sans-serif;
  margin-bottom: 1rem;
  color: white;
  transition: color 0.2s ease;
}

.footer-section h4:hover {
  color: var(--white);
}

.footer-section ul {
  list-style: none;
}

.footer-section ul li {
  margin-bottom: 0.5rem;
  transition: transform 0.2s ease;
}

.footer-section ul li:hover {
  transform: translateX(3px);
}

.footer-section ul li a {
  color: var(--secondary-gray);
  text-decoration: none;
  transition: all 0.2s ease;
  position: relative;
}

.footer-section ul li a::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--white);
  transition: width 0.2s ease;
}

.footer-section ul li a:hover::after {
  width: 100%;
}

.footer-section ul li a:hover {
  color: var(--white);
}

.footer-bottom {
  border-top: 1px solid var(--secondary-gray);
  padding-top: 2rem;
  text-align: center;
  color: var(--secondary-gray);
  transition: color 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.footer-bottom:hover {
  color: var(--white);
}

/* Social Media Icons */
.footer-social {
  text-align: right;
  margin-bottom: 0;
  padding-top: 0;
  border-top: none;
}

.footer-social h4 {
  font-family: Montserrat, sans-serif;
  margin-bottom: 1.5rem;
  color: white;
  transition: color 0.2s ease;
}

.footer-social h4:hover {
  color: var(--white);
}

.social-icons {
  display: flex;
  justify-content: flex-end;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 45px;
  height: 45px;
  background: linear-gradient(
    135deg,
    rgb(255 255 255 / 10%) 0%,
    rgb(255 255 255 / 5%) 100%
  );
  border: 1px solid rgb(255 255 255 / 20%);
  border-radius: 50%;
  color: white;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
}

.social-icon::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgb(255 255 255 / 20%),
    transparent
  );
  transition: left 0.5s;
}

.social-icon:hover::before {
  left: 100%;
}

.social-icon:hover {
  transform: translateY(-3px) scale(1.1);
  background: linear-gradient(135deg, var(--white) 0%, var(--gray-light) 100%);
  border-color: var(--white);
  box-shadow: 0 8px 20px rgb(255 255 255 / 40%);
  color: var(--primary-navy);
}

.social-icon i {
  font-size: 1.2rem;
  transition: transform 0.3s ease;
  z-index: 1;
  position: relative;
}

.social-icon:hover i {
  transform: scale(1.1);
}

/* Ensure social icons never have underlines */
.social-icon,
.social-icon:link,
.social-icon:visited,
.social-icon:hover,
.social-icon:active {
  text-decoration: none !important;
  border-bottom: none !important;
}

/* Responsive Design */
@media (width <= 768px) {
  .hamburger {
    display: flex;
  }

  .nav-menu {
    position: fixed;
    left: -100%;
    top: 70px;
    flex-direction: column;
    background: linear-gradient(
      135deg,
      rgb(255 255 255 / 95%) 0%,
      rgb(248 250 252 / 95%) 100%
    );
    backdrop-filter: blur(10px);
    width: 100%;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 40px rgb(26 53 88 / 15%);
    border-bottom: 1px solid rgb(26 53 88 / 10%);
    padding: 2rem 0;
    z-index: 999;
    list-style: none;
  }

  .nav-menu.active {
    left: 0;
    animation: slideInFromLeft 0.3s ease-out;
  }

  /* Fallback for JavaScript disabled */
  .no-js .nav-menu {
    position: static;
    left: auto;
    flex-direction: row;
    background: transparent;
    backdrop-filter: none;
    width: auto;
    box-shadow: none;
    border: none;
    padding: 0;
  }

  .no-js .hamburger {
    display: none;
  }

  .nav-item {
    margin: 0.5rem 0;
    opacity: 0;
    transform: translateX(-20px);
    transition: all 0.3s ease;
    list-style: none;
  }

  .nav-menu.active .nav-item {
    opacity: 1;
    transform: translateX(0);
  }

  .nav-menu.active .nav-item:nth-child(1) {
    transition-delay: 0.1s;
  }

  .nav-menu.active .nav-item:nth-child(2) {
    transition-delay: 0.2s;
  }

  .nav-menu.active .nav-item:nth-child(3) {
    transition-delay: 0.3s;
  }

  .nav-link {
    display: block;
    padding: 1rem 2rem;
    margin: 0.25rem 1rem;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-navy);
    transition: all 0.2s ease;
  }

  .nav-link:hover {
    background-color: rgb(26 53 88 / 10%);
    color: var(--primary-blue);
    transform: translateY(-2px);
  }

  .nav-link::after {
    display: none;
  }

  .hero-title {
    font-size: 2.5rem;
  }

  .services-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .section-header h2 {
    font-size: 2rem;
  }

  .logo-text h2 {
    font-size: 1.1rem;
  }

  .logo-text p {
    font-size: 0.6rem;
  }

  .logo-shield {
    width: 35px;
    height: 35px;
  }

  /* Show icon-only logo on very small screens */
  .nav-logo-img {
    height: 40px;
    max-width: 150px;
  }

  .hero-logo-img {
    height: 360px;
    max-width: 900px;
  }

  /* Social icons responsive */
  .social-icons {
    gap: 1rem;
    justify-content: flex-end;
  }

  .social-icon {
    width: 40px;
    height: 40px;
  }

  .social-icon i {
    font-size: 1.1rem;
  }
}

@media (width <= 480px) {
  .hero-title {
    font-size: 2rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

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

  .logo-container {
    gap: 8px;
  }

  .logo-text h2 {
    font-size: 1rem;
  }

  .logo-text p {
    font-size: 0.5rem;
  }

  .logo-shield {
    width: 30px;
    height: 30px;
  }

  .nav-logo-img {
    height: 35px;
    max-width: 130px;
  }

  .hero-logo-img {
    height: 360px;
    max-width: 800px;
  }

  /* Social icons responsive for small screens */
  .social-icons {
    gap: 0.75rem;
    justify-content: flex-end;
  }

  .social-icon {
    width: 35px;
    height: 35px;
  }

  .social-icon i {
    font-size: 1rem;
  }
}

/* ------------------------------------*\
  #PRINT-STYLES
  Optimized styles for printing
\*------------------------------------ */

@media print {
  /* Reset print styles */
  * {
    background: transparent !important;
    color: black !important;
    box-shadow: none !important;
    text-shadow: none !important;
  }

  /* Hide non-essential elements */
  .navbar,
  .hero-buttons,
  .social-icons,
  .skip-nav,
  .map-container iframe {
    display: none !important;
  }

  /* Optimize layout for print */
  body {
    font-size: 12pt;
    line-height: 1.4;
    margin: 0;
    padding: 0;
  }

  /* Page breaks */
  .hero,
  .services,
  .contact {
    page-break-inside: avoid;
    page-break-after: auto;
  }

  /* Headings */
  h1,
  h2,
  h3 {
    page-break-after: avoid;
    color: #1a3558 !important;
  }

  .hero-title {
    font-size: 24pt !important;
    margin-bottom: 12pt;
  }

  .section-header h2 {
    font-size: 18pt !important;
    margin-bottom: 12pt;
    border-bottom: 1px solid #666;
    padding-bottom: 6pt;
  }

  /* Contact information */
  .contact-card {
    border: 1px solid #ddd;
    padding: 12pt;
    margin-bottom: 12pt;
    box-shadow: none !important;
  }

  /* Links */
  a:link,
  a:visited {
    color: #1a3558 !important;
    text-decoration: underline;
  }

  /* Show URLs for external links */
  a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: 10pt;
    color: #666;
  }

  /* Logo adjustments */
  .hero-logo-img,
  .nav-logo-img,
  .footer-logo-img {
    max-width: 200px !important;
    height: auto !important;
  }
}

/* ------------------------------------*\
    #CAREERS-PAGE
    Spacing and centered grid for Careers sections
  \*------------------------------------ */

/* Increase vertical spacing between sections specific to Careers */
#why-work-with-us,
#current-openings,
#application-form {
  padding: clamp(64px, 6vw + 24px, 96px) 0;
}

/* Center the cards in Careers grids without impacting homepage services */
#why-work-with-us .services-grid,
#current-openings .services-grid {
  /* Use same grid layout as Services and Contact sections for consistency */
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (width >= 768px) {
  #why-work-with-us .services-grid,
  #current-openings .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (width >= 1024px) {
  #why-work-with-us .services-grid,
  #current-openings .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Remove max-width constraints to match Services/Contact sections */
#why-work-with-us .service-card,
#current-openings .service-card {
  max-width: none;
  width: 100%;
}

/* Job card specific styles */
.job-section {
  text-align: left;
  margin-bottom: 1.5rem;
}

.job-section h4 {
  color: var(--primary-navy);
  border-bottom: 1px solid #e5e7eb;
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
}

.job-section ul {
  padding-left: 1rem;
}

.job-section li {
  margin-bottom: 0.5rem;
  position: relative;
}

.job-section li::marker {
  color: var(--primary-blue);
}

.job-details {
  background: linear-gradient(
    135deg,
    var(--primary-blue) 0%,
    var(--navy-light) 100%
  );
  color: white !important;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 1rem;
}

/* Slightly larger bottom margin below section headers on Careers */
#why-work-with-us .section-header,
#current-openings .section-header,
#application-form .section-header {
  margin-bottom: clamp(2rem, 4vw, 3rem);
}

/* Accessibility: Ensure strong color contrast on Careers sections */
#why-work-with-us .service-card h3,
#current-openings .service-card h3 {
  color: var(--primary-navy) !important; /* dark heading for 3:1+ on white */
}

#why-work-with-us .service-card p,
#current-openings .service-card p,
#current-openings .job-requirements li {
  color: #334155 !important; /* slate-700 for 4.5:1+ on white */
}

#current-openings .job-posting h4 {
  color: var(--primary-navy) !important;
}

@media (width <= 320px) {
  .nav-logo-img {
    height: 30px;
    max-width: 100px;
  }
}

/* Animations */
@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.service-card,
.contact-card {
  animation: fadeInUp 0.5s ease-out forwards;
}

.service-card:nth-child(1) {
  animation-delay: 0.1s;
}

.service-card:nth-child(2) {
  animation-delay: 0.2s;
}

.service-card:nth-child(3) {
  animation-delay: 0.3s;
}

.contact-card:nth-child(1) {
  animation-delay: 0.1s;
}

.contact-card:nth-child(2) {
  animation-delay: 0.2s;
}

.contact-card:nth-child(3) {
  animation-delay: 0.3s;
}

/* Page Header Styles (for Legal and Contact Pages) */
.page-header {
  padding: 120px 0 60px;
  background: linear-gradient(
    135deg,
    var(--primary-navy) 0%,
    var(--navy-light) 100%
  );
  color: white;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-header::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="75" cy="75" r="1" fill="rgba(255,255,255,0.05)"/><circle cx="50" cy="10" r="0.5" fill="rgba(255,255,255,0.1)"/><circle cx="20" cy="80" r="0.8" fill="rgba(255,255,255,0.08)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
  opacity: 0.3;
}

.page-header-content {
  position: relative;
  z-index: 2;
}

.page-title {
  font-family: Montserrat, sans-serif;
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  margin-bottom: 1rem;
  text-shadow: 0 2px 4px rgb(0 0 0 / 30%);
}

.page-subtitle {
  font-size: clamp(1.1rem, 2vw, 1.3rem);
  opacity: 0.9;
  margin-bottom: 0.5rem;
}

.last-updated {
  font-size: 0.9rem;
  opacity: 0.7;
  font-style: italic;
}

/* Contact Page Specific Styles */
.contact-section {
  padding: 80px 0;
  background: var(--bg-secondary);
}

.contact-info h2 {
  font-family: "Playfair Display", serif;
  font-size: 2.5rem;
  color: var(--primary-navy);
  margin-bottom: 1.5rem;
}

.contact-description {
  font-size: 1.1rem;
  line-height: 1.7;
  color: var(--gray-dark);
  margin-bottom: 2rem;
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.contact-item {
  align-items: flex-start;
  gap: 1.5rem;
  padding: 1.5rem;
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgb(0 0 0 / 8%);
  transition: all 0.3s ease;

  /* Fill the grid row height so both cards match */
  height: 100%;
  display: flex;
  flex-direction: column;
}

.contact-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgb(0 0 0 / 15%);
}

.contact-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, var(--primary-navy), var(--navy-light));
  border-radius: 50%;
  color: white;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.contact-content h3 {
  font-family: Montserrat, sans-serif;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--primary-navy);
  margin-bottom: 0.5rem;
}

.contact-address {
  font-style: normal;
  line-height: 1.6;
  color: var(--gray-dark);
}

.hours {
  color: var(--gray-dark);
  line-height: 1.6;
}

/* Contact Form Styles */
.contact-form-wrapper {
  background: white;
  padding: 2.5rem;
  border-radius: 16px;
  box-shadow: 0 8px 30px rgb(0 0 0 / 10%);
}

.contact-form h2 {
  font-family: "Playfair Display", serif;
  font-size: 2rem;
  color: var(--primary-navy);
  margin-bottom: 2rem;
  text-align: center;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  font-weight: 600;
  color: var(--primary-navy);
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 1rem;
  border: 2px solid #e1e8ed;
  border-radius: 8px;
  font-family: inherit;
  font-size: 1rem;
  transition: all 0.3s ease;
  background: #fafbfc;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--primary-blue);
  background: white;
  box-shadow: 0 0 0 3px rgb(45 74 107 / 10%);
}

.form-textarea {
  resize: vertical;
  min-height: 120px;
}

.error-message {
  display: block;
  color: #dc3545;
  font-size: 0.875rem;
  margin-top: 0.25rem;
  min-height: 1.2em;
}

/* Legal Content Styles */
.legal-content {
  padding: 60px 0 100px;
  background: var(--bg-secondary);
}

.legal-wrapper {
  max-width: 800px;
  margin: 0 auto;
  background: white;
  padding: 3rem;
  border-radius: 16px;
  box-shadow: 0 8px 30px rgb(0 0 0 / 8%);
}

.legal-section {
  margin-bottom: 3rem;
}

.legal-section:last-child {
  margin-bottom: 0;
}

.legal-section h2 {
  font-family: "Playfair Display", serif;
  font-size: 1.8rem;
  color: var(--primary-navy);
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--primary-blue);
}

.legal-section h3 {
  font-family: Montserrat, sans-serif;
  font-size: 1.3rem;
  color: var(--navy-dark);
  margin: 1.5rem 0 1rem;
  font-weight: 600;
}

.legal-section p {
  line-height: 1.7;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.legal-section ul,
.legal-section ol {
  margin: 1rem 0 1rem 1.5rem;
  line-height: 1.7;
}

.legal-section li {
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.legal-section .contact-info {
  background: var(--bg-accent);
  padding: 1.5rem;
  border-radius: 8px;
  border-left: 4px solid var(--primary-blue);
  margin-top: 1rem;
}

.legal-section .contact-info p {
  margin-bottom: 0.5rem;
}

.legal-section .contact-info a {
  color: var(--primary-blue);
  text-decoration: none;
}

.legal-section .contact-info a:hover {
  text-decoration: underline;
}

/* Responsive Design for New Pages */
@media (width <= 768px) {
  .page-header {
    padding: 100px 0 40px;
  }

  .page-title {
    font-size: 2.5rem;
  }

  .contact-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .contact-item {
    padding: 1.25rem;
  }

  .contact-form-wrapper {
    padding: 2rem;
  }

  .legal-wrapper {
    padding: 2rem;
    margin: 0 1rem;
  }

  .legal-section h2 {
    font-size: 1.6rem;
  }
}

@media (width <= 480px) {
  .page-header {
    padding: 90px 0 30px;
  }

  .contact-item {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }

  .contact-form-wrapper {
    padding: 1.5rem;
  }

  .legal-wrapper {
    padding: 1.5rem;
  }
}

/* ------------------------------------*\
  #ABOUT-PAGE-STYLES
  Specific styles for the about page
\*------------------------------------ */

/* About Content Section */
.about-content {
  padding: 60px 0;
}

.content-section {
  margin-bottom: 60px;
}

.content-section:last-child {
  margin-bottom: 0;
}

.content-text h2 {
  font-family: Montserrat, sans-serif;
  font-size: clamp(2rem, 3vw, 2.5rem);
  color: var(--primary-navy);
  margin-bottom: 1.5rem;
  line-height: 1.3;
  font-weight: 700;
}

.content-text p {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--gray-dark);
  margin-bottom: 1.5rem;
}

.content-text strong {
  color: var(--primary-navy);
  font-weight: 600;
}

/* Services and Contact Grid */
.services-contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  margin-top: 2rem;
}

.services-summary h3,
.contact-summary h3 {
  font-family: Montserrat, sans-serif;
  font-size: 1.5rem;
  color: var(--primary-navy);
  margin-bottom: 1.5rem;
  font-weight: 600;
}

.service-list {
  list-style: none;
  padding: 0;
}

.service-list li {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 0;
  font-size: 1.1rem;
  color: var(--gray-dark);
  border-bottom: 1px solid rgb(26 53 88 / 10%);
}

.service-list li:last-child {
  border-bottom: none;
}

.service-list li i {
  color: var(--primary-blue);
  width: 20px;
  text-align: center;
}

.contact-info p {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  font-size: 1rem;
  color: var(--gray-dark);
}

.contact-info i {
  color: var(--primary-blue);
  width: 20px;
  text-align: center;
}

.contact-info a {
  color: var(--primary-navy);
  text-decoration: none;
  transition: color 0.3s ease;
}

.contact-info a:hover {
  color: var(--primary-blue);
}

.cta-buttons {
  margin-top: 2rem;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn-sm {
  padding: 0.75rem 1.5rem;
  font-size: 0.9rem;
  font-weight: 700;
}

/* Responsive Design for About Page */
@media (width <= 768px) {
  .services-contact-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .cta-buttons {
    flex-direction: column;
  }

  .cta-buttons .btn {
    width: 100%;
    text-align: center;
  }

  .content-section {
    margin-bottom: 40px;
  }

  .about-content {
    padding: 40px 0;
  }
}

/* Active Navigation State */
.nav-link.active {
  color: var(--primary-blue) !important;
  font-weight: 600;
}

/* Responsive Design for About Page */
@media (width <= 768px) {
  .content-grid,
  .content-grid.reverse {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .mission-quote {
    font-size: 1.3rem;
    padding: 0 1rem;
  }

  .services-overview-grid,
  .tech-grid,
  .contact-about-grid {
    grid-template-columns: 1fr;
  }

  .visual-card,
  .tech-card {
    padding: 2rem;
  }

  .cta-section .btn {
    display: block;
    margin: 0.5rem 0;
    width: 100%;
  }

  .content-section {
    margin-bottom: 60px;
  }

  .mission-section,
  .tech-section,
  .contact-about-section {
    margin: 60px 0;
    padding: 60px 0;
  }
}

/* ------------------------------------*\
  #APPLICATION-MODAL
  Clean, professional modal styling
\*------------------------------------ */

#application-modal {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  z-index: 10000 !important;
  background-color: rgb(0 0 0 / 60%) !important;
  backdrop-filter: blur(8px) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 1rem !important;
}

#application-modal.hidden {
  display: none !important;
}

#modal-panel {
  position: relative !important;
  z-index: 10001 !important;
  background: linear-gradient(135deg, #fff 0%, #f9fafb 100%) !important;
  border-radius: 1rem !important;
  box-shadow:
    0 25px 50px -12px rgb(0 0 0 / 25%),
    0 0 0 1px rgb(0 0 0 / 5%),
    0 0 100px rgb(59 130 246 / 10%) !important;
  max-width: 56rem !important;
  width: 100% !important;
  max-height: 90vh !important;
  overflow: visible !important;
  display: flex !important;
  flex-direction: column !important;
  border: 1px solid rgb(209 213 219 / 50%) !important;
}

/* Modal content container - enable scrolling */
#modal-panel > div:nth-child(2) {
  overflow: hidden auto !important;
  flex: 1 !important;
  min-height: 0 !important;
  scroll-behavior: smooth !important;
  -webkit-overflow-scrolling: touch !important;
  background-color: #fff !important;
}

/* Form styling within modal */
#application-form input,
#application-form select,
#application-form textarea {
  font-size: 0.875rem !important;
  line-height: 1.5 !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  background-color: #fff !important;
  color: #1f2937 !important;
  border: 2px solid #d1d5db !important;
  border-radius: 0.75rem !important;
  padding: 0.75rem 1rem !important;
  width: 100% !important;
  display: block !important;
  box-shadow: 0 1px 3px 0 rgb(0 0 0 / 8%) !important;
  font-weight: 500 !important;
}

#application-form {
  padding-bottom: 1rem;
  background-color: #fff !important;
  max-width: 100% !important;
}

/* Force small icon sizes in application form */
#application-form svg,
#application-modal svg {
  max-width: 1rem !important;
  max-height: 1rem !important;
}

#application-form h3 svg,
#application-form .flex svg {
  width: 0.75rem !important;
  height: 0.75rem !important;
  min-width: 0.75rem !important;
  min-height: 0.75rem !important;
}

#success-message svg,
#error-message svg {
  width: 1rem !important;
  height: 1rem !important;
  max-width: 1rem !important;
  max-height: 1rem !important;
}

#submit-button svg {
  width: 0.875rem !important;
  height: 0.875rem !important;
  max-width: 0.875rem !important;
  max-height: 0.875rem !important;
}

/* Ensure badge icons in messages stay small */
#success-message .flex-shrink-0,
#error-message .flex-shrink-0 {
  width: 1.5rem !important;
  height: 1.5rem !important;
  min-width: 1.5rem !important;
  min-height: 1.5rem !important;
}

#application-form input:focus,
#application-form select:focus,
#application-form textarea:focus {
  outline: none !important;
  border-color: #3b82f6 !important;
  box-shadow:
    0 0 0 4px rgb(59 130 246 / 15%),
    0 4px 12px rgb(59 130 246 / 20%) !important;
  transform: translateY(-2px) !important;
  background-color: #fff !important;
}

#application-form input:hover:not(:focus),
#application-form select:hover:not(:focus),
#application-form textarea:hover:not(:focus) {
  border-color: #9ca3af !important;
  box-shadow: 0 4px 12px rgb(0 0 0 / 8%) !important;
}

#application-form input.error,
#application-form select.error,
#application-form textarea.error {
  border-color: #ef4444 !important;
  background-color: #fef2f2 !important;
}

#application-form label {
  font-weight: 700 !important;
  color: #374151 !important;
  display: block !important;
  margin-bottom: 0.625rem !important;
  font-size: 0.875rem !important;
  letter-spacing: -0.025em !important;
}

/* Ensure input boxes are visible */
[id="firstName"],
[id="lastName"],
#email,
#phone,
#address,
[id="coverLetter"] {
  appearance: none !important;
}

#experience {
  appearance: none !important;
  cursor: pointer !important;
}

/* File input styling */
#application-form input[type="file"] {
  font-size: 0.875rem;
  cursor: pointer;
}

#application-form input[type="file"]::-webkit-file-upload-button {
  background: linear-gradient(135deg, #1a3558 0%, #2563eb 50%, #3b82f6 100%);
  color: white;
  border: none;
  padding: 0.5rem 1.25rem;
  border-radius: 0.5rem;
  margin-right: 1rem;
  cursor: pointer;
  font-weight: 700;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgb(59 130 246 / 30%);
}

#application-form input[type="file"]::-webkit-file-upload-button:hover {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 50%, #1a3558 100%);
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 20px rgb(59 130 246 / 40%);
}

#application-form input[type="file"]::-webkit-file-upload-button:active {
  transform: translateY(0);
}

/* Firefox file input button */
#application-form input[type="file"]::file-selector-button {
  background: linear-gradient(135deg, #1a3558 0%, #2563eb 50%, #3b82f6 100%);
  color: white;
  border: none;
  padding: 0.5rem 1.25rem;
  border-radius: 0.5rem;
  margin-right: 1rem;
  cursor: pointer;
  font-weight: 700;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgb(59 130 246 / 30%);
}

#application-form input[type="file"]::file-selector-button:hover {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 50%, #1a3558 100%);
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 20px rgb(59 130 246 / 40%);
}

/* Checkbox styling */
#application-form input[type="checkbox"] {
  accent-color: #1a3558 !important;
  cursor: pointer !important;
  width: 1.25rem !important;
  height: 1.25rem !important;
  transition: all 0.2s ease-in-out !important;
  border: 2px solid #d1d5db !important;
  border-radius: 0.25rem !important;
  background-color: #fff !important;
}

#application-form input[type="checkbox"]:hover {
  transform: scale(1.05) !important;
  border-color: #1a3558 !important;
}

#application-form input[type="checkbox"]:focus {
  box-shadow: 0 0 0 3px rgb(26 53 88 / 20%) !important;
  outline: none !important;
}

#application-form input[type="checkbox"]:checked {
  background-color: #1a3558 !important;
  border-color: #1a3558 !important;
}

/* Submit button enhancements */
#submit-button {
  position: relative;
  overflow: hidden;
}

#submit-button::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgb(255 255 255 / 30%);
  transform: translate(-50%, -50%);
  transition:
    width 0.6s,
    height 0.6s;
}

#submit-button:hover::before {
  width: 300px;
  height: 300px;
}

#submit-button:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

/* Error message styling */
#application-form .text-red-600 {
  animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Success and error message animations */
#success-message,
#error-message {
  animation: slideIn 0.4s ease-out;
}

/* Ensure messages are hidden by default */
.hidden,
#success-message.hidden,
#error-message.hidden {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  height: 0 !important;
  overflow: hidden !important;
  max-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* When messages are visible */
#success-message:not(.hidden),
#error-message:not(.hidden) {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  height: auto !important;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Section header styling */
#application-form h3 {
  letter-spacing: -0.025em;
}

/* Improved select dropdown */
#application-form select {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e") !important;
  background-position: right 0.75rem center !important;
  background-repeat: no-repeat !important;
  background-size: 1.25em 1.25em !important;
  padding-right: 2.5rem !important;
  background-color: #fff !important;
}

#application-form select:focus {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%231a3558' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e") !important;
}

#application-form select option {
  background-color: #fff !important;
  color: #1f2937 !important;
  padding: 0.5rem !important;
}

/* Scrollbar styling for modal */
#modal-panel > div:nth-child(2) {
  scrollbar-width: thin !important;
  scrollbar-color: #cbd5e1 #f1f5f9 !important;
}

#modal-panel > div:nth-child(2)::-webkit-scrollbar {
  width: 6px !important;
}

#modal-panel > div:nth-child(2)::-webkit-scrollbar-track {
  background: #f8fafc !important;
  border-radius: 4px !important;
}

#modal-panel > div:nth-child(2)::-webkit-scrollbar-thumb {
  background: #cbd5e1 !important;
  border-radius: 4px !important;
  transition: background 0.2s !important;
}

#modal-panel > div:nth-child(2)::-webkit-scrollbar-thumb:hover {
  background: #94a3b8 !important;
}

/* Mobile responsiveness */
@media (width <= 768px) {
  #modal-panel {
    max-width: 95% !important;
    max-height: 95vh !important;
    border-radius: 0.5rem !important;
  }

  #application-form .grid-cols-2 {
    grid-template-columns: 1fr !important;
  }

  #application-modal {
    padding: 0.5rem !important;
  }

  #modal-panel > div:nth-child(2) {
    max-height: calc(95vh - 180px) !important;
  }
}

@media (width <= 640px) {
  #modal-panel {
    max-height: 96vh !important;
    border-radius: 0.5rem !important;
  }

  #application-form h3 {
    font-size: 0.875rem;
  }

  #submit-button,
  #cancel-button {
    padding: 0.625rem 1rem !important;
    font-size: 0.875rem !important;
  }

  #modal-panel > div:nth-child(2) {
    max-height: calc(96vh - 170px) !important;
  }
}

@media (width <= 480px) {
  #modal-panel {
    border-radius: 0.375rem !important;
    max-height: 98vh !important;
  }

  #modal-panel > div:first-child {
    padding: 1rem !important;
  }

  #application-form {
    font-size: 0.875rem;
  }

  #modal-panel > div:first-child h2 {
    font-size: 1.125rem !important;
  }

  #modal-panel > div:first-child p {
    font-size: 0.75rem !important;
  }

  #modal-panel > div:nth-child(2) {
    max-height: calc(98vh - 160px) !important;
    padding: 1rem !important;
  }

  #application-form {
    padding-bottom: 0.5rem;
  }
}

/* Ensure proper spacing between form sections */
#application-form > div {
  margin-bottom: 1.25rem;
}

#application-form > div:last-child {
  margin-bottom: 0;
}

/* Loading state animation */
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.animate-spin {
  animation: spin 1s linear infinite;
}

/* Focus visible improvements */
#application-form input:focus-visible,
#application-form select:focus-visible,
#application-form textarea:focus-visible {
  outline: 2px solid #1a3558;
  outline-offset: 2px;
}

/* Placeholder styling */
#application-form input::placeholder,
#application-form textarea::placeholder {
  color: #9ca3af !important;
  opacity: 1 !important;
}

#application-form input:focus::placeholder,
#application-form textarea:focus::placeholder {
  color: #d1d5db !important;
}

/* Button styling for Cancel and Submit */
#cancel-button,
#submit-button {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  font-weight: 600 !important;
  transition: all 0.2s ease-in-out !important;
  white-space: nowrap !important;
  gap: 0.5rem !important;
}

#cancel-button {
  background-color: #fff !important;
  color: #374151 !important;
  border: 2px solid #d1d5db !important;
  padding: 0.75rem 1.75rem !important;
  border-radius: 0.75rem !important;
  font-size: 0.875rem !important;
  min-width: 100px !important;
  font-weight: 700 !important;
}

#cancel-button:hover {
  background-color: #f9fafb !important;
  border-color: #9ca3af !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 4px 12px rgb(0 0 0 / 10%) !important;
}

#cancel-button:active {
  transform: translateY(0) !important;
}

#submit-button {
  background: linear-gradient(
    135deg,
    #1a3558 0%,
    #2563eb 50%,
    #3b82f6 100%
  ) !important;
  color: #fff !important;
  border: 2px solid transparent !important;
  padding: 0.75rem 2.5rem !important;
  border-radius: 0.75rem !important;
  font-size: 0.875rem !important;
  font-weight: 900 !important;
  box-shadow:
    0 8px 16px rgb(59 130 246 / 30%),
    0 4px 8px rgb(0 0 0 / 10%) !important;
  min-width: 180px !important;
}

#submit-button:hover:not(:disabled) {
  background: linear-gradient(
    135deg,
    #3b82f6 0%,
    #2563eb 50%,
    #1a3558 100%
  ) !important;
  box-shadow:
    0 12px 24px rgb(59 130 246 / 40%),
    0 8px 16px rgb(0 0 0 / 15%) !important;
  transform: translateY(-3px) scale(1.03) !important;
}

#submit-button:active:not(:disabled) {
  transform: translateY(-1px) scale(1.01) !important;
}

#submit-button:disabled {
  opacity: 0.5 !important;
  cursor: not-allowed !important;
  transform: none !important;
}

/* Footer styling */
#modal-panel > div:last-child {
  background: linear-gradient(to right, #f9fafb, #fff, #f9fafb) !important;
  border-top: 2px solid rgb(229 231 235 / 50%) !important;
  padding: 1.5rem 2.5rem !important;
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  backdrop-filter: blur(10px) !important;
}

/* Textarea specific styling */
[id="coverLetter"] {
  resize: vertical !important;
  min-height: 120px !important;
  font-family: inherit !important;
}

/* Grid layout for form fields */
#application-form .grid {
  display: grid !important;
}

#application-form .grid-cols-2 {
  grid-template-columns: repeat(2, 1fr) !important;
  gap: 1rem !important;
}

/* Ensure visibility of all text */
#application-form * {
  color: inherit !important;
}

#application-form input::placeholder,
#application-form textarea::placeholder,
#application-form select option:first-child {
  color: #9ca3af !important;
}
