/* ==========================================================================
   Burj Trades — WordPress / core-block integration
   ==========================================================================
   Everything here exists to make core Gutenberg blocks wear the theme's
   components. Where a core block can reuse an existing rule, the selector is
   grouped onto that rule in components.css or pages.css instead of being
   duplicated here.
   ========================================================================== */

/* ---- Site shell -------------------------------------------------------- */
.wp-site-blocks { position: relative; z-index: 2; }

/* The header template part renders its own <header> wrapper around the
   theme's .header. base.css gives `main, header, footer` position:relative
   and z-index:2, so that wrapper becomes a stacking context at the SAME
   level as <main> — and .header's z-index:100 can then only compete inside
   it. Equal z-index means DOM order decides, so <main> painted straight
   over the fixed header: invisible at the top of the page, and unclickable
   wherever a transparent section let it show through.

   Raising the wrapper above <main> restores it. The footer never had the
   problem because it comes after <main> in the DOM.

   The static site never hit this: there, .header *was* the <header>, so its
   own position/z-index overrode the rule instead of nesting inside it. */
.wp-site-blocks > header { position: relative; z-index: 100; }

/* The open mobile menu must clear everything, including the header itself. */
.wp-block-navigation__responsive-container.is-menu-open { z-index: 120; }

/* The header is fixed; push it clear of the admin bar when logged in. */
.admin-bar .header { top: 32px; }
@media (max-width: 782px) { .admin-bar .header { top: 46px; } }
@media (max-width: 600px) { .admin-bar .header { top: 0; } }

/* Core wraps template parts in <header>/<footer>; strip the default margins
   so the theme's own spacing is the only spacing. */
.wp-site-blocks > header,
.wp-site-blocks > main,
.wp-site-blocks > footer { margin-block: 0; }

/* Full-bleed blocks must not inherit a max-width from the layout engine. */
.wp-site-blocks .alignfull { margin-inline: 0; max-width: none; }

/* ==========================================================================
   core/navigation
   The theme breaks to a drawer at 1000px; core's own breakpoint is 600px,
   so both directions are overridden here. Selectors are deliberately
   specific enough to win regardless of stylesheet order.
   ========================================================================== */
/* The nav is the flex item that has to push itself and the CTA button to the
   right-hand end of the header. The static site did that with
   `.nav { margin-left: auto }`, but WordPress renders the element as
   .wp-block-navigation, so that rule never matched here - which left the
   hamburger sitting hard against the logo on mobile. */
.header__inner > .wp-block-navigation { margin-left: auto; }
.wp-block-navigation { --navigation-layout-justification-setting: flex-end; }
.wp-block-navigation .wp-block-navigation__container { gap: 4px; }

/* Hamburger - the old .burger, rebuilt on core's button.
   APPEARANCE ONLY. `display` is deliberately not set here: the breakpoint
   rules below own it, and they must come after this block to win, since
   both selectors have the same specificity. Setting display here is what
   previously left the hamburger showing on desktop. */
.header .wp-block-navigation__responsive-container-open {
  width: 42px;
  height: 42px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--border-hi);
  border-radius: 12px;
  background: rgba(201, 212, 222, .05);
  color: var(--text);
}
.header .wp-block-navigation__responsive-container-open:hover {
  border-color: var(--c-gold);
  color: var(--c-gold);
}
.header .wp-block-navigation__responsive-container-open svg,
.header .wp-block-navigation__responsive-container-close svg { width: 22px; height: 22px; fill: currentColor; }

/* Breakpoint. The theme collapses to a drawer at 1000px; core's own
   breakpoint is 600px, so both directions are overridden. */
@media (max-width: 999px) {
  .header .wp-block-navigation__responsive-container:not(.is-menu-open) { display: none; }
  .header .wp-block-navigation__responsive-container-open:not(.always-shown) { display: grid; }
  .header .header__cta { display: none; }
}
@media (min-width: 1000px) {
  .header .wp-block-navigation__responsive-container-open,
  .header .wp-block-navigation__responsive-container-open:not(.always-shown) { display: none; }
  .header .wp-block-navigation__responsive-container:not(.is-menu-open) {
    display: block;
    position: static;
    background: none;
  }
}

/* The drawer itself. */
/* Core styles the open overlay with
   `.…__responsive-container.is-menu-open:not(.disable-default-overlay)`,
   which is one class more specific than a plain `.is-menu-open`. Matching
   that specificity is what makes this padding actually apply - otherwise
   core's clamp() wins and the drawer sits at a cramped 16px. */
.wp-block-navigation__responsive-container.is-menu-open:not(.disable-default-overlay) {
  padding: clamp(22px, 5vw, 40px);
  background: var(--bg-alt);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content {
  padding-top: 28px;
}
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container {
  gap: 2px;
  width: 100%;
}
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item { width: 100%; }
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 17px 4px;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  font-family: var(--font-display);
  font-size: 1.12rem;
  font-weight: 600;
  color: var(--text);
}
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content:hover {
  background: none;
  color: var(--c-gold);
  padding-left: 10px;
}
.wp-block-navigation__responsive-container-close {
  color: var(--text);
  border: 1px solid var(--border-hi);
  border-radius: 12px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
}

/* ---- Nav link colour -----------------------------------------------------
   Core raises its own specificity with a deliberately doubled class:

     .wp-block-navigation .wp-block-navigation-item__content.wp-block-navigation-item__content
       { color: inherit }                                            (0,3,0)

   which beat the theme's (0,1,0) rule in components.css. Every link then
   inherited the overlay's `contrast` colour, so the desktop menu rendered
   uniformly bright white instead of muted — and hover changed nothing,
   because the hover rule lost too. These selectors match that trick and go
   one class higher. */
.header .wp-block-navigation .wp-block-navigation-item__content.wp-block-navigation-item__content {
  color: var(--text-2);
}
.header .wp-block-navigation .wp-block-navigation-item__content.wp-block-navigation-item__content:hover {
  color: var(--text);
}

/* Active page, from core's own class. */
.header .wp-block-navigation .current-menu-item > .wp-block-navigation-item__content.wp-block-navigation-item__content,
.header .wp-block-navigation .current_page_item > .wp-block-navigation-item__content.wp-block-navigation-item__content {
  color: var(--text);
}

/* Inside the open drawer the links sit on the overlay and should read
   bright, with gold on hover. Declared after the header rules above so it
   wins at equal specificity while the menu is open. */
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content.wp-block-navigation-item__content {
  color: var(--text);
}
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content.wp-block-navigation-item__content:hover {
  color: var(--c-gold);
}
.wp-block-navigation-item.current-menu-item > .wp-block-navigation-item__content::after,
.wp-block-navigation-item.current_page_item > .wp-block-navigation-item__content::after {
  content: '';
  display: block;
  height: 2px;
  width: 18px;
  margin: 5px auto -3px;
  border-radius: 2px;
  background: var(--grad-btn);
}
@media (max-width: 999px) {
  .wp-block-navigation-item.current-menu-item > .wp-block-navigation-item__content::after { display: none; }
}

/* ==========================================================================
   core/details — the FAQ accordion
   Replaces the old hand-rolled .acc component. No JavaScript involved.
   ========================================================================== */
.wp-block-details {
  border-bottom: 1px solid var(--border);
  padding: 0;
  margin: 0;
  background: none;
}
.wp-block-details:first-of-type { border-top: 1px solid var(--border); }

.wp-block-details > summary {
  position: relative;
  list-style: none;
  cursor: pointer;
  padding: 22px 46px 22px 0;
  font-family: var(--font-display);
  font-size: 1.04rem;
  font-weight: 600;
  line-height: 1.45;
  color: var(--text);
  transition: color var(--t-fast) var(--ease);
}
.wp-block-details > summary::-webkit-details-marker,
.wp-block-details > summary::marker { display: none; content: ''; }
.wp-block-details > summary:hover { color: var(--c-gold); }
.wp-block-details > summary:focus-visible { outline: 2px solid var(--c-gold); outline-offset: 3px; }

/* Chevron */
.wp-block-details > summary::after {
  content: '';
  position: absolute;
  right: 6px;
  top: 50%;
  width: 11px;
  height: 11px;
  margin-top: -7px;
  border-right: 2px solid var(--c-gold);
  border-bottom: 2px solid var(--c-gold);
  transform: rotate(45deg);
  transition: transform var(--t) var(--ease);
}
.wp-block-details[open] > summary::after { transform: rotate(-135deg); margin-top: -3px; }

.wp-block-details > :not(summary) {
  margin: 0 0 22px;
  padding-right: 46px;
  color: var(--text-2);
  font-size: .97rem;
}

/* ==========================================================================
   core/button variations
   ========================================================================== */
/* theme.json can express a flat colour, a radius and a padding - but not
   the brand gradient, the lift on hover, or line-height. Without the last
   one the button inherits the body's 1.68 and renders roughly 10px taller
   than the design. These rules mirror .btn + .btn--primary exactly.
   (0,2,0) beats the `:root :where(.wp-element-button…)` global styles. */
.wp-block-button .wp-block-button__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 26px;
  border: 0;
  border-radius: var(--r-pill);
  background: var(--grad-btn);
  color: var(--on-accent);
  font-family: var(--font-display);
  font-size: .95rem;
  font-weight: 600;
  letter-spacing: -.01em;
  line-height: 1;
  white-space: nowrap;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(217, 154, 18, .32);
  transition: transform var(--t-fast) var(--ease),
              box-shadow var(--t) var(--ease),
              background var(--t) var(--ease),
              border-color var(--t) var(--ease),
              color var(--t) var(--ease);
}
.wp-block-button .wp-block-button__link:hover {
  background: var(--grad-btn-hi);
  color: var(--on-accent);
  box-shadow: 0 14px 38px rgba(248, 193, 41, .42);
  transform: translateY(-2px);
}
.wp-block-button .wp-block-button__link:active { transform: translateY(1px); }

/* An icon inside a button is spaced by the flex gap above, not a margin. */
.wp-block-button .wp-block-button__link svg { width: 17px; height: 17px; flex: none; }

.wp-block-button.is-style-bt-ghost .wp-block-button__link {
  background: rgba(201, 212, 222, .05);
  box-shadow: none;
  color: var(--text);
  border: 1px solid var(--border-hi);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.wp-block-button.is-style-bt-ghost .wp-block-button__link:hover {
  background: rgba(201, 212, 222, .1);
  border-color: rgba(201, 212, 222, .38);
  color: #fff;
  transform: translateY(-2px);
}

.wp-block-button.is-style-bt-whatsapp .wp-block-button__link {
  background: rgba(37, 211, 102, .12);
  box-shadow: none;
  color: #5BE88C;
  border: 1px solid rgba(37, 211, 102, .3);
}
.wp-block-button.is-style-bt-whatsapp .wp-block-button__link:hover {
  background: rgba(37, 211, 102, .2);
  border-color: rgba(37, 211, 102, .5);
  color: #7BF0A4;
  transform: translateY(-2px);
}

.wp-block-buttons { gap: 14px; }

/* ==========================================================================
   Misc core blocks
   ========================================================================== */
.wp-block-site-logo img { width: 42px; height: 42px; border-radius: 50%; }
.wp-block-site-title a { font-family: var(--font-display); font-weight: 800; color: var(--c-chrome); text-decoration: none; }

/* Images dropped into a .ph aspect-ratio slot should fill it. */
.ph .wp-block-image,
.ph .wp-block-image img { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; }
.ph .wp-block-image img { object-fit: cover; }

/* core/separator inside dark sections */
.wp-block-separator { border: 0; border-top: 1px solid var(--border); opacity: 1; }

/* core/list default spacing inside theme sections */
.wp-block-list { margin-bottom: 1.1em; }

/* Keep core's group padding from doubling up with .wrap. */
.wrap.wp-block-group { padding-inline: var(--gutter); }

/* Skip link injected by core. */
.skip-link.screen-reader-text:focus { background: var(--c-gold); color: var(--on-accent); }

/* ==========================================================================
   Block-gap neutralisation - restores the design's vertical rhythm
   --------------------------------------------------------------------------
   Core emits, from theme.json's blockGap:

     :root :where(.is-layout-flow) > * { margin-block-start: <gap>;
                                         margin-block-end: 0 }      (0,1,0)

   Every group in this theme is is-layout-flow, so that rule hit every
   heading, paragraph and list: it ADDED a ~28px top margin and REMOVED the
   bottom margin base.css gives them (0,0,1 - it loses). Vertical spacing
   across the whole site came out looser than the design, and the gaps sat
   above elements instead of below them.

   The design's rhythm is carried by sections (padding-block) and by the
   elements' own margins, so core's layout margins are reset here and the
   element margins are restated at a specificity that wins. Flex and grid
   layouts are untouched - they space with `gap`, not these margins.
   ========================================================================== */
:root :where(.is-layout-flow) > *,
:root :where(.is-layout-constrained) > * { margin-block-start: 0; margin-block-end: 0; }

:root :where(.is-layout-flow, .is-layout-constrained) > p,
:root :where(.is-layout-flow, .is-layout-constrained) > ul,
:root :where(.is-layout-flow, .is-layout-constrained) > ol { margin-block-end: 1.1em; }

:root :where(.is-layout-flow, .is-layout-constrained) > h1,
:root :where(.is-layout-flow, .is-layout-constrained) > h2,
:root :where(.is-layout-flow, .is-layout-constrained) > h3,
:root :where(.is-layout-flow, .is-layout-constrained) > h4 { margin-block-end: .5em; }

/* base.css ends a run with no trailing margin; keep that. */
:root :where(.is-layout-flow, .is-layout-constrained) > :last-child { margin-block-end: 0; }

/* ==========================================================================
   Brand lockup - the whole thing is one link home
   --------------------------------------------------------------------------
   core/site-logo only wraps the <img> in an anchor, so the wordmark and the
   tagline beside it were dead space. Gutenberg has no way to wrap a group in
   a link, and turning each line into its own anchor would hand screen-reader
   users three consecutive links to the same place.

   So the logo's existing anchor is stretched over the lockup with a
   pseudo-element (the "stretched link" pattern). One link, correct
   rel="home", no change to the block structure, and every block stays
   editable. Trade-off: the wordmark text is no longer selectable, which is
   fine for a logo.
   ========================================================================== */
.brand { position: relative; }
.brand .wp-block-site-logo a { position: static; }
.brand .wp-block-site-logo a::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: 10px;
}

/* Keyboard focus should ring the whole lockup, not just the badge. */
.brand .wp-block-site-logo a:focus-visible { outline: none; }
.brand .wp-block-site-logo a:focus-visible::after {
  outline: 2px solid var(--c-gold);
  outline-offset: 4px;
}

/* Hovering anywhere on the lockup lights the wordmark, so the whole area
   reads as a single target. */
.brand:hover .brand__burj   { color: var(--c-gold-hi); }
.brand:hover .brand__trades { color: #fff; }


/* ==========================================================================
   Layout-engine overrides
   --------------------------------------------------------------------------
   core's flex/grid layout emits a generated class with the same specificity
   as a plain class selector, so stylesheet order would decide the winner.
   These selectors are one step more specific and settle it either way.
   ========================================================================== */
.wp-block-group.header__inner { gap: 24px; }
.wp-block-group.brand        { gap: 11px; }
.wp-block-group.brand__text  { gap: 5px; }
.wp-block-group.brand__name  { gap: .32em; }
.wp-block-group.header__cta  { gap: 0; flex: none; }
.header__cta .wp-block-buttons { margin: 0; gap: 10px; }
@media (max-width: 520px) { .wp-block-group.brand { gap: 9px; } }

.footer__bottom nav.wp-block-group { gap: 22px; }
.footer__bottom nav.wp-block-group p { margin: 0; }
.footer__top.wp-block-group > * { min-width: 0; }

/* Button size modifiers, applied as a className on the button block. */
.wp-block-button.btn--sm .wp-block-button__link { padding: 10px 18px; font-size: .875rem; }
.wp-block-button.btn--lg .wp-block-button__link { padding: 17px 34px; font-size: 1.02rem; }
.wp-block-button.btn--full,
.wp-block-button.btn--full .wp-block-button__link { width: 100%; }

/* Buttons carry an icon in some patterns; keep it aligned. */

/* Grids built from a group + the theme's .grid classes: children are grid
   items, so core's own margin resets must not reintroduce spacing. */
.grid.wp-block-group > *,
.tiers.wp-block-group > *,
.steps.wp-block-group > * { margin-block: 0; }

/* .eco uses named grid areas and counts children; core inserts no wrappers,
   but an appender in the editor would shift the count. Scope to the front
   end by relying on real children only. */
.eco.wp-block-group > .block-list-appender { display: none; }

/* ==========================================================================
   WPForms
   --------------------------------------------------------------------------
   WPForms ships light-background defaults that would be unreadable on this
   theme. The plugin is set to "base styling only" (see inc/setup.php), so
   these rules supply all of the appearance and reuse the same input styling
   as the rest of the site.
   ========================================================================== */
.wpforms-container,
.wpforms-container-full { margin: 0; max-width: none; }
.wpforms-container form { margin: 0; }

.wpforms-head-container { display: none; }   /* title/description live in blocks above */

.wpforms-field-container { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.wpforms-field { padding: 0 0 18px; max-width: none; }

/* Wide fields: the dropdowns, the message and the consent box. */
.wpforms-field-select,
.wpforms-field-textarea,
.wpforms-field-checkbox,
.wpforms-field-radio { grid-column: 1 / -1; }
@media (max-width: 560px) { .wpforms-field-container { grid-template-columns: 1fr; } }

.wpforms-field-label {
  display: block;
  margin-bottom: 9px;
  font-family: var(--font-display);
  font-size: .86rem;
  font-weight: 600;
  color: var(--text-2);
}
.wpforms-required-label { color: var(--c-gold); border: 0; }
.wpforms-field-sublabel,
.wpforms-field-description {
  margin-top: 7px;
  font-size: var(--fs-xs);
  color: var(--text-3);
}

/* Inputs - same look as the theme's own .input/.select/.textarea. */
.wpforms-container input[type="text"],
.wpforms-container input[type="email"],
.wpforms-container input[type="tel"],
.wpforms-container input[type="url"],
.wpforms-container input[type="number"],
.wpforms-container select,
.wpforms-container textarea {
  width: 100%;
  padding: 13px 16px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border-hi);
  background: rgba(6, 24, 42, .66);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.5;
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
  box-shadow: none;
}
.wpforms-container textarea { min-height: 132px; resize: vertical; }
.wpforms-container input::placeholder,
.wpforms-container textarea::placeholder { color: var(--text-3); }

.wpforms-container input:focus,
.wpforms-container select:focus,
.wpforms-container textarea:focus {
  outline: none;
  border-color: var(--c-gold);
  box-shadow: 0 0 0 3px rgba(248, 193, 41, .18);
}

/* The select arrow has to be redrawn once the native appearance is removed. */
.wpforms-container select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 42px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23A9BED1' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 18px;
}
.wpforms-container select option { background: var(--bg-alt); color: var(--text); }

/* Consent checkbox */
.wpforms-field-checkbox ul,
.wpforms-field-radio ul { list-style: none; margin: 0; padding: 0; }
.wpforms-field-checkbox li,
.wpforms-field-radio li { display: flex; gap: 12px; align-items: flex-start; margin: 0 0 10px; }
.wpforms-field-checkbox input,
.wpforms-field-radio input {
  width: 18px;
  height: 18px;
  margin: 3px 0 0;
  flex: none;
  accent-color: var(--c-gold);
}
.wpforms-field-checkbox label,
.wpforms-field-radio label {
  font-size: .93rem;
  line-height: 1.6;
  color: var(--text-2);
  font-family: var(--font-body);
  font-weight: 400;
}

/* Submit */
.wpforms-submit-container { padding-top: 6px; }
.wpforms-container button[type="submit"],
.wpforms-container .wpforms-submit {
  width: 100%;
  padding: 17px 34px;
  border: 0;
  border-radius: var(--r-pill);
  background: var(--grad-btn);
  color: var(--on-accent);           /* gold is light: never white text */
  font-family: var(--font-display);
  font-size: 1.02rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(217, 154, 18, .32);
  transition: background var(--t) var(--ease), transform var(--t-fast) var(--ease), box-shadow var(--t) var(--ease);
}
.wpforms-container button[type="submit"]:hover,
.wpforms-container .wpforms-submit:hover {
  background: var(--grad-btn-hi);
  color: var(--on-accent);
  transform: translateY(-2px);
  box-shadow: 0 14px 38px rgba(248, 193, 41, .42);
}
.wpforms-container button[type="submit"]:disabled { opacity: .6; transform: none; cursor: default; }

/* Validation + confirmation */
.wpforms-container .wpforms-error,
.wpforms-container label.wpforms-error,
.wpforms-container em.wpforms-error {
  display: block;
  margin-top: 7px;
  color: #F0938C;
  font-size: var(--fs-xs);
  font-weight: 500;
}
.wpforms-container input.wpforms-error,
.wpforms-container select.wpforms-error,
.wpforms-container textarea.wpforms-error { border-color: rgba(229, 52, 43, .65); }

.wpforms-confirmation-container-full,
div[submit-success] > .wpforms-confirmation-container-full {
  margin: 0;
  padding: 20px 22px;
  border: 1px solid rgba(29, 185, 84, .34);
  border-radius: var(--r);
  background: rgba(29, 185, 84, .10);
  color: #8FE9B4;
}
.wpforms-confirmation-container-full p { margin: 0; color: inherit; }

/* Honeypot / anti-spam field must stay invisible. */
.wpforms-field-hp { display: none !important; }

/* ---- Contact section, now built from native blocks --------------------- */
.wp-block-group.contact { gap: clamp(30px, 4vw, 58px); }
.contact .formcard > h2,
.contact > div > h2 { font-size: var(--fs-h3); margin-bottom: .5em; }
.contact .formcard > .muted { font-size: .95rem; margin-bottom: 28px; }
.contact__sub { margin: 38px 0 14px; }

/* core/list renders <strong>; the original markup used <b>. */
.hours b,
.hours strong { color: var(--text); font-weight: 550; }
.hours li { gap: 16px; }

/* The contact cards grid stays a core/html block (icon-led link cards). */
.contact .grid { gap: 12px; }
/* ==========================================================================
   Button icons
   --------------------------------------------------------------------------
   The static build put an inline <svg> inside the button. Gutenberg stores a
   button's label as RichText, and strips child SVG the first time anyone edits
   it - so the icon would quietly disappear. These are masked pseudo-elements
   instead: the label stays plain editable text, and the glyph is identical
   because the mask is the same path. currentColor keeps it in step with the
   button's own colour in every variant.
   ========================================================================== */
.wp-block-button[class*="bt-ico-"] .wp-block-button__link::after,
.wp-block-button[class*="bt-ico-"].bt-ico-first .wp-block-button__link::before {
  content: '';
  width: 17px;
  height: 17px;
  flex: none;
  background-color: currentColor;
  -webkit-mask: var(--bt-ico) center / contain no-repeat;
          mask: var(--bt-ico) center / contain no-repeat;
}
/* When the icon leads, only the ::before is drawn. */
.wp-block-button[class*="bt-ico-"].bt-ico-first .wp-block-button__link::after { content: none; }

.wp-block-button.bt-ico-arrow { --bt-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E"); }
.wp-block-button.bt-ico-cap { --bt-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 9l10-5 10 5-10 5z'/%3E%3Cpath d='M6 11.5V16c0 1.5 2.7 3 6 3s6-1.5 6-3v-4.5'/%3E%3C/svg%3E"); }
.wp-block-button.bt-ico-mail { --bt-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='14' rx='2'/%3E%3Cpath d='M3 7l9 6 9-6'/%3E%3C/svg%3E"); }
.wp-block-button.bt-ico-telegram { --bt-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 4.5L2.9 11.3c-.8.3-.8 1.3 0 1.6l4.5 1.4 1.7 5.2c.2.6 1 .8 1.4.3l2.4-2.5 4.5 3.3c.6.4 1.4.1 1.6-.6L22 5.7c.2-.8-.5-1.5-1-1.2z'/%3E%3C/svg%3E"); }
.wp-block-button.bt-ico-whatsapp { --bt-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12.04 2a9.9 9.9 0 00-8.5 14.9L2 22l5.25-1.5A9.9 9.9 0 1012.04 2z'/%3E%3Cpath d='M8.6 7.6c.2-.5.4-.5.7-.5h.5c.2 0 .4 0 .6.5l.8 1.9c.1.3 0 .5-.1.7l-.4.5c-.2.2-.3.4-.1.7a7 7 0 003.2 2.8c.3.1.5 0 .7-.2l.5-.6c.2-.2.4-.2.6-.1l1.8.9c.3.1.4.3.4.5a2 2 0 01-1.4 1.8c-.6.2-1.4.3-3.6-.6a11 11 0 01-4.5-4.4c-.9-1.6-.9-2.6-.8-3.2a2 2 0 01.6-1.2z' fill='%23000' stroke='none'/%3E%3C/svg%3E"); }
.wp-block-button.bt-ico-youtube { --bt-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2.5' y='5.5' width='19' height='13' rx='4'/%3E%3Cpath d='M10.6 9.7l4.9 2.3-4.9 2.3z'/%3E%3C/svg%3E"); }

/* ---- .tlink arrow -------------------------------------------------------
   Same reasoning as the button icons: a paragraph's RichText drops inline
   svg the first time the text is edited, so the arrow is drawn in CSS.
   --arrow is defined alongside the tick masks in pages.css. */
.tlink::after {
  content: '';
  width: 15px;
  height: 15px;
  flex: none;
  background-color: currentColor;
  -webkit-mask: var(--arrow) center / contain no-repeat;
          mask: var(--arrow) center / contain no-repeat;
  transition: transform var(--t) var(--ease);
}
.tlink:hover::after { transform: translateX(4px); }

/* ==========================================================================
   Mobile menu calls to action
   --------------------------------------------------------------------------
   The static drawer ended with an "Open an Account" button and a WhatsApp
   button. core/navigation only accepts navigation items, not button blocks,
   so these are two ordinary menu links carrying .nav-cta / .nav-wa and
   styled as buttons inside the overlay. They stay editable in the
   Navigation block, and are hidden on desktop where the header already
   carries the CTA.

   Selectors double the content class to clear core's own
   `.wp-block-navigation .…item__content.…item__content` rule (0,3,0).
   ========================================================================== */
@media (min-width: 1000px) {
  .header .wp-block-navigation-item.nav-cta,
  .header .wp-block-navigation-item.nav-wa { display: none; }
}

.is-menu-open .wp-block-navigation-item.nav-cta { margin-top: 26px; }
.is-menu-open .wp-block-navigation-item.nav-wa  { margin-top: 12px; }

.is-menu-open .nav-cta .wp-block-navigation-item__content.wp-block-navigation-item__content,
.is-menu-open .nav-wa  .wp-block-navigation-item__content.wp-block-navigation-item__content {
  justify-content: center;
  padding: 17px 28px;
  border: 0;
  border-bottom: 0;
  border-radius: var(--r-pill);
  font-family: var(--font-display);
  font-size: 1.02rem;
  font-weight: 600;
  line-height: 1;
}
.is-menu-open .nav-cta .wp-block-navigation-item__content.wp-block-navigation-item__content:hover,
.is-menu-open .nav-wa  .wp-block-navigation-item__content.wp-block-navigation-item__content:hover {
  padding-left: 28px;      /* cancel the drawer's hover indent */
}

.is-menu-open .nav-cta .wp-block-navigation-item__content.wp-block-navigation-item__content {
  background: var(--grad-btn);
  color: var(--on-accent);
  box-shadow: 0 10px 26px rgba(217, 154, 18, .32);
}
.is-menu-open .nav-cta .wp-block-navigation-item__content.wp-block-navigation-item__content:hover {
  background: var(--grad-btn-hi);
  color: var(--on-accent);
}

.is-menu-open .nav-wa .wp-block-navigation-item__content.wp-block-navigation-item__content {
  background: rgba(37, 211, 102, .12);
  border: 1px solid rgba(37, 211, 102, .3);
  color: #5BE88C;
}
.is-menu-open .nav-wa .wp-block-navigation-item__content.wp-block-navigation-item__content:hover {
  background: rgba(37, 211, 102, .2);
  border-color: rgba(37, 211, 102, .5);
  color: #7BF0A4;
}

/* The two CTAs sit below the links, so the last plain link keeps its rule
   but the buttons must not inherit the divider. */
.is-menu-open .nav-cta .wp-block-navigation-item__content,
.is-menu-open .nav-wa  .wp-block-navigation-item__content { border-bottom: 0; }
