/* --- BASE & DESKTOP UI (Original Layout Preserved) --- */
.clinic-body {
  margin: 0;
  font-family: "Poppins", sans-serif;
}

.clinic-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 15px 0;
  transition: 0.3s ease;
}

.header-container {
  max-width: 1400px !important;
}

/* Force the left and right nav areas to take up equal space */
.nav-left,
.nav-right {
  gap: 30px;
  flex: 1;
}

/* Ensure the left nav pushes its content to the right (towards the logo) */
.nav-left {
  justify-content: flex-end;
}

/* Ensure the right nav pushes its content to the left (towards the logo) */
.nav-right {
  justify-content: flex-start;
}

.nav-link {
  color: #ffffff;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: 0.3s;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.clinic-logo-img {
  height: 65px; /* Keep your original layout height */
  transform: scale(2); /* Increase this value to make it bigger */
  transition: 0.3s;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.3));
}

.logo-area {
  /* The transform scale(2) requires a larger physical gap to push the menus away */
  margin-left: 60px !important;
  margin-right: 60px !important;
  flex-shrink: 0; /* Prevents the logo container from being squished */
  display: flex;
  justify-content: center;
}

/* SCROLLED STATE */
.clinic-header.scrolled {
  background: #ffffff;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  padding: 10px 0;
}

.clinic-header.scrolled .nav-link {
  color: #333333;
  text-shadow: none;
}

.clinic-header.scrolled .clinic-logo-img {
  height: 65px;
  transform: scale(1.9);
  filter: none;
}

.clinic-header.scrolled .line {
  background: #333333 !important;
}

/* Adjust the gap when scrolled so it looks normal when the logo shrinks */
.clinic-header.scrolled .logo-area {
  margin-left: 60px !important;
  margin-right: 60px !important;
  transition: 0.3s;
}

/* --- PREMIUM GRADIENT MOBILE UI --- */
.menu-toggle-check {
  display: none;
}

/* Desktop Phone Number */
.header-phone {
  background: linear-gradient(135deg, #013578 0%, #136ab6 100%);
  color: #ffffff;
  padding: 10px 22px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.5px;
  transition: 0.3s ease;
}

.header-phone:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(1, 53, 120, 0.3);
}

/* Scrolled state adjustment */
.clinic-header.scrolled .header-phone {
  background: #013578;
}

/* --- RESPONSIVE ADJUSTMENTS --- */

/* Tablet & Smaller Laptops (Bootstrap lg breakpoint) */
@media (max-width: 1199px) {
  .nav-left,
  .nav-right {
    gap: 15px; /* Reduce gap to prevent crowding */
  }
  .nav-link {
    font-size: 13px; /* Slightly smaller text */
    letter-spacing: 0.5px;
  }
  .logo-area {
    margin-left: 30px !important;
    margin-right: 30px !important;
  }
  .clinic-header.scrolled .logo-area {
    margin-left: 30px !important;
    margin-right: 30px !important;
  }
  .clinic-logo-img {
    transform: scale(1.6); /* Don't scale as aggressively on tablets */
  }
  .clinic-header.scrolled .clinic-logo-img {
    transform: scale(1.4);
  }
}

/* Mobile & Small Tablets */
@media (max-width: 991px) {
  .header-container {
    padding: 0 20px;
  }

  .logo-area {
    margin: 0 !important;
    flex: 1;
    justify-content: flex-start;
  }

  .clinic-header {
    padding: 3px 0 !important;
  }

  .clinic-logo-img {
    transform: scale(1.5) !important;
    transform-origin: left center;
  }

  .clinic-header.scrolled .logo-area {
    margin: 0 !important;
  }
  .clinic-header.scrolled .clinic-logo-img {
    transform: scale(1.6) !important;
  }

  /* Single Animated Toggle (The Hamburger/X icon) */
  .hamburger-lines {
    display: flex;
    height: 20px;
    width: 28px;
    flex-direction: column;
    justify-content: space-between;
    cursor: pointer;
    z-index: 2000;
    position: relative; /* Keep this relative so it stays in the header */
  }

  .hamburger-lines .line {
    display: block;
    height: 2px;
    width: 100%;
    background: #ffffff;
    border-radius: 10px;
    transition: 0.4s cubic-bezier(0.19, 1, 0.22, 1);
  }

  /* FULL OVERLAY - LOCKED HEIGHT, NO SCROLL */
  .mobile-nav-overlay {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100vh;
    background: linear-gradient(145deg, #01162e 0%, #012a52 50%, #013578 100%);
    z-index: 1500;
    opacity: 0;
    visibility: hidden;
    transition: all 0.5s cubic-bezier(0.77, 0, 0.175, 1);
    overflow: hidden;
  }

  .mobile-nav-container {
    height: 100%;
    padding: 60px 30px 30px;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
  }

  /* Top section with Logo */
  .mobile-nav-top {
    width: 100%;
    margin-bottom: 15px; /* Reduced to make room for bigger logo */
    display: flex;
    justify-content: center;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 15px; /* Reduced to make room for bigger logo */
  }

  /* GLOW LAYER (can extend outside) */
  .mobile-logo-glow {
    position: relative;
    display: inline-block;
  }

  /* FLASH BEHIND LOGO */
  .mobile-logo-glow::before {
    content: "";
    position: absolute;
    inset: -15px;
    background: radial-gradient(
      circle,
      rgba(255, 255, 255, 0.95) 0%,
      rgba(255, 255, 255, 0.55) 40%,
      rgba(255, 255, 255, 0) 75%
    );
    filter: blur(18px);
    z-index: 1;
  }

  /* LOGO BOX */
  .mobile-logo-wrapper {
    position: relative;
    border-radius: 12px;
    overflow: hidden; /* keeps shine inside */
    z-index: 2;
  }

  /* LOGO */
  .mobile-inner-logo {
    height: 100px;
    background: #ffffff;
    padding: 10px;
    border-radius: 12px;
  }

  /* SHINE EFFECT */
  .mobile-logo-wrapper::after {
    content: "";
    position: absolute;
    top: 0;
    left: -70%;
    width: 40%;
    height: 100%;
    background: linear-gradient(
      120deg,
      transparent,
      rgba(255, 255, 255, 0.9),
      transparent
    );
    transform: skewX(-25deg);
    animation: logoShine 4s infinite;
  }

  @keyframes logoShine {
    0% {
      left: -70%;
    }
    100% {
      left: 130%;
    }
  }

  /* COMPACT LIST NAVIGATION */
  .mobile-nav-links {
    display: flex;
    flex-direction: column;
    gap: 25px; /* reduced gap */
    flex: unset;
    width: 100%;
  }

  .mobile-link {
    color: #ffffff;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    transition: 0.3s ease;
  }

  .mobile-link::after {
    content: "\276F";
    font-size: 12px;
    color: rgba(255, 255, 255, 0.3);
    transition: 0.3s ease;
  }

  .mobile-link:hover {
    color: #bfa67a;
    padding-left: 8px;
  }

  .mobile-link:hover::after {
    color: #bfa67a;
  }

  .link-num {
    display: none;
  }

  /* BOTTOM CONTROLS CONTAINER */
  .bottom-controls-wrapper {
    margin-top: 15px;
    width: 100%;
  }

  /* Social Media Grid */
  .mobile-social-grid {
    display: flex;
    justify-content: center;
    gap: 25px !important;
    width: 100%;
    margin-bottom: 20px !important;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
  }

  .mobile-social-link {
    color: rgba(255, 255, 255, 0.7) !important;
    transition: 0.3s ease;
    font-size: 18px;
  }

  .mobile-social-link:hover {
    color: #bfa67a !important;
    transform: translateY(-3px);
  }

  /* Sleek Solid Button */
  .mobile-nav-footer {
    width: 100%;
  }

  .btn-portal-mobile {
    display: block;
    width: 100%;
    background: #ffffff;
    color: #01162e;
    text-align: center;
    padding: 14px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 700;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
  }

  .btn-portal-mobile:hover {
    background: #f0f0f0;
  }

  /* Toggle States */
  .menu-toggle-check:checked ~ .mobile-nav-overlay {
    right: 0;
    opacity: 1;
    visibility: visible;
  }

  /* Transforms Hamburger into fixed X over the menu */
  .menu-toggle-check:checked ~ .hamburger-lines {
    position: fixed;
    right: 25px; /* Aligns with container padding */
    top: 30px;
    z-index: 2100;
  }

  .menu-toggle-check:checked ~ .hamburger-lines .line1 {
    transform: rotate(45deg) translate(4px, 5px);
    background: #ffffff !important;
  }
  .menu-toggle-check:checked ~ .hamburger-lines .line2 {
    opacity: 0;
  }
  .menu-toggle-check:checked ~ .hamburger-lines .line3 {
    transform: rotate(-45deg) translate(5px, -6px);
    background: #ffffff !important;
  }

  body:has(.menu-toggle-check:checked) {
    overflow: hidden;
  }
}
