/**
 * @file
 * Footer styles for Invertir Pro theme.
 */

/* ========================================
 * SITE FOOTER
 * ======================================== */

.site-footer {
  background-color: var(--color-black);
  color: var(--color-white);
  margin-top: auto;
}

/* ========================================
 * FOOTER TOP
 * ======================================== */

.site-footer__top {
  padding: var(--space-3xl) 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Footer widgets/columns */
.site-footer__top .region--footer-top {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-xl);
}

/* Footer headings */
.site-footer__top h3,
.site-footer__top .block-title {
  font-family: var(--font-body);
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-semibold);
  color: var(--color-white);
  margin-bottom: var(--space-lg);
  position: relative;
}

.site-footer__top h3::after,
.site-footer__top .block-title::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 40px;
  height: 2px;
  background-color: var(--color-peach);
}

/* Footer text */
.site-footer__top p {
  color: rgba(255, 255, 255, 0.7);
  font-size: var(--font-size-sm);
  line-height: var(--line-height-relaxed);
}

/* Footer links */
.site-footer__top a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.site-footer__top a:hover {
  color: var(--color-peach);
}

/* Footer menus */
.site-footer__top ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-footer__top li {
  margin-bottom: var(--space-sm);
}

.site-footer__top li a {
  font-size: var(--font-size-sm);
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
}

.site-footer__top li a::before {
  content: '→';
  opacity: 0;
  transform: translateX(-5px);
  transition: opacity var(--transition-fast), transform var(--transition-fast);
}

.site-footer__top li a:hover::before {
  opacity: 1;
  transform: translateX(0);
}

/* ========================================
 * FOOTER MIDDLE
 * ======================================== */

.site-footer__middle {
  padding: var(--space-xl) 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.site-footer__middle .region--footer-middle {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-lg);
}

/* Footer logo */
.site-footer__middle .site-logo img,
.site-footer__middle .site-logo svg {
  height: 40px;
  width: auto;
  filter: brightness(0) invert(1);
}

/* Social links in footer */
.footer-social {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.footer-social__link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-full);
  color: var(--color-white);
  text-decoration: none;
  transition: background-color var(--transition-fast), transform var(--transition-fast);
}

.footer-social__link:hover {
  background-color: var(--color-peach);
  transform: translateY(-3px);
}

.footer-social__link svg {
  width: 18px;
  height: 18px;
}

/* Newsletter in footer */
.footer-newsletter {
  display: flex;
  gap: var(--space-sm);
  max-width: 400px;
}

.footer-newsletter input[type="email"] {
  flex: 1;
  padding: var(--space-sm) var(--space-md);
  background-color: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-md);
  color: var(--color-white);
  font-size: var(--font-size-sm);
}

.footer-newsletter input[type="email"]::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.footer-newsletter input[type="email"]:focus {
  outline: none;
  border-color: var(--color-peach);
}

.footer-newsletter button {
  padding: var(--space-sm) var(--space-lg);
  background-color: var(--color-peach);
  color: var(--color-black);
  border: none;
  border-radius: var(--radius-md);
  font-weight: var(--font-weight-medium);
  cursor: pointer;
  transition: background-color var(--transition-fast);
}

.footer-newsletter button:hover {
  background-color: var(--color-peach-light);
}

/* ========================================
 * FOOTER BOTTOM
 * ======================================== */

.site-footer__bottom {
  padding: var(--space-lg) 0;
}

.site-footer__bottom .region--footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-md);
  font-size: var(--font-size-sm);
  color: rgba(255, 255, 255, 0.5);
}

/* Copyright */
.footer-copyright {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

/* Legal links */
.footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
}

.footer-legal a {
  color: rgba(255, 255, 255, 0.5);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.footer-legal a:hover {
  color: var(--color-peach);
}

/* ========================================
 * FOOTER BOTTOM — two columns on desktop
 * footer_bottom (left) + footer_bottom_right (right)
 * ======================================== */

.site-footer__bottom .site-footer__container {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.site-footer__bottom .region--footer-bottom-right {
  font-size: var(--font-size-sm);
  color: rgba(255, 255, 255, 0.5);
}

@media (min-width: 768px) {
  .site-footer__bottom .site-footer__container {
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--space-xl);
  }

  .site-footer__bottom .region--footer-bottom {
    flex: 1 1 0;
    min-width: 0;
  }

  .site-footer__bottom .region--footer-bottom-right {
    flex: 0 0 auto;
    text-align: right;
  }
}

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

@media (max-width: 767px) {
  .site-footer__top {
    padding: var(--space-2xl) 0;
  }

  .site-footer__middle .region--footer-middle {
    flex-direction: column;
    text-align: center;
  }

  .site-footer__bottom .region--footer-bottom {
    flex-direction: column;
    text-align: center;
  }

  .footer-newsletter {
    flex-direction: column;
    width: 100%;
  }
}
