/**
 * Site Footer
 * Based on Figma design node: 393:2760
 * 
 * Structure:
 * .site-footer
 *   .site-footer__inner
 *     .site-footer__brand (logo + contacts + social)
 *     .site-footer__content (slogan + nav + description)
 *     .site-footer__illustration
 */

/* ===========================================
 * FOOTER - Main Container
 * =========================================== */

.site-footer {
  background-color: var(--color-primary);
  padding: var(--spacing-10) var(--spacing-4);
  margin-top: auto;
  flex-shrink: 0;
}

@media (min-width: 992px) {
  .site-footer {
    padding: 64px 0; /* Remove horizontal padding from outer wrapper */
  }
}

.site-footer__inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--spacing-8);
  max-width: var(--container-2xl);
  margin: 0 auto;
  padding: 0 var(--spacing-6); /* Add padding to inner container */
  color: var(--color-white);
}

@media (min-width: 768px) {
  .site-footer__inner {
    grid-template-columns: 280px 1fr;
    gap: var(--spacing-8);
  }
}

@media (min-width: 1200px) {
  .site-footer__inner {
    grid-template-columns: 280px 1fr auto;
  }
}

/* ===========================================
 * BRAND Section (Left Column)
 * =========================================== */

.site-footer__brand {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-8);
}

/* Logo */
.site-footer__logo {
  display: block;
  line-height: 0;
}

.site-footer__logo-img {
  height: 40px;
  width: auto;
}

/* Contacts - after logo */
.site-footer__contacts {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-2);
  order: 1;
  margin-top: var(--spacing-6);
}

.site-footer__contact-link {
  font-family: var(--font-primary);
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-normal);
  line-height: var(--line-height-md);
  color: var(--color-white);
  text-decoration: none;
  transition: opacity var(--transition-fast);
}

.site-footer__contact-link:hover {
  opacity: 0.8;
}

/* Social Links - at bottom */
.site-footer__social {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-2);
  order: 2;
  margin-top: auto;
}

.site-footer__social-title {
  font-family: var(--font-primary);
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-medium);
  line-height: var(--line-height-lg);
  color: var(--color-white);
}

.site-footer__social-links {
  display: flex;
  gap: var(--spacing-2);
  flex-wrap: wrap;
}

.site-footer__social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background-color: var(--color-white);
  border-radius: 12px;
  transition: transform var(--transition-fast);
}

.site-footer__social-link:hover {
  transform: scale(1.1);
}

.site-footer__social-link img,
.site-footer__social-link svg {
  width: 24px;
  height: 24px;
}

/* ===========================================
 * CONTENT Section (Center)
 * =========================================== */

.site-footer__content {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-4);
}

/* Slogan */
.site-footer__slogan {
  font-family: var(--font-accent);
  font-size: var(--font-size-xl);
  line-height: var(--line-height-lg);
  color: var(--color-white);
}

/* Main content area */
.site-footer__main {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-8);
}

@media (min-width: 768px) {
  .site-footer__main {
    flex-direction: row;
    gap: var(--spacing-8);
  }
}

/* Navigation Menu */
.site-footer__nav {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-1);
  opacity: 0.8;
  flex-shrink: 0;
  width: 176px;
}

.site-footer__nav-item {
  display: flex;
  align-items: center;
  gap: var(--spacing-3);
  padding: var(--spacing-1) 0;
  font-family: var(--font-primary);
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-medium);
  line-height: var(--line-height-md);
  color: var(--color-white);
  text-decoration: none;
  transition: opacity var(--transition-fast);
}

.site-footer__nav-item:hover {
  opacity: 1;
}

.site-footer__nav-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}

.site-footer__nav-icon img,
.site-footer__nav-icon svg {
  width: 100%;
  height: 100%;
  object-fit: contain;
  /* Make footer icons white regardless of original color */
  filter: brightness(0) saturate(100%) invert(100%) sepia(0%) saturate(0%) hue-rotate(0deg) brightness(103%) contrast(103%);
}

/* Description Text */
.site-footer__description {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-4);
  max-width: 384px;
}

.site-footer__description p {
  font-family: var(--font-primary);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-normal);
  line-height: var(--line-height-sm);
  color: var(--color-white);
  margin: 0;
}

/* Tagline */
.site-footer__tagline {
  font-family: var(--font-accent);
  font-size: var(--font-size-xl);
  line-height: var(--line-height-lg);
  color: var(--color-white);
  margin-top: var(--spacing-4);
}

/* ===========================================
 * ILLUSTRATION (Right)
 * =========================================== */

.site-footer__illustration {
  display: none;
  align-items: flex-end;
}

@media (min-width: 1200px) {
  .site-footer__illustration {
    display: flex;
  }
}

.site-footer__illustration img {
  width: 280px;
  height: auto;
}

/* ===========================================
 * MOBILE BOTTOM NAVIGATION
 * Based on Figma node: 557:49152
 * 4 buttons: Home, Sections, Search, Profile
 * =========================================== */

.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: var(--color-white);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  box-shadow: 
    8px -8px 16px rgba(217, 217, 217, 0.25),
    8px 8px 16px rgba(217, 217, 217, 0.25);
  padding: var(--spacing-4) var(--spacing-6);
  padding-bottom: calc(var(--spacing-4) + env(safe-area-inset-bottom, 0px));
  z-index: var(--z-mobile-nav);
}

@media (max-width: 767px) {
  .mobile-bottom-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  
  /* Add padding to footer to prevent content overlap with fixed nav */
  .site-footer {
    padding-bottom: calc(var(--spacing-10) + 80px);
  }
}

.mobile-bottom-nav__item {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 32px;
  padding: 0;
  background: none;
  border: none;
  color: #D6C9E9; /* Light purple - inactive state */
  font-family: var(--font-primary);
  font-size: 12px;
  text-decoration: none;
  cursor: pointer;
  transition: color var(--transition-fast);
}

.mobile-bottom-nav__item:hover,
.mobile-bottom-nav__item.is-active {
  color: var(--color-primary);
}

.mobile-bottom-nav__icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mobile-bottom-nav__icon svg {
  width: 24px;
  height: 24px;
}

/* Hide labels on mobile bottom nav - icon only */
.mobile-bottom-nav__label {
  display: none;
}
