/* RSA Site Frame — top bar + sticky header + navigation (desktop, tablet overlay, mobile dropdown) */

/* ---------- Top bar ---------- */
.rsa-topbar { border-bottom: 1px solid var(--wp--custom--line-soft); font-size: 0.78rem; color: var(--wp--preset--color--muted); }
.rsa-topbar .rsa-topbar__inner { min-height: 38px; gap: 18px; align-items: center; }
.rsa-topbar .rsa-topbar__left { gap: 22px; overflow: hidden; white-space: nowrap; }
.rsa-topbar p { margin: 0; line-height: 1.4; white-space: nowrap; }
.rsa-topbar a { color: var(--wp--preset--color--muted); text-decoration: none; }
.rsa-topbar a:hover { color: var(--wp--preset--color--heading); }
.rsa-topbar strong { color: var(--wp--preset--color--heading); font-weight: 600; }
.rsa-topbar .rsa-topbar__badge { display: inline-flex; align-items: center; gap: 6px; color: var(--wp--preset--color--green); font-weight: 500; }
.rsa-topbar .rsa-topbar__badge::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--wp--preset--color--green); animation: rsa-pulse 2s infinite;
}
.rsa-topbar .rsa-topbar__cta a { color: var(--wp--preset--color--cyan); font-weight: 600; }
.rsa-topbar .rsa-topbar__cta a:hover { color: var(--wp--preset--color--heading); }

/* ---------- Header bar (blur lives on ::before so the nav overlay is not trapped) ---------- */
.rsa-header { z-index: 60; isolation: isolate; border-bottom: 1px solid var(--wp--custom--line-soft); }
.rsa-header::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: color-mix(in srgb, var(--wp--preset--color--base) 86%, transparent);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}
.rsa-header .rsa-header__inner { min-height: var(--wp--custom--header-height); gap: 20px; align-items: center; }

/* Brand */
.rsa-header .rsa-brand { gap: 12px; align-items: center; flex-shrink: 0; }
.rsa-header .rsa-brand__logo { flex: none; margin: 0; }
.rsa-header .rsa-brand__logo img {
  width: 48px; height: 48px; border-radius: 50%; background: #fff; padding: 3px; object-fit: contain;
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--wp--preset--color--accent-light) 35%, transparent);
}
.rsa-header .rsa-brand__text { gap: 0; line-height: 1.1; }
.rsa-header .rsa-brand__name { margin: 0; font-family: var(--wp--preset--font-family--display); font-weight: 700; font-size: 1.15rem; letter-spacing: -0.01em; line-height: 1.1; white-space: nowrap; }
.rsa-header .rsa-brand__name a { color: var(--wp--preset--color--heading); text-decoration: none; }
.rsa-header .rsa-brand__tag { margin: 4px 0 0; font-size: 0.58rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--wp--preset--color--muted); white-space: nowrap; }

/* Actions row */
.rsa-header .rsa-header__actions { gap: 10px; align-items: center; }

/* Desktop nav links */
.rsa-header .rsa-nav { gap: 4px; font-family: var(--wp--preset--font-family--display); font-weight: 500; font-size: 0.93rem; }
.rsa-header .rsa-nav .wp-block-navigation__container { gap: 4px; }
.rsa-header .rsa-nav .wp-block-navigation-item__content {
  display: block; padding: 9px 12px; border-radius: var(--wp--custom--radius-sm); white-space: nowrap;
  color: var(--wp--preset--color--contrast); text-decoration: none; transition: background .2s, color .2s;
}
.rsa-header .rsa-nav .wp-block-navigation-item__content:hover { background: color-mix(in srgb, var(--wp--preset--color--heading) 5%, transparent); color: var(--wp--preset--color--heading); }
.rsa-header .rsa-nav .wp-block-navigation-item.is-current > .wp-block-navigation-item__content,
.rsa-header .rsa-nav .current-menu-item > .wp-block-navigation-item__content {
  color: var(--wp--preset--color--heading);
  background: color-mix(in srgb, var(--wp--preset--color--accent) 18%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--wp--preset--color--accent-light) 30%, transparent);
}
/* Menu CTA item only shows inside the mobile menu */
.rsa-header .rsa-nav .wp-block-navigation-item.rsa-nav__cta { display: none; }

/* Social icons */
.rsa-header .rsa-socials { gap: 6px; margin: 0; padding: 0; }
.rsa-header .rsa-socials .wp-social-link {
  width: 36px; height: 36px; display: grid; place-items: center; margin: 0;
  background: transparent !important; color: var(--wp--preset--color--muted) !important;
  border: 1px solid var(--wp--custom--line-soft); border-radius: var(--wp--custom--radius-sm); transition: color .2s, border-color .2s, background .2s;
}
.rsa-header .rsa-socials .wp-social-link a { padding: 0; display: grid; place-items: center; width: 100%; height: 100%; color: inherit; }
.rsa-header .rsa-socials .wp-social-link svg { width: 16px; height: 16px; fill: currentColor; }
.rsa-header .rsa-socials .wp-social-link:hover {
  color: var(--wp--preset--color--heading) !important; border-color: var(--wp--preset--color--teal);
  background: color-mix(in srgb, var(--wp--preset--color--teal) 10%, transparent) !important; transform: none;
}

/* Header CTA button */
.rsa-header .rsa-header__cta { margin: 0; flex-shrink: 0; }
.rsa-header .rsa-header__cta .wp-block-button__link {
  padding: 9px 14px; font-size: 0.85rem; border-radius: var(--wp--custom--radius-sm); white-space: nowrap;
  box-shadow: var(--wp--custom--glow); transition: transform .2s;
}
.rsa-header .rsa-header__cta .wp-block-button__link:hover { transform: translateY(-2px); }

/* Hamburger + close buttons */
.rsa-header .rsa-nav .wp-block-navigation__responsive-container-open {
  width: 44px; height: 44px; align-items: center; justify-content: center; color: var(--wp--preset--color--heading);
  border: 1px solid var(--wp--custom--line-soft); border-radius: var(--wp--custom--radius-btn); background: transparent;
}
.rsa-header .rsa-nav .wp-block-navigation__responsive-container-open svg { width: 24px; height: 24px; }

/* ---------- Breakpoints (match the HTML design) ---------- */
@media (max-width: 1320px) {
  .rsa-header .rsa-socials { display: none; }
}

/* 600–1100px: core would still show inline links — collapse them into the menu like the design does */
@media (min-width: 600px) and (max-width: 1100px) {
  .rsa-header .rsa-nav .wp-block-navigation__responsive-container-open:not(.always-shown) { display: flex; }
  .rsa-header .rsa-nav .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) { display: none; }
}

@media (max-width: 1100px) {
  .rsa-header .rsa-header__cta { display: none; }

  /* Dropdown panel anchored under the sticky header (the header is the containing block) */
  .rsa-header .rsa-nav,
  .rsa-header .rsa-nav .wp-block-navigation__responsive-dialog,
  .rsa-header .rsa-nav .wp-block-navigation__responsive-close { position: static; }

  .rsa-header .rsa-header__actions .rsa-nav .wp-block-navigation__responsive-container.is-menu-open {
    position: absolute; inset: 100% 0 auto 0; height: auto; max-height: calc(100vh - var(--wp--custom--header-height) - 38px);
    margin: 0; padding: 12px var(--wp--style--root--padding-right) 24px var(--wp--style--root--padding-left);
    overflow: visible; display: block; z-index: 100;
    background: var(--wp--preset--color--base-2);
    color: var(--wp--preset--color--contrast);
    border-bottom: 1px solid var(--wp--custom--line); box-shadow: var(--wp--custom--shadow);
    animation: rsa-menu-down .28s var(--wp--custom--ease);
    --navigation-layout-justification-setting: stretch; --navigation-layout-justify: stretch;
  }
  .rsa-header .rsa-header__actions .rsa-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content {
    padding: 0; display: block; max-height: calc(100vh - var(--wp--custom--header-height) - 110px); overflow-y: auto;
  }
  .rsa-header .rsa-header__actions .rsa-nav .is-menu-open .wp-block-navigation__container { display: flex; flex-direction: column; align-items: stretch; gap: 0; }
  .rsa-header .rsa-header__actions .rsa-nav .is-menu-open .wp-block-navigation-item { width: 100%; }
  .rsa-header .rsa-header__actions .rsa-nav .is-menu-open .wp-block-navigation-item__content {
    padding: 14px 12px; font-size: 1.1rem; border-radius: var(--wp--custom--radius-sm); border-bottom: 1px solid var(--wp--custom--line-soft);
    color: var(--wp--preset--color--contrast); text-align: left; width: 100%;
  }
  .rsa-header .rsa-header__actions .rsa-nav .is-menu-open .wp-block-navigation-item.is-current > .wp-block-navigation-item__content { color: var(--wp--preset--color--cyan); background: transparent; box-shadow: none; }
  .rsa-header .rsa-header__actions .rsa-nav .is-menu-open .wp-block-navigation-item.rsa-nav__cta { display: block; margin-top: 18px; }
  .rsa-header .rsa-header__actions .rsa-nav .is-menu-open .rsa-nav__cta .wp-block-navigation-item__content {
    text-align: center; border: 0; border-radius: var(--wp--custom--radius-btn); font-size: 0.95rem; font-weight: 600;
    background: var(--wp--preset--gradient--primary); color: var(--wp--preset--color--heading); box-shadow: var(--wp--custom--glow);
  }

  /* Close X sits exactly where the hamburger was */
  .rsa-header .rsa-header__actions .rsa-nav .is-menu-open .wp-block-navigation__responsive-container-close {
    position: absolute; top: calc(var(--wp--custom--header-height) / -2 - 22px); right: var(--wp--style--root--padding-right);
    width: 44px; height: 44px; display: flex; align-items: center; justify-content: center;
    color: var(--wp--preset--color--heading); border: 1px solid var(--wp--custom--line-soft); border-radius: var(--wp--custom--radius-btn);
    background: var(--wp--preset--color--base);
  }
  .rsa-header .rsa-nav:has(.is-menu-open) .wp-block-navigation__responsive-container-open { visibility: hidden; }
  .admin-bar .rsa-header .rsa-header__actions .rsa-nav .wp-block-navigation__responsive-container.is-menu-open { margin-top: 0; }
}
@keyframes rsa-menu-down { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

@media (max-width: 860px) {
  .rsa-topbar .rsa-hide-md { display: none; }
}
@media (max-width: 600px) {
  .rsa-topbar .rsa-topbar__cta { display: none; }
  .rsa-header .rsa-brand__tag { display: none; }
  .rsa-header .rsa-brand__logo img { width: 42px; height: 42px; }
}

/* ---------- Footer ---------- */
.rsa-footer { padding: 72px 0 28px; border-top: 1px solid var(--wp--custom--line-soft); color: var(--wp--preset--color--muted); }
.rsa-footer .rsa-footer__grid.is-layout-grid { grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 40px; align-items: start; }
.rsa-footer .rsa-footer__grid > * { margin: 0; }
.rsa-footer .rsa-footer__brand { gap: 0; }
.rsa-footer .rsa-brand { gap: 12px; align-items: center; }
.rsa-footer .rsa-brand__logo { margin: 0; flex: none; }
.rsa-footer .rsa-brand__logo img { width: 48px; height: 48px; border-radius: 50%; background: #fff; padding: 3px; object-fit: contain; box-shadow: 0 0 0 2px color-mix(in srgb, var(--wp--preset--color--accent-light) 35%, transparent); }
.rsa-footer .rsa-brand__text { gap: 0; line-height: 1.1; }
.rsa-footer .rsa-brand__name { margin: 0; font-family: var(--wp--preset--font-family--display); font-weight: 700; font-size: 1.15rem; letter-spacing: -0.01em; white-space: nowrap; }
.rsa-footer .rsa-brand__name a { color: var(--wp--preset--color--heading); text-decoration: none; }
.rsa-footer .rsa-brand__tag { margin: 4px 0 0; font-size: 0.58rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--wp--preset--color--muted); }
.rsa-footer p { font-size: 0.9rem; color: var(--wp--preset--color--muted); }
.rsa-footer .rsa-footer__about { margin: 18px 0 0; max-width: 340px; }
.rsa-footer .rsa-footer__certs { gap: 8px; margin-top: 18px; }
.rsa-footer .rsa-footer__certs p.rsa-tag { margin: 0; font-size: 0.72rem; }
.rsa-footer .rsa-footer__certs p.rsa-tag--green { color: var(--wp--preset--color--green); }
.rsa-footer .rsa-footer__certs p.rsa-tag--cyan { color: var(--wp--preset--color--cyan); }
.rsa-footer .rsa-footer__title {
  margin: 0 0 18px; font-family: var(--wp--preset--font-family--mono); font-size: 0.8rem; font-weight: 500;
  letter-spacing: var(--wp--custom--tracking-wide); text-transform: uppercase; color: var(--wp--preset--color--muted);
}
.rsa-footer .rsa-footer__title--spaced { margin-top: 24px; }
.rsa-footer .rsa-footer__links { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; font-size: 0.92rem; }
.rsa-footer .rsa-footer__links li { margin: 0; color: var(--wp--preset--color--muted); }
.rsa-footer .rsa-footer__links a { color: var(--wp--preset--color--contrast); text-decoration: none; }
.rsa-footer .rsa-footer__links a:hover { color: var(--wp--preset--color--cyan); }
.rsa-footer .rsa-socials { gap: 6px; margin: 0; padding: 0; }
.rsa-footer .rsa-socials .wp-social-link {
  width: 36px; height: 36px; display: grid; place-items: center; margin: 0;
  background: transparent !important; color: var(--wp--preset--color--muted) !important;
  border: 1px solid var(--wp--custom--line-soft); border-radius: var(--wp--custom--radius-sm); transition: color .2s, border-color .2s, background .2s;
}
.rsa-footer .rsa-socials .wp-social-link a { padding: 0; display: grid; place-items: center; width: 100%; height: 100%; color: inherit; }
.rsa-footer .rsa-socials .wp-social-link svg { width: 16px; height: 16px; fill: currentColor; }
.rsa-footer .rsa-socials .wp-social-link:hover { color: var(--wp--preset--color--heading) !important; border-color: var(--wp--preset--color--teal); background: color-mix(in srgb, var(--wp--preset--color--teal) 10%, transparent) !important; transform: none; }
.rsa-footer .rsa-footer__bottom { margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--wp--custom--line-soft); gap: 16px; }
.rsa-footer .rsa-footer__bottom p { margin: 0; font-size: 0.8rem; color: var(--wp--preset--color--dim); }

/* Floating WhatsApp button */
.rsa-wa-float {
  position: fixed; right: 20px; bottom: 20px; z-index: 90; width: 58px; height: 58px; border-radius: 50%;
  display: grid; place-items: center; background: #22c55e; color: #fff;
  box-shadow: 0 10px 30px -6px rgba(34, 197, 94, .7); transition: transform .2s;
}
.rsa-wa-float:hover { transform: scale(1.08); color: #fff; }
.rsa-wa-float svg { width: 30px; height: 30px; fill: currentColor; }
.editor-styles-wrapper .rsa-wa-float { position: static; margin-top: 16px; }

@media (max-width: 1100px) {
  .rsa-footer .rsa-footer__grid.is-layout-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .rsa-footer .rsa-footer__grid.is-layout-grid { grid-template-columns: 1fr; }
}

/* Sticky header fix: WP wraps the part in <header class="wp-block-template-part">, which is only as tall as
   the bar, so the inner sticky group can't stick. Stick the wrapper instead; the 39px top bar scrolls away. */
:root { --rsa-topbar-h: 39px; }
header.wp-block-template-part:has(.rsa-header) {
  position: sticky; z-index: 60;
  top: calc(var(--wp-admin--admin-bar--position-offset, 0px) - var(--rsa-topbar-h));
}
header.wp-block-template-part .rsa-header.is-position-sticky { position: relative; top: auto; }
/* Logged-in admin bar: fixed 32px (46px under 783px); below 601px it scrolls away with the page */
:root { --rsa-adminbar: 0px; }
html:has(body.admin-bar) { --rsa-adminbar: var(--wp-admin--admin-bar--height, 32px); }
@media (max-width: 600px) { html:has(body.admin-bar) { --rsa-adminbar: 0px; } }
header.wp-block-template-part:has(.rsa-header) { top: calc(var(--rsa-adminbar) - var(--rsa-topbar-h)); }
@media (max-width: 1100px) {
  .rsa-header .rsa-header__actions .rsa-nav { order: 2; }
}
/* Hide the floating WhatsApp button while the inquiry drawer is open */
html:has(.rsa-inq__drawer.is-open) .rsa-wa-float { display: none; }
