/* ==========================================================================
   WebSlide Responsive Mega Menu for Lavanya Hospital
   Modern Desktop & Mobile Navigation
   ========================================================================== */

/* Reset & Container */
.wsmenucontainer {
  overflow: hidden;
  position: relative;
  min-height: 100%;
  width: 100%;
}

/* ==========================================
   DESKTOP NAVIGATION (min-width: 992px)
   ========================================== */
/* Topbar Styling & Alignment */
.headtoppart {
  background-color: #0b4570 !important;
  height: 40px;
  line-height: 40px;
  font-size: 13px;
}

.headtoppart .headerwp {
  max-width: 1170px;
  margin: 0 auto;
  padding: 0 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 40px;
}

.headertopleft {
  display: flex;
  align-items: center;
  gap: 15px;
}

.headertopleft .address {
  display: flex;
  align-items: center;
  color: #e2e8f0;
  font-size: 13px;
}

.headertopleft .address span {
  margin-right: 15px;
}

.headertopleft .address a {
  color: #67e8f9 !important;
  font-weight: 600;
  text-decoration: none;
}

.headertopright {
  display: flex;
  align-items: center;
  gap: 12px;
}

.headertopright a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  font-size: 12px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.headertopright a:hover {
  background: #00a3c8;
  color: #ffffff;
}

@media (min-width: 992px) {

  .wsmobileheader,
  .wsmenu-mobile-header {
    display: none !important;
  }

  .overlapblackbg {
    display: none !important;
  }

  .wsmainfull {
    width: 100%;
    background-color: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    position: sticky;
    top: 0;
    z-index: 990;
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
  }

  /* Added by scroll watcher in sticky.js — elevates nav on scroll */
  .wsmainfull.scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.10);
    border-bottom-color: transparent;
  }

  .wsmainwp {
    max-width: 1320px;
    width: 100%;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;
    white-space: nowrap;
    min-height: 72px;
    box-sizing: border-box;
  }

  /* Desktop Logo */
  .desktoplogo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    margin-right: 20px;
  }

  .desktoplogo a {
    display: inline-flex;
    align-items: center;
  }

  .desktoplogo img {
    height: auto;
    width: 100%;
    display: block;
    object-fit: contain;
  }

  /* Navigation Bar */
  .wsmenu {
    display: flex;
    flex-direction: row;
    align-items: center;
    margin-left: auto;
    flex-shrink: 0;
    flex-wrap: nowrap;
  }

  .wsmenu-list {
    display: flex;
    flex-direction: row;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    flex-wrap: nowrap;
    white-space: nowrap;
  }

  .wsmenu-list>li {
    display: inline-flex;
    align-items: center;
    position: relative;
    list-style: none;
    margin: 0;
    padding: 0;
    flex-shrink: 0;
  }

  .wsmenu-list>li>a {
    display: inline-flex;
    align-items: center;
    padding: 24px 11px;
    font-size: 14px;
    font-weight: 500;
    color: #1e293b;
    text-decoration: none;
    transition: color 0.2s ease;
    letter-spacing: 0.2px;
    white-space: nowrap;
  }

  .wsmenu-list>li>a:hover,
  .wsmenu-list>li.active>a {
    color: #00a3c8;
  }

  /* Dropdown Arrow */
  .wsarrow {
    display: inline-block;
    width: 0;
    height: 0;
    margin-left: 5px;
    vertical-align: middle;
    border-top: 4px solid #718096;
    border-right: 4px solid transparent;
    border-left: 4px solid transparent;
    transition: transform 0.2s ease, border-color 0.2s ease;
  }

  .wsmenu-list>li:hover>a .wsarrow {
    border-top-color: #00a3c8;
    transform: rotate(180deg);
  }

  /* Sub Menu Dropdown */
  .wsmenu-list>li>.sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 250px;
    background: #ffffff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
    border-radius: 0 0 8px 8px;
    border-top: 3px solid #00a3c8;
    padding: 10px 0;
    margin: 0;
    list-style: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.25s ease;
    z-index: 1000;
  }

  .wsmenu-list>li:hover>.sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .wsmenu-list>li>.sub-menu li {
    list-style: none;
    margin: 0;
    padding: 0;
  }

  .wsmenu-list>li>.sub-menu li a {
    display: flex;
    align-items: center;
    padding: 11px 22px;
    font-size: 13.5px;
    color: #334155;
    text-decoration: none;
    transition: all 0.2s ease;
    font-weight: 500;
  }

  .wsmenu-list>li>.sub-menu li a:hover {
    background-color: #f1f8fc;
    color: #00a3c8;
    padding-left: 27px;
  }

  /* Header CTA Button */
  .wsmenu-list>li.header-btn {
    margin-left: 14px;
    display: inline-flex;
    align-items: center;
  }

  .wsmenu-list>li.header-btn a {
    padding: 9px 18px !important;
    background-color: #00a3c8;
    color: #ffffff !important;
    border-radius: 25px;
    font-weight: 600;
    font-size: 13.5px;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    box-shadow: 0 4px 14px rgba(0, 163, 200, 0.25);
    transition: all 0.3s ease;
  }

  .wsmenu-list>li.header-btn a:hover {
    background-color: #0087a6 !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 163, 200, 0.35);
  }
}

/* Medium Desktop Viewports (992px to 1200px) - Ensure strictly single-line */
@media (min-width: 992px) and (max-width: 1200px) {
  .wsmainwp {
    padding: 0 12px !important;
  }

  .desktoplogo {
    margin-right: 10px !important;
  }

  .desktoplogo img {
    height: 38px !important;
  }

  .wsmenu-list>li>a {
    padding: 24px 7px !important;
    font-size: 13px !important;
  }

  .wsmenu-list>li.header-btn {
    margin-left: 8px !important;
  }

  .wsmenu-list>li.header-btn a {
    padding: 8px 14px !important;
    font-size: 12.5px !important;
  }
}

/* ==========================================
   MOBILE & TABLET NAVIGATION (max-width: 991px)
   ========================================== */
@media (max-width: 991px) {

  /* Hide desktop bar wrapper */
  .desktoplogo {
    display: none !important;
  }

  /* Top bar adjustments on mobile */
  .headtoppart {
    display: none !important;
  }

  /* Mobile Header Bar */
  .wsmobileheader {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    position: relative;
    top: 0;
    left: 0;
    width: 100%;
    height: 80px;
    background-color: #ffffff;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    padding: 0 16px;
    z-index: 9999;
  }

  .wsmenu-mobile-brand img {
    width: 100%;
    max-width: 100%;
    max-height: 100%;
    height: 90% !important;
  }

  /* Small Logo in Mobile Header */
  .wsmobileheader .smllogo {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .wsmobileheader .smllogo img {
    height: 70px;
    width: auto;
    object-fit: contain;
  }

  /* Mobile Quick Call Button */
  .wsmobileheader .callusbtn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background-color: #e6f6f9;
    color: #00a3c8;
    font-size: 16px;
    text-decoration: none;
    transition: all 0.2s ease;
  }

  .wsmobileheader .callusbtn:hover {
    background-color: #00a3c8;
    color: #ffffff;
  }

  /* Hamburger Toggle Arrow */
  .wsanimated-arrow {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    cursor: pointer;
    padding: 4px;
    z-index: 10001;
  }

  .wsanimated-arrow span {
    display: block;
    width: 24px;
    height: 2.5px;
    background-color: #1e293b;
    border-radius: 3px;
    position: relative;
    transition: all 0.3s ease-in-out;
  }

  .wsanimated-arrow span:before,
  .wsanimated-arrow span:after {
    content: '';
    display: block;
    width: 24px;
    height: 2.5px;
    background-color: #1e293b;
    border-radius: 3px;
    position: absolute;
    left: 0;
    transition: all 0.3s ease-in-out;
  }

  .wsanimated-arrow span:before {
    top: -7px;
  }

  .wsanimated-arrow span:after {
    bottom: -7px;
  }

  /* Active Hamburger transformation (X) */
  body.wsactive .wsanimated-arrow span {
    background-color: transparent;
  }

  body.wsactive .wsanimated-arrow span:before {
    top: 0;
    transform: rotate(45deg);
    background-color: #00a3c8;
  }

  body.wsactive .wsanimated-arrow span:after {
    bottom: 0;
    transform: rotate(-45deg);
    background-color: #00a3c8;
  }

  /* Off-Canvas Backdrop Overlay */
  .overlapblackbg {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(2px);
    z-index: 9998;
    transition: opacity 0.3s ease;
  }

  body.wsactive .overlapblackbg {
    display: block;
  }

  /* Off-Canvas Sliding Drawer */
  .wsmainfull {
    position: fixed;
    top: 0;
    left: -320px;
    width: 300px;
    max-width: 85vw;
    height: 100vh;
    background: #ffffff;
    box-shadow: 4px 0 25px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    transition: left 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    border: none;
  }

  body.wsactive .wsmainfull {
    left: 0;
  }

  /* Mobile Drawer Brand Header */
  .wsmenu-mobile-header {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #f1f5f9;
  }

  .wsmenu-mobile-brand {
    display: inline-flex;
    align-items: center;
  }

  .wsmenu-mobile-brand img {
    height: 36px;
    width: auto;
  }

  .wsmainwp {
    padding: 10px 0 40px;
    width: 100%;
  }

  .wsmenu {
    width: 100%;
  }

  .wsmenu-list {
    display: block;
    width: 100%;
    margin: 0;
    padding: 0;
    list-style: none;
  }

  .wsmenu-list>li {
    display: block;
    width: 100%;
    position: relative;
    border-bottom: 1px solid #f1f5f9;
  }

  .wsmenu-list>li>a {
    display: block;
    padding: 14px 22px;
    font-size: 15px;
    font-weight: 500;
    color: #1e293b;
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease;
  }

  .wsmenu-list>li>a:hover {
    background-color: #f8fafc;
    color: #00a3c8;
  }

  /* Mobile Dropdown Click Trigger */
  .wsmenu-click {
    position: absolute;
    right: 0;
    top: 0;
    width: 54px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2;
  }

  .wsmenu-arrow {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-right: 2px solid #64748b;
    border-bottom: 2px solid #64748b;
    transform: rotate(45deg);
    transition: transform 0.25s ease;
  }

  .ws-activearrow .wsmenu-arrow {
    transform: rotate(-135deg);
    border-color: #00a3c8;
  }

  /* Sub Menu in Mobile */
  .wsmenu-list>li>.sub-menu {
    display: none;
    background-color: #f8fafc;
    padding: 6px 0;
    margin: 0;
    list-style: none;
    border-left: 3px solid #00a3c8;
  }

  .wsmenu-list>li>.sub-menu li a {
    display: flex;
    align-items: center;
    padding: 10px 22px 10px 32px;
    font-size: 14px;
    color: #475569;
    text-decoration: none;
  }

  .wsmenu-list>li>.sub-menu li a:hover {
    color: #00a3c8;
  }

  /* Mobile Appointment Button */
  .wsmenu-list>li.header-btn {
    border-bottom: none;
    padding: 20px 22px;
  }

  .wsmenu-list>li.header-btn a {
    display: block;
    text-align: center;
    background-color: #00a3c8;
    color: #ffffff !important;
    padding: 12px 20px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 14px;
    box-shadow: 0 4px 12px rgba(0, 163, 200, 0.3);
  }
}