/* ============================================
   3BIO Design System — Website Rebuild 2026
   ============================================ */

/* ---------- CSS Custom Properties ---------- */
:root {
  /* Brand Colors — Logo accent */
  --green-primary: #007349;
  --green-dark: #005a3a;
  --green-light: #E8F5EE;
  --green-sage: #2E7653;
  --green-sage-light: #EDF2EE;
  --red-primary: #A42828;
  --red-warm: #8C2B20;
  --red-light: #FDF2F2;
  --red-warm-light: #F5EDEC;

  /* Neutrals */
  --dark: #1D2327;
  --dark-medium: #2C3338;
  --gray-700: #44515A;
  --gray-500: #6B7280;
  --gray-400: #9CA3AF;
  --gray-200: #E5E7EB;
  --gray-100: #F3F4F6;
  --off-white: #F7F7F5;
  --white: #FFFFFF;

  /* Typography */
  --font-heading: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-body: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;

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

  /* Layout */
  --max-width: 1200px;
  --nav-height: 80px;
  --border-radius: 8px;
  --border-radius-lg: 12px;
  --border-radius-xl: 16px;

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

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

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Scroll offset for fixed navbar */
[id] {
  scroll-margin-top: calc(var(--nav-height) + 2rem);
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--gray-700);
  background: var(--white);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

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

a:hover {
  color: var(--green-dark);
}

/* ---------- Typography ---------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--red-warm);
  line-height: 1.2;
  font-weight: 600;
}

h1 { font-size: 3rem; letter-spacing: -0.02em; }
h2 { font-size: 2.25rem; letter-spacing: -0.015em; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }

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

.text-sm { font-size: 0.875rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }

.text-green { color: var(--green-primary); }
.text-red { color: var(--red-warm); }
.text-gray { color: var(--gray-500); }
.text-white { color: var(--white); }
.text-dark { color: var(--dark); }

.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.font-medium { font-weight: 500; }

/* ---------- Layout Utilities ---------- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-xl);
}

.section {
  padding: var(--space-5xl) 0;
}

.section--sm {
  padding: var(--space-3xl) 0;
}

.section--dark {
  background: var(--dark);
  color: var(--white);
}

.section--dark h2, .section--dark h3, .section--dark h4 {
  color: var(--white);
}

.section--green {
  background: var(--green-primary);
  color: var(--white);
}

.section--green h2, .section--green h3 {
  color: var(--white);
}

.section--light {
  background: var(--green-sage-light);
}

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

.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); }

.flex {
  display: flex;
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.text-center { text-align: center; }
.mx-auto { margin-left: auto; margin-right: auto; }

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

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

.nav__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-xl);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0;
}

.nav__logo {
  height: 320px;
  flex-shrink: 0;
  overflow: hidden;
  max-width: 230px;
}

.nav__logo img {
  height: 100%;
  width: auto;
  margin-left: -10px;
}

.nav__menu {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  list-style: none;
}

.nav__item {
  position: relative;
}

.nav__link {
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 0.5rem 0.65rem;
  font-size: 0.83rem;
  font-weight: 500;
  color: var(--gray-700);
  border-radius: var(--border-radius);
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.nav__link:hover {
  color: var(--green-primary);
  background: var(--green-sage-light);
}

.nav__link svg {
  width: 12px;
  height: 12px;
  transition: transform var(--transition-fast);
}

.nav__item:hover .nav__link svg {
  transform: rotate(180deg);
}

/* Dropdown */
.nav__dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 260px;
  background: var(--white);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--gray-200);
  padding: var(--space-sm);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all var(--transition-base);
  list-style: none;
}

.nav__item:hover .nav__dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav__dropdown li a {
  display: block;
  padding: var(--space-sm) var(--space-md);
  font-size: 0.875rem;
  color: var(--gray-700);
  border-radius: var(--border-radius);
  transition: all var(--transition-fast);
}

.nav__dropdown li a:hover {
  background: var(--green-sage-light);
  color: var(--green-primary);
}

/* CTA Button in nav */
.nav__cta {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 0.95rem;
  background: var(--green-primary);
  color: var(--white) !important;
  font-size: 0.83rem;
  font-weight: 600;
  border-radius: var(--border-radius);
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.nav__cta:hover {
  background: var(--green-dark);
  color: var(--white) !important;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 0.75rem 1.75rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--border-radius);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
}

.btn--primary {
  background: var(--green-primary);
  color: var(--white);
}

.btn--primary:hover {
  background: var(--green-dark);
  color: var(--white);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn--secondary {
  background: transparent;
  color: var(--green-primary);
  border-color: var(--green-primary);
}

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

.btn--white {
  background: var(--white);
  color: var(--green-primary);
}

.btn--white:hover {
  background: var(--off-white);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn--red {
  background: var(--red-primary);
  color: var(--white);
}

.btn--red:hover {
  background: var(--red-warm);
  color: var(--white);
}

.btn--lg {
  padding: 1rem 2.25rem;
  font-size: 1.05rem;
}

.btn--sm {
  padding: 0.5rem 1.25rem;
  font-size: 0.85rem;
}

/* ---------- Cards ---------- */
.card {
  background: var(--white);
  border-radius: var(--border-radius-lg);
  padding: var(--space-2xl);
  transition: all var(--transition-base);
}

.card--bordered {
  border: 1px solid var(--gray-200);
}

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

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

.card ul {
  padding-left: 24px;
}

/* Pillar Cards */
.pillar-card {
  background: var(--white);
  border-radius: var(--border-radius-xl);
  padding: var(--space-2xl);
  border: 1px solid var(--gray-200);
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.pillar-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
}

.pillar-card--biosafety::before { background: var(--green-primary); }
.pillar-card--biodiversity::before { background: var(--red-primary); }
.pillar-card--biotech::before { background: var(--dark); }

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

.pillar-card__icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-lg);
  font-size: 1.5rem;
}

.pillar-card--biosafety .pillar-card__icon {
  background: var(--green-light);
  color: var(--green-primary);
}

.pillar-card--biodiversity .pillar-card__icon {
  background: var(--red-light);
  color: var(--red-primary);
}

.pillar-card--biotech .pillar-card__icon {
  background: #F0F0F0;
  color: var(--dark);
}

.pillar-card__title {
  font-size: 1.35rem;
  margin-bottom: var(--space-md);
}

.pillar-card__text {
  color: var(--gray-500);
  margin-bottom: var(--space-lg);
  font-size: 0.95rem;
}

.pillar-card__services {
  list-style: none;
  margin-bottom: var(--space-lg);
}

.pillar-card__services li {
  padding: var(--space-xs) 0;
  font-size: 0.875rem;
  color: var(--gray-700);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.pillar-card__services li::before {
  content: '→';
  color: var(--green-sage);
  font-weight: 600;
}

/* ---------- Hero ---------- */
.hero {
  padding-top: calc(var(--nav-height) + var(--space-5xl));
  padding-bottom: var(--space-5xl);
  background: linear-gradient(135deg, var(--dark) 0%, var(--dark-medium) 100%);
  color: var(--white);
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 60%;
  height: 200%;
  background: radial-gradient(ellipse, rgba(24,144,70,0.12) 0%, transparent 70%);
  pointer-events: none;
}

.hero__badge {
  display: none;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-xs) var(--space-md);
  background: rgba(134,158,144,0.2);
  border: 1px solid rgba(134,158,144,0.4);
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--green-sage);
  margin-bottom: var(--space-xl);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Homepage exception: show badge only on index.html */
.hero:not(.hero--inner) .hero__badge {
  display: inline-flex;
}

.hero h1 {
  color: var(--white);
  font-size: 3.5rem;
  max-width: 700px;
  margin-bottom: var(--space-lg);
  line-height: 1.1;
}

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

.hero__subtitle {
  font-size: 1.2rem;
  color: var(--gray-400);
  max-width: 560px;
  margin-bottom: var(--space-2xl);
  line-height: 1.7;
}

.hero__actions {
  display: flex;
  gap: var(--space-md);
  margin-bottom: var(--space-3xl);
}

.hero__stats {
  display: flex;
  gap: var(--space-3xl);
  padding-top: var(--space-2xl);
  border-top: 1px solid rgba(255,255,255,0.1);
}

.hero__stat {
  text-align: left;
}

.hero__stat-number {
  font-size: 2rem;
  font-weight: 700;
  color: var(--white);
}

.hero__stat-label {
  font-size: 0.85rem;
  color: var(--gray-400);
  margin-top: 2px;
}

/* ---------- Section Headers ---------- */
.section-header {
  max-width: 640px;
  margin-bottom: var(--space-3xl);
}

.section-header.centered {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

.section-header__label {
  display: none;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--green-sage);
  margin-bottom: var(--space-md);
}

/* Homepage exception: show the badge on index.html */
.hero .section-header__label {
  display: inline-block;
}

.section-header h2 {
  margin-bottom: var(--space-md);
}

.section-header p {
  color: var(--gray-500);
  font-size: 1.1rem;
}

/* ---------- Team Grid ---------- */
.team-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-xl);
}

.team-card {
  text-align: center;
}

.team-card__photo {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto var(--space-md);
  border: 3px solid var(--gray-200);
  transition: all var(--transition-base);
}

.team-card:hover .team-card__photo {
  border-color: var(--green-sage);
  transform: scale(1.04);
}

.team-card__placeholder {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: var(--green-light);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-md);
  font-size: 2rem;
  font-weight: 700;
  color: var(--green-primary);
  border: 3px solid var(--gray-200);
}

.team-card__name {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--red-warm);
  margin-bottom: 2px;
}

.team-card__role {
  font-size: 0.85rem;
  color: var(--gray-500);
}

.team-card__memoriam {
  font-style: italic;
  color: var(--gray-400);
  font-size: 0.8rem;
  margin-top: 4px;
}

/* ---------- FAQ Accordion ---------- */
.faq-list {
  max-width: 800px;
}

.faq-item {
  border-bottom: 1px solid var(--gray-200);
}

.faq-item:first-child {
  border-top: 1px solid var(--gray-200);
}

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-lg) 0;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--dark);
  cursor: pointer;
  transition: color var(--transition-fast);
  width: 100%;
  background: none;
  border: none;
  text-align: left;
  font-family: var(--font-body);
}

.faq-question:hover {
  color: var(--green-sage);
}

.faq-question svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  transition: transform var(--transition-fast);
  color: var(--gray-400);
}

.faq-item.active .faq-question svg {
  transform: rotate(45deg);
  color: var(--green-sage);
}

.faq-answer {
  padding-bottom: var(--space-lg);
  color: var(--gray-500);
  font-size: 0.95rem;
  line-height: 1.7;
  display: none;
}

.faq-item.active .faq-answer {
  display: block;
}

/* ---------- Footer ---------- */
.footer {
  background: var(--dark);
  color: var(--gray-400);
  padding: var(--space-4xl) 0 var(--space-xl);
}

.footer__grid {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2xl);
  margin-bottom: var(--space-3xl);
}

.footer__brand {
  flex: 2 0 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
}


.footer__grid > div:not(.footer__brand) {
  flex: 1 0 0;
}

.footer__brand p {
  font-size: 0.9rem;
  line-height: 1.6;
  margin-top: 0;
  color: var(--gray-400);
}

.footer__heading {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--white);
  margin-bottom: var(--space-lg);
}

.footer__links {
  list-style: none;
}

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

.footer__links a {
  font-size: 0.875rem;
  color: var(--gray-400);
  transition: color var(--transition-fast);
}

.footer__links a:hover {
  color: var(--white);
}

.footer__bottom {
  padding-top: var(--space-xl);
  border-top: 1px solid rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
}

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

.footer__social a {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-400);
  transition: all var(--transition-fast);
}

.footer__social a:hover {
  background: var(--green-primary);
  color: var(--white);
}

/* ---------- Service Page Styles ---------- */
.service-hero {
  padding-top: calc(var(--nav-height) + var(--space-4xl));
  padding-bottom: var(--space-3xl);
  background: linear-gradient(135deg, var(--dark) 0%, var(--dark-medium) 100%);
  color: var(--white);
}

.service-hero h1 {
  color: var(--white);
  font-size: 2.75rem;
  max-width: 700px;
  margin-bottom: var(--space-md);
}

.service-hero p {
  font-size: 1.15rem;
  color: var(--gray-400);
  max-width: 600px;
}

.breadcrumb {
  display: none;
  gap: var(--space-sm);
  font-size: 0.85rem;
  margin-bottom: var(--space-xl);
  color: var(--gray-400);
}

.breadcrumb a {
  color: var(--gray-400);
}

.breadcrumb a:hover {
  color: var(--white);
}

.breadcrumb span {
  color: var(--gray-500);
}

/* ---------- Tools/Feature Cards ---------- */
.feature-card {
  background: var(--white);
  border-radius: var(--border-radius-xl);
  padding: var(--space-2xl);
  border: 1px solid var(--gray-200);
  transition: all var(--transition-base);
}

.feature-card:hover {
  box-shadow: var(--shadow-lg);
  border-color: var(--green-sage);
}

.feature-card__icon {
  width: 48px;
  height: 48px;
  border-radius: var(--border-radius);
  background: var(--green-light);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-lg);
  font-size: 1.25rem;
}

.feature-card__title {
  font-size: 1.15rem;
  margin-bottom: var(--space-sm);
}

.feature-card__text {
  font-size: 0.9rem;
  color: var(--gray-500);
}

/* ---------- CTA Banner ---------- */
.cta-banner {
  background: var(--green-primary);
  border-radius: var(--border-radius-xl);
  padding: var(--space-3xl) var(--space-4xl);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2xl);
}

.cta-banner h2 {
  color: var(--white);
  font-size: 1.75rem;
  max-width: 500px;
}

.cta-banner p {
  color: rgba(255,255,255,0.85);
  margin-top: var(--space-sm);
  font-size: 1rem;
}

/* ---------- Contact Form ---------- */
.form-group {
  margin-bottom: var(--space-lg);
}

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

.form-input,
.form-textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  border: 1px solid var(--gray-200);
  border-radius: var(--border-radius);
  background: var(--white);
  transition: border-color var(--transition-fast);
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--green-primary);
  box-shadow: 0 0 0 3px rgba(24,144,70,0.1);
}

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

/* ---------- Tag / Badge ---------- */
.tag {
  display: inline-flex;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.tag--green {
  background: var(--green-light);
  color: var(--green-primary);
}

.tag--red {
  background: var(--red-light);
  color: var(--red-primary);
}

.tag--dark {
  background: var(--gray-100);
  color: var(--dark);
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .footer__grid { flex-wrap: wrap; }
  .footer__brand { flex: 1 0 100%; }
  .footer__grid > div:not(.footer__brand) { flex: 1 0 calc(33% - var(--space-2xl)); }
  .team-grid { grid-template-columns: repeat(3, 1fr); }
  .cta-banner { flex-direction: column; text-align: center; padding: var(--space-2xl); }
}

@media (max-width: 768px) {
  h1 { font-size: 2.25rem; }
  h2 { font-size: 1.75rem; }
  .hero h1 { font-size: 2.5rem; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .team-grid { grid-template-columns: repeat(2, 1fr); }
  .footer__grid { flex-direction: column; }
  .footer__brand, .footer__grid > div:not(.footer__brand) { flex: 1 0 100%; }
  .hero__stats { flex-direction: column; gap: var(--space-lg); }
  .hero__actions { flex-direction: column; }
  .nav__menu { display: none; } /* Mobile menu toggled via JS */
  .section { padding: var(--space-3xl) 0; }
}

@media (max-width: 480px) {
  .team-grid { grid-template-columns: 1fr; }
  .container { padding: 0 var(--space-md); }
}
