/**
 * THE CONNECTED HAVEN - FOOTER STYLES
 *
 * Footer widget area and bottom bar styles
 *
 * @package Blocksy_Child_TCH
 * @version 1.0.0
 */

/* ==========================================================================
   FOOTER WIDGETS CONTAINER
   ========================================================================== */

.tch-footer-widgets {
  background: var(--tch-dark);
  color: var(--tch-light);
  padding: var(--space-3xl) 0;
}

.tch-footer-widgets__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-2xl);
}

@media (min-width: 640px) {
  .tch-footer-widgets__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .tch-footer-widgets__grid {
    grid-template-columns: 1.5fr 1fr 1fr 1.5fr;
    gap: var(--space-xl);
  }
}

/* ==========================================================================
   FOOTER COLUMN TITLES
   ========================================================================== */

.tch-footer-widgets__title {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--tch-muted);
  margin-bottom: var(--space-lg);
}

/* ==========================================================================
   BRAND COLUMN
   ========================================================================== */

.tch-footer-brand__logo {
  display: inline-block;
  margin-bottom: var(--space-md);
}

.tch-footer-brand__logo img {
  height: 40px;
  width: auto;
}

.tch-footer-brand__tagline {
  font-size: 1rem;
  font-weight: 600;
  color: var(--tch-white);
  margin-bottom: var(--space-sm);
}

.tch-footer-brand__description {
  font-size: 0.9375rem;
  color: var(--tch-muted);
  line-height: 1.6;
  margin-bottom: var(--space-lg);
}

/* Social Links */
.tch-footer-social {
  display: flex;
  gap: var(--space-sm);
}

.tch-footer-social__link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  color: var(--tch-light);
  transition: all var(--transition-base);
}

.tch-footer-social__link:hover {
  background: var(--tch-primary);
  color: var(--tch-white);
  transform: translateY(-2px);
}

/* ==========================================================================
   FOOTER MENU
   ========================================================================== */

.tch-footer-menu {
  list-style: none;
  padding: 0;
  margin: 0;
}

.tch-footer-menu__item {
  margin-bottom: var(--space-sm);
}

.tch-footer-menu__item a {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  color: var(--tch-light);
  text-decoration: none;
  font-size: 0.9375rem;
  transition: all var(--transition-base);
}

.tch-footer-menu__item a:hover {
  color: var(--tch-white);
  transform: translateX(4px);
}

/* Ecosystem colored icons */
.tch-footer-menu__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  opacity: 0.7;
  transition: opacity var(--transition-base);
}

.tch-footer-menu__item:hover .tch-footer-menu__icon {
  opacity: 1;
}

.tch-footer-menu__item--alexa .tch-footer-menu__icon {
  color: var(--alexa-blue);
}

.tch-footer-menu__item--homekit .tch-footer-menu__icon {
  color: var(--homekit-orange);
}

.tch-footer-menu__item--google .tch-footer-menu__icon {
  color: var(--google-blue);
}

.tch-footer-menu__item--smartthings .tch-footer-menu__icon {
  color: var(--smartthings-green);
}

.tch-footer-menu__item--matter .tch-footer-menu__icon {
  color: var(--matter-purple);
}

/* ==========================================================================
   NEWSLETTER COLUMN
   ========================================================================== */

.tch-footer-newsletter__text {
  font-size: 0.9375rem;
  color: var(--tch-muted);
  line-height: 1.6;
  margin-bottom: var(--space-lg);
}

.tch-footer-newsletter__form {
  margin-bottom: var(--space-md);
}

.tch-footer-newsletter__field {
  display: flex;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.tch-footer-newsletter__input {
  flex: 1;
  padding: var(--space-md);
  background: transparent;
  border: none;
  color: var(--tch-white);
  font-size: 0.9375rem;
}

.tch-footer-newsletter__input::placeholder {
  color: var(--tch-muted);
}

.tch-footer-newsletter__input:focus {
  outline: none;
}

.tch-footer-newsletter__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  background: var(--tch-primary);
  border: none;
  color: var(--tch-white);
  cursor: pointer;
  transition: background var(--transition-base);
}

.tch-footer-newsletter__btn:hover {
  background: var(--tch-primary-dark);
}

.tch-footer-newsletter__privacy {
  font-size: 0.75rem;
  color: var(--tch-muted);
  margin-top: var(--space-sm);
}

/* Trust badges */
.tch-footer-trust {
  display: flex;
  gap: var(--space-lg);
  margin-top: var(--space-lg);
  padding-top: var(--space-lg);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.tch-footer-trust__item {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: 0.75rem;
  color: var(--tch-muted);
}

.tch-footer-trust__item svg {
  color: var(--tch-accent);
}

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

.tch-footer-bottom {
  background: rgba(0, 0, 0, 0.3);
  padding: var(--space-lg) 0;
}

.tch-footer-bottom__inner {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  align-items: center;
  text-align: center;
}

@media (min-width: 768px) {
  .tch-footer-bottom__inner {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

.tch-footer-copyright {
  font-size: 0.875rem;
  color: var(--tch-muted);
}

.tch-footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  justify-content: center;
}

@media (min-width: 768px) {
  .tch-footer-legal {
    justify-content: flex-end;
  }
}

.tch-footer-legal__link {
  font-size: 0.875rem;
  color: var(--tch-muted);
  text-decoration: none;
  transition: color var(--transition-base);
}

.tch-footer-legal__link:hover {
  color: var(--tch-white);
}

/* ==========================================================================
   BACK TO TOP BUTTON
   ========================================================================== */

.tch-back-to-top {
  position: fixed;
  bottom: var(--space-xl);
  right: var(--space-xl);
  width: 48px;
  height: 48px;
  background: var(--tch-primary);
  color: var(--tch-white);
  border: none;
  border-radius: var(--radius-full);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all var(--transition-base);
  box-shadow: var(--shadow-lg);
  z-index: 100;
}

.tch-back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.tch-back-to-top:hover {
  background: var(--tch-primary-dark);
  transform: translateY(-4px);
}

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

@media (max-width: 639px) {
  .tch-footer-widgets {
    padding: var(--space-2xl) 0;
  }

  .tch-footer-widgets__column--brand {
    text-align: center;
  }

  .tch-footer-social {
    justify-content: center;
  }

  .tch-footer-trust {
    justify-content: center;
  }

  .tch-back-to-top {
    right: var(--space-md);
    bottom: var(--space-md);
    width: 44px;
    height: 44px;
  }
}
