/* ==========================================================================
   KRAFTING DIGITAL — GLOBAL FOOTER (FOOTER.CSS)
   Single source of truth for the footer on every page.
   Loaded LAST in <head> so it wins over main.css, responsive.css and the
   legacy assets/css/style.css that some pages still include.
   ========================================================================== */

.site-footer {
  position: relative;
  z-index: 10;
  background: var(--kd-bg-secondary, #0F111A);
  border-top: 1px solid var(--kd-border-medium, rgba(255, 255, 255, 0.14));
  padding: 5rem 0 2.25rem;
  margin-top: 6rem;
  color: var(--kd-text-secondary, #CBD5E1);
  font-family: var(--kd-font-body, 'Plus Jakarta Sans', sans-serif);
  text-align: left;
  overflow: hidden;
}

.site-footer .container-custom {
  width: 100%;
  max-width: var(--kd-container-max, 1320px);
  margin: 0 auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

/* ---------- Top grid (desktop: 4 columns) ---------- */
.site-footer .footer-top-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.8fr) minmax(0, 1fr) minmax(0, 1.4fr);
  gap: 3rem;
  align-items: start;
  margin-bottom: 3.5rem;
}

.site-footer .footer-brand,
.site-footer .footer-col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
}

/* ---------- Brand ---------- */
.site-footer .footer-brand .brand-logo {
  display: inline-flex;
  align-items: center;
  margin: 0 0 1.25rem;
}

.site-footer .footer-brand .brand-logo-img {
  display: block;
  height: 64px;
  width: auto;
  max-width: 180px;
  object-fit: contain;
}

.site-footer .footer-brand p {
  margin: 0 0 1.5rem;
  max-width: 340px;
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--kd-text-secondary, #CBD5E1);
}

.site-footer .footer-socials {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin: 0;
}

.site-footer .social-icon-btn {
  width: 42px;
  height: 42px;
  border-radius: var(--kd-radius-sm, 8px);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--kd-border-subtle, rgba(255, 255, 255, 0.08));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--kd-text-secondary, #CBD5E1);
  font-size: 1.05rem;
  text-decoration: none;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease,
    border-color 0.2s ease, box-shadow 0.2s ease;
}

.site-footer .social-icon-btn:hover,
.site-footer .social-icon-btn:focus-visible {
  background: var(--kd-accent-primary, #6366F1);
  border-color: var(--kd-accent-primary, #6366F1);
  color: #fff;
  box-shadow: 0 4px 18px rgba(99, 102, 241, 0.4);
  transform: translateY(-3px);
}

/* ---------- Column headings & links ---------- */
.site-footer .footer-col h4 {
  margin: 0 0 1.5rem;
  padding: 0;
  font-family: var(--kd-font-display, 'Space Grotesk', sans-serif);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.3;
  color: var(--kd-text-primary, #F8FAFC);
}

.site-footer .footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-footer .footer-links li {
  margin: 0;
  padding: 0;
}

.site-footer .footer-links a {
  display: inline-block;
  color: var(--kd-text-secondary, #CBD5E1);
  font-size: 0.92rem;
  line-height: 1.45;
  text-decoration: none;
  transition: color 0.2s ease, transform 0.2s ease;
}

.site-footer .footer-links a:hover,
.site-footer .footer-links a:focus-visible {
  color: var(--kd-text-primary, #F8FAFC);
  transform: translateX(4px);
}

/* ---------- Contact items ---------- */
.site-footer .footer-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 0 0 1rem;
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--kd-text-secondary, #CBD5E1);
  min-width: 0;
}

.site-footer .footer-contact-item:last-child {
  margin-bottom: 0;
}

.site-footer .footer-contact-item > i,
.site-footer .footer-contact-item > svg {
  flex: 0 0 18px;
  width: 18px;
  margin-top: 3px;
  font-size: 0.95rem;
  text-align: center;
  color: var(--kd-accent-primary, #6366F1);
  transition: color 0.2s ease;
}

.site-footer .footer-contact-item:hover > i,
.site-footer .footer-contact-item:hover > svg {
  color: var(--kd-accent-cyan, #06B6D4);
}

.site-footer .footer-contact-item > div {
  min-width: 0;
  overflow-wrap: anywhere;
}

.site-footer .footer-contact-item a {
  color: var(--kd-text-secondary, #CBD5E1);
  text-decoration: none;
  transition: color 0.2s ease;
}

.site-footer .footer-contact-item a:hover {
  color: var(--kd-text-primary, #F8FAFC);
}

/* ---------- Bottom bar ---------- */
.site-footer .footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
  margin: 0;
  padding-top: 2rem;
  border-top: 1px solid var(--kd-border-subtle, rgba(255, 255, 255, 0.08));
  font-size: 0.88rem;
  color: var(--kd-text-muted, #94A3B8);
}

.site-footer .footer-bottom-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.75rem;
}

.site-footer .footer-bottom a {
  margin: 0;
  color: var(--kd-text-secondary, #CBD5E1);
  text-decoration: none;
  transition: color 0.2s ease;
}

.site-footer .footer-bottom a:hover {
  color: var(--kd-text-primary, #F8FAFC);
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

/* Small laptops (992px – 1199px): tighten the 4-column grid */
@media (max-width: 1199px) {
  .site-footer .footer-top-grid {
    gap: 2rem;
  }

  .site-footer .footer-brand p {
    max-width: 280px;
  }
}

/* Tablets (768px – 991px): brand full width, 3 columns below */
@media (max-width: 991px) {
  .site-footer {
    padding-top: 4rem;
    margin-top: 4.5rem;
  }

  .site-footer .footer-top-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2.5rem 2rem;
    margin-bottom: 3rem;
  }

  .site-footer .footer-brand {
    grid-column: 1 / -1;
  }

  .site-footer .footer-brand p {
    max-width: 520px;
  }
}

/* Phones (< 768px): centered, stacked layout with links side by side */
@media (max-width: 767px) {
  .site-footer {
    padding: 3.5rem 0 2rem;
    margin-top: 3.5rem;
    text-align: center;
  }

  .site-footer .container-custom {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }

  .site-footer .footer-top-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2.25rem 1.25rem;
    margin-bottom: 2.5rem;
  }

  .site-footer .footer-brand,
  .site-footer .footer-col {
    align-items: center;
    text-align: center;
  }

  .site-footer .footer-brand,
  .site-footer .footer-col-contact {
    grid-column: 1 / -1;
  }

  .site-footer .footer-brand .brand-logo-img {
    height: 56px;
    max-width: 150px;
  }

  .site-footer .footer-brand p {
    max-width: 340px;
    margin-left: auto;
    margin-right: auto;
    font-size: 0.92rem;
  }

  .site-footer .footer-socials {
    justify-content: center;
  }

  .site-footer .footer-col h4 {
    margin-bottom: 1.1rem;
  }

  .site-footer .footer-links {
    align-items: center;
    gap: 0.75rem;
  }

  .site-footer .footer-links a:hover,
  .site-footer .footer-links a:focus-visible {
    transform: none;
    color: var(--kd-accent-cyan, #06B6D4);
  }

  .site-footer .footer-col-contact {
    padding-top: 2rem;
    border-top: 1px solid var(--kd-border-subtle, rgba(255, 255, 255, 0.08));
  }

  .site-footer .footer-contact-item {
    flex-direction: column;
    align-items: center;
    gap: 6px;
    max-width: 300px;
    margin: 0 auto 1.25rem;
    text-align: center;
  }

  .site-footer .footer-contact-item > i,
  .site-footer .footer-contact-item > svg {
    flex: none;
    margin-top: 0;
    font-size: 1.05rem;
  }

  .site-footer .footer-bottom {
    flex-direction: column;
    justify-content: center;
    gap: 0.85rem;
    padding-top: 1.75rem;
    text-align: center;
  }

  .site-footer .footer-bottom-links {
    justify-content: center;
    gap: 0.5rem 1.25rem;
  }
}

/* Very small phones (<= 360px): single column */
@media (max-width: 360px) {
  .site-footer .footer-top-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 2rem;
  }

  .site-footer .footer-links a,
  .site-footer .footer-contact-item {
    font-size: 0.88rem;
  }
}
