/* Design System & Variables */
:root {
  --primary: #1E4DAA;
  --primary-600: #18408E;
  --accent: #5FA8FF;
  --accent-100: #E9F2FF;
  --surface: #FFFFFF;
  --text: #111827;
  --muted: #6B7280;
  --line: #E5E7EB;

  /* Horizontal separator controls */
  --stripe-h: 12px;
  --accent-stripe-h: 8px;
  --stripe: var(--primary);
  --stripe-accent: var(--primary-600);

  /* Typography */
  --font-heading: 'Poppins', 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-body: 'Inter', 'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Layout */
  --max-width: 1160px;
  --section-padding: clamp(56px, 8vw, 104px);
}

/* Reset & Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  color: var(--text);
  line-height: 1.6;
  font-size: 16px;
  font-weight: 400;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
}

h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
}

h3 {
  font-size: clamp(1.5rem, 3vw, 2rem);
}

h4 {
  font-size: 1.25rem;
}

p {
  margin-bottom: 1rem;
  max-width: 65ch;
}

/* Mobile typography fixes */
@media (max-width: 768px) {
  h1 {
    font-size: clamp(1.8rem, 6vw, 2.5rem);
    line-height: 1.2;
    margin-bottom: 1rem;
  }

  h2 {
    font-size: clamp(1.5rem, 5vw, 2rem);
    line-height: 1.3;
  }

  p {
    max-width: none;
    font-size: 1rem;
    line-height: 1.5;
    margin-bottom: 1rem;
  }
  
  /* Hero section text specific fixes */
  .hero p {
    max-width: none;
    font-size: 0.95rem;
    line-height: 1.4;
    margin-bottom: 1.5rem;
  }
  
  /* Section header text fixes */
  .section-header p {
    max-width: none;
    font-size: 1rem;
    line-height: 1.4;
  }
  
  /* Prevent text overflow and ensure proper spacing */
  .hero-content {
    padding: 1rem 0;
    width: 100%;
  }
  
  /* Ensure text doesn't get cut off in containers */
  .container {
    overflow: visible;
    word-wrap: break-word;
  }
  
  /* Adjust eyebrow spacing for mobile */
  .eyebrow {
    font-size: 0.8rem;
    margin-bottom: 0.75rem;
  }
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--primary-600);
}

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}

/* Utility Classes */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1rem;
}

@media (min-width: 640px) {
  .container {
    padding: 0 2rem;
  }
}

.eyebrow {
  font-size: 0.875rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.125em;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.grid {
  display: grid;
  gap: 2rem;
}

.grid-2 {
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .grid-2 {
    grid-template-columns: 1fr 1fr;
  }
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-4 {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

/* ===== Diagonal Utilities → Horizontal Separators ===== */
.diagonal-top {
  position: relative;
  padding-top: var(--stripe-h);
}
.diagonal-top::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: var(--stripe-h);
  background: var(--stripe);
  transform: none !important;
  transform-origin: initial !important;
  clip-path: none !important;
}

.diagonal-bottom {
  position: relative;
  padding-bottom: var(--stripe-h);
}
.diagonal-bottom::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: var(--stripe-h);
  background: var(--stripe);
  transform: none !important;
  transform-origin: initial !important;
  clip-path: none !important;
}

.diagonal-accent {
  position: relative;
  padding-top: var(--accent-stripe-h);
}
.diagonal-accent::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: var(--accent-stripe-h);
  background: var(--accent-100);
  transform: none !important;
  transform-origin: initial !important;
  clip-path: none !important;
}

.no-stripe.diagonal-top::before,
.no-stripe.diagonal-bottom::after,
.no-stripe.diagonal-accent::after { display: none !important; }

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid var(--line);
  transition: backdrop-filter 0.3s ease, box-shadow 0.3s ease;
}

.header.scrolled {
  backdrop-filter: blur(16px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
  gap: 1rem;
  min-width: 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary);
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.logo:hover {
  opacity: 0.8;
  color: var(--primary);
}

.logo img {
  height: 110px;
  width: auto;
  margin: 0;
  padding: 0;
  object-fit: contain;
}

.logo-text {
  display: none;
}

.logo-text .company-name {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--primary);
  margin: 0;
  padding: 0;
  letter-spacing: 0.5px;
}

.logo-text .company-subtitle {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--primary);
  margin: 0;
  padding: 0;
  letter-spacing: 0.3px;
}

/* Mobile logo adjustments */
@media (max-width: 768px) {
  .header-content {
    padding: 1.4rem 0;
  }
  
  .logo {
    gap: 0.5rem;
  }
  
  .logo img {
    height: 100px;
  }
  
  .logo-text {
    display: none;
  }
}

@media (max-width: 480px) {
  .header-content {
    padding: 1.2rem 0;
  }
  
  .logo {
    gap: 0.4rem;
  }
  
  .logo img {
    height: 90px;
  }
  
  .logo-text {
    display: none;
  }
}

.nav {
  display: none;
  align-items: center;
  gap: 1.5rem;
  white-space: nowrap;
  flex-shrink: 0;
}

@media (min-width: 1024px) {
  .nav {
    display: flex;
  }
}

.nav a {
  font-weight: 500;
  padding-bottom: 0.25rem;
  border-bottom: 2px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

.nav a.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.nav a:hover {
  color: var(--primary);
}

/* Ensure buttons in nav maintain their styling */
.nav a.btn {
  border-bottom: none;
  padding: 0.75rem 1.5rem;
}

.nav a.btn-primary {
  color: white !important;
}

.nav a.btn-primary:hover {
  color: white !important;
}

.mobile-nav-toggle {
  display: block;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

@media (min-width: 1024px) {
  .mobile-nav-toggle {
    display: none;
  }
}

.mobile-nav {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.mobile-nav.open {
  display: block;
}

.mobile-nav a {
  display: block;
  padding: 1rem;
  border-bottom: 1px solid var(--line);
  font-weight: 500;
}

.mobile-nav a:last-child {
  border-bottom: none;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  font-size: 0.875rem;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  gap: 0.5rem;
  transition: all 0.2s ease;
}

.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-primary:hover {
  background: var(--primary-600);
  color: white;
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}

.btn-outline:hover {
  background: var(--primary);
  color: white;
}

.btn-large {
  padding: 1rem 2rem;
  font-size: 1rem;
}

/* Wide button class for long text */
.btn-wide {
  min-width: 200px;
}

/* MOBILE BUTTON SYSTEM - Clean and Simple */
@media (max-width: 768px) {
  /* Special handling for wide buttons with long text */
  .btn-wide,
  .btn-wide.btn-primary,
  .btn-wide.btn-outline,
  .btn-wide.btn-large {
    width: 280px !important;
    height: 56px !important;
    font-size: 0.8rem !important;
    white-space: normal !important;
    line-height: 1.2 !important;
    padding: 0.75rem !important;
    text-align: center !important;
    min-width: 280px !important;
  }
  
  /* Even smaller screens - make wide buttons responsive */
  @media (max-width: 480px) {
    .btn-wide,
    .btn-wide.btn-primary,
    .btn-wide.btn-outline,
    .btn-wide.btn-large {
      width: calc(100% - 2rem) !important;
      max-width: 320px !important;
      min-width: 260px !important;
    }
  }
  
  /* Very small screens */
  @media (max-width: 360px) {
    .btn-wide,
    .btn-wide.btn-primary,
    .btn-wide.btn-outline,
    .btn-wide.btn-large {
      width: calc(100% - 1rem) !important;
      min-width: 240px !important;
      font-size: 0.75rem !important;
      height: 52px !important;
    }
  }
  
  /* Reset ALL regular button classes to consistent mobile size */
  .btn,
  .btn-primary,
  .btn-outline,
  .btn-large {
    width: 160px !important;
    height: 44px !important;
    padding: 0 1rem !important;
    font-size: 0.8rem !important;
    font-weight: 600 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    white-space: nowrap !important;
    border-radius: 8px !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    line-height: 1 !important;
  }
  
  /* Override any inline styles on buttons */
  .btn[style],
  .btn-primary[style],
  .btn-outline[style],
  .btn-large[style] {
    width: 160px !important;
    height: 44px !important;
    margin-right: 0 !important;
    margin-left: 0 !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
  }
  
  /* Ensure outline buttons have consistent border */
  .btn-outline,
  .btn-outline[style] {
    border-width: 2px !important;
    border-style: solid !important;
  }
  
  /* Button containers - force consistent spacing */
  .hero-actions,
  [style*="margin-top"],
  div[style*="margin-top"] {
    display: flex !important;
    flex-direction: row !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 12px !important;
    flex-wrap: wrap !important;
    margin-top: 2rem !important;
  }
  
  /* All buttons inside containers */
  .hero-actions .btn,
  .hero-actions .btn-primary,
  .hero-actions .btn-outline,
  .hero-actions .btn-large,
  [style*="margin-top"] .btn,
  [style*="margin-top"] .btn-primary,
  [style*="margin-top"] .btn-outline,
  [style*="margin-top"] .btn-large,
  div[style*="margin-top"] .btn,
  div[style*="margin-top"] .btn-primary,
  div[style*="margin-top"] .btn-outline,
  div[style*="margin-top"] .btn-large {
    width: 160px !important;
    height: 44px !important;
    margin: 0 !important;
    flex: 0 0 160px !important;
  }
}

/* Cards */
.card {
  background: var(--surface);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.15);
}

.card h3 {
  color: var(--primary);
  margin-bottom: 0.75rem;
}

.card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 1rem;
}

/* Hero */
.hero {
  position: relative;
  min-height: 70vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  color: white;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(30, 77, 170, 0.8), rgba(30, 77, 170, 0.4));
  z-index: -1;
}

.hero-mask {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 120px;
  background: white;
  transform: none !important;          /* flattened */
  transform-origin: initial !important;
  clip-path: none !important;
  z-index: -1;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
}

.hero h1 {
  color: white;
  margin-bottom: 1.5rem;
}

.hero p {
  font-size: 1.125rem;
  margin-bottom: 2rem;
  opacity: 0.95;
  max-width: none;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Mobile hero-actions improvements */
@media (max-width: 768px) {
  .hero-actions {
    gap: 12px !important;
    justify-content: center !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    display: flex !important;
    flex-direction: row !important;
  }
  
  .hero-actions .btn,
  .hero-actions .btn-primary,
  .hero-actions .btn-outline,
  .hero-actions .btn-large {
    width: 160px !important;
    height: 44px !important;
    margin: 0 !important;
    flex: 0 0 160px !important;
  }
}

/* Sections */
.section {
  padding: var(--section-padding) 0;
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
  position: relative;
}

.section-header p {
  margin-left: auto;
  margin-right: auto;
}

.section-header.with-bg {
  background-image: url('/assets/img/3.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  position: relative;
  padding-top: calc(2rem + var(--stripe-h) + var(--accent-stripe-h));
  padding-bottom: 2rem;
  border-radius: 16px;
  overflow: hidden;
}

.section-header.with-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.9);
  z-index: 1;
}

.section-header.with-bg > * {
  position: relative;
  z-index: 2;
}

/* Tables */
.table-container {
  overflow-x: auto;
  margin: 2rem 0;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.table {
  width: 100%;
  border-collapse: collapse;
  margin: 0;
  background: var(--surface);
  border-radius: 12px;
  overflow: hidden;
}

.table th {
  background: var(--accent-100);
  color: var(--primary);
  font-weight: 600;
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

.table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--line);
}

.table tr:last-child td {
  border-bottom: none;
}

/* Mobile Table Responsiveness */
@media (max-width: 768px) {
  .table-container {
    margin: 1.5rem 0; /* Keep within container bounds */
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    background: var(--surface);
    overflow: hidden; /* No horizontal scroll */
  }
  
  /* Make table fit container width exactly */
  .table {
    font-size: 0.75rem;
    margin: 0;
    border-radius: 8px;
    width: 100% !important; /* Force table to fit container */
    table-layout: fixed; /* Fixed layout for consistent column widths */
  }
  
  .table th,
  .table td {
    padding: 0.5rem 0.3rem;
    white-space: normal; /* Allow text wrapping */
    word-wrap: break-word;
    overflow-wrap: break-word;
    line-height: 1.2;
  }
  
  /* Set exact column widths to fit mobile screen */
  .table th:first-child,
  .table td:first-child {
    width: 28%; /* Parameter column */
    font-weight: 600;
    font-size: 0.7rem;
  }
  
  .table th:nth-child(2),
  .table td:nth-child(2) {
    width: 25%; /* Test Method column */
    font-size: 0.7rem;
  }
  
  .table th:nth-child(3),
  .table td:nth-child(3) {
    width: 23%; /* Frequency column */
    font-size: 0.7rem;
  }
  
  .table th:nth-child(4),
  .table td:nth-child(4) {
    width: 24%; /* Status column */
    text-align: center;
    font-size: 0.7rem;
  }
  
  /* Make headers more compact */
  .table th {
    padding: 0.4rem 0.3rem;
    font-size: 0.7rem;
    font-weight: 700;
  }
}

@media (max-width: 480px) {
  .table-container {
    margin: 1.5rem 0;
  }
  
  .table {
    font-size: 0.7rem;
  }
  
  .table th,
  .table td {
    padding: 0.4rem 0.25rem;
    font-size: 0.65rem;
  }
  
  .table th {
    padding: 0.35rem 0.25rem;
    font-size: 0.65rem;
  }
  
  /* Optimize column widths for very small screens */
  .table th:first-child,
  .table td:first-child {
    width: 30%; /* Slightly larger for parameter names */
  }
  
  .table th:nth-child(2),
  .table td:nth-child(2) {
    width: 24%; /* Test Method */
  }
  
  .table th:nth-child(3),
  .table td:nth-child(3) {
    width: 22%; /* Frequency */
  }
  
  .table th:nth-child(4),
  .table td:nth-child(4) {
    width: 24%; /* Status */
  }
}

@media (max-width: 360px) {
  .table {
    font-size: 0.65rem;
  }
  
  .table th,
  .table td {
    padding: 0.3rem 0.2rem;
    font-size: 0.6rem;
    line-height: 1.1;
  }
  
  .table th {
    padding: 0.3rem 0.2rem;
    font-size: 0.6rem;
  }
}

/* Lists */
.list {
  list-style: none;
  padding: 0;
}

.list li {
  position: relative;
  padding-left: 2rem;
  margin-bottom: 0.75rem;
}

.list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.5rem;
  width: 8px;
  height: 8px;
  border: 2px solid var(--primary);
  border-radius: 50%;
  background: transparent;
}

/* Checkmarks */
.checklist {
  list-style: none;
  padding: 0;
}

.checklist li {
  position: relative;
  padding-left: 2rem;
  margin-bottom: 0.75rem;
}

.checklist li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: bold;
}

/* Forms */
.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.form-input {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid var(--line);
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.2s ease;
}

.form-input:focus {
  outline: none;
  border-color: var(--primary);
}

.form-textarea {
  min-height: 120px;
  resize: vertical;
}

/* Contact form enhancements */
.form-input.error {
  border-color: #dc3545 !important;
  box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.1) !important;
}

.form-group .error-message {
  color: #dc3545 !important;
  font-size: 0.875rem !important;
  margin-top: 0.25rem !important;
  display: block !important;
}

.form-input.success {
  border-color: #059669 !important;
  box-shadow: 0 0 0 2px rgba(5, 150, 105, 0.1) !important;
}

/* Loading button animation */
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Toast notifications */
.contact-toast {
  font-family: var(--font-body);
  line-height: 1.4;
}

@media (max-width: 640px) {
  .contact-toast {
    font-size: 0.875rem !important;
  }
}

.form-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.form-checkbox input {
  margin-top: 0.25rem;
}

/* Breadcrumbs */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--muted);
  margin-bottom: 2rem;
}

.breadcrumb a {
  color: var(--muted);
}

.breadcrumb a:hover {
  color: var(--primary);
}

.breadcrumb-separator {
  color: var(--line);
}

/* Footer */
.footer {
  background: var(--text);
  color: white;
  padding: 3rem 0 1rem;
  margin-top: 4rem;
}

.footer-content {
  display: grid;
  gap: 2rem;
  margin-bottom: 2rem;
}

@media (min-width: 768px) {
  .footer-content {
    grid-template-columns: repeat(3, 1fr);
  }
}

.footer h4 {
  color: var(--accent);
  margin-bottom: 1rem;
  font-size: 1.125rem;
}

.footer a {
  color: #9CA3AF;
  display: block;
  margin-bottom: 0.5rem;
  transition: color 0.2s ease;
}

.footer a:hover {
  color: white;
}

.footer-bottom {
  border-top: 1px solid #374151;
  padding-top: 2rem;
  text-align: center;
  color: #9CA3AF;
}

/* Animations */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.reveal-in {
  opacity: 1;
  transform: none;
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(4px);
}

.modal.open {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-content {
  background: var(--surface);
  border-radius: 16px;
  padding: 2rem;
  max-width: 500px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--muted);
  padding: 0.5rem;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close:hover {
  background: var(--line);
}

/* Toast */
.toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: var(--primary);
  color: white;
  padding: 1rem 1.5rem;
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 1001;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

/* Sticky Services Card */
.sticky-card {
  position: sticky;
  top: 120px;
  height: fit-content;
}

/* Responsive Images */
img {
  max-width: 100%;
  height: auto;
}

/* ✅ Fixed Lazy-Loading Fade-In */
img[loading="lazy"] {
  opacity: 1; /* visible by default so images never get stuck hidden */
  transition: opacity 0.3s ease;
}

img[loading="lazy"].loaded {
  opacity: 1; /* smooth fade in when JS adds .loaded */
}

html.js img[loading="lazy"] {
  opacity: 0; /* start hidden only if JS is running */
}

html.js img[loading="lazy"].loaded {
  opacity: 1;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
  html {
    scroll-behavior: auto;
  }
  .hero-bg {
    transform: none !important;
  }
}

/* High Contrast Support */
@media (prefers-contrast: high) {
  :root {
    --line: #000000;
    --muted: #000000;
  }
  .card {
    border: 2px solid var(--text);
  }
}

/* ==== IMO Card (Compliance) ==== */
.imo-card{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:2rem;
  padding:2rem;
}

.imo-copy{
  flex:1 1 0;
}

.imo-copy h3{
  margin-top:.5rem;
  margin-bottom:.5rem;
}

.list.small{
  font-size:.9rem;
}

/* Circular IMO badge */
.imo-badge{
  background:var(--primary);
  color:#fff;
  width:80px;
  height:80px;
  border-radius:50%;
  display:flex;
  align-items:center;
  justify-content:center;
  margin:0 0 1rem 0;
  font-size:1.2rem;
  font-weight:700;
  letter-spacing:.5px;
  box-shadow:0 4px 12px rgba(0,0,0,.12);
}

/* Image wrapper with subtle hover */
.imo-img-wrapper{
  flex:1 1 0;
  max-width:360px;              /* keeps it neat beside text */
  width:100%;
  aspect-ratio:1 / 1;           /* perfect square */
  border-radius:12px;
  overflow:hidden;
  margin-inline:auto;
  box-shadow:0 4px 12px rgba(0,0,0,.15);
  transition:transform .3s ease, box-shadow .3s ease;
}

.imo-img-wrapper:hover{
  transform:scale(1.03);
  box-shadow:0 8px 24px rgba(0,0,0,.28);
}

.imo-img-wrapper img{
  width:100%;
  height:100%;
  object-fit:cover;             /* crop without distortion */
  display:block;
}

/* Responsive: stack on mobile */
@media (max-width: 768px){
  .imo-card{
    flex-direction:column;
    text-align:left;
  }
  .imo-img-wrapper{
    max-width:320px;
  }
}

/* WhatsApp Float Button */
.whatsapp-float {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 60px;
  height: 60px;
  background: #25d366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(37, 211, 102, 0.4);
  z-index: 1000;
  transition: all 0.3s ease;
  text-decoration: none;
}

.whatsapp-float:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.6);
}

.whatsapp-float svg {
  width: 32px;
  height: 32px;
  fill: white;
}

/* WhatsApp button responsive adjustments */
@media (max-width: 768px) {
  .whatsapp-float {
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
  }
  
  .whatsapp-float svg {
    width: 28px;
    height: 28px;
  }
}
