/* Site footer - matches src/styles/components.css */

.container {
  max-width: var(--content-max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--section-padding-x);
  padding-right: var(--section-padding-x);
}

.footer {
  background: var(--color-primary);
  color: var(--color-white);
}

.footer__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
}

.footer__brand-col {
  order: 1;
}

.footer__nav-group {
  order: 2;
}

@media (min-width: 768px) {
  .footer__brand-col,
  .footer__nav-group {
    order: initial;
  }

  .footer__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .footer__grid {
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
    gap: 2rem;
  }
}

.footer__nav-group {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  align-items: flex-start;
}

@media (min-width: 640px) {
  .footer__nav-group {
    flex-direction: row;
    gap: 2.75rem;
  }
}

@media (min-width: 1024px) {
  .footer__nav-group {
    gap: 3rem;
  }
}

.footer__section-pad {
  padding-top: 4.5rem;
  padding-bottom: 4.5rem;
}

@media (min-width: 1024px) {
  .footer__section-pad {
    padding-top: 5rem;
    padding-bottom: 4.5rem;
  }
}

.footer__brand-logo {
  display: inline-block;
  margin-bottom: 1.25rem;
  text-decoration: none;
}

.footer__brand-logo img {
  height: 28px;
  width: auto;
}

.footer__desc {
  color: rgba(243, 236, 219, 0.7);
  font-size: 14px;
  line-height: 1.65;
  margin-bottom: 1.5rem;
  font-weight: 400;
}

.footer__contact-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 100%;
}

.footer__contact-item {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  width: 100%;
  color: rgba(243, 236, 219, 0.7);
  font-size: 14px;
  font-weight: 400;
}

.footer__contact-link.footer__contact-item {
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer__contact-link.footer__contact-item:hover,
.footer__contact-link.footer__contact-item:focus-visible {
  color: var(--heading-keyword);
}

.footer__contact-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 0.125rem;
  color: var(--heading-keyword);
}

.footer__contact-icon svg {
  width: 16px;
  height: 16px;
  color: inherit;
}

.footer__contact-label {
  line-height: 1.5;
}

.footer__contact-label--phone {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

.footer__contact-address {
  flex: 1;
  min-width: 0;
  line-height: 1.65;
}

.footer__heading {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(243, 236, 219, 0.5);
  margin-bottom: 1.25rem;
  font-weight: 500;
}

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

.footer__link {
  color: rgba(243, 236, 219, 0.7);
  font-size: 14px;
  text-decoration: none;
  transition: color 0.2s;
  font-weight: 400;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.footer__link:hover {
  color: var(--color-white);
}

.footer__link svg {
  width: 12px;
  height: 12px;
  opacity: 0;
  transition: opacity 0.2s;
}

.footer__link:hover svg {
  opacity: 1;
}

.footer__meta {
  --footer-border: color-mix(in srgb, var(--color-white) 11%, transparent);
  --footer-surface: color-mix(in srgb, var(--color-white) 6%, transparent);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-6, 24px);
  margin-top: var(--space-8, 32px);
  padding: var(--space-6, 24px) 0;
  border-top: 1px solid var(--footer-border);
  border-bottom: 1px solid var(--footer-border);
}

.footer__affiliate-row {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4, 16px);
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.footer__affiliate {
  flex: 0 1 auto;
  min-width: 0;
  width: fit-content;
  max-width: calc(50% - var(--space-4, 16px) / 2);
}

.footer__affiliate a,
.footer__powered-by-acache a {
  display: block;
  max-width: 100%;
  line-height: 0;
  opacity: 0.88;
  transition: opacity 0.2s ease;
}

.footer__affiliate a:hover,
.footer__affiliate a:focus-visible,
.footer__powered-by-acache a:hover,
.footer__powered-by-acache a:focus-visible {
  opacity: 1;
}

.footer__powered-by-acache {
  flex: 0 1 auto;
  min-width: 0;
  max-width: calc(50% - var(--space-4, 16px) / 2);
  line-height: 0;
}

.footer__affiliate-logo {
  display: block;
  width: 180px;
  height: auto;
  max-width: 100%;
  max-height: 2.75rem;
  object-fit: contain;
  object-position: left center;
}

.footer__powered-by-acache-logo {
  display: block;
  width: 105px;
  height: auto;
  max-width: 100%;
  max-height: 2.75rem;
  object-fit: contain;
  object-position: right center;
}

.footer__socials {
  display: flex;
  align-items: center;
  gap: var(--space-2, 8px);
}

.footer__social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 999px;
  color: rgba(243, 236, 219, 0.55);
  text-decoration: none;
  background: var(--footer-surface);
  border: 1px solid var(--footer-border);
  transition:
    color 0.2s ease,
    border-color 0.2s ease,
    background-color 0.2s ease;
}

.footer__social-link:hover,
.footer__social-link:focus-visible {
  color: var(--heading-keyword);
  border-color: color-mix(in srgb, var(--heading-keyword) 45%, transparent);
  background: color-mix(in srgb, var(--heading-keyword) 14%, transparent);
}

.footer__social-link svg {
  width: 17px;
  height: 17px;
}

@media (min-width: 768px) {
  .footer__meta {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-6, 24px);
  }

  .footer__affiliate-row {
    flex: 1;
    justify-content: flex-end;
    gap: var(--space-8, 32px);
    max-width: none;
  }

  .footer__affiliate,
  .footer__powered-by-acache {
    max-width: none;
  }

  .footer__affiliate-logo {
    max-height: 3rem;
    object-position: right center;
  }

  .footer__powered-by-acache-logo {
    max-height: 3rem;
    object-position: right center;
  }

  .footer__socials {
    flex-shrink: 0;
    justify-content: flex-start;
  }
}

@media (min-width: 1024px) {
  .footer__affiliate-logo,
  .footer__powered-by-acache-logo {
    max-height: 3.25rem;
  }
}

.footer__bottom {
  margin-top: 0;
  padding-top: 1.75rem;
  border-top: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

@media (min-width: 768px) {
  .footer__bottom {
    flex-direction: row;
  }
}

.footer__copyright {
  color: rgba(243, 236, 219, 0.5);
  font-size: 13px;
  font-weight: 400;
  width: 100%;
  text-align: center;
  margin: 0;
}

@media (min-width: 768px) {
  .footer__copyright {
    width: auto;
    text-align: left;
  }
}

.footer__legal {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.footer__legal-link {
  color: rgba(243, 236, 219, 0.5);
  font-size: 13px;
  text-decoration: none;
  transition: color 0.2s;
  font-weight: 400;
}

.footer__legal-link:hover {
  color: rgba(243, 236, 219, 0.8);
}

@media (max-width: 767px) {
  .footer {
    position: relative;
  }

  .footer::before {
    content: "";
    position: absolute;
    top: 0;
    left: var(--section-padding-x);
    right: var(--section-padding-x);
    height: 1px;
    background: linear-gradient(
      90deg,
      transparent 0%,
      color-mix(in srgb, var(--heading-keyword) 50%, transparent) 50%,
      transparent 100%
    );
    pointer-events: none;
  }

  .footer__section-pad {
    padding-top: 2.5rem;
    padding-bottom: 2rem;
  }

  .footer__grid {
    gap: 0;
  }

  .footer__brand-col {
    padding-bottom: 1.5rem;
  }

  .footer__brand-logo img {
    height: 32px;
  }

  .footer__desc {
    margin-bottom: 1.25rem;
    font-size: 14px;
    line-height: 1.6;
    color: rgba(243, 236, 219, 0.62);
  }

  .footer__contact-list {
    gap: 0.5rem;
  }

  .footer__contact-item {
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    background: color-mix(in srgb, var(--color-white) 5%, transparent);
    border: 1px solid color-mix(in srgb, var(--color-white) 10%, transparent);
  }

  .footer__contact-icon {
    width: 2.25rem;
    height: 2.25rem;
    margin-top: 0;
    border-radius: 6px;
    background: color-mix(in srgb, var(--heading-keyword) 18%, transparent);
    color: var(--heading-keyword);
  }

  .footer__contact-icon svg {
    width: 15px;
    height: 15px;
  }

  .footer__nav-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem 1rem;
    padding: 1.5rem 0;
    align-items: start;
  }

  .footer__nav-col .footer__heading {
    margin-bottom: 1rem;
    color: var(--heading-keyword);
  }

  .footer__link-list {
    gap: 0.25rem;
  }

  .footer__link {
    padding: 0.5rem 0;
    font-size: 14px;
    line-height: 1.45;
  }

  .footer__link svg {
    opacity: 0.35;
    width: 11px;
    height: 11px;
  }

  .footer__socials {
    justify-content: center;
    gap: 1rem;
  }

  .footer__social-link {
    width: 2.75rem;
    height: 2.75rem;
    background: color-mix(in srgb, var(--color-white) 6%, transparent);
    border: 1px solid color-mix(in srgb, var(--color-white) 12%, transparent);
    color: rgba(243, 236, 219, 0.75);
  }

  .footer__bottom {
    padding-top: 1.25rem;
    gap: 1.25rem;
  }
}
