/* Kojo Analytics - Business Website Styles */
:root {
  --primary-color: #1e40af;
  --secondary-color: #1e3a8a;
  --accent-color: #f59e0b;
  --success-color: #059669;
  --text-dark: #111827;
  --text-light: #4b5563;
  --bg-light: #f9fafb;
  --bg-card: #ffffff;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --border-radius: 0.75rem;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.6;
  color: var(--text-dark);
  background-color: var(--bg-light);
  padding-top: 76px; /* Account for fixed navbar */
}

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

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 1rem;
}

.display-4 {
  font-weight: 700;
  color: white;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Navigation */
.navbar {
  backdrop-filter: blur(10px);
  background-color: rgba(255, 255, 255, 0.98) !important;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-sm);
}

.navbar.scrolled {
  background-color: rgba(255, 255, 255, 0.99) !important;
  box-shadow: var(--shadow-md);
}

.navbar-brand {
  font-size: 1.5rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  color: var(--text-dark) !important;
}

.logo-img {
  width: 80px;
  height: 80px;
  object-fit: contain;
  background: white;
  padding: 5px;
  border-radius: 8px;
}

.nav-link {
  font-weight: 500;
  transition: color 0.3s ease;
  position: relative;
  color: var(--text-dark) !important;
}

.nav-link:hover {
  color: var(--primary-color) !important;
}

.nav-link::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0;
  left: 50%;
  background-color: var(--primary-color);
  transition: all 0.3s ease;
}

.nav-link:hover::after {
  width: 100%;
  left: 0;
}

/* Hero Section */
.hero-section {
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 50%, #3b82f6 100%);
  color: white;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><polygon fill="rgba(255,255,255,0.1)" points="0,0 1000,300 1000,1000 0,700"/></svg>');
  background-size: cover;
}

.hero-content {
  position: relative;
  z-index: 2;
  animation: fadeInUp 1s ease-out;
}

.hero-logo {
  width: 270px;
  height: 270px;
  border-radius: 50%;
  border: 4px solid rgba(255, 255, 255, 0.2);
  box-shadow: var(--shadow-lg);
  object-fit: contain;
  background: white;
  padding: 30px;
}

.hero-buttons .btn {
  padding: 0.75rem 2rem;
  font-weight: 600;
  border-radius: 50px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.hero-section .text-primary {
  color: #e0e7ff !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.hero-section .lead {
  color: #f1f5f9;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.hero-buttons .btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* Sections */
.section {
  padding: 5rem 0;
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  position: relative;
  color: var(--text-dark);
}

.section-title::after {
  content: '';
  width: 80px;
  height: 4px;
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 2px;
}

.section-subtitle {
  font-size: 1.2rem;
  color: var(--text-light);
  max-width: 600px;
  margin: 0 auto;
  font-weight: 500;
}

/* Cards */
.card {
  border: none;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-md);
  transition: all 0.3s ease;
  overflow: hidden;
  background: var(--bg-card);
  height: 100%;
}

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

.card-header {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  border: none;
  padding: 1.5rem;
}

.card-body {
  padding: 2rem;
}

.card-title {
  font-weight: 600;
  margin-bottom: 1rem;
}

.card-text {
  color: var(--text-light);
  margin-bottom: 1.5rem;
  line-height: 1.6;
  font-weight: 400;
}

/* Service Cards */
.service-card {
  text-align: center;
  padding: 2rem;
}

.service-icon {
  font-size: 3rem;
  color: var(--primary-color);
  margin-bottom: 1.5rem;
}

.service-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text-dark);
}

.service-description {
  color: var(--text-light);
  margin-bottom: 1.5rem;
  line-height: 1.6;
  font-weight: 400;
}

/* Case Study Cards */
.case-study-card {
  border-left: 4px solid var(--primary-color);
}

.metric-highlight {
  background: linear-gradient(135deg, var(--success-color), #059669);
  color: white;
  padding: 1rem;
  border-radius: var(--border-radius);
  text-align: center;
  margin: 1rem 0;
}

.metric-number {
  font-size: 2.5rem;
  font-weight: 700;
  display: block;
}

.metric-label {
  font-size: 1rem;
  opacity: 0.9;
}

/* AI Solutions Section */
.ai-solution-card {
  background: linear-gradient(135deg, #f8fafc, #e2e8f0);
  border: 2px solid var(--primary-color);
}

.ai-icon {
  color: var(--accent-color);
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

/* Skill Pills */
.skill-pill {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 25px;
  font-weight: 500;
  display: inline-block;
  margin: 0.25rem;
  transition: all 0.3s ease;
}

.skill-pill:hover {
  transform: scale(1.05);
  box-shadow: var(--shadow-md);
}

/* Stats */
.stats-card {
  text-align: center;
  padding: 2rem;
  border-radius: var(--border-radius);
  background: var(--bg-card);
  box-shadow: var(--shadow-md);
  transition: all 0.3s ease;
  /* Keep words intact and avoid awkward mid-word breaks */
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
}

.stats-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.stats-number {
  /* Scale responsively and avoid overflow on narrow cards */
  font-size: clamp(1.5rem, 3vw + 0.5rem, 2.5rem);
  font-weight: 700;
  color: var(--primary-color);
  display: block;
}

.stats-label {
  color: var(--text-light);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: clamp(0.7rem, 1.2vw + 0.4rem, 0.85rem);
  white-space: normal;
}

/* Buttons */
.btn {
  border-radius: 0.5rem;
  font-weight: 500;
  transition: all 0.3s ease;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  border: none;
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-outline-primary {
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.btn-outline-primary:hover {
  background: var(--primary-color);
  border-color: var(--primary-color);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

/* Contact Form */
.contact-form {
  background: var(--bg-card);
  padding: 2rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-md);
}

.form-control {
  border-radius: 0.5rem;
  border: 2px solid #e5e7eb;
  padding: 0.75rem 1rem;
  transition: all 0.3s ease;
}

.form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.25);
}

/* Social Links */
.social-links a {
  display: inline-block;
  font-size: 1.5rem;
  transition: all 0.3s ease;
  margin: 0 0.5rem;
}

.social-links a:hover {
  transform: translateY(-2px);
  color: var(--primary-color) !important;
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-up {
  animation: fadeInUp 0.6s ease-out;
}

/* Responsive Design */
@media (max-width: 768px) {
  .hero-section {
    padding: 2rem 0;
  }
  
  .display-4 {
    font-size: 2.5rem;
  }
  
  .section {
    padding: 3rem 0;
  }
  
  .section-title {
    font-size: 2rem;
  }
  
  .hero-logo {
    width: 210px;
    height: 210px;
    padding: 25px;
  }
  
  .hero-buttons .btn {
    margin-bottom: 1rem;
    width: 100%;
  }
  
  .stats-number {
    font-size: 2rem;
  }
  
  .service-icon {
    font-size: 2rem;
  }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-light);
}

::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--secondary-color);
}

/* CTA Enhancements */
.hero-buttons .btn {
  margin-bottom: 0.5rem;
}

.hero-buttons .btn:last-child {
  margin-bottom: 0;
}

/* Grant Types Cards */
.grant-type-card {
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.grant-type-card:hover {
  border-color: var(--primary-color);
  transform: translateY(-5px);
}

/* Why Choose Cards */
.why-choose-card {
  border-left: 4px solid var(--primary-color);
  transition: all 0.3s ease;
}

.why-choose-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

/* CTA Cards */
.cta-card {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  border: none;
  box-shadow: var(--shadow-lg);
}

.cta-card .card-title {
  color: white !important;
  font-weight: 800;
  font-size: 1.8rem;
  text-shadow: 0 3px 6px rgba(0, 0, 0, 0.4);
  letter-spacing: -0.025em;
}

.cta-card .card-text {
  color: #f1f5f9 !important;
  font-weight: 600;
  font-size: 1.1rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  line-height: 1.5;
}

.cta-card .btn-light {
  background: white;
  color: var(--primary-color);
  border: none;
  font-weight: 600;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.cta-card .btn-light:hover {
  background: #f8fafc;
  color: var(--secondary-color);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.cta-card .btn-outline-light {
  border: 2px solid white;
  color: white;
  font-weight: 600;
  background: transparent;
}

.cta-card .btn-outline-light:hover {
  background: white;
  color: var(--primary-color);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Contact Form Enhancements */
.contact-form {
  background: var(--bg-card);
  padding: 3rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-lg);
  border: 1px solid #e5e7eb;
}

/* Jotform embed */
.jotform-embed iframe {
  width: 1px;
  min-width: 100%;
  height: 900px; /* reasonable default; Jotform script will auto-resize */
  border: 0;
  background: transparent;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
}

.form-label {
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.25);
}

/* Alert Enhancements */
.alert {
  border-radius: var(--border-radius);
  border: none;
  box-shadow: var(--shadow-sm);
}

.alert-info {
  background: linear-gradient(135deg, #dbeafe, #bfdbfe);
  color: #1e40af;
}

/* Badge Enhancements */
.badge {
  font-size: 0.875rem;
  padding: 0.5rem 1rem;
  border-radius: 25px;
}

/* Gradient Backgrounds */
.bg-gradient {
  background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%) !important;
  box-shadow: var(--shadow-lg);
}

.bg-gradient .card-title {
  color: white !important;
  font-weight: 800;
  font-size: 2rem;
  text-shadow: 0 3px 6px rgba(0, 0, 0, 0.4);
  letter-spacing: -0.025em;
}

.bg-gradient .card-text {
  color: #f1f5f9 !important;
  font-weight: 600;
  font-size: 1.1rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  line-height: 1.5;
}

.bg-gradient .btn-light {
  background: white;
  color: var(--primary-color);
  border: none;
  font-weight: 600;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.bg-gradient .btn-light:hover {
  background: #f8fafc;
  color: var(--secondary-color);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.bg-gradient .btn-outline-light {
  border: 2px solid white;
  color: white;
  font-weight: 600;
  background: transparent;
}

.bg-gradient .btn-outline-light:hover {
  background: white;
  color: var(--primary-color);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* High-contrast CTA card when using Bootstrap's bg-primary */
.card.bg-primary {
  background: linear-gradient(135deg, #0b3bbf 0%, #2563eb 60%, #3b82f6 100%) !important;
  color: #ffffff;
  border: none;
}

.card.bg-primary .card-title,
.card.bg-primary .card-text {
  color: #ffffff !important;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.25);
}

.card.bg-primary .btn-light {
  background: #ffffff;
  color: var(--primary-color);
  border: none;
  font-weight: 600;
}

.card.bg-primary .btn-light:hover {
  background: #f8fafc;
  color: var(--secondary-color);
}

.card.bg-primary .btn-outline-light {
  border: 2px solid #ffffff;
  color: #ffffff;
  font-weight: 600;
  background: transparent;
}

.card.bg-primary .btn-outline-light:hover {
  background: #ffffff;
  color: var(--primary-color);
}

/* Responsive CTA Buttons */
@media (max-width: 768px) {
  .hero-buttons .btn {
    width: 100%;
    margin-bottom: 1rem;
  }
  
  .d-flex.gap-3 {
    flex-direction: column;
    align-items: center;
  }
  
  .d-flex.gap-3 .btn {
    width: 100%;
    max-width: 300px;
  }
  
  .contact-form {
    padding: 2rem 1rem;
  }
}

/* Print Styles */
@media print {
  .navbar,
  .hero-section,
  footer {
    display: none;
  }
  
  body {
    padding-top: 0;
  }
  
  .section {
    padding: 1rem 0;
  }
}
