/* =========================================================
   FOOTER CSS
   footer.css_1.4
   - Premium global footer
   - Sticky footer layout support
========================================================= */

/* =========================================================
   STICKY FOOTER LAYOUT
   - Footer'ı kısa sayfalarda alta iter.
   - position: fixed kullanmaz.
========================================================= */

.layout.has-sidebar.fixed-sidebar.fixed-header .content {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.layout.has-sidebar.fixed-sidebar.fixed-header
  .content
  > .container-fluid.py-4 {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.layout.has-sidebar.fixed-sidebar.fixed-header
  .content
  > .container-fluid.py-4
  > .site-footer {
  margin-top: auto;
}

.site-footer {
  width: 100%;
  margin-top: auto;
  padding: var(--spacing-xl) var(--spacing-lg) var(--spacing-lg);
}

.site-footer-inner {
  width: 100%;
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 1.75rem 2rem;

  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.025), transparent),
    var(--panel-bg);
  border: 1px solid var(--border-subtle);
  border-top: 1px solid rgba(216, 182, 106, 0.28);
  border-radius: var(--border-radius-xl);
  box-shadow: var(--shadow-md);

  display: flex;
  flex-direction: column;
  gap: 1.35rem;

  transition:
    background-color 0.25s ease,
    border-color 0.25s ease,
    box-shadow 0.25s ease;
}

.site-footer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--spacing-lg);
}

.site-footer-brand {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  min-width: 0;
}

.site-footer-logo {
  width: 46px;
  height: 46px;
  flex: 0 0 46px;

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

  color: var(--sidebar-accent);

  background:
    radial-gradient(
      circle at 30% 20%,
      rgba(216, 182, 106, 0.22),
      transparent 60%
    ),
    var(--card-bg);
  border: 1px solid rgba(216, 182, 106, 0.18);
  border-radius: 14px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.site-footer-logo img {
  width: 26px;
  height: 26px;
  object-fit: contain;
  display: block;
}

.site-footer-title {
  color: var(--text-primary);
  font-size: 1.05rem;
  font-weight: var(--font-weight-bold);
  line-height: 1.25;
}

.site-footer-description {
  color: var(--text-secondary);
  font-size: var(--font-size-sm);
  line-height: 1.5;
  margin-top: 0.2rem;
}

.site-footer-version {
  color: var(--sidebar-accent);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  padding: 0.35rem 0.65rem;
  background-color: rgba(216, 182, 106, 0.08);
  border: 1px solid rgba(216, 182, 106, 0.16);
  border-radius: var(--border-radius-pill);
  white-space: nowrap;
}

.site-footer-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.35rem;
  padding: 0.9rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.055);
  border-bottom: 1px solid rgba(255, 255, 255, 0.055);
  flex-wrap: wrap;
}

.site-footer-links a {
  position: relative;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  transition: color 0.2s ease;
}

.site-footer-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.35rem;
  width: 100%;
  height: 1px;
  background-color: var(--sidebar-accent);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.2s ease;
}

.site-footer-links a:hover {
  color: var(--text-primary);
}

.site-footer-links a:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.site-footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--spacing-lg);
}

.site-footer-socials {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
  color: var(--text-secondary);
  font-size: var(--font-size-sm);
}

.site-footer-socials a {
  color: var(--text-secondary);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: color 0.2s ease;
}

.site-footer-socials a i {
  color: var(--sidebar-accent);
  font-size: 1rem;
}

.site-footer-socials a:hover {
  color: var(--text-primary);
}

.site-footer-copy {
  color: var(--text-secondary);
  font-size: var(--font-size-xs);
  white-space: nowrap;
  opacity: 0.75;
}

/* =========================================================
   LIGHT MODE TUNING
========================================================= */

html[data-theme="light"] .site-footer-inner {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.22), transparent),
    var(--panel-bg);
  border-top-color: rgba(169, 129, 59, 0.32);
}

html[data-theme="light"] .site-footer-links {
  border-top-color: rgba(0, 0, 0, 0.07);
  border-bottom-color: rgba(0, 0, 0, 0.07);
}

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

@media (max-width: 768px) {
  .site-footer-inner {
    padding: 1.4rem;
  }

  .site-footer-top,
  .site-footer-bottom {
    flex-direction: column;
    text-align: center;
  }

  .site-footer-brand {
    flex-direction: column;
    text-align: center;
  }

  .site-footer-links {
    gap: 1rem;
  }

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

  .site-footer-copy {
    white-space: normal;
  }
}

@media (max-width: 480px) {
  .site-footer {
    padding: var(--spacing-xl) var(--spacing-md) var(--spacing-md);
  }

  .site-footer-links {
    flex-direction: column;
  }

  .site-footer-socials span {
    display: none;
  }

  .site-footer-socials {
    flex-direction: column;
  }
}

/* =========================================================
   FOOTER ATTRIBUTION
   footer.css_1.4 addition
========================================================= */

.site-footer-attribution {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  color: var(--text-secondary);
  font-size: var(--font-size-xs);
  opacity: 0.85;
}

.site-footer-attribution img {
  height: 13px;
  width: auto;
  display: block;
  opacity: 0.9;
}

.site-footer-attribution:hover {
  opacity: 1;
}

@media (max-width: 480px) {
  .site-footer-attribution {
    flex-direction: column;
  }

  .site-footer-attribution img {
    height: 12px;
  }
}
