:root {
  --nhi-primary: #0F4C3A;
  --nhi-secondary: #1F7A5A;
  --nhi-accent: #C9A227;
  --nhi-bg: #F8FBF8;
  --nhi-text: #1E293B;
  --nhi-muted: #475569;
}

body {
  font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background-color: var(--nhi-bg);
  color: var(--nhi-text);
}

::selection {
  background: rgba(15, 76, 58, 0.25);
}

/* Premium typography */
h1, h2, h3, h4, h5, h6 {
  color: var(--nhi-primary);
  letter-spacing: -0.01em;
}

/* Header */
#hdr-inner {
  background: #ffffff;
  border-bottom: 1px solid rgba(15, 76, 58, 0.08);
}

@media (max-width: 1024px) {
  #hdr-inner {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
  }
}

#hdr-nav a,
[data-hdr-trigger] {
  color: var(--nhi-text) !important;
  transition: background-color 0.2s ease, color 0.2s ease;
}
#hdr-nav a:hover,
[data-hdr-trigger]:hover {
  background-color: rgba(15, 76, 58, 0.06);
  color: var(--nhi-primary) !important;
}

#hdr-cta,
a[href$="/apply-now"] {
  background: var(--nhi-primary) !important;
  border-color: var(--nhi-primary) !important;
  color: #ffffff !important;
}
#hdr-cta:hover,
a[href$="/apply-now"]:hover {
  background: var(--nhi-secondary) !important;
  border-color: var(--nhi-secondary) !important;
}

/* Announcement */
.bg-emerald-900 {
  background: var(--nhi-primary) !important;
}

/* Hero gradients */
.bg-gradient-to-r.from-emerald-950\/80,
.bg-gradient-to-r.from-emerald-950\/90,
.bg-gradient-to-r.from-emerald-900\/70 {
  --tw-gradient-from: var(--nhi-primary) !important;
}
.bg-gradient-to-r.via-emerald-900\/60,
.bg-gradient-to-r.via-emerald-900\/70 {
  --tw-gradient-via: var(--nhi-secondary) !important;
}
.bg-gradient-to-r.to-slate-900\/60,
.bg-gradient-to-r.to-transparent {
  --tw-gradient-to: rgba(30, 41, 59, 0.45) !important;
}

/* Buttons & CTAs */
.bg-emerald-600,
.bg-emerald-700 {
  background: var(--nhi-primary) !important;
}
.bg-emerald-700:hover,
.hover\:bg-emerald-700:hover {
  background: var(--nhi-secondary) !important;
}

.border-emerald-200 {
  border-color: rgba(15, 76, 58, 0.18) !important;
}

.text-emerald-700,
.text-emerald-800,
.text-emerald-900 {
  color: var(--nhi-primary) !important;
}

.bg-emerald-50 {
  background: rgba(15, 76, 58, 0.06) !important;
}
.hover\:bg-emerald-50:hover {
  background: rgba(15, 76, 58, 0.1) !important;
}

.border-emerald-100 {
  border-color: rgba(15, 76, 58, 0.12) !important;
}
.bg-emerald-100 {
  background: rgba(15, 76, 58, 0.1) !important;
}

.text-emerald-600 {
  color: var(--nhi-secondary) !important;
}
.bg-emerald-600 {
  background: var(--nhi-secondary) !important;
}

/* Gold accent */
.text-emerald-500,
.hover\:text-emerald-700:hover {
  color: var(--nhi-accent) !important;
}

/* Cards */
.bg-\[\#f8fff9\] {
  background: var(--nhi-bg) !important;
}

/* Admin */
.bg-emerald-600,
.bg-emerald-700 {
  background: var(--nhi-primary) !important;
}

/* Footer */
.border-emerald-100 {
  border-color: rgba(15, 76, 58, 0.1) !important;
}

/* Responsive course tables */
@media (max-width: 640px) {
  .overflow-x-auto table {
    font-size: 0.75rem;
  }
}

/* Premium subtle pattern for hero/overlay areas */
.premium-overlay {
  background: rgba(15, 76, 58, 0.92);
}

/* Gold accent underline for section headers */
.gold-accent {
  position: relative;
  display: inline-block;
}
.gold-accent::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 40px;
  height: 3px;
  background: var(--nhi-accent);
  border-radius: 2px;
}

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

/* Logo marquee */
.logo-marquee {
  overflow: hidden;
  position: relative;
  mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
}
.logo-marquee-track {
  display: flex;
  align-items: center;
  gap: 3rem;
  width: max-content;
  animation: marquee 40s linear infinite;
  will-change: transform;
}
.logo-marquee-item {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 150px;
  max-width: 180px;
  height: 72px;
  border-radius: 1.25rem;
  background: #ffffff;
  border: 1px solid rgba(15, 76, 58, 0.12);
  padding: 0.75rem 1.25rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  flex-shrink: 0;
}
.logo-marquee-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(15, 76, 58, 0.12);
}
.logo-marquee-item img {
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
  opacity: 0.8;
  transition: opacity 0.3s ease;
  filter: grayscale(20%);
}
.logo-marquee-item:hover img {
  opacity: 1;
  filter: grayscale(0%);
}
@keyframes marquee {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

/* Theme text color hierarchy on light backgrounds */
.bg-white,
.bg-\[\#f8fff9\],
[style*="background: var(--nhi-bg)"],
[style*="background-color: var(--nhi-bg)"],
[style*="background: #F8FBF8"],
[style*="background-color: #F8FBF8"],
[style*="background: #f8fff9"],
[style*="background-color: #f8fff9"] {
  color: var(--nhi-text) !important;
}

.bg-white h1, .bg-white h2, .bg-white h3, .bg-white h4, .bg-white h5, .bg-white h6,
.bg-\[\#f8fff9\] h1, .bg-\[\#f8fff9\] h2, .bg-\[\#f8fff9\] h3, .bg-\[\#f8fff9\] h4, .bg-\[\#f8fff9\] h5, .bg-\[\#f8fff9\] h6 {
  color: var(--nhi-primary) !important;
}

.bg-white .text-slate-900, .bg-white .text-slate-800, .bg-white .text-slate-700,
.bg-\[\#f8fff9\] .text-slate-900, .bg-\[\#f8fff9\] .text-slate-800, .bg-\[\#f8fff9\] .text-slate-700 {
  color: var(--nhi-text) !important;
}

.bg-white .text-slate-600, .bg-white .text-slate-500, .bg-white .text-slate-400,
.bg-\[\#f8fff9\] .text-slate-600, .bg-\[\#f8fff9\] .text-slate-500, .bg-\[\#f8fff9\] .text-slate-400,
.bg-slate-50 .text-slate-600, .bg-slate-50 .text-slate-500, .bg-slate-50 .text-slate-400 {
  color: var(--nhi-muted) !important;
}

.bg-slate-50,
.bg-slate-50 h1, .bg-slate-50 h2, .bg-slate-50 h3, .bg-slate-50 h4, .bg-slate-50 h5, .bg-slate-50 h6 {
  color: var(--nhi-text) !important;
}

.bg-slate-50 h1, .bg-slate-50 h2, .bg-slate-50 h3, .bg-slate-50 h4, .bg-slate-50 h5, .bg-slate-50 h6 {
  color: var(--nhi-primary) !important;
}

/* Fix white text on white/light backgrounds */
.bg-white > .text-white,
.bg-\[\#f8fff9\] > .text-white,
.bg-slate-50 > .text-white {
  color: var(--nhi-text) !important;
}

.bg-white > .text-white h1, .bg-white > .text-white h2, .bg-white > .text-white h3,
.bg-\[\#f8fff9\] > .text-white h1, .bg-\[\#f8fff9\] > .text-white h2, .bg-\[\#f8fff9\] > .text-white h3,
.bg-slate-50 > .text-white h1, .bg-slate-50 > .text-white h2, .bg-slate-50 > .text-white h3 {
  color: var(--nhi-primary) !important;
}
