/* ====================================
   KHAN SOURCING - MODERN CSS DESIGN SYSTEM
   ==================================== */

/* ============ CSS CUSTOM PROPERTIES ============ */
:root {
  /* Color Palette - Premium & Professional */
  --primary-color: #1e40af;
  --primary-dark: #1e3a8a;
  --primary-light: #3b82f6;
  --secondary-color: #0f766e;
  --secondary-dark: #115e59;
  --accent-color: #f59e0b;
  --accent-light: #fbbf24;
  
  /* Neutral Colors */
  --white: #ffffff;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  
  /* Typography */
  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-heading: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  
  /* Font Sizes - Fluid Typography */
  --text-xs: 0.75rem;    /* 12px */
  --text-sm: 0.875rem;   /* 14px */
  --text-base: 1rem;     /* 16px */
  --text-lg: 1.125rem;   /* 18px */
  --text-xl: 1.25rem;    /* 20px */
  --text-2xl: 1.5rem;    /* 24px */
  --text-3xl: 1.875rem;  /* 30px */
  --text-4xl: 2.25rem;   /* 36px */
  --text-5xl: 3rem;      /* 48px */
  
  /* Spacing System */
  --space-xs: 0.5rem;    /* 8px */
  --space-sm: 0.75rem;   /* 12px */
  --space-md: 1rem;      /* 16px */
  --space-lg: 1.5rem;    /* 24px */
  --space-xl: 2rem;      /* 32px */
  --space-2xl: 3rem;     /* 48px */
  --space-3xl: 4rem;     /* 64px */
  --space-4xl: 6rem;     /* 96px */
  
  /* Layout */
  --container-width: 1200px;
  --border-radius: 0.5rem;
  --border-radius-lg: 1rem;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  
  /* Transitions */
  --transition-fast: 150ms ease-in-out;
  --transition-base: 300ms ease-in-out;
  --transition-slow: 500ms ease-in-out;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-primary);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--gray-800);
  background-color: var(--white);
  overflow-x: hidden;
}

/* ============ TYPOGRAPHY ============ */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  color: var(--gray-900);
  margin-bottom: var(--space-md);
}

h1 { font-size: var(--text-5xl); }
h2 { font-size: var(--text-4xl); }
h3 { font-size: var(--text-3xl); }
h4 { font-size: var(--text-2xl); }
h5 { font-size: var(--text-xl); }
h6 { font-size: var(--text-lg); }

p {
  margin-bottom: var(--space-md);
  color: var(--gray-700);
}

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

a:hover {
  color: var(--primary-light);
}

ul, ol {
  margin-left: var(--space-lg);
  margin-bottom: var(--space-md);
}

li {
  margin-bottom: var(--space-xs);
  color: var(--gray-700);
}

/* ============ LAYOUT UTILITIES ============ */
.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 var(--space-xl);
}

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

.section-sm {
  padding: var(--space-3xl) 0;
}

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

.mb-0 { margin-bottom: 0; }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }
.mb-2xl { margin-bottom: var(--space-2xl); }

.mt-0 { margin-top: 0; }
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }

/* ============ HEADER & NAVIGATION ============ */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background-color: var(--white);
  box-shadow: var(--shadow-sm);
  z-index: 1000;
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md) 0;
}

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

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

.logo:hover {
  color: var(--primary-dark);
}

.nav-menu {
  display: flex;
  list-style: none;
  margin: 0;
  gap: var(--space-xl);
  align-items: center;
}

.nav-link {
  color: var(--gray-700);
  font-weight: 500;
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--border-radius);
  transition: all var(--transition-fast);
  position: relative;
}

.nav-link:hover {
  color: var(--primary-color);
  background-color: var(--gray-50);
}

.nav-link.active {
  color: var(--primary-color);
  font-weight: 600;
}

/* Mobile Menu Toggle */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-xs);
}

.menu-toggle span {
  display: block;
  width: 25px;
  height: 3px;
  background-color: var(--gray-700);
  border-radius: 3px;
  transition: all var(--transition-base);
}

/* Dropdown Menu */
.nav-item {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background-color: var(--white);
  box-shadow: var(--shadow-lg);
  border-radius: var(--border-radius);
  padding: var(--space-sm);
  min-width: 200px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all var(--transition-base);
  list-style: none;
  margin: 0;
}

.nav-item:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-link {
  display: block;
  padding: var(--space-sm) var(--space-md);
  color: var(--gray-700);
  border-radius: var(--border-radius);
  transition: all var(--transition-fast);
}

.dropdown-link:hover {
  background-color: var(--gray-50);
  color: var(--primary-color);
}

/* ============ HERO SECTION ============ */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(30, 64, 175, 0.95) 0%, rgba(15, 118, 110, 0.9) 100%),
              url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 800"><rect fill="%23e5e7eb" width="1200" height="800"/></svg>');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  color: var(--white);
  text-align: center;
  padding: var(--space-4xl) 0;
  position: relative;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.3) 100%);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 900px;
  margin: 0 auto;
}

.hero h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  color: var(--white);
  margin-bottom: var(--space-lg);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.hero p {
  font-size: var(--text-xl);
  color: rgba(255, 255, 255, 0.95);
  margin-bottom: var(--space-2xl);
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

/* ============ BUTTONS ============ */
.btn {
  display: inline-block;
  padding: var(--space-md) var(--space-2xl);
  font-family: var(--font-heading);
  font-size: var(--text-base);
  font-weight: 600;
  text-align: center;
  border-radius: var(--border-radius);
  border: none;
  cursor: pointer;
  transition: all var(--transition-base);
  text-decoration: none;
  line-height: 1;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  color: var(--white);
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-xl);
  color: var(--white);
}

.btn-secondary {
  background-color: var(--white);
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
  background-color: var(--primary-color);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-accent {
  background: linear-gradient(135deg, var(--accent-color) 0%, var(--accent-light) 100%);
  color: var(--white);
  box-shadow: var(--shadow-md);
}

.btn-accent:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-xl);
  color: var(--white);
}

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

.btn-group {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
  justify-content: center;
}

/* ============ CARDS ============ */
.card {
  background-color: var(--white);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: all var(--transition-base);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-xl);
}

.card-image {
  width: 100%;
  height: 250px;
  object-fit: cover;
  background-color: var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-400);
  font-size: var(--text-sm);
}

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

.card-content {
  padding: var(--space-xl);
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.card-title {
  font-size: var(--text-2xl);
  margin-bottom: var(--space-md);
  color: var(--gray-900);
}

.card-text {
  color: var(--gray-600);
  margin-bottom: var(--space-lg);
  flex-grow: 1;
}

.card-link {
  color: var(--primary-color);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  margin-top: auto;
}

.card-link:hover {
  gap: var(--space-sm);
}

/* ============ GRID LAYOUTS ============ */
.grid {
  display: grid;
  gap: var(--space-xl);
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.grid-4 {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

/* ============ STATS SECTION ============ */
.stats {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--secondary-dark) 100%);
  color: var(--white);
  padding: var(--space-3xl) 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-2xl);
  text-align: center;
}

.stat-item {
  padding: var(--space-lg);
}

.stat-number {
  font-size: var(--text-5xl);
  font-weight: 700;
  color: var(--accent-light);
  margin-bottom: var(--space-sm);
  font-family: var(--font-heading);
}

.stat-label {
  font-size: var(--text-lg);
  color: rgba(255, 255, 255, 0.9);
}

/* ============ TESTIMONIALS ============ */
.testimonial {
  background-color: var(--gray-50);
  padding: var(--space-2xl);
  border-radius: var(--border-radius-lg);
  border-left: 4px solid var(--primary-color);
  margin-bottom: var(--space-xl);
}

.testimonial-text {
  font-size: var(--text-lg);
  font-style: italic;
  color: var(--gray-700);
  margin-bottom: var(--space-lg);
  line-height: 1.8;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.testimonial-name {
  font-weight: 600;
  color: var(--gray-900);
  margin-bottom: var(--space-xs);
}

.testimonial-company {
  font-size: var(--text-sm);
  color: var(--gray-600);
}

/* ============ BADGES & TAGS ============ */
.badge {
  display: inline-block;
  padding: var(--space-xs) var(--space-md);
  background-color: var(--primary-color);
  color: var(--white);
  border-radius: 999px;
  font-size: var(--text-sm);
  font-weight: 600;
}

.badge-success {
  background-color: var(--secondary-color);
}

.badge-warning {
  background-color: var(--accent-color);
}

/* ============ FORMS ============ */
.form-group {
  margin-bottom: var(--space-lg);
}

.form-label {
  display: block;
  margin-bottom: var(--space-sm);
  font-weight: 600;
  color: var(--gray-800);
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: var(--space-md);
  border: 2px solid var(--gray-300);
  border-radius: var(--border-radius);
  font-family: var(--font-primary);
  font-size: var(--text-base);
  transition: all var(--transition-fast);
  background-color: var(--white);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
}

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

.form-required {
  color: #dc2626;
  margin-left: 2px;
}

/* ============ PAGE HEADER ============ */
.page-header {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: var(--white);
  padding: var(--space-4xl) 0 var(--space-3xl);
  margin-top: 80px;
  text-align: center;
}

.page-header h1 {
  color: var(--white);
  font-size: var(--text-5xl);
  margin-bottom: var(--space-md);
}

.page-header p {
  color: rgba(255, 255, 255, 0.9);
  font-size: var(--text-xl);
  max-width: 700px;
  margin: 0 auto;
}

/* ============ FOOTER ============ */
.footer {
  background-color: var(--gray-900);
  color: var(--gray-300);
  padding: var(--space-4xl) 0 var(--space-lg);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-3xl);
  margin-bottom: var(--space-3xl);
}

.footer-section h3 {
  color: var(--white);
  font-size: var(--text-xl);
  margin-bottom: var(--space-lg);
}

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

.footer-links li {
  margin-bottom: var(--space-sm);
}

.footer-links a {
  color: var(--gray-400);
  transition: color var(--transition-fast);
}

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

.footer-bottom {
  border-top: 1px solid var(--gray-800);
  padding-top: var(--space-lg);
  text-align: center;
  color: var(--gray-500);
  font-size: var(--text-sm);
}

.social-links {
  display: flex;
  gap: var(--space-md);
  margin-top: var(--space-md);
}

.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background-color: var(--gray-800);
  color: var(--gray-400);
  border-radius: 50%;
  transition: all var(--transition-fast);
}

.social-link:hover {
  background-color: var(--primary-color);
  color: var(--white);
  transform: translateY(-3px);
}

/* ============ CONTACT INFO CARDS ============ */
.contact-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-xl);
  margin-bottom: var(--space-3xl);
}

.contact-card {
  background-color: var(--gray-50);
  padding: var(--space-xl);
  border-radius: var(--border-radius-lg);
  text-align: center;
  border-top: 4px solid var(--primary-color);
}

.contact-icon {
  font-size: var(--text-4xl);
  color: var(--primary-color);
  margin-bottom: var(--space-md);
}

.contact-card h3 {
  font-size: var(--text-xl);
  margin-bottom: var(--space-sm);
}

.contact-card a {
  color: var(--gray-700);
  word-break: break-all;
}

.contact-card a:hover {
  color: var(--primary-color);
}

/* ============ FAQ SECTION ============ */
.faq-item {
  background-color: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--border-radius);
  padding: var(--space-xl);
  margin-bottom: var(--space-lg);
}

.faq-question {
  font-size: var(--text-xl);
  font-weight: 600;
  color: var(--gray-900);
  margin-bottom: var(--space-md);
}

.faq-answer {
  color: var(--gray-700);
  line-height: 1.8;
}

/* ============ ANIMATIONS ============ */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 0.6s ease-out forwards;
}

.fade-in-delay {
  animation: fadeIn 0.6s ease-out 0.3s forwards;
  opacity: 0;
}

/* ============ RESPONSIVE DESIGN ============ */

/* Large Tablets and Small Desktops */
@media (max-width: 1024px) {
  :root {
    --text-5xl: 2.5rem;
    --text-4xl: 2rem;
  }
  
  .container {
    padding: 0 var(--space-lg);
  }
  
  .section {
    padding: var(--space-3xl) 0;
  }
}

/* Tablets */
@media (max-width: 768px) {
  :root {
    --text-5xl: 2rem;
    --text-4xl: 1.75rem;
    --text-3xl: 1.5rem;
  }
  
  .navbar {
    flex-wrap: wrap;
  }
  
  .menu-toggle {
    display: flex;
  }
  
  .nav-menu {
    display: none;
    width: 100%;
    flex-direction: column;
    gap: 0;
    margin-top: var(--space-md);
    background-color: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    padding: var(--space-md);
  }
  
  .nav-menu.active {
    display: flex;
  }
  
  .nav-link {
    width: 100%;
    padding: var(--space-md);
  }
  
  .dropdown-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    padding-left: var(--space-lg);
    margin-top: var(--space-sm);
  }
  
  .hero {
    min-height: 80vh;
    padding: var(--space-3xl) 0;
  }
  
  .btn-group {
    flex-direction: column;
    align-items: stretch;
  }
  
  .btn {
    width: 100%;
  }
  
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }
  
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-lg);
  }
}

/* Mobile Phones */
@media (max-width: 480px) {
  :root {
    --text-5xl: 1.75rem;
    --text-4xl: 1.5rem;
    --text-3xl: 1.25rem;
  }
  
  .container {
    padding: 0 var(--space-md);
  }
  
  .section {
    padding: var(--space-2xl) 0;
  }
  
  h1 { font-size: var(--text-4xl); }
  h2 { font-size: var(--text-3xl); }
  h3 { font-size: var(--text-2xl); }
  
  .hero h1 {
    font-size: clamp(1.75rem, 8vw, 2.5rem);
  }
  
  .hero p {
    font-size: var(--text-base);
  }
  
  .btn {
    padding: var(--space-sm) var(--space-lg);
  }
  
  .btn-large {
    padding: var(--space-md) var(--space-xl);
    font-size: var(--text-base);
  }
  
  .stats-grid {
    grid-template-columns: 1fr;
  }
  
  .stat-number {
    font-size: var(--text-4xl);
  }
  
  .card-image {
    height: 200px;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--space-2xl);
  }
}

/* Print Styles */
@media print {
  .header,
  .footer,
  .btn,
  .nav-menu {
    display: none;
  }
  
  body {
    font-size: 12pt;
    color: #000;
  }
  
  .container {
    max-width: 100%;
    padding: 0;
  }
}
