* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

a[href^="http"]:after,
a[href^="https"]:after {
  content: " ↗";
  font-size: 0.8em;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: #333;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header and Navigation */
header {
  background-color: #ffffff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 2px solid #083a87;
  border-left: 2px solid #083a87;
  border-right: 2px solid #083a87;
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.logo {
  height: 66px;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.nav-links a {
  text-decoration: none;
  color: #333;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  transition: all 0.3s ease;
}

.nav-links a:hover,
.nav-links a.active {
  background-color: #0a4399;
  color: white;
}

/* Main Content */
main {
  flex: 1;
  padding: 4rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

.hero {
  text-align: center;
  margin-bottom: 4rem;
}

.hero h1 {
  font-size: 3rem;
  color: #0a4399;
  margin-bottom: 1rem;
  font-weight: 700;
}

.hero p.tagline {
  font-size: 2.5rem;
  color: #0a4399;
  margin-bottom: 1rem;
  font-weight: 700;
}

.hero p {
  font-size: 1.2rem;
  color: #666;
  max-width: 600px;
  margin: 0 auto 2rem;
}

.cta-button {
  display: inline-block;
  background-color: #0a4399;
  color: white;
  padding: 1rem 2rem;
  text-decoration: none;
  border-radius: 6px;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(10, 67, 153, 0.3);
}

.centred {
  text-align: center;
}

.cta-button:hover {
  background-color: #083a87;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(10, 67, 153, 0.4);
  font-weight: bold;
}

section {
  display: grid;
  gap: 2rem;
  margin-top: 4rem;
}

section h2 {
  font-size: 2.5rem;
  color: #0a4399;
  margin-bottom: 1rem;
  font-weight: 700;
}

section p {
  font-size: 1.2rem;
  color: #666;
}

.features-preview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 4rem;
}

.feature-card {
  background: white;
  padding: 2rem;
  border-radius: 10px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
  text-align: center;
  transition: transform 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-5px);
}

.feature-card h3 {
  color: #0a4399;
  margin-bottom: 1rem;
  font-size: 1.5rem;
}

.feature-card p {
  color: #666;
  line-height: 1.6;
}

/* Footer */
footer {
  background-color: #0a4399;
  color: white;
  text-align: center;
  padding: 2rem;
  margin-top: auto;
}

footer p {
  font-size: 0.9rem;
}

footer a {
  color: white;
}

footer a:active {
  color: white;
  font-weight: bold;
}

footer a:hover {
  text-decoration: underline;
  color: white;
  font-style: italic;
}

.accordion-container {
  max-width: 800px;
  margin: 0 auto;
}

.accordion-item {
  margin-bottom: 2px;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.accordion-header {
  background: linear-gradient(135deg, #2e5bba 0%, #1e4a9a 100%);
  color: white;
  padding: 15px 20px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 500;
  font-size: 16px;
  transition: all 0.3s ease;
  border: none;
  width: 100%;
  text-align: left;
}

.accordion-header:hover {
  background: linear-gradient(135deg, #1e4a9a 0%, #0e3a8a 100%);
}

.accordion-arrow {
  font-size: 18px;
  font-weight: bold;
  transition: transform 0.3s ease;
}

.accordion-header.active .accordion-arrow {
  transform: rotate(90deg);
}

.accordion-content {
  background-color: white;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.accordion-content-inner ul {
  margin: 15px 0;
  padding-left: 25px;
}

.accordion-content-inner li {
  margin-bottom: 8px;
  color: #555;
}

.accordion-content.active {
  max-height: 2000px;
}

.accordion-content-inner {
  padding: 20px;
  color: #333;
  line-height: 1.6;
  display: flex;
  align-items: flex-start;
  gap: 20px;
}

.content-text {
  flex: 1;
}

.content-image {
  flex-shrink: 0;
  width: 200px;
  height: 120px;
  border-radius: 8px;
  object-fit: cover;
}

.stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

/* columns */
.stats > * {
  flex: 1;
  padding: 1rem;
}

.stat {
  background-color: #083a87;
  text-align: center;
}

.stat p.stat {
  color: white;
  font-size: 1.5rem;
  font-weight: bold;
}

.stat p.description {
  color: white;
  font-size: 1.2rem;
}

figcaption {
  text-align: center;
  color: #555;
  margin-top: 1.2rem;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.feature-card {
  background: white;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  text-align: center;
  transition: all 0.3s ease;
  border: 1px solid #e0e6ed;
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #0a4399, #2e5bba);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(10, 67, 153, 0.15);
}

.feature-card:hover::before {
  transform: scaleX(1);
}

.feature-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  color: #0a4399;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.feature-name {
  font-size: 1.25rem;
  font-weight: 600;
  color: #333;
  margin-bottom: 1.5rem;
  line-height: 1.3;
}

.details-button {
  background: linear-gradient(135deg, #0a4399 0%, #2e5bba 100%);
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 6px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.95rem;
}

.details-button:hover {
  background: linear-gradient(135deg, #083a87 0%, #1e4a9a 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(10, 67, 153, 0.3);
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
}

.modal-content {
  background-color: white;
  margin: 5% auto;
  padding: 0;
  border-radius: 12px;
  width: 90%;
  max-width: 600px;
  max-height: 80vh; /* Keep this for overall constraint */
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: modalSlideIn 0.3s ease;
  display: flex;
  flex-direction: column;
  overflow: hidden; /* Prevent scrolling on the container */
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-header {
  background: linear-gradient(135deg, #0a4399 0%, #2e5bba 100%);
  color: white;
  padding: 1.5rem 2rem;
  border-radius: 12px 12px 0 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0; /* Prevent header from shrinking */
}

.modal-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0;
}

.close {
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 4px;
  transition: background-color 0.2s ease;
}

.close:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

.modal-body {
  padding: 2rem;
  line-height: 1.8;
  color: #333;
  font-size: 1.05rem;
  overflow-y: auto; /* Only the body scrolls */
  flex: 1; /* Take remaining space */
  max-height: calc(80vh - 100px); /* Subtract approximate header height */
}

.modal-body p {
  margin-bottom: 1.5rem; /* Add space between paragraphs */
  text-align: left; /* Ensure left alignment */
  font-weight: 400; /* Ensure normal weight */
  letter-spacing: 0.01em; /* Slight letter spacing for clarity */
}

.modal-body p:last-child {
  margin-bottom: 0; /* Remove margin from last paragraph */
}

/* Modal List Styles */
.modal-body ul,
.modal-body ol {
  margin: 1.5rem 0;
  padding-left: 2rem;
}

.modal-body ul {
  list-style-type: none;
  position: relative;
}

/* Custom bullet points for unordered lists */
.modal-body ul li {
  position: relative;
  margin-bottom: 0.75rem;
  padding-left: 1.5rem;
  line-height: 1.7;
}

.modal-body ul li::before {
  content: "•";
  color: #0a4399;
  font-weight: bold;
  font-size: 1.2em;
  position: absolute;
  left: 0;
  top: 0;
}

.modal-body ol li {
  margin-bottom: 0.75rem;
  line-height: 1.7;
  padding-left: 0.5rem;
}

.modal-body ol {
  counter-reset: custom-counter;
}

.modal-body ol li {
  counter-increment: custom-counter;
  position: relative;
  list-style: none;
  padding-left: 2rem;
}

.modal-body ol li::before {
  content: counter(custom-counter) ".";
  color: #0a4399;
  font-weight: 600;
  position: absolute;
  left: 0;
  top: 0;
}

.responsive-iframe {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  padding-top: 25px; /* optional, space for top controls */
  height: 0;
  overflow: hidden;
  border-radius: 8px; /* optional, looks nicer */
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1); /* optional */
}

.responsive-iframe iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

a.discrete-link {
  text-decoration: none;
  font-weight: bold;
  color: #083a87;
  font-size: 1.2rem;
}

a.discrete-link:hover {
  font-size: 1.3rem;
  color: #0a4399;
}

a.discrete-link:active {
  color: #333;
}

a.discrete-link:focus {
  outline: 2px solid #083a87;
  outline-offset: 2px;
}

a.discrete-link:focus:not(:focus-visible) {
  outline: none;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 800px; /* wider than 600px */
  width: 100%; /* take full width of parent section */
  margin: 0 auto;
  padding: 2rem; /* optional: gives form nice breathing space */
  background-color: #f9f9f9; /* optional: light background */
  border-radius: 12px; /* optional: soft edges */
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05); /* optional: subtle shadow */
}

.contact-form label {
  font-weight: 600;
  color: #333;
}

.contact-form input,
.contact-form textarea {
  padding: 0.75rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 1rem;
  font-family: inherit;
}

.contact-form button {
  background: linear-gradient(135deg, #0a4399 0%, #2e5bba 100%);
  color: white;
  border: none;
  padding: 1rem 2rem;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1rem;
}

.contact-form button:hover {
  background: linear-gradient(135deg, #083a87 0%, #1e4a9a 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(10, 67, 153, 0.3);
}

#remoteSamplerContactFormResponse {
  color: green;
  font-weight: 600;
  min-height: 1.5rem;
}

/* Responsive Design */
@media (max-width: 768px) {
  nav {
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
  }

  .nav-links {
    gap: 1rem;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero p {
    font-size: 1rem;
  }

  main {
    padding: 2rem 1rem;
  }

  .features-preview {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .stats > * {
    width: calc(100% / 3);
  }

  .features-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .modal-content {
    margin: 10% auto;
    width: 95%;
    max-height: 85vh;
  }

  .modal-body {
    padding: 1.5rem;
    max-height: calc(85vh - 90px);
  }
}

@media (max-width: 480px) {
  .hero p.tagline {
    font-size: 1.5rem;
  }

  .nav-links {
    flex-direction: column;
    text-align: center;
    gap: 0.75rem;
  }

  .nav-links a {
    padding: 0.6rem 1rem;
    font-size: 1.1rem;
    display: inline-block;
  }

  .nav-links a.active {
    background-color: #0a4399;
    color: white;
    border-radius: 999px;
  }

  .features-grid {
    gap: 1.5rem;
  }

  .feature-card {
    padding: 1.2rem;
  }

  .details-button {
    width: 100%; /* Makes button easier to tap */
    padding: 1rem;
    font-size: 1rem;
  }

  .accordion-header {
    font-size: 1rem; /* increase slightly */
    padding: 20px 24px; /* larger tap target */
  }

  .accordion-content-inner {
    flex-direction: column; /* stack text & image */
    gap: 1rem;
  }

  .accordion-content-inner img {
    width: 100%;
    height: auto;
    border-radius: 8px;
  }

  .cta-button.centred {
    display: block;
    width: 100%;
    padding: 1.2rem;
    font-size: 1.1rem;
  }

  main {
    padding: 1.5rem 1rem;
  }

  .modal-body {
    padding: 1.5rem;
    font-size: 1rem;
    max-height: calc(85vh - 80px);
  }
}
