/* =========================================================
   AI BUSINESS ASSISTANT FOOTER — SAAS SOLID V4
   Dark purple footer · solid pink accents · mobile overflow protection
========================================================= */

.ai-footer {
  max-width: 100%;
  overflow-x: clip;
  padding: 58px 0 24px;

  background: #160038;
  border-top: 1px solid #ff0d96;
}

@supports not (overflow: clip) {
  .ai-footer {
    overflow-x: hidden;
  }
}

.ai-footer,
.ai-footer *,
.ai-footer *::before,
.ai-footer *::after {
  box-sizing: border-box;
}

.ai-footer-shell {
  width: min(1560px, calc(100% - 48px));
  max-width: 100%;
  margin: 0 auto;
}

/* ================= TOP LAYOUT ================= */

.ai-footer-top {
  display: grid;
  grid-template-columns: minmax(300px, 0.78fr) minmax(0, 2.22fr);
  gap: 28px;
  align-items: stretch;
  max-width: 100%;
}

/* ================= LEFT BRAND CARD ================= */

.ai-footer-brand {
  position: relative;
  min-width: 0;
  min-height: 100%;
  padding: 24px;

  border-radius: 24px;
  background: #240035;
  border: 1px solid rgba(255, 13, 150, 0.28);

  box-shadow:
    0 22px 54px rgba(0, 0, 0, 0.30),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.ai-footer-brand::before {
  content: "";
  position: absolute;
  left: 0;
  top: 24px;
  bottom: 24px;

  width: 5px;
  border-radius: 999px;
  background: #ff0d96;
}

.ai-footer-logo {
  display: inline-flex;
  margin-bottom: 12px;
  text-decoration: none;
}

.ai-footer-logo-image {
  width: 42px;
  height: 42px;
  max-width: 100%;
  object-fit: contain;
}

.ai-footer-kicker {
  display: inline-flex;
  align-items: center;

  margin: 0 0 8px;
  padding: 6px 10px;

  border-radius: 999px;
  background: #ff0d96;
  border: 1px solid #ff0d96;

  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 850;
  letter-spacing: 0.10em;
  text-transform: uppercase;
}

.ai-footer-title {
  max-width: 19ch;
  margin: 0;

  color: #ffffff;
  font-size: clamp(1.35rem, 1.65vw, 1.95rem);
  line-height: 1.06;
  letter-spacing: -0.035em;
  font-weight: 850;
  overflow-wrap: anywhere;
}

.ai-footer-text {
  max-width: 43ch;
  margin: 12px 0 0;

  color: rgba(255, 255, 255, 0.72);
  font-size: 0.9rem;
  line-height: 1.62;
  font-weight: 450;
  overflow-wrap: anywhere;
}

.ai-footer-brand .ai-footer-text:nth-of-type(2) {
  display: none;
}

.ai-footer-actions {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
  margin-top: 17px;
}

.ai-footer-btn {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;

  max-width: 100%;
  padding: 0 14px;
  border-radius: 999px;

  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 780;
  letter-spacing: 0.01em;
  white-space: nowrap;

  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    background-color 0.18s ease,
    border-color 0.18s ease,
    color 0.18s ease;
}

.ai-footer-btn:hover,
.ai-footer-btn:focus-visible {
  transform: translateY(-1px);
  outline: none;
}

.ai-footer-btn-primary {
  background: #ff0d96;
  color: #ffffff;
  border: 1px solid #ff0d96;
  box-shadow: 0 12px 26px rgba(255, 13, 150, 0.26);
}

.ai-footer-btn-primary:hover,
.ai-footer-btn-primary:focus-visible {
  background: #e20b85;
  border-color: #e20b85;
  color: #ffffff;
  box-shadow: 0 16px 34px rgba(255, 13, 150, 0.34);
}

.ai-footer-btn-secondary {
  color: #ffffff;
  background: #2a0146;
  border: 1px solid rgba(255, 13, 150, 0.38);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.20);
}

.ai-footer-btn-secondary:hover,
.ai-footer-btn-secondary:focus-visible {
  color: #ffffff;
  background: #4f0fb8;
  border-color: #ff0d96;
}

.ai-footer-contact-row {
  margin-top: 15px;
}

.ai-footer-contact-row button,
.ai-footer-actions button,
.ai-footer-brand button[data-support-open] {
  display: none !important;
}

.ai-footer-email {
  display: inline-block;
  max-width: 100%;

  color: #ff7bc8;
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.ai-footer-email:hover,
.ai-footer-email:focus-visible {
  color: #ffffff;
  text-decoration: underline;
  text-underline-offset: 3px;
  outline: none;
}

/* ================= RIGHT LINK GRID ================= */

.ai-footer-links {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  min-width: 0;
  max-width: 100%;
}

.ai-footer-col {
  position: relative;
  min-width: 0;
  min-height: 100%;
  padding: 24px;

  border-radius: 24px;
  background: #240035;
  border: 1px solid rgba(255, 13, 150, 0.22);

  box-shadow:
    0 18px 42px rgba(0, 0, 0, 0.26),
    inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

.ai-footer-col::before {
  content: "";
  position: absolute;
  left: 24px;
  right: 24px;
  top: 0;

  height: 4px;
  border-radius: 0 0 999px 999px;
  background: #ff0d96;
}

.ai-footer-col:nth-child(2)::before {
  background: #ff0d96;
}

.ai-footer-col:nth-child(3)::before {
  background: #ff0d96;
}

.ai-footer-col:nth-child(4)::before {
  background: #ff0d96;
}

.ai-footer-col h3 {
  margin: 0 0 16px;

  color: #ffffff;
  font-size: 0.98rem;
  font-weight: 850;
  letter-spacing: -0.01em;
}

.ai-footer-col ul {
  margin: 0;
  padding: 0;
  list-style: none;

  display: grid;
  gap: 12px;
}

.ai-footer-col a {
  display: inline-block;
  max-width: 100%;

  color: rgba(255, 255, 255, 0.68);
  text-decoration: none;
  font-size: 0.94rem;
  line-height: 1.35;
  font-weight: 500;
  white-space: normal;
  overflow-wrap: anywhere;

  transition:
    color 0.16s ease,
    opacity 0.16s ease,
    transform 0.16s ease;
}

.ai-footer-col a:hover,
.ai-footer-col a:focus-visible {
  color: #ff7bc8;
  transform: translateX(2px);
  outline: none;
}

/* ================= BOTTOM ================= */

.ai-footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;

  max-width: 100%;
  margin-top: 28px;
  padding-top: 18px;

  border-top: 1px solid rgba(255, 13, 150, 0.22);

  color: rgba(255, 255, 255, 0.62);
  font-size: 0.88rem;
  line-height: 1.4;
}

.ai-footer-bottom-left {
  min-width: 0;
  display: grid;
  gap: 5px;

  color: rgba(255, 255, 255, 0.62);
  font-size: 0.88rem;
  line-height: 1.5;
}

.ai-footer-bottom-left p,
.ai-footer-bottom-left span,
.ai-footer-bottom p {
  margin: 0;
  overflow-wrap: anywhere;
}

.ai-footer-trust {
  min-width: 0;

  color: rgba(255, 255, 255, 0.72);
  font-size: 0.84rem;
  text-align: center;
  overflow-wrap: anywhere;
}

.ai-footer-bottom-links {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  flex: 0 1 auto;
  min-width: 0;
  flex-wrap: wrap;
}

.ai-footer-bottom-links a {
  color: rgba(255, 255, 255, 0.62);
  text-decoration: none;
  font-size: 0.88rem;
  overflow-wrap: anywhere;
}

.ai-footer-bottom-links a:hover,
.ai-footer-bottom-links a:focus-visible {
  color: #ff7bc8;
  outline: none;
}

/* ================= RESPONSIVE ================= */

@media (max-width: 1320px) {
  .ai-footer-shell {
    width: min(1180px, calc(100% - 36px));
  }

  .ai-footer-top {
    grid-template-columns: 1fr;
  }

  .ai-footer-links {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .ai-footer-brand {
    min-height: auto;
  }

  .ai-footer-title {
    max-width: 30ch;
  }

  .ai-footer-text {
    max-width: 78ch;
  }
}

@media (max-width: 980px) {
  .ai-footer-links {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ai-footer-col {
    padding: 22px;
  }

  .ai-footer-col::before {
    left: 22px;
    right: 22px;
  }
}

@media (max-width: 640px) {
  .ai-footer {
    padding: 46px 0 22px;
  }

  .ai-footer-shell {
    width: calc(100% - 20px);
  }

  .ai-footer-brand,
  .ai-footer-col {
    padding: 20px 16px;
    border-radius: 20px;
  }

  .ai-footer-brand::before {
    top: 20px;
    bottom: 20px;
  }

  .ai-footer-col::before {
    left: 16px;
    right: 16px;
  }

  .ai-footer-logo-image {
    width: 40px;
    height: 40px;
  }

  .ai-footer-title {
    max-width: 100%;
    font-size: clamp(1.45rem, 7vw, 1.95rem);
  }

  .ai-footer-text {
    max-width: 100%;
    font-size: 0.9rem;
    line-height: 1.6;
  }

  .ai-footer-actions {
    flex-direction: column;
  }

  .ai-footer-btn {
    width: 100%;
    min-height: 44px;
    font-size: 0.8rem;
    white-space: normal;
    text-align: center;
  }

  .ai-footer-links {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .ai-footer-col h3 {
    font-size: 0.96rem;
  }

  .ai-footer-col a {
    font-size: 0.93rem;
  }

  .ai-footer-email {
    font-size: 0.9rem;
  }

  .ai-footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    white-space: normal;
  }

  .ai-footer-trust {
    text-align: left;
  }

  .ai-footer-bottom-links {
    width: 100%;
    gap: 10px 12px;
  }
}