/* Static-site additions for genomebaseddiagnostics.com */

/* Animated 3D DNA helix in its own band above the homepage hero.
   The CSS breathes, glows and sweeps light; site.js adds a slow 3D tilt that follows the mouse or a finger. */
.dna-hero {
  position: relative;
  width: 100%;
  min-height: clamp(220px, 30vw, 420px);
  overflow: hidden;
  display: grid;
  place-items: center;
  perspective: 1200px;
  touch-action: pan-y;
  background: #fff;
  isolation: isolate;
}
.dna-stage {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  transform-style: preserve-3d;
  transform: rotateX(-2deg) rotateY(5deg);
  transition: transform 150ms ease-out;
  will-change: transform;
}
.dna-glow {
  position: absolute;
  width: 82%;
  height: 36%;
  top: 34%;
  border-radius: 50%;
  background:
    radial-gradient(circle at 20% 50%, rgba(118, 40, 255, .17), transparent 32%),
    radial-gradient(circle at 52% 50%, rgba(218, 42, 112, .14), transparent 34%),
    radial-gradient(circle at 84% 50%, rgba(255, 109, 0, .16), transparent 31%);
  filter: blur(38px);
  transform: translateZ(-45px);
  animation: glowBreathe 5.4s ease-in-out infinite;
  pointer-events: none;
}
.dna-shadow,
.dna-image {
  position: absolute;
  width: min(86%, 1100px);
  height: auto;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
}
.dna-shadow {
  opacity: .18;
  filter: blur(13px) saturate(1.1);
  transform: translateZ(0) translateY(20px) scale(.985);
  animation: shadowBreathe 5.4s ease-in-out infinite;
}
.dna-image {
  transform: translateZ(82px);
  animation: dnaBreathe 5.4s ease-in-out infinite;
  filter: saturate(1.04) contrast(1.02);
  will-change: transform, filter;
}
.light-sweep {
  position: absolute;
  top: -30%;
  left: -24%;
  width: 14%;
  height: 170%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .52), transparent);
  transform: translateZ(110px) rotate(17deg);
  animation: lightSweep 7s ease-in-out infinite;
  mix-blend-mode: screen;
  pointer-events: none;
}
@keyframes dnaBreathe {
  0%, 100% { transform: translateZ(82px) translateY(-2px) scale(1); filter: saturate(1.03) contrast(1.02); }
  50% { transform: translateZ(102px) translateY(7px) scale(1.018); filter: saturate(1.10) contrast(1.035); }
}
@keyframes shadowBreathe {
  0%, 100% { transform: translateZ(0) translateY(19px) scale(.985); opacity: .16; }
  50% { transform: translateZ(0) translateY(28px) scale(1.015); opacity: .23; }
}
@keyframes glowBreathe {
  0%, 100% { transform: translateZ(-45px) scale(.96); opacity: .62; }
  50% { transform: translateZ(-45px) scale(1.08); opacity: .92; }
}
@keyframes lightSweep {
  0%, 20% { left: -24%; opacity: 0; }
  40% { opacity: .8; }
  68%, 100% { left: 114%; opacity: 0; }
}
@media (max-width: 650px) {
  .dna-hero { min-height: clamp(160px, 44vw, 300px); }
  .dna-image, .dna-shadow { width: 104%; max-width: none; }
}

/* Homepage feature boxes: the theme squeezed all four into 500px on tablets; show them two by two instead */
@media (min-width: 768px) and (max-width: 1024px) {
  .kb-row-layout-id366_51bf79-60 > .kt-row-column-wrap {
    max-width: 760px !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

/* "Why We Exist" under "Testing Shouldn't Be Hard": a small italic kicker, not a second headline */
.why-kicker.why-kicker {
  font-size: 1.25rem !important;
  font-style: italic !important;
  line-height: 1.4 !important;
  opacity: .8;
  margin: -.75rem 0 1.5rem !important;
}
/* Even gaps between the paragraphs in that section */
.kadence-column366_599138-85 .kt-inside-inner-col > p {
  margin: 0 0 1.1em !important;
}
.kadence-column366_599138-85 .kt-inside-inner-col > p:last-child {
  margin-bottom: 0 !important;
}

/* Homepage icon boxes (Advanced Testing etc.): WordPress dropped the 5px border and rounded corners on hover,
   which made the content jump. Instead the boxes float gently like the DNA helix (same 5.4 s breathing rhythm,
   staggered), and on hover rise a little higher with a soft shadow. No scaling, so the text never shimmers. */
[class*="kt-info-box366_"] .kt-blocks-info-box-link-wrap,
[class*="kt-info-box366_"] .kt-blocks-info-box-link-wrap:hover {
  border-width: 5px !important;
  border-style: solid !important;
  border-color: var(--global-palette7, #eeeeee) !important;
  border-radius: 30px !important;
}
.wp-block-kadence-infobox[class*="kt-info-box366_"] {
  animation: boxFloat 5.4s ease-in-out infinite;
}
.wp-block-kadence-column:nth-child(2) .wp-block-kadence-infobox[class*="kt-info-box366_"] { animation-delay: -1.35s; }
.wp-block-kadence-column:nth-child(3) .wp-block-kadence-infobox[class*="kt-info-box366_"] { animation-delay: -2.7s; }
.wp-block-kadence-column:nth-child(4) .wp-block-kadence-infobox[class*="kt-info-box366_"] { animation-delay: -4.05s; }
@keyframes boxFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}
[class*="kt-info-box366_"] .kt-blocks-info-box-link-wrap {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(45, 55, 72, .05);
  transition: transform 1.2s cubic-bezier(.22, .61, .36, 1), box-shadow 1.2s cubic-bezier(.22, .61, .36, 1) !important;
}
[class*="kt-info-box366_"] .kt-blocks-info-box-link-wrap:hover {
  transform: translateY(-8px);
  box-shadow: 0 10px 20px rgba(45, 55, 72, .08), 0 26px 50px rgba(45, 55, 72, .14);
}

/* PCR vs culture article: comparison table and references */
.pcr-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .95em;
}
.pcr-table th,
.pcr-table td {
  border: 1px solid #e2e8f0;
  padding: .6em .8em;
  text-align: left;
  vertical-align: top;
}
.pcr-table thead th {
  background: #edf2f7;
}
.pcr-table td:first-child {
  font-weight: 600;
}
.wp-block-table:has(.pcr-table) {
  overflow-x: auto;
}
.pcr-refs {
  font-size: .9em;
  line-height: 1.5;
}
.pcr-refs li {
  margin-bottom: .5em;
}
.pcr-note {
  font-size: .85em;
  font-style: italic;
  opacity: .8;
}

/* Colli-Pee instruction video (how-it-works page and first-void article) */
.kit-video {
  max-width: 900px;
  margin: 3rem auto;
  padding: 0 1rem;
  text-align: center;
}
.kit-video video,
video.fvu-video {
  display: block;
  width: 100%;
  max-width: 854px;
  height: auto;
  margin: 1.5rem auto;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 6px 24px rgba(45, 55, 72, .12);
}

/* Mycoplasma article: Ureaplasma note */
.ureaplasma-callout {
  background: #edf2f7;
  border-left: 5px solid #805ad5;
  border-radius: 12px;
  padding: 1rem 1.25rem;
  margin: 2rem 0;
}
.ureaplasma-callout h4 {
  margin-top: 0;
}

/* About page: Leadership */
.leadership {
  max-width: 900px;
  margin: 3rem auto 1rem;
  text-align: center;
}
.leadership h2 {
  margin-bottom: .25rem;
}
.leadership-kicker {
  font-style: italic;
  font-size: 1.15rem;
  opacity: .8;
  margin-top: 0;
}
.leadership-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
  margin-top: 1.5rem;
}
.leader {
  background: #edf2f7;
  border-radius: 24px;
  padding: 1.5rem 1rem;
}
.leader p {
  margin: 0;
}
.leader-name {
  font-weight: 600;
  font-size: 1.15rem;
}
.leader-title {
  opacity: .8;
  margin-top: .25rem !important;
}

/* Form spam trap: hidden from people, filled in by bots */
.hp-field {
  position: absolute !important;
  left: -10000px !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Mobile menu opened without WordPress's script */
.wp-block-navigation__responsive-container.is-menu-open {
  display: flex !important;
}

/* 404 page */
.notfound {
  max-width: 640px;
  margin: 4rem auto;
  padding: 0 1rem;
  text-align: center;
}

/* Insights > Testing & Diagnostics: wider nested menu that opens to the left (Insights sits near the right edge) */
@media (min-width: 600px) {
  .wp-block-navigation .wp-block-navigation__submenu-container .wp-block-navigation__submenu-container {
    left: auto !important;
    right: 100% !important;
    min-width: 270px !important;
  }
  .wp-block-navigation .wp-block-navigation__submenu-container .wp-block-navigation-submenu__toggle svg {
    transform: rotate(90deg);
  }
}
