html {
  scroll-behavior: smooth;
  scroll-padding-top: 100px;
  overflow-y: auto;
  overscroll-behavior-y: none;
}

:root {
  --primary-color: #004aac;
  --secondary-color: #d88723;
  --text-color: #333;
  --bg-color: #eef2f7;
  --white: #ffffff;
  --transition: all 0.3s ease-in-out;
  --glass-bg: rgba(255, 255, 255, 0.85);
  --glass-border: rgba(255, 255, 255, 0.3);
  --glass-shadow: rgba(0, 74, 172, 0.07);
  --nav-height: 80px;
}

/* Modern Animation Keyframes */
@keyframes float {
  0% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
  100% {
    transform: translateY(0px);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--bg-color);
  background-image: 
    radial-gradient(at 47% 33%, rgba(0, 74, 172, 0.04) 0, transparent 59%), 
    radial-gradient(at 82% 65%, rgba(243, 145, 24, 0.04) 0, transparent 55%);
  overflow-x: hidden;
  scroll-behavior: smooth;
  overscroll-behavior: none;
  position: relative;
  min-height: 100vh;
}

/* === NAVIGATION === */
/* === Navbar container === */
nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: #004aac;
  z-index: 10000;
  transition: all 0.3s ease-in-out;
}

nav.scrolled {
  background: rgba(0, 74, 172, 1); /* 70% opacity of primary color */
  backdrop-filter: blur(10px);
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px;
  flex-wrap: wrap;
  height: var(--nav-height);
}

/* Logo */
.logo a {
  display: block;
  transition: var(--transition);
}

.logo a:hover {
  transform: scale(1.05);
  opacity: 1;
}

.logo img {
  max-height: 60px;
  width: auto;
  cursor: pointer;
}

/* Nav links (desktop) */
.nav-links {
  display: flex;
  gap: 30px;
  align-items: center;
}

.nav-links a {
  color: var(--white);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 30px;
  transition: var(--transition);
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 80%;
  height: 2px;
  background: var(--secondary-color);
  transition: transform 0.3s ease;
}

.nav-links a:hover::after {
  transform: translateX(-50%) scaleX(1);
}

.nav-links a:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

/* Hamburger */
.hamburger {
  display: none;
  width: 40px;
  height: 40px;
  background: transparent;
  border: none;
  color: var(--white);
  font-size: 24px;
  cursor: pointer;
  justify-content: center;
  align-items: center;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  outline: none;
}

.hamburger:hover,
.hamburger:active,
.hamburger:focus {
  background: transparent;
  outline: none;
  opacity: 1;
}

/* === MOBILE VIEW === */
@media (max-width: 768px) {
  .hamburger {
    display: flex;
    position: relative;
    z-index: 1001;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 60vh;
    background: rgba(0, 74, 172, 0.98);
    padding: 10px 30px 30px;
    padding-top: calc(20px + var(--nav-height, 60px));
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease-in-out;
    backdrop-filter: blur(10px);
  }

  .nav-links.active {
    display: flex;
    opacity: 1;
    visibility: visible;
  }

  .nav-links a {
    font-size: 1.1rem;
    padding: 12px;
    margin: 4px 0;
    text-align: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.3s ease-in-out;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  }

  .nav-links.active a {
    transform: translateY(0);
    opacity: 1;
  }

  .nav-links a:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
  }

  .nav-links.active a:nth-child(1) { transition-delay: 0.1s; }
  .nav-links.active a:nth-child(2) { transition-delay: 0.2s; }
  .nav-links.active a:nth-child(3) { transition-delay: 0.3s; }
  .nav-links.active a:nth-child(4) { transition-delay: 0.4s; }
  .nav-links.active a:nth-child(5) { transition-delay: 0.5s; }
}

/* === Row for logo + hamburger === */
.nav-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
  flex-wrap: nowrap;
}

.logo img {
  max-height: 60px;
  width: auto;
}

/* === Hamburger icon === */
.hamburger {
  display: none;
  font-size: 28px;
  color: white;
  cursor: pointer;
}

/* === Nav links block (mobile + desktop) === */
.nav-links {
  display: flex;
  justify-content: flex-end;
  gap: 20px;
  padding: 10px 20px;
}

/* Links */
.nav-links a {
  color: white;
  text-decoration: none;
  font-size: 0.95rem;
}

/* === Mobile View Only === */
@media (max-width: 768px) {
  .nav-top {
    flex-direction: row;
  }

  .hamburger {
    display: block;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    width: 100%;
    background: #004aac;
    padding: 10px 20px;
  }

  .nav-links.active {
    display: flex;
  }

  .nav-links a {
    margin: 10px 0;
  }
}

/* === HEADER === */
header {
  background: linear-gradient(135deg, var(--secondary-color), #ff6b00);
  color: white;
  padding: 90px 20px 40px;
  text-align: center;
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
  min-height: 200px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

header h1 {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 700;
  opacity: 0;
  transform: translateY(0);
  animation: fadeInUp 1s ease-out 0.5s forwards;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
  width: 100%;
  max-width: 1200px;
  line-height: 1.4;
  word-spacing: 0.1em;
  padding: 0 15px;
}

header h1 span {
  display: inline-block;
  margin: 0 0.2em;
  opacity: 0;
  transform: translateY(20px);
}

header p {
  font-size: clamp(1rem, 1.8vw, 1.2rem);
  margin: 15px auto 0;
  opacity: 0;
  display: inline-block;
  position: relative;
  animation: fadeInUp 0.8s ease-out 2s forwards;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
  width: 100%;
  max-width: 800px;
}

.tagline {
  position: relative;
  color: rgba(255, 255, 255, 0.95);
  font-weight: 500;
  letter-spacing: 0.5px;
  padding-bottom: 5px;
  min-height: 1.5em;
}

.tagline::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 50px;
  height: 2px;
  background: rgba(255, 255, 255, 0.5);
  transform: translateX(-50%) scaleX(0);
  animation: expandLine 0.8s ease-out 2s forwards;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes expandLine {
  to {
    transform: translateX(-50%) scaleX(1);
  }
}

@keyframes underline {
  to {
    transform: scaleX(1);
  }
}

@keyframes typewriter {
  from {
    width: 0;
  }
  to {
    width: 100%;
    max-width: 450px;
  }
}

@keyframes blink {
  50% {
    border-color: transparent;
  }
}

@media (max-width: 768px) {
  header {
    padding: 100px 15px 50px;
  }
  
  header p {
    font-size: 1.1rem;
    margin: 15px auto 0;
  }
}

/* === SECTIONS === */
section {
  scroll-margin-top: 100px;
  padding: clamp(40px, 6vw, 70px);
  max-width: 1200px;
  margin: 60px auto;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 30px;
  box-shadow: 0 10px 30px rgba(0, 74, 172, 0.07),
              0 0 20px rgba(255, 255, 255, 0.8) inset;
  transition: var(--transition);
  position: relative;
  z-index: 1;
  overflow: visible;
}

section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 15px;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
  opacity: 0;
  transition: var(--transition);
  border-radius: 30px 30px 0 0;
  
}

section:hover::before {
  opacity: 1;
}

section:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  
}
/* Special spacing for About section */
#about {
  scroll-margin-top: 140px;
  padding: clamp(50px, 7vw, 90px);
  margin-top: 80px;
}

@media (max-width: 768px) {
  section, #team, .medflix-Health-ATM {
    padding: clamp(30px, 5vw, 40px);
    margin: 30px 20px;
    border-radius: 20px;
  }
  
  #about {
    padding: clamp(40px, 6vw, 60px);
    margin-top: 50px;
  }
}

h2 {
  color: #0a5631;
  margin-top: 0;
}

/* === IMPACT STATS === */
.impact-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 20px;
  margin: 20px 0;
  position: relative;
}

.impact-stats div {
  background: linear-gradient(135deg, var(--primary-color), #4992f3);
  padding: 20px 15px;
  text-align: center;
  border-radius: 20px;
  color: var(--white);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.impact-stats div h3 {
  margin: 0 0 5px 0;
  font-size: 1.8rem;
}

.impact-stats div p {
  margin: 0;
  font-size: 0.9rem;
  opacity: 0.9;
}

.impact-stats div::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.2) 0%, transparent 60%);
  opacity: 0;
  transition: var(--transition);
}

.impact-stats div:hover::before {
  opacity: 1;
  transform: scale(1.2);
}

.impact-stats div:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

/* === FOOTER === */
footer {
  background: #004aac;
  color: white;
  text-align: center;
  padding: 30px 20px;
}

footer a {
  color: #b7d6a7;
  margin: 0 10px;
  text-decoration: none;
  font-size: 0.95rem;
}

footer p {
  margin: 10px 0 0;
}

a:hover {
  opacity: 0.8;
}

/* === CAROUSEL === */
.carousel {
  position: relative;
  max-width: 1000px;
  margin: 40px auto 20px;
  overflow: hidden;
  border-radius: 20px;
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.carousel-images {
  display: flex;
  width: 100%;
  transition: transform 0.5s ease-in-out;
}

.carousel-images img {
  width: 100%;
  flex-shrink: 0;
  height: 500px;
  border-radius: 20px;
  object-fit: cover;
  object-position: center;
  transition: var(--transition);
}

@media (max-width: 768px) {
  .carousel-images img {
    height: 300px;
  }
}
.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.5);
  color: white;
  border: none;
  font-size: 1.5rem;
  width: 40px;
  height: 40px;
  cursor: pointer;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.carousel-btn.prev {
  left: 10px;
}

.carousel-btn.next {
  right: 10px;
}

.carousel-btn:hover {
  background: rgba(0, 0, 0, 0.7);
}
/* === OUR TEAM === */
#team {
  scroll-margin-top: 100px;
  padding: clamp(30px, 5vw, 50px);
  max-width: 1200px;
  margin: 40px auto;
  background: var(--white);
  border-radius: 30px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  justify-content: center;
  padding: 20px 0;
}

.team-member {
  background: var(--bg-color);
  border-radius: 20px;
  padding: 30px;
  text-align: center;
  transition: var(--transition);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  animation: float 6s ease-in-out infinite;
}

.team-member:nth-child(2) {
  animation-delay: 1s;
}

.team-member:nth-child(3) {
  animation-delay: 2s;
}

.team-member:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  background: linear-gradient(145deg, var(--white), var(--bg-color));
}

.team-member img {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 5px;
}

.team-member h3 {
  margin: 10px 0 5px;
  font-size: 1.1rem;
  color: #004aac;
}

.team-member p {
  margin: 0;
  font-size: 0.95rem;
  color: #555;
}

/* === Medflix Hero Section === */
.medflix-Health-ATM {
  scroll-margin-top: 100px;
  padding: clamp(30px, 5vw, 50px);
  max-width: 1200px;
  margin: 40px auto;
  background: var(--white);
  border-radius: 30px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.medflix-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  justify-content: center;
  align-items: start;
  max-width: 1100px;
  margin: 0 auto;
  gap: 40px;
  padding: 20px 0;
}

.medflix-image {
  text-align: center;
  position: relative;
  max-width: 435px;
  margin: 0 auto;
  padding: 15px;
}

.medflix-image::after {
  content: '';
  position: absolute;
  top: 8%;
  left: 8%;
  width: 84%;
  height: 84%;
  background: var(--primary-color);
  opacity: 0.1;
  border-radius: 25px;
  z-index: -1;
  transform: rotate(-0deg);
}

.medflix-image img {
  width: 100%;
  height: auto;
  object-fit: contain;
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  transition: var(--transition);
  padding: 20px;
}

.medflix-image img:hover {
  transform: translateY(-10px);
  box-shadow: 0 30px 50px rgba(0, 0, 0, 0.15);
}

.medflix-text {
  flex: 1 1 400px;
  text-align: center;
}

.medflix-text h2 {
  color: #f39118;
  font-size: 1.8rem;
  margin-bottom: 15px;
}

.medflix-text p {
  font-size: 1.1rem;
  margin-bottom: 30px;
  color: #333;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 15px;
  justify-items: center;
  margin: 30px 0;
}

.feature-pill {
  background: linear-gradient(135deg, #3b59f4, #4992f3);
  color: white;
  padding: 12px 10px;
  border-radius: 999px;
  font-size: 0.95rem;
  text-align: center;
  width: 80%;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(59, 89, 244, 0.2);
  transition: all 0.3s ease-in-out;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(5px);
}

.feature-pill::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease-in-out;
}

.feature-pill:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 5px 15px rgba(59, 89, 244, 0.3);
  background: linear-gradient(135deg, #4992f3, #3b59f4);
}

.feature-pill:hover::before {
  left: 100%;
}

.feature-pill:active {
  transform: translateY(1px) scale(0.98);
  box-shadow: 0 2px 8px rgba(59, 89, 244, 0.2);
}

@media (max-width: 768px) {
  .feature-pill {
    width: 90%;
    font-size: 0.9rem;
  }
}
.medflix-video {
  margin-top: 30px;
  margin-bottom: 50px;
  text-align: center;
}

.medflix-video iframe,
.medflix-video video {
  border-radius: 12px;
  height: 215px;
  width: 460px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}
/* === Mobile View Only === */
@media (max-width: 768px) {
  .medflix-video {
    margin: 30px auto;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .medflix-video iframe,
  .medflix-video video {
    border-radius: 12px;
    height: 215px;
    width: 100%;
    max-width: 330px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  }

  .medflix-container {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .medflix-image {
    max-width: 100%;
    padding: 15px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .medflix-image img {
    max-width: 320px;
    margin: 0 auto;
  }
}
