:root {
  --primary-color: #2563eb;
  --primary-dark: #1e40af;
  --secondary-color: #10b981;
  --text-dark: #1f2937;
  --text-light: #6b7280;
  --text-base: #4b5563;
  --bg-light: #f9fafb;
  --bg-alt: #f3f4f6;
  --border-color: #e5e7eb;
  --white: #ffffff;
  --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1),
    0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    sans-serif;
  line-height: 1.6;
  color: var(--text-base);
  background-color: var(--white);
  font-weight: 400;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Navigation */
.navbar {
  background: var(--white);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 20px;
}

.nav-brand {
  font-family: "Raleway", sans-serif;
  font-size: 1.5rem;
  font-weight: 300;
  color: var(--primary-color);
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  text-decoration: none;
}

.nav-brand:hover {
  text-decoration: none;
  opacity: 0.9;
}

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

.nav-link {
  color: var(--text-dark);
  text-decoration: none;
  font-weight: 400;
  transition: color 0.3s;
  font-size: 0.95rem;
}

.nav-link:hover {
  color: var(--primary-color);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  background: none;
  border: none;
  cursor: pointer;
}

.nav-toggle span {
  width: 25px;
  height: 3px;
  background: var(--text-dark);
  margin: 3px 0;
  transition: 0.3s;
}

/* Hero Section */
.hero {
  padding: 3rem 0;
  background: linear-gradient(135deg, #6366f1 0%, #3b82f6 50%, #06b6d4 100%);
  text-align: center;
  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(255, 255, 255, 0.3) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 80% 20%,
      rgba(255, 255, 255, 0.3) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 40% 40%,
      rgba(255, 255, 255, 0.2) 0%,
      transparent 50%
    );
  animation: shimmer 15s ease-in-out infinite;
}

.hero-ripple {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  pointer-events: none;
}

.hero-ripple::before,
.hero-ripple::after,
.hero-ripple .ripple-1,
.hero-ripple .ripple-2,
.hero-ripple .ripple-3 {
  content: "";
  position: absolute;
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(0);
  animation: ripple-expand 6s linear infinite;
}

.hero-ripple::before {
  top: 30%;
  left: 20%;
  width: 300px;
  height: 300px;
  animation-delay: 0s;
}

.hero-ripple::after {
  top: 60%;
  left: 70%;
  width: 400px;
  height: 400px;
  animation-delay: 2s;
}

.hero-ripple .ripple-1 {
  top: 45%;
  left: 50%;
  width: 350px;
  height: 350px;
  animation-delay: 1s;
  border-color: rgba(255, 255, 255, 0.08);
}

.hero-ripple .ripple-2 {
  top: 70%;
  left: 30%;
  width: 250px;
  height: 250px;
  animation-delay: 3s;
  border-color: rgba(255, 255, 255, 0.06);
}

.hero-ripple .ripple-3 {
  top: 25%;
  left: 80%;
  width: 280px;
  height: 280px;
  animation-delay: 4s;
  border-color: rgba(255, 255, 255, 0.05);
}

@keyframes shimmer {
  0%,
  100% {
    opacity: 1;
    transform: scale(1) rotate(0deg);
  }
  50% {
    opacity: 0.7;
    transform: scale(1.1) rotate(1deg);
  }
}

@keyframes ripple-expand {
  0% {
    transform: translate(-50%, -50%) scale(0);
    opacity: 0.8;
  }
  50% {
    opacity: 0.4;
  }
  100% {
    transform: translate(-50%, -50%) scale(2.5);
    opacity: 0;
  }
}

.hero h1 {
  font-family: "Raleway", sans-serif;
  font-size: 1.9rem;
  font-weight: 200;
  color: var(--white);
  margin-bottom: 1rem;
  line-height: 1.2;
  position: relative;
  z-index: 1;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  letter-spacing: 1px;
}

.hero-subtitle {
  font-family: "Raleway", sans-serif;
  font-size: 1.35rem;
  color: rgba(255, 255, 255, 0.95);
  margin-bottom: 2rem;
  position: relative;
  z-index: 1;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  font-weight: 300;
  letter-spacing: 0.5px;
}

.hero-disclaimer {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 0.85rem 1.25rem;
  border-radius: 25px;
  margin-bottom: 2.5rem;
  max-width: 650px;
  margin-left: auto;
  margin-right: auto;
  position: relative;
  z-index: 1;
  backdrop-filter: blur(10px);
  color: rgba(255, 255, 255, 0.95);
  font-size: 0.9rem;
  text-align: center;
  font-weight: 300;
}

.hero-disclaimer strong {
  color: #ffffff;
  font-weight: 400;
}

/* Disclaimer for use on white/light backgrounds */
.section .hero-disclaimer,
.disclaimer-box {
  background: #fef3c7;
  border: 1px solid #fbbf24;
  color: #92400e;
  backdrop-filter: none;
}

.section .hero-disclaimer strong,
.disclaimer-box strong {
  color: #92400e;
  font-weight: 600;
}

/* BREAK tooltip */
.break-tooltip {
  position: relative;
  cursor: help;
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 3px;
}

.break-tooltip::before {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  padding: 0.5rem 1rem;
  background: rgba(31, 41, 55, 0.95);
  color: white;
  font-size: 0.875rem;
  font-weight: normal;
  text-transform: none;
  white-space: nowrap;
  border-radius: 6px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
  margin-bottom: 8px;
}

.break-tooltip::after {
  content: "";
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: rgba(31, 41, 55, 0.95);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
  margin-bottom: 2px;
}

.break-tooltip:hover::before,
.break-tooltip:hover::after {
  opacity: 1;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.85rem 1.75rem;
  font-weight: 500;
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.3s;
  margin: 0.5rem;
  position: relative;
  z-index: 2;
  font-size: 0.95rem;
}

.btn-primary {
  background: var(--white);
  color: var(--primary-color);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.btn-primary:hover {
  background: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: var(--white);
  border: 2px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(10px);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.5);
  color: var(--white);
  transform: translateY(-2px);
}

.btn-product {
  background: var(--secondary-color);
  color: var(--white);
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

.btn-product:hover {
  background: #059669;
}

/* Button variations for different sections */
.section .btn-primary,
.footer .btn-primary {
  background: var(--primary-color);
  color: var(--white);
}

.section .btn-primary:hover,
.footer .btn-primary:hover {
  background: var(--primary-dark);
}

.section .btn-secondary,
.footer .btn-secondary {
  background: var(--white);
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

.section .btn-secondary:hover,
.footer .btn-secondary:hover {
  background: var(--primary-color);
  color: var(--white);
}

/* Sections */
.section {
  padding: 5rem 0;
}

.section-alt {
  background: var(--bg-light);
}

.section h2 {
  font-size: 1.8rem;
  font-weight: 300;
  text-align: center;
  margin-bottom: 1rem;
  color: var(--text-dark);
  font-family: "Raleway", sans-serif;
  letter-spacing: 0.5px;
}

.section-lead {
  font-size: 1.1rem;
  color: var(--text-light);
  text-align: center;
  margin-bottom: 3.5rem;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.7;
  font-weight: 300;
}

/* Mechanism Grid */
.mechanism-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
  position: relative;
  z-index: 1;
  padding-top: 0.5rem; /* Space for tooltips above first row */
}

.mechanism-card {
  background: var(--white);
  padding: 2rem;
  border-radius: 12px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border-color);
  position: relative;
  overflow: visible;
  transition: transform 0.3s, box-shadow 0.3s;
}

.mechanism-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.mechanism-card h3 {
  color: var(--primary-color);
  margin-bottom: 0.75rem;
  font-size: 1.25rem;
  font-weight: 500;
}

.mechanism-card p {
  line-height: 1.7;
  color: var(--text-base);
}

/* Science Visual */
.science-visual {
  padding-top: 60px;
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

/* Critical Insight Box */
.critical-insight {
  background: #fef3c7;
  border: 2px solid #f59e0b;
  border-radius: 12px;
  padding: 2rem;
  margin: 2rem 0;
  text-align: left;
}

.critical-insight h4 {
  color: #92400e;
  margin-bottom: 1rem;
  font-size: 1.25rem;
}

.critical-insight p {
  margin: 1rem 0;
  line-height: 1.8;
}

.critical-insight ul {
  margin: 1rem 0 1rem 2rem;
}

.critical-insight li {
  margin: 0.5rem 0;
  color: #451a03;
}

.emphasis-text {
  font-weight: 600;
  font-size: 1.1rem;
  text-align: center;
  margin-top: 1.5rem !important;
}

.emphasis-text strong {
  font-weight: 800;
  color: #451a03;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.responsive-img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.image-caption {
  font-style: italic;
  color: var(--text-light);
  margin-top: 0.5rem;
}

/* Protocol Table */
.protocol-table {
  overflow-x: auto;
  margin-bottom: 3rem;
}

.protocol-table table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  box-shadow: var(--shadow);
}

.protocol-table th,
.protocol-table td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.protocol-table th {
  background: var(--bg-light);
  font-weight: 600;
  color: var(--text-dark);
}

.protocol-table tr:hover {
  background: var(--bg-light);
}

/* Dosing Schedule */
.dosing-schedule {
  margin-top: 3rem;
}

.dosing-schedule h3 {
  text-align: center;
  margin-bottom: 2rem;
}

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

.schedule-time {
  background: var(--white);
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.schedule-time h4 {
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.schedule-time ul {
  list-style: none;
}

.schedule-time li {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border-color);
}

.schedule-time li:last-child {
  border-bottom: none;
}

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

.product-card {
  background: var(--white);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.3s;
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.product-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  background: var(--bg-light);
}

.product-card h3 {
  padding: 1rem 1rem 0.5rem;
}

.product-card .product-dose {
  padding: 0 1rem;
  color: var(--primary-color);
  font-weight: 600;
}

.product-card p {
  padding: 0.5rem 1rem;
  color: var(--text-light);
}

.product-card .btn-product {
  margin: 1rem;
  display: block;
  text-align: center;
}

/* Timeline */
.timeline {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 100%;
  background: var(--border-color);
}

.timeline-item {
  position: relative;
  margin: 2rem 0;
}

.timeline-marker {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary-color);
  color: var(--white);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-weight: 600;
  white-space: nowrap;
  z-index: 10;
}

.timeline-content {
  background: var(--white);
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: var(--shadow);
  width: calc(50% - 2rem);
  margin-left: auto;
  transition: transform 0.3s, box-shadow 0.3s;
}

.timeline-content:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.timeline-item:nth-child(even) .timeline-content {
  margin-left: 0;
  margin-right: auto;
}

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

.monitoring-card {
  background: var(--white);
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

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

/* Product Preview Cards */
.product-preview-section {
  margin-top: 2.5rem;
  padding: 2rem;
  background: var(--bg-light);
  border-radius: 12px;
}

.product-preview-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1rem;
  margin-bottom: 1rem;
}

.product-preview-card {
  background: var(--white);
  padding: 1rem;
  border-radius: 8px;
  text-align: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  border: 1px solid var(--border-color);
  transition: all 0.2s ease;
}

.product-preview-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  border-color: var(--primary-color);
}

.product-preview-card h4 {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
}

.product-preview-card .product-price {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--secondary-color);
  margin-bottom: 0.25rem;
}

.product-preview-card .product-desc {
  font-size: 0.75rem;
  color: var(--text-light);
  margin: 0;
}

@media (max-width: 1200px) {
  .product-preview-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 768px) {
  .product-preview-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .product-preview-grid {
    grid-template-columns: 1fr;
  }
}

.monitoring-card ul {
  list-style-position: inside;
  color: var(--text-light);
}

.monitoring-card li {
  margin: 0.5rem 0;
}

/* References */
.references-container {
  max-width: 900px;
  margin: 0 auto;
}

.reference-section {
  margin-bottom: 2rem;
}

.reference-header {
  background: var(--bg-light);
  padding: 1rem 1.5rem;
  border-radius: 8px;
  cursor: pointer;
  user-select: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0;
  transition: all 0.3s ease;
}

.reference-header:hover {
  background: var(--bg-alt);
}

.toggle-icon {
  display: inline-block;
  transition: transform 0.3s ease;
  font-size: 0.8rem;
}

.reference-header.collapsed .toggle-icon {
  transform: rotate(-90deg);
}

.references-list {
  background: var(--white);
  padding: 2rem;
  border-radius: 8px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border-color);
  max-height: 300px;
  overflow-y: auto;
  transition: all 0.3s ease;
  margin-top: 0.5rem;
}

.references-list.collapsible {
  max-height: 300px;
  overflow: hidden;
}

.references-list.collapsible.collapsed {
  max-height: 0;
  padding: 0 2rem;
  border: none;
  box-shadow: none;
}

.references-list li {
  margin: 1rem 0;
  line-height: 1.8;
}

.references-list a {
  color: var(--primary-color);
  text-decoration: none;
}

.references-list a:hover {
  text-decoration: underline;
}

/* Footer */
.footer {
  background: var(--text-dark);
  color: var(--white);
  padding: 3rem 0 1rem;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-section h4 {
  margin-bottom: 1rem;
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid #374151;
  color: #9ca3af;
}

/* Explanation Toggle */
.explanation-toggle {
  text-align: center;
  margin: 2rem 0;
}

.toggle-btn {
  background: var(--white);
  border: 3px solid var(--primary-color);
  color: var(--primary-color);
  padding: 0.85rem 1.75rem;
  border-radius: 50px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.toggle-btn:hover {
  background: var(--primary-color);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.toggle-icon {
  font-size: 1.2rem;
}

.simple-content {
  display: none;
  animation: fadeIn 0.5s ease-out;
}

.technical-content {
  animation: fadeIn 0.5s ease-out;
}

/* Reference Links */
sup {
  font-size: 0.75em;
}

sup a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
}

sup a:hover {
  text-decoration: underline;
}

/* Highlight target reference */
.references-list li:target {
  background: #fef3c7;
  padding: 1.5rem;
  margin: 0.5rem -1rem;
  border-radius: 8px;
  animation: highlight 1s ease-out;
}

/* Fix anchor scroll position for sticky header */
.references-list li[id] {
  scroll-margin-top: 100px; /* Adjust based on navbar height */
}

.references-list li[id]:before {
  content: "";
  display: block;
  height: 80px; /* Height of navbar + some padding */
  margin-top: -80px;
  visibility: hidden;
  pointer-events: none;
}

@keyframes highlight {
  0% {
    background: #fbbf24;
  }
  100% {
    background: #fef3c7;
  }
}

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

/* Responsive Design */
@media (max-width: 768px) {
  .nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--white);
    flex-direction: column;
    padding: 1rem;
    box-shadow: var(--shadow);
  }

  .nav-menu.active {
    display: flex;
  }

  .nav-toggle {
    display: flex;
  }

  .hero h1 {
    font-size: 1.6rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .section h2 {
    font-size: 1.5rem;
  }

  .timeline::before {
    left: 20px;
  }

  .timeline-marker {
    left: 20px;
  }

  .timeline-content {
    width: calc(100% - 50px);
    margin-left: 50px;
  }

  .timeline-item:nth-child(even) .timeline-content {
    margin-left: 50px;
  }

  .mechanism-grid,
  .schedule-grid,
  .products-grid,
  .monitoring-grid {
    grid-template-columns: 1fr;
  }
}
