/* ================================================================
   NAV DROPDOWN — Heal Physio & Wellness
   Click-based Services dropdown for desktop + mobile.
   Self-contained: does NOT modify style.css
   ================================================================ */

/* ── Desktop: Services <li> — flex row so link + button share center axis ── */
li.hp-services-item {
  display: flex !important;
  align-items: center !important;
  flex-wrap: nowrap;
}

/* The Services nav link — keeps its own style, no extra spacing after text */
li.hp-services-item > a {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  line-height: 1;
  padding-right: 0 !important;
}

/* The chevron toggle button — sits immediately after the link text */
button.hp-services-toggle {
  background: none;
  border: none;
  padding: 0 0 0 3px;
  margin: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: inherit;
  font-size: 11px;
  line-height: 1;
  height: 100%;
  flex-shrink: 0;
}

/* The chevron icon that rotates when open */
.hp-chevron,
.hp-mob-chevron {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 350ms ease;
  font-size: 11px;
  line-height: 1;
}

button.hp-services-toggle.hp-open .hp-chevron {
  transform: rotate(180deg);
}

/* ================================================================
   DESKTOP DROPDOWN
   ================================================================ */

/* Hide old hover-based ul on desktop for Services */
@media (min-width: 1200px) {
  .main-menu .main-menu__list > li.hp-services-item > ul {
    display: none !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    transition: none !important;
  }

  /* New click-based dropdown panel */
  .hp-desktop-dropdown {
    position: absolute;
    top: calc(100% + 0px);
    left: -25px;
    min-width: 260px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
    padding: 8px 0;
    z-index: 9999;
    /* Hidden by default */
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 280ms ease, transform 280ms ease, visibility 280ms ease;
    pointer-events: none;
  }

  .hp-services-item.hp-open .hp-desktop-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
  }

  .hp-desktop-dropdown a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 22px;
    font-size: 14px;
    color: #1d4a5a;
    font-weight: 500;
    text-decoration: none;
    transition: background 200ms ease, color 200ms ease, padding-left 200ms ease;
    border-left: 3px solid transparent;
    white-space: nowrap;
  }

  .hp-desktop-dropdown a:hover {
    background: #f0faff;
    color: #1d98c1;
    border-left-color: #1d98c1;
    padding-left: 26px;
  }

  .hp-desktop-dropdown a .hp-dd-icon {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: #e8f7fd;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1d98c1;
    font-size: 13px;
    flex-shrink: 0;
    transition: background 200ms ease, color 200ms ease;
  }

  .hp-desktop-dropdown a:hover .hp-dd-icon {
    background: #1d98c1;
    color: #fff;
  }

  /* Divider between items */
  .hp-desktop-dropdown a + a {
    border-top: 1px solid #f0f4f7;
  }
}

/* ================================================================
   MOBILE NAV — Complete Replacement
   ================================================================ */

/* Hide OLD mobile nav wrapper entirely */
.mobile-nav__wrapper {
  display: none !important;
}

/* ── Hamburger button styling (keep existing 3-bar look) ── */
.hp-mob-toggler {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
}

.hp-mob-toggler span {
  display: block;
  width: 24px;
  height: 2px;
  background: #1d4a5a;
  border-radius: 2px;
  transition: all 350ms ease;
}

/* Overlay */
.hp-mob-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 1050;
  cursor: pointer;
}

.hp-mob-overlay.hp-mob-active {
  display: block;
}

/* Sidebar panel */
.hp-mob-panel {
  position: fixed;
  top: 0;
  left: 0;
  width: 300px;
  max-width: 90vw;
  height: 100vh;
  background: #fff;
  z-index: 1051;
  overflow-y: auto;
  transform: translateX(-100%);
  transition: transform 380ms cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 4px 0 30px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
}

.hp-mob-panel.hp-mob-active {
  transform: translateX(0);
}

/* Panel header */
.hp-mob-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 18px 14px;
  border-bottom: 1px solid #e8f0f4;
  flex-shrink: 0;
}

.hp-mob-head img {
  width: 120px;
}

.hp-mob-close {
  background: none;
  border: none;
  font-size: 20px;
  color: #1d4a5a;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: background 200ms ease, color 200ms ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hp-mob-close:hover {
  background: #f0faff;
  color: #1d98c1;
}

/* Nav links list */
.hp-mob-nav {
  list-style: none;
  margin: 0;
  padding: 10px 0;
  flex: 1;
}

.hp-mob-nav > li {
  border-bottom: 1px solid #f0f4f7;
}

/* ── Mobile nav: all regular link items — sky blue color + left padding ── */
.hp-mob-nav > li > a {
  display: flex;
  align-items: center;
  padding: 14px 20px 14px 24px;
  font-size: 15px;
  font-weight: 600;
  color: #1d98c1;
  text-decoration: none;
  width: 100%;
  transition: color 200ms ease, background 200ms ease, padding-left 200ms ease;
  border-left: 3px solid transparent;
}

.hp-mob-nav > li > a:hover {
  color: #1780a6;
  background: #f0faff;
  border-left-color: #1d98c1;
  padding-left: 28px;
}


/* ── Mobile: Services <li> — flex row, link navigates, button toggles ── */
.hp-mob-services-li {
  display: flex !important;
  flex-wrap: wrap;
  align-items: center;
}

/* Services link — takes up available width, same style as other nav links */
.hp-mob-services-li > a {
  flex: 1;
  display: flex;
  align-items: center;
  padding: 14px 4px 14px 24px;
  font-size: 15px;
  font-weight: 600;
  color: #1d98c1;
  text-decoration: none;
  transition: color 200ms ease, background 200ms ease, padding-left 200ms ease;
  white-space: nowrap;
  border-left: 3px solid transparent;
}

.hp-mob-services-li > a:hover {
  color: #1780a6;
  background: #f0faff;
  border-left-color: #1d98c1;
  padding-left: 28px;
}

/* Chevron button — sits right of the link, small touch target */
.hp-mob-services-li > .hp-mob-services-btn {
  background: none;
  border: none;
  padding: 14px 18px 14px 8px;
  margin: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #1d98c1;
  font-size: 12px;
  flex-shrink: 0;
  transition: color 200ms ease;
}

.hp-mob-services-li > .hp-mob-services-btn:hover {
  color: #1780a6;
}

/* Submenu takes full width below the flex row */
.hp-mob-services-li > .hp-mob-submenu {
  flex: 0 0 100%;
  width: 100%;
}

/* Services toggle chevron rotation */
.hp-mob-chevron {
  font-size: 12px;
  transition: transform 300ms ease;
  color: #1d98c1;
}

.hp-mob-services-btn.hp-mob-open .hp-mob-chevron {
  transform: rotate(180deg);
}

/* Sub-menu (services list) */
.hp-mob-submenu {
  list-style: none;
  margin: 0;
  padding: 0;
  background: #f8fbfd;
  border-top: 1px solid #e5eff5;
  max-height: 0;
  overflow: hidden;
  transition: max-height 380ms ease;
}

.hp-mob-submenu.hp-mob-open {
  max-height: 600px;
}

.hp-mob-submenu li a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 20px 11px 30px;
  font-size: 14px;
  color: #3a6070;
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid #eef3f6;
  transition: color 200ms ease, background 200ms ease, padding-left 200ms ease;
}

.hp-mob-submenu li:last-child a {
  border-bottom: none;
}

.hp-mob-submenu li a:hover {
  color: #1d98c1;
  background: #e8f7fd;
  padding-left: 36px;
}

.hp-mob-submenu li a .hp-dd-icon {
  width: 26px;
  height: 26px;
  border-radius: 5px;
  background: #e8f7fd;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #1d98c1;
  font-size: 12px;
  flex-shrink: 0;
  transition: background 200ms ease, color 200ms ease;
}

.hp-mob-submenu li a:hover .hp-dd-icon {
  background: #1d98c1;
  color: #fff;
}

/* Book appointment CTA at bottom of panel */
.hp-mob-cta {
  padding: 18px 20px;
  border-top: 1px solid #e8f0f4;
  flex-shrink: 0;
}

.hp-mob-cta a {
  display: block;
  text-align: center;
  background: #1d98c1;
  color: #fff;
  padding: 13px 20px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  transition: background 250ms ease, transform 200ms ease;
}

.hp-mob-cta a:hover {
  background: #1780a6;
  transform: translateY(-1px);
}

/* Only show mobile panel system on mobile (<1200px) */
@media (min-width: 1200px) {
  .hp-mob-overlay,
  .hp-mob-panel {
    display: none !important;
  }
}

/* ================================================================
   BLOG CARD IMAGE FIX
   The default CSS in style.css hides img:nth-child(1) by default
   (opacity:0, blur, scale) and only reveals it on hover.
   Since each blog card has only one <img>, we override those
   hidden defaults so the image shows normally at all times.
   Hover animation from style.css is left completely untouched.
   ================================================================ */
.blog-card__image img:nth-child(1) {
  transform: translateX(0) scaleX(1) !important;
  opacity: 1 !important;
  filter: blur(0) !important;
}

/* ================================================================
   CONTACT PAGE TAGLINE ALIGNMENT FIX
   Aligns the 'need any help?' tagline and icon to the left (flex-start)
   specifically on the contact page.
   ================================================================ */
.text-start-contact {
  justify-content: flex-start !important;
}

