/* Header & footer — HCN site overrides */

/* ----- Header top ----- */
.header-top {
  padding: 1rem 0 !important;
}

.header-top__grid {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 1.5rem;
}

.header-top__logo {
  flex: 0 1 auto;
  min-width: 0;
}

.header-top__logo .classic-industry-logo {
  width: auto !important;
  max-width: 220px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-top__logo .custom-logo-link img,
.header-top__logo img.custom-logo {
  max-height: 56px;
  width: auto;
}

.header-top__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 1rem 1.5rem;
  flex: 1 1 320px;
}

.header-top__item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
}

.header-top__icon {
  flex-shrink: 0;
  width: 36px;
  text-align: center;
}

.header-top__icon i {
  font-size: 22px;
  color: #fff;
}

.page-template-template-home-page .header-top__icon i {
  color: var(--second-theme-color);
}

.header-top__text {
  min-width: 0;
}

.header-top__text .top-text {
  font-size: 11px;
  line-height: 1.3;
  white-space: nowrap;
}

.header-top__text .top-contact {
  font-size: 13px;
  line-height: 1.35;
  word-break: break-all;
}

/* ----- Main nav bar ----- */
.main-header__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 4px 0;
}

.main-header__nav {
  flex: 1 1 auto;
  min-width: 0;
}

.main-header__cta {
  flex: 0 0 auto;
}

.main-header__cta.contact-us a {
  white-space: nowrap;
  padding: 10px 18px;
  font-size: 17px;
}

/* Home: header bar overlays slider — keep stable on tablet */
@media screen and (max-width: 1000px) {
  .page-template-template-home-page .header {
    position: static;
    transform: none;
  }

  .page-template-template-home-page .header-top {
    margin-bottom: 0 !important;
  }

  .header-top__grid {
    flex-direction: column;
    align-items: stretch;
  }

  .header-top__logo {
    text-align: center;
  }

  .header-top__logo .classic-industry-logo {
    max-width: 200px;
    margin: 0 auto;
    justify-content: center;
  }

  .header-top__meta {
    justify-content: center;
    flex: 1 1 100%;
  }

  .main-header__bar {
    padding: 8px 0;
  }

  .toggle-nav {
    text-align: left !important;
    padding-left: 12px;
  }

  .main-header__cta {
    text-align: right;
  }
}

@media screen and (max-width: 767px) {
  .header-top__meta {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }

  .header-top__item {
    justify-content: center;
    text-align: center;
  }

  .header-top__text .top-text,
  .header-top__text .top-contact {
    white-space: normal;
  }

  .main-header__bar {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas:
      'menu cta'
      'nav nav';
    align-items: center;
  }

  .main-header__nav {
    grid-area: menu;
  }

  .main-header__cta {
    grid-area: cta;
  }

  .toggle-nav {
    text-align: left !important;
    padding: 0;
  }

  .main-header__cta.contact-us a {
    font-size: 14px;
    padding: 8px 14px;
  }
}

/* ----- Footer ----- */
.hcn-footer-fallback .widget-title {
  color: #fff;
  font-size: 1.15rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--second-theme-color);
  display: inline-block;
}

.hcn-footer-fallback p,
.hcn-footer-fallback li {
  color: rgba(255, 255, 255, 0.85);
  font-size: 14px;
  line-height: 1.75;
}

.hcn-footer-fallback ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.hcn-footer-fallback ul li {
  margin-bottom: 0.5rem;
}

.hcn-footer-fallback ul li a {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.hcn-footer-fallback ul li a::before {
  content: '\f105';
  font-family: 'Font Awesome 5 Free';
  font-weight: 900;
  font-size: 12px;
  color: var(--second-theme-color);
}

.hcn-footer-fallback ul li a:hover {
  color: var(--second-theme-color);
}

.hcn-footer-contact li {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.hcn-footer-contact li i {
  color: var(--second-theme-color);
  margin-top: 4px;
  width: 16px;
}

.hcn-footer-brand__name {
  font-family: 'Teko', sans-serif;
  font-size: 1.5rem;
  color: #fff;
  margin: 0 0 0.75rem;
  letter-spacing: 1px;
}

#footer .footer-widget {
  padding: 2.5rem 0 2rem;
}

#footer .copywrap {
  padding: 1rem 0;
}

#footer .copywrap p {
  margin: 0;
  font-size: 14px;
}

#footer .copywrap .hcn-icp-beian {
  margin-top: 0.35rem;
  font-size: 13px;
  opacity: 0.85;
}

#footer .copywrap a {
  color: #fff;
  text-decoration: none;
}

#footer .copywrap a:hover {
  text-decoration: underline;
}

/* Hide default footer search widget styling clash */
#footer .widget_search .search-form {
  display: flex;
  max-width: 100%;
}

#footer .widget_search input[type='search'] {
  flex: 1;
  border-radius: 4px 0 0 4px;
  border: none;
  padding: 8px 12px;
}

#footer .widget_search input[type='submit'],
#footer .search-submit {
  background: var(--second-theme-color);
  color: #fff;
  border: none;
  padding: 8px 16px;
  border-radius: 0 4px 4px 0;
}

/* ----- Floating actions (message / phone / top) ----- */
.hcn-float-actions {
  position: fixed;
  right: 20px;
  bottom: 60px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

.hcn-float-actions .hcn-float-btn,
.hcn-float-actions #button {
  position: relative;
  right: auto;
  bottom: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  border-radius: 50% !important;
  background: var(--second-theme-color);
  color: #fff;
  text-decoration: none;
  box-shadow: 0 4px 16px rgba(255, 89, 12, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
  padding: 0 !important;
  margin: 0;
  border: none;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  text-align: center;
  -moz-border-radius: 50% !important;
  aspect-ratio: 1;
  box-sizing: border-box;
}

.hcn-float-actions #button {
  display: none !important;
}

.hcn-float-actions #button.hcn-float-top--visible {
  display: flex !important;
}

.hcn-float-actions .hcn-float-btn:hover,
.hcn-float-actions .hcn-float-btn:focus,
.hcn-float-actions #button:hover,
.hcn-float-actions #button:focus {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 89, 12, 0.45);
}

.hcn-float-btn__text {
  display: block;
  color: #fff;
}

.hcn-float-btn__badge {
  position: absolute;
  right: calc(100% + 10px);
  top: 50%;
  transform: translateY(-50%);
  min-width: 148px;
  padding: 10px 14px;
  border-radius: 8px;
  background: #fff;
  color: #333;
  font-size: 13px;
  line-height: 1.5;
  white-space: nowrap;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.hcn-float-btn__phone {
  display: block;
  color: #333;
  font-weight: 600;
}

/* Desktop: phone badge on hover */
@media (min-width: 768px) {
  .hcn-float-contact:hover .hcn-float-btn__badge,
  .hcn-float-contact:focus-visible .hcn-float-btn__badge {
    opacity: 1;
    visibility: visible;
  }
}

/* Mobile: phone badge on click */
@media (max-width: 767px) {
  .hcn-float-contact.is-open .hcn-float-btn__badge {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }
}

.hcn-float-btn__badge::after {
  content: '';
  position: absolute;
  top: 50%;
  right: -6px;
  transform: translateY(-50%) rotate(45deg);
  width: 12px;
  height: 12px;
  background: #fff;
  box-shadow: 2px -2px 4px rgba(0, 0, 0, 0.04);
}

.hcn-float-btn__badge strong {
  display: block;
  margin-bottom: 2px;
  color: var(--second-theme-color);
  font-size: 14px;
}

.hcn-float-message {
  background: var(--second-theme-color);
  box-shadow: 0 4px 16px rgba(255, 89, 12, 0.35);
}

.hcn-float-message:hover,
.hcn-float-message:focus {
  background: var(--second-theme-color);
  box-shadow: 0 6px 20px rgba(255, 89, 12, 0.45);
}

.hcn-float-message .hcn-float-btn__badge strong {
  color: var(--second-theme-color);
}

@media (max-width: 767px) {
  .hcn-float-actions {
    right: 16px;
    bottom: 56px;
    gap: 8px;
  }

  .hcn-float-actions .hcn-float-btn,
  .hcn-float-actions #button {
    width: 52px;
    height: 52px;
  }

  .hcn-float-btn__text {
    font-size: 13px;
  }

  .hcn-float-btn__badge {
    right: calc(100% + 8px);
    min-width: 132px;
    padding: 8px 12px;
    font-size: 12px;
  }

  .hcn-float-btn__badge strong {
    font-size: 13px;
  }
}
