/* ============================================================
   EXPERTEASE CREDIT BANNER — modular component v4
   Neutral — works on any dark background.
   Transparent, no hardcoded background color.
   Usage:
     <hr class="ec-rule">
     <div class="expertease-credit">…</div>
   ============================================================ */

:root {
  --ec-white:   rgba(255,255,255,0.82);
  --ec-muted:   rgba(255,255,255,0.38);
  --ec-accent:  rgba(255,255,255,0.65);
  --ec-cta-col: rgba(255,255,255,0.90);
  --ec-logo-h:  20px;
  --ec-font:    inherit;
}

/* ── separator rule ── */
hr.ec-rule {
  border: none;
  height: 1px;
  margin: 0 6%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.12), transparent);
}

/* ── outer wrapper ── */
.expertease-credit {
  position: relative;
  z-index: 0;
  isolation: isolate;
  contain: layout style;
  background: transparent;
  overflow: hidden;
  font-family: var(--ec-font);
  padding: 0 6%;
  height: 60px;
  margin-bottom: 72px;   /* clear the fixed #backToTop button (bottom:32px + ~40px height) */
}

/* ─────────────────────────────────────────────
   LAYER A — copyright + "designed by" credit
   LAYER B — advertisement CTA
   They alternate: A visible → fade out → B visible → fade out → repeat
   ───────────────────────────────────────────── */

.ec-layer {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  padding: 0 6%;
}

/* Layer A: credit — visible first */
.ec-layer--credit {
  animation: ec-fade-credit 9s ease-in-out infinite;
}

/* Layer B: ad — offset by 4.5s (half cycle) */
.ec-layer--ad {
  opacity: 0;
  animation: ec-fade-ad 9s ease-in-out infinite;
}

@keyframes ec-fade-credit {
  0%,  35%  { opacity: 1; transform: translateY(0); }
  42%,  57%  { opacity: 0; transform: translateY(-6px); }
  92%, 100%  { opacity: 1; transform: translateY(0); }
}

@keyframes ec-fade-ad {
  0%,  35%  { opacity: 0; transform: translateY(6px); }
  42%,  57%  { opacity: 1; transform: translateY(0); }
  92%, 100%  { opacity: 0; transform: translateY(6px); }
}

/* ── copyright text ── */
.ec-copy {
  font-size: 10.5px;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--ec-muted);
  white-space: nowrap;
}

/* ── divider dot ── */
.ec-divider {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  flex-shrink: 0;
}

/* ── "designed by" label ── */
.ec-label {
  font-size: 10.5px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--ec-muted);
  white-space: nowrap;
}

/* ── brand link (credit layer) ── */
.ec-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: inherit;
  transition: opacity 0.25s;
}

.ec-brand:hover { opacity: 0.75; }

/* ── logo ── */
.ec-logo {
  height: var(--ec-logo-h);
  width: auto;
  display: block;
  opacity: 0.7;
  transition: opacity 0.3s;
  filter: brightness(0) invert(1);   /* force white — neutral on any bg */
}

.ec-brand:hover .ec-logo { opacity: 1; }

/* ── brand name — clean white, no gold ── */
.ec-name {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--ec-accent);
  white-space: nowrap;
  transition: color 0.3s;
}

.ec-brand:hover .ec-name { color: var(--ec-white); }

/* ─────────────────────────────────────────
   AD LAYER STYLES
   ───────────────────────────────────────── */

/* Pulse ring that draws the eye */
.ec-ad-ring {
  position: relative;
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

.ec-ad-ring::before,
.ec-ad-ring::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.35);
}

.ec-ad-ring::after {
  animation: ec-ring-pulse 2.4s ease-out infinite;
}

@keyframes ec-ring-pulse {
  0%   { transform: scale(1);   opacity: 0.6; }
  100% { transform: scale(1.9); opacity: 0;   }
}

.ec-ad-logo {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ec-ad-logo img {
  height: 16px;
  width: auto;
  filter: brightness(0) invert(1);
  opacity: 0.85;
}

/* Ad text group */
.ec-ad-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.ec-ad-question {
  font-size: 10px;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: var(--ec-muted);
  line-height: 1;
}

.ec-ad-cta {
  display: flex;
  align-items: center;
  gap: 7px;
  text-decoration: none;
  color: var(--ec-cta-col);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.8px;
  white-space: nowrap;
  transition: color 0.2s;
}

.ec-ad-cta:hover { color: #fff; }

/* Arrow that slides right on hover */
.ec-ad-arrow {
  display: inline-flex;
  align-items: center;
  opacity: 0.6;
  transform: translateX(0);
  transition: transform 0.25s ease, opacity 0.25s;
}

.ec-ad-cta:hover .ec-ad-arrow {
  transform: translateX(4px);
  opacity: 1;
}

/* ── shimmer sweep across the whole banner ── */
.expertease-credit::before {
  content: "";
  position: absolute;
  top: 0;
  left: -70%;
  width: 35%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255,255,255,0.04) 40%,
    rgba(255,255,255,0.07) 50%,
    rgba(255,255,255,0.04) 60%,
    transparent 100%
  );
  transform: skewX(-12deg);
  animation: ec-sweep 7s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
}

@keyframes ec-sweep {
  0%   { left: -70%; opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 1; }
  100% { left: 160%; opacity: 0; }
}

/* ── responsive ── */
@media (max-width: 480px) {
  .expertease-credit { height: auto; padding: 12px 5%; }
  .ec-layer          { position: relative; inset: auto; padding: 0; }
  .ec-layer--ad      { display: none; }
  .ec-layer--credit  { animation: none; opacity: 1; transform: none; }
  .ec-divider        { display: none; }
}
