/**
 * On Call Carpet Cleaning — 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 logo: no invert filter — brightness(0) invert(1) turns opaque white
   logo backgrounds into a solid white rectangle on the dark footer. */
.footer-brand .custom-logo,
.footer-brand img.custom-logo {
  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);
}

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

.oncall-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);
}

/* =============================================================
   Theme CTA classes for the Elementor Button widget
   -------------------------------------------------------------
   Add these in the Elementor widget under
     Advanced ▸ CSS Classes
   Elementor Free puts CSS classes on the widget wrapper <div>,
   not on the inner <a class="elementor-button">. The selectors
   below therefore match BOTH placements, so the classes also
   work if added to a raw <a> in an HTML widget.

   Combine the base class `occ-cta` with ONE colour variant and
   optionally one size variant.

   Colour variants (homepage parity):
     occ-cta--primary   ← lime gradient pill (default homepage CTA)
     occ-cta--header    ← compact lime→cyan pill (header style)
     occ-cta--accent    ← solid cyan-lime block
     occ-cta--dark      ← navy gradient pill
     occ-cta--white     ← white pill (use on dark sections)
     occ-cta--ghost     ← translucent outline (use on dark sections)
     occ-cta--outline   ← navy outline (use on light sections)

   Size variants:
     occ-cta--sm        ← compact
     occ-cta--lg        ← large hero CTA
     occ-cta--xl        ← extra-large

   Modifiers:
     occ-cta--glow      ← extra brand-lime glow shadow on hover
     occ-cta--block     ← stretches to 100% width of its column
   ============================================================= */

/* ---- Base reset (link itself) ---- */

.occ-cta > .elementor-button-wrapper > .elementor-button,
.occ-cta a.elementor-button,
a.elementor-button.occ-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.85rem 1.6rem;
  font-family: var(--font-heading, "Plus Jakarta Sans", sans-serif);
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  line-height: 1.1;
  border-radius: var(--radius-full, 9999px);
  border: 2px solid transparent;
  text-decoration: none;
  text-transform: none;
  white-space: nowrap;
  cursor: pointer;
  transition: transform var(--transition, 0.3s cubic-bezier(0.4, 0, 0.2, 1)),
              box-shadow var(--transition, 0.3s cubic-bezier(0.4, 0, 0.2, 1)),
              background var(--transition, 0.3s cubic-bezier(0.4, 0, 0.2, 1)),
              color var(--transition, 0.3s cubic-bezier(0.4, 0, 0.2, 1)),
              filter var(--transition, 0.3s cubic-bezier(0.4, 0, 0.2, 1)),
              border-color var(--transition, 0.3s cubic-bezier(0.4, 0, 0.2, 1));
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  transform: translateZ(0);
}

.occ-cta .elementor-button-text,
a.elementor-button.occ-cta .elementor-button-text {
  font-weight: inherit;
  letter-spacing: inherit;
}

.occ-cta .elementor-button-icon i,
.occ-cta .elementor-button-icon svg,
a.elementor-button.occ-cta .elementor-button-icon i,
a.elementor-button.occ-cta .elementor-button-icon svg {
  font-size: 0.95em;
}

.occ-cta a.elementor-button:hover,
a.elementor-button.occ-cta:hover {
  transform: translate3d(0, -2px, 0);
}

.occ-cta a.elementor-button:focus-visible,
a.elementor-button.occ-cta:focus-visible {
  outline: 3px solid rgba(141, 198, 63, 0.55);
  outline-offset: 3px;
}

/* Elementor's Free size classes (elementor-size-xs … xl) bake their own
   padding/font-size onto the link. Neutralise them when occ-cta wins so the
   theme's size variants below are the source of truth. */
.occ-cta a.elementor-button[class*="elementor-size-"] {
  padding: inherit;
  font-size: inherit;
}

/* ---- Colour variants ---- */

.occ-cta.occ-cta--primary a.elementor-button,
a.elementor-button.occ-cta.occ-cta--primary {
  background: var(--gradient-brand,
              linear-gradient(135deg, #1A7E54 0%, #8DC63F 55%, #C8F542 100%));
  background-origin: border-box;
  color: #fff;
  border-color: transparent;
  box-shadow: 0 8px 24px rgba(141, 198, 63, 0.32);
}
.occ-cta.occ-cta--primary a.elementor-button:hover,
a.elementor-button.occ-cta.occ-cta--primary:hover {
  color: #fff;
  filter: brightness(1.06);
  box-shadow: var(--shadow-primary, 0 8px 28px rgba(141, 198, 63, 0.42));
}

.occ-cta.occ-cta--header a.elementor-button,
a.elementor-button.occ-cta.occ-cta--header {
  padding: 0.7rem 1.25rem;
  font-size: 0.88rem;
  letter-spacing: 0.02em;
  background: linear-gradient(135deg, var(--primary, #8DC63F) 0%, var(--cyan-glow, #C8F542) 100%);
  background-origin: border-box;
  color: var(--navy-mid, #082642);
  border-color: transparent;
  box-shadow: 0 6px 20px rgba(141, 198, 63, 0.32);
}
.occ-cta.occ-cta--header a.elementor-button:hover,
a.elementor-button.occ-cta.occ-cta--header:hover {
  color: var(--navy-mid, #082642);
  filter: brightness(1.04);
  box-shadow: 0 10px 28px rgba(141, 198, 63, 0.42);
}

.occ-cta.occ-cta--accent a.elementor-button,
a.elementor-button.occ-cta.occ-cta--accent {
  background: var(--accent, #C8F542);
  color: var(--navy-mid, #082642);
  border-color: var(--accent, #C8F542);
}
.occ-cta.occ-cta--accent a.elementor-button:hover,
a.elementor-button.occ-cta.occ-cta--accent:hover {
  background: var(--accent-hover, #B5E835);
  border-color: var(--accent-hover, #B5E835);
  color: var(--navy-mid, #082642);
  box-shadow: 0 10px 24px rgba(200, 245, 66, 0.35);
}

.occ-cta.occ-cta--dark a.elementor-button,
a.elementor-button.occ-cta.occ-cta--dark {
  background: linear-gradient(135deg, var(--navy, #0E3A5F) 0%, var(--navy-mid, #082642) 100%);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 8px 24px rgba(8, 38, 66, 0.32);
}
.occ-cta.occ-cta--dark a.elementor-button:hover,
a.elementor-button.occ-cta.occ-cta--dark:hover {
  color: #fff;
  filter: brightness(1.08);
  box-shadow: 0 12px 30px rgba(8, 38, 66, 0.42);
}

.occ-cta.occ-cta--white a.elementor-button,
a.elementor-button.occ-cta.occ-cta--white {
  background: #fff;
  color: var(--navy, #0E3A5F);
  border-color: #fff;
}
.occ-cta.occ-cta--white a.elementor-button:hover,
a.elementor-button.occ-cta.occ-cta--white:hover {
  background: var(--gray-100, #F1F5F9);
  color: var(--navy, #0E3A5F);
  box-shadow: var(--shadow-lg, 0 8px 40px rgba(0, 0, 0, 0.12));
}

.occ-cta.occ-cta--ghost a.elementor-button,
a.elementor-button.occ-cta.occ-cta--ghost {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.55);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.occ-cta.occ-cta--ghost a.elementor-button:hover,
a.elementor-button.occ-cta.occ-cta--ghost:hover {
  background: #fff;
  color: var(--navy, #0E3A5F);
  border-color: #fff;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.22);
}

.occ-cta.occ-cta--outline a.elementor-button,
a.elementor-button.occ-cta.occ-cta--outline {
  background: transparent;
  color: var(--navy, #0E3A5F);
  border-color: var(--navy, #0E3A5F);
}
.occ-cta.occ-cta--outline a.elementor-button:hover,
a.elementor-button.occ-cta.occ-cta--outline:hover {
  background: var(--navy, #0E3A5F);
  color: #fff;
  border-color: var(--navy, #0E3A5F);
  box-shadow: 0 10px 26px rgba(14, 58, 95, 0.28);
}

/* ---- Size variants (override Elementor's elementor-size-* on the link) ---- */

.occ-cta.occ-cta--sm a.elementor-button,
a.elementor-button.occ-cta.occ-cta--sm {
  padding: 0.6rem 1.1rem;
  font-size: 0.82rem;
}

.occ-cta.occ-cta--lg a.elementor-button,
a.elementor-button.occ-cta.occ-cta--lg {
  padding: 1rem 2rem;
  font-size: 1rem;
}

.occ-cta.occ-cta--xl a.elementor-button,
a.elementor-button.occ-cta.occ-cta--xl {
  padding: 1.15rem 2.4rem;
  font-size: 1.05rem;
}

/* ---- Modifiers ---- */

.occ-cta.occ-cta--glow a.elementor-button:hover,
a.elementor-button.occ-cta.occ-cta--glow:hover {
  box-shadow: 0 14px 38px rgba(141, 198, 63, 0.55),
              0 4px 14px rgba(8, 38, 66, 0.18);
}

.occ-cta.occ-cta--block a.elementor-button,
a.elementor-button.occ-cta.occ-cta--block {
  display: flex;
  width: 100%;
}

/* Some Elementor wrappers force inline-block layout on the link — make sure
   the wrapping container still respects our pill geometry. */
.elementor-widget-button .elementor-button-wrapper {
  overflow: visible;
}

/* 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);
  }
}

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

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

.oncall-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;
}

/* 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;
}

/* -------------------------------------------------------------------------
   On Call — HTML CTA strip (Elementor HTML widget + .oncall-html-section)
   Primary = lime→cyan gradient (header CTA parity); ghost = glass outline
   on the dark navy strip. Uses theme CSS variables from style.css :root.
   ------------------------------------------------------------------------- */

.oncall-html-section .cta-strip .cta-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
}

.oncall-html-section .cta-strip .cta-actions .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  font-family: var(--font-heading, "Plus Jakarta Sans", sans-serif);
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  line-height: 1.1;
  padding: 0.85rem 1.5rem;
  border-radius: var(--radius-full, 9999px);
  border: 2px solid transparent;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 0.28s cubic-bezier(0.4, 0, 0.2, 1),
              background 0.28s cubic-bezier(0.4, 0, 0.2, 1),
              color 0.28s cubic-bezier(0.4, 0, 0.2, 1),
              border-color 0.28s cubic-bezier(0.4, 0, 0.2, 1),
              filter 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

.oncall-html-section .cta-strip .btn.btn-primary {
  background: linear-gradient(135deg, var(--primary, #8DC63F) 0%, var(--cyan-glow, #C8F542) 100%);
  background-origin: border-box;
  color: var(--navy-mid, #082642);
  border-color: transparent;
  box-shadow: 0 6px 22px rgba(141, 198, 63, 0.38);
}

.oncall-html-section .cta-strip .btn.btn-primary:hover {
  transform: translate3d(0, -2px, 0);
  filter: brightness(1.05);
  color: var(--navy-mid, #082642);
  box-shadow: 0 10px 32px rgba(141, 198, 63, 0.48);
}

.oncall-html-section .cta-strip .btn.btn-primary:focus-visible {
  outline: 3px solid rgba(200, 245, 66, 0.55);
  outline-offset: 3px;
}

/* Book / quote — calendar with check (FA6 solid) */
.oncall-html-section .cta-strip .cta-actions .btn.btn-primary::before {
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  content: "\f274";
  font-size: 0.92em;
  line-height: 1;
  display: inline-block;
  margin-inline-end: 0.35rem;
  -webkit-font-smoothing: antialiased;
}

.oncall-html-section .cta-strip .btn.btn-ghost[href^="tel:"]::before {
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  content: "\f095";
  font-size: 0.92em;
  line-height: 1;
  display: inline-block;
  margin-inline-end: 0.35rem;
  -webkit-font-smoothing: antialiased;
}

.oncall-html-section .cta-strip .btn.btn-ghost {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.42);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.oncall-html-section .cta-strip .btn.btn-ghost:hover {
  transform: translate3d(0, -2px, 0);
  background: rgba(255, 255, 255, 0.14);
  border-color: var(--cyan-glow, #C8F542);
  color: var(--cyan-glow, #C8F542);
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.oncall-html-section .cta-strip .btn.btn-ghost:focus-visible {
  outline: 3px solid rgba(255, 255, 255, 0.45);
  outline-offset: 3px;
}

@media (max-width: 640px) {
  .oncall-html-section .cta-strip .cta-actions {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }
  .oncall-html-section .cta-strip .cta-actions .btn {
    justify-content: center;
    width: 100%;
    white-space: normal;
    text-align: center;
  }
}
.elementor-widget-html .elementor-widget-container {
  overflow-x: clip;
  overflow-y: visible;
  max-width: 100%;
}

/* -------------------------------------------------------------------------
   Mobile — prevent horizontal page scroll (hero orbs, badges, Elementor HTML)
   ------------------------------------------------------------------------- */
#primary.site-main,
.oncall-elementor-wrap,
.elementor-location-single,
.elementor-location-header,
.elementor-location-footer {
  overflow-x: clip;
  max-width: 100%;
}

.elementor-section,
.elementor-column,
.elementor-widget-wrap,
.elementor-widget,
.e-con,
.e-con-inner,
.e-con > .e-con-inner {
  max-width: 100%;
}

.elementor-column,
.elementor-widget-wrap,
.e-con-inner > .elementor-element {
  min-width: 0;
}

.elementor-widget-html .oncall-html-section,
.elementor-widget-html .oncall-html-root,
.elementor-widget-html .occ-sa-wrap,
.elementor-widget-html .occ-rcc-wrap,
.elementor-widget-html .occ-wp-about,
.elementor-widget-html .hero {
  display: block;
  width: 100%;
  max-width: 100%;
  margin-left: 0;
  margin-right: 0;
  box-sizing: border-box;
  overflow-x: clip;
}

.elementor-widget-html .elementor-widget-container:has(.oncall-html-section),
.elementor-widget-html .elementor-widget-container:has(.occ-sa-wrap),
.elementor-widget-html .elementor-widget-container:has(.occ-rcc-wrap),
.elementor-widget-html .elementor-widget-container:has(.hero) {
  overflow-x: clip;
  overflow-y: visible;
  max-width: 100%;
}

.occ-el-section.occ-page-hero {
  overflow-x: clip;
}

@media (max-width: 768px) {
  .oncall-html-section .cta-strip {
    padding: 1.5rem 1.15rem;
  }

  .oncall-html-section .cta-strip .cta-actions {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  .oncall-html-section .cta-strip .cta-actions .btn {
    width: 100%;
    justify-content: center;
    white-space: normal;
    text-align: center;
  }

  .occ-sa-inner {
    width: min(100% - 2rem, var(--occ-sa-max, 1240px));
  }

  .occ-sa-suburbs li {
    max-width: 100%;
  }
}
