/* === Base Reset & Body === */
:root {
  --primary: #FFFFFF;
  --primary-dark: #044d48;
  --primary-light: #087a6e;
  --white: #ffffff;
  --light-gray: #f8f9fa;
  --gray: #6c757d;
  --dark: #212529;
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
  --transition: all 0.3s ease;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  color: var(--dark);
  line-height: 1.6;
  background-color: var(--white);
}

/* === Sticky Navbar === */
.sticky-top.bg-white {
  z-index: 1030;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.navbar-brand img {
  height: 60px;
  transition: transform 0.3s ease;
}
.navbar-brand:hover img {
  transform: scale(1.05);
}

/* Nav Links */
.nav-link {
  color: #333 !important;
  font-weight: 500;
  padding: 0.6rem 1rem;
  position: relative;
  transition: var(--transition);
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary) !important;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width 0.3s ease, transform 0.3s ease;
  transform: translateX(-50%);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 60%;
}

/* === CRITICAL FIX: Prevent dropdown from closing on mouse move === */
.dropdown-menu {
  margin-top: 0 !important;
  top: calc(100% + 2px) !important; /* Overlap trigger by 2px */
  left: 0 !important;
  border-top: none;
  z-index: 1070 !important;
}

/* Ensure no gap between nav-link and dropdown */
.nav-link {
  position: relative;
  z-index: 1;
}

.dropdown {
  position: relative;
}

/* Desktop: Keep open on hover (with safe buffer zone) */
@media (min-width: 992px) {
  .dropdown:hover > .dropdown-menu,
  .dropdown-menu:hover {
    display: block !important;
    opacity: 1;
    visibility: visible;
  }

  /* Add invisible "bridge" to connect trigger and menu */
  .dropdown::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    height: 10px;
    z-index: -1;
  }
}
/* === Buttons === */
.btn-primary,
.btn-custom,
.btn-success {
  background-color: var(--primary);
  border: none;
  font-weight: 500;
  padding: 0.6rem 1.5rem;
  border-radius: 50px;
  transition: var(--transition);
  box-shadow: 0 4px 10px rgba(6, 98, 89, 0.2);
}

.btn-primary:hover,
.btn-custom:hover,
.btn-success:hover {
  background-color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(6, 98, 89, 0.3);
}

/* === Headings === */
section h2,
section h3,
section h4,
section h5 {
  color: var(--primary);
  font-weight: 600;
  margin-bottom: 1.25rem;
}

h1 {
  color: var(--dark);
  font-weight: 700;
}

/* === Footer === */
footer {
  background-color: var(--primary) !important;
  color: var(--white);
  padding: 2.5rem 0 1.5rem;
  margin-top: 3rem;
}

footer a {
  color: var(--white);
  text-decoration: none;
  transition: var(--transition);
}

footer a:hover {
  color: #cceae6;
  text-decoration: underline;
}

/* === Career Page Enhancements === */
.table-responsive {
  border-radius: 0.5rem;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.table {
  margin-bottom: 0;
}

.table td,
.table th {
  vertical-align: middle !important;
  padding: 1rem;
}

.table thead th {
  background-color: var(--primary);
  color: var(--white);
  font-weight: 500;
}

/* === Utility Classes === */
.display-5 {
  font-size: calc(1.475rem + 1.4vw);
  font-weight: 600;
  color: var(--dark);
}

@media (min-width: 992px) {
  .display-5 {
    font-size: 2.5rem;
  }
}

/* === Responsive Adjustments === */
@media (max-width: 768px) {
  .navbar-nav .nav-link {
    padding: 0.7rem 0.8rem;
  }

  .carousel {
    height: 400px;
  }

  .carousel-caption {
    bottom: 15%;
    padding: 1rem;
  }

  footer {
    text-align: center;
  }

  footer .text-md-start,
  footer .text-md-end {
    text-align: center !important;
  }

  footer .mb-md-0 {
    margin-bottom: 1rem !important;
  }
}

/* === Back-to-top (if used) === */
#backToTop {
  background: var(--primary);
  color: white;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
}
#backToTop:hover {
  background: var(--primary-dark);
  transform: translateY(-3px);
}