/**
 * DEJOIY Global Footer.
 * Premium marketplace footer — dark slate, violet/pink brand accents.
 */

.dgf {
  --dgf-ink: #0f172a;
  --dgf-ink-2: #101b36;
  --dgf-violet: #7c3aed;
  --dgf-pink: #ec4899;
  --dgf-text: #cbd5e1;
  --dgf-muted: #7d8aa5;
  --dgf-line: rgba(148, 163, 184, 0.14);
  position: relative;
  z-index: 20;
  background: linear-gradient(180deg, var(--dgf-ink) 0%, #0b1326 100%);
  color: var(--dgf-text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  border-top: 2px solid transparent;
  border-image: linear-gradient(90deg, var(--dgf-violet), var(--dgf-pink), #f59e0b) 1;
}

.dgf__inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 3.5rem) clamp(1rem, 4vw, 2rem) 1.5rem;
}

/* ===== Top grid ===== */
.dgf__top {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: clamp(1.25rem, 3vw, 2rem);
}

.dgf__brand {
  grid-column: span 4;
}

.dgf__col {
  grid-column: span 2;
}

.dgf__logo {
  display: inline-flex;
  align-items: center;
  font-size: 1.7rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  background: linear-gradient(120deg, #ffffff 0%, #d8c6ff 45%, var(--dgf-pink) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  text-decoration: none;
}

.dgf__tag {
  margin: 0.75rem 0 1.1rem;
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--dgf-muted);
  max-width: 30ch;
}

.dgf__contact {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.86rem;
  color: var(--dgf-muted);
}

.dgf__contact a {
  color: var(--dgf-text);
  text-decoration: none;
}

.dgf__contact a:hover {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.dgf__title {
  margin: 0 0 0.9rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: #a78bfa;
}

.dgf__list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.dgf__link {
  color: var(--dgf-text);
  font-size: 0.9rem;
  text-decoration: none;
  transition: color 0.15s ease;
}

.dgf__link:hover {
  color: #ffffff;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.dgf__link--all {
  color: #fbbf24;
  font-weight: 600;
}

.dgf__link--all:hover {
  color: #fde68a;
}

/* ===== Trust row ===== */
.dgf__trust {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  margin: clamp(1.75rem, 4vw, 2.75rem) 0 0;
  border: 1px solid var(--dgf-line);
  border-radius: 14px;
  overflow: hidden;
  background: var(--dgf-line);
}

.dgf__trust-item {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.95rem 1rem;
  background: var(--dgf-ink-2);
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--dgf-text);
  text-align: center;
}

.dgf__trust-item::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--dgf-violet), var(--dgf-pink));
  flex: 0 0 auto;
}

/* ===== Bottom bar ===== */
.dgf__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--dgf-line);
  font-size: 0.84rem;
  color: var(--dgf-muted);
}

.dgf__meta {
  display: inline-flex;
  gap: 1.1rem;
}

/* ===== Responsive ===== */
@media (max-width: 1100px) {
  .dgf__brand {
    grid-column: span 12;
  }
  .dgf__col {
    grid-column: span 3;
  }
}

@media (max-width: 768px) {
  .dgf__brand {
    grid-column: span 12;
  }
  .dgf__col {
    grid-column: span 6;
  }
  .dgf__trust {
    grid-template-columns: repeat(2, 1fr);
  }
  .dgf__logo-img {
    height: 46px;
    width: auto;
    max-width: 150px;
  }
}

@media (max-width: 560px) {
  .dgf__brand {
    grid-column: span 12;
  }
  .dgf__logo-img {
    height: 40px;
    width: auto;
    max-width: 132px;
  }
  .dgf__tag {
    font-size: 0.82rem;
    line-height: 1.45;
  }
  .dgf__title {
    font-size: 0.82rem;
    margin-bottom: 0.55rem;
  }
  .dgf__link {
    font-size: 0.8rem;
  }
  .dgf__trust-item {
    font-size: 0.8rem;
    padding: 0.85rem 0.6rem;
  }
  .dgf__bottom {
    flex-direction: column;
    align-items: flex-start;
  }
  /* Clear floating mobile bottom nav */
  .dgf {
    padding-bottom: calc(2rem + 56px);
  }
  /* Compact phone layout: 2x2 column grid */
  .dgf__col {
    grid-column: span 6;
    padding: 0.35rem 0.4rem;
  }
}

/* ===== Expandable footer columns on phones (accordion) ===== */
@media (min-width: 561px) {
  .dgf__list {
    max-height: none;
    opacity: 1;
  }
  .dgf__col {
    border: none;
  }
  .dgf__title {
    cursor: default;
  }
  .dgf__title::after {
    display: none;
  }
}

@media (max-width: 560px) {
  .dgf__col {
    grid-column: span 12;
    padding: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .dgf__title {
    margin: 0;
    cursor: pointer;
    padding: 0.8rem 0.35rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
  }

  .dgf__title::after {
    content: "+";
    flex-shrink: 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: #fbbf24;
    transition: transform 0.2s ease;
  }

  .dgf__col.is-open .dgf__title::after {
    transform: rotate(45deg);
  }

  .dgf__list {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    margin: 0;
    transition: max-height 0.34s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.24s ease, visibility 0.34s ease;
  }

  .dgf__col.is-open .dgf__list {
    max-height: 340px;
    opacity: 1;
    visibility: visible;
    padding-bottom: 0.9rem;
  }
}
/* Footer logo sizing (caps enforced after all theme rules) */
.dgf__logo-img {
  width: 190px;
  max-width: 190px;
  height: auto;
  max-height: 64px;
  object-fit: contain;
}
@media (max-width: 560px) {
  .dgf__logo-img {
    width: 130px;
    max-width: 130px;
    max-height: 44px;
  }
}
