/* ==========================================================================
   GLOBAL RESET & BASE
   ========================================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Montserrat', sans-serif;
  background: #f8f9fa;
  color: #0f172a;
  line-height: 1.6;
  overflow-x: hidden;
}

/* ==========================================================================
   NAVBAR & HEADER
   ========================================================================== */
/* ==========================================================================
   NAVBAR – РАБОТЕЩ РЕСПОНСИВЕН ХАМБУРГЕР
   ========================================================================== */
/* ==========================================
   NAVBAR – РЕСПОНСИВЕН С ХАМБУРГЕР
========================================== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  padding: 1rem clamp(1.2rem, 4vw, 2.5rem);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: clamp(1.4rem, 4.5vw, 1.9rem);
  font-weight: 800;
  color: #e63946;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: clamp(1.2rem, 3vw, 2.2rem);
  margin: 0;
  transition: transform 0.45s cubic-bezier(0.77, 0, 0.175, 1);
}

.nav-links a {
  color: #1e293b;
  text-decoration: none;
  font-weight: 600;
  font-size: clamp(0.95rem, 2.2vw, 1.05rem);
  padding: 0.5rem 0.4rem;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  border-radius: 6px;
}

.nav-links a:hover,
.nav-links a:focus {
  color: #e63946;
  background: rgba(230, 57, 70, 0.08);
  transform: translateY(-2px);
}

/* Dropdown */
/* Dropdown – поправен позиция под линка */
.dropdown {
  position: relative;
}

.dropdown-toggle {
  position: relative; /* важно за точна позиция */
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 50%;                      /* центрира спрямо родителя */
  transform: translateX(-50%);    /* връща го точно в центъра на линка */
  min-width: 240px;
  background: white;
  border-radius: 10px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.15);
  padding: 0.8rem 0;
  margin-top: 0.6rem;             /* малко пространство под линка */
  opacity: 0;
  visibility: hidden;
  transition: all 0.28s ease;
  z-index: 1000;
  list-style: none;
}

/* Hover / focus – показва менюто */
.dropdown:hover .dropdown-menu,
.dropdown:focus-within .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

/* За да не изчезва, когато курсорът преминава към менюто */
.dropdown-menu::before {
  content: "";
  position: absolute;
  top: -2px;
  left: 0;
  right: 0;
  height: 20px;
  background: transparent;
}

/* Мобилен режим – връщаме на ляво, без центриране */
@media (max-width: 850px) {
  .dropdown-menu {
    left: 0;
    transform: none;
    margin-top: 0.4rem;
    margin-left: 1.5rem; /* леко отместване за визуален ефект */
  }
}
/* Hamburger – ВИДИМ САМО НА МОБИЛЕН */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: clamp(1.6rem, 5vw, 2rem);
  color: #1e293b;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 1001;
}

/* ==========================================
   МОБИЛЕН РЕЖИМ – slide-in меню
========================================== */
@media (max-width: 850px) {
  .menu-toggle {
    display: block;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 80%;                    /* или 100% ако искаш цял екран */
    max-width: 320px;
    height: 100vh;
    flex-direction: column;
    background: white;
    padding: 6rem 2rem 2rem;
    transform: translateX(100%);
    transition: transform 0.45s cubic-bezier(0.77,0,0.05,1);
    box-shadow: -10px 0 30px rgba(0,0,0,0.2);
    z-index: 999;
  
  }

  .nav-links.nav-active {
    transform: translateX(0);
  }

  .nav-links li {
    opacity: 0;
    transform: translateX(40px);
    transition: all 0.5s ease;
    margin: 1rem 0;
    text-align: left;
  }

  .nav-links.nav-active li {
    opacity: 1;
    transform: translateX(0);
  }

  /* stagger анимация за елементите */
  .nav-links li:nth-child(1) { transition-delay: 0.08s; }
  .nav-links li:nth-child(2) { transition-delay: 0.14s; }
  .nav-links li:nth-child(3) { transition-delay: 0.20s; }
  .nav-links li:nth-child(4) { transition-delay: 0.26s; }

  /* Dropdown в мобилен режим – става подменю */
  .dropdown-menu {
    position: static;
    box-shadow: none;
    background: #f8f9fa;
    margin: 0.5rem 0 0.5rem 1.5rem;
    padding: 0.6rem 0;
    border-left: 4px solid #e63946;
    opacity: 1;
    visibility: visible;
    transform: none;
    display: none;
  }

  .dropdown.active .dropdown-menu {
    display: block;
  }

  /* Header padding за да не се застъпва с navbar */
  .header {
    padding-top: 5.5rem;
  }
}
/* Header content */
.header {
  min-height: 85vh;
  background: linear-gradient(rgba(15, 23, 42, 0.72), rgba(15, 23, 42, 0.72)),
              url('images/919ab238-e3e4-11e7-a07e-b2db9e9d66b2-3694459661-scaled.jpg') center/cover no-repeat fixed;
  color: white;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: clamp(5rem, 18vh, 10rem) 1.5rem 4rem;
}

.header-title {
  font-size: clamp(2.8rem, 9vw, 5.2rem);
  font-weight: 900;
  margin-bottom: 0.8rem;
  text-shadow: 0 4px 16px rgba(0,0,0,0.7);
  line-height: 1.1;
}

.header-subtitle {
  font-size: clamp(1.2rem, 4vw, 1.8rem);
  max-width: 700px;
  opacity: 0.92;
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero-section {
  background: linear-gradient(135deg, #0ea5e9 0%, #7c3aed 100%);
  color: white;
  padding: clamp(5rem, 12vh, 8rem) 1.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  inset: -50%;
  background: radial-gradient(circle at 30% 20%, rgba(255,255,255,0.12) 0%, transparent 60%);
  animation: floatBg 18s linear infinite;
}

@keyframes floatBg {
  0%   { transform: translate(0, 0) rotate(0deg); }
  100% { transform: translate(15%, 20%) rotate(360deg); }
}

.hero-content h1 {
  font-size: clamp(2.4rem, 7vw, 3.8rem);
  margin-bottom: 1.2rem;
  font-weight: 800;
}

.hero-content p {
  font-size: clamp(1.1rem, 3vw, 1.35rem);
  max-width: 720px;
  margin: 0 auto 2rem;
  opacity: 0.95;
}

.cta-button {
  display: inline-block;
  background: white;
  color: #0ea5e9;
  font-weight: 700;
  padding: 0.9rem 2.2rem;
  border-radius: 50px;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
  font-size: clamp(1rem, 2.5vw, 1.15rem);
}

.cta-button:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.2);
  background: #f0f9ff;
}

/* ==========================================================================
   FEATURES GRID (section-2)
   ========================================================================== */
.section-2 {
  padding: clamp(4rem, 10vh, 7rem) 1.5rem;
  background: white;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2.5rem;
  max-width: 1100px;
  margin: 0 auto;
}

.feature-card {
  background: linear-gradient(145deg, #f8fafc, #f1f5f9);
  border-radius: 16px;
  padding: 2.5rem 2rem;
  box-shadow: 0 10px 30px rgba(0,0,0,0.06);
  transition: all 0.35s ease;
  text-align: center;
}

.feature-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 50px rgba(0,0,0,0.12);
}

.feature-card h4 {
  font-size: 1.6rem;
  color: #e63946;
  margin-bottom: 1rem;
}

.feature-card p {
  color: #475569;
  font-size: 1.05rem;
}

/* ==========================================================================
   RESEARCH CARDS
   ========================================================================== */
.research-section {
  background: linear-gradient(to bottom, #f8fafc, #e2e8f0);
  padding: clamp(5rem, 12vh, 8rem) 1.5rem;
  text-align: center;
}

.research-section h2 {
  font-size: clamp(2.2rem, 6vw, 3.2rem);
  margin-bottom: 0.8rem;
  color: #0f172a;
}

.subtitle {
  font-size: clamp(1.1rem, 3vw, 1.25rem);
  color: #64748b;
  max-width: 680px;
  margin: 0 auto 3.5rem;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.card {
  perspective: 1200px;
  height: 240px;
}

.card-inner {
  width: 100%;
  height: 100%;
  position: relative;
  transition: transform 0.7s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  transform-style: preserve-3d;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

.card:hover .card-inner {
  transform: rotateY(180deg);
}

.card-front, .card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 16px;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.card-front {
  background: white;
  color: #0f172a;
}

.card-back {
  background: #0f172a;
  color: white;
  transform: rotateY(180deg);
}

/* ==========================================================================
   WHY BIOGENESIS
   ========================================================================== */
.why-biogenesis {
  padding: clamp(5rem, 12vh, 8rem) 1.5rem;
  background: white;
  text-align: center;
}

.section-title {
  font-size: clamp(2.4rem, 7vw, 3.6rem);
  margin-bottom: 3.5rem;
  font-weight: 800;
}

.section-title span {
  color: #e63946;
}

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 3rem;
  max-width: 1200px;
  margin: 0 auto;
}

.feature {
  background: #f8fafc;
  border-radius: 20px;
  padding: 3rem 2rem;
  box-shadow: 0 12px 32px rgba(0,0,0,0.06);
  transition: all 0.4s ease;
}

.feature:hover {
  transform: translateY(-12px);
  box-shadow: 0 24px 48px rgba(0,0,0,0.12);
}

.lottie-icon {
  width: 100px;
  height: 100px;
  margin: 0 auto 1.5rem;
}

/* ==========================================================================
   CALL TO ACTION
   ========================================================================== */
.section-4 {
  padding: clamp(4rem, 10vh, 7rem) 1.5rem;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: white;
  text-align: center;
}

.call-to-action {
  max-width: 900px;
  margin: 0 auto;
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(10px);
  border-radius: 24px;
  padding: clamp(3rem, 6vw, 5rem);
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}

.call-to-action h2 {
  font-size: clamp(2rem, 6vw, 3.2rem);
  margin-bottom: 1rem;
}

.call-to-action p {
  font-size: clamp(1.1rem, 3vw, 1.3rem);
  margin-bottom: 2rem;
  opacity: 0.9;
}

.email-link {
  display: inline-block;
  color: #e63946;
  font-size: 1.4rem;
  font-weight: 700;
  text-decoration: none;
  padding: 0.8rem 2rem;
  border: 2px solid #e63946;
  border-radius: 50px;
  transition: all 0.3s;
}

.email-link:hover {
  background: #e63946;
  color: white;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
footer {
  background: #0f172a;
  color: #cbd5e1;
  padding: clamp(4rem, 10vh, 6rem) 1.5rem 3rem;
}

.footer-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 3rem;
  max-width: 1200px;
  margin: 0 auto;
}

.footer-col h4 {
  color: #e63946;
  font-size: 1.3rem;
  margin-bottom: 1.4rem;
}

.footer-col ul {
  list-style: none;
}

.footer-col a {
  color: #cbd5e1;
  text-decoration: none;
  font-size: 1rem;
  transition: color 0.25s;
  display: block;
  margin-bottom: 0.9rem;
}

.footer-col a:hover {
  color: #e63946;
}

.newsletter {
  display: flex;
  margin: 1.5rem 0;
}

.newsletter input {
  flex: 1;
  padding: 0.9rem 1.2rem;
  border: none;
  border-radius: 50px 0 0 50px;
  font-size: 1rem;
}

.newsletter button {
  padding: 0.9rem 1.8rem;
  background: #e63946;
  color: white;
  border: none;
  border-radius: 0 50px 50px 0;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.3s;
}

.newsletter button:hover {
  background: #c53039;
}

.socials {
  display: flex;
  gap: 1.2rem;
  margin-top: 1.5rem;
}

.socials img {
  width: 32px;
  height: 32px;
  opacity: 0.7;
  transition: all 0.3s;
}

.socials img:hover {
  opacity: 1;
  transform: scale(1.15);
}

.footer-bottom {
  text-align: center;
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid #334155;
  font-size: 0.95rem;
  color: #94a3b8;
}

/* ==========================================================================
   RESPONSIVE – MOBILE MENU
   ========================================================================== */
@media (max-width: 850px) {
  .menu-toggle {
    display: block;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 75%;
    max-width: 320px;
    background: white;
    flex-direction: column;
    padding: 6rem 2rem 3rem;
    transform: translateX(100%);
    transition: transform 0.45s cubic-bezier(0.77, 0.2, 0.05, 1);
    box-shadow: -12px 0 40px rgba(0,0,0,0.2);
    z-index: 999;
    overflow-y: auto;
  }

  .nav-links.nav-active {
    transform: translateX(0);
  }

  .nav-links li {
    opacity: 0;
    transform: translateX(40px);
    transition: all 0.5s ease;
    margin: 1.2rem 0;
  }

  .nav-links.nav-active li {
    opacity: 1;
    transform: translateX(0);
  }

  /* stagger animation */
  .nav-links li:nth-child(1) { transition-delay: 0.1s; }
  .nav-links li:nth-child(2) { transition-delay: 0.16s; }
  .nav-links li:nth-child(3) { transition-delay: 0.22s; }
  .nav-links li:nth-child(4) { transition-delay: 0.28s; }

  /* Mobile dropdown */
  .dropdown-menu {
    position: static;
    box-shadow: none;
    background: #f8f9fa;
    margin: 0.8rem 0 0.8rem 1.5rem;
    padding: 0.6rem 0;
    border-left: 4px solid #e63946;
    opacity: 1;
    visibility: visible;
    transform: none;
    display: none;
  }

  .dropdown.active .dropdown-menu {
    display: block;
  }

  .header {
    min-height: 70vh;
    padding-top: 6rem;
  }
}

/* ==========================================================================
   ANIMATIONS & UTILITIES
   ========================================================================== */
.block {
  opacity: 0;
  transform: translateY(60px);
  transition: all 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.block.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
  }
}
    
    