/* ==========================================================================
   EXACT COLOR PALETTE & ARCHITECTURE STYLES
   ========================================================================== */
:root {
  --physio-brand-blue: #001c80;    /* Deep Blue for Logo/Text */
  --physio-btn-blue: #2343c4;      /* Button Primary Blue */
  --physio-nav-bg: #1e56cb;        /* Vibrant Blue Navigation Strip Bar */
  --physio-nav-active: #abc7f5;    /* Soft Active Light Blue Background Tab */
  --physio-nav-right-grad: #1a3b8b;/* Right-aligned dark gradient shading */
  --text-white: #ffffff;
  --text-dark: #1f2937;
  --dropdown-hover-bg: #f1f5f9;    /* Light gray for dropdown hover */
  --dropdown-hover-text: #2343c4;  /* Blue text on hover */
}

/* ==========================================================================
   MOBILE UTILITY STRIP Layout Rules
   ========================================================================== */
.mobile-top-bar {
  display: flex;
  width: 100%;
  font-weight: bold;
  font-size: 14px;
  text-align: center;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1001;
  height: 40px;
}

.mobile-top-bar a {
  text-decoration: none;
  color: var(--text-white);
  line-height: 40px;
  flex: 1;
  transition: all 0.3s ease;
}

.mobile-top-bar .btn-mobile-book { background-color: var(--physio-btn-blue); }
.mobile-top-bar .btn-mobile-call { background-color: #3b82f6; }
.mobile-top-bar .btn-mobile-wa { background-color: #25D366; }

.mobile-top-bar .btn-mobile-book:hover,
.mobile-top-bar .btn-mobile-call:hover,
.mobile-top-bar .btn-mobile-wa:hover {
  opacity: 0.85;
  transform: translateY(-1px);
}

/* ==========================================================================
   NAVBAR COMPONENT BASE LAYER
   ========================================================================== */
.navbar {
  position: fixed;
  top: 40px;
  left: 0;
  width: 100%;
  z-index: 1000;
  background-color: #ffffff;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  transition: all 0.3s ease-in-out;
}

/* Transparent Navbar State (Desktop Context Baseline) */
.navbar.is-transparent {
  background-color: transparent;
  box-shadow: none;
}

.navbar.is-transparent .clinic-heading {
  color: var(--text-white);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.navbar.is-transparent .clinic-tagline {
  color: rgba(255, 255, 255, 0.9);
}

.navbar.is-transparent .menu-toggle {
  color: var(--text-white);
}

.navbar.is-transparent .nav-link:not(.nav-menu-strip .nav-link) {
  color: var(--text-white);
  font-weight: 400px;
}

/* Desktop navigation strip configuration */
.nav-menu-strip {
  width: 100%;
  background-color: transparent;
  transition: background 0.3s ease-in-out;
}

.nav-container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 8px 20px; 
  display: flex;
  flex-direction: column;
}

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

.nav-logo {
  display: flex;
  align-items: center;
}

.nav-logo img {
  height: 68px; 
  width: auto;
  display: block;
  transition: filter 0.3s ease-in-out;
}

.menu-toggle {
  background: none;
  border: none;
  color: var(--physio-brand-blue);
  font-size: 24px;
  cursor: pointer;
  padding: 6px;
  transition: transform 0.2s ease;
}

.nav-menu-wrapper {
  display: none;
  width: 100%;
  flex-direction: column;
  margin-top: 12px;
  order: 3;
}

.nav-menu-wrapper.active {
  display: flex;
}

.nav-cta-group {
  display: flex;
  flex-direction: row;
  gap: 4px;
  margin-bottom: 12px;
  width: 100%;
  order: 1;
}

/* Fixed spacing layout rules inside CTA links */
.btn-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px; 
  border-radius: 4px;
  font-weight: 700;
  font-size: 13px; 
  text-decoration: none;
  background-color: var(--physio-btn-blue);
  color: var(--text-white);
  transition: all 0.3s ease;
  white-space: nowrap; 
  flex: 1;
}

.btn-cta i,
.btn-cta svg {
  margin-right: 8px !important;
}

.nav-menu {
  list-style: none;
  display: flex;
  flex-direction: column;
  width: 100%;
  margin: 0;
  padding: 0;
}

.nav-item { 
  width: 100%;
  margin: 0;
  padding: 0;
}

.nav-link {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px 16px; 
  color: var(--text-dark);
  text-decoration: none;
  font-size: 15px;
  font-weight: 700;
  background: none;
  border: none;
  width: 100%;
  text-align: center;
  cursor: pointer;
}

.nav-link:hover {
  background-color: var(--physio-nav-active);
  color: var(--physio-brand-blue);
}

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

.dropdown-toggle i {
  margin-left: 8px;
  transition: transform 0.3s ease;
}

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

.dropdown-menu-list {
  display: none;
  list-style: none;
  background-color: #f8fafc;
  margin: 0;
  padding: 0;
  border-left: 3px solid var(--physio-btn-blue);
}

.dropdown-menu-list.active { 
  display: block;
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

.dropdown-menu-list a {
  display: block;
  font-size: 14px;
  color: var(--text-dark);
  text-decoration: none;
  padding: 12px 24px 12px 36px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.dropdown-menu-list a:hover {
  background-color: var(--dropdown-hover-bg);
  color: var(--dropdown-hover-text);
  padding-left: 42px;
}

/* ==========================================================================
   LOGO AND HEADING STYLES (No Underline)
   ========================================================================== */
.logo-container {
  display: flex;
  align-items: center;
  gap: 15px;
  text-decoration: none;
}

.nav-heading {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  text-decoration: none;
}

.clinic-heading {
  font-size: 20px;
  font-weight: 700;
  margin: 0;
  color: var(--physio-brand-blue);
  letter-spacing: -0.5px;
  text-decoration: none !important;
  border-bottom: none;
  line-height: 1.3;
}

.clinic-tagline {
  font-size: 11px;
  margin: 0;
  color: #64748b;
  font-weight: 500;
  letter-spacing: 0.3px;
  text-decoration: none !important;
}

/* ==========================================================================
   MOBILE STYLES (Up to 1023px)
   ========================================================================== */
@media (max-width: 1023px) {
  .desktop-only {
    display: none !important;
  }
  
  .mobile-top-bar {
    display: flex;
  }
  
  .navbar,
  .navbar.is-transparent {
    top: 40px !important;
    background-color: #ffffff !important; 
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05) !important;
  }

  .nav-logo img,
  .navbar.is-transparent .nav-logo img,
  .logo-container img {
    filter: brightness(0) !important;
    -webkit-filter: brightness(0) !important;
    opacity: 1 !important;
    display: block !important;
  }

  .navbar .clinic-heading,
  .navbar.is-transparent .clinic-heading {
    color: var(--physio-brand-blue) !important;
    text-shadow: none !important;
  }

  .navbar .clinic-tagline,
  .navbar.is-transparent .clinic-tagline { 
    color: #64748b !important; 
  }

  .navbar .menu-toggle,
  .navbar.is-transparent .menu-toggle { 
    color: var(--physio-brand-blue) !important; 
  }

  .navbar .nav-menu-strip,
  .navbar.is-transparent .nav-menu-strip {
    background: transparent !important;
  }
  
  .nav-container {
    flex-direction: column;
  }
  
  .nav-header { order: 1; }
  .nav-menu-wrapper { order: 2; }
  .nav-cta-group { display: none; }
  
  .clinic-heading { font-size: 16px; }
  .clinic-tagline { font-size: 9px; }

  .nav-item.active .nav-link {
    background-color: var(--physio-nav-active) !important;
    color: var(--physio-brand-blue) !important;
  }
}

/* ==========================================================================
   TABLET/DESKTOP STYLES (1024px and above) - WITH DROPDOWN OVERLAY LOCK
   ========================================================================== */
@media (min-width: 1024px) {
  .mobile-top-bar,
  .menu-toggle {
    display: none !important;
  }
  
  .desktop-only {
    display: flex;
  }
  
  .navbar {
    top: 0 !important;
  }

  .navbar.is-transparent .btn-cta,
  .navbar:not(.is-transparent) .btn-cta {
    background-color: var(--physio-btn-blue) !important;
    color: var(--text-white) !important;
    border: none !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  }

  .navbar.is-transparent .btn-cta:hover,
  .navbar:not(.is-transparent) .btn-cta:hover {
    background-color: #17319c !important;
    transform: translateY(-1px);
  }

  .navbar:not(.is-transparent) .nav-menu-strip {
    background: linear-gradient(to right, var(--physio-nav-bg) 75%, var(--physio-nav-right-grad) 100%);
  }
  
  .nav-container {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 4px 40px;
  }
  
  .nav-header {
    width: auto;
  }
  
  .nav-menu-wrapper {
    display: flex !important;
    flex-direction: row;
    align-items: center;
    width: auto;
    margin-top: 0;
  }
  
  .nav-cta-group {
    flex-direction: row;
    margin-bottom: 0;
    width: auto;
    gap: 12px;
    margin-right: 24px;
    display: flex;
  }
  
  .btn-cta {
    padding: 8px 20px;
    font-size: 14px;
    flex: none;
  }
  
  /* NAVIGATION BAR STRIP ENGINE */
  .nav-menu-strip {
    position: absolute;
    bottom: -40px;
    left: 0;
    height: 40px;
    width: 100%;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
  
  .nav-menu-strip-container {
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 60px 0 40px; /* Added right padding cushion to shift content tracking safely inward */
    display: flex !important;
    justify-content: flex-end !important;
    align-items: center !important;
    height: 100% !important;
  }

  /* MAIN FLEX ROW MENU - PERFECT PARALLEL TRACK LINE */
  .nav-menu {
    flex-direction: row !important;
    width: auto !important;
    height: 40px !important;
    margin: 0 !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    gap: 0 !important;
  }

  .nav-item {
    width: auto !important;
    height: 40px !important;
    position: relative !important;
    margin: 0 !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
  }

  /* THE ABSOLUTE HORIZONTAL CORRECTION LOCK */
  .nav-menu .nav-link,
  .nav-menu .dropdown-toggle,
  .nav-menu-strip .nav-link,
  .nav-menu-strip .dropdown-toggle {
    height: 40px !important;
    padding: 0 16px !important; 
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    white-space: nowrap !important;
    color: var(--text-white) !important;
    background: transparent !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    letter-spacing: 0.3px !important;
    transition: background 0.2s !important;
    text-decoration: none !important;
    margin: 0 !important;
    border: none !important;
    outline: none !important;
    cursor: pointer !important;
    line-height: 40px !important;
    box-sizing: border-box !important;
    vertical-align: middle !important;
  }

  /* Prevent dropdown chevron arrow icon alignment variance */
  .dropdown-toggle i,
  .dropdown-toggle svg {
    display: inline-block !important;
    font-size: 11px !important;
    margin-left: 6px !important;
    line-height: 1 !important;
    vertical-align: middle !important;
    margin-top: 0 !important;
  }

  .nav-menu-strip .nav-link::before,
  .nav-menu-strip .nav-link::after,
  .dropdown-toggle::before,
  .dropdown-toggle::after {
    display: none !important;
  }

  .nav-menu-strip .nav-link:link,
  .nav-menu-strip .nav-link:visited {
    color: var(--text-white) !important;
  }

  .nav-menu-strip .nav-link:hover,
  .nav-menu-strip .nav-item.active .nav-link,
  .dropdown-toggle:hover { 
    background-color: rgba(255, 255, 255, 0.15) !important;
    color: var(--text-white) !important;
  }

  /* Dropdown panel positioning metrics (Configured inward alignment to avoid layout scrollbar clashing) */
  .dropdown-menu-list {
    position: absolute;
    top: 40px;
    right: 0; /* Anchored to right edge to allow safe, clean internal growth towards the left */
    left: auto; /* Reset left anchor rule */
    background-color: #ffffff;
    min-width: 250px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
    border-radius: 8px 0 8px 8px; /* Adapted rounding corners for balanced asymmetry */
    padding: 8px 0;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    border-left: none;
  }

  .dropdown:hover .dropdown-menu-list {
    display: block;
    opacity: 1;
    visibility: visible;
    animation: fadeInUp 0.3s ease;
  }

  @keyframes fadeInUp {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
  }

  .dropdown-menu-list a {
    color: var(--text-dark) !important;
    padding: 10px 20px;
    text-align: left;
    font-weight: 500;
    font-size: 14px;
    border-left: 3px solid transparent;
    display: block;
    height: auto !important;
    line-height: 1.5 !important;
  }

  .dropdown-menu-list a:hover {
    background-color: var(--dropdown-hover-bg) !important;
    color: var(--dropdown-hover-text) !important;
    border-left-color: var(--physio-btn-blue) !important;
    padding-left: 24px;
  }
  
  .clinic-heading { font-size: 22px; }
  .clinic-tagline { font-size: 12px; }
}

/* ==========================================================================
   EXTRA COMPACT BREAKPOINTS
   ========================================================================== */
@media (max-width: 480px) {
  .mobile-top-bar { height: 40px; }
  .mobile-top-bar a { font-size: 12px; }
  
  .navbar,
  .navbar.is-transparent { 
    top: 40px !important; 
    background-color: #ffffff !important;
  }
  
  .nav-logo img,
  .logo-container img {
    filter: brightness(0) !important;
    -webkit-filter: brightness(0) !important;
    height: 55px; 
  }
  
  .nav-link { font-size: 14px; padding: 12px 16px; }
  .clinic-heading { font-size: 14px; }
  .clinic-tagline { display: none; }
}

@media (min-width: 481px) and (max-width: 768px) {
  .clinic-heading { font-size: 15px; }
  .clinic-tagline { font-size: 10px; display: block; }
}

/* Global Resetters */
h1, h2, h3, h4, h5, h6,
.clinic-heading, .clinic-tagline, .logo-container *, .nav-heading * {
  text-decoration: none !important;
}
.logo-container:hover, .nav-heading:hover, .clinic-heading:hover, .clinic-tagline:hover, a .clinic-heading, a .clinic-tagline {
  text-decoration: none !important;
}
html {
  scroll-behavior: smooth;
}