body {
  margin: 0;
  padding: 0;
}

.footer {
  width: 100%;
  height: 222px;
  background: transparent;
  padding: 0 112px 24px;
  box-sizing: border-box;
  display: flex;
  justify-content: center;
  overflow: hidden;
}

.footer-inner {
  width: 100%;
  max-width: 1216px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.footer-links-row {
  border-top: 1px solid var(--epic-color-gray-300);
  border-bottom: 1px solid var(--epic-color-gray-300);
  padding: 8px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.footer-link {
  font-family: var(--epic-font-family-pretendard);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.2;
  color: var(--epic-color-black-font-base);
  text-decoration: none;
  white-space: nowrap;
}

.footer-banners {
  display: flex;
  align-items: center;
  gap: 8px;
}

.footer-banner {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 40px;
  padding: 0 16px;
  border: 1px solid var(--epic-color-gray-300);
  border-radius: 6px;
  background: var(--epic-semantic-layout-page);
  text-decoration: none;
  color: var(--epic-color-black-font-base);
  white-space: nowrap;
}

.footer-banner-icon {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--epic-color-black-font-base);
}

.footer-banner-icon img {
  width: 32px;
  height: 32px;
  display: block;
}

.footer-banner-text {
  font-family: var(--epic-font-family-pretendard);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.25;
}

.footer-info-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 0;
}

.footer-logo img {
  height: 36px;
  width: auto;
  display: block;
}

.footer-logo {
  position: relative;
  height: 36px;
  width: auto;
}

.footer-logo-light,
.footer-logo-dark {
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
  transition: opacity 0.2s ease;
}

/* default (no theme class) shows light logo */
body:not(.theme-dark) .footer-logo-light {
  opacity: 1;
}

body.theme-dark .footer-logo-dark {
  opacity: 1;
}

body.theme-dark .footer-logo-light {
  opacity: 0;
}

@media (prefers-color-scheme: dark) {
  body:not(.theme-dark):not(.theme-light) .footer-logo-light {
    opacity: 0;
  }
  body:not(.theme-dark):not(.theme-light) .footer-logo-dark {
    opacity: 1;
  }
}

.footer-address {
  font-family: var(--epic-font-family-pretendard);
  font-size: 14px;
  font-weight: 300;
  line-height: 20px;
  color: var(--epic-color-black-font-base);
  text-align: right;
}

.footer-mobile-break {
  display: none;
}

.footer-desktop-break {
  display: inline;
}

.footer-copy-row {
  border-top: 1px solid var(--epic-color-gray-300);
  padding-top: 24px;
}

.footer-copy {
  font-family: var(--epic-font-family-pretendard);
  font-size: 14px;
  font-weight: 300;
  line-height: 14px;
  color: var(--epic-color-black-font-base);
}

@media (max-width: 1299px) {
  .footer-inner {
    gap: 0;
  }

  .footer {
    height: auto;
    padding: 0 16px 32px;
  }

  .footer-links-row {
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 14px 57px;
    padding: 16px 0;
    border-bottom: none;
    padding-bottom: 0;
  }

  .footer-banners {
    width: 100%;
    gap: 8px;
    padding: 16px 0;
    border-top: 1px solid var(--epic-color-gray-300);
    border-bottom: 1px solid var(--epic-color-gray-300);
  }

  .footer-banner {
    flex: 1 1 0;
    justify-content: center;
    padding: 0 16px;
    height: 40px;
  }

  .footer-link {
    font-size: 15px;
    line-height: 15px;
  }

  .footer-info-row {
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 24px 0;
    border-bottom: 1px solid var(--epic-color-gray-300);
  }

  .footer-address {
    text-align: center;
    width: 100%;
    font-size: 13px;
    line-height: 18px;
  }

  .footer-mobile-break {
    display: block;
  }

  .footer-desktop-break {
    display: none;
  }

  .footer-logo {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 32px;
  }

  .footer-logo img {
    height: 32px;
    max-width: 100%;
  }

  .footer-logo-light,
  .footer-logo-dark {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
  }

  .footer-copy-row {
    padding-top: 24px;
    text-align: center;
    border-top: none;
  }

  .footer-copy {
    font-size: 13px;
    line-height: 18px;
  }
}
