/* Rexi Footer — follows the Workademy reference: sizes, colours and breakpoints (991 / 767 / 575).
 * Everything is scoped to #rexi-footer so Elementor, ElementsKit and theme styles cannot reach in.
 */

#rexi-footer {
  --rxf-blue: #183FE1;
  --rxf-blue-dark: #002791;
  --rxf-accent: #7095FB;
  --rxf-cream: #EFE8D1;
  --rxf-ink: #000;
  --rxf-ink-64: rgba(0, 0, 0, .64);
  --rxf-white-80: rgba(255, 255, 255, .8);
  --rxf-line: rgba(255, 255, 255, .2);
  --rxf-font: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  /* Moving portraits. The window is the full height of the cream band, so pictures
     enter through its bottom edge and leave through its top edge. */
  --rxf-size: 184px;
  --rxf-gap: 24px;
  --rxf-band: 622px;

  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  font-family: var(--rxf-font);
  font-size: 16px;
  line-height: 1.5;
  text-align: start;
  -webkit-font-smoothing: antialiased;
}
#rexi-footer *, #rexi-footer *::before, #rexi-footer *::after { box-sizing: border-box; }
#rexi-footer h2, #rexi-footer h3, #rexi-footer p, #rexi-footer ul, #rexi-footer li, #rexi-footer form { margin: 0; padding: 0; }
#rexi-footer h2, #rexi-footer h3 { font-family: var(--rxf-font); text-transform: none; }
#rexi-footer ul { list-style: none; }
#rexi-footer li { list-style: none; }
#rexi-footer li::marker { content: none; }
#rexi-footer a { text-decoration: none; box-shadow: none; }
#rexi-footer a:focus-visible, #rexi-footer button:focus-visible, #rexi-footer input:focus-visible {
  outline: 2px solid var(--rxf-accent); outline-offset: 3px;
}
#rexi-footer .rxf-i { display: block; flex: none; }
#rexi-footer .rxf-sr, #rexi-footer .rxf-hp {
  position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0, 0, 0, 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}
#rexi-footer .rxf-container { width: 100%; max-width: 1420px; margin: 0 auto; padding: 0 24px; }

/* ---------- Cream call-to-action ---------- */

#rexi-footer .rxf-cta {
  position: relative;
  padding: 0; /* no vertical padding: the portraits touch the top and bottom of the band */
  background: var(--rxf-cream);
  color: var(--rxf-ink);
  /* Full-bleed colour without a horizontal scrollbar; also clips the portraits to the band. */
  box-shadow: 0 0 0 100vmax var(--rxf-cream);
  clip-path: inset(0 -100vmax);
}
#rexi-footer .rxf-cta-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: center;
  gap: 30px;
  min-height: 541px;
  overflow: hidden;
}

#rexi-footer .rxf-cta-heading { display: flex; align-items: flex-end; column-gap: 32px; min-width: 0; }
#rexi-footer .rxf-cta-bar { flex: 0 0 18px; width: 18px; height: 168px; background: var(--rxf-accent); }
#rexi-footer .rxf-cta-title {
  min-width: 0;
  color: var(--rxf-ink);
  font-size: 48px; font-weight: 600; line-height: 1.25; letter-spacing: -1px;
  overflow-wrap: normal;
}

#rexi-footer .rxf-cta-body {
  justify-self: center;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  width: 100%; max-width: 500px; text-align: center;
}
#rexi-footer .rxf-cta-text { color: var(--rxf-ink-64); font-size: 20px; font-weight: 400; line-height: 1.3; }
#rexi-footer .rxf-cta-actions { display: flex; flex-direction: column; row-gap: 12px; width: 100%; max-width: 302px; margin-top: 48px; }
#rexi-footer .rxf-cta-text + .rxf-cta-actions { margin-top: 48px; }
#rexi-footer .rxf-btn {
  display: flex; align-items: center; justify-content: center; column-gap: 6px;
  min-height: 50px; padding: 7px 26px; border: 0; border-radius: 8px;
  font-family: var(--rxf-font); font-size: 16px; font-weight: 400; line-height: 1.2;
  white-space: nowrap; cursor: pointer;
  transition: background-color .3s ease, color .3s ease, column-gap .3s ease;
}
#rexi-footer .rxf-btn-primary, #rexi-footer .rxf-btn-primary:visited { background: var(--rxf-blue); color: #fff; }
#rexi-footer .rxf-btn-primary:hover { background: var(--rxf-blue-dark); color: #fff; column-gap: 12px; }
#rexi-footer .rxf-btn-soft, #rexi-footer .rxf-btn-soft:visited { background: rgba(0, 0, 0, .1); color: var(--rxf-ink); }
#rexi-footer .rxf-btn-soft:hover { background: #fff; color: var(--rxf-ink); }

/* Portrait column: a window exactly as tall as the band, pinned to its right edge. */
#rexi-footer .rxf-portraits {
  position: relative;
  justify-self: end;
  width: var(--rxf-size);
  height: var(--rxf-band);
}
#rexi-footer .rxf-portraits-window { width: 100%; height: 100%; overflow: hidden; }
#rexi-footer .rxf-portraits-track {
  display: flex; flex-direction: column;
  animation: rxf-rise var(--rxf-dur, 19.5s) linear infinite;
  will-change: transform;
}
#rexi-footer .rxf-portrait {
  flex: none;
  width: var(--rxf-size); height: var(--rxf-size);
  margin: 0 0 var(--rxf-gap);
  border-radius: 50%; overflow: hidden;
  background: rgba(0, 0, 0, .06);
}
#rexi-footer .rxf-portrait-img {
  display: block; width: 100%; max-width: none; height: 100%;
  margin: 0; border: 0; border-radius: 50%;
  object-fit: cover; object-position: center;
}
/* The track holds the list twice; moving it by half brings the second copy exactly
   to where the first began, so the loop has no seam. */
@keyframes rxf-rise { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(0, -50%, 0); } }
@keyframes rxf-slide { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(-50%, 0, 0); } }

#rexi-footer .rxf-portraits.is-paused .rxf-portraits-track,
#rexi-footer .rxf-portraits.is-offscreen .rxf-portraits-track { animation-play-state: paused; }

/* Pause control: appears on hover, on keyboard focus, and always on touch screens. */
#rexi-footer .rxf-motion {
  position: absolute; right: 8px; bottom: 14px; z-index: 2;
  display: grid; place-items: center;
  width: 32px; height: 32px; min-height: 0; margin: 0; padding: 0;
  border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, .88); color: var(--rxf-ink);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .12);
  cursor: pointer; opacity: 0;
  transition: opacity .2s ease;
}
#rexi-footer .rxf-portraits:hover .rxf-motion,
#rexi-footer .rxf-motion:focus-visible,
#rexi-footer .rxf-portraits.is-paused .rxf-motion { opacity: 1; }
#rexi-footer .rxf-motion .rxf-i-play,
#rexi-footer .rxf-portraits.is-paused .rxf-motion .rxf-i-pause { display: none; }
#rexi-footer .rxf-portraits.is-paused .rxf-motion .rxf-i-play { display: block; }
@media (hover: none) { #rexi-footer .rxf-motion { opacity: .85; } }

/* Two soft white parallelograms behind the portraits. */
#rexi-footer .rxf-deco {
  position: absolute; right: 70px; bottom: 40px; z-index: -1;
  display: flex; column-gap: 10px; pointer-events: none;
}
#rexi-footer .rxf-deco-defs { position: absolute; width: 0; height: 0; }
#rexi-footer .rxf-deco-b { transform: translateY(120px); }

/* ---------- Black footer ---------- */

#rexi-footer .rxf-main {
  display: block;
  padding: 0 0 24px;
  background: #000;
  color: #fff;
  box-shadow: 0 0 0 100vmax #000;
  clip-path: inset(0 -100vmax);
}
#rexi-footer .rxf-grid {
  display: grid;
  grid-template-columns: 1.1fr .3fr .3fr .3fr;
  gap: 28px 20px;
  padding: 120px 0 80px;
}

#rexi-footer .rxf-brand { display: flex; flex-direction: column; align-items: flex-start; row-gap: 72px; width: 100%; max-width: 428px; }
#rexi-footer .rxf-logo { display: inline-block; line-height: 0; }
#rexi-footer .rxf-logo-img { display: block; width: 244px; max-width: 100%; height: auto; filter: brightness(0) invert(1); }
#rexi-footer .rxf-logo-text { color: #fff; font-size: 28px; font-weight: 600; line-height: 1.2; letter-spacing: -.5px; }

#rexi-footer .rxf-news { display: flex; flex-direction: column; row-gap: 16px; width: 100%; }
#rexi-footer .rxf-news-title { color: #fff; font-size: 24px; font-weight: 600; line-height: 1.2; letter-spacing: -.06px; }
#rexi-footer .rxf-news-row { display: flex; align-items: stretch; column-gap: 10px; }
#rexi-footer .rxf-news-input {
  flex: 1 1 auto; width: 100%; min-width: 0; min-height: 52px; height: auto;
  margin: 0; padding: 13px 12px;
  border: 1px solid var(--rxf-line); border-radius: 8px;
  background: transparent; color: #fff; box-shadow: none;
  font-family: var(--rxf-font); font-size: 16px; line-height: 1.5;
  transition: border-color .3s ease;
}
#rexi-footer .rxf-news-input::placeholder { color: rgba(255, 255, 255, .6); opacity: 1; }
#rexi-footer .rxf-news-input:hover { border-color: rgba(255, 255, 255, .4); }
#rexi-footer .rxf-news-input:focus { outline: none; border-color: rgba(255, 255, 255, .6); }
#rexi-footer .rxf-news-btn {
  display: flex; align-items: center; column-gap: 6px; flex: none;
  min-height: 52px; margin: 0; padding: 8px 26px;
  border: 0; border-radius: 8px;
  background: var(--rxf-blue); color: #fff;
  font-family: var(--rxf-font); font-size: 16px; font-weight: 500; line-height: 24px; letter-spacing: -.16px;
  text-transform: none; cursor: pointer; box-shadow: none;
  transition: background-color .3s ease;
}
#rexi-footer .rxf-news-btn:hover { background: var(--rxf-blue-dark); color: #fff; }
#rexi-footer .rxf-news-btn[disabled] { opacity: .7; cursor: progress; }
#rexi-footer .rxf-news-msg { color: var(--rxf-white-80); font-size: 14px; line-height: 1.4; }
#rexi-footer .rxf-news-msg:empty { display: none; }
#rexi-footer .rxf-news.is-error .rxf-news-msg { color: #FFA3A3; }

#rexi-footer .rxf-col { display: flex; flex-direction: column; align-items: flex-start; row-gap: 20px; min-width: 0; }
#rexi-footer .rxf-col-title { color: var(--rxf-accent); font-size: 16px; font-weight: 400; line-height: 1.3; letter-spacing: 0; }
#rexi-footer .rxf-links { display: flex; flex-direction: column; align-items: flex-start; row-gap: 8px; }
#rexi-footer .rxf-links a, #rexi-footer .rxf-links a:visited {
  color: var(--rxf-white-80); font-size: 16px; font-weight: 400; line-height: 1.25;
  transition: color .3s ease;
}
#rexi-footer .rxf-links a:hover { color: #fff; }

#rexi-footer .rxf-connect {
  grid-column: 2 / 5; grid-row: 2;
  display: flex; flex-wrap: wrap; align-items: center; gap: 16px 32px;
}
#rexi-footer .rxf-socials { display: flex; column-gap: 4px; }
#rexi-footer .rxf-social, #rexi-footer .rxf-social:visited {
  display: flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; border-radius: 8px;
  background: rgba(255, 255, 255, .1); color: #fff;
  transition: background-color .3s ease;
}
#rexi-footer .rxf-social:hover { background: var(--rxf-blue); color: #fff; }
#rexi-footer .rxf-community, #rexi-footer .rxf-community:visited {
  display: flex; align-items: center; justify-content: center; column-gap: 8px;
  min-height: 48px; padding: 10px 20px; border-radius: 8px;
  background: rgba(255, 255, 255, .1); color: #fff;
  font-size: 16px; font-weight: 500; line-height: 1.2;
  transition: background-color .3s ease;
}
#rexi-footer .rxf-community strong { color: var(--rxf-accent); font-weight: 500; }
#rexi-footer .rxf-community:hover { background: var(--rxf-blue-dark); color: #fff; }

#rexi-footer .rxf-bottom { border-top: 1px solid var(--rxf-line); }
#rexi-footer .rxf-copy { padding: 24px 0; color: var(--rxf-white-80); font-size: 18px; line-height: 1.3; }

/* ---------- Tablet: 991px and below ---------- */
@media (max-width: 991px) {
  #rexi-footer { --rxf-size: 100px; --rxf-gap: 13px; --rxf-band: 330px; }
  #rexi-footer .rxf-container { padding: 0 20px; }

  #rexi-footer .rxf-cta-grid { min-height: 0; }
  #rexi-footer .rxf-cta-heading { column-gap: 13px; }
  #rexi-footer .rxf-cta-bar { flex-basis: 12px; width: 12px; height: 176px; }
  #rexi-footer .rxf-cta-title { font-size: 32px; letter-spacing: -.6px; }
  #rexi-footer .rxf-cta-text { font-size: 17px; }
  #rexi-footer .rxf-cta-actions, #rexi-footer .rxf-cta-text + .rxf-cta-actions { margin-top: 32px; }
  #rexi-footer .rxf-btn { min-height: 40px; }
  #rexi-footer .rxf-deco { display: none; }

  #rexi-footer .rxf-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 64px; padding: 96px 0 24px; }
  #rexi-footer .rxf-brand { grid-column: 1 / -1; max-width: none; flex-direction: row; flex-wrap: wrap; justify-content: space-between; column-gap: 40px; row-gap: 32px; }
  #rexi-footer .rxf-news { max-width: 370px; }
  #rexi-footer .rxf-links a { line-height: 24px; letter-spacing: -.16px; }
  #rexi-footer .rxf-connect { grid-column: 1 / -1; grid-row: auto; justify-content: space-between; margin-top: 36px; }
}

/* ---------- 767px and below ---------- */
@media (max-width: 767px) {
  #rexi-footer .rxf-cta-grid { column-gap: 20px; }
  #rexi-footer .rxf-cta-actions { row-gap: 8px; }
  #rexi-footer .rxf-col { row-gap: 24px; }
  #rexi-footer .rxf-news { margin-top: 8px; }
}

/* ---------- Phone: 575px and below ----------
   The band stacks, and the portraits become a full-width strip that slides sideways,
   entering and leaving through the edges of the screen. */
@media (max-width: 575px) {
  #rexi-footer { --rxf-size: 30vw; --rxf-gap: 3.34vw; }

  #rexi-footer .rxf-cta-container { padding: 0; }
  #rexi-footer .rxf-cta-grid { display: flex; flex-direction: column; align-items: stretch; row-gap: 32px; padding: 40px 0 50px; }
  #rexi-footer .rxf-cta-heading { padding: 0 20px; }
  #rexi-footer .rxf-cta-bar { height: 90px; }
  #rexi-footer .rxf-cta-title { font-size: 32px; }
  #rexi-footer .rxf-cta-body { justify-self: auto; align-items: flex-start; max-width: none; padding: 0 20px; text-align: left; }
  #rexi-footer .rxf-cta-text { font-size: 17px; }
  #rexi-footer .rxf-cta-actions { max-width: none; }
  #rexi-footer .rxf-btn { padding: 7px 20px; min-height: 48px; }

  #rexi-footer .rxf-portraits { justify-self: auto; width: 100%; height: auto; }
  #rexi-footer .rxf-portraits-track { flex-direction: row; width: max-content; animation-name: rxf-slide; }
  #rexi-footer .rxf-portrait { margin: 0 var(--rxf-gap) 0 0; }
  #rexi-footer .rxf-motion { right: 12px; bottom: 6px; }

  #rexi-footer .rxf-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 48px; padding-top: 72px; }
  #rexi-footer .rxf-brand { grid-column: 1 / -1; flex-direction: column; row-gap: 40px; }
  #rexi-footer .rxf-news { max-width: none; }
  #rexi-footer .rxf-col-courses { grid-column: 1 / -1; }
  #rexi-footer .rxf-connect { grid-column: 1 / -1; flex-direction: column; align-items: center; row-gap: 24px; margin-top: 8px; }
  #rexi-footer .rxf-community { width: 100%; justify-content: flex-start; }
  #rexi-footer .rxf-copy { font-size: 15px; }
}

/* Visitors whose device asks for less motion get the same pictures, standing still. */
@media (prefers-reduced-motion: reduce) {
  #rexi-footer .rxf-portraits-track { animation: none; }
  #rexi-footer .rxf-motion { display: none; }
  #rexi-footer .rxf-btn, #rexi-footer .rxf-social, #rexi-footer .rxf-community, #rexi-footer .rxf-links a { transition: none; }
}
