/* ============================================================
   Circus Extreme — Site footer
   ------------------------------------------------------------
   Flattened from the footer rules in app.scss and the Cirloxo
   template, with the Bootstrap grid replaced by CSS Grid and
   Font Awesome icons replaced by inline SVG.

   Covers: the subscribe CTA strip, the four-column widget area,
   the copyright bar, the fixed mobile "book" button and the
   Google Translate flag buttons.
   ============================================================ */

.ce-footer,
.ce-cta {
  position: relative;
  z-index: 10;
}

.ce-footer a {
  text-decoration: none;
}

.ce-footer__inner {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

/* ============================================================
   Subscribe CTA strip
   ============================================================ */

.ce-cta {
  overflow-x: hidden;
  padding-block: var(--section-y);
  text-align: center;
}

.ce-cta__eyebrow {
  color: var(--circus-yellow);
  font-size: clamp(1.125rem, 2.2vw, 1.75rem);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .2em;
  margin-bottom: var(--space-xs);
}

.ce-cta__title {
  color: var(--circus-yellow);
  font-family: var(--heading-font3);
  font-weight: 400;
  font-size: clamp(2.5rem, 6vw, 4.6875rem);
  line-height: 1.05;
  margin-bottom: var(--space-lg);
}

/* CF7 controls its own markup, so the form is styled by element.
   The field is nested <p><label><span class="wpcf7-form-control-wrap">,
   so the growth has to be passed down through both wrappers for the
   input to fill the pill. */
.ce-cta__form form > p {
  display: flex;
  align-items: stretch;
  justify-content: center;
  max-width: 830px;
  margin: 0 auto;
}

.ce-cta__form form > p > label,
.ce-cta__form .wpcf7-form-control-wrap {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
  position: relative;
}

.ce-cta__form .wpcf7-form-control:not(.wpcf7-submit) {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  padding: 24px 30px;
  border: 0;
  border-radius: 50px 0 0 50px;
  background: var(--color-white);
  color: var(--circus-purple);
  font-family: var(--body-font);
  font-size: 1.0625rem;
  font-weight: 400;
}

.ce-cta__form .wpcf7-form-control:not(.wpcf7-submit)::placeholder {
  color: #8b8b8b;
  opacity: 1;
}

.ce-cta__form .wpcf7-form-control:not(.wpcf7-submit):focus-visible {
  outline: 3px solid var(--circus-yellow);
  outline-offset: 3px;
}

.ce-cta__form .wpcf7-submit {
  flex: 0 0 auto;
  border-radius: 0 50px 50px 0;
  padding-inline: 48px;
}

.ce-cta__form .wpcf7-spinner {
  display: none;
}

/* The invalid-field tip is a sibling of the input inside the wrap, so it
   is taken out of flow to stop it stretching the pill. */
.ce-cta__form .wpcf7-not-valid-tip {
  position: absolute;
  top: 100%;
  left: 28px;
  right: 0;
  margin-top: 8px;
  font-size: .85rem;
  text-align: left;
  color: var(--circus-yellow);
}

.ce-cta__form .wpcf7-response-output {
  max-width: 830px;
  margin: var(--space-md) auto 0;
  padding: 10px 16px;
  font-size: .95rem;
  color: var(--color-white);
}

@media (max-width: 620px) {
  .ce-cta__form form > p {
    flex-direction: column;
    align-items: center;
    gap: var(--space-xs);
    max-width: 320px;
  }

  .ce-cta__form form > p > label,
  .ce-cta__form .wpcf7-form-control-wrap {
    width: 100%;
  }

  .ce-cta__form .wpcf7-form-control:not(.wpcf7-submit) {
    border-radius: 50px;
    text-align: center;
  }

  .ce-cta__form .wpcf7-not-valid-tip {
    left: 0;
    text-align: center;
  }

  .ce-cta__form .wpcf7-submit {
    border-radius: 50px;
  }
}

/* ============================================================
   Widget area
   ============================================================ */

.ce-footer {
  background: var(--footer-bg);
  color: var(--footer-text-color);
}

.ce-footer__widgets {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.4fr;
  gap: var(--space-lg);
  padding-block: var(--space-xl) var(--space-lg);
}

@media (max-width: 991px) {
  .ce-footer__widgets {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 575px) {
  .ce-footer__widgets {
    grid-template-columns: 1fr;
  }
}

.ce-footer__logo {
  display: inline-block;
  max-width: 185px;
  margin-bottom: var(--space-sm);
}

.ce-footer__logo img {
  max-width: 100%;
  height: auto;
}

.ce-footer__about p {
  font-size: 1rem;
  line-height: 1.6;
  font-weight: 300;
}

.ce-footer__title {
  position: relative;
  font-family: var(--heading-font);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--color-white);
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-xs);
}

.ce-footer__title::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 40px;
  height: 2px;
  background: var(--color-white);
}

.ce-footer__list {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  margin: 0;
  padding: 0;
  list-style: none;
}

.ce-footer__list a,
.ce-footer__list li {
  display: flex;
  align-items: center;
  gap: .6em;
  color: var(--footer-text-color);
  font-size: 1rem;
  line-height: 1.4;
  transition: color .3s ease;
}

.ce-footer__list a:hover,
.ce-footer__list a:focus-visible {
  color: var(--circus-yellow);
}

.ce-footer__list svg {
  flex-shrink: 0;
  color: currentColor;
}

/* The address wraps to several lines — pin its icon to the top. */
.ce-footer__list li.is-multiline {
  align-items: flex-start;
}

.ce-footer__endorsement {
  grid-column: 1 / -1;
  display: flex;
  justify-content: center;
  padding-top: var(--space-md);
}

.ce-footer__endorsement img {
  max-width: 260px;
  height: auto;
}

/* ============================================================
   Copyright bar
   ============================================================ */

.ce-footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  flex-wrap: wrap;
  padding-block: var(--space-md);
  border-top: 1px solid var(--border-white-color);
}

.ce-footer__copyright {
  font-size: .9rem;
  line-height: 1.5;
  margin: 0;
}

.ce-footer__copyright a {
  color: var(--circus-yellow);
}

.ce-footer__menu {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm) var(--space-md);
  margin: 0;
  padding: 0;
  list-style: none;
  justify-content: flex-end;
}

.ce-footer__menu a {
  color: var(--footer-text-color);
  font-size: .9rem;
  transition: color .3s ease;
}

.ce-footer__menu a:hover,
.ce-footer__menu a:focus-visible {
  color: var(--circus-yellow);
}

@media (max-width: 767px) {
  .ce-footer__bottom {
    flex-direction: column;
    text-align: center;
  }

  .ce-footer__menu {
    justify-content: center;
  }
}

/* ============================================================
   Fixed controls
   ============================================================ */

/* Persistent booking CTA on small screens, where the header CTA is hidden. */
.ce-book-button {
  position: fixed;
  bottom: 20px;
  left: 0;
  right: 0;
  margin-inline: auto;
  width: 150px;
  z-index: 15;
}

.ce-book-button .ce-btn {
  width: 100%;
}

@media (min-width: 1200px) {
  .ce-book-button {
    display: none;
  }
}

.ce-translate {
  position: fixed;
  bottom: 30px;
  left: 30px;
  display: flex;
  gap: 5px;
  z-index: 20;
}

@media (max-width: 991px) {
  .ce-translate {
    flex-direction: column;
    bottom: 20px;
    left: 12px;
  }
}

.ce-translate__flag {
  width: 30px;
  height: 20px;
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 3px;
  overflow: hidden;
  background-color: transparent;
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  cursor: pointer;
  opacity: .75;
  transition: opacity .3s ease, outline-color .3s ease;
}

.ce-translate__flag:hover,
.ce-translate__flag:focus-visible,
.ce-translate__flag.is-active {
  opacity: 1;
}

.ce-translate__flag:focus-visible {
  outline: 2px solid var(--circus-yellow);
  outline-offset: 2px;
}

/* ── Back to top ─────────────────────────────────────────── */

.ce-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 20;

  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;

  color: var(--circus-purple);
  background: var(--circus-yellow);
  cursor: pointer;

  /* Hidden until the page has been scrolled — site.js toggles .is-visible. */
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity .3s ease, transform .3s ease, visibility .3s, background-color .3s ease;
}

.ce-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.ce-to-top:hover,
.ce-to-top:focus-visible {
  background: var(--circus-pink);
  color: var(--circus-yellow);
}

.ce-to-top:focus-visible {
  outline: 3px solid var(--circus-yellow);
  outline-offset: 3px;
}

/* Clear of the fixed mobile booking CTA. */
@media (max-width: 1199px) {
  .ce-to-top {
    bottom: 76px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ce-to-top {
    transition: opacity .3s ease, visibility .3s;
    transform: none;
  }
}

.ce-translate__flag--en { background-image: url('/wp-content/themes/circus-extreme/resources/images/flags/gb.svg'); }
.ce-translate__flag--fr { background-image: url('/wp-content/themes/circus-extreme/resources/images/flags/fr.svg'); }
.ce-translate__flag--de { background-image: url('/wp-content/themes/circus-extreme/resources/images/flags/de.svg'); }
.ce-translate__flag--es { background-image: url('/wp-content/themes/circus-extreme/resources/images/flags/es.svg'); }

/* Google Translate injects its own banner and shifts the body. */
.skiptranslate {
  display: none !important;
}

body {
  top: 0 !important;
}
