@import url('https://fonts.googleapis.com/css2?family=Inter:ital,wght@0,400;0,500;0,600;0,700;0,800;1,400;1,500;1,600;1,700;1,800&family=Battambang:wght@400;700&display=swap');

/* --- Design System Properties --- */
:root {
  /* Colors */
  --color-surface: #f8f9ff;
  --color-surface-dim: #cbdbf5;
  --color-surface-bright: #f8f9ff;
  --color-surface-container-lowest: #ffffff;
  --color-surface-container-low: #eff4ff;
  --color-surface-container: #e5eeff;
  --color-surface-container-high: #dce9ff;
  --color-surface-container-highest: #d3e4fe;
  
  --color-on-surface: #0b1c30;
  --color-on-surface-variant: #45464d;
  --color-inverse-surface: #213145;
  --color-inverse-on-surface: #eaf1ff;
  
  --color-outline: #76777d;
  --color-outline-variant: #c6c6cd;
  --color-surface-tint: #565e74;
  
  --color-primary: #000000;
  --color-on-primary: #ffffff;
  --color-primary-container: #131b2e; /* Deep Navy */
  --color-on-primary-container: #7c839b;
  --color-inverse-primary: #bec6e0;
  
  --color-secondary: #0051d5; /* Trust Blue */
  --color-on-secondary: #ffffff;
  --color-secondary-container: #316bf3;
  --color-on-secondary-container: #fefcff;
  
  --color-tertiary: #000000;
  --color-on-tertiary: #ffffff;
  --color-tertiary-container: #002113;
  --color-on-tertiary-container: #009668; /* Success Green */
  --color-tertiary-fixed-dim: #4edea3;
  
  --color-error: #ba1a1a;
  --color-on-error: #ffffff;
  --color-error-container: #ffdad6;
  --color-on-error-container: #93000a;
  
  --color-background: #f8f9ff;
  --color-on-background: #0b1c30;
  --color-surface-variant: #d3e4fe;

  /* Typography Styles (Inter & Khmer OS Battambang) */
  --font-family: 'Inter', 'Khmer OS Battambang', 'Battambang', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-khmer: 'Khmer OS Battambang', 'Battambang', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  
  /* Borders & Radius */
  --rounded-sm: 0.125rem;       /* 2px */
  --rounded-default: 0.25rem;  /* 4px */
  --rounded-md: 0.375rem;       /* 6px */
  --rounded-lg: 0.5rem;         /* 8px */
  --rounded-xl: 0.75rem;        /* 12px */
  --rounded-full: 9999px;

  /* Spacing Scale */
  --spacing-base: 8px;
  --spacing-container-max: 1280px;
  --spacing-gutter: 24px;
  --spacing-margin-mobile: 16px;
  --spacing-margin-desktop: 40px;
  --spacing-stack-sm: 8px;
  --spacing-stack-md: 16px;
  --spacing-stack-lg: 32px;

  /* Shadows */
  --shadow-soft: 0px 4px 6px -1px rgba(11, 28, 48, 0.05), 0px 2px 4px -1px rgba(11, 28, 48, 0.03);
  --shadow-hover: 0px 10px 15px -3px rgba(11, 28, 48, 0.08), 0px 4px 6px -2px rgba(11, 28, 48, 0.04);
  --shadow-focus: 0 0 0 2px var(--color-surface-container-lowest), 0 0 0 4px var(--color-secondary);
}

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

html {
  font-family: var(--font-family);
  background-color: var(--color-background);
  color: var(--color-on-background);
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.lang-kh, html[lang="km"] body, html[lang="km"], .lang-kh {
  font-family: 'Khmer OS Battambang', 'Battambang', var(--font-family);
  line-height: 1.75;
}

/* Typography Classes */
.display-lg {
  font-size: 48px;
  font-weight: 700;
  line-height: 56px;
  letter-spacing: -0.02em;
}

.headline-md {
  font-size: 30px;
  font-weight: 600;
  line-height: 38px;
  letter-spacing: -0.01em;
}

.headline-sm {
  font-size: 24px;
  font-weight: 600;
  line-height: 32px;
}

.body-lg {
  font-size: 18px;
  font-weight: 400;
  line-height: 28px;
}

.body-md {
  font-size: 16px;
  font-weight: 400;
  line-height: 24px;
}

.label-md {
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  letter-spacing: 0.01em;
}

.label-sm {
  font-size: 12px;
  font-weight: 600;
  line-height: 16px;
}

/* --- Layout Elements --- */
.container {
  width: 100%;
  max-width: var(--spacing-container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--spacing-margin-desktop);
  padding-right: var(--spacing-margin-desktop);
}

.grid-12 {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  column-gap: var(--spacing-gutter);
}

/* --- Header / Navigation --- */
header.site-header {
  background-color: var(--color-surface-container-lowest);
  border-bottom: 1px solid var(--color-outline-variant);
  position: sticky;
  top: 0;
  z-index: 100;
  transition: box-shadow 0.3s ease;
}

header.site-header.scrolled {
  box-shadow: var(--shadow-soft);
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 80px;
}

.logo-link {
  display: flex;
  align-items: center;
  height: 48px;
  text-decoration: none;
}

.logo-img {
  height: 100%;
  width: auto;
}

nav.main-nav {
  display: flex;
  gap: 32px;
  align-items: center;
}

nav.main-nav a {
  color: var(--color-on-surface-variant);
  text-decoration: none;
  font-weight: 500;
  font-size: 15px;
  transition: color 0.2s ease;
  position: relative;
  padding: 8px 0;
}

nav.main-nav a:hover,
nav.main-nav a.active {
  color: var(--color-secondary);
}

nav.main-nav a.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--color-secondary);
  border-radius: var(--rounded-full);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 24px;
}

/* Language Dropdown & Legacy Switcher */
.lang-dropdown {
  position: relative;
  display: inline-flex;
  vertical-align: middle;
}

.lang-dropdown-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--color-surface-container-lowest, #ffffff);
  border: 1px solid var(--color-outline-variant, rgba(0, 0, 0, 0.15));
  border-radius: var(--rounded-md, 8px);
  padding: 5px 8px;
  cursor: pointer;
  color: var(--color-on-surface, #131b2e);
  font-family: inherit;
  font-size: 13px;
  line-height: 1;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.lang-dropdown-btn:hover {
  background: var(--color-surface-container-low, #f4f6fb);
  border-color: var(--color-secondary, #0051d5);
  box-shadow: 0 2px 6px rgba(0, 81, 213, 0.12);
}

.lang-dropdown.open .lang-dropdown-btn {
  background: var(--color-surface-container-low, #f4f6fb);
  border-color: var(--color-secondary, #0051d5);
  box-shadow: 0 0 0 3px rgba(0, 81, 213, 0.15);
}

.lang-dropdown-btn:focus-visible {
  outline: none;
  box-shadow: var(--shadow-focus);
}

.lang-dropdown-item:focus-visible {
  outline: none;
  background-color: var(--color-surface-container-low, #f4f6fb);
  box-shadow: inset 0 0 0 2px var(--color-secondary, #0051d5);
}

.lang-curr-flag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.lang-chevron {
  width: 13px;
  height: 13px;
  color: var(--color-outline, #76777d);
  transition: transform 0.2s ease, color 0.2s ease;
  flex-shrink: 0;
}

.lang-dropdown-btn:hover .lang-chevron,
.lang-dropdown.open .lang-chevron {
  color: var(--color-secondary, #0051d5);
}

.lang-dropdown.open .lang-chevron {
  transform: rotate(180deg);
}

.lang-dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 160px;
  background: var(--color-surface-container-lowest, #ffffff);
  border: 1px solid var(--color-outline-variant, rgba(0, 0, 0, 0.12));
  border-radius: var(--rounded-lg, 12px);
  padding: 6px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.12), 0 8px 10px -6px rgba(0, 0, 0, 0.08);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px) scale(0.97);
  transition: opacity 0.18s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.18s cubic-bezier(0.16, 1, 0.3, 1),
              visibility 0.18s;
  z-index: 1050;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.lang-dropdown.open .lang-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.lang-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  text-decoration: none;
  color: var(--color-on-surface, #131b2e);
  font-size: 13.5px;
  font-weight: 500;
  border-radius: var(--rounded-md, 8px);
  transition: background-color 0.15s ease, color 0.15s ease;
}

.lang-dropdown-item:hover {
  background-color: var(--color-surface-container-low, #f4f6fb);
  color: var(--color-secondary, #0051d5);
}

.lang-dropdown-item.active {
  background-color: var(--color-surface-container-high, #e5eeff);
  color: var(--color-secondary, #0051d5);
  font-weight: 600;
}

.lang-item-flag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.lang-item-name {
  flex: 1;
  white-space: nowrap;
}

.lang-check {
  color: var(--color-secondary, #0051d5);
  flex-shrink: 0;
}

.lang-switcher {
  display: flex;
  align-items: center;
  gap: 4px;
}

.lang-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: 1.5px solid transparent;
  border-radius: var(--rounded-md);
  cursor: pointer;
  padding: 3px 5px;
  font-family: inherit;
  font-weight: inherit;
  text-decoration: none;
  transition: all 0.2s ease;
  opacity: 0.55;
}

.lang-btn:hover {
  opacity: 0.9;
  background: var(--color-surface-container);
}

.lang-btn.active {
  opacity: 1;
  background: var(--color-surface-container-high);
  border-color: var(--color-secondary);
  box-shadow: 0 1px 4px rgba(0,81,213,0.18);
}

.lang-divider {
  color: var(--color-outline-variant);
  font-size: 13px;
  opacity: 0.6;
}

.flag-icon {
  width: 22px;
  height: 15px;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(0,0,0,.15);
  flex-shrink: 0;
  display: block;
}

.auth-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.btn-signin {
  color: var(--color-secondary);
  background: none;
  border: none;
  font-family: inherit;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  padding: 10px 16px;
  text-decoration: none;
  transition: color 0.2s ease;
}

.btn-signin:hover {
  color: #003ea8;
}

/* Header wishlist icon (shared across pages) */
.hdr-wishlist { position: relative; display: flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 10px; color: var(--color-on-surface-variant); text-decoration: none; transition: background-color .15s ease, color .15s ease; }
.hdr-wishlist:hover { background: var(--color-surface-container-low); color: #e0245e; }
.hdr-wishlist svg { width: 19px; height: 19px; }
.hdr-wishlist-count { position: absolute; top: 2px; right: 2px; min-width: 15px; height: 15px; padding: 0 3px; border-radius: 999px; background: #e0245e; color: #fff; font-size: 9.5px; font-weight: 800; display: flex; align-items: center; justify-content: center; line-height: 1; }

/* Mobile Menu Toggle */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: var(--color-on-surface);
}

.mobile-menu-toggle svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
}

/* --- Hero Section --- */
.hero-section {
  padding-top: 64px;
  padding-bottom: 80px;
  background: linear-gradient(180deg, var(--color-surface-container-lowest) 0%, var(--color-surface-container-low) 100%);
  overflow: hidden;
}

.hero-content {
  grid-column: span 6;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-subtitle {
  color: var(--color-secondary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--spacing-stack-sm);
}

.hero-title {
  color: var(--color-primary-container);
  margin-bottom: 20px;
}

.hero-title span {
  color: var(--color-secondary);
}

.hero-desc {
  color: var(--color-on-surface-variant);
  margin-bottom: var(--spacing-stack-lg);
  max-width: 520px;
}

/* Search Bar Component */
.search-container {
  position: relative;
  background-color: var(--color-surface-container-lowest);
  border: 1px solid var(--color-outline-variant);
  border-radius: var(--rounded-lg);
  padding: 8px;
  display: flex;
  align-items: center;
  box-shadow: var(--shadow-soft);
  margin-bottom: var(--spacing-stack-lg);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-container:focus-within {
  border-color: var(--color-secondary);
  box-shadow: 0 0 0 3px rgba(0, 81, 213, 0.15), var(--shadow-soft);
}

.search-icon {
  color: var(--color-outline);
  margin-left: 12px;
  margin-right: 8px;
  display: flex;
  align-items: center;
}

.search-icon svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

.search-input {
  border: none;
  background: none;
  font-family: inherit;
  font-size: 16px;
  color: var(--color-on-surface);
  flex-grow: 1;
  outline: none;
  padding: 12px 4px;
}

.search-input::placeholder {
  color: var(--color-outline);
}

/* Search suggestions dropdown styling (interactive preview) */
.search-suggestions {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background-color: var(--color-surface-container-lowest);
  border: 1px solid var(--color-outline-variant);
  border-radius: var(--rounded-lg);
  box-shadow: var(--shadow-hover);
  z-index: 50;
  display: none;
  flex-direction: column;
  overflow: hidden;
  animation: slideDownFade 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.suggestion-item {
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  font-size: 14px;
  color: var(--color-on-surface);
  transition: background-color 0.15s ease;
}

.suggestion-item:hover {
  background-color: var(--color-surface-container-low);
}

.suggestion-item svg {
  width: 16px;
  height: 16px;
  stroke: var(--color-outline);
  fill: none;
}

.quick-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: -12px;
  margin-bottom: 24px;
}

.quick-tag {
  background-color: var(--color-surface-container-high);
  color: var(--color-on-surface);
  border: none;
  padding: 6px 12px;
  border-radius: var(--rounded-sm);
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.1s ease;
}

.quick-tag:hover {
  background-color: var(--color-surface-container-highest);
}

.quick-tag:active {
  transform: scale(0.97);
}

/* Social Proof */
.social-proof {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 16px;
}

.avatar-stack {
  display: flex;
}

.avatar {
  width: 36px;
  height: 36px;
  border-radius: var(--rounded-full);
  border: 2px solid var(--color-surface-container-lowest);
  background-color: var(--color-surface-container-highest);
  margin-right: -10px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 11px;
  color: var(--color-outline);
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.social-proof-text {
  font-size: 14px;
  color: var(--color-on-surface-variant);
  font-weight: 500;
}

.social-proof-text strong {
  color: var(--color-on-surface);
  font-weight: 700;
}

/* Hero Media Column */
.hero-media {
  grid-column: span 6;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.hero-image-wrapper {
  width: 100%;
  max-width: 520px;
  aspect-ratio: 4 / 3;
  border-radius: var(--rounded-xl);
  overflow: hidden;
  box-shadow: var(--shadow-hover);
  position: relative;
}

.hero-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s ease;
}

.hero-image-wrapper:hover img {
  transform: scale(1.03);
}

/* Floating Badge / RokCheang Shield Card */
.floating-shield-card {
  position: absolute;
  bottom: -20px;
  left: 20px;
  background-color: var(--color-surface-container-lowest);
  border-radius: var(--rounded-lg);
  padding: 16px 20px;
  box-shadow: 0px 20px 25px -5px rgba(11, 28, 48, 0.1), 0px 10px 10px -5px rgba(11, 28, 48, 0.04);
  border: 1px solid var(--color-outline-variant);
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 250px;
  z-index: 10;
  animation: floatCard 4s ease-in-out infinite;
}

.shield-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.shield-icon-bg {
  width: 40px;
  height: 40px;
  border-radius: var(--rounded-lg);
  background-color: var(--color-tertiary-container);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-on-tertiary-container);
  flex-shrink: 0;
}

.shield-icon-bg svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.shield-meta {
  display: flex;
  flex-direction: column;
}

.shield-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--color-on-surface);
}

.shield-subtitle {
  font-size: 10px;
  color: var(--color-outline);
}

.shield-footer {
  border-top: 1px solid var(--color-outline-variant);
  padding-top: 8px;
  font-size: 11px;
  font-weight: 600;
  color: var(--color-on-tertiary-container);
  display: flex;
  align-items: center;
  gap: 6px;
}

.shield-footer svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

/* --- Partners Section --- */
.partners-section {
  background-color: var(--color-surface-container-low);
  padding: 40px 0;
  border-top: 1px solid var(--color-outline-variant);
  border-bottom: 1px solid var(--color-outline-variant);
}

.partners-title {
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-outline);
  margin-bottom: 24px;
}

.partners-grid {
  display: flex;
  justify-content: space-around;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--spacing-gutter);
}

.partner-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--color-on-surface-variant);
  font-weight: 600;
  font-size: 16px;
  opacity: 0.85;
  transition: opacity 0.2s ease, transform 0.2s ease;
  cursor: pointer;
}

.partner-logo:hover {
  opacity: 1;
  transform: translateY(-2px);
}

.partner-logo svg {
  height: 32px;
  width: auto;
  fill: currentColor;
}

.partner-logo span {
  font-family: inherit;
}

/* --- Trust Stats Section --- */
.stats-section {
  padding: 64px 0;
  background-color: var(--color-surface-container-lowest);
}

.stats-grid {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 32px;
}

.stat-item {
  flex: 1 1 200px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px;
  position: relative;
}

.stat-item::after {
  content: '';
  position: absolute;
  right: -16px;
  top: 25%;
  height: 50%;
  width: 1px;
  background-color: var(--color-outline-variant);
}

.stat-item:last-child::after {
  display: none;
}

.stat-icon {
  width: 48px;
  height: 48px;
  background-color: var(--color-surface-container-low);
  border-radius: var(--rounded-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-secondary);
  margin-bottom: var(--spacing-stack-sm);
}

.stat-icon svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.stat-number {
  font-size: 32px;
  font-weight: 700;
  color: var(--color-on-surface);
  line-height: 1.2;
}

.stat-label {
  font-size: 14px;
  color: var(--color-on-surface-variant);
  font-weight: 500;
  margin-top: 4px;
}

/* --- TVET Program Focus Areas --- */
.tvet-focus-section {
  padding: 64px 0;
  background-color: var(--color-surface-container-low);
}

.section-header-centered {
  text-align: center;
  margin-bottom: 40px;
}

.section-pretitle {
  color: var(--color-secondary);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.section-title {
  color: var(--color-primary-container);
  font-size: 28px;
  font-weight: 700;
}

.focus-areas-container {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}

.focus-card {
  background-color: var(--color-surface-container-lowest);
  border: 1px solid var(--color-outline-variant);
  border-radius: var(--rounded-lg);
  padding: 24px 16px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: inherit;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.25s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.25s ease;
}

.focus-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: var(--color-secondary-container);
}

.focus-card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--rounded-lg);
  background-color: var(--color-surface-container-low);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-secondary);
  margin-bottom: 16px;
  transition: background-color 0.25s ease, color 0.25s ease;
}

.focus-card:hover .focus-card-icon {
  background-color: var(--color-secondary);
  color: var(--color-on-secondary);
}

.focus-card-icon svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

.focus-card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--color-on-surface);
  margin-bottom: 6px;
}

.focus-card-desc {
  font-size: 11px;
  color: var(--color-outline);
  line-height: 1.4;
}

/* --- Explore Verified Categories --- */
.verified-categories-section {
  padding: 80px 0;
  background-color: var(--color-surface-container-lowest);
}

.categories-intro {
  margin-bottom: 40px;
}

.categories-intro .body-lg {
  color: var(--color-on-surface-variant);
  margin-top: 8px;
}

.categories-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

/* Left Featured Column */
.featured-category-card {
  grid-row: span 2;
  position: relative;
  background: linear-gradient(135deg, #0b1c30 0%, #1c2e46 100%);
  border-radius: var(--rounded-xl);
  padding: 40px;
  color: var(--color-on-primary);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  min-height: 400px;
  border: 1px solid var(--color-primary-container);
  box-shadow: var(--shadow-soft);
}

/* Code Art Overlay background */
.featured-card-bg-art {
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0;
  left: 0;
  opacity: 0.12;
  pointer-events: none;
  background-image: 
    radial-gradient(ellipse at bottom right, rgba(49, 107, 243, 0.4), transparent),
    repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(255,255,255,0.05) 2px, rgba(255,255,255,0.05) 4px);
  transition: opacity 0.3s ease;
}

.featured-category-card:hover .featured-card-bg-art {
  opacity: 0.18;
}

.featured-arrows {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  z-index: 2;
}

.arrow-btn-static {
  width: 36px;
  height: 36px;
  border-radius: var(--rounded-full);
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  cursor: pointer;
  transition: background 0.2s ease;
}

.arrow-btn-static:hover {
  background: rgba(255, 255, 255, 0.15);
}

.arrow-btn-static svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

.featured-info {
  z-index: 2;
}

.featured-title {
  font-size: 26px;
  font-weight: 700;
  margin-bottom: var(--spacing-stack-md);
  color: var(--color-surface);
}

.featured-desc {
  font-size: 15px;
  line-height: 1.6;
  opacity: 0.85;
  margin-bottom: 32px;
  max-width: 420px;
}

.featured-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: white;
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  transition: gap 0.2s ease;
}

.featured-link svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

.featured-category-card:hover .featured-link {
  gap: 12px;
}

/* Right Grid Column for normal categories */
.subcategories-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 24px;
}

.subcategory-card {
  background-color: var(--color-surface-container-low);
  border: 1px solid var(--color-outline-variant);
  border-radius: var(--rounded-lg);
  padding: 32px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.subcategory-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-soft);
  background-color: var(--color-surface-container-lowest);
}

.sub-card-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--rounded-md);
  color: var(--color-secondary);
  display: flex;
  align-items: center;
  margin-bottom: 24px;
}

.sub-card-icon svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

.sub-card-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--color-on-surface);
  margin-bottom: 8px;
}

.sub-card-desc {
  font-size: 13px;
  color: var(--color-on-surface-variant);
  line-height: 1.5;
}

.subcategory-card.wide-sub {
  grid-column: span 2;
  flex-direction: row;
  align-items: center;
}

.subcategory-card.wide-sub .sub-card-content {
  flex-grow: 1;
}

.subcategory-card.wide-sub .sub-card-icon {
  margin-bottom: 0;
  margin-right: 24px;
  flex-shrink: 0;
}

.sub-arrow-circle {
  width: 36px;
  height: 36px;
  border-radius: var(--rounded-full);
  border: 1px solid var(--color-outline-variant);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-secondary);
  background-color: var(--color-surface-container-lowest);
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.subcategory-card:hover .sub-arrow-circle {
  background-color: var(--color-secondary);
  border-color: var(--color-secondary);
  color: var(--color-on-secondary);
}

.sub-arrow-circle svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

/* --- Built on Three Pillars of Trust --- */
.pillars-section {
  padding: 80px 0;
  background-color: var(--color-surface-container-low);
  border-top: 1px solid var(--color-outline-variant);
  border-bottom: 1px solid var(--color-outline-variant);
}

.pillars-desc {
  max-width: 600px;
  margin: 12px auto 48px auto;
  color: var(--color-on-surface-variant);
  line-height: 1.6;
}

.badge-showcase-container {
  display: flex;
  justify-content: center;
  margin-top: 40px;
}

.badge-card {
  background-color: var(--color-surface-container-lowest);
  border: 1px solid var(--color-outline-variant);
  border-radius: var(--rounded-xl);
  padding: 40px;
  max-width: 480px;
  text-align: center;
  box-shadow: var(--shadow-soft);
  transition: transform 0.3s ease;
}

.badge-card:hover {
  transform: translateY(-4px);
}

.badge-icon-wrapper {
  width: 64px;
  height: 64px;
  border-radius: var(--rounded-xl);
  background-color: var(--color-surface-container-high);
  color: var(--color-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px auto;
}

.badge-icon-wrapper svg {
  width: 32px;
  height: 32px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.badge-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--color-on-surface);
  margin-bottom: 12px;
}

.badge-desc {
  font-size: 14px;
  color: var(--color-on-surface-variant);
  line-height: 1.6;
}

/* --- CTA Section --- */
.cta-section {
  background-color: var(--color-primary-container);
  color: var(--color-on-primary);
  padding: 64px 0;
  position: relative;
  overflow: hidden;
}

.cta-grid {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 32px;
}

.cta-content {
  flex: 1 1 500px;
}

.cta-title {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 8px;
  color: white;
}

.cta-desc {
  color: var(--color-on-primary-container);
  font-size: 15px;
}

.cta-action {
  flex-shrink: 0;
}

/* --- Footer --- */
footer.site-footer {
  background-color: var(--color-surface-container-lowest);
  border-top: 1px solid var(--color-outline-variant);
  padding: 48px 0 24px 0;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--spacing-gutter);
  padding-bottom: 32px;
  border-bottom: 1px solid var(--color-outline-variant);
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 380px;
}

.footer-motto {
  font-size: 13px;
  color: var(--color-on-surface-variant);
  line-height: 1.5;
}

.footer-links {
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
}

.footer-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-on-surface-variant);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: var(--color-secondary);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  padding-top: 24px;
  font-size: 13px;
  color: var(--color-outline);
}

.social-actions {
  display: flex;
  gap: 12px;
}

.social-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--rounded-full);
  border: 1px solid var(--color-outline-variant);
  background-color: var(--color-surface-container-low);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-on-surface-variant);
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.social-btn:hover {
  background-color: var(--color-surface-container-high);
  color: var(--color-secondary);
  border-color: var(--color-outline);
}

.social-btn svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

/* --- Core UI Buttons & Components --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  font-weight: 600;
  font-size: 15px;
  border-radius: var(--rounded-default);
  padding: 12px 24px;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.1s ease, box-shadow 0.2s ease;
  text-decoration: none;
  border: none;
  gap: 8px;
}

.btn:active {
  transform: scale(0.98);
}

.btn:focus {
  outline: none;
  box-shadow: var(--shadow-focus);
}

.btn-primary {
  background-color: var(--color-secondary);
  color: var(--color-on-secondary);
}

.btn-primary:hover {
  background-color: #003ea8;
}

.btn-secondary {
  background-color: var(--color-surface-container-lowest);
  border: 1px solid var(--color-outline-variant);
  color: var(--color-on-surface);
}

.btn-secondary:hover {
  background-color: var(--color-surface-container-low);
  border-color: var(--color-outline);
}

.btn-secondary:focus {
  box-shadow: 0 0 0 2px var(--color-surface-container-lowest), 0 0 0 4px var(--color-outline);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 14px;
}

.btn-blue-accent {
  background-color: var(--color-secondary-container);
  color: var(--color-on-secondary-container);
}

.btn-blue-accent:hover {
  background-color: #1a56e0;
}

/* Badge/Chips */
.badge-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: var(--rounded-sm);
  font-size: 11px;
  font-weight: 600;
}

.badge-chip.verified {
  background-color: rgba(0, 150, 104, 0.1);
  color: var(--color-on-tertiary-container);
}

.badge-chip.verified svg {
  width: 12px;
  height: 12px;
  fill: currentColor;
}

.badge-chip.pending {
  background-color: var(--color-surface-container-high);
  color: var(--color-outline);
}

/* Animations */
@keyframes floatCard {
  0% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
  100% { transform: translateY(0); }
}

@keyframes slideDownFade {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive Menu Drawer overlay style */
.mobile-drawer {
  position: fixed;
  top: 80px;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--color-surface-container-lowest);
  z-index: 99;
  display: none;
  flex-direction: column;
  padding: 24px;
  gap: 24px;
  animation: slideDownFade 0.3s ease forwards;
  border-top: 1px solid var(--color-outline-variant);
}

.mobile-drawer a {
  font-size: 18px;
  font-weight: 600;
  color: var(--color-on-surface);
  text-decoration: none;
  padding: 12px 0;
  border-bottom: 1px solid var(--color-surface-container-low);
}

.mobile-drawer .drawer-actions {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: auto;
}

/* --- Media Queries --- */

/* Desktop layout rules and tweaks */
@media (min-width: 1024px) {
  /* standard 12 col sizing is default */
}

/* Tablet (8 Columns / 20px gutters / 24px outer margins) */
@media (max-width: 1023px) and (min-width: 768px) {
  .container {
    padding-left: 24px;
    padding-right: 24px;
  }
  
  .grid-12 {
    column-gap: 20px;
  }

  .hero-content {
    grid-column: span 12;
    text-align: center;
    align-items: center;
    margin-bottom: 48px;
  }
  
  .hero-desc {
    margin-left: auto;
    margin-right: auto;
  }

  .search-container {
    width: 100%;
    max-width: 520px;
  }

  .hero-media {
    grid-column: span 12;
    justify-content: center;
    margin-bottom: 24px;
  }

  .focus-areas-container {
    grid-template-columns: repeat(3, 1fr);
  }

  .categories-grid {
    grid-template-columns: 1fr;
  }

  .featured-category-card {
    grid-row: auto;
    min-height: 320px;
  }

  .subcategories-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* Mobile (4 Columns / 16px gutters / 16px outer margins) */
@media (max-width: 767px) {
  .container {
    padding-left: 16px;
    padding-right: 16px;
  }

  .display-lg {
    font-size: 36px;
    line-height: 44px;
  }

  .headline-md {
    font-size: 24px;
    line-height: 30px;
  }

  nav.main-nav {
    display: none;
  }

  .auth-actions {
    display: none;
  }

  .mobile-menu-toggle {
    display: block;
  }

  .hero-section {
    padding-top: 32px;
    padding-bottom: 64px;
  }

  .hero-content {
    grid-column: span 12;
    text-align: left;
  }

  .search-container {
    flex-wrap: wrap;
    gap: 8px;
  }

  .search-input {
    width: 100%;
    min-width: 0;
  }

  .search-container .btn {
    width: 100%;
  }

  .hero-media {
    grid-column: span 12;
    justify-content: center;
    margin-top: 40px;
    margin-bottom: 20px;
  }

  .floating-shield-card {
    left: -10px;
    bottom: -15px;
    padding: 12px;
    max-width: 220px;
  }

  .partners-grid {
    justify-content: center;
    gap: 20px;
  }

  .partner-logo {
    font-size: 14px;
  }

  .partner-logo svg {
    height: 24px;
  }

  .stat-item {
    flex: 1 1 100%;
  }

  .stat-item::after {
    display: none;
  }

  .focus-areas-container {
    grid-template-columns: 1fr;
  }

  .categories-grid {
    grid-template-columns: 1fr;
  }

  .featured-category-card {
    grid-row: auto;
    padding: 24px;
    min-height: 300px;
  }

  .subcategories-grid {
    grid-template-columns: 1fr;
  }

  .subcategory-card {
    padding: 24px;
  }

  .subcategory-card.wide-sub {
    flex-direction: column;
    align-items: flex-start;
  }

  .subcategory-card.wide-sub .sub-card-icon {
    margin-bottom: 16px;
    margin-right: 0;
  }

  .subcategory-card.wide-sub .sub-arrow-circle {
    margin-top: 16px;
  }

  .badge-card {
    padding: 24px;
  }

  .cta-grid {
    flex-direction: column;
    align-items: flex-start;
  }

  .cta-action {
    width: 100%;
  }

  .cta-action .btn {
    width: 100%;
  }

  .footer-top {
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
  }

  .footer-links {
    flex-direction: column;
    gap: 16px;
  }

  /* Show mobile app footer menu and add safe margin */
  .mobile-footer-nav {
    display: flex;
  }
  
  body {
    padding-bottom: 74px;
  }
}

/* Bottom Navigation Footer Menu (Mobile App Style) */
.mobile-footer-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 64px;
  background-color: var(--color-surface-container-lowest);
  border-top: 1px solid var(--color-outline-variant);
  box-shadow: 0 -4px 12px rgba(11, 28, 48, 0.06);
  display: none; /* Hidden on desktop */
  justify-content: space-around;
  align-items: center;
  z-index: 999;
  padding-bottom: env(safe-area-inset-bottom);
}

.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--color-outline);
  text-decoration: none;
  font-size: 11px;
  font-weight: 600;
  gap: 4px;
  flex-grow: 1;
  height: 100%;
  transition: color 0.2s ease, transform 0.15s ease;
}

.mobile-nav-item svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  transition: stroke 0.2s ease;
}

.mobile-nav-item:hover,
.mobile-nav-item.active {
  color: var(--color-secondary);
}

.mobile-nav-item.active svg {
  stroke: var(--color-secondary);
}

/* ==========================================================================
   Privacy Policy & Terms of Service Styles
   ========================================================================== */
.legal-section {
  padding: 80px 0;
  background-color: var(--color-surface);
  border-top: 1px solid var(--color-outline-variant);
}

.legal-card {
  background: var(--color-surface-container-lowest);
  border: 1px solid var(--color-outline-variant);
  border-radius: 20px;
  padding: 48px;
  box-shadow: var(--shadow-soft);
  max-width: 1000px;
  margin: 0 auto;
}

@media (max-width: 768px) {
  .legal-card {
    padding: 24px;
    border-radius: 14px;
  }
}

.legal-header {
  border-bottom: 1px solid var(--color-outline-variant);
  padding-bottom: 24px;
  margin-bottom: 32px;
}

.legal-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(0, 81, 213, 0.1);
  color: var(--color-secondary);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 6px 14px;
  border-radius: 20px;
  margin-bottom: 16px;
}

.legal-title {
  font-size: 32px;
  font-weight: 800;
  color: var(--color-on-surface);
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.legal-meta {
  font-size: 13.5px;
  color: var(--color-outline);
}

.legal-body h3 {
  font-size: 20px;
  font-weight: 700;
  color: var(--color-on-surface);
  margin-top: 32px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.legal-body p {
  font-size: 15px;
  line-height: 1.7;
  color: var(--color-on-surface-variant);
  margin-bottom: 16px;
}

.legal-body ul {
  margin-left: 20px;
  margin-bottom: 20px;
}

.legal-body li {
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--color-on-surface-variant);
  margin-bottom: 8px;
}

.legal-callout {
  background: var(--color-surface-container-low);
  border-left: 4px solid var(--color-secondary);
  border-radius: 0 12px 12px 0;
  padding: 18px 22px;
  margin: 24px 0;
}

.legal-callout p {
  margin-bottom: 0;
  color: var(--color-on-surface);
  font-weight: 500;
}

/* ==========================================================================
   Institutional Partners Section Styles
   ========================================================================== */
.partners-detail-section {
  padding: 80px 0;
  background: linear-gradient(180deg, var(--color-surface) 0%, var(--color-surface-container-low) 100%);
  border-top: 1px solid var(--color-outline-variant);
}

.partners-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 40px;
}

.partner-detail-card {
  background: var(--color-surface-container-lowest);
  border: 1px solid var(--color-outline-variant);
  border-radius: 16px;
  padding: 28px;
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.partner-detail-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: var(--color-secondary);
}

.partner-card-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: var(--color-surface-container-high);
  color: var(--color-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.partner-card-icon svg {
  width: 28px;
  height: 28px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

.partner-card-title {
  font-size: 19px;
  font-weight: 700;
  color: var(--color-on-surface);
  margin-bottom: 6px;
}

.partner-card-role {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  color: var(--color-secondary);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 12px;
}

.partner-card-desc {
  font-size: 14px;
  line-height: 1.6;
  color: var(--color-on-surface-variant);
  flex-grow: 1;
  margin-bottom: 20px;
}

.partner-card-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #009668;
  background: rgba(0, 150, 104, 0.1);
  padding: 4px 10px;
  border-radius: 20px;
  align-self: flex-start;
}

/* ==========================================================================
   Support & Contact Section Styles
   ========================================================================== */
.support-section {
  padding: 80px 0;
  background: var(--color-surface);
  border-top: 1px solid var(--color-outline-variant);
}

.support-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 36px;
  margin-top: 40px;
}

@media (max-width: 900px) {
  .support-grid {
    grid-template-columns: 1fr;
  }
}

.support-card {
  background: var(--color-surface-container-lowest);
  border: 1px solid var(--color-outline-variant);
  border-radius: 18px;
  padding: 36px;
  box-shadow: var(--shadow-soft);
}

.support-info-card {
  background: #0b1c30;
  color: #ffffff;
  border-radius: 18px;
  padding: 36px;
  box-shadow: var(--shadow-hover);
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.support-info-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.support-info-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.1);
  color: #38bdf8;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.support-info-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.support-info-text strong {
  display: block;
  font-size: 14px;
  color: #cbd5e1;
  margin-bottom: 2px;
}

.support-info-text a,
.support-info-text span {
  font-size: 15px;
  color: #ffffff;
  text-decoration: none;
  font-weight: 600;
}

.support-info-text a:hover {
  text-decoration: underline;
  color: #38bdf8;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 24px;
}

.faq-item {
  border: 1px solid var(--color-outline-variant);
  border-radius: 12px;
  background: var(--color-surface-container-low);
  overflow: hidden;
}

.faq-question {
  width: 100%;
  padding: 16px 20px;
  text-align: left;
  background: none;
  border: none;
  font-size: 15px;
  font-weight: 700;
  color: var(--color-on-surface);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-question svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  transition: transform 0.2s ease;
}

.faq-item.active .faq-question svg {
  transform: rotate(180deg);
}

.faq-answer {
  padding: 0 20px 16px 20px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--color-on-surface-variant);
  display: none;
}

.faq-item.active .faq-answer {
  display: block;
}

