/* JHH overrides */

/* Desktop menu — readable size, theme-like alignment */
@media only screen and (min-width: 1200px) {
  .header .nav-menu.jhh-compact-nav > li > a {
    font-size: 16px;
    padding: 28px 7px;
  }
  .header .main-menu-top .h-menu-right {
    margin-top: 28px;
  }
  .header .h-menu-right .theme-btn {
    padding: 12px 20px;
    font-size: 15px;
  }
}

/* Medium desktop: menu wraps to 2 lines before hamburger kicks in */
@media only screen and (min-width: 1200px) and (max-width: 1399px) {
  .header .main-menu-top {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: flex-end;
    gap: 0 8px;
  }
  .header .main-menu {
    float: none;
    flex: 1 1 100%;
    max-width: 100%;
  }
  .header .nav-menu.jhh-compact-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    row-gap: 0;
  }
  .header .nav-menu.jhh-compact-nav > li > a {
    padding: 18px 6px;
  }
  .header .h-menu-right {
    float: none;
    flex-shrink: 0;
    margin-top: 0;
    margin-bottom: 8px;
  }
  .header .nav-menu li .sub-menu {
    top: 118px;
  }
}

/* Keep theme-native responsive header/menu behavior for tablet/mobile */
@media only screen and (max-width: 1199px) {
  .header .h-menu-right {
    display: none !important;
  }
}
/* FIND A DOCTOR dropdown: name + department */
.header .nav-menu li .sub-menu {
  width: 260px;
}
.header .nav-menu .jhh-doctor-link {
  display: block;
  line-height: 1.35;
  white-space: normal;
}
.header .nav-menu .jhh-doc-name {
  display: block;
  font-weight: 600;
}
.header .nav-menu .jhh-doc-dept {
  display: block;
  font-size: 11px;
  font-weight: 500;
  color: #6b7280;
  margin-top: 2px;
}

/* Department tabs audit fix: keep base style, support 16 tabs */
.department-tab-menu .menu-tab.tabs-16 {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
}
.department-tab-menu .menu-tab.tabs-16 .nav-item {
  margin: 0 !important;
  padding: 0;
  flex: 0 1 calc(16.666% - 16px);
  min-width: 170px;
  max-width: 190px;
}
.department-tab-menu .menu-tab.tabs-16 .nav-item a {
  width: 100%;
  min-height: 132px;
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
}
.department-tab-menu .menu-tab.tabs-16 .nav-item i {
  width: 1.25em;
  margin-bottom: 8px;
  text-align: center;
}
.department-tab-menu .menu-tab.tabs-16 .nav-item span {
  margin-top: 0;
  min-height: 2.7em;
  line-height: 1.35;
  font-size: 14px;
  text-align: center;
}

@media only screen and (min-width: 991px) and (max-width: 1199px) {
  .department-tab-menu .menu-tab.tabs-16 {
    gap: 14px;
  }
  .department-tab-menu .menu-tab.tabs-16 .nav-item {
    flex-basis: calc(25% - 14px);
    min-width: 0;
  }
}

@media only screen and (min-width: 768px) and (max-width: 990px) {
  .department-tab-menu .menu-tab.tabs-16 {
    gap: 12px;
  }
  .department-tab-menu .menu-tab.tabs-16 .nav-item {
    flex-basis: calc(33.333% - 12px);
    min-width: 0;
  }
  .department-tab-menu .menu-tab.tabs-16 .nav-item a {
    min-height: 122px;
    padding: 14px 10px;
  }
}

@media only screen and (max-width: 767px) {
  .department-tab-menu .menu-tab.tabs-16 {
    gap: 10px;
  }
  .department-tab-menu .menu-tab.tabs-16 .nav-item {
    flex-basis: calc(50% - 10px);
    min-width: 0;
  }
  .department-tab-menu .menu-tab.tabs-16 .nav-item a {
    min-height: 116px;
    padding: 12px 8px;
  }
  .department-tab-menu .menu-tab.tabs-16 .nav-item i {
    font-size: 30px;
  }
  .department-tab-menu .menu-tab.tabs-16 .nav-item span {
    font-size: 13px;
    line-height: 1.3;
  }
}

/* Topbar mobile appointment (right of helpline) */
.topbar-area .jhh-topbar-appointment {
  display: none;
}

/* Topbar: full width, 3 equal columns (no top-link menu) */
.topbar-area .top-link {
  display: none !important;
}
.topbar-area .container > .row > .col-12 {
  width: 100%;
  max-width: 100%;
  flex: 0 0 100%;
}
.topbar-area .topbar-content {
  float: none !important;
  width: 100% !important;
  display: block !important;
  position: relative;
}
.topbar-area .topbar-detail.jhh-topbar-grid {
  display: flex;
  flex-wrap: nowrap;
  width: 100%;
  padding: 0;
  margin: 0;
  list-style: none;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}
.topbar-area .topbar-detail.jhh-topbar-grid li {
  flex: 1 1 33.333%;
  max-width: 33.333%;
  min-width: 0;
  display: block;
  margin: 0;
  padding-left: 55px;
  padding-right: 6px;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
  overflow-wrap: break-word;
  vertical-align: top;
}

/* Desktop: phone numbers inline with separators */
.topbar-area .jhh-topbar-phone .jhh-phone-label {
  display: block;
}
.topbar-area .jhh-topbar-phone .jhh-phone-nums {
  display: inline;
}
.topbar-area .jhh-topbar-phone .jhh-phone-line {
  display: inline;
}
.topbar-area .jhh-topbar-phone .jhh-phone-line + .jhh-phone-line::before {
  content: " | ";
}

/* Homepage media sections from original website data */
.jhh-video-testimonials .single-blog {
  margin-bottom: 24px;
}
.jhh-video-testimonials .single-blog .single-blog-title h3 a {
  font-size: 22px;
}
.jhh-video-testimonials .single-blog .single-blog-title p {
  margin-bottom: 0;
}

/* Departments listing page mobile grid stability */
.department-details-main > .row > [class*="col-"] {
  margin-bottom: 18px;
}
.department-single {
  height: 100%;
}
.department-single h6 {
  line-height: 1.3;
  word-break: break-word;
}
@media only screen and (max-width: 767px) {
  .department-single {
    padding: 16px 8px;
    min-height: 190px;
  }
  .department-single i {
    font-size: 46px;
  }
  .department-single h6 {
    font-size: 14px;
    margin-top: 8px;
  }
}

/* Mobile / tablet topbar: helpline left, Appointment button RIGHT */
@media only screen and (max-width: 1199px) {
  .topbar-area .topbar-content.jhh-topbar-wrap {
    display: flex !important;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
  }
  .topbar-area .jhh-topbar-appointment {
    display: inline-block !important;
    flex-shrink: 0;
    align-self: center;
    margin-left: auto;
    padding: 9px 14px;
    font-size: 13px;
    line-height: 1.2;
    white-space: nowrap;
    border-radius: 4px;
  }
  .topbar-area .topbar-detail.jhh-topbar-grid {
    display: flex;
    flex: 1 1 auto;
    min-width: 0;
    width: auto;
    margin: 0;
  }
  .topbar-area .topbar-detail.jhh-topbar-grid li:nth-child(1),
  .topbar-area .topbar-detail.jhh-topbar-grid li:nth-child(2) {
    display: none !important;
  }
  .topbar-area .topbar-detail.jhh-topbar-grid li.jhh-topbar-phone {
    flex: 1 1 auto;
    max-width: 100%;
    padding-left: 48px;
    padding-right: 4px;
    margin: 0;
    text-align: left;
  }
  .topbar-area .jhh-topbar-phone i {
    width: 40px;
    height: 40px;
    line-height: 36px;
    font-size: 16px;
    top: 4px;
  }
  .topbar-area .jhh-topbar-phone .jhh-phone-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 4px;
    color: #fff;
  }
  .topbar-area .jhh-topbar-phone .jhh-phone-nums {
    display: block;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.35;
    color: #fff;
  }
  .topbar-area .jhh-topbar-phone .jhh-phone-line {
    display: block;
  }
  .topbar-area .jhh-topbar-phone .jhh-phone-line + .jhh-phone-line::before {
    content: none;
  }
}

/* Phone only on small mobile — tighter layout */
@media only screen and (max-width: 767px) {
  .topbar-area .jhh-topbar-phone .jhh-phone-label {
    font-size: 13px;
  }
  .topbar-area .jhh-topbar-phone .jhh-phone-nums,
  .topbar-area .jhh-topbar-phone .jhh-phone-line {
    font-size: 14px;
  }
}

/* Theme hides topbar on small screens — keep JHH helpline row visible */
@media only screen and (max-width: 767px) {
  .topbar-area .topbar-content.jhh-topbar-wrap {
    display: flex !important;
  }
}

/* Hero: no overlay, full image visible */
.hero-area.hero-area--fullimage .single-slider::before {
  display: none !important;
  content: none !important;
}
.hero-area.hero-area--fullimage .single-slider {
  height: auto !important;
  min-height: 260px !important;
  background: none !important;
  position: relative;
  padding: 0;
}
.hero-area.hero-area--fullimage .single-slider .container,
.hero-area.hero-area--fullimage .hero-content {
  display: none !important;
}
.hero-area.hero-area--fullimage .hero-slide-link {
  display: block;
  line-height: 0;
}
.hero-area.hero-area--fullimage .hero-slide-img {
  width: 100%;
  height: auto;
  display: block;
  max-width: 100%;
  max-height: calc(100vh - 160px);
  object-fit: contain;
  object-position: center center;
}
.hero-area.hero-area--fullimage .owl-stage-outer,
.hero-area.hero-area--fullimage .owl-stage,
.hero-area.hero-area--fullimage .owl-item {
  height: auto !important;
}
.hero-area.hero-area--fullimage .owl-carousel .owl-nav button {
  bottom: auto;
  top: 50%;
  margin-top: -30px;
  background: rgba(255, 255, 255, 0.85);
  color: #1a76d1;
}

/* Breadcrumb: common banner with white overlay */
.breadcrumbs {
  position: relative;
  background-image: url("../img/hospital/service-banner-1.jpg") !important;
  background-size: cover;
  background-position: center center;
}
.breadcrumbs::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.65);
  z-index: 0;
}
.breadcrumbs .container,
.breadcrumbs .breadcrumb-content {
  position: relative;
  z-index: 1;
}
.breadcrumbs h1,
.breadcrumbs h4,
.breadcrumbs .breadcrumb-menu li,
.breadcrumbs .breadcrumb-menu li a,
.breadcrumbs .breadcrumb-menu li i {
  color: #111 !important;
}
.breadcrumbs .breadcrumb-menu li a:hover {
  color: #000 !important;
}

@media only screen and (max-width: 991px) {
  .hero-area.hero-area--fullimage .single-slider {
    min-height: 190px !important;
  }
  .hero-area.hero-area--fullimage .hero-slide-img {
    max-height: calc(100vh - 130px);
  }
}

/* Photo gallery — Medicare layout */
.jhh-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
  margin-top: 30px;
}
.jhh-gallery-item {
  display: block;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}
.jhh-gallery-item img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  transition: transform 0.3s ease;
}
.jhh-gallery-item:hover img { transform: scale(1.04); }
.jhh-news-body img { max-width: 100%; height: auto; }

/* OPD schedule page */
.jhh-opd-schedule img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}
.jhh-opd-schedule + .jhh-opd-schedule { margin-top: 1.5rem; }

/* TPA & Insurance page */
.jhh-tpa-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 24px;
  margin-top: 30px;
}
.jhh-tpa-card {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  padding: 20px;
  height: 100%;
  text-align: center;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.jhh-tpa-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.12);
}
.jhh-tpa-card a {
  display: block;
  color: inherit;
  text-decoration: none;
}
.jhh-tpa-card img {
  max-width: 100%;
  height: auto;
  max-height: 80px;
  object-fit: contain;
  margin-bottom: 12px;
}
.jhh-tpa-card h3 {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  margin: 0;
  color: #1a76d1;
}

/* Legacy migrated content */
.jhh-legacy-content img { max-width: 100%; height: auto; }
.jhh-legacy-content table { width: 100%; }
.jhh-testimonial-card {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0,0,0,.08);
  padding: 1.5rem;
}
.jhh-quote-footer { color: var(--theme-color, #0d6efd); margin-bottom: .75rem; }
.jhh-tpa-card { border: 1px solid #eee; border-radius: 8px; }
.jhh-tpa-card img { max-height: 80px; object-fit: contain; }
