/* Footer üst bar — site paleti (--site-*) */
.site-footer__topbar {
  border-bottom: 1px solid rgba(255, 30, 30, 0.1);
  background: var(--site-raised-gradient);
  box-shadow:
    inset 0 1px 0 rgba(255, 30, 30, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.site-footer__topbar-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.875rem 1.25rem;
  width: 100%;
  min-width: 0;
  max-width: 80rem;
  margin-inline: auto;
  padding: 0.875rem 1rem;
}

@media (min-width: 640px) {
  .site-footer__topbar-inner {
    flex-wrap: nowrap;
    gap: 1rem 1.5rem;
    padding: 1rem 1.5rem;
  }
}

@media (min-width: 1280px) {
  .site-footer__topbar-inner {
    padding: 1.125rem 2rem;
  }
}

.site-footer__topbar-start {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  gap: 0.625rem 0.875rem;
  min-width: 0;
}

@media (min-width: 640px) {
  .site-footer__topbar-start {
    flex: 0 1 auto;
    gap: 0.75rem 1rem;
  }
}

.site-footer__topbar-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  transition: opacity 0.15s ease;
}

.site-footer__topbar-logo:hover {
  opacity: 0.88;
}

.site-footer__topbar-logo-box {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  height: 2.5rem;
  max-width: 9.5rem;
  overflow: hidden;
}

@media (min-width: 640px) {
  .site-footer__topbar-logo-box {
    height: 2.75rem;
    max-width: 10.5rem;
  }
}

.site-footer__topbar-logo-box img {
  display: block;
  width: auto;
  max-width: 100%;
  height: 100%;
  max-height: 2.5rem;
  object-fit: contain;
  object-position: left center;
}

@media (min-width: 640px) {
  .site-footer__topbar-logo-box img {
    max-height: 2.75rem;
  }
}

.site-footer__locale {
  position: relative;
  flex-shrink: 0;
}

.site-footer__locale > summary {
  display: inline-flex;
  list-style: none;
  cursor: pointer;
  align-items: center;
  gap: 0.4rem;
  border-radius: 0.5rem;
  border: 1px solid var(--site-border-soft);
  background: var(--site-panel-gradient);
  padding: 0.4rem 0.6rem;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--site-text-muted);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition:
    border-color 0.15s ease,
    background 0.15s ease,
    color 0.15s ease,
    box-shadow 0.15s ease;
}

@media (min-width: 640px) {
  .site-footer__locale > summary {
    padding: 0.45rem 0.65rem;
    font-size: 0.75rem;
  }
}

.site-footer__locale > summary::-webkit-details-marker {
  display: none;
}

.site-footer__locale > summary:hover,
.site-footer__locale[open] > summary {
  border-color: rgba(255, 30, 30, 0.32);
  color: var(--site-text);
  background: var(--site-surface-gradient);
}

.site-footer__locale-flag {
  display: inline-flex;
  width: 1rem;
  height: 1rem;
  align-items: center;
  justify-content: center;
  font-size: 0.8125rem;
  line-height: 1;
}

.site-footer__locale-chevron {
  width: 0.6875rem;
  height: 0.6875rem;
  color: var(--site-text-soft);
  transition: transform 0.2s ease, color 0.15s ease;
}

.site-footer__locale[open] .site-footer__locale-chevron {
  transform: rotate(180deg);
  color: var(--site-text-muted);
}

.site-footer__locale-menu {
  position: absolute;
  left: 0;
  top: calc(100% + 0.35rem);
  z-index: 30;
  min-width: 9.25rem;
  overflow: hidden;
  border-radius: 0.625rem;
  border: 1px solid var(--site-border-soft);
  background: var(--site-surface-gradient);
  padding: 0.25rem;
  box-shadow: 0 16px 40px -12px rgba(0, 0, 0, 0.45);
}

.site-footer__locale-option {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 0.5rem;
  border: none;
  border-radius: 0.375rem;
  background: transparent;
  padding: 0.5rem 0.625rem;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--site-text-soft);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.site-footer__locale-option:hover {
  background: rgba(22, 119, 255, 0.1);
  color: var(--site-text);
}

.site-footer__locale-option[aria-pressed="true"] {
  background: rgba(22, 119, 255, 0.16) !important;
  color: var(--site-text) !important;
}

.site-footer__locale-option[aria-pressed="false"] {
  color: var(--site-text-soft) !important;
}

.site-footer__topbar-end {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.625rem 0.875rem;
  width: 100%;
  min-width: 0;
}

@media (min-width: 640px) {
  .site-footer__topbar-end {
    flex: 0 0 auto;
    width: auto;
    justify-content: flex-end;
    margin-left: auto;
    gap: 0.75rem 1rem;
  }
}

.site-footer__topbar-follow {
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--site-accent-red-bright, #ff6b6b);
  white-space: nowrap;
}

@media (min-width: 640px) {
  .site-footer__topbar-follow {
    font-size: 0.6875rem;
    letter-spacing: 0.16em;
  }
}

.site-footer__topbar-social {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.375rem;
}

@media (min-width: 640px) {
  .site-footer__topbar-social {
    gap: 0.5rem;
  }
}

.site-footer__topbar-social-link {
  display: inline-flex;
  width: 2.25rem;
  height: 2.25rem;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;
  border: 1px solid var(--site-border-soft);
  background: var(--site-deep);
  color: var(--site-text-soft);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
  transition:
    border-color 0.15s ease,
    background 0.15s ease,
    color 0.15s ease,
    transform 0.15s ease,
    box-shadow 0.15s ease;
}

@media (min-width: 640px) {
  .site-footer__topbar-social-link {
    width: 2.5rem;
    height: 2.5rem;
  }
}

.site-footer__topbar-social-link svg {
  width: 1rem;
  height: 1rem;
}

@media (min-width: 640px) {
  .site-footer__topbar-social-link svg {
    width: 1.125rem;
    height: 1.125rem;
  }
}

.site-footer__topbar-social-link:hover {
  border-color: rgba(255, 30, 30, 0.38);
  background: rgba(255, 30, 30, 0.12);
  color: #fff;
  transform: translateY(-1px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 6px 18px -8px rgba(255, 30, 30, 0.22);
}

/* Mobil — iki satır: logo+dil / takip+sosyal */
@media (max-width: 639px) {
  .site-footer__topbar-inner {
    flex-direction: column;
    align-items: stretch;
  }

  .site-footer__topbar-start {
    justify-content: space-between;
    width: 100%;
  }

  .site-footer__topbar-end {
    padding-top: 0.75rem;
    border-top: 1px solid var(--site-border-soft);
  }

  .site-footer__topbar-social {
    margin-left: auto;
  }
}

@media (max-width: 380px) {
  .site-footer__topbar-logo-box {
    max-width: 7.5rem;
    height: 2.25rem;
  }

  .site-footer__topbar-logo-box img {
    max-height: 2.25rem;
  }

  .site-footer__topbar-follow {
    font-size: 0.5625rem;
    letter-spacing: 0.12em;
  }

  .site-footer__topbar-social-link {
    width: 2.125rem;
    height: 2.125rem;
  }
}

/* Açık tema */
[data-theme="light"] .site-footer__topbar {
  background: var(--site-raised-gradient);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

[data-theme="light"] .site-footer__locale > summary {
  background: var(--site-surface-gradient);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

[data-theme="light"] .site-footer__locale > summary:hover,
[data-theme="light"] .site-footer__locale[open] > summary {
  background: #fff;
  border-color: rgba(255, 30, 30, 0.28);
}

[data-theme="light"] .site-footer__locale-menu {
  box-shadow: 0 16px 40px -12px rgba(22, 119, 255, 0.16);
}

[data-theme="light"] .site-footer__locale-option[aria-pressed="true"] {
  background: rgba(255, 30, 30, 0.1) !important;
  color: var(--site-text) !important;
}

[data-theme="light"] .site-footer__locale-option:hover {
  background: rgba(255, 30, 30, 0.07);
}

[data-theme="light"] .site-footer__topbar-follow {
  color: #ff1e1e;
}

[data-theme="light"] .site-footer__topbar-social-link {
  background: var(--site-surface-gradient);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

[data-theme="light"] .site-footer__topbar-social-link:hover {
  border-color: rgba(255, 30, 30, 0.3);
  background: rgba(255, 30, 30, 0.08);
  color: #ff1e1e;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 6px 18px -8px rgba(255, 30, 30, 0.12);
}
