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 #2a7f62;
}

.btn-primary {
  background-color: #2a7f62;
  border-color: #2a7f62;
}

.btn-primary:hover {
  background-color: #236951;
  border-color: #236951;
}

.text-primary {
  color: #2a7f62 !important;
}

a {
  color: #2a7f62;
}

a:hover {
  color: #236951;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.navbar {
  padding: 0.5rem 0;
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  backdrop-filter: blur(10px);
  background-color: rgba(42, 127, 98, 0.95) !important;
  transition: all 0.3s ease;
  min-height: 80px;
}

/* Add padding to body to account for fixed navbar */
body {
  padding-top: 90px;
}

/* Add shadow when scrolled */
.navbar.scrolled {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
  font-size: 1.5rem;
}

.navbar-dark .navbar-nav .nav-link {
  color: rgba(255, 255, 255, 0.9);
  font-weight: 500;
  padding: 0.5rem 1rem;
  transition: all 0.3s ease;
}

.navbar-dark .navbar-nav .nav-link:hover {
  color: #fff;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 5px;
}

.hero-section {
  background: linear-gradient(135deg, #2a7f62 0%, #1e5c48 100%);
  color: white;
  padding: 100px 0;
  text-align: center;
}

.section-padding {
  padding: 80px 0;
}

.card {
  transition: all 0.3s ease;
  border: 1px solid #e0e0e0;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(42, 127, 98, 0.2);
  border-color: #2a7f62;
}

.navbar-brand {
  padding: 0.25rem 0;
  height: 100%;
  display: flex;
  align-items: center;
}

.navbar-brand img {
  transition: all 0.3s ease;
  filter: brightness(0) invert(1);
  opacity: 0.95;
}

.navbar-brand:hover img {
  transform: scale(1.05);
  opacity: 1;
}

svg {
  filter: invert(1) brightness(1.5);
}

.navbar-logo {
  height: calc(80px - 0.25rem);
  width: auto;
  max-height: 70px;
  object-fit: contain;
}

footer {
  margin-top: auto;
}

/* Ensure proper spacing between content and footer */
main {
  margin-bottom: 2rem;
  flex: 1;
}

/* Loading Modal Styles */
#loadingModal .modal-content {
  background-color: rgba(255, 255, 255, 0.95);
  border: none;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

#loadingModal .modal-backdrop {
  backdrop-filter: blur(5px);
}

/* Custom Spinner Animation */
.custom-spinner {
  display: flex;
  justify-content: center;
  align-items: center;
}

.spinner-circle {
  width: 60px;
  height: 60px;
  border: 4px solid #e0e0e0;
  border-top: 4px solid #2a7f62;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  position: relative;
}

.spinner-circle::after {
  content: '';
  position: absolute;
  top: -4px;
  left: -4px;
  right: -4px;
  bottom: -4px;
  border: 2px solid transparent;
  border-top: 2px solid #4db89c;
  border-radius: 50%;
  animation: spin 0.8s linear infinite reverse;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Contact page specific spacing */
.contact-container {
  min-height: calc(100vh - 160px);
}

/* Fix contact form card excessive height */
.contact-form-card {
  height: auto !important;
  min-height: auto !important;
}

.contact-form-card .card-body {
  padding: 1.5rem !important;
}

/* Reduce form field spacing on contact page */
.contact-form-card .row.g-2 > * {
  padding-bottom: 0.5rem;
}

.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;
}

/* Resources page specific fixes */
.resources-container .card {
  height: auto !important;
  min-height: auto !important;
  margin-bottom: 1rem;
}

/* Featured resources should have uniform height */
.resources-container h2 + .row .card.h-100 {
  height: 100% !important;
}

.resources-container .row.g-4,
.resources-container .row.g-3 {
  margin-bottom: 1.5rem;
}

/* Fix for featured resources section */
.resources-container h2 + .row {
  margin-bottom: 2rem;
}

/* Demo request page specific fixes */
.demo-container .card {
  height: auto !important;
  min-height: auto !important;
}

/* ISO Certification Styles */
.iso-certification-badge {
  padding: 2rem;
  background-color: rgba(42, 127, 98, 0.05);
  border-radius: 10px;
  transition: transform 0.3s ease;
  border: 2px solid rgba(42, 127, 98, 0.1);
}

.iso-certification-badge:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 20px rgba(42, 127, 98, 0.15);
  border-color: rgba(42, 127, 98, 0.2);
}

.iso-logo-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.iso-text h5 {
  color: #2a7f62;
  letter-spacing: 1px;
}

.iso-text small {
  font-weight: 600;
  color: #666;
  letter-spacing: 2px;
}

.iso-footer-badge {
  opacity: 0.9;
  transition: opacity 0.3s ease;
}

.iso-footer-badge:hover {
  opacity: 1;
}

.iso-footer-badge a {
  font-size: 0.95rem;
  font-weight: 500;
}