/* ==========================================
   CLOUDMATE FOOTER - REDESIGNED
========================================== */

.cm-footer {
  position: relative;
  width: 100%;
  overflow: hidden;

  background: #f4f8ff;
  border-top: 1px solid #e4edfa;

  color: var(--brand-ink);
  font-family: "Poppins", "Inter", sans-serif;
}

.cm-footer *,
.cm-footer *::before,
.cm-footer *::after {
  box-sizing: border-box;
}

/* SUBTLE BACKGROUND DECORATION */

.cm-footer::before {
  content: "";
  position: absolute;

  width: 450px;
  height: 450px;

  top: -300px;
  right: -160px;

  border-radius: 50%;
  background: #e8f0ff;

  pointer-events: none;
}

.cm-footer::after {
  content: "";
  position: absolute;

  width: 360px;
  height: 360px;

  bottom: -300px;
  left: -180px;

  border-radius: 50%;
  background: #e8f0ff;

  pointer-events: none;
}

/* ==========================================
   CONTAINER
========================================== */

.cm-footer-container {
  position: relative;
  z-index: 1;

  width: min(100% - 80px, 1440px);
  margin: 0 auto;

  padding: 55px 0 0;
}

/* ==========================================
   SUPPORT BANNER
========================================== */

.cm-footer-support-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 30px;

  padding: 24px 28px 24px 35px;

  background: rgba(255, 255, 255, 0.93);
  border: 1px solid #d5e3fa;
  border-radius: 18px;

  box-shadow: 0 12px 35px rgba(31, 87, 160, 0.055);
}

.cm-footer-support-left {
  display: flex;
  align-items: center;
  gap: 24px;

  min-width: 0;
}

.cm-footer-support-icon {
  width: 76px;
  height: 76px;

  flex: 0 0 76px;

  display: flex;
  align-items: center;
  justify-content: center;

  background: #e2efff;
  color: #0869ed;

  border-radius: 15px;
  font-size: 30px;
}

.cm-footer-support-text {
  border-left: 1px solid #d6e3f5;
  padding-left: 26px;
}

.cm-footer-support-text h3 {
  margin: 0 0 7px;

  color: #101c3f;
  font-size: clamp(18px, 1.7vw, 26px);
  font-weight: 700;
  letter-spacing: -0.6px;
  line-height: 1.3;
}

.cm-footer-support-text p {
  margin: 0;

  color: #627493;
  font-size: 15px;
  line-height: 1.5;
}

/* SUPPORT BUTTON */

.cm-footer-support-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 16px;

  flex-shrink: 0;

  min-height: 54px;
  padding: 0 28px;

  background: #0865f4;
  color: #ffffff;

  border: 1px solid #0865f4;
  border-radius: 10px;

  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;

  transition:
    background 0.2s ease,
    transform 0.2s ease;
}

.cm-footer-support-btn:hover {
  background: #0754d0;
  color: #ffffff;
  transform: translateY(-2px);
}

.cm-footer-support-btn i {
  font-size: 14px;
}

/* ==========================================
   MAIN FOOTER GRID
========================================== */

.cm-footer-main {
  display: grid;

  grid-template-columns:
    minmax(280px, 1.75fr)
    repeat(4, minmax(0, 1fr));

  column-gap: 45px;
  row-gap: 40px;

  padding: 75px 5px 65px;
}

/* ==========================================
   BRAND COLUMN
========================================== */

.cm-footer-brand {
  min-width: 0;
  max-width: 360px;

  padding-right: 32px;
  border-right: 1px solid #d6e2f2;
}

.cm-footer-logo {
  display: inline-flex;
  align-items: center;

  margin-bottom: 24px;
  text-decoration: none;
}

.cm-footer-logo img {
  display: block;

  width: 210px;
  max-width: 100%;
  height: auto;
}

.cm-footer-brand p {
  max-width: 320px;
  margin: 0 0 24px;

  color: #627493;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.8;
}

/* EMAIL */

.cm-footer-email {
  display: inline-flex;
  align-items: center;
  gap: 12px;

  color: #0869ed;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;

  overflow-wrap: anywhere;
}

.cm-footer-email:hover {
  color: #054db5;
}

.cm-footer-email i {
  font-size: 17px;
}

/* ==========================================
   SOCIAL ICONS
========================================== */

.cm-footer-social {
  display: flex;
  align-items: center;
  flex-wrap: wrap;

  gap: 10px;
  margin-top: 30px;
}

.cm-footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: 39px;
  height: 39px;

  background: #ffffff;
  border: 1px solid #d8e4f5;
  border-radius: 9px;

  color: #1d3760;
  font-size: 16px;
  text-decoration: none;

  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease,
    transform 0.2s ease;
}

.cm-footer-social a:hover {
  background: #e9f2ff;
  border-color: #8ebdff;
  color: #0869ed;
  transform: translateY(-2px);
}

/* ==========================================
   NAVIGATION COLUMNS
========================================== */

.cm-footer-column {
  min-width: 0;
}

.cm-footer-column h4 {
  margin: 4px 0 26px;

  color: #101c3f;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
}

.cm-footer-column ul {
  margin: 0;
  padding: 0;

  list-style: none;
}

.cm-footer-column li {
  margin-bottom: 19px;
}

.cm-footer-column li:last-child {
  margin-bottom: 0;
}

.cm-footer-column a {
  display: inline-block;

  color: #627493;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
  text-decoration: none;

  transition:
    color 0.2s ease,
    transform 0.2s ease;
}

.cm-footer-column a:hover {
  color: #0869ed;
  transform: translateX(3px);
}

/* ==========================================
   FOOTER BOTTOM
========================================== */

.cm-footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 24px;

  min-height: 95px;
  padding: 25px 5px;

  border-top: 1px solid #d6e2f2;
}

.cm-footer-copyright {
  margin: 0;

  color: #627493;
  font-size: 13px;
  line-height: 1.6;
}

.cm-footer-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;

  gap: 0;
}

.cm-footer-links a {
  color: #627493;
  font-size: 13px;
  text-decoration: none;

  transition: color 0.2s ease;
}

.cm-footer-links a:hover {
  color: #0869ed;
}

.cm-footer-links a + a {
  margin-left: 24px;
  padding-left: 24px;

  border-left: 1px solid #aebfd8;
}

/* ==========================================
   SMALL DESKTOP
========================================== */

@media (max-width: 1200px) {
  .cm-footer-container {
    width: min(100% - 60px, 1100px);
  }

  .cm-footer-main {
    grid-template-columns:
      minmax(220px, 1.5fr)
      repeat(4, minmax(0, 1fr));

    column-gap: 25px;
  }

  .cm-footer-brand {
    padding-right: 20px;
  }

  .cm-footer-column h4 {
    font-size: 14px;
  }

  .cm-footer-column a {
    font-size: 12px;
  }

  .cm-footer-brand p {
    font-size: 13px;
  }
}

/* ==========================================
   TABLET
========================================== */

@media (max-width: 950px) {
  .cm-footer-main {
    grid-template-columns: repeat(4, minmax(0, 1fr));

    column-gap: 24px;
    row-gap: 40px;

    padding-top: 55px;
  }

  .cm-footer-brand {
    grid-column: 1 / -1;

    max-width: 100%;
    padding-right: 0;
    padding-bottom: 30px;

    border-right: none;
    border-bottom: 1px solid #d6e2f2;
  }

  .cm-footer-brand p {
    max-width: 450px;
  }

  .cm-footer-support-banner {
    padding: 22px;
  }

  .cm-footer-support-left {
    gap: 15px;
  }

  .cm-footer-support-text {
    padding-left: 15px;
  }

  .cm-footer-support-icon {
    width: 60px;
    height: 60px;
    flex-basis: 60px;
    font-size: 24px;
  }

  .cm-footer-support-text h3 {
    font-size: 19px;
  }

  .cm-footer-support-btn {
    min-height: 48px;
    padding: 0 18px;
    font-size: 12px;
  }
}

/* ==========================================
   MOBILE
========================================== */

@media (max-width: 650px) {
  .cm-footer-container {
    width: calc(100% - 36px);
    padding-top: 35px;
  }

  /* SUPPORT BANNER */

  .cm-footer-support-banner {
    flex-direction: column;
    align-items: stretch;

    gap: 22px;
    padding: 22px;

    border-radius: 14px;
  }

  .cm-footer-support-left {
    align-items: flex-start;
    gap: 13px;
  }

  .cm-footer-support-icon {
    width: 50px;
    height: 50px;
    flex-basis: 50px;

    border-radius: 11px;
    font-size: 21px;
  }

  .cm-footer-support-text {
    border-left: none;
    padding-left: 0;
  }

  .cm-footer-support-text h3 {
    font-size: 17px;
    letter-spacing: -0.3px;
  }

  .cm-footer-support-text p {
    font-size: 13px;
  }

  .cm-footer-support-btn {
    width: 100%;
    min-height: 48px;
    font-size: 13px;
  }

  /* MAIN GRID */

  .cm-footer-main {
    grid-template-columns: repeat(2, minmax(0, 1fr));

    gap: 36px 20px;
    padding: 48px 0 45px;
  }

  .cm-footer-brand {
    grid-column: 1 / -1;
    padding-bottom: 28px;
  }

  .cm-footer-logo {
    margin-bottom: 18px;
  }

  .cm-footer-logo img {
    width: 190px;
  }

  .cm-footer-brand p {
    font-size: 13px;
    margin-bottom: 20px;
  }

  .cm-footer-email {
    font-size: 13px;
  }

  .cm-footer-social {
    margin-top: 24px;
  }

  .cm-footer-social a {
    width: 36px;
    height: 36px;
    font-size: 14px;
  }

  .cm-footer-column h4 {
    font-size: 14px;
    margin-bottom: 20px;
  }

  .cm-footer-column li {
    margin-bottom: 15px;
  }

  .cm-footer-column a {
    font-size: 12px;
  }

  /* BOTTOM */

  .cm-footer-bottom {
    flex-direction: column;
    align-items: flex-start;

    gap: 18px;
    padding: 25px 0 35px;
  }

  .cm-footer-copyright,
  .cm-footer-links a {
    font-size: 11px;
  }

  .cm-footer-links a + a {
    margin-left: 12px;
    padding-left: 12px;
  }
}

/* ==========================================
   VERY SMALL MOBILE
========================================== */

@media (max-width: 380px) {
  .cm-footer-main {
    column-gap: 15px;
  }

  .cm-footer-column h4 {
    font-size: 13px;
  }

  .cm-footer-column a {
    font-size: 11px;
  }

  .cm-footer-links {
    row-gap: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cm-footer a {
    transition: none;
  }
}

/* Small screens: the legal links wrap, so space them evenly without dividers */
@media (max-width: 600px) {
  .cm-footer-links {
    gap: 8px 18px;
  }

  .cm-footer-links a + a {
    margin-left: 0;
    padding-left: 0;
    border-left: 0;
  }
}
