/* 
 * Mavid Pharmaceuticals - Premium Design System
 * Modern, clean, and dynamic UI for pharmaceutical industry
 */


:root {
  /* Color Palette - Premium Medical */
  --primary: #0a2540;      /* Deep corporate blue */
  --primary-light: #143b66; 
  --secondary: #00b4d8;    /* vibrant cyan/teal */
  --secondary-hover: #0096b4;
  --accent: #e2f1f8;       /* Very light blue for backgrounds */
  
  --bg-dark: #06111f;      /* Ultra dark background for dark sections */
  --bg-light: #ffffff;
  --bg-offwhite: #f8fafc;
  
  --text-dark: #1e293b;
  --text-light: #f1f5f9;
  --text-muted: #64748b;
  
  /* Typography */
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
  
  /* Effects */
  --glass-bg: rgba(255, 255, 255, 0.7);
  --glass-border: rgba(255, 255, 255, 0.2);
  --glass-shadow: 0 8px 32px 0 rgba(10, 37, 64, 0.1);
  --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);
  
  /* Layout */
  --container: 1200px;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
  --radius-xl: 24px;
}

/* =========================================
   Reset & Base Styles
   ========================================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  color: var(--text-dark);
  background-color: var(--bg-light);
  line-height: 1.6;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  color: var(--primary);
  margin-bottom: 1rem;
}

p {
  margin-bottom: 1rem;
  color: var(--text-muted);
}

a {
  text-decoration: none;
  color: var(--secondary);
  transition: all 0.3s ease;
}

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

ul {
  list-style: none;
}

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

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

.section {
  padding: 6rem 0;
}

.section-light {
  background-color: var(--bg-offwhite);
}

.section-dark {
  background-color: var(--primary);
  color: var(--text-light);
}

.section-dark h1, .section-dark h2, .section-dark h3, .section-dark p {
  color: var(--text-light);
}

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

.grid {
  display: grid;
  gap: 2rem;
}

.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }

/* =========================================
   Components
   ========================================= */

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.8rem 2rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-family: var(--font-heading);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  font-size: 0.9rem;
}

.btn-primary {
  background-color: var(--secondary);
  color: #fff;
  box-shadow: 0 4px 15px rgba(0, 180, 216, 0.4);
}

.btn-primary:hover {
  background-color: var(--secondary-hover);
  transform: translateY(-2px);
  color: #fff;
}

.btn-outline {
  background-color: transparent;
  color: var(--text-light);
  border: 2px solid var(--text-light);
}

.btn-outline:hover {
  background-color: var(--text-light);
  color: var(--primary);
}

/* Section Titles */
.section-title {
  font-size: 2.5rem;
  margin-bottom: 3rem;
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 0;
  width: 60px;
  height: 4px;
  background-color: var(--secondary);
  border-radius: 2px;
}

.text-center .section-title::after {
  left: 50%;
  transform: translateX(-50%);
}

/* Cards (Glassmorphism & Standard) */
.card {
  background: var(--bg-light);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border: 1px solid rgba(0,0,0,0.05);
}

.card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(0, 180, 216, 0.3);
}

.card-icon {
  width: 60px;
  height: 60px;
  background: var(--accent);
  color: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
}

.card-title {
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

/* =========================================
   Header & Navigation
   ========================================= */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  transition: all 0.3s ease;
  padding: 1.5rem 0;
}

header.scrolled {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: var(--shadow-md);
  padding: 1rem 0;
  border-bottom: 1px solid var(--glass-border);
}

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

.logo {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  color: #ffffff; /* White on transparent hero header */
  text-shadow: 0 1px 6px rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

header.scrolled .logo {
  color: var(--primary); /* Dark blue on glass/white background */
  text-shadow: none;
}

.logo-sub {
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: rgba(255,255,255,0.8); /* Readable on dark hero */
}

header.scrolled .logo-sub {
  color: #64748b; /* Muted grey on scrolled glass header */
}

.logo-text {
  position: relative;
  display: inline-block;
}

.logo-text::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--secondary);
  transition: width 0.3s ease;
}

.logo:hover .logo-text::after {
  width: 100%;
}

.nav-menu {
  display: flex;
  gap: 1.25rem; /* Reduced from 2rem to prevent wrapping */
  align-items: center;
}

.nav-link {
  color: var(--text-light); /* Light for visibility against hero */
  font-weight: 500;
  font-size: 0.95rem;
  position: relative;
  text-shadow: 0 2px 4px rgba(0,0,0,0.1); /* Subtle shadow for readability */
  white-space: nowrap; /* Prevent internal wrapping */
}

header.scrolled .nav-link {
  color: var(--primary);
  text-shadow: none;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--secondary);
  transition: width 0.3s ease;
}

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

.nav-link.active {
  color: var(--secondary);
}

/* Hamburger Menu */
.hamburger {
  display: none;
  cursor: pointer;
  background: none;
  border: none;
}

.bar {
  display: block;
  width: 25px;
  height: 3px;
  margin: 5px auto;
  transition: all 0.3s ease;
  background-color: var(--text-light); /* Light bar for dark hero */
}

header.scrolled .bar {
  background-color: var(--primary); /* Dark bar for white glass */
}

/* =========================================
   Hero Section
   ========================================= */
.hero {
  height: 100vh;
  min-height: 600px;
  position: relative;
  overflow: hidden;
}

.hero-slider {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
}

.hero-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  visibility: hidden;
  transition: opacity 1s cubic-bezier(0.4, 0, 0.2, 1), visibility 1s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-slide.active {
  opacity: 1;
  visibility: visible;
  z-index: 2;
}

.hero-slide-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  z-index: 1;
  transform: scale(1);
}

.hero-slide.active .hero-slide-bg {
  animation: kenBurns 12s ease-out forwards;
}

.hero-slide::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, rgba(6, 17, 31, 0.85) 0%, rgba(6, 17, 31, 0.4) 100%);
  z-index: 2;
}

.hero-slide .container {
  position: relative;
  z-index: 10;
  width: 100%;
}

.hero-content {
  position: relative;
  z-index: 10;
  max-width: 600px;
}

.hero-slide .hero-title {
  font-size: 4rem;
  color: var(--text-light);
  margin-bottom: 1.5rem;
  line-height: 1.1;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.hero-slide .hero-subtitle {
  font-size: 1.25rem;
  color: var(--accent);
  margin-bottom: 2rem;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.hero-slide .hero-btn-group {
  display: flex;
  gap: 1rem;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Active states for slide content */
.hero-slide.active .hero-title {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.3s;
}

.hero-slide.active .hero-subtitle {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.5s;
}

.hero-slide.active .hero-btn-group {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.7s;
}

/* Slider Arrows */
.slider-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  cursor: pointer;
  z-index: 30;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.slider-arrow:hover {
  background: rgba(0, 180, 216, 0.85);
  border-color: var(--secondary);
  color: #fff;
  transform: translateY(-50%) scale(1.08);
  box-shadow: 0 0 20px rgba(0, 180, 216, 0.4);
}

.slider-arrow:active {
  transform: translateY(-50%) scale(0.95);
}

.prev-arrow {
  left: 2.5rem;
}

.next-arrow {
  right: 2.5rem;
}

/* Dots Pagination */
.slider-dots {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.75rem;
  z-index: 30;
}

.slider-dots .dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 2px solid transparent;
}

.slider-dots .dot:hover {
  background: rgba(255, 255, 255, 0.7);
}

.slider-dots .dot.active {
  background: var(--secondary);
  width: 32px;
  border-radius: 6px;
}

@keyframes kenBurns {
  0% {
    transform: scale(1);
  }
  100% {
    transform: scale(1.1);
  }
}

/* Scroll Down Indicator */
.scroll-down-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-light);
  z-index: 30;
  text-decoration: none;
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

.scroll-down-indicator:hover {
  opacity: 1;
  color: var(--text-light);
}

.scroll-down-indicator .mouse {
  width: 26px;
  height: 42px;
  border: 2px solid var(--text-light);
  border-radius: 20px;
  display: flex;
  justify-content: center;
  padding-top: 6px;
}

.scroll-down-indicator .wheel {
  width: 4px;
  height: 8px;
  background-color: var(--text-light);
  border-radius: 2px;
  animation: scrollWheel 2s infinite ease-in-out;
}

.scroll-down-indicator .arrow {
  font-size: 1rem;
  animation: scrollArrow 2s infinite ease-in-out;
  color: var(--text-light);
}

@keyframes scrollWheel {
  0% { transform: translateY(0); opacity: 1; }
  50% { transform: translateY(12px); opacity: 0; }
  100% { transform: translateY(0); opacity: 0; }
}

@keyframes scrollArrow {
  0% { transform: translateY(0); opacity: 0.5; }
  50% { transform: translateY(6px); opacity: 1; }
  100% { transform: translateY(0); opacity: 0.5; }
}

/* =========================================
   Page Header (for inner pages)
   ========================================= */
.page-header {
  padding: 150px 0 80px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: var(--text-light);
  text-align: center;
}

.page-title {
  font-size: 3rem;
  color: var(--text-light);
  margin-bottom: 1rem;
}

.page-subtitle {
  color: var(--accent);
  font-size: 1.2rem;
  max-width: 600px;
  margin: 0 auto;
}

/* =========================================
   Content Blocks (Image + Text)
   ========================================= */
.content-block {
  display: flex;
  align-items: center;
  gap: 4rem;
}

.content-block.reverse {
  flex-direction: row-reverse;
}

.content-image {
  flex: 1;
  position: relative;
}

.content-image img {
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  position: relative;
  z-index: 2;
}

.content-image::before {
  content: '';
  position: absolute;
  top: -20px;
  left: -20px;
  width: 100%;
  height: 100%;
  background-color: var(--accent);
  border-radius: var(--radius-xl);
  z-index: 1;
}

.content-block.reverse .content-image::before {
  left: auto;
  right: -20px;
}

.content-text {
  flex: 1;
}

/* Legacy of Care synchronized slider */
.legacy-slider-container {
  position: relative;
  width: 100%;
}

.legacy-slide {
  display: none !important;
}

.legacy-slide.active {
  display: flex !important;
  animation: legacyFade 0.8s ease-in-out forwards;
}

/* Synchronized cross-fade micro-animations */
.legacy-slide.active .content-text {
  animation: legacySlideUp 0.8s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

.legacy-slide.active .content-image img {
  animation: legacyZoomIn 1s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

.legacy-dots {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 3.5rem;
}

.legacy-dots .dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(10, 37, 64, 0.15);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 2px solid transparent;
}

.legacy-dots .dot:hover {
  background: rgba(10, 37, 64, 0.4);
}

.legacy-dots .dot.active {
  background: var(--secondary);
  width: 32px;
  border-radius: 6px;
}

@keyframes legacyFade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

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

@keyframes legacyZoomIn {
  from {
    opacity: 0.8;
    transform: scale(0.97);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* =========================================
   Staff / Leadership Portrait Images
   ========================================= */
.staff-img {
  width: 100%;
  aspect-ratio: 3 / 4;         /* Portrait ratio — shows more of the person */
  object-fit: cover;
  object-position: top center; /* Keeps face in frame on all crops */
  display: block;
  transition: transform 0.6s ease;
}

.card:hover .staff-img {
  transform: scale(1.04);
}

@media (max-width: 576px) {
  .staff-img {
    aspect-ratio: 4 / 3; /* Wider crop on small phones to save vertical space */
  }
}

/* Product Catalogue Enhancements */
.product-card-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: var(--radius-md);
  margin-bottom: 1.5rem;
  transition: transform 0.5s ease;
}

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

.product-tag {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: var(--accent);
  color: var(--primary);
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.product-details {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.card.expanded .product-details {
  max-height: 500px;
  opacity: 1;
  margin-top: 1rem;
}

.product-specs {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 1.5rem 0;
  font-size: 0.85rem;
  border-top: 1px solid rgba(0,0,0,0.05);
  padding-top: 1rem;
}

.spec-item {
  display: flex;
  justify-content: space-between;
}

.spec-label {
  color: var(--text-muted);
}

.spec-value {
  color: var(--primary);
  font-weight: 600;
}

/* =========================================
   Footer
   ========================================= */
footer {
  background-color: var(--bg-dark);
  color: var(--text-light);
  padding: 5rem 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-brand .logo {
  color: var(--text-light);
  margin-bottom: 1rem;
}

.footer-desc {
  color: #94a3b8;
  max-width: 300px;
}

.footer-title {
  color: var(--text-light);
  font-size: 1.2rem;
  margin-bottom: 1.5rem;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.footer-links a {
  color: #94a3b8;
}

.footer-links a:hover {
  color: var(--secondary);
  padding-left: 5px;
}

.footer-contact li {
  color: #94a3b8;
  margin-bottom: 1rem;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.footer-contact i {
  color: var(--secondary);
  margin-top: 5px;
}

.footer-social {
  margin-top: 1.5rem;
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.footer-social .social-link {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  font-size: 1.1rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.footer-social .social-link:hover {
  background: var(--secondary);
  color: #ffffff;
  border-color: var(--secondary);
  transform: translateY(-3px) scale(1.08);
  box-shadow: 0 4px 12px rgba(0, 180, 216, 0.3);
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  color: #94a3b8;
  font-size: 0.9rem;
}

/* =========================================
   Animations
   ========================================= */
@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-on-scroll {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.animate-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* =========================================
   Responsive Design
   ========================================= */
@media (max-width: 1100px) {
  .hamburger {
    display: block;
  }

  .hamburger.active .bar:nth-child(2) {
    opacity: 0;
  }

  .hamburger.active .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }

  .hamburger.active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

  .nav-menu {
    position: fixed;
    left: -100%;
    top: 76px; /* Below the header */
    gap: 0;
    flex-direction: column;
    background: var(--bg-light);
    width: 100%;
    max-height: calc(100vh - 76px); /* Ensure it doesn't exceed screen height */
    overflow-y: auto; /* Enable vertical scrolling */
    text-align: center;
    transition: 0.3s;
    box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
    padding: 2rem 0;
    z-index: 999;
  }

  .nav-menu.active {
    left: 0;
  }

  .nav-item {
    margin: 1.5rem 0;
  }

  .nav-link {
    color: var(--primary);
    font-size: 1.2rem;
  }
  
  .logo {
    font-size: 1.3rem;
  }
}

@media (max-width: 992px) {
  .content-block, .content-block.reverse {
    flex-direction: column;
    gap: 3rem;
  }
  
  .hero-title, .hero-slide .hero-title {
    font-size: 3rem;
  }
  
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* 2-column layout for staff grid on tablets */
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .hero-title, .hero-slide .hero-title {
    font-size: 2.2rem;
  }

  .hero-subtitle, .hero-slide .hero-subtitle {
    font-size: 1.1rem;
  }

  .page-header {
    padding: 120px 0 60px;
  }

  .page-title {
    font-size: 2.2rem;
  }

  .section-title {
    font-size: 2rem;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .container {
    padding: 0 1rem;
  }

  .grid {
    gap: 1.5rem;
  }

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

  .slider-arrow {
    display: none; /* Hide arrows on mobile to save space */
  }
}

@media (max-width: 480px) {
  .hero-btn-group, .hero-slide .hero-btn-group {
    flex-direction: column;
    width: 100%;
    gap: 0.8rem;
  }
  
  .hero-btn-group .btn, .hero-slide .hero-btn-group .btn {
    width: 100%;
    text-align: center;
  }
}
