/**
 * Eternity Care — Elementor & WordPress glue styles
 * Keeps global header/footer while letting Elementor sections breathe.
 */

/* -------------------------------------------------------------------------
   Font Awesome 6 — restore icon webfonts
   Elementor / Kit / theme resets often set `i { font-family: inherit }`, which
   breaks FA glyphs. These rules re-apply the correct families (FA6 names).
   ------------------------------------------------------------------------- */
.fa-solid,
.fa-semibold,
.fas,
i.fa-solid,
i.fas {
  font-family: "Font Awesome 6 Free" !important;
  font-style: normal !important;
  font-weight: 900 !important;
  font-variant: normal !important;
}

.fa-regular,
.far,
i.fa-regular,
i.far {
  font-family: "Font Awesome 6 Free" !important;
  font-style: normal !important;
  font-weight: 400 !important;
  font-variant: normal !important;
}

.fa-brands,
.fab,
i.fa-brands,
i.fab {
  font-family: "Font Awesome 6 Brands" !important;
  font-style: normal !important;
  font-weight: 400 !important;
  font-variant: normal !important;
}

.screen-reader-text {
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  width: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  word-wrap: normal !important;
}

.skip-link:focus {
  clip: auto !important;
  clip-path: none;
  height: auto;
  width: auto;
  margin: 0;
  padding: 12px 20px;
  background: var(--primary, #00b8f5);
  color: #fff;
  z-index: 100000;
  top: 8px;
  left: 8px;
  position: fixed;
  border-radius: var(--radius-sm, 8px);
  font-weight: 700;
  text-decoration: none;
}

/* Main content anchor for accessibility */
main#primary.site-main {
  display: block;
  position: relative;
}

/* Header logo wrapper — WP custom logo outputs nested link */
.header-logo .custom-logo-link {
  display: flex;
  align-items: center;
  line-height: 0;
}

/* Footer inverse logo */
.footer-brand .custom-logo-link {
  display: inline-block;
  line-height: 0;
}

.footer-brand .custom-logo,
.footer-brand img.custom-logo {
  filter: brightness(0) invert(1);
  max-width: 220px;
  height: auto;
}

/* Elementor default sections: respect theme width where useful */
.elementor-section.elementor-section-boxed > .elementor-container {
  max-width: var(--container-max, 1280px);
}

.eternity-elementor-wrap .elementor-widget-text-editor,
.eternity-elementor-wrap .elementor-widget-heading {
  color: var(--text, #1e293b);
}

.eternity-elementor-wrap .elementor-heading-title {
  font-family: var(--font-heading, "Plus Jakarta Sans", sans-serif);
  letter-spacing: -0.02em;
}

/* Buttons inside Elementor often need subtle polish */
.elementor-button {
  border-radius: var(--radius-md, 14px);
  font-family: var(--font-heading, "Plus Jakarta Sans", sans-serif);
  font-weight: 700;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.elementor-button:hover {
  transform: translateY(-1px);
}

/* Logged-in admin bar (fixed top bar + header) */
@media screen and (min-width: 783px) {
  body.admin-bar .top-bar {
    top: 32px;
  }
  body.admin-bar .site-header {
    top: calc(32px + var(--topbar-height, 40px));
  }
  body.admin-bar .page-hero {
    padding-top: calc(var(--header-offset) + 32px + 60px);
  }
}
@media screen and (max-width: 782px) {
  body.admin-bar .top-bar {
    top: 46px;
  }
  body.admin-bar .site-header {
    top: calc(46px + var(--topbar-height, 40px));
  }
  body.admin-bar .page-hero {
    padding-top: calc(var(--header-offset) + 46px + 60px);
  }
}

/* Services archive: premium band starts below fixed header (no separate navy page-hero) */
.services-archive-wrap.services-section--premium {
  padding-top: calc(var(--header-offset) + var(--section-padding));
}
@media screen and (min-width: 783px) {
  body.admin-bar .services-archive-wrap.services-section--premium {
    padding-top: calc(var(--header-offset) + var(--section-padding) + 32px);
  }
}
@media screen and (max-width: 782px) {
  body.admin-bar .services-archive-wrap.services-section--premium {
    padding-top: calc(var(--header-offset) + var(--section-padding) + 46px);
  }
}

/* Team shortcode column variants */
.eternity-team-shortcode.team-grid {
  margin-top: 0;
}
.eternity-team-shortcode.team-grid[data-columns="2"] {
  grid-template-columns: repeat(2, 1fr);
}
.eternity-team-shortcode.team-grid[data-columns="4"] {
  grid-template-columns: repeat(4, 1fr);
}

/* Services shortcode: column variants + responsive (matches theme services-grid breakpoints) */
.eternity-services-shortcode-wrap .services-grid[data-columns="1"] {
  grid-template-columns: 1fr;
}
.eternity-services-shortcode-wrap .services-grid[data-columns="2"] {
  grid-template-columns: repeat(2, 1fr);
}
.eternity-services-shortcode-wrap .services-grid[data-columns="3"] {
  grid-template-columns: repeat(3, 1fr);
}
.eternity-services-shortcode-wrap .services-grid[data-columns="4"] {
  grid-template-columns: repeat(4, 1fr);
}
@media (max-width: 1024px) {
  .eternity-services-shortcode-wrap .services-grid[data-columns] {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 768px) {
  .eternity-services-shortcode-wrap .services-grid[data-columns="1"] {
    grid-template-columns: 1fr;
  }
  .eternity-services-shortcode-wrap .services-grid[data-columns]:not([data-columns="1"]) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.eternity-services-shortcode-wrap .section-header .section-subtitle > p:first-child {
  margin-top: 0;
}

.team-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Pagination on dark services archive */
.services-archive-wrap .navigation.pagination a,
.services-archive-wrap .page-numbers {
  color: rgba(255, 255, 255, 0.85);
}
.services-archive-wrap .page-numbers.current,
.services-archive-wrap .page-numbers.dots {
  color: #7dd3fc;
}
.services-archive-wrap .page-numbers:hover,
.services-archive-wrap .navigation.pagination a:hover {
  color: #fff;
}

/* Mobile menu chevron (matches FA chevron in original HTML) */
.mobile-nav-list > li.mobile-has-sub > a::after {
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  content: "\f078";
  margin-left: 0.4em;
  font-size: 0.72em;
  opacity: 0.85;
}

/* Footer nav: light text on navy — Elementor global / kit link colours often force dark grey */
.site-footer .footer-links .footer-menu-link,
.site-footer .footer-links .footer-menu-link .footer-link-text,
.site-footer .footer-links ul li > a.footer-menu-link,
.site-footer .footer-links .menu li > a {
  color: rgba(255, 255, 255, 0.92) !important;
  font-size: 0.8rem !important;
}
.site-footer .footer-links .footer-menu-link:hover,
.site-footer .footer-links .footer-menu-link:hover .footer-link-text,
.site-footer .footer-links .menu li > a:hover {
  color: var(--primary, #38bdf8) !important;
}

/* Footer nav: icon + label spacing (Elementor/kit often forces anchors inline, which breaks flex gap) */
.site-footer .footer-links .footer-menu-link,
.site-footer .footer-links ul li > a.footer-menu-link,
.site-footer .footer-links .menu li > a {
  display: inline-flex !important;
  align-items: center !important;
  flex-wrap: nowrap !important;
  gap: 0 !important;
}
.site-footer .footer-links .footer-link-icon {
  margin-inline-end: 14px !important;
  margin-right: 14px !important;
  flex-shrink: 0 !important;
}
.site-footer .footer-links .footer-sub-menu .footer-link-icon {
  margin-inline-end: 12px !important;
  margin-right: 12px !important;
}

.site-footer .footer-legal-links .footer-menu-link,
.site-footer .footer-legal-links .footer-menu-link .footer-link-text {
  color: rgba(255, 255, 255, 0.78) !important;
  font-size: 0.8rem !important;
}
.site-footer .footer-legal-links .footer-menu-link:hover,
.site-footer .footer-legal-links .footer-menu-link:hover .footer-link-text {
  color: var(--primary, #38bdf8) !important;
}
.site-footer .footer-legal-links .footer-menu-link {
  display: inline-flex !important;
  align-items: center !important;
  flex-wrap: nowrap !important;
  gap: 0 !important;
}
.site-footer .footer-legal-links .footer-link-icon {
  margin-inline-end: 12px !important;
  margin-right: 12px !important;
  flex-shrink: 0 !important;
}
