/* Premium CSS Aesthetic */
.round-custom {
  border-radius: 16px;
}

.bg-soft-gray {
  background-color: #f8fafc;
}

.timeline-dot::before {
  content: '';
  position: absolute;
  left: -9px;
  top: 8px;
  width: 18px;
  height: 18px;
  background-color: #196ee6;
  border: 4px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 1px #cbd5e1;
}

/* Typography Enhancements */
.text-gradient {
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-image: linear-gradient(90deg, #196ee6, #0ea5e9);
}

.page-title,
.hero-title {
  font-size: 48px !important;
  line-height: 1.1 !important;
}

@media (max-width: 768px) {

  .page-title,
  .hero-title {
    font-size: 28px !important;
  }
}

#hero {
  position: relative !important;
  overflow: hidden !important;
  min-height: calc(100svh - 72px) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding-top: 90px !important;
  padding-bottom: 40px !important;
}

.hero-bg {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  z-index: 0 !important;
}

.hero-bg video,
.hero-bg img {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
}

.hero-overlay {
  position: absolute !important;
  inset: 0 !important;
  background: linear-gradient(to bottom, rgba(10,20,40,0.85) 0%, rgba(10,20,40,0.6) 40%, rgba(10,20,40,0.85) 100%) !important;
  backdrop-filter: blur(2px) !important;
  z-index: 1 !important;
}

.hero-content {
  position: relative !important;
  z-index: 2 !important;
  text-align: center !important;
  width: 100% !important;
}

@media (max-width: 768px) {
  #hero {
    min-height: calc(100svh - 72px) !important;
    padding-top: 110px !important;
    padding-bottom: 60px !important;
  }
}

.services-hero,
.insights-hero,
.contact-hero,
.case-study-hero {
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 100px !important;
  padding-bottom: 60px !important;
}

section {
  padding-top: 60px !important;
  padding-bottom: 80px !important;
}

#how-it-works {
  padding-bottom: 120px !important;
}

#continuous-learning {
  padding-bottom: 100px !important;
}

/* Premium Card Utilities */
.card-premium {
  border-radius: 16px;
  border: 1px solid #f1f5f9;
  background: #ffffff;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02), 0 2px 4px -1px rgba(0, 0, 0, 0.02);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.card-premium:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.05), 0 10px 10px -5px rgba(0, 0, 0, 0.02);
  border-color: #e2e8f0;
}

/* Button Systems */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: #196ee6;
  color: white;
  font-weight: 600;
  padding: 0.875rem 2rem;
  border-radius: 12px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 14px 0 rgba(25, 110, 230, 0.3);
}

.btn-primary:hover {
  background-color: #1557b0;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(25, 110, 230, 0.4);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: #ffffff;
  color: #334155;
  font-weight: 600;
  padding: 0.875rem 2rem;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.btn-secondary:hover {
  background-color: #f8fafc;
  color: #0f172a;
  border-color: #cbd5e1;
  transform: translateY(-2px);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.04);
}

.btn-dark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: #0f172a;
  color: white;
  font-weight: 600;
  padding: 0.875rem 2rem;
  border-radius: 12px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.btn-dark:hover {
  background-color: #1e293b;
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.2);
}

.nav-link {
  font-weight: 500;
  color: #475569;
  transition: color 0.2s ease;
}

.nav-link:hover {
  color: #196ee6;
}


/* Navbar styles */
.navbar-blur {
  background-color: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* --- MOBILE OVERFLOW FIXES --- */
@media (max-width: 768px) {
  body {
    overflow-x: hidden;
  }

  .container,
  section,
  .wrapper {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box;
    padding-left: 16px;
    padding-right: 16px;
  }
}


img,
video {
  max-width: 100%;
  height: auto;
}

/* --- HERO MOBILE FIXES --- */
.hero-avatar {
  display: block;
  margin-left: auto;
  margin-right: auto;
}

@media (max-width: 768px) {

  html,
  body {
    overflow-x: hidden !important;
    position: relative;
    width: 100%;
  }

  /* Hero Fixes are now global 100vh */

  #impact,
  #services,
  section+section {
    padding-top: 24px !important;
  }

  .hero-avatar {
    width: 180px !important;
    height: 180px !important;
    max-width: 100%;
  }

  #hero * {
    max-width: 100%;
    box-sizing: border-box;
  }

  /* Force single column layout & specific container gap */
  .grid,
  .cards-container,
  .features-grid,
  .tools-container,
  .wrapper {
    display: flex !important;
    flex-direction: column !important;
    gap: 16px !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  /* Section & Container Spacing & Width Fixes */
  section,
  .container,
  .wrapper {
    height: auto !important;
    min-height: auto !important;
    padding-bottom: 48px !important;
    padding-left: 16px !important;
    padding-right: 16px !important;
    margin: 0 !important;
    position: relative !important;
    z-index: 0 !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  section+section {
    margin-top: 0 !important;
  }

  /* Hero buttons specific spacing */
  .hero-buttons {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    margin-top: 24px !important;
    margin-bottom: 0 !important;
    position: relative !important;
  }

  /* Status Cards Fixes */
  .status-card {
    width: 100% !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
  }

  .status-card-container {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    align-items: stretch !important;
    width: 100% !important;
  }

  /* Typography Scaling & Text Wrap Fixes */
  h1,
  h2 {
    font-size: 28px !important;
    line-height: 1.2 !important;
    word-break: break-word !important;
  }

  h3,
  p,
  span,
  a {
    word-break: break-word !important;
    overflow-wrap: break-word !important;
    max-width: 100% !important;
  }

  /* Global Card Width & Container Fixes */
  .card,
  .status-card,
  .tool-card,
  .what-card,
  .feature-card,
  .service-card,
  .metric-card,
  .project-card-clean,
  .how-step-card,
  .project-card-split {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    margin-bottom: 0 !important;
    /* Managed by container gap */
    box-sizing: border-box !important;
    position: relative !important;
    z-index: 1 !important;
  }

  /* Mobile Menu Fixes */
  #mobile-menu {
    position: absolute !important;
    top: 72px !important;
    left: 0 !important;
    width: 100% !important;
    z-index: 9999 !important;
    background-color: #0f172a !important;
    /* slate-900 */
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
  }

  .hidden {
    display: none !important;
  }

  /* Footer Mobile Adaptation */
  footer {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    text-align: center !important;
    padding-left: 16px !important;
    padding-right: 16px !important;
  }

  footer * {
    word-break: break-word !important;
  }

  /* Services Page Specific Fix */
  body.services-page #services-hero {
    padding-top: 100px !important;
  }

  /* Media containment */
  img,
  video,
  iframe,
  canvas {
    max-width: 100% !important;
    height: auto !important;
  }

  /* Force min-width removal */
  * {
    min-width: unset !important;
  }

  /* Alignment for centered cards on mobile */
  .tool-card {
    padding: 16px !important;
    text-align: center !important;
  }

  .tool-card h3,
  .tool-card p {
    word-wrap: break-word !important;
    text-align: center !important;
  }

  .tool-card .flex {
    justify-content: center !important;
  }
}