/* ============================================
   OLIVA LAB - Design System
   IQS Colors: Dark Blue (#00195C), Bright Green (#16DE66)
   ============================================ */

/* CSS Custom Properties */
:root {
  /* IQS Brand Colors */
  --primary-dark: #00195C;
  --primary-light: #002a8c;
  --accent: #16DE66;
  --accent-hover: #12c557;

  /* Neutrals */
  --white: #ffffff;
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1e293b;
  --gray-900: #0f172a;

  /* Typography */
  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;

  /* Border Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-full: 9999px;

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

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-normal: 250ms ease;
  --transition-slow: 350ms ease;

  /* Container */
  --container-max: 1200px;
  --container-narrow: 800px;
}

/* Reset & Base */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-primary);
  line-height: 1.6;
  color: var(--gray-800);
  background-color: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 700;
  line-height: 1.2;
  color: var(--primary-dark);
}

h1 {
  font-size: 2.5rem;
  margin-bottom: var(--space-lg);
}

h2 {
  font-size: 2rem;
  margin-bottom: var(--space-md);
}

h3 {
  font-size: 1.5rem;
  margin-bottom: var(--space-md);
}

h4 {
  font-size: 1.25rem;
  margin-bottom: var(--space-sm);
}

h5 {
  font-size: 1.125rem;
  margin-bottom: var(--space-sm);
}

h6 {
  font-size: 1rem;
  margin-bottom: var(--space-sm);
}

p {
  margin-bottom: var(--space-md);
  color: var(--gray-600);
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--accent-hover);
}

/* Container */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.container-narrow {
  max-width: var(--container-narrow);
}

/* ============================================
   NAVIGATION
   ============================================ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  z-index: 1000;
  transition: box-shadow var(--transition-normal);
}

.nav.scrolled {
  box-shadow: var(--shadow-md);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.nav-logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary-dark);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.nav-logo span {
  color: var(--accent);
}

.nav-logos {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.logo-img {
  height: 50px;
  width: auto;
  object-fit: contain;
}

/* Make BIOMEND mark more legible in the navbar */
.nav-logo .logo-img {
  height: 66px;
  width: auto;
}

.nav-links {
  display: flex;
  gap: var(--space-xl);
  list-style: none;
}

.lang-switch-item {
  display: flex;
  align-items: center;
}

.lang-switch {
  display: inline-flex;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-full);
  overflow: hidden;
  background: var(--gray-50);
}

.lang-btn {
  border: none;
  background: transparent;
  color: var(--gray-600);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 0.3rem 0.6rem;
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast);
}

.lang-btn:hover {
  background: var(--gray-100);
  color: var(--primary-dark);
}

.lang-btn.active {
  background: var(--accent);
  color: var(--primary-dark);
}

.lang-btn:focus-visible {
  outline: 2px solid var(--primary-light);
  outline-offset: 1px;
}

.nav-link {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--gray-600);
  text-decoration: none;
  padding: var(--space-sm) 0;
  position: relative;
  transition: color var(--transition-fast);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width var(--transition-normal);
}

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

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

/* Mobile Navigation */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-sm);
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--primary-dark);
  transition: transform var(--transition-fast), opacity var(--transition-fast);
}

@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

  .nav-logo .logo-img {
    height: 58px;
  }

  .nav-links {
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--white);
    padding: var(--space-lg);
    gap: var(--space-md);
    border-bottom: 1px solid var(--gray-200);
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
  }

  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .nav-link {
    font-size: 1.125rem;
    padding: var(--space-sm) 0;
  }

  .lang-switch-item {
    justify-content: flex-start;
    margin-top: var(--space-sm);
  }
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-light) 100%);
  overflow: hidden;
  padding-top: 72px;
}

.hero::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"><circle cx="50" cy="50" r="1" fill="rgba(255,255,255,0.1)"/></svg>');
  background-size: 50px 50px;
  opacity: 0.5;
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: var(--space-3xl) 0;
}

.hero h1 {
  font-size: 3.5rem;
  color: var(--white);
  margin-bottom: var(--space-lg);
  letter-spacing: -0.02em;
}

.hero h1 span {
  color: var(--accent);
}

.hero-subtitle {
  font-size: 1.5rem;
  color: rgba(255, 255, 255, 0.9);
  max-width: 700px;
  margin: 0 auto var(--space-2xl);
  font-weight: 400;
}

.hero-cta {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
  flex-wrap: wrap;
}

@media (max-width: 768px) {
  .hero h1 {
    font-size: 2.25rem;
  }

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

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-xl);
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
}

.btn-primary {
  background: var(--accent);
  color: var(--primary-dark);
  border-color: var(--accent);
}

.btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-outline {
  background: transparent;
  color: var(--white);
  border-color: var(--white);
}

.btn-outline:hover {
  background: var(--white);
  color: var(--primary-dark);
}

.btn-secondary {
  background: var(--gray-100);
  color: var(--primary-dark);
  border-color: var(--gray-200);
}

.btn-secondary:hover {
  background: var(--gray-200);
  transform: translateY(-2px);
}

/* ============================================
   SECTIONS
   ============================================ */
.section {
  padding: var(--space-3xl) 0;
}

.section-alt {
  background: var(--gray-50);
}

.section-header {
  text-align: center;
  margin-bottom: var(--space-3xl);
}

.section-title {
  position: relative;
  display: inline-block;
  padding-bottom: var(--space-md);
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: var(--accent);
  border-radius: var(--radius-full);
}

.section-subtitle {
  font-size: 1.125rem;
  color: var(--gray-500);
  max-width: 600px;
  margin: var(--space-lg) auto 0;
}

/* ============================================
   CARDS
   ============================================ */
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  box-shadow: var(--shadow-md);
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

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

.card-icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--accent) 0%, #0fd95e 100%);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-lg);
  font-size: 1.5rem;
}

.card-title {
  font-size: 1.25rem;
  margin-bottom: var(--space-md);
}

.card-text {
  color: var(--gray-600);
  font-size: 0.9375rem;
  margin-bottom: 0;
}

/* Grid Layouts */
.grid {
  display: grid;
  gap: var(--space-xl);
}

.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 992px) {

  .grid-3,
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {

  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   RESEARCH CARDS
   ============================================ */
.research-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: var(--white);
  box-shadow: var(--shadow-lg);
}

.research-card-image {
  height: 200px;
  overflow: hidden;
}

.research-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.research-card:hover .research-card-image img {
  transform: scale(1.05);
}

.research-card-content {
  padding: var(--space-xl);
}

.research-card-title {
  font-size: 1.25rem;
  margin-bottom: var(--space-md);
  color: var(--primary-dark);
}

.research-card-text {
  color: var(--gray-600);
  font-size: 0.9375rem;
  line-height: 1.7;
}

/* ============================================
   PUBLICATIONS
   ============================================ */
.publication-item {
  padding: var(--space-xl);
  border-radius: var(--radius-lg);
  background: var(--white);
  border-left: 4px solid var(--accent);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
}

.publication-item:hover {
  box-shadow: var(--shadow-md);
  transform: translateX(4px);
}

.publication-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--primary-dark);
  margin-bottom: var(--space-sm);
}

.publication-authors {
  font-size: 0.875rem;
  color: var(--gray-500);
  margin-bottom: var(--space-xs);
}

.publication-journal {
  font-size: 0.875rem;
  color: var(--gray-400);
  font-style: italic;
}

.publications-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

/* ============================================
   TEAM
   ============================================ */
.team-card {
  text-align: center;
  padding: var(--space-xl);
  background: var(--white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

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

.team-photo {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  margin: 0 auto var(--space-lg);
  overflow: hidden;
  border: 4px solid var(--accent);
  box-shadow: var(--shadow-md);
}

.team-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.team-photo-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary-light));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: var(--white);
  font-weight: 700;
}

.team-name {
  font-size: 1.125rem;
  color: var(--primary-dark);
  margin-bottom: var(--space-xs);
}

.team-role {
  font-size: 0.875rem;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: var(--space-sm);
}

.team-bio {
  font-size: 0.875rem;
  color: var(--gray-500);
  line-height: 1.6;
}

/* Team Section Dividers */
.team-section-title {
  font-size: 1.5rem;
  color: var(--primary-dark);
  margin: var(--space-3xl) 0 var(--space-xl);
  padding-bottom: var(--space-md);
  border-bottom: 2px solid var(--gray-200);
}

.team-section-title:first-child {
  margin-top: 0;
}

/* ============================================
   NEWS / TIMELINE
   ============================================ */
.timeline {
  position: relative;
  padding-left: var(--space-2xl);
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--gray-200);
}

.timeline-item {
  position: relative;
  padding-bottom: var(--space-xl);
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: calc(-1 * var(--space-2xl) - 5px);
  top: 6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--white);
  box-shadow: var(--shadow-sm);
}

.timeline-date {
  font-size: 0.875rem;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: var(--space-sm);
}

.timeline-content {
  background: var(--white);
  padding: var(--space-lg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.timeline-title {
  font-size: 1rem;
  color: var(--primary-dark);
  margin-bottom: var(--space-sm);
}

.timeline-text {
  font-size: 0.9375rem;
  color: var(--gray-600);
  margin-bottom: 0;
}

/* ============================================
   CONTACT
   ============================================ */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3xl);
}

@media (max-width: 768px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
}

.contact-item {
  display: flex;
  gap: var(--space-md);
}

.contact-icon {
  width: 50px;
  height: 50px;
  background: var(--gray-100);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: var(--accent);
  flex-shrink: 0;
}

.contact-label {
  font-size: 0.875rem;
  color: var(--gray-500);
  margin-bottom: var(--space-xs);
}

.contact-value {
  font-size: 1rem;
  color: var(--primary-dark);
  font-weight: 500;
}

/* Contact Form */
.contact-form {
  background: var(--white);
  padding: var(--space-2xl);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
}

.form-group {
  margin-bottom: var(--space-lg);
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: var(--space-sm);
}

.form-input,
.form-textarea {
  width: 100%;
  padding: var(--space-md);
  font-size: 1rem;
  font-family: var(--font-primary);
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-md);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(22, 222, 102, 0.15);
}

.form-textarea {
  resize: vertical;
  min-height: 150px;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  background: var(--primary-dark);
  color: var(--white);
  padding: var(--space-3xl) 0 var(--space-xl);
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: var(--space-2xl);
  margin-bottom: var(--space-2xl);
}

.footer-brand {
  max-width: 300px;
}

.footer-logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--white);
  margin-bottom: var(--space-md);
}

.footer-logo span {
  color: var(--accent);
}

.footer-text {
  font-size: 0.9375rem;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.7;
}

.footer-links {
  display: flex;
  gap: var(--space-3xl);
}

.footer-links-column h4 {
  color: var(--white);
  font-size: 1rem;
  margin-bottom: var(--space-lg);
}

.footer-links-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.footer-links-list a {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9375rem;
  transition: color var(--transition-fast);
}

.footer-links-list a:hover {
  color: var(--accent);
}

.footer-bottom {
  padding-top: var(--space-xl);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-md);
}

.footer-copyright {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.5);
}

.footer-social {
  display: flex;
  gap: var(--space-md);
}

.footer-social a {
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  transition: background var(--transition-fast), transform var(--transition-fast);
}

.footer-social a:hover {
  background: var(--accent);
  transform: translateY(-2px);
}

@media (max-width: 768px) {
  .footer-content {
    flex-direction: column;
  }

  .footer-links {
    flex-direction: column;
    gap: var(--space-xl);
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
}

/* ============================================
   PARTNER LOGOS SECTION
   ============================================ */
.logos-section {
  background: var(--gray-50);
  padding: var(--space-2xl) 0;
}

.partner-logos {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3xl);
  flex-wrap: wrap;
}

.partner-logo {
  height: 150px;
  width: auto;
  object-fit: contain;
  opacity: 0.9;
  transition: opacity var(--transition-normal);
}

.partner-logo-biomend {
  height: 190px;
}

.partner-logo:hover {
  opacity: 1;
}

@media (max-width: 768px) {
  .partner-logos {
    gap: var(--space-xl);
  }

  .partner-logo {
    height: 100px;
  }

  .partner-logo-biomend {
    height: 130px;
  }
}

/* ============================================
   PAGE HEADERS (for inner pages)
   ============================================ */
.page-header {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-light) 100%);
  padding: calc(72px + var(--space-3xl)) 0 var(--space-3xl);
  text-align: center;
}

.page-header h1 {
  color: var(--white);
  margin-bottom: var(--space-md);
}

.page-header p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 1.125rem;
  max-width: 600px;
  margin: 0 auto;
}

/* ============================================
   UTILITIES
   ============================================ */
.text-center {
  text-align: center;
}

.text-left {
  text-align: left;
}

.text-right {
  text-align: right;
}

.mb-0 {
  margin-bottom: 0;
}

.mb-sm {
  margin-bottom: var(--space-sm);
}

.mb-md {
  margin-bottom: var(--space-md);
}

.mb-lg {
  margin-bottom: var(--space-lg);
}

.mb-xl {
  margin-bottom: var(--space-xl);
}

.mb-2xl {
  margin-bottom: var(--space-2xl);
}

.mt-0 {
  margin-top: 0;
}

.mt-sm {
  margin-top: var(--space-sm);
}

.mt-md {
  margin-top: var(--space-md);
}

.mt-lg {
  margin-top: var(--space-lg);
}

.mt-xl {
  margin-top: var(--space-xl);
}

.mt-2xl {
  margin-top: var(--space-2xl);
}

.hidden {
  display: none !important;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 0.6s ease forwards;
}

.fade-in-delay-1 {
  animation-delay: 0.1s;
}

.fade-in-delay-2 {
  animation-delay: 0.2s;
}

.fade-in-delay-3 {
  animation-delay: 0.3s;
}
