/*
 * K13 theme layer: WordPress / Elementor integration on top of the design CSS
 * (k13-base.css + widgets/*.css, generated from the HTML build).
 */

/* Elementor wrappers around K13 sections ---------------------------------- */

.elementor-widget[class*="elementor-widget-k13-"] {
  width: 100%;
  margin-block-end: 0;
}

.elementor-widget[class*="elementor-widget-k13-"] > .elementor-widget-container {
  margin: 0;
  padding: 0;
}

/* UAE wraps the header template in its own <header>; keep it out of layout. */
#masthead {
  position: relative;
  z-index: 100;
}

/* The design's page shell had no wrapper; WordPress adds #page around it. */
#page.site {
  overflow-x: clip;
}

/* Tag labels: the design used <h4>; widgets use <span> to keep the heading
   outline clean, so they inherit the same type here. */
span.k13-tag__label,
p.k13-tag__label {
  display: block;
  margin-top: 10px;
  margin-bottom: 10px;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 1em;
  font-weight: 400;
  line-height: 1;
  text-transform: lowercase;
}

/* Animation switched off in the widget settings --------------------------- */

.k13-no-anim .reveal,
.k13-no-anim [data-k13-anim],
.k13-no-anim [data-pj-reveal],
.k13-no-anim .k13-pj-hero__title-mask {
  opacity: 1 !important;
  transform: none !important;
  transition: none !important;
}

/* Animation timing controls (CSS variables set by the widget panel). */
.k13-shipped.is-animate .reveal,
.k13-compare.is-animate .reveal,
.k13-float.is-animate .reveal {
  transition-duration: var(--k13-anim-duration, 0.75s);
}

/* Stickers switched off site-wide (Customize → K13 Site Options) ----------
   Hidden on the live site; faded in the Elementor editor so they can still
   be managed from each widget. */
.k13-no-stickers:not(.k13-is-editor) :is(
  .k13-sticker,
  .k13-hero__smiley,
  .k13-clients__sticker-love,
  .k13-future__love-sticker,
  .k13-flick-group__sticker,
  .more__card-sticker,
  .headline-quote__sticker,
  .k13-pj-hero__ticker-group img,
  [class*="k13-services-card__sticker-"],
  [class*="k13-team-grid__sticker-"],
  [class*="marquee-sticker-"],
  .sticker__wrap,
  .work-single-intro__sticker,
  .work-single-quote__sticker,
  .work-single-wide-media__sticker
) {
  display: none !important;
}
.k13-no-stickers.k13-is-editor :is(
  .k13-sticker,
  .k13-hero__smiley,
  .k13-clients__sticker-love,
  .k13-future__love-sticker,
  .k13-flick-group__sticker,
  .more__card-sticker,
  .headline-quote__sticker,
  .k13-pj-hero__ticker-group img,
  [class*="k13-services-card__sticker-"],
  [class*="k13-team-grid__sticker-"],
  [class*="marquee-sticker-"],
  .sticker__wrap,
  .work-single-intro__sticker,
  .work-single-quote__sticker,
  .work-single-wide-media__sticker
) {
  opacity: 0.35;
}

/* Screen-reader only text -------------------------------------------------- */

.k13-screen-reader-text {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Keyboard focus ------------------------------------------------------------ */

.k13-body a:focus-visible,
.k13-body button:focus-visible,
.k13-body [role="button"]:focus-visible,
.k13-body input:focus-visible,
.k13-body textarea:focus-visible {
  outline: 2px solid var(--color-orange, #8B917C);
  outline-offset: 3px;
}

/* Elementor editor -------------------------------------------------------- */

.k13-is-editor .k13-floating {
  display: none;
}

.k13-is-editor .k13-header {
  position: relative;
}

/* Hero headline decorations: the design used <div>s inside the <h1>; the
   widget uses <span>s (valid inside a heading) with the same block display. */
.k13-hero__smiley,
.k13-hero__star,
.k13-hero__star-inner {
  display: block;
}

/* Pin the poster to the player box (it otherwise follows inline whitespace). */
.k13-video .k13-video__placeholder {
  top: 0;
  left: 0;
}

/* Contact Form 7 inside the K13 contact card --------------------------------
   Maps CF7's markup onto the original form design: invalid fields get the
   design's error state, tips sit under the field, and a sent form swaps the
   rows for the success message. */
.k13-contact-form__form .wpcf7-form-control-wrap {
  display: block;
  position: relative;
  width: 100%;
}
.k13-contact-form__field :is(input, textarea).wpcf7-not-valid {
  border: 2px solid var(--color-alert-error);
  transform: translateY(calc(var(--shadow-distance) * -1)) rotate(0.001deg);
  box-shadow: 0 var(--shadow-distance) 0 0 rgba(var(--color-dark-rgb), 0.2);
}
.k13-contact-form__form .wpcf7-not-valid-tip {
  width: 100%;
  display: block;
  color: var(--color-alert-error);
  font-size: 0.8em;
  font-weight: 500;
  position: absolute;
  top: 100%;
  left: 0;
}
.k13-contact-form__form .wpcf7-spinner {
  position: absolute;
  right: -2.5em;
  top: 50%;
  margin: -12px 0 0;
}
.k13-contact-form__form .wpcf7-response-output {
  margin: 1.5em 0 0;
  padding: 0.75em 1em;
  border: 2px solid var(--color-alert-error, #20493C);
  border-radius: 0.5em;
  font-size: 0.9em;
  font-weight: 500;
  text-align: center;
}
.k13-contact-form__form.sent .k13-contact-form__form-row {
  display: none;
}
.k13-contact-form__form.sent .wpcf7-response-output {
  border: 0;
  padding: 2em 1em;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-weight: 400;
  font-size: 2em;
  line-height: 1.2;
  text-transform: none;
}
.k13-contact-form__form .k13-contact-btn .wpcf7-submit {
  cursor: pointer;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
}

/* The mail bird takes its height from its height="168" attribute in the
   design; Elementor's `.elementor img{height:auto}` would override that. */
.k13-contact-bubble.is--mail > img:not(.k13-nx) {
  height: 168px;
  object-fit: contain;
}

/* Word-by-word text fade (k13-core.js "text-fade"). */
.k13-fade-word {
  display: inline-block;
  will-change: transform, opacity;
}
