/* =========================================================
   FloDivinas: WordPress block adapters.
   Core blocks wrap content in slightly different markup than the
   original hand-written HTML (figure around images, a div around
   each button, an inner container in Cover blocks...). These rules
   neutralise core defaults so the design in flodivinas.css renders
   exactly as it did in the original pages.
   ========================================================= */

/* ---------- Figures, images, videos ---------- */
.fd .wp-block-image,
.fd .wp-block-video { margin: 0; }
.fd .wp-block-image img { vertical-align: bottom; }
.fd .wp-block-video video { display: block; }

/* ---------- Buttons ---------- */
.fd .wp-block-buttons > .wp-block-button { display: flex; margin: 0; }
.fd .wp-block-button__link { height: auto; word-break: normal; box-sizing: border-box; }
.fd .hero__actions,
.fd .final__actions { gap: 16px; }
.fd .xp-footer,
.fd .svc-cta,
.fd .final__actions { justify-content: safe center; } /* overflow like the original text-align:center */
/* Mobile menu, mobile bar, classes band: the original <a class="btn"> stretched */
.fd .mobile-menu .wp-block-buttons > .wp-block-button,
.fd .mobile-menu .wp-block-button__link { flex: 1 1 auto; width: 100%; }
.fd .mobile-bar > .wp-block-button { display: flex; }
.fd .mobile-bar .wp-block-button__link { flex: 1 1 auto; width: 100%; }
@media (max-width: 899px) {
  .fd .classes__inner > .wp-block-buttons > .wp-block-button,
  .fd .classes__inner .wp-block-button__link { flex: 1 1 auto; width: 100%; }
}

/* ---------- Ornament rule (paragraph) ---------- */
.fd p.rule.has-text-align-left { justify-content: flex-start; }

/* ---------- Header ---------- */
.fd .fd-logo a { display: block; }
.fd .fd-header__inner > .wp-block-image { flex: 0 0 auto; }
.fd .fd-nav .wp-block-navigation__container { flex-wrap: nowrap; gap: 22px; }
.fd .fd-nav .wp-block-navigation-item__content { display: inline; }
.fd .fd-nav .wp-block-navigation-item { display: list-item; }
.fd .fd-nav ul li { display: block; }
.fd .mobile-menu .wp-block-navigation,
.fd .mobile-menu .wp-block-navigation__container { display: grid; width: 100%; }
.fd .mobile-menu .wp-block-navigation-item { display: block; }
.fd .mobile-menu > p { margin: 0; }

/* ---------- Cover blocks used as hero / bands ---------- */
.fd .wp-block-cover:is(.hero, .page-hero, .final, .showcase-band) {
  padding-inline: 0; color: inherit; overflow: hidden;
  justify-content: normal; /* core centres the grid track; the design stretches it */
}
.fd .wp-block-cover:is(.hero, .final) { min-height: 0; }
@media (min-width: 1024px) {
  .fd .wp-block-cover.hero { min-height: 100svh; display: grid; align-items: center; }
}
@media (max-width: 1023px) {
  .fd .wp-block-cover.hero { display: block; }
}
.fd .wp-block-cover.final { display: block; }
.fd .wp-block-cover:is(.hero, .page-hero, .final, .showcase-band) > .wp-block-cover__inner-container,
.fd .wp-block-cover.is-light:is(.hero, .page-hero, .final, .showcase-band) > .wp-block-cover__inner-container {
  position: static; z-index: auto; color: inherit; width: 100%;
}
.fd .wp-block-cover:is(.hero, .page-hero, .final, .showcase-band) > .wp-block-cover__background { display: none; }
/* WP 6.6+ forces z-index:0 on cover images with a (0,6,1) selector; !important restores the design's stacking. */
.fd .wp-block-cover.hero > img.wp-block-cover__image-background { z-index: -2 !important; }
.fd .wp-block-cover.page-hero > img.wp-block-cover__image-background { z-index: -3 !important; }
.fd .wp-block-cover.final > img.wp-block-cover__image-background { z-index: -2 !important; }
.fd .wp-block-cover.showcase-band > img.wp-block-cover__image-background { z-index: -2 !important; top: -8%; bottom: auto; height: 116%; }

/* ---------- Video backgrounds (Video block) ---------- */
.fd :is(.page-hero__video, .showcase-band__video) video { position: static; }

/* ---------- Experience cards: link lives on the image ---------- */
.fd .xp > .wp-block-image { position: absolute; inset: 0; }
.fd .xp > .wp-block-image a { display: block; width: 100%; height: 100%; }
.fd .xp > .wp-block-image a:focus-visible { outline-offset: -4px; }
.fd .xp::after,
.fd .xp__cap { pointer-events: none; }

/* ---------- Lists ---------- */
.fd :is(.marquee__group, .event-list, .areas, .checklist, .credentials) { list-style: none; }
.fd .marquee__group { margin: 0; padding: 0; }

/* ---------- Contact cards ---------- */
.fd .contact-card .big { font-family: var(--font-caps); font-size: 1.35rem; letter-spacing: 0.06em; line-height: 1.65; }
.fd .contact-card .big a { text-decoration: none; }

/* ---------- Footer: legal row is two paragraphs, not span + a ---------- */
.fd .fd-footer .fd-footer__legal p { margin: 0; max-width: none; color: inherit; }

/* ---------- Tally form zone ---------- */
.fd-formzone iframe { display: block; }
.fd .fd-formzone > iframe { margin-bottom: 8px; } /* the original inline iframe left an 8px line gap below it */

/* ---------- Details (FAQ) ---------- */
.fd .faq .wp-block-details { overflow: visible; }

/* The ✦ rule is a paragraph (it was a div): keep it out of the "p:not(.tagline)" rules. */
.fd :is(.head, .split__body, .intro, .prose) > p.rule,
.fd .ivory :is(.head, .split__body, .intro, .prose) > p.rule { margin-top: 0; color: var(--gold); max-width: none; }

/* Paragraphs that were spans/links in the original keep their original colours. */
.fd .step > p.step__num { color: var(--gold); }
html body.fd .contact-card .big a, html body.fd .contact-card .big a:visited { color: var(--gold-light) !important; }

/* Plugins (e.g. Gallery Custom Links) can wrap card images in an <a>. Keep the image filling its card and ignore those links. */
.fd .svc__img > a { display: block; width: 100%; height: 100%; }
.fd .svc__img > a.custom-link { pointer-events: none; cursor: default; }
