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

body {
  font-family: var(--font-body);
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-headings);
  color: var(--primary);
  line-height: 1.2;
  font-weight: 700;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition-fast);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ==========================================================================
   Layout Utilities
   ========================================================================== */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 5rem 0;
}

.section-header {
  text-align: center;
  max-width: 650px;
  margin: 0 auto 3.5rem auto;
}

.section-header h2 {
  font-size: 2.25rem;
  margin-bottom: 0.75rem;
  position: relative;
  display: inline-block;
}

.section-header h2::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background-color: var(--brand);
  border-radius: var(--border-radius-full);
}

.section-header p {
  color: var(--text-muted);
  font-size: 1.1rem;
}

/* Grid Utilities */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.grid-5 {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1.5rem;
}

.grid-6 {
  display: grid;
  grid-template-columns: repeat(6, minmax(240px, 1fr));
  gap: 1.5rem;
  overflow-x: auto;
  padding-bottom: 0.75rem;
}

.carousel {
  position: relative;
  max-width: 100%;
  margin: 0 auto;
}

.carousel-track-container {
  overflow: hidden;
  border-radius: var(--border-radius-lg);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.08);
}

.carousel-track {
  display: flex;
  transition: transform 0.45s ease;
}

.carousel-slide {
  min-width: 100%;
  position: relative;
}

.carousel-slide img {
  width: 100%;
  height: 420px;
  object-fit: cover;
  display: block;
}

.carousel-control {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 3rem;
  height: 3rem;
  border: none;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.8);
  color: var(--brand);
  font-size: 1.5rem;
  cursor: pointer;
  display: grid;
  place-items: center;
  z-index: 2;
  transition: transform var(--transition-fast), background-color var(--transition-fast);
}

.carousel-control:hover {
  transform: translateY(-50%) scale(1.05);
  background-color: var(--brand);
  color: #ffffff;
}

.carousel-control.prev {
  left: 1rem;
}

.carousel-control.next {
  right: 1rem;
}

.carousel-control:disabled {
  opacity: 0.4;
  cursor: default;
}

.carousel-nav {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1rem;
}

.carousel-indicator {
  width: 0.9rem;
  height: 0.9rem;
  border-radius: 50%;
  border: 1px solid var(--border);
  background-color: transparent;
  cursor: pointer;
  transition: background-color var(--transition-fast), transform var(--transition-fast);
}

.carousel-indicator.active {
  background-color: var(--brand);
  transform: scale(1.1);
}

@media (max-width: 900px) {
  .carousel-slide img {
    height: 320px;
  }
}

@media (max-width: 680px) {
  .carousel-control {
    width: 2.5rem;
    height: 2.5rem;
  }

  .carousel-slide img {
    height: 260px;
  }
}

/* Flex Utilities */
.flex-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.flex-center {
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: var(--border-radius-md);
  border: 2px solid transparent;
  cursor: pointer;
  transition: var(--transition-normal);
  gap: 0.5rem;
}

.btn-primary {
  background-color: var(--brand);
  color: #ffffff;
  box-shadow: 0 6px 18px -8px rgba(37, 99, 235, 0.4);
  width: 150px;
}

.btn-primary:hover {
  background-color: var(--brand-hover);
  transform: translateY(-2px);
  box-shadow: 0 12px 30px -10px rgba(37, 99, 235, 0.3);
}

.btn-primary-1 {
  background-color: var(--brand);
  color: #ffffff;
  box-shadow: 0 6px 18px -8px rgba(37, 99, 235, 0.4);
  width: 100%;
}

.btn-primary-1:hover {
  background-color: var(--brand-hover);
  transform: translateY(-2px);
  box-shadow: 0 12px 30px -10px rgba(37, 99, 235, 0.3);
}


.btn-secondary {
  background-color: transparent;
  border-color: var(--brand);
  color: var(--brand);
  width: 150px;
}

.btn-secondary:hover {
  background-color: rgba(37, 99, 235, 0.1);
  transform: translateY(-2px);
}

.track-button {
  border-color: var(--brand);
  background-color: var(--brand);
  color: #ffffff;
}

.track-button:hover {
  background-color: var(--brand-hover);
  border-color: var(--brand-hover);
  color: #ffffff;
}

.btn-dark {
  background-color: var(--text-main);
  color: #ffffff;
}

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

.btn-danger {
  background-color: var(--danger, var(--danger));
  color: #ffffff;
  border-color: var(--danger, var(--danger));
}

.btn-danger:hover {
  background-color: #DD2222;
  border-color: #DD2222;
  transform: translateY(-2px);
}

.btn-danger:disabled {
  background-color: var(--danger-light, var(--danger-light));
  color: var(--danger, var(--danger));
  border-color: var(--danger-light, var(--danger-light));
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-text {
  padding: 0;
  border: none;
  background: none;
  color: var(--brand);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}

.btn-text:hover {
  color: var(--brand-hover);
}

.btn-text svg {
  transition: transform var(--transition-fast);
}

.btn-text:hover svg {
  transform: translateX(4px);
}

/* Badge System */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  border-radius: var(--border-radius-full);
  letter-spacing: 0.05em;
}

.badge-brand {
  background-color: transparent;
  color: var(--brand);
  border: 1px solid rgba(37, 99, 235, 0.3);
}

/* ==========================================================================
   Navigation Bar
   ========================================================================== */
.header-nav {
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  height: 80px;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100%;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-headings);
  font-weight: 800;
  font-size: 1.4rem;
  /* Highlight text with a beautiful professional gradient */
  background: linear-gradient(90deg, var(--brand), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.logo-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--brand-light);
  /* Adds a subtle ring to highlight the circle */
}

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

.nav-link {
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--text-muted);
  padding: 0.5rem 0;
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--brand);
  transition: var(--transition-normal);
}

.nav-link:hover,
.nav-link.active {
  color: var(--brand);
}


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

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Hamburger Menu Toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.nav-toggle span {
  display: block;
  width: 25px;
  height: 2.5px;
  background-color: var(--text-muted);
  margin: 5px 0;
  transition: var(--transition-normal);
  border-radius: var(--border-radius-full);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #ffffff;
  padding-top: 4.5rem;
  padding-bottom: 2rem;
  border-top: 4px solid rgba(255, 255, 255, 0.25);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 3rem;
  margin-bottom: 3.5rem;
}

.footer-col h3 {
  color: #ffffff;
  font-size: 1.2rem;
  margin-bottom: 1.5rem;
  font-weight: 600;
  position: relative;
  padding-bottom: 0.5rem;
}

.footer-col h3::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 35px;
  height: 3px;
  background-color: rgba(255, 255, 255, 0.5);
  border-radius: var(--border-radius-full);
}

.footer-about p {
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
  line-height: 1.7;
}

.social-links {
  display: flex;
  gap: 1rem;
}

.social-btn {
  width: 36px;
  height: 36px;
  background-color: rgba(255, 255, 255, 0.2);
  border-radius: var(--border-radius-sm);
  transition: var(--transition-normal);
  color: white;
}

.social-btn:hover {
  background-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-3px);
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.75rem;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.95rem;
}

.footer-links a:hover {
  color: #ffffff;
  padding-left: 5px;
}

.footer-contact-item {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1rem;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.8);
  align-items: flex-start;
}

.footer-contact-item svg {
  color: rgba(255, 255, 255, 0.6);
  flex-shrink: 0;
  margin-top: 4px;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  padding-top: 2rem;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
  text-align: center;
}

.footer-bottom p {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 1024px) {
  .grid-5 {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
  }

  .grid-6 {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    overflow-x: auto;
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem;
  }
}

@media (max-width: 768px) {
  .section {
    padding: 3.5rem 0;
  }

  .section-header {
    margin-bottom: 2.5rem;
  }

  .grid-2,
  .grid-3,
  .grid-4,
  .grid-5,
  .grid-6 {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  /* Mobile Menu Header */
  .nav-toggle {
    display: block;
  }

  .nav-menu {
    position: fixed;
    top: 80px;
    left: -100%;
    width: 100%;
    height: calc(100vh - 80px);
    background-color: #FFFFFF;
    flex-direction: column;
    align-items: flex-start;
    padding: 2.5rem 1.5rem;
    gap: 1.5rem;
    transition: var(--transition-normal);
    border-top: 1px solid var(--border);
    box-shadow: var(--shadow-xl);
  }

  .nav-menu.active {
    left: 0;
  }

  .nav-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    width: 100%;
    position: fixed;
    bottom: 1.5rem;
    left: 1.5rem;
    right: 1.5rem;
    z-index: 999;
  }

  .nav-actions .btn {
    width: 100%;
    text-align: center;
    padding: 0.75rem 1rem !important;
    font-size: 0.9rem !important;
  }

  /* When nav-actions is moved into the menu container, make it flow with menu content */
  .nav-actions.in-menu {
    position: static !important;
    bottom: auto !important;
    left: auto !important;
    right: auto !important;
    margin-top: 1rem;
    z-index: auto;
    width: 100%;
  }

  /* Active menu toggling bars representation */
  .nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 6px);
  }

  .nav-toggle.active span:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -6px);
  }

  /* Allow horizontal scrolling for long steppers/timelines */
  .timeline {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 1rem;
    padding-bottom: 0.5rem;
  }

  .timeline .t-node {
    min-width: 110px;
    flex: 0 0 auto;
  }
}

@media (max-width: 480px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

/* Additional small-device tweaks */
@media (max-width: 420px) {
  .container {
    padding: 0 1rem;
  }

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

  .logo-link {
    font-size: 1.05rem;
  }

  .header-nav {
    height: 64px;
  }

  .nav-link {
    font-size: 0.9rem;
  }

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

  .carousel-slide img {
    height: 200px;
  }

  .footer-bottom p {
    font-size: 0.85rem;
    padding: 0 1rem;
  }

  .table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* Tighten up various cards on very small devices */
  .status-search-card,
  .status-result-card,
  .form-wizard-card,
  .login-card {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }

  html {
    font-size: 15px;
  }
}

/* ==========================================================================
   Modern Form Controls Styling (Global)
   ========================================================================== */
.form-control {
  width: 100%;
  padding: 0.85rem 1.15rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-main);
  background-color: var(--bg-main);
  border: 1.5px solid var(--border);
  border-radius: var(--border-radius-md);
  outline: none;
  transition: all var(--transition-normal);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.02);
}

.form-control::placeholder {
  color: var(--text-light);
  font-weight: 400;
  opacity: 0.8;
}

.form-control:hover {
  border-color: rgba(37, 99, 235, 0.4);
  background-color: var(--brand-light);
}

.form-control:focus {
  border-color: var(--brand);
  background-color: #FFFFFF;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15), 0 4px 10px rgba(37, 99, 235, 0.08);
}

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