html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
  background: #111 !important;
  color: #fff;
}

/* Black & White Theme for All Pages */
body, html {
  background: #000 !important;
  color: #fff !important;
}

/* Navbar */
.navbar, .navbar-light, .navbar-brand, .navbar-nav .nav-link, .navbar-toggler, .navbar-collapse {
  background: #000 !important;
  color: #fff !important;
  border-color: #444 !important;
}
.navbar .nav-link, .navbar .nav-link.text-dark, .navbar .navbar-brand {
  color: #fff !important;
}

/* Footer */
footer, .footer, .border-top {
  background: #000 !important;
  color: #fff !important;
  border-color: #444 !important;
}

/* Cards & Sections */
.ai-section, .ai-about, .ai-services .service-card, .ai-team .team-card {
  background: #111 !important;
  color: #fff !important;
  box-shadow: none !important;
  border: 1px solid #222 !important;
}

/* Forms */
.form-control, .form-floating > .form-control, .form-floating > .form-control-plaintext {
  background: #111 !important;
  color: #fff !important;
  border: 1px solid #444 !important;
}

/* Buttons */
.btn, .btn-primary, .contact-form .btn-primary, .nav-pills .nav-link.active, .nav-pills .show > .nav-link {
  background: #111 !important;
  color: #fff !important;
  border-color: #fff !important;
}
.btn:hover, .btn-primary:hover {
  background: #222 !important;
  color: #fff !important;
}

/* Links */
a, a:visited, a.navbar-brand, .nav-link {
  color: #fff !important;
}
a:hover, .nav-link:hover {
  color: #ccc !important;
}

/* Remove colored borders and backgrounds */
.border-top, .border-bottom, .form-control, .form-floating > .form-control, .form-floating > .form-control-plaintext {
  border-color: #444 !important;
}

/* Remove colored box-shadows */
.box-shadow, .ai-section, .ai-about, .ai-services .service-card, .ai-team .team-card {
  box-shadow: none !important;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

/* Modern AI Company Styles */
.ai-section {
    padding: 3rem 0 2rem 0;
}
.ai-about {
    background: transparent !important;
    color: #fff !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    margin-bottom: 2rem;
    border: none !important;
}
.ai-services .service-card {
    background: #fff;
    border-radius: 1rem;
    box-shadow: 0 2px 16px 0 rgba(0,0,0,0.06);
    padding: 2rem 1.5rem;
    margin-bottom: 2rem;
    transition: transform 0.2s, box-shadow 0.2s;
}
.ai-services .service-card:hover {
    transform: translateY(-6px) scale(1.03);
    box-shadow: 0 6px 32px 0 rgba(0,0,0,0.10);
}
.ai-team .team-card {
    background: #f8fafc;
    border-radius: 1rem;
    box-shadow: 0 2px 12px 0 rgba(0,0,0,0.04);
    padding: 1.5rem 1rem;
    text-align: center;
    margin-bottom: 2rem;
}
.ai-team .team-card img {
    object-fit: cover;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 3px solid #2196f3;
    background: #111;
    /* Default position for most images */
    object-position: center top;
}

/* Adjust object-position for specific team members to avoid head clipping */
.ai-team .team-card img[src*="Ruoming.jpg"] {
    object-position: center 20%;
}
.ai-team .team-card img[src*="MyThai.png"] {
    object-position: center 18%;
}
.contact-form .form-control {
    border-radius: 0.5rem;
    box-shadow: none;
    border: 1px solid #e0e7ef;
}
.contact-form .btn-primary {
    background: #111 !important;
    color: #fff !important;
    border-color: #fff !important;
    border-radius: 0.5rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}
.contact-form .btn-primary:hover {
    background: #fff;
    color: #111;
}

/* Hero Title Gradient */
.hero-title {
  font-size: 4rem;
  font-weight: 300;
  letter-spacing: -2px;
  line-height: 1.1;
  color: #fff;
  margin-bottom: 2rem;
}
.gradient-text {
  background: linear-gradient(90deg, #8b8bff 30%, #e0aaff 70%, #ffe29a 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-fill-color: transparent;
}
.slogan-title {
  font-size: 2.2rem;
  font-weight: 300;
  color: #fff;
  margin-bottom: 2.5rem;
  line-height: 1.2;
}

/* Slogan as Large Hero Text */
.slogan-hero {
  font-size: 4.8rem;
  font-weight: 300;
  line-height: 1.1;
  color: #fff;
  margin: 3.5rem 0 2.5rem 0;
  letter-spacing: -1px;
  text-align: center;
  display: block;
  width: 100%;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}
.slogan-hero .slogan-inline {
  display: inline-block;
  white-space: nowrap;
}
.slogan-hero .safeguarding {
  display: inline-block;
  vertical-align: middle;
}
.slogan-hero .rotating-words {
  display: inline-block;
  position: relative;
  vertical-align: middle;
  min-width: 7.5ch;
  height: 1em;
  overflow: hidden;
  white-space: nowrap;
  margin-left: 0.3em;
}
.slogan-hero .rotating-words-inner {
  display: flex;
  flex-direction: column;
  transition: transform 0.9s cubic-bezier(0.77,0,0.175,1);
}
.slogan-hero .rotating-words span {
  height: 1em;
  line-height: 1em;
  display: block;
  background: linear-gradient(90deg, #8b8bff 30%, #e0aaff 70%, #ffe29a 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-align: left;
  white-space: nowrap;
  font-size: inherit;
}
.trusted-ai {
  font-size: 4.8rem;
  font-weight: 300;
  margin-top: 0.7rem;
  text-align: center;
  letter-spacing: 0.5px;
}
@media (max-width: 600px) {
  .hero-title { font-size: 2.2rem; }
  .slogan-title { font-size: 1.2rem; }
  .slogan-hero { font-size: 2.25rem; max-width: 100%; }
  .slogan-hero .rotating-words { min-width: 5ch; }
  .trusted-ai { font-size: 2.25rem; }
}

/* Make the centered statement 25% smaller */
.ai-centered-statement {
  font-size: 1.5rem !important;
}

.team-card.expanded {
  box-shadow: 0 8px 32px rgba(80,40,180,0.18), 0 2px 12px rgba(0,0,0,0.13);
  background: linear-gradient(120deg, #23232b 60%, #2d1e3a 100%);
  transform: scale(1.045); /* Only scale, no translateY */
  z-index: 2;
}

.ai-section.ai-team h2.mt-5 {
  margin-bottom: 2.2rem;
}

.gradient-highlight {
  background: linear-gradient(90deg, #e3f74f 10%, #ca8de6 60%, #4fc3f7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-fill-color: transparent;
  font-weight: 700;
  letter-spacing: 0.01em;
  filter: drop-shadow(0 1px 6px #0006);
}

@media (max-width: 600px) {
  .slogan-hero {
    font-size: 1.5rem !important;
  }
  .trusted-ai {
    font-size: 1.5rem !important;
  }
}

/* Responsive fix for team cards */
@media (max-width: 768px) {
  .team-card {
    min-width: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
  .row.justify-content-center {
    flex-direction: column !important;
    align-items: stretch !important;
  }
  .col-12.d-flex.justify-content-center.mb-4 {
    padding-left: 0 !important;
    padding-right: 0 !important;
    display: block !important;
  }
}

/* --- TEAM CARD RESPONSIVE FIX --- */
@media (max-width: 992px) {
  .ai-section.ai-team .row.justify-content-center {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 0 !important;
  }
  .ai-section.ai-team .col-md-3.col-12.d-flex.justify-content-center.mb-4 {
    width: 100% !important;
    max-width: 100% !important;
    flex: 0 0 100% !important;
    display: flex !important;
    justify-content: center !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin: 0 !important;
  }
  .ai-section.ai-team .team-card {
    min-width: 0 !important;
    max-width: 420px !important;
    width: 100% !important;
    margin: 0 0 1.5rem 0 !important;
  }
}

@media (max-width: 600px) {
  .ai-section.ai-team .team-card {
    max-width: 98vw !important;
    padding: 1.2rem 0.5rem 1.2rem 0.5rem !important;
  }
}

/* Remove Firefox roll bar from rotating-words */
.slogan-hero, .slogan-inline {
  overflow-x: unset !important;
}
.rotating-words {
  overflow-x: hidden !important;
  overflow-y: hidden !important;
  max-width: 100vw !important;
  /* For extra safety, add: */
  scrollbar-width: none; /* Firefox */
}
.rotating-words::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera */
}

@media (max-width: 700px) {
  .book-demo-container,
  .testimony-block {
    min-width: 0 !important;
    max-width: 100vw !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  .book-demo-flex {
    flex-direction: column !important;
    gap: 1.2rem !important;
  }
}

@media (max-width: 600px) {
  .feature-blocks-container .feature-block {
    margin-left: 0.7rem !important;
    margin-right: 0.2rem !important;
  }
}