/* ==========================================================================
   SYNOVIAFLEX™ | SWISS BIOCLINIC DESIGN SYSTEM
   Preset 1: "Швейцарська біоклініка"
   Colors: Ice White, Deep Teal Pine, Titanium Silver, Slate Navy, Subtle Gold
   Typography: Plus Jakarta Sans / System Medical Fonts
   ========================================================================== */

:root {
  /* Brand Palette */
  --primary-teal: #0f766e;
  --primary-teal-dark: #0d5d57;
  --primary-teal-light: #14b8a6;
  --teal-subtle: #f0fdfa;
  --teal-border: #99f6e4;
  --teal-glow: rgba(15, 118, 110, 0.12);

  --accent-blue: #0284c7;
  --blue-subtle: #f0f9ff;
  --gold-accent: #d97706;
  --gold-subtle: #fef3c7;
  --danger-red: #dc2626;
  --success-green: #16a34a;
  --success-subtle: #dcfce7;

  /* Neutrals */
  --bg-pure: #ffffff;
  --bg-ice: #f8fafc;
  --bg-section: #f4f8fb;
  --bg-card: #ffffff;
  --border-light: #e2e8f0;
  --border-subtle: #f1f5f9;
  
  --text-main: #1e293b;
  --text-muted: #64748b;
  --text-heading: #0f172a;
  --text-white: #ffffff;

  /* Typography */
  --font-main: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  /* Shadows & Radius */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 4px 14px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 10px 30px rgba(15, 23, 42, 0.1);
  --shadow-teal: 0 10px 25px rgba(15, 118, 110, 0.2);

  --transition-fast: 0.18s ease;
  --transition-normal: 0.28s cubic-bezier(0.4, 0, 0.2, 1);

  --header-height: 72px;
}

/* Reset & Box Sizing */
*, *::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;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-pure);
  color: var(--text-main);
  line-height: 1.65;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

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

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

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

button, input, select, textarea {
  font-family: inherit;
  font-size: 1rem;
}

/* Container */
.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
}

.container-narrow {
  max-width: 860px;
}

.container-tight {
  max-width: 680px;
}

/* Section Helpers */
.section {
  padding: 80px 0;
}

.section-ice {
  background-color: var(--bg-ice);
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
}

.section-teal-tint {
  background-color: var(--teal-subtle);
  border-top: 1px solid var(--teal-border);
  border-bottom: 1px solid var(--teal-border);
}

.section-dark {
  background-color: var(--text-heading);
  color: #f8fafc;
}

.section-header {
  text-align: center;
  max-width: 780px;
  margin: 0 auto 50px;
}

.section-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background-color: var(--teal-subtle);
  border: 1px solid var(--teal-border);
  border-radius: var(--radius-full);
  color: var(--primary-teal);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 16px;
}

.section-badge.blue {
  background-color: var(--blue-subtle);
  border-color: #bae6fd;
  color: var(--accent-blue);
}

.section-badge.gold {
  background-color: var(--gold-subtle);
  border-color: #fde68a;
  color: var(--gold-accent);
}

.section-title {
  font-size: 2.35rem;
  font-weight: 800;
  color: var(--text-heading);
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin-bottom: 18px;
}

.section-desc {
  font-size: 1.12rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all var(--transition-fast);
  text-align: center;
  min-height: 48px;
  min-width: 44px;
}

.btn-primary {
  background-color: var(--primary-teal);
  color: #ffffff;
  box-shadow: var(--shadow-teal);
}

.btn-primary:hover {
  background-color: var(--primary-teal-dark);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(15, 118, 110, 0.28);
}

.btn-secondary {
  background-color: var(--bg-pure);
  color: var(--text-heading);
  border-color: var(--border-light);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  border-color: var(--primary-teal);
  color: var(--primary-teal);
  background-color: var(--teal-subtle);
}

.btn-outline-white {
  background-color: transparent;
  border-color: #ffffff;
  color: #ffffff;
}

.btn-outline-white:hover {
  background-color: #ffffff;
  color: var(--text-heading);
}

.btn-lg {
  padding: 16px 36px;
  font-size: 1.1rem;
  border-radius: var(--radius-lg);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.88rem;
  min-height: 38px;
  border-radius: var(--radius-sm);
}

.btn-block {
  width: 100%;
}

/* ==========================================================================
   NAVIGATION BAR (Strict Desktop + Compact Mobile)
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
  height: var(--header-height);
  display: flex;
  align-items: center;
  transition: all var(--transition-fast);
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Brand Logo */
.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-heading);
  letter-spacing: -0.01em;
}

.logo-icon-box {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, var(--primary-teal), #042f2e);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 1.1rem;
  font-weight: 900;
  box-shadow: 0 4px 10px rgba(15, 118, 110, 0.25);
}

.logo-badge {
  font-size: 0.65rem;
  background-color: var(--teal-subtle);
  color: var(--primary-teal);
  border: 1px solid var(--teal-border);
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 800;
  text-transform: uppercase;
  margin-left: 4px;
}

/* Desktop Navigation Menu */
.nav-menu {
  display: flex;
  align-items: center;
  gap: 24px;
  list-style: none;
}

.nav-link {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-main);
  padding: 6px 4px;
  position: relative;
  transition: color var(--transition-fast);
}

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

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--primary-teal);
  border-radius: 2px;
}

/* Header Action Controls */
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Language Toggle Switcher */
.lang-toggle {
  display: inline-flex;
  align-items: center;
  background-color: var(--bg-ice);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-full);
  padding: 3px;
}

.lang-btn {
  border: none;
  background: none;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: all var(--transition-fast);
}

.lang-btn.active {
  background-color: var(--bg-pure);
  color: var(--primary-teal);
  box-shadow: var(--shadow-sm);
}

/* Header Cart Icon Button */
.header-cart-btn {
  position: relative;
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  background-color: var(--teal-subtle);
  border: 1px solid var(--teal-border);
  color: var(--primary-teal);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.header-cart-btn:hover {
  background-color: var(--primary-teal);
  color: #ffffff;
}

.cart-count-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  background-color: var(--danger-red);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 800;
  min-width: 20px;
  height: 20px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  border: 2px solid #ffffff;
}

/* Mobile Hamburger Toggle Button */
.mobile-nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border-light);
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-heading);
}

/* Mobile Navigation Drawer */
.mobile-nav-drawer {
  position: fixed;
  top: 0;
  right: -320px;
  width: 300px;
  height: 100vh;
  background-color: var(--bg-pure);
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.15);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 24px;
}

.mobile-nav-drawer.open {
  right: 0;
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-light);
}

.drawer-close-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-muted);
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.drawer-menu {
  list-style: none;
  padding: 20px 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex: 1;
  overflow-y: auto;
}

.drawer-link {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-heading);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
}

.drawer-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(4px);
  z-index: 1999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease;
}

.drawer-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer {
  background-color: #0b1322;
  color: #94a3b8;
  padding: 70px 0 30px;
  margin-top: auto;
  border-top: 1px solid #1e293b;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 40px;
  margin-bottom: 60px;
}

.footer-brand h3 {
  color: #ffffff;
  font-size: 1.35rem;
  font-weight: 800;
  margin-bottom: 12px;
}

.footer-brand p {
  font-size: 0.92rem;
  line-height: 1.6;
  margin-bottom: 20px;
}

.footer-title {
  color: #ffffff;
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 18px;
  letter-spacing: 0.02em;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links a {
  color: #94a3b8;
  font-size: 0.92rem;
  transition: color var(--transition-fast);
}

.footer-links a:hover {
  color: #ffffff;
}

.footer-compliance-box {
  background-color: #131d2e;
  border: 1px solid #1e293b;
  border-radius: var(--radius-md);
  padding: 16px;
  font-size: 0.82rem;
  line-height: 1.5;
}

.footer-bottom {
  border-top: 1px solid #1e293b;
  padding-top: 25px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 0.85rem;
}

.footer-disclaimer {
  max-width: 800px;
  font-size: 0.78rem;
  line-height: 1.5;
  color: #64748b;
  margin-bottom: 20px;
}

/* ==========================================================================
   COOKIE BANNER
   ========================================================================== */
.cookie-banner {
  position: fixed;
  bottom: 24px;
  left: 24px;
  right: 24px;
  max-width: 580px;
  background-color: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-light);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.16);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  z-index: 2500;
  display: none;
  animation: slideUpFade 0.4s ease;
}

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

.cookie-content h4 {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-heading);
  margin-bottom: 6px;
}

.cookie-content p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 16px;
}

.cookie-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* ==========================================================================
   TOAST SYSTEM
   ========================================================================== */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  background-color: var(--text-heading);
  color: #ffffff;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  font-size: 0.92rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  pointer-events: auto;
  animation: toastIn 0.3s ease;
  transition: opacity 0.3s ease;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateX(30px); }
  to { opacity: 1; transform: translateX(0); }
}
