/* Modern Typography & theme */
:root {
  --header-h: 70px;

  /* Modern Color Palette */
  --bg-primary: #0a0b0f;
  --bg-secondary: #111318;
  --bg-surface: rgba(255, 255, 255, 0.05);
  --bg-surface-hover: rgba(255, 255, 255, 0.08);
  --bg-card: rgba(255, 255, 255, 0.03);
  --bg-card-hover: rgba(255, 255, 255, 0.06);

  --text-primary: #ffffff;
  --text-secondary: #a1a1aa;
  --text-muted: #71717a;
  --text-accent: #3b82f6;

  --brand-primary: #3b82f6;
  --brand-secondary: #1d4ed8;
  --brand-accent: #60a5fa;
  --brand-gradient: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);

  --success: #10b981;
  --error: #ef4444;
  --warning: #f59e0b;

  --border-color: rgba(255, 255, 255, 0.1);
  --border-hover: rgba(255, 255, 255, 0.2);
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.6);

  --glass-bg: rgba(255, 255, 255, 0.05);
  --glass-border: rgba(255, 255, 255, 0.1);
  --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
}

[data-theme="light"] {
  --bg-primary: #fafafa;
  --bg-secondary: #ffffff;
  --bg-surface: rgba(0, 0, 0, 0.02);
  --bg-surface-hover: rgba(0, 0, 0, 0.05);
  --bg-card: rgba(255, 255, 255, 0.8);
  --bg-card-hover: rgba(255, 255, 255, 0.9);

  --text-primary: #1f2937;
  --text-secondary: #6b7280;
  --text-muted: #9ca3af;
  --text-accent: #2563eb;

  --brand-primary: #2563eb;
  --brand-secondary: #1d4ed8;
  --brand-accent: #3b82f6;
  --brand-gradient: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);

  --border-color: rgba(0, 0, 0, 0.1);
  --border-hover: rgba(0, 0, 0, 0.15);

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);

  --glass-bg: rgba(255, 255, 255, 0.8);
  --glass-border: rgba(255, 255, 255, 0.2);
  --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.1);
}

* {
  box-sizing: border-box;
  transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

html {
  scroll-behavior: smooth;
  font-feature-settings: "cv02", "cv03", "cv04", "cv11";
}

body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: var(--text-primary);
  background: var(--bg-primary);
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  display: block;
  border-radius: var(--radius-lg);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

img:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

a {
  color: var(--brand-primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--brand-accent);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.container {
  width: min(1200px, 92%);
  margin: 0 auto;
  padding: 0 1rem;
}

.section {
  padding: 80px 0;
  position: relative;
}

.section-alt {
  background: var(--bg-surface);
  backdrop-filter: blur(10px);
}

.lead {
  font-size: 1.25rem;
  color: var(--text-secondary);
  line-height: 1.7;
  font-weight: 400;
}

.muted {
  color: var(--text-muted);
  font-weight: 400;
}

h1, h2, h3, h4, h5, h6 {
  line-height: 1.2;
  margin: 0 0 1rem;
  font-weight: 700;
  letter-spacing: -0.025em;
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.1;
}

h2 {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  margin-bottom: 2rem;
  color: var(--text-primary);
}

h3 {
  font-size: clamp(1.2rem, 3vw, 1.5rem);
  color: var(--text-primary);
}

h4 {
  font-size: 1.125rem;
  color: var(--text-secondary);
}

/* Modern Header & Navigation */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--glass-border);
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
}

.site-header.scrolled {
  background: var(--bg-surface);
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow-md);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  position: relative;
}

.logo {
  font-weight: 800;
  font-size: 1.5rem;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  transition: transform 0.2s ease;
}

.logo:hover {
  transform: scale(1.02);
}

.nav-menu ul {
  display: flex;
  gap: 2rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.nav-menu a {
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.nav-menu a::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: var(--brand-gradient);
  transition: left 0.3s ease;
  z-index: -1;
  opacity: 0;
}

.nav-menu a:hover::before,
.nav-menu a.active::before {
  left: 0;
  opacity: 1;
}

.nav-menu a:hover,
.nav-menu a.active {
  color: var(--text-primary);
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  background: transparent;
  border: 0;
  padding: 0.75rem;
  cursor: pointer;
  position: relative;
  z-index: 240;
  border-radius: var(--radius-md);
  transition: background-color 0.2s ease;
}

.nav-toggle:hover {
  background: var(--bg-surface-hover);
}

.nav-toggle-bar {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  margin: 5px 0;
  border-radius: 2px;
  transition: all 0.3s ease;
  transform-origin: center;
}

.nav-toggle.active .nav-toggle-bar:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

.nav-toggle.active .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active .nav-toggle-bar:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* Modern Hero Section */
.hero {
  background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
  padding: 120px 0 80px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 20% 80%, rgba(59, 130, 246, 0.1) 0%, transparent 50%),
              radial-gradient(circle at 80% 20%, rgba(139, 92, 246, 0.1) 0%, transparent 50%);
  pointer-events: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 4rem;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-text .cta {
  margin: 2rem 0 2rem;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero-points {
  list-style: none;
  padding: 0;
  margin: 2rem 0 0;
  display: grid;
  gap: 1rem;
  color: var(--text-secondary);
}

.hero-points li {
  position: relative;
  padding-left: 2rem;
  font-size: 1.1rem;
}

.hero-points li::before {
  content: '✓';
  position: absolute;
  left: 0;
  top: 0;
  color: var(--success);
  font-weight: bold;
  font-size: 1.2rem;
}

/* Modern Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem 2rem;
  border-radius: var(--radius-lg);
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  text-decoration: none;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.btn:hover::before {
  left: 100%;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--brand-accent);
}

.btn-primary {
  background: var(--brand-gradient);
  color: white;
  border-color: transparent;
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  box-shadow: var(--shadow-xl);
  transform: translateY(-3px);
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-primary);
  border-color: var(--border-color);
  backdrop-filter: blur(10px);
}

.btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

.btn-block {
  width: 100%;
}

/* Modern Layout Components */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.text-col p {
  margin-top: 0;
  line-height: 1.7;
}

.check-list {
  list-style: none;
  padding: 0;
  margin: 2rem 0 0;
  display: grid;
  gap: 1rem;
}

.check-list li {
  position: relative;
  padding-left: 2.5rem;
  margin: 0;
  color: var(--text-secondary);
  font-size: 1.1rem;
  line-height: 1.6;
}

.check-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--success);
  font-weight: bold;
  font-size: 1.2rem;
  background: var(--bg-surface);
  border-radius: 50%;
  width: 1.5rem;
  height: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-color);
}

/* Modern Cards */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(10px);
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--brand-gradient);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.card:hover::before {
  opacity: 1;
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-xl);
  border-color: var(--border-hover);
}

.card-icon {
  font-size: 3rem;
  margin-bottom: 1.5rem;
  display: block;
  opacity: 0.8;
}

.card h3 {
  margin-top: 0;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.card p {
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.card ul {
  padding-left: 0;
  margin: 1.5rem 0 0;
  list-style: none;
  color: var(--text-secondary);
}

.card ul li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.5rem;
}

.card ul li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--brand-primary);
  font-weight: bold;
}

/* Modern Benefits */
.benefits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.benefit {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2rem;
  text-align: center;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.benefit:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-hover);
}

.benefit-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  display: block;
  opacity: 0.8;
}

.benefit h3 {
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.benefit p {
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0;
}

/* Modern Steps */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  counter-reset: steps;
  list-style: none;
  padding: 0;
  margin: 0;
}

.steps li {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 2rem;
  position: relative;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.steps li:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-hover);
}

.steps li::before {
  content: counter(steps);
  counter-increment: steps;
  position: absolute;
  top: -2rem;
  left: 2rem;
  width: 3rem;
  height: 3rem;
  background: var(--brand-gradient);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.2rem;
  border: 3px solid var(--bg-primary);
}

.step-number {
  display: none; /* Hide the old step number */
}

/* Modern Testimonials */
.testimonials {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

blockquote {
  margin: 0;
  padding: 2.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  color: var(--text-primary);
  position: relative;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

/* blockquote::before removed - quotes disabled */

blockquote:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-hover);
}

blockquote p {
  margin: 0 0 1rem;
  font-size: 1.1rem;
  line-height: 1.6;
  color: var(--text-primary);
}

blockquote cite {
  color: var(--text-muted);
  font-style: normal;
  font-weight: 600;
}

/* Modern Accordion */
.accordion {
  display: grid;
  gap: 1rem;
}

.accordion-item {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.accordion-item:hover {
  border-color: var(--border-hover);
}

.accordion-trigger {
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  padding: 1.5rem 2rem;
  font-weight: 600;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text-primary);
  transition: all 0.2s ease;
}

.accordion-trigger:hover {
  background: var(--bg-surface-hover);
}

.accordion-trigger::after {
  content: "+";
  color: var(--text-muted);
  font-weight: 700;
  font-size: 1.2rem;
  transition: all 0.3s ease;
}

.accordion-item.expanded .accordion-trigger::after {
  content: "−";
  transform: rotate(180deg);
}

.accordion-panel {
  height: 0;
  overflow: hidden;
  transition: height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 0 2rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.accordion-item.expanded .accordion-panel {
  padding: 0 2rem 2rem;
}

/* Certificate Modal */
.certificate-modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(10px);
}

.certificate-modal-content {
  position: relative;
  margin: auto;
  display: block;
  max-width: 90%;
  max-height: 90%;
  animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
  from { opacity: 0; transform: scale(0.8); }
  to { opacity: 1; transform: scale(1); }
}

.certificate-modal-close {
  position: absolute;
  top: -50px;
  right: 0;
  color: white;
  font-size: 35px;
  font-weight: bold;
  cursor: pointer;
  transition: color 0.3s ease;
}

.certificate-modal-close:hover {
  color: var(--brand-accent);
}

.certificate-modal-image {
  width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  /* Disable image selection and dragging */
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-user-drag: none;
  -khtml-user-drag: none;
  -moz-user-drag: none;
  -o-user-drag: none;
  user-drag: none;
  pointer-events: none;
}

/* Protect certificates from copying */
.certifications-grid img {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-user-drag: none;
  -khtml-user-drag: none;
  -moz-user-drag: none;
  -o-user-drag: none;
  user-drag: none;
  pointer-events: none;
}

/* Modern Form */
.form {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 3rem;
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-lg);
}

.form-row {
  margin-bottom: 1.5rem;
}

.form-row-inline {
  display: flex;
  align-items: center;
  gap: 1rem;
}

label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
  font-size: 0.95rem;
}

input[type="text"],
input[type="email"],
input[type="tel"],
textarea {
  width: 100%;
  padding: 1rem 1.25rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 1rem;
  background: var(--bg-surface);
  color: var(--text-primary);
  transition: all 0.3s ease;
  backdrop-filter: blur(5px);
}

input:focus,
textarea:focus {
  outline: none;
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
  background: var(--bg-primary);
}

small.error {
  color: var(--error);
  display: block;
  min-height: 1.25rem;
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

.checkbox {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
}

.checkbox input[type="checkbox"] {
  width: 1.25rem;
  height: 1.25rem;
  accent-color: var(--brand-primary);
}

.form-note {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin: 1rem 0 0;
  line-height: 1.5;
}

/* Modern Footer */
.site-footer {
  border-top: 1px solid var(--border-color);
  background: var(--bg-surface);
  padding: 4rem 0 2rem;
  backdrop-filter: blur(10px);
}

.footer-grid {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.site-footer .logo {
  margin-bottom: 1rem;
  background: none;
  background-clip: initial;
  -webkit-background-clip: initial;
  -webkit-text-fill-color: initial;
  color: var(--text-primary);
}

.site-footer ul {
  list-style: none;
  display: flex;
  gap: 0.75rem;
  padding: 0;
  margin: 0;
}

.site-footer a {
  color: var(--text-secondary);
  transition: color 0.2s ease;
}

.site-footer a:hover {
  color: var(--brand-primary);
}

/* Modern Responsive Design */
@media (max-width: 1200px) {
  .container {
    width: 90%;
    padding: 0 2rem;
  }

  .hero-grid {
    gap: 3rem;
  }

  .cards-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }
}

@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .two-col {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .benefits-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }

  .steps {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }
}

@media (max-width: 768px) {
  :root {
    --header-h: 60px;
  }

  .section {
    padding: 60px 0;
  }

  .hero {
    padding: 80px 0 60px;
  }

  .hero h1 {
    font-size: clamp(2rem, 8vw, 3.5rem);
  }

  .hero-grid {
    gap: 2rem;
  }

  .cards-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .benefits-grid {
    grid-template-columns: 1fr;
  }

  .steps {
    grid-template-columns: 1fr;
  }

  .testimonials {
    grid-template-columns: 1fr;
  }

  .form {
    padding: 2rem;
  }
}

@media (max-width: 640px) {
  .nav-menu {
    position: fixed;
    z-index: 230;
    inset: var(--header-h) 0 0 0;
    background: var(--bg-surface);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    transform: translateY(-120%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-xl);
  }

  .nav-menu ul {
    flex-direction: column;
    padding: 2rem;
    gap: 1rem;
  }

  .nav-menu a {
    padding: 1rem;
    border-radius: var(--radius-lg);
  }

  .nav-toggle {
    display: flex;
  }

  body.nav-open .nav-menu {
    transform: translateY(0);
  }

  .nav-toggle-checkbox:checked ~ .nav-menu {
    transform: translateY(0);
  }

  .hero-points {
    grid-template-columns: 1fr;
  }

  .hero .cta {
    flex-direction: column;
    align-items: stretch;
  }

  .hero .cta .btn {
    width: 100%;
  }

  .cta-strip .cta-inner {
    grid-template-columns: 1fr;
    gap: 1rem;
    text-align: center;
  }

  .footer-grid {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }

  .site-footer ul {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
  }

  .footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem 1.5rem;
    justify-content: center;
    list-style: none;
    padding: 0;
    margin: 0;
    max-width: 100%;
  }

  .footer-links li {
    margin: 0;
  }

  .footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
  }

.footer-links a:hover {
  color: var(--brand-primary);
}

/* Desktop footer links */
@media (min-width: 769px) {
  .footer-links {
    justify-content: center;
    max-width: 100%;
  }
}

  .floating-contacts {
    right: 1rem;
    bottom: 1rem;
  }

  .floating-contacts .fab {
    width: 44px;
    height: 44px;
  }

  .scrolling-testimonials {
    height: 40px;
    min-height: 40px;
    max-height: 45px;
  }

  .testimonial-item {
    min-width: 250px;
    padding: 8px 16px;
    font-size: 0.65rem;
  }
}


/* Active nav link */
.nav-menu a.active {
  color: var(--text-primary);
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Theme Toggle */
.theme-toggle {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 0.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.theme-toggle:hover {
  background: var(--bg-surface-hover);
  border-color: var(--border-hover);
  transform: scale(1.05);
}

.theme-toggle-icon {
  width: 20px;
  height: 20px;
  fill: var(--text-primary);
  transition: transform 0.3s ease;
}

[data-theme="light"] .theme-toggle-icon {
  transform: rotate(180deg);
}

/* Utility Classes */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.glass-effect {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
}

.gradient-text {
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}


/* Modern CTA strip */
.cta-strip {
  background: var(--bg-surface);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  backdrop-filter: blur(10px);
}

.cta-strip .cta-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2rem;
  align-items: center;
  padding: 3rem 0;
}

.cta-strip h3 {
  margin: 0;
  color: var(--text-primary);
}

/* Accordion Test Descriptions */
.test-description {
  display: none;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-top: 0.5rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow-md);
  opacity: 0;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  max-height: 0;
  overflow: hidden;
  grid-column: 1 / -1; /* Span across all grid columns */
  width: 100%;
}

.test-description.show {
  display: block;
  opacity: 1;
  transform: translateY(0);
  max-height: 1000px; /* Increased from 500px */
}

.test-description h4 {
  margin: 0 0 1rem 0;
  color: var(--brand-primary);
  font-size: 1.1rem;
  font-weight: 600;
}

.test-description p {
  margin: 0;
  color: var(--text-primary);
  line-height: 1.6;
  font-size: 0.9rem;
}

.test-item.active {
  background: var(--brand-primary) !important;
  color: white !important;
  border-color: var(--brand-primary) !important;
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
}

/* Show more/less tests button */
.show-more-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.75rem 1rem;
  margin: 1rem 0;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
}

.show-more-btn:hover {
  background: var(--bg-hover);
  border-color: var(--brand-primary);
  color: var(--brand-primary);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.show-more-btn .show-more-icon {
  transition: transform 0.3s ease;
}

.show-more-btn.expanded .show-more-icon {
  transform: rotate(180deg);
}

.show-more-btn .show-less-text {
  display: none;
}

.show-more-btn.expanded .show-more-text {
  display: none;
}

.show-more-btn.expanded .show-less-text {
  display: inline;
}

/* Hidden tests container */
.hidden-tests {
  animation: fadeIn 0.3s ease-in-out;
}

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

/* Certifications section */
.certifications-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.certification-item {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
  transition: all 0.3s ease;
}

.certification-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.certification-item img {
  width: 100%;
  height: auto;
  max-height: 400px;
  object-fit: contain;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

@media (max-width: 768px) {
  .certifications-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .certification-item {
    padding: 1rem;
  }
}

/* Military Support Banner */
.military-support {
  margin: 2rem 0;
}

.military-banner {
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, #005BBB 0%, #FFD500 100%);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}

.military-banner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="%23ffffff" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="%23ffffff" opacity="0.1"/><circle cx="50" cy="10" r="0.5" fill="%23ffffff" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
  pointer-events: none;
}

.military-icon {
  font-size: 3rem;
  margin-right: 2rem;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.military-content h3 {
  color: white;
  margin-bottom: 1rem;
  font-size: 1.5rem;
  font-weight: 700;
}

.military-content p {
  color: white;
  margin-bottom: 0.5rem;
  line-height: 1.6;
}

.military-content .disclaimer {
  background: rgba(255, 255, 255, 0.2);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md);
  border-left: 4px solid #FFD500;
  font-weight: 600;
  margin-top: 1rem;
}

@media (max-width: 768px) {
  .military-banner {
    flex-direction: column;
    text-align: center;
    padding: 1.5rem;
  }

  .military-icon {
    margin-right: 0;
    margin-bottom: 1rem;
  }

  .military-content h3 {
    font-size: 1.3rem;
  }
}

/* Testimonials */
.testimonials {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.testimonials blockquote {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-md);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.testimonials blockquote:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.testimonials blockquote p {
  font-size: 1.1rem;
  line-height: 1.6;
  margin-bottom: 1rem;
  font-style: italic;
  color: var(--text-primary);
}

.testimonials blockquote cite {
  font-size: 0.9rem;
  color: var(--brand-primary);
  font-weight: 600;
  display: block;
  text-align: right;
}

@media (max-width: 768px) {
  .testimonials {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .testimonials blockquote {
    padding: 1.5rem;
  }
}

/* Test Item Styles */
.test-item {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  margin-bottom: 0.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
  font-size: 0.85rem;
  color: var(--text-primary);
  width: 100%;
  backdrop-filter: blur(5px);
}

.test-item:hover {
  background: var(--bg-surface-hover);
  border-color: var(--border-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.test-item:active {
  transform: translateY(0);
}


/* Modern Floating Contact Buttons */
.floating-contacts {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  display: grid;
  gap: 1rem;
  z-index: 60;
}

.fab {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  box-shadow: var(--shadow-lg);
  border: 2px solid rgba(255, 255, 255, 0.2);
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.fab:hover {
  transform: translateY(-4px) scale(1.05);
  box-shadow: var(--shadow-xl);
}

.fab-wa {
  background: linear-gradient(135deg, #25D366, #128C7E);
}

.fab-tg {
  background: linear-gradient(135deg, #26A5E4, #0088CC);
}

.form-status {
  margin-top: 1rem;
  font-weight: 600;
  padding: 1rem;
  border-radius: var(--radius-md);
  text-align: center;
}

.form-status.success {
  color: var(--success);
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.form-status.error {
  color: var(--error);
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.btn[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
}

.input-error {
  border-color: var(--error) !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15) !important;
}

/* Mobile refinements */
@media (max-width: 720px) {
  .container { width: 92%; }
  .section { padding: 32px 0; }
  .nav { height: 56px; }
  h1 { font-size: 2rem; }
  h2 { font-size: 1.5rem; }
  .cta .btn { width: 100%; }
  .two-col { grid-template-columns: 1fr; gap: 14px; }
  .cards-grid { grid-template-columns: 1fr; gap: 12px; }
  .benefits-grid { grid-template-columns: 1fr; gap: 12px; }
  .steps { grid-template-columns: 1fr; gap: 10px; }
  .form { padding: 16px; }
  .form-row { margin-bottom: 12px; }
  input[type="text"], input[type="email"], input[type="tel"], textarea { font-size: 16px; }
}

/* Phone input consistency */
input[type="tel"] { width: 100%; padding: 12px 12px; border: 1px solid #d1d5db; border-radius: 10px; font-size: 1rem; background: #fff; }
input[type="tel"]:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--ring); }

/* Mobile refinements v2 */
@media (max-width: 720px) {
  .section { padding: 36px 0; }
  .nav { height: 56px; }
  .nav-menu { position: fixed; z-index: 120; inset: 56px 0 0 0; z-index: 120; max-height: calc(100vh - 56px); overflow-y: auto; }
}

/* To-top button */
.to-top { position: fixed; right: 16px; bottom: 80px; width: 44px; height: 44px; border-radius: 999px; border: 1px solid #e5e7eb; background: #fff; box-shadow: 0 6px 18px rgba(0,0,0,.12); display: grid; place-items: center; font-weight: 700; color: #111827; opacity: 0; pointer-events: none; transition: opacity .2s ease, transform .2s ease; z-index: 120; }
.to-top.show { opacity: 1; pointer-events: auto; }
.to-top:hover { transform: translateY(-2px); }

body, html { overflow-x: hidden; }
/* overflow guard */


@media (max-width: 720px) {
  .nav-menu { position: fixed; inset: 56px 0 0 0; background:#fff; border-bottom:1px solid #e5e7eb; transform: translateY(-120%); transition: transform .2s ease; z-index: 220; }
  body.nav-open .nav-menu { transform: translateY(0); }
  .nav-toggle-checkbox:checked ~ .nav-menu { transform: translateY(0); }
}

body { padding-top: var(--header-h); }

@media (max-width: 720px) {
  :root { --header-h: 56px; }
  .nav { height: var(--header-h); }
  .nav-menu { inset: var(--header-h) 0 0 0; }
}

/* Scrolling testimonials */
.scrolling-testimonials {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(6px);
  border-top: 1px solid #e5e7eb;
  z-index: 100;
  padding: 6px 0;
  box-shadow: 0 -1px 3px rgba(0,0,0,0.05);
  height: auto;
  min-height: 50px;
  max-height: 60px;
  overflow: hidden;
}

.scrolling-container {
  max-width: 1200px;
  margin: 0 auto;
  overflow: hidden;
  position: relative;
}

.scrolling-content {
  display: flex;
  animation: scroll 45s linear infinite;
  gap: 16px;
  padding: 0 16px;
  align-items: center;
  height: 100%;
}

.scrolling-content:hover {
  animation-play-state: paused;
}

.testimonial-item {
  flex: 0 0 auto;
  background: white;
  padding: 12px 20px;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  border: 1px solid #e5e7eb;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: normal;
  min-width: 300px;
  max-width: none;
  overflow: visible;
}

.testimonial-item:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.testimonial-item {
  font-size: 0.7rem;
  color: #374151;
  font-weight: 500;
  line-height: 1.3;
  text-align: center;
}

@keyframes scroll {
  0% { transform: translateX(100%); }
  100% { transform: translateX(-100%); }
}

/* Service prices */
.service-price {
  font-weight: 600;
  color: var(--brand-700);
  font-size: 0.95rem;
  margin: 12px 0;
  padding: 8px 12px;
  background: rgba(99, 102, 241, 0.1);
  border-radius: 8px;
  text-align: center;
}

/* Tests section */
.tests-grid {
  display: flex;
  flex-direction: column;
  gap: 32px;
  margin-top: 24px;
}

.tests-category h3 {
  color: var(--brand-700);
  margin-bottom: 16px;
  font-size: 1.1rem;
}

.tests-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 8px;
}

/* Основні методики в один ряд */
.main-tests .tests-list {
  grid-template-columns: repeat(4, 1fr);
}

/* Спеціалізовані тести в кілька рядів */
.specialized-tests .tests-list {
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}

/* Адаптивність для мобільних */
@media (max-width: 768px) {
  .main-tests .tests-list {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }
}

@media (max-width: 480px) {
  .main-tests .tests-list,
  .specialized-tests .tests-list {
    grid-template-columns: 1fr;
  }
}

.test-item {
  background: #f8fafc;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 0.85rem;
  color: #475569;
  border: 1px solid #e2e8f0;
  transition: background 0.2s ease;
}

.test-item:hover {
  background: var(--brand-50);
  border-color: var(--brand-200);
}

.section-intro {
  font-size: 1.1rem;
  color: #6b7280;
  margin-bottom: 24px;
  text-align: center;
}

/* Adjust body padding for fixed testimonials */
body {
  padding-bottom: 95px;
}

