:root {
  --primary-color: #273372;
  /* Dark Blue */
  --secondary-color: #2b5dbb;
  /* Lighter Blue */
  --accent-color: #60a5fa;
  /* Accent Blue from Banner */
  --background-light: #f8fafc;
  /* Very Light Gray/Off-White */
  --background-section: #ffffff;
  /* White for Sections */
  --text-dark: #1f2937;
  /* Dark Gray for Text */
  --text-light: #4b5563;
  /* Lighter Gray for Paragraphs */
}

body {
  font-family: "Inter", sans-serif;
  background-color: var(--background-light);
  color: var(--text-dark);
  overflow-x: hidden;
  margin: 0;
  padding: 0;
}

h2 {
  font-family: 'Poppins', sans-serif;
  color: var(--primary-color);
}

#header {
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
  background-color: transparent;
  transform: translateY(-100%);
  animation: slideDown 0.8s 0.5s cubic-bezier(0.19, 1, 0.22, 1) forwards;
}

#navbar-container {
  height: 5rem;
}

#header.scrolled {
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
  background-color: #ffffff;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.1);
}

#header.scrolled #navbar-container {
  height: 4rem;
}

#header.scrolled #logo-img {
  height: 2.5rem;
}

#header.scrolled #logo-text {
  font-size: 1.25rem;
  color: var(--primary-color);
}

.nav-link span,
#main-page-logo #logo-text,
#mobile-menu-btn {
  color: white;
}

#header.scrolled .nav-link span,
#header.scrolled #mobile-menu-btn {
  color: var(--text-dark);
}

.nav-link {
  position: relative;
  padding: 0.5rem 0.25rem;
  transition: color 0.4s ease;
  opacity: 0;
  transform: translateY(10px);
  animation: fadeIn 0.5s forwards;
}

.nav-link:nth-child(1) {
  animation-delay: 1s;
}

.nav-link:nth-child(2) {
  animation-delay: 1.1s;
}

.nav-link:nth-child(3) {
  animation-delay: 1.2s;
}

.nav-link:nth-child(4) {
  animation-delay: 1.3s;
}

.nav-link span {
  transition: color 0.4s ease;
  position: relative;
}

.nav-link span::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 2px;
  background-color: var(--secondary-color);
  left: 0;
  bottom: -0.4rem;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.4s cubic-bezier(0.19, 1, 0.22, 1);
}

.nav-link:hover span::after {
  transform: scaleX(1);
}

.nav-link.active span::after {
  transform: scaleX(1);
}

#header.scrolled .nav-link:hover span {
  color: var(--primary-color);
}

.cta-button {
  background-color: white;
  color: var(--primary-color);
  padding: 0.75rem 1.5rem;
  border-radius: 9999px;
  font-weight: 700;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.4s cubic-bezier(0.19, 1, 0.22, 1);
}

.cta-button:hover {
  transform: scale(1.05) translateY(-2px);
  box-shadow: 0 8px 25px rgba(43, 93, 187, 0.3);
  background-color: var(--secondary-color);
  color: white;
}

#header.scrolled .cta-button {
  background-color: var(--primary-color);
  color: white;
}

section[id] {
  scroll-margin-top: 5rem;
  /* 80px */
}

section:not(#banner-section) {
  padding-top: 5rem;
  /* 80px */
  padding-bottom: 5rem;
  /* 80px */
}

#our-services-details .grid>div {
  background-color: var(--background-section);
  border: 1px solid #e5e7eb;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
}

#our-services-details .grid>div:hover {
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

#partners-section {
  background-color: var(--background-light);
}

.partner-card {
  background-color: var(--background-section);
  border-radius: 1rem;
  /* 16px */
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.partner-card:hover {
  transform: translateY(-10px) scale(1.03);
  box-shadow: 0 20px 25px -5px rgba(39, 51, 114, 0.15);
}

#products-section {
  background-color: var(--background-light);
}

#certification-section {
  background-color: var(--background-section);
}

.certificate-item {
  transition: all 0.3s ease-in-out;
  opacity: 0.85;
}

.certificate-item:hover {
  opacity: 1;
  transform: scale(1.1);
}

#contact-section {
  background-image: linear-gradient(rgba(26, 32, 44, 0.8), rgba(26, 32, 44, 0.8)), url('../images/banners/lab_1.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

#contact-section h2,
#contact-section .text-center>p {
  color: #ffffff;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

@keyframes slideDown {
  from {
    transform: translateY(-100%);
  }

  to {
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(50px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(100%);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-100%);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.animate-slideInUp {
  animation: slideInUp 1s cubic-bezier(0.19, 1, 0.22, 1) both;
}

.animate-fadeIn {
  animation: fadeIn 1.5s ease-out;
}

.animate-on-scroll {
  opacity: 0;
  transform: translateY(100px);
  transition: opacity 1.5s cubic-bezier(0.19, 1, 0.22, 1),
    transform 1.5s cubic-bezier(0.19, 1, 0.22, 1);
}

.animate-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

#scrollTopBtn {
  display: none;
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 99;
  border: none;
  outline: none;
  background: var(--primary-color);
  color: white;
  cursor: pointer;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  font-size: 24px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease-in-out;
  align-items: center;
  justify-content: center;
}

#scrollTopBtn:hover {
  background: var(--secondary-color);
  transform: scale(1.1);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

.footer-heading {
  font-size: 1.125rem;
  font-weight: 600;
  color: white;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-link {
  position: relative;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-link::after {
  content: '';
  position: absolute;
  width: 0;
  height: 1px;
  bottom: -2px;
  left: 0;
  background-color: var(--secondary-color);
  transition: width 0.3s ease;
}

.footer-link:hover {
  color: white;
}

.footer-link:hover::after {
  width: 100%;
}

.newsletter-input {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #4a5568;
  background-color: #2d3748;
  color: white;
  border-radius: 0.375rem 0 0 0.375rem;
  outline: none;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.newsletter-input:focus {
  border-color: var(--secondary-color);
  box-shadow: 0 0 0 2px rgba(43, 93, 187, 0.5);
}

.newsletter-button {
  padding: 0.75rem 1rem;
  background-color: var(--secondary-color);
  color: white;
  border: 1px solid var(--secondary-color);
  border-radius: 0 0.375rem 0.375rem 0;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.newsletter-button:hover {
  background-color: #2551a3;
}

#newsletter-message {
  transition: color 0.5s ease-in-out;
}

.social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.1);
  color: #a0aec0;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.social-icon:hover {
  background-color: var(--secondary-color);
  color: white;
  transform: translateY(-2px);
}

.embedded-contact-section {
  padding: 4rem 0;
  background-image: linear-gradient(rgba(26, 32, 44, 0.8), rgba(26, 32, 44, 0.8)), url('../images/banners/lab_1.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

.embedded-contact-section h2 {
  color: #ffffff;
  text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.7);
}

.embedded-contact-section p {
  color: #e5e7eb;
  text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.6);
}

.embedded-contact-section .flex i,
.embedded-contact-section .flex span {
  color: #ffffff;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

.embedded-form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 0.5rem;
  color: white;
  transition: all 0.3s ease;
}

.embedded-form-input::placeholder {
  color: #a0aec0;
}

.embedded-form-input:focus {
  outline: none;
  border-color: var(--secondary-color);
  background-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 0 3px rgba(43, 93, 187, 0.5);
}

.embedded-form-button {
  width: 100%;
  padding: 0.75rem 1rem;
  background-color: var(--secondary-color);
  color: white;
  font-weight: 600;
  border-radius: 0.5rem;
  transition: all 0.3s ease;
}

.embedded-form-button:hover {
  background-color: #2551a3;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(43, 93, 187, 0.3);
}

.form-success-message {
  color: #68d391;
  transition: opacity 0.5s ease-in-out;
}

.banner-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1.5s ease-in-out;
}

.banner-image.active {
  opacity: 1;
}