/* ============================================
   UNIFIED FOOTER STYLES
   PetFuel.ai - PetSpot Ecosystem
   ============================================ */

/* ============================================
   CSS VARIABLES
   ============================================ */
.unified-footer {
  /* Site section colors (dark green) */
  --site-bg: #1A2E1A;
  --site-text: #FFFFFF;
  --site-text-muted: rgba(255, 255, 255, 0.7);
  --site-accent: #E8985D;

  /* Ecosystem section colors (sage green) */
  --eco-bg: #6B8B73;
  --eco-text: #FFFFFF;
  --eco-text-muted: rgba(255, 255, 255, 0.85);

  /* Legal section */
  --legal-bg: #1A2E1A;
  --legal-text: rgba(255, 255, 255, 0.6);

  /* Button colors */
  --btn-bg: #E8985D;
  --btn-hover: #d97a3a;

  /* Typography */
  --font-display: 'Libre Baskerville', Georgia, serif;
  --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Spacing */
  --section-padding: clamp(2.5rem, 5vw, 4rem);
  --content-max-width: 1200px;

  /* Base */
  font-family: var(--font-body);
  width: 100%;
}

/* ============================================
   SITE SECTION (Top - Dark Green)
   ============================================ */
.footer-site {
  background: var(--site-bg);
  color: var(--site-text);
  padding: var(--section-padding);
  text-align: center;
}

.footer-site__inner {
  max-width: var(--content-max-width);
  margin: 0 auto;
}

/* Brand */
.footer-brand {
  margin-bottom: 1.5rem;
  text-align: center;
}

.footer-brand__logo {
  display: inline-block;
  margin: 0 auto 1rem;
}

.footer-brand__logo img {
  height: 48px;
  width: auto;
  display: block;
}

.footer-brand__logo-mobile {
  display: none;
}

.footer-brand__tagline {
  font-size: 0.95rem;
  color: var(--site-text-muted);
  line-height: 1.6;
  max-width: 400px;
  margin: 0 auto 2rem;
}

/* Navigation Links */
.footer-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.footer-nav a {
  color: var(--site-text);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.5rem 1rem;
  transition: color 0.2s ease;
}

.footer-nav a:hover {
  color: var(--site-accent);
}

.footer-nav__divider {
  color: var(--site-text-muted);
  opacity: 0.5;
  user-select: none;
}

/* ============================================
   ECOSYSTEM SECTION (Middle - Sage Green)
   ============================================ */
.footer-ecosystem {
  background: var(--eco-bg);
  color: var(--eco-text);
  padding: var(--section-padding);
  text-align: center;
}

.footer-ecosystem__inner {
  max-width: var(--content-max-width);
  margin: 0 auto;
}

/* Property Statement */
.eco-property {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.75rem;
  font-size: 1.5rem;
}

.eco-property__site {
  font-weight: 500;
}

/* Mobile Collapsible Toggle */
.eco-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--eco-text);
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  padding: 0.5rem 1rem;
  margin: 0 auto 1.5rem;
  font-family: inherit;
  transition: opacity 0.2s ease;
}

.eco-toggle:hover {
  opacity: 0.8;
}

.eco-toggle svg {
  width: 16px;
  height: 16px;
  margin-left: 0.5rem;
  vertical-align: middle;
  transition: transform 0.3s ease;
}

.eco-toggle.open svg {
  transform: rotate(180deg);
}

/* Collapsible Content Container */
.eco-collapsible {
  max-height: 1000px;
  overflow: hidden;
  transition: max-height 0.4s ease, opacity 0.3s ease;
  opacity: 1;
}

.eco-collapsible.collapsed {
  max-height: 0;
  opacity: 0;
}

/* Ecosystem Links */
.eco-links {
  margin-bottom: 2rem;
}

.eco-links__title {
  font-size: 0.95rem;
  color: var(--eco-text-muted);
  margin: 0 0 1rem 0;
}

.eco-links__list {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem 0;
}

.eco-links__list a {
  color: var(--eco-text);
  text-decoration: none;
  font-weight: 500;
  font-size: 1rem;
  padding: 0.25rem 0.75rem;
  transition: opacity 0.2s ease;
}

.eco-links__list a:hover {
  opacity: 0.8;
}

.eco-links__divider {
  color: var(--eco-text-muted);
  opacity: 0.5;
  user-select: none;
}

/* Ecosystem Message */
.eco-message {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--eco-text);
  max-width: 800px;
  margin: 0 auto 2.5rem;
}

.eco-message strong {
  font-weight: 600;
}

/* Ecosystem Newsletter */
.eco-newsletter {
  max-width: 420px;
  margin: 0 auto;
}

.eco-newsletter__title {
  font-size: 1rem;
  font-weight: 500;
  margin: 0 0 1rem 0;
  color: var(--eco-text);
}

.newsletter-form {
  display: flex;
  gap: 0;
}

.newsletter-form input {
  flex: 1;
  padding: 0.85rem 1.5rem;
  border: none;
  border-radius: 8px 0 0 8px;
  background: rgba(255, 255, 255, 0.95);
  color: #333;
  font-family: var(--font-body);
  font-size: 0.9rem;
  outline: none;
  transition: background 0.2s ease;
}

.newsletter-form input::placeholder {
  color: rgba(0, 0, 0, 0.4);
}

.newsletter-form input:focus {
  background: #fff;
}

.newsletter-form button {
  padding: 0.85rem 1.25rem;
  border: none;
  border-radius: 0 8px 8px 0;
  background: var(--btn-bg);
  color: white;
  cursor: pointer;
  transition: background 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.newsletter-form button:hover {
  background: var(--btn-hover);
}

.newsletter-form button svg {
  width: 20px;
  height: 20px;
}

/* ============================================
   LEGAL SECTION (Bottom - Dark Green)
   ============================================ */
.footer-legal {
  background: var(--legal-bg);
  color: var(--legal-text);
  padding: 1.25rem var(--section-padding);
}

.footer-legal__inner {
  max-width: var(--content-max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-legal__copyright {
  font-size: 0.85rem;
  margin: 0;
}

.footer-legal__copyright a {
  color: var(--btn-bg);
  text-decoration: none;
}

.footer-legal__copyright a:hover {
  text-decoration: underline;
}

.footer-legal__links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.footer-legal__links a {
  font-size: 0.85rem;
  color: var(--legal-text);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-legal__links a:hover {
  color: rgba(255, 255, 255, 0.9);
}

.footer-legal__social {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.footer-legal__social a {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.7);
  transition: all 0.2s ease;
}

.footer-legal__social a:hover {
  background: var(--btn-bg);
  color: white;
}

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

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 768px) {
  .footer-site {
    padding: 2.5rem 1.5rem;
  }

  /* Switch to mobile logo */
  .footer-brand__logo-desktop {
    display: none;
  }

  .footer-brand__logo-mobile {
    display: block;
  }

  .footer-brand__logo img {
    height: 56px;
  }

  .footer-brand__tagline {
    font-size: 0.9rem;
  }

  /* Ecosystem adjustments */
  .footer-ecosystem {
    padding: 2.5rem 1.5rem;
  }

  .eco-property {
    font-size: 1.15rem;
    margin-bottom: 0.75rem;
  }

  /* Show toggle button on mobile */
  .eco-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  /* Collapsed by default on mobile */
  .eco-collapsible {
    max-height: 0;
    opacity: 0;
  }

  .eco-collapsible.open {
    max-height: 1000px;
    opacity: 1;
  }

  /* Horizontal scrollable links on mobile */
  .eco-links__list {
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 0;
    justify-content: flex-start;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 0.5rem;
    margin: 0 -1.5rem;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
    align-items: center;
  }

  .eco-links__list::-webkit-scrollbar {
    display: none;
  }

  .eco-links__divider {
    display: none;
  }

  .eco-links__list a {
    display: block;
    white-space: nowrap;
    flex-shrink: 0;
    padding: 0.25rem 0.75rem;
    align-items: center;
  }

  .eco-message {
    font-size: 0.95rem;
    padding: 0 0.5rem;
  }

  /* Legal section mobile */
  .footer-legal {
    padding: 1.5rem;
  }

  .footer-legal__inner {
    flex-direction: column;
    text-align: center;
    gap: 1.25rem;
  }

  .footer-legal__links {
    gap: 1.5rem;
    flex-wrap: wrap;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .eco-property {
    font-size: 1rem;
  }

  .footer-legal__links {
    gap: 1rem 1.5rem;
  }
}
