/* --- Global Variables (Maintained from your existing code) --- */
:root {
  --primary-purple: #492c7b;
  --primary-light: #9d7bd6;
  --primary-orange: #f37b21;
  --accent-blue: #29abe2;
  --text-dark: #1a1a1a;
  --text-gray: #666666;
  --white: #ffffff;
  --bg-gradient: linear-gradient(135deg, #fdfbfd 0%, #f4f6fa 100%);
  --font-main: "Poppins", sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: var(--font-main);
}
body {
  background: var(--bg-gradient);
  color: var(--text-dark);
  overflow-x: hidden;
}
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
}
a {
  text-decoration: none;
}
ul {
  list-style: none;
}

/* =========================================
   FUTURISTIC NAVBAR STYLES
   ========================================= */

.navbar {
  background: rgba(255, 255, 255, 0.95);
  height: 80px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 0.95rem;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  border-bottom: 2px solid transparent;
}

.navbar.scrolled {
  height: 70px;
  border-bottom: 2px solid var(--accent-blue);
}

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

.logo-img {
  height: 55px;
  width: auto;
  transition: transform 0.3s ease;
}

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

.nav-menu {
  display: flex;
  align-items: center;
  list-style: none;
  gap: 25px;
}

.nav-link {
  color: var(--primary-purple);
  text-decoration: none;
  font-weight: 600;
  position: relative;
  padding: 5px 0;
  transition: color 0.3s;
  font-size: 15px;
}

.nav-link::after {
  content: "";
  position: absolute;
  width: 0;
  height: 3px;
  bottom: 0;
  left: 0;
  background: linear-gradient(
    90deg,
    var(--primary-purple),
    var(--accent-blue)
  );
  transition: width 0.3s ease-in-out;
  border-radius: 2px;
}

.nav-link:hover {
  color: var(--accent-blue);
}

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

/* Dropdown */
.dropdown {
  position: relative;
}

.dropdown-toggle i {
  font-size: 0.8em;
  margin-left: 5px;
  transition: transform 0.3s;
}

.dropdown:hover .dropdown-toggle i {
  transform: rotate(180deg);
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  width: 600px;
  background: #fff;
  border-top: 4px solid var(--primary-orange);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  border-radius: 0 0 8px 8px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.27, 1.55);
  padding: 20px;
  z-index: 100;
}

.dropdown-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 20px;
}

.dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(15px);
}

.dropdown-item {
  display: block;
  padding: 8px 12px;
  color: var(--text-gray);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: 4px;
  transition: all 0.2s;
  border-left: 3px solid transparent;
}

.dropdown-item:hover {
  background: rgba(41, 171, 226, 0.1);
  color: var(--primary-purple);
  border-left: 3px solid var(--primary-orange);
  padding-left: 18px;
}

/* Nav Buttons */
.nav-buttons {
  display: flex;
  gap: 15px;
  margin-left: 10px;
}

.btn {
  padding: 10px 20px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 14px;
  transition: 0.3s;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  text-align: center;
}
.btn-purple {
  background-color: var(--primary-purple);
  color: var(--white);
}
.btn-purple:hover {
  background-color: #351e5c;
  transform: translateY(-2px);
}
.btn-orange {
  background-color: var(--primary-orange);
  color: var(--white);
}
.btn-orange:hover {
  background-color: #d66613;
  transform: translateY(-2px);
}

/* Mobile Toggle */
.menu-toggle {
  display: none;
  cursor: pointer;
}

.bar {
  display: block;
  width: 25px;
  height: 3px;
  margin: 5px auto;
  background-color: var(--primary-purple);
  transition: all 0.3s ease-in-out;
}

/* --- PASTE THIS AT THE VERY BOTTOM OF YOUR CSS FILE --- */

@media screen and (max-width: 992px) {
  
  /* 1. Force the menu to fit the sidebar width */
  .dropdown-menu {
    width: 100% !important;        /* Overrides 600px width */
    position: relative !important; /* Stacks it naturally in the list */
    left: 0 !important;            /* Resets the 50% push */
    top: 0 !important;
    transform: none !important;    /* CRITICAL: Stops the left shift */
    opacity: 1 !important;         /* Force visible for debugging */
    visibility: visible !important;
    box-shadow: none !important;
    padding-left: 0 !important;
  }

  /* 2. CRITICAL: Override the hover animation explicitly */
  /* This was likely causing the issue when you clicked/tapped */
  .dropdown:hover .dropdown-menu {
    transform: none !important; 
    top: 0 !important;
  }

  /* 3. Make the items a single vertical list */
  .dropdown-grid {
    grid-template-columns: 1fr !important;
    gap: 0 !important;
  }

  /* 4. styling tweaks for the sidebar look */
  .dropdown-item {
    white-space: normal; /* Allows long text to wrap */
    padding: 10px 15px 10px 30px !important; /* Indent sub-items */
    border-left: none !important;
  }
}

/* =========================================
   REST OF THE PAGE STYLES (Existing)
   ========================================= */

/* --- Hero Section --- */
.hero-section {
  position: relative;
  padding: 60px 0;
  min-height: calc(100vh - 80px);
  display: flex;
  align-items: center;
}
.blur-circle {
  position: absolute;
  top: -10%;
  left: -5%;
  width: 600px;
  height: 600px;
  background: radial-gradient(
    circle,
    rgba(73, 44, 123, 0.08) 0%,
    rgba(255, 255, 255, 0) 70%
  );
  z-index: -1;
}
.hero-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

/* Hero Text */
.hero-text h1 {
  font-size: 56px;
  line-height: 1.1;
  color: var(--text-dark);
  margin-bottom: 15px;
  font-weight: 700;
}
.hero-text h1 .highlight {
  color: var(--primary-purple);
}
.highlight-alt {
  color: var(--primary-orange);
}
.sub-headline {
  font-size: 18px;
  color: var(--text-gray);
  margin-bottom: 20px;
  font-weight: 500;
}
.description {
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-gray);
  margin-bottom: 40px;
  max-width: 90%;
}
.hero-cta {
  display: flex;
  gap: 20px;
  margin-bottom: 60px;
}
.btn-purple-lg {
  background: linear-gradient(90deg, var(--primary-purple) 0%, #7d4ec2 100%);
  color: white;
  padding: 15px 30px;
  border-radius: 8px;
  font-weight: 600;
  box-shadow: 0 10px 20px rgba(73, 44, 123, 0.2);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.btn-outline {
  border: 2px solid var(--primary-orange);
  color: var(--primary-orange);
  padding: 15px 30px;
  border-radius: 8px;
  font-weight: 600;
  background: transparent;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.btn-outline:hover {
  background: var(--primary-orange);
  color: white;
}
.hero-stats {
  display: flex;
  gap: 60px;
  border-top: 1px solid #eee;
  padding-top: 30px;
}
.stat-item h3 {
  font-size: 28px;
  color: var(--primary-purple);
  font-weight: 700;
  margin-bottom: 5px;
}
.stat-item p {
  color: var(--text-gray);
  font-size: 14px;
}

/* Hero Image Area */
.hero-image-wrapper {
  position: relative;
}

.image-container {
  width: 100%;
  height: 500px;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  position: relative;
}

.image-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-img-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  pointer-events: none;
  z-index: 1;
  transition: opacity 0.4s ease;
}

.hero-img-slide.active {
  opacity: 1;
  pointer-events: auto;
  z-index: 2;
}

.floating-card {
  position: absolute;
  bottom: 40px;
  left: -40px;
  background: white;
  padding: 20px 30px;
  border-radius: 12px;
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  gap: 15px;
  animation: float 3s ease-in-out infinite;
  z-index: 10;
}

@keyframes float {
  0% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
  100% {
    transform: translateY(0px);
  }
}

.icon-box {
  width: 50px;
  height: 50px;
  background: #f3eafd;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--primary-purple);
  font-size: 20px;
}

.icon-box i {
  transform: scaleX(-1);
}

.card-text span {
  display: block;
  font-size: 12px;
  color: var(--text-gray);
}
.card-text strong {
  font-size: 18px;
  color: var(--text-dark);
}

/* Slider Buttons */
.slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.8);
  color: var(--primary-purple);
  border: none;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 5;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.slider-btn:hover {
  background: var(--primary-purple);
  color: var(--white);
  transform: translateY(-50%) scale(1.1);
}

.prev-btn {
  left: -25px;
}
.next-btn {
  right: -25px;
}

/* Animations */
.anim-text-enter {
  animation: slideUpFade 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
  opacity: 0;
}

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

.anim-img-enter {
  animation: zoomInFade 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
  opacity: 0;
}

@keyframes zoomInFade {
  from {
    opacity: 0;
    transform: scale(1.05);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* =========================================
   NEW ABOUT US SECTION STYLES (MATCHING UI)
   ========================================= */
.about-section {
    padding: 100px 0;
    background-color: var(--white);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: flex-start;
    margin-bottom: 80px;
}

/* Left Column */
.about-image-col {
    position: relative;
    padding-right: 20px;
}

.about-image-wrapper {
    position: relative;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.08);
}

.about-img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 12px;
    
}

/* Floating Purple Badge */
.floating-badge {
    position: absolute;
    bottom: -30px;
    right: -30px;
    background-color: var(--primary-purple);
    color: #fff;
    padding: 25px 35px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(73, 44, 123, 0.3);
    z-index: 2;
}

.floating-badge h3 {
    font-size: 32px;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 5px;
}

.floating-badge p {
    font-size: 14px;
    font-weight: 500;
}

/* Right Column */
.badge-orange {
    display: inline-block;
    background-color: var(--primary-orange);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    padding: 6px 16px;
    border-radius: 4px;
    margin-bottom: 20px;
    border-top-left-radius: 12px;
    border-bottom-right-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.section-heading {
    font-size: 42px;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1.25;
    margin-bottom: 25px;
}

.text-gray {
    color: var(--text-gray);
    font-size: 16px;
    line-height: 1.7;
    margin-bottom: 20px;
}

.btn-explore {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background-color: var(--primary-purple);
    color: #fff;
    padding: 14px 30px;
    border-radius: 8px;
    font-weight: 600;
    margin-top: 15px;
    transition: 0.3s;
    box-shadow: 0 8px 15px rgba(73, 44, 123, 0.2);
}
.btn-explore:hover {
    background-color: #351e5c;
    transform: translateY(-3px);
}

/* Stats Row */
.stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.stats-item {
    padding: 20px;
    transition: transform 0.3s;
}

.stats-item:hover {
    transform: translateY(-5px);
}

.stats-icon {
    font-size: 42px;
    color: var(--primary-purple);
    margin-bottom: 15px;
    display: inline-block;
}

/* Outline icon effect for FA icons */
.stats-icon i {
    color: var(--primary-purple);
}

.stats-item h3 {
    font-size: 36px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 5px;
}

.stats-item p {
    color: var(--text-gray);
    font-size: 15px;
    font-weight: 500;
}

/* --- Specialities Section --- */
/* --- Specialities Section --- */
.specialities-section {
  padding: 80px 0;
  background-color: #f9f9f9;
}

.section-header {
  text-align: center;
  margin-bottom: 50px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.section-title {
  font-size: 40px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 15px;
}

.section-title .purple-highlight {
  color: var(--primary-purple);
}

.section-subtitle {
  font-size: 18px;
  color: var(--text-gray);
  font-weight: 400;
}

/* -----------------------------
   GRID UPDATED TO 4 COLUMNS
------------------------------ */
.specialities-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
}

/* -----------------------------
   CARDS – ALL PURPLE THEME
------------------------------ */
.speciality-card {
  background-color: var(--white);
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  padding: 30px;
  transition: all 0.3s ease;
  text-align: left;
  height: 100%;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.03);
  position: relative;
  --hover-color: var(--primary-purple);
}

.speciality-card:hover {
  transform: translateY(-5px);
  border-color: var(--hover-color);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.speciality-card:hover h3 {
  color: var(--hover-color);
}

.card-icon {
  width: 60px;
  height: 60px;
  border-radius: 8px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 24px;
  margin-bottom: 20px;
  background-color: #f3eafd; /* Purple-tinted background */
  color: var(--primary-purple); /* Purple icon */
}

.speciality-card h3 {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 10px;
}

.speciality-card p {
  font-size: 15px;
  color: var(--text-gray);
  line-height: 1.6;
}

/* -----------------------------
   RESPONSIVE FIXES
------------------------------ */

/* Tablets (3 columns) */
@media (max-width: 992px) {
  .specialities-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Mobile Large (2 columns) */
@media (max-width: 768px) {
  .specialities-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Mobile Small (1 column) */
@media (max-width: 480px) {
  .specialities-grid {
    grid-template-columns: 1fr;
  }
}

/* --- Expert Doctors Section --- */
.doctors-section {
  padding: 80px 0;
  background-color: var(--white);
}

.orange-highlight-h2 {
  color: var(--primary-orange);
}

.doctors-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  margin-bottom: 50px;
}

.doctor-card {
  background-color: var(--white);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.doctor-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.doctor-photo-wrapper {
  width: 100%;
  height: 300px;
  overflow: hidden;
  position: relative;
  background-color: #f0f0f0;
}

.doctor-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.doctor-card:hover .doctor-photo {
  transform: scale(1.03);
}

.doctor-info {
  padding: 20px;
}

.doctor-info h3 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 5px;
}

.doctor-speciality {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 15px;
}

.purple-text {
  color: var(--primary-purple);
}

.doctor-details {
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px dashed #e0e0e0;
}

.doctor-details li {
  font-size: 14px;
  color: initial;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
}

.doctor-details i {
  font-size: 14px;
  margin-right: 8px;
}

.icon-grad {
  color: var(--accent-blue);
}

.icon-exp {
  color: var(--primary-orange);
}

.text-subtle {
  color: var(--text-gray);
}

/* --- CTA Footer (Center Button) --- */
.doctors-cta-footer {
  text-align: center;
  margin-top: 30px;
}

/* --- Purple View All Doctors Button --- */
.btn-purple-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 26px;
  background-color: var(--primary-purple);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(130, 82, 255, 0.25);
  margin: 0 auto; /* Ensures centering */
}

.btn-purple-link:hover {
  background-color: #6a32ff; /* Darker purple on hover */
  box-shadow: 0 6px 20px rgba(130, 82, 255, 0.35);
  transform: translateY(-2px);
}

.btn-purple-link i {
  transition: transform 0.3s ease;
}

.btn-purple-link:hover i {
  transform: translateX(4px);
}


/* =========================================
   MEDIA QUERIES
   ========================================= */

@media (max-width: 1200px) {
  .doctors-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 1100px) {
  .dropdown-menu {
    width: 400px;
    left: -100px;
    transform: translateX(0);
  }
  .dropdown-grid {
    grid-template-columns: 1fr;
  }
}

/* Laptop & Tablet Fixes for About Section */
@media (max-width: 1024px) {
  .hero-container {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-text {
    margin-bottom: 40px;
  }
  .hero-text h1 {
    font-size: 42px;
  }
  .description {
    margin: 0 auto 40px auto;
  }
  .hero-cta {
    justify-content: center;
  }
  .hero-stats {
    justify-content: center;
  }
  .floating-card {
    left: 50%;
    transform: translateX(-50%);
    bottom: -30px;
    animation: none;
  }
  .prev-btn {
    left: 10px;
  }
  .next-btn {
    right: 10px;
  }
  
  /* About Section Adjustments */
  .about-content {
      gap: 30px;
  }
  .section-heading {
      font-size: 32px;
  }
  .floating-badge {
      right: 10px;
      bottom: -20px;
      padding: 15px 25px;
  }
  .floating-badge h3 {
      font-size: 26px;
  }
}

@media (max-width: 992px) {
  /* Navbar Mobile Logic */
  .menu-toggle {
    display: block;
    z-index: 1001;
  }
  .menu-toggle.active .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }
  .menu-toggle.active .bar:nth-child(2) {
    opacity: 0;
  }
  .menu-toggle.active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }
  .nav-menu {
    position: fixed;
    left: -100%;
    top: 0;
    gap: 0;
    flex-direction: column;
    background-color: var(--white);
    width: 80%;
    height: 100vh;
    text-align: left;
    transition: 0.4s ease;
    padding-top: 100px;
    box-shadow: 5px 0 15px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
  }
  .nav-menu.active {
    left: 0;
  }
  .nav-item {
    width: 100%;
    margin: 0;
  }
  .nav-link {
    display: block;
    padding: 15px 30px;
    font-size: 1.1rem;
    border-bottom: 1px solid #eee;
  }
  .nav-buttons {
    flex-direction: column;
    width: 100%;
    padding: 20px 30px;
    margin: 0;
    gap: 15px;
  }
  .btn {
    width: 100%;
    justify-content: center;
  }
  .dropdown-menu {
    position: static;
    width: 100%;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border-top: none;
    border-left: 4px solid var(--primary-orange);
    padding: 0;
    background: #f9f9f9;
    display: none;
  }
  .dropdown.active .dropdown-menu {
    display: block;
  }
  .dropdown-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .dropdown-item {
    padding: 12px 20px 12px 40px;
    font-size: 0.95rem;
    border-bottom: 1px solid #eee;
  }

  /* About Section Stack */
  .about-content {
      grid-template-columns: 1fr;
  }
  .about-image-col {
      padding-right: 0;
      margin-bottom: 40px;
  }
  .floating-badge {
      right: 0;
  }
  .stats-row {
      grid-template-columns: 1fr 1fr;
      gap: 40px;
  }
}

@media (max-width: 768px) {
  .doctors-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
  .specialities-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .hero-text h1 {
    font-size: 32px;
  }
  .hero-cta {
    flex-direction: column;
  }
  .hero-stats {
    gap: 20px;
  }
  .stat-item h3 {
    font-size: 22px;
  }
  .floating-card {
    width: 90%;
  }
  .slider-btn {
    display: none;
  }
  .doctors-grid {
    grid-template-columns: 1fr;
  }
  
  /* About Mobile */
  .stats-row {
      grid-template-columns: 1fr;
  }
  .section-heading {
      font-size: 28px;
  }
}