:root {
  /* ═══════════════════════════════════════════════════
     SARKARI RESULT TOOLS — Indian Culture Design Tokens
     ═══════════════════════════════════════════════════ */

  /* Primary Palette — Inspired by Indian heritage */
  --saffron: #FF9933;
  --saffron-light: #FFB366;
  --saffron-dark: #E6821F;
  --navy: #1A237E;
  --navy-light: #283593;
  --navy-dark: #0D1453;
  --gold: #D4A73A;
  --gold-light: #E8C55A;
  --gold-dark: #B8912E;
  --white: #FFFFFF;
  --off-white: #FAFAFA;
  --cream: #FFF8F0;

  /* Neutral Palette */
  --gray-50: #F9FAFB;
  --gray-100: #F3F4F6;
  --gray-200: #E5E7EB;
  --gray-300: #D1D5DB;
  --gray-400: #9CA3AF;
  --gray-500: #6B7280;
  --gray-600: #4B5563;
  --gray-700: #374151;
  --gray-800: #1F2937;
  --gray-900: #111827;

  /* Semantic Colors */
  --success: #059669;
  --success-light: #D1FAE5;
  --error: #DC2626;
  --error-light: #FEE2E2;
  --warning: #D97706;
  --warning-light: #FEF3C7;
  --info: #2563EB;
  --info-light: #DBEAFE;

  /* Typography */
  --font-heading: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Font Sizes — Fluid Scale */
  --text-xs: clamp(0.7rem, 0.65rem + 0.25vw, 0.75rem);
  --text-sm: clamp(0.8rem, 0.75rem + 0.25vw, 0.875rem);
  --text-base: clamp(0.9rem, 0.85rem + 0.25vw, 1rem);
  --text-lg: clamp(1rem, 0.95rem + 0.3vw, 1.125rem);
  --text-xl: clamp(1.15rem, 1.05rem + 0.5vw, 1.25rem);
  --text-2xl: clamp(1.3rem, 1.1rem + 1vw, 1.5rem);
  --text-3xl: clamp(1.5rem, 1.2rem + 1.5vw, 1.875rem);
  --text-4xl: clamp(1.8rem, 1.4rem + 2vw, 2.25rem);
  --text-5xl: clamp(2rem, 1.5rem + 2.5vw, 3rem);

  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;

  /* Border Radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(26, 35, 126, 0.04);
  --shadow-sm: 0 1px 3px rgba(26, 35, 126, 0.06), 0 1px 2px rgba(26, 35, 126, 0.04);
  --shadow-md: 0 4px 6px -1px rgba(26, 35, 126, 0.06), 0 2px 4px -2px rgba(26, 35, 126, 0.04);
  --shadow-lg: 0 10px 15px -3px rgba(26, 35, 126, 0.07), 0 4px 6px -4px rgba(26, 35, 126, 0.04);
  --shadow-xl: 0 20px 25px -5px rgba(26, 35, 126, 0.08), 0 8px 10px -6px rgba(26, 35, 126, 0.04);
  --shadow-card: 0 2px 8px rgba(26, 35, 126, 0.06), 0 0 1px rgba(26, 35, 126, 0.1);
  --shadow-card-hover: 0 12px 24px rgba(26, 35, 126, 0.1), 0 4px 8px rgba(255, 153, 51, 0.08);

  /* Transitions */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --duration-fast: 150ms;
  --duration-normal: 250ms;
  --duration-slow: 400ms;

  /* Layout */
  --max-width: 1280px;
  --header-height: 64px;
  --sidebar-width: 280px;
}

/* ═══════════════════════════════════════════════════
   RESET & BASE
   ═══════════════════════════════════════════════════ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overflow-x: clip;
  max-width: 100%;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--gray-800);
  background-color: var(--off-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
  max-width: 100vw;
  width: 100%;
  position: relative;
}

img, svg, video, canvas {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  cursor: pointer;
  font-family: inherit;
  border: none;
  background: none;
}

input, select, textarea {
  font-family: inherit;
  font-size: inherit;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.3;
  color: var(--navy);
}

/* ═══════════════════════════════════════════════════
   TRICOLOR ACCENT STRIPE (Top of page)
   ═══════════════════════════════════════════════════ */
.tricolor-stripe {
  height: 4px;
  background: linear-gradient(90deg, 
    var(--saffron) 0%, var(--saffron) 33.33%, 
    var(--white) 33.33%, var(--white) 66.66%, 
    #138808 66.66%, #138808 100%
  );
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1001;
}

/* ═══════════════════════════════════════════════════
   HEADER / NAVIGATION
   ═══════════════════════════════════════════════════ */
.site-header {
  position: fixed;
  top: 4px;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--gray-200);
  z-index: 1000;
  transition: box-shadow var(--duration-normal) var(--ease-out);
}

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

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-6);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-shrink: 0;
}

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

.logo-text {
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--navy);
  line-height: 1.2;
}

.logo-text span {
  color: var(--saffron);
}

/* Header Search */
.header-search {
  flex: 1;
  max-width: 480px;
  position: relative;
  transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1), transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.25s;
}

/* On Homepage: Hide header search initially so there is NO duplicate search bar on screen */
body.home-page .header-search {
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  pointer-events: none;
}

/* When scrolled down past hero search bar, smoothly reveal header search bar */
body.home-page.scrolled-past-hero .header-search {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.header-search-input {
  width: 100%;
  height: 40px;
  padding: 0 var(--space-4) 0 40px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-full);
  background: var(--gray-50);
  font-size: var(--text-sm);
  color: var(--gray-800);
  transition: all var(--duration-normal) var(--ease-out);
  outline: none;
}

.header-search-input:focus {
  border-color: var(--saffron);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(255, 153, 51, 0.12);
}

.header-search-input::placeholder {
  color: var(--gray-400);
}

.header-search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--gray-400);
  pointer-events: none;
}

/* Search Results Dropdown */
.search-results-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  right: 0;
  background: #ffffff;
  border: 1px solid rgba(203, 213, 225, 0.8);
  border-radius: 18px;
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.25), 0 0 0 1px rgba(0, 0, 0, 0.05);
  max-height: 400px;
  overflow-y: auto;
  display: none;
  z-index: 1000;
  text-align: left;
}

.search-results-dropdown::-webkit-scrollbar {
  width: 6px;
}
.search-results-dropdown::-webkit-scrollbar-track {
  background: transparent;
}
.search-results-dropdown::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}
.search-results-dropdown::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

.search-results-dropdown.active {
  display: block;
  animation: dropdownFadeIn 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.search-result-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  transition: all var(--duration-fast);
  cursor: pointer;
  border-bottom: 1px solid #f1f5f9;
  text-decoration: none;
  background: #ffffff;
}

.search-result-item:first-child {
  border-top-left-radius: 17px;
  border-top-right-radius: 17px;
}

.search-result-item:last-child {
  border-bottom: none;
  border-bottom-left-radius: 17px;
  border-bottom-right-radius: 17px;
}

.search-result-item:hover,
.search-result-item.active {
  background: #f8fafc;
  padding-left: 22px;
}

.search-result-item .result-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.search-result-item .result-name {
  font-weight: 700;
  font-size: 14px;
  color: var(--navy);
  margin-bottom: 2px;
}

.search-result-item .result-category {
  font-size: 11px;
  font-weight: 600;
  color: var(--saffron-dark);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.search-result-item .result-arrow {
  color: #94a3b8;
  font-size: 16px;
  transition: transform 0.15s ease, color 0.15s ease;
  padding-left: 8px;
}

.search-result-item:hover .result-arrow {
  transform: translateX(4px);
  color: var(--saffron-dark);
}

.search-no-results {
  padding: 24px;
  text-align: center;
  color: var(--gray-500);
  font-size: 14px;
}

/* Navigation */
.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  list-style: none;
}

.nav-links a {
  padding: var(--space-2) var(--space-3);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--gray-600);
  border-radius: var(--radius-sm);
  transition: all var(--duration-fast);
}

.nav-links a:hover {
  color: var(--saffron);
  background: rgba(255, 153, 51, 0.06);
}

.nav-links a.active {
  color: var(--saffron);
}

/* Mobile Menu Button */
.menu-toggle {
  display: none;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  color: var(--gray-700);
}

.menu-toggle:hover {
  background: var(--gray-100);
}

/* Mobile Navigation */
.mobile-nav {
  display: none;
  position: fixed;
  top: calc(var(--header-height) + 4px);
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--white);
  z-index: 999;
  overflow-y: auto;
  padding: var(--space-4);
}

.mobile-nav.active {
  display: block;
}

.mobile-nav-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.mobile-nav-links a {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--gray-700);
  border-radius: var(--radius-md);
  transition: all var(--duration-fast);
}

.mobile-nav-links a:hover {
  background: var(--cream);
  color: var(--saffron);
}

/* ═══════════════════════════════════════════════════
   HERO SECTION
   ═══════════════════════════════════════════════════ */
.hero {
  padding: calc(var(--header-height) + 4px + var(--space-16)) var(--space-6) var(--space-16);
  text-align: center;
  background: linear-gradient(180deg, var(--cream) 0%, var(--off-white) 100%);
  position: relative;
  overflow: visible;
  z-index: 20;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23FF9933' fill-opacity='0.03'%3E%3Cpath d='M30 30c0-5.523-4.477-10-10-10s-10 4.477-10 10 4.477 10 10 10 10-4.477 10-10zm0 0c0 5.523 4.477 10 10 10s10-4.477 10-10-4.477-10-10-10-10 4.477-10 10z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.6;
  pointer-events: none;
}

.hero-content {
  position: relative;
  max-width: 720px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-1) var(--space-4);
  background: rgba(255, 153, 51, 0.08);
  border: 1px solid rgba(255, 153, 51, 0.2);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--saffron-dark);
  margin-bottom: var(--space-6);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.hero-badge svg {
  width: 14px;
  height: 14px;
}

.hero h1 {
  font-size: var(--text-5xl);
  font-weight: 700;
  color: var(--navy);
  margin-bottom: var(--space-4);
  letter-spacing: -0.02em;
}

.hero h1 .highlight {
  color: var(--saffron);
  position: relative;
}

.hero h1 .highlight::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 0;
  right: 0;
  height: 6px;
  background: rgba(255, 153, 51, 0.2);
  border-radius: 3px;
}

.hero-subtitle {
  font-size: var(--text-lg);
  color: var(--gray-600);
  max-width: 560px;
  margin: 0 auto var(--space-8);
  line-height: 1.7;
}

/* Hero Search Bar */
.hero-search {
  position: relative;
  max-width: 580px;
  margin: 0 auto;
  z-index: 100;
}

.hero-search-input {
  width: 100%;
  height: 56px;
  padding: 0 56px 0 52px;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-full);
  background: var(--white);
  font-size: var(--text-base);
  color: var(--gray-800);
  box-shadow: var(--shadow-lg);
  transition: all var(--duration-normal) var(--ease-out);
  outline: none;
}

.hero-search-input:focus {
  border-color: var(--saffron);
  box-shadow: var(--shadow-xl), 0 0 0 4px rgba(255, 153, 51, 0.1);
}

.hero-search-input::placeholder {
  color: var(--gray-400);
}

.hero-search-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  color: var(--gray-400);
  pointer-events: none;
}

.hero-search-kbd {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: var(--text-xs);
  color: var(--gray-400);
  background: var(--gray-100);
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid var(--gray-200);
}

/* Stats Bar */
.hero-stats {
  display: flex;
  justify-content: center;
  gap: var(--space-10);
  margin-top: var(--space-8);
  flex-wrap: wrap;
}

.hero-stat {
  text-align: center;
}

.hero-stat-number {
  font-family: var(--font-heading);
  font-size: var(--text-3xl);
  font-weight: 700;
  color: var(--navy);
}

.hero-stat-label {
  font-size: var(--text-sm);
  color: var(--gray-500);
  margin-top: var(--space-1);
}

/* ═══════════════════════════════════════════════════
   TOOL CATEGORIES & GRID
   ═══════════════════════════════════════════════════ */
.section {
  padding: var(--space-16) var(--space-6);
  max-width: var(--max-width);
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: var(--space-10);
}

.section-header h2 {
  font-size: var(--text-3xl);
  margin-bottom: var(--space-3);
}

.section-header p {
  font-size: var(--text-lg);
  color: var(--gray-500);
  max-width: 480px;
  margin: 0 auto;
}

/* Category Tabs */
.category-tabs {
  display: flex;
  justify-content: center;
  gap: var(--space-2);
  margin-bottom: var(--space-8);
  flex-wrap: wrap;
}

.category-tab {
  padding: var(--space-2) var(--space-5);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--gray-600);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-full);
  background: var(--white);
  transition: all var(--duration-normal) var(--ease-out);
}

.category-tab:hover {
  border-color: var(--saffron-light);
  color: var(--saffron);
}

.category-tab.active {
  background: var(--saffron);
  border-color: var(--saffron);
  color: var(--white);
}

/* Tool Cards Grid */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--space-5);
}

.tool-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-3);
  transition: all var(--duration-slow) var(--ease-out);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  text-decoration: none;
}

.tool-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--saffron);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--duration-slow) var(--ease-out);
}

.tool-card:hover {
  border-color: var(--saffron-light);
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-4px);
}

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

.tool-card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}

.tool-card-icon.image-tools { background: rgba(59, 130, 246, 0.1); color: #3B82F6; }
.tool-card-icon.pdf-tools { background: rgba(239, 68, 68, 0.1); color: #EF4444; }
.tool-card-icon.calc-tools { background: rgba(16, 185, 129, 0.1); color: #10B981; }
.tool-card-icon.doc-tools { background: rgba(139, 92, 246, 0.1); color: #8B5CF6; }
.tool-card-icon.utility-tools { background: rgba(245, 158, 11, 0.1); color: #F59E0B; }
.tool-card-icon.exam-tools { background: rgba(236, 72, 153, 0.1); color: #EC4899; }

.tool-card h3 {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--navy);
}

.tool-card p {
  font-size: var(--text-sm);
  color: var(--gray-500);
  line-height: 1.5;
  flex: 1;
}

.tool-card-arrow {
  color: var(--gray-400);
  transition: all var(--duration-normal) var(--ease-out);
  align-self: flex-end;
}

.tool-card:hover .tool-card-arrow {
  color: var(--saffron);
  transform: translateX(4px);
}

.tool-card-badge {
  position: absolute;
  top: var(--space-3);
  right: var(--space-3);
  font-size: var(--text-xs);
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: var(--success-light);
  color: var(--success);
}

/* ═══════════════════════════════════════════════════
   FEATURES / WHY US SECTION
   ═══════════════════════════════════════════════════ */
.features-section {
  background: var(--navy);
  padding: var(--space-20) var(--space-6);
  position: relative;
  overflow: hidden;
}

.features-section::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(255, 153, 51, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.features-section .section-header h2 {
  color: var(--white);
}

.features-section .section-header p {
  color: rgba(255, 255, 255, 0.6);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-6);
  max-width: var(--max-width);
  margin: 0 auto;
}

.feature-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  transition: all var(--duration-slow) var(--ease-out);
}

.feature-card:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 153, 51, 0.3);
  transform: translateY(-2px);
}

.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: rgba(255, 153, 51, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-4);
  color: var(--saffron);
}

.feature-card h3 {
  color: var(--white);
  font-size: var(--text-lg);
  margin-bottom: var(--space-2);
}

.feature-card p {
  color: rgba(255, 255, 255, 0.5);
  font-size: var(--text-sm);
  line-height: 1.6;
}

/* ═══════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════ */
.site-footer {
  background: var(--gray-900);
  color: var(--gray-400);
  padding: var(--space-16) var(--space-6) var(--space-8);
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-10);
  margin-bottom: var(--space-12);
}

.footer-brand .logo-text {
  color: var(--white);
  font-size: var(--text-xl);
  margin-bottom: var(--space-3);
}

.footer-brand p {
  font-size: var(--text-sm);
  line-height: 1.7;
  color: var(--gray-500);
  max-width: 300px;
}

.footer-col h4 {
  color: var(--white);
  font-size: var(--text-sm);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--space-4);
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.footer-col a {
  font-size: var(--text-sm);
  color: var(--gray-500);
  transition: color var(--duration-fast);
}

.footer-col a:hover {
  color: var(--saffron);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: var(--space-6);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-4);
}

.footer-bottom p {
  font-size: var(--text-sm);
  color: var(--gray-600);
}

.footer-bottom-links {
  display: flex;
  gap: var(--space-6);
}

.footer-bottom-links a {
  font-size: var(--text-sm);
  color: var(--gray-600);
  transition: color var(--duration-fast);
}

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

/* Mandala decoration in footer */
.footer-mandala {
  position: absolute;
  right: -60px;
  bottom: -60px;
  width: 200px;
  height: 200px;
  opacity: 0.03;
  pointer-events: none;
}

/* ═══════════════════════════════════════════════════
   UTILITY CLASSES
   ═══════════════════════════════════════════════════ */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-6);
}

.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;
}

/* Buttons — High-End Resilient System */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: var(--space-2, 8px);
  padding: 10px 18px;
  font-family: var(--font-heading, inherit);
  font-size: var(--text-sm, 14px);
  font-weight: 600;
  line-height: 1.35;
  border-radius: var(--radius-md, 8px);
  transition: all var(--duration-normal, 0.2s) cubic-bezier(0.16, 1, 0.3, 1);
  white-space: normal; /* Never let button text overflow or clip */
  word-break: break-word;
  overflow-wrap: break-word;
  max-width: 100%;
  box-sizing: border-box;
  cursor: pointer;
  border: 1.5px solid transparent;
  outline: none;
  user-select: none;
  text-decoration: none;
}

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

.btn-nowrap {
  white-space: nowrap !important;
}

.btn-success {
  background: var(--success, #059669);
  color: #ffffff;
  border-color: transparent;
}
.btn-success:hover {
  background: #047857;
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.3);
  transform: translateY(-1px);
}

.btn-danger {
  background: #ef4444;
  color: #ffffff;
  border-color: transparent;
}
.btn-danger:hover {
  background: #dc2626;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
  transform: translateY(-1px);
}

.btn-warning {
  background: #f59e0b;
  color: #ffffff;
  border-color: transparent;
}
.btn-warning:hover {
  background: #d97706;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--saffron);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--saffron-dark);
  box-shadow: 0 4px 12px rgba(255, 153, 51, 0.3);
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: var(--navy);
  color: var(--white);
}

.btn-secondary:hover {
  background: var(--navy-light);
  box-shadow: 0 4px 12px rgba(26, 35, 126, 0.2);
}

.btn-outline {
  background: transparent;
  color: var(--navy);
  border: 1.5px solid var(--gray-300);
}

.btn-outline:hover {
  border-color: var(--saffron);
  color: var(--saffron);
  background: rgba(255, 153, 51, 0.04);
}

.btn-ghost {
  background: transparent;
  color: var(--gray-600);
}

.btn-ghost:hover {
  background: var(--gray-100);
  color: var(--gray-800);
}

.btn-lg {
  padding: var(--space-4) var(--space-8);
  font-size: var(--text-base);
  border-radius: var(--radius-lg);
}

.btn-sm {
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-xs);
}

.btn-icon {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: var(--radius-md);
}

/* Form Elements */
.form-group, .settings-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  width: 100%;
}

.form-label {
  display: block;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 2px;
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 0 var(--space-4);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-md);
  background: var(--white);
  font-size: var(--text-sm);
  font-family: inherit;
  color: var(--gray-800);
  transition: all var(--duration-normal) var(--ease-out);
  outline: none;
}

.form-input, .form-select {
  height: 44px;
}

.form-textarea {
  height: auto;
  padding: var(--space-3) var(--space-4);
  min-height: 110px;
  resize: vertical;
  line-height: 1.6;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--saffron);
  box-shadow: 0 0 0 3px rgba(255, 153, 51, 0.15);
}

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%239CA3AF' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

/* File Upload Area */
.upload-area {
  border: 2px dashed var(--gray-300);
  border-radius: var(--radius-lg);
  padding: var(--space-10);
  text-align: center;
  cursor: pointer;
  transition: all var(--duration-normal) var(--ease-out);
  background: var(--gray-50);
}

.upload-area:hover,
.upload-area.dragover {
  border-color: var(--saffron);
  background: rgba(255, 153, 51, 0.03);
}

.upload-area-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto var(--space-4);
  color: var(--gray-400);
}

.upload-area h3 {
  font-size: var(--text-base);
  margin-bottom: var(--space-2);
}

.upload-area p {
  font-size: var(--text-sm);
  color: var(--gray-500);
}

.upload-area .browse-link {
  color: var(--saffron);
  font-weight: 600;
  text-decoration: underline;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: var(--space-6);
  right: var(--space-6);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.toast {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xl);
  border-left: 4px solid var(--success);
  min-width: 280px;
  max-width: 400px;
  font-size: var(--text-sm);
  animation: slideInRight var(--duration-slow) var(--ease-out);
}

.toast.error { border-left-color: var(--error); }
.toast.warning { border-left-color: var(--warning); }
.toast.info { border-left-color: var(--info); }

/* Breadcrumb */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: var(--gray-500);
  padding: var(--space-4) 0;
}

.breadcrumb a {
  color: var(--gray-500);
  transition: color var(--duration-fast);
}

.breadcrumb a:hover {
  color: var(--saffron);
}

.breadcrumb .separator {
  color: var(--gray-300);
}

.breadcrumb .current {
  color: var(--navy);
  font-weight: 500;
}

/* Rangoli Divider */
.rangoli-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  padding: var(--space-2) 0;
  color: var(--gray-300);
}

.rangoli-divider::before,
.rangoli-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gray-200), transparent);
}

.rangoli-divider svg {
  width: 20px;
  height: 20px;
  color: var(--saffron);
  opacity: 0.5;
}

/* Back to Top */
.back-to-top {
  position: fixed;
  bottom: var(--space-6);
  right: var(--space-6);
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  background: var(--saffron);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  pointer-events: none;
  transition: all var(--duration-normal) var(--ease-out);
  z-index: 50;
}

.back-to-top.visible {
  opacity: 1;
  pointer-events: all;
}

.back-to-top:hover {
  background: var(--saffron-dark);
  transform: translateY(-2px);
}

/* ═══════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-8);
  }
}

@media (max-width: 768px) {
  :root {
    --header-height: 56px;
  }

  .header-search {
    display: none;
  }

  .nav-links {
    display: none;
  }

  .menu-toggle {
    display: flex;
  }

  .hero {
    padding: calc(var(--header-height) + 4px + var(--space-10)) var(--space-4) var(--space-10);
  }

  .hero-search-kbd {
    display: none;
  }

  .hero-stats {
    gap: var(--space-6);
  }

  .section {
    padding: var(--space-10) var(--space-4);
  }

  .tools-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: var(--space-4);
  }

  .tool-card {
    padding: var(--space-4);
  }

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

  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

  .toast-container {
    left: var(--space-4);
    right: var(--space-4);
    bottom: var(--space-4);
  }

  .toast {
    min-width: auto;
    max-width: none;
  }
}

@media (max-width: 480px) {
  .tools-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3);
  }

  .tool-card {
    padding: var(--space-3);
  }

  .tool-card-icon {
    width: 40px;
    height: 40px;
    font-size: 20px;
  }

  .tool-card h3 {
    font-size: var(--text-sm);
  }

  .tool-card p {
    display: none;
  }

  .hero-stats {
    flex-direction: column;
    gap: var(--space-3);
  }

  .category-tabs {
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: var(--space-2);
    -webkit-overflow-scrolling: touch;
  }

  .category-tab {
    flex-shrink: 0;
  }

  .btn {
    white-space: normal;
    text-align: center;
    max-width: 100%;
  }

  .btn-lg {
    padding: var(--space-3) var(--space-4);
    font-size: var(--text-sm);
  }
}

@media (max-width: 360px) {
  .tool-workspace {
    padding: var(--space-3) !important;
  }
  .tool-container {
    padding: 0 var(--space-2) !important;
  }
  .btn {
    padding: var(--space-2) var(--space-3);
    font-size: var(--text-xs);
  }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--gray-300);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--gray-400);
}

/* Selection */
::selection {
  background: rgba(255, 153, 51, 0.15);
  color: var(--navy);
}

/* ═══════════════════════════════════════════════════
   ANONYMOUS FEEDBACK & SUGGESTIONS STYLES
   ═══════════════════════════════════════════════════ */
.feedback-section {
  padding: var(--space-12) 0;
  background: linear-gradient(180deg, #f8fafc 0%, #eef2ff 100%);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.feedback-container {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 var(--space-4);
}

.feedback-card {
  background: #ffffff;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  box-shadow: 0 10px 30px rgba(26, 35, 126, 0.05);
}

.feedback-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  margin-bottom: var(--space-3);
}

.feedback-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.feedback-modal-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.feedback-modal-box {
  background: #ffffff;
  border-radius: var(--radius-xl);
  max-width: 580px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  padding: var(--space-6);
  transform: translateY(20px);
  transition: transform 0.25s ease;
}

.feedback-modal-backdrop.active .feedback-modal-box {
  transform: translateY(0);
}

.feedback-history-item {
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  margin-bottom: 8px;
  font-size: 13px;
}

/* Print */
@media print {
  .site-header, .site-footer, .tricolor-stripe, .back-to-top, .toast-container, .feedback-section, .feedback-modal-backdrop {
    display: none !important;
  }
  
  body {
    background: white;
    color: black;
  }
}

/* ═══════════════════════════════════════════════════════════
   DARK MODE — toggled via body.dark (theme button in header)
   ═══════════════════════════════════════════════════════════ */
body.dark {
  --white: #1B2436;
  --off-white: #0F1522;
  --cream: #141B2B;
  --gray-50: #0D1320;
  --gray-100: #16202F;
  --gray-200: #24324B;
  --gray-300: #35486E;
  --gray-400: #8E9CB5;
  --gray-500: #9FADC4;
  --gray-600: #B9C4D8;
  --gray-700: #D0D9E8;
  --gray-800: #E4EAF4;
  --gray-900: #F2F6FC;
  --navy: #A9B6FF;
  --navy-light: #C3CCFF;
  --success-light: rgba(5, 150, 105, 0.22);
  --error-light: rgba(220, 38, 38, 0.22);
  --warning-light: rgba(217, 119, 6, 0.22);
  --info-light: rgba(37, 99, 235, 0.25);
}

body,
.site-header,
.tool-card,
.tool-workspace,
.settings-panel,
.faq-question {
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* header */
body.dark .site-header {
  background: rgba(13, 19, 32, 0.93);
  border-bottom-color: #24324B;
}

body.dark .search-results-dropdown {
  background: #16202F;
  border-color: #24324B;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6);
}

body.dark .search-result-item:hover {
  background: #1D2A40;
}

/* footer & dark sections */
body.dark .site-footer,
body.dark .features-section {
  background: #0A0F1C;
}

/* buttons that must keep white text on colored backgrounds */
body.dark .btn-primary,
body.dark .back-to-top {
  color: #FFFFFF;
}

body.dark .btn-secondary {
  background: #3D51D9;
  color: #FFFFFF;
}

/* navy-background pills/badges → brighter indigo on dark */
body.dark .qr-tab-btn.active,
body.dark .qr-nav-pill.active,
body.dark .quick-tag-pill:hover,
body.dark .domain-ext-badge {
  background: #3D51D9;
  color: #FFFFFF;
}

body.dark ::selection {
  background: #3D51D9;
  color: #FFFFFF;
}

/* paper previews & platform cards must stay LIGHT (print/preview reality) */
body.dark .preview-panel,
body.dark .fb-card-preview,
body.dark .tw-card-preview {
  --white: #FFFFFF;
  --off-white: #FAFAFA;
  --cream: #FFF8F0;
  --gray-50: #F9FAFB;
  --gray-100: #F3F4F6;
  --gray-200: #E5E7EB;
  --gray-300: #D1D5DB;
  --gray-400: #9CA3AF;
  --gray-500: #6B7280;
  --gray-600: #4B5563;
  --gray-700: #374151;
  --gray-800: #1F2937;
  --gray-900: #111827;
  --navy: #1A237E;
  background: #FFFFFF;
  border-color: #35486E;
}

/* theme toggle button (injected in header by app.js) */
.theme-toggle {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1.5px solid var(--gray-200);
  background: var(--white);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: var(--space-2);
  color: var(--gray-700);
  flex-shrink: 0;
  transition: border-color 0.2s, color 0.2s, transform 0.2s;
  padding: 0;
}

.theme-toggle:hover {
  border-color: var(--saffron);
  color: var(--saffron);
}

.theme-toggle:active {
  transform: scale(0.92);
}

.theme-toggle svg {
  width: 19px;
  height: 19px;
}

.theme-toggle .icon-sun { display: none; }

body.dark .theme-toggle .icon-sun { display: block; }
body.dark .theme-toggle .icon-moon { display: none; }

@media (max-width: 768px) {
  .theme-toggle {
    width: 34px;
    height: 34px;
  }
}

/* dark mode: form controls */
body.dark .form-input,
body.dark .form-select,
body.dark .form-textarea {
  background: #0D1320;
  color: #E4EAF4;
}

body.dark .form-input::placeholder,
body.dark .form-textarea::placeholder {
  color: #8E9CB5;
}

/* ═══ DARK MODE round 2 — leftover light surfaces ═══ */
body.dark .feedback-card,
body.dark .feedback-modal-box {
  background: #1B2436;
  border-color: #24324B;
}
body.dark .feedback-badge {
  background: rgba(5, 150, 105, 0.18);
  color: #6EE7B7;
  border-color: rgba(5, 150, 105, 0.45);
}
body.dark .settings-group { background: #16202F; }
body.dark .result-stat {
  background: #16202F;
  border-color: #24324B;
}
body.dark .status-pill.pass {
  background: rgba(5, 150, 105, 0.22);
  color: #6EE7B7;
}
body.dark .status-pill.fail {
  background: rgba(220, 38, 38, 0.22);
  color: #FCA5A5;
}
/* inline-styled light boxes inside workspaces (result cards, toolbars) */
body.dark .tool-workspace div[style*="#fff"],
body.dark .tool-workspace div[style*="#ffffff"],
body.dark .tool-workspace div[style*="255, 255, 255"],
body.dark .tool-workspace div[style*="#f8fafc"],
body.dark .tool-workspace div[style*="#f0fdf4"],
body.dark .tool-workspace div[style*="#f1f5f9"],
body.dark .tool-workspace div[style*="#eff6ff"],
body.dark .tool-workspace div[style*="#fef3c7"] {
  background: #16202F !important;
  border-color: #24324B !important;
}
/* the inline green age-result box */
body.dark #resultBox {
  background: rgba(5, 150, 105, 0.12) !important;
  border-color: rgba(5, 150, 105, 0.5) !important;
}
/* resume A4 sheet is paper — keep white, reset vars inside */
body.dark .resume-a4-sheet {
  --white: #FFFFFF; --off-white: #FAFAFA; --cream: #FFF8F0;
  --gray-50: #F9FAFB; --gray-100: #F3F4F6; --gray-200: #E5E7EB;
  --gray-300: #D1D5DB; --gray-400: #9CA3AF; --gray-500: #6B7280;
  --gray-600: #4B5563; --gray-700: #374151; --gray-800: #1F2937;
  --gray-900: #111827; --navy: #1A237E;
  background: #FFFFFF;
}

body.dark .tool-workspace div[style*="background: white"],
body.dark .tool-workspace div[style*="background:white"],
body.dark .tool-workspace div[style*="background: #fff;"],
body.dark .tool-workspace div[style*="background: #ffffff;"],
body.dark .tool-workspace tr[style*="background: white"],
body.dark .tool-workspace tr[style*="background: #f8fafc"] {
  background: #16202F !important;
}

/* white inline bars anywhere (resume toolbar etc.), paper sheets protected below */
body.dark div[style*="background: white"],
body.dark div[style*="background: #fff"],
body.dark div[style*="background: #ffffff"] {
  background: #16202F !important;
}
/* paper previews keep their white inline surfaces */
body.dark .resume-a4-sheet div[style*="background: white"],
body.dark .resume-a4-sheet div[style*="background: #fff"],
body.dark .preview-panel div[style*="background: white"],
body.dark .bill-paper div[style*="background: white"] {
  background: #FFFFFF !important;
}

/* ═══ DARK MODE round 3 — domain cards, biodata paper, progress tracks ═══ */
body.dark .domain-result-card.is-taken {
  background: rgba(220, 38, 38, 0.14);
  border-color: rgba(220, 38, 38, 0.4);
}
body.dark .domain-result-card.is-available {
  background: rgba(5, 150, 105, 0.14);
  border-color: rgba(5, 150, 105, 0.4);
}
body.dark .domain-result-card.is-checking {
  background: #16202F;
  border-color: #24324B;
}
/* biodata sheet is paper like resume — keep white, reset vars inside */
body.dark .biodata-sheet {
  --white: #FFFFFF; --off-white: #FAFAFA; --cream: #FFF8F0;
  --gray-50: #F9FAFB; --gray-100: #F3F4F6; --gray-200: #E5E7EB;
  --gray-300: #D1D5DB; --gray-400: #9CA3AF; --gray-500: #6B7280;
  --gray-600: #4B5563; --gray-700: #374151; --gray-800: #1F2937;
  --gray-900: #111827; --navy: #1A237E;
  background: #FFFFFF;
}
/* light progress-bar tracks and misc inline light grays */
body.dark div[style*="background: #e2e8f0"],
body.dark div[style*="background:#e2e8f0"],
body.dark div[style*="background: #f1f5f9"],
body.dark div[style*="background: #e5e7eb"] {
  background: #24324B !important;
}


/* Prevent number inputs from capturing wheel when scrolling over forms */
input[type="number"] {
  -moz-appearance: textfield;
}
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
