/* ===================================
   SRV Biosciences - Main Stylesheet
   Vanilla CSS conversion from Tailwind
   =================================== */

/* CSS Custom Properties (Design Tokens) */
:root {
  /* Colors */
  --color-primary: #1e40af;
  --color-secondary: #1e293b;
  --color-blue-50: #eff6ff;
  --color-blue-100: #dbeafe;
  --color-blue-400: #60a5fa;
  --color-blue-500: #3b82f6;
  --color-blue-600: #2563eb;
  --color-blue-700: #1d4ed8;
  --color-blue-800: #1e40af;
  --color-blue-900: #1e3a8a;
  --color-purple-600: #9333ea;
  --color-purple-700: #7e22ce;
  --color-slate-50: #f8fafc;
  --color-slate-100: #f1f5f9;
  --color-slate-200: #e2e8f0;
  --color-slate-300: #cbd5e1;
  --color-slate-400: #94a3b8;
  --color-slate-500: #64748b;
  --color-slate-600: #475569;
  --color-slate-700: #334155;
  --color-slate-800: #1e293b;
  --color-slate-900: #0f172a;
  --color-indigo-50: #eef2ff;
  --color-indigo-500: #6366f1;
  --color-indigo-700: #4338ca;
  --color-emerald-50: #ecfdf5;
  --color-emerald-100: #d1fae5;
  --color-emerald-500: #10b981;
  --color-emerald-600: #059669;
  --color-violet-500: #8b5cf6;
  --color-rose-50: #fff1f2;
  --color-rose-700: #be123c;
  --color-green-50: #f0fdf4;
  --color-green-100: #dcfce7;
  --color-green-600: #16a34a;
  --color-red-50: #fef2f2;
  --color-red-600: #dc2626;
  
  /* Fonts */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  
  /* Spacing */
  --spacing-1: 0.25rem;
  --spacing-2: 0.5rem;
  --spacing-3: 0.75rem;
  --spacing-4: 1rem;
  --spacing-6: 1.5rem;
  --spacing-8: 2rem;
  --spacing-10: 2.5rem;
  --spacing-12: 3rem;
  --spacing-16: 4rem;
  --spacing-20: 5rem;
  --spacing-24: 6rem;
  
  /* 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);
  --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);
  
  /* Border Radius */
  --radius-sm: 0.125rem;
  --radius-md: 0.375rem;
  --radius-lg: 0.5rem;
  --radius-xl: 0.75rem;
  --radius-2xl: 1rem;
  --radius-3xl: 1.5rem;
  --radius-full: 9999px;
}

/* Reset & Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  color: var(--color-slate-600);
  background-color: white;
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex-grow: 1;
  position: relative;
  z-index: 10;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  color: var(--color-slate-900);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.025em;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

::selection {
  background-color: var(--color-blue-500);
  color: white;
}

/* Utility Classes */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1rem;
}

.text-center {
  text-align: center;
}

.relative {
  position: relative;
}

.absolute {
  position: absolute;
}

.fixed {
  position: fixed;
}

.sticky {
  position: sticky;
}

.z-10 {
  z-index: 10;
}

.z-20 {
  z-index: 20;
}

.z-50 {
  z-index: 50;
}

/* Flexbox Utilities */
.flex {
  display: flex;
}

.inline-flex {
  display: inline-flex;
}

.flex-col {
  flex-direction: column;
}

.items-center {
  align-items: center;
}

.items-start {
  align-items: flex-start;
}

.justify-center {
  justify-content: center;
}

.justify-between {
  justify-content: space-between;
}

.gap-2 {
  gap: var(--spacing-2);
}

.gap-3 {
  gap: var(--spacing-3);
}

.gap-4 {
  gap: var(--spacing-4);
}

.gap-6 {
  gap: var(--spacing-6);
}

.gap-8 {
  gap: var(--spacing-8);
}

.gap-12 {
  gap: var(--spacing-12);
}

.gap-16 {
  gap: var(--spacing-16);
}

.flex-grow {
  flex-grow: 1;
}

.flex-shrink-0 {
  flex-shrink: 0;
}

/* Grid Utilities */
.grid {
  display: grid;
}

.grid-cols-1 {
  grid-template-columns: repeat(1, minmax(0, 1fr));
}

.grid-cols-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-cols-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

/* Spacing Utilities */
.p-2 { padding: var(--spacing-2); }
.p-3 { padding: var(--spacing-3); }
.p-4 { padding: var(--spacing-4); }
.p-6 { padding: var(--spacing-6); }
.p-8 { padding: var(--spacing-8); }
.p-10 { padding: var(--spacing-10); }

.px-3 { padding-left: var(--spacing-3); padding-right: var(--spacing-3); }
.px-4 { padding-left: var(--spacing-4); padding-right: var(--spacing-4); }
.px-6 { padding-left: var(--spacing-6); padding-right: var(--spacing-6); }
.px-8 { padding-left: var(--spacing-8); padding-right: var(--spacing-8); }
.px-10 { padding-left: var(--spacing-10); padding-right: var(--spacing-10); }

.py-1 { padding-top: var(--spacing-1); padding-bottom: var(--spacing-1); }
.py-2 { padding-top: var(--spacing-2); padding-bottom: var(--spacing-2); }
.py-3 { padding-top: var(--spacing-3); padding-bottom: var(--spacing-3); }
.py-4 { padding-top: var(--spacing-4); padding-bottom: var(--spacing-4); }
.py-10 { padding-top: var(--spacing-10); padding-bottom: var(--spacing-10); }
.py-16 { padding-top: var(--spacing-16); padding-bottom: var(--spacing-16); }
.py-20 { padding-top: var(--spacing-20); padding-bottom: var(--spacing-20); }
.py-24 { padding-top: var(--spacing-24); padding-bottom: var(--spacing-24); }

.m-auto { margin: auto; }
.mx-auto { margin-left: auto; margin-right: auto; }
.mb-2 { margin-bottom: var(--spacing-2); }
.mb-3 { margin-bottom: var(--spacing-3); }
.mb-4 { margin-bottom: var(--spacing-4); }
.mb-6 { margin-bottom: var(--spacing-6); }
.mb-8 { margin-bottom: var(--spacing-8); }
.mb-10 { margin-bottom: var(--spacing-10); }
.mb-12 { margin-bottom: var(--spacing-12); }
.mb-16 { margin-bottom: var(--spacing-16); }
.mb-20 { margin-bottom: var(--spacing-20); }

.mt-2 { margin-top: var(--spacing-2); }
.mt-4 { margin-top: var(--spacing-4); }
.mt-6 { margin-top: var(--spacing-6); }
.mt-8 { margin-top: var(--spacing-8); }
.mt-20 { margin-top: var(--spacing-20); }

/* Width & Height */
.w-full { width: 100%; }
.h-full { height: 100%; }
.min-h-screen { min-height: 100vh; }

/* Border Radius */
.rounded-sm { border-radius: var(--radius-sm); }
.rounded-md { border-radius: var(--radius-md); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-xl { border-radius: var(--radius-xl); }
.rounded-2xl { border-radius: var(--radius-2xl); }
.rounded-3xl { border-radius: var(--radius-3xl); }
.rounded-full { border-radius: var(--radius-full); }

/* Shadows */
.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow-md { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }
.shadow-xl { box-shadow: var(--shadow-xl); }
.shadow-2xl { box-shadow: var(--shadow-2xl); }

/* Borders */
.border { border: 1px solid var(--color-slate-200); }
.border-t { border-top: 1px solid var(--color-slate-200); }
.border-y { border-top: 1px solid var(--color-slate-200); border-bottom: 1px solid var(--color-slate-200); }

/* Background Colors */
.bg-white { background-color: white; }
.bg-slate-50 { background-color: var(--color-slate-50); }
.bg-slate-100 { background-color: var(--color-slate-100); }
.bg-slate-900 { background-color: var(--color-slate-900); }
.bg-blue-50 { background-color: var(--color-blue-50); }
.bg-blue-600 { background-color: var(--color-blue-600); }
.bg-blue-800 { background-color: var(--color-blue-800); }

/* Text Colors */
.text-white { color: white; }
.text-slate-300 { color: var(--color-slate-300); }
.text-slate-400 { color: var(--color-slate-400); }
.text-slate-500 { color: var(--color-slate-500); }
.text-slate-600 { color: var(--color-slate-600); }
.text-slate-700 { color: var(--color-slate-700); }
.text-slate-800 { color: var(--color-slate-800); }
.text-slate-900 { color: var(--color-slate-900); }
.text-blue-600 { color: var(--color-blue-600); }
.text-blue-700 { color: var(--color-blue-700); }

/* Font Sizes */
.text-xs { font-size: 0.75rem; line-height: 1rem; }
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.text-base { font-size: 1rem; line-height: 1.5rem; }
.text-lg { font-size: 1.125rem; line-height: 1.75rem; }
.text-xl { font-size: 1.25rem; line-height: 1.75rem; }
.text-2xl { font-size: 1.5rem; line-height: 2rem; }
.text-3xl { font-size: 1.875rem; line-height: 2.25rem; }
.text-4xl { font-size: 2.25rem; line-height: 2.5rem; }
.text-5xl { font-size: 3rem; line-height: 1; }
.text-7xl { font-size: 4.5rem; line-height: 1; }

/* Font Weight */
.font-light { font-weight: 300; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }

/* Text Transform */
.uppercase { text-transform: uppercase; }
.italic { font-style: italic; }

/* Letter Spacing */
.tracking-tight { letter-spacing: -0.025em; }
.tracking-wide { letter-spacing: 0.025em; }
.tracking-wider { letter-spacing: 0.05em; }

/* Line Height */
.leading-relaxed { line-height: 1.625; }
.leading-tight { line-height: 1.25; }

/* Overflow */
.overflow-hidden { overflow: hidden; }

/* Transitions */
.transition-all {
  transition-property: all;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 300ms;
}

.transition-colors {
  transition-property: color, background-color, border-color;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 300ms;
}

.transition-transform {
  transition-property: transform;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 300ms;
}

.duration-300 { transition-duration: 300ms; }
.duration-500 { transition-duration: 500ms; }
.duration-700 { transition-duration: 700ms; }
.duration-1000 { transition-duration: 1000ms; }

/* Hover Effects */
.hover\:scale-105:hover {
  transform: scale(1.05);
}

.hover\:scale-110:hover {
  transform: scale(1.1);
}

.hover\:-translate-y-1:hover {
  transform: translateY(-0.25rem);
}

.hover\:-translate-y-2:hover {
  transform: translateY(-0.5rem);
}

.hover\:text-blue-600:hover {
  color: var(--color-blue-600);
}

.hover\:text-blue-700:hover {
  color: var(--color-blue-700);
}

.hover\:bg-slate-50:hover {
  background-color: var(--color-slate-50);
}

.hover\:bg-blue-600:hover {
  background-color: var(--color-blue-600);
}

.hover\:bg-blue-700:hover {
  background-color: var(--color-blue-700);
}

.hover\:shadow-lg:hover {
  box-shadow: var(--shadow-lg);
}

.hover\:shadow-xl:hover {
  box-shadow: var(--shadow-xl);
}

/* Custom Component Styles */
.glass-panel {
  background-color: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--color-slate-100);
  box-shadow: var(--shadow-sm);
}

.glass-card {
  background-color: white;
  border: 1px solid var(--color-slate-100);
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
}

.glass-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-0.25rem);
}

/* Header Styles */
header {
  position: sticky;
  top: 0;
  z-index: 50;
  transition: all 0.3s ease;
}

header nav {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 2rem;
  height: 6rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

header .logo-container {
  position: relative;
  width: 16rem;
  height: 5rem;
}

header .logo-container img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

header nav ul {
  list-style: none;
  display: flex;
  gap: 2rem;
  align-items: center;
  font-size: 1rem;
  font-weight: 500;
  color: var(--color-slate-600);
}

header nav ul li a {
  position: relative;
  transition: color 0.3s ease;
}

header nav ul li a:hover {
  color: var(--color-blue-700);
}

header nav ul li a.active {
  color: var(--color-blue-700);
  font-weight: 600;
}

/* Footer Styles */
footer {
  background-color: var(--color-slate-900);
  color: var(--color-slate-300);
  margin-top: 0;
  padding-top: var(--spacing-16);
  padding-bottom: var(--spacing-8);
  position: relative;
  z-index: 10;
}

footer h4 {
  color: white;
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: var(--spacing-4);
}

footer a:hover {
  color: #60a5fa;
  transition: color 0.3s ease;
}

footer .footer-grid {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 2rem;
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: var(--spacing-12);
}

footer .footer-bottom {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 2rem;
  margin-top: var(--spacing-12);
  padding-top: var(--spacing-8);
  border-top: 1px solid var(--color-slate-800);
  text-align: center;
  font-size: 0.75rem;
  color: var(--color-slate-500);
}

/* Button Styles */
.btn {
  display: inline-block;
  padding: 1rem 2.5rem;
  border-radius: var(--radius-full);
  font-weight: 700;
  transition: all 0.3s ease;
  text-align: center;
}

.btn-primary {
  background-color: var(--color-blue-800);
  color: white;
  box-shadow: 0 20px 25px -5px rgba(30, 64, 175, 0.2);
}

.btn-primary:hover {
  background-color: var(--color-blue-900);
}

.btn-secondary {
  background-color: white;
  color: var(--color-slate-800);
  border: 1px solid var(--color-slate-200);
  box-shadow: var(--shadow-md);
}

.btn-secondary:hover {
  background-color: var(--color-slate-50);
  border-color: var(--color-slate-300);
}

/* Form Styles */
input, textarea, select {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-xl);
  border: 1px solid var(--color-slate-200);
  background-color: var(--color-slate-50);
  font-family: inherit;
  font-size: 1rem;
  transition: all 0.3s ease;
  outline: none;
}

input:focus, textarea:focus, select:focus {
  background-color: white;
  border-color: var(--color-blue-500);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-slate-700);
  margin-bottom: var(--spacing-2);
}

/* Responsive Design */
@media (min-width: 768px) {
  .md\:grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  
  .md\:grid-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  
  .md\:grid-cols-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  
  .md\:flex {
    display: flex;
  }
  
  .md\:flex-row {
    flex-direction: row;
  }
  
  .md\:text-4xl {
    font-size: 2.25rem;
    line-height: 2.5rem;
  }
  
  .md\:text-5xl {
    font-size: 3rem;
    line-height: 1;
  }
  
  .md\:text-7xl {
    font-size: 4.5rem;
    line-height: 1;
  }
  
  footer .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .lg\:grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  
  .lg\:grid-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  
  .lg\:grid-cols-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  
  .lg\:px-8 {
    padding-left: var(--spacing-8);
    padding-right: var(--spacing-8);
  }
  
  footer .footer-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (min-width: 1280px) {
  .xl\:grid-cols-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* Hide on mobile */
@media (max-width: 767px) {
  .hidden-mobile {
    display: none !important;
  }
  
  header nav ul.hidden-mobile {
    display: none;
  }
}

/* Show only on mobile */
@media (min-width: 768px) {
  .mobile-only {
    display: none !important;
  }
}

/* ===================================
   Mobile Hamburger Menu
   =================================== */
.mobile-menu-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: var(--radius-lg);
  background: transparent;
  border: 1px solid var(--color-slate-200);
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  z-index: 60;
}

.mobile-menu-btn:hover {
  background-color: var(--color-slate-50);
}

.mobile-menu-btn span {
  display: block;
  width: 1.25rem;
  height: 2px;
  background-color: var(--color-slate-700);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.mobile-menu-btn span:nth-child(1) {
  margin-bottom: 4px;
}

.mobile-menu-btn span:nth-child(3) {
  margin-top: 4px;
}

/* Hamburger to X animation */
.mobile-menu-btn.active span:nth-child(1) {
  transform: rotate(45deg) translate(4px, 4px);
}

.mobile-menu-btn.active span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
  transform: rotate(-45deg) translate(4px, -4px);
}

/* Mobile Navigation Overlay */
.mobile-nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 40;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.mobile-nav-overlay.active {
  opacity: 1;
}

.mobile-nav {
  display: none;
  position: fixed;
  top: 0;
  right: -100%;
  width: 80%;
  max-width: 320px;
  height: 100%;
  background-color: white;
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
  z-index: 55;
  padding: 6rem 2rem 2rem;
  transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
}

.mobile-nav.active {
  right: 0;
}

.mobile-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.mobile-nav ul li a {
  display: block;
  padding: 1rem 1.25rem;
  font-size: 1.0625rem;
  font-weight: 500;
  color: var(--color-slate-700);
  border-radius: var(--radius-lg);
  transition: all 0.2s ease;
}

.mobile-nav ul li a:hover,
.mobile-nav ul li a.active {
  background-color: var(--color-blue-50);
  color: var(--color-blue-700);
  font-weight: 600;
}

.mobile-nav .mobile-nav-contact {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-slate-100);
}

.mobile-nav .mobile-nav-contact a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0;
  font-size: 0.875rem;
  color: var(--color-slate-500);
  transition: color 0.2s ease;
}

.mobile-nav .mobile-nav-contact a:hover {
  color: var(--color-blue-600);
}

.mobile-nav .mobile-nav-contact svg {
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
}

@media (max-width: 767px) {
  .mobile-menu-btn {
    display: flex;
  }
  
  .mobile-nav-overlay {
    display: block;
  }
  
  .mobile-nav {
    display: block;
  }
  
  /* Prevent body scroll when menu is open */
  body.menu-open {
    overflow: hidden;
  }
}

/* ===================================
   Responsive Design Improvements
   =================================== */

/* Small mobile (< 480px) */
@media (max-width: 479px) {
  header nav {
    padding: 0 1rem;
    height: 4.5rem;
  }
  
  header .logo-container {
    width: 11rem;
    height: 3.5rem;
  }
  
  .btn {
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
  }
  
  footer .footer-grid {
    padding: 0 1rem;
  }
  
  footer .footer-bottom {
    padding: 0 1rem;
  }
  
  /* Responsive hero text */
  h1 {
    font-size: 2rem !important;
  }
  
  h2 {
    font-size: 1.5rem !important;
  }
}

/* Tablet (768px - 1023px) */
@media (min-width: 768px) and (max-width: 1023px) {
  header nav {
    padding: 0 1.5rem;
  }
  
  header nav ul {
    gap: 1.25rem;
    font-size: 0.9375rem;
  }
}

/* Touch-friendly slider controls on mobile */
@media (max-width: 767px) {
  .slider-prev,
  .slider-next {
    opacity: 0.7 !important;
    padding: 0.75rem !important;
  }
  
  .slider-prev svg,
  .slider-next svg {
    width: 1.5rem !important;
    height: 1.5rem !important;
  }
}
