/* 
 * Sprout Advocates - Enhanced Footer Styles
 * Implements newsletter signup, recent posts, and awards recognition
 */

/* Footer Base Styles */
.footer {
  position: relative;
  background-color: var(--dark-blue);
  color: var(--primary-white);
  padding: var(--spacing-xl) 0 var(--spacing-md);
  overflow: hidden;
}

/* Background Pattern */
.footer:before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    radial-gradient(rgba(255, 255, 255, 0.1) 1px, transparent 1px),
    radial-gradient(rgba(255, 255, 255, 0.1) 1px, transparent 1px);
  background-size: 30px 30px;
  background-position: 0 0, 15px 15px;
  opacity: 0.3;
  z-index: 0;
}

/* Footer Container */
.footer-container {
  position: relative;
  z-index: 1;
}

/* Footer Grid */
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--spacing-lg);
  margin-bottom: var(--spacing-xl);
}

/* Footer Column */
.footer-column {
  display: flex;
  flex-direction: column;
}

/* Footer Logo */
.footer-logo {
  margin-bottom: var(--spacing-md);
  display: flex;
  align-items: center;
}

.footer-logo a {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.8rem;
  font-weight: 700;
  text-decoration: none;
  color: var(--primary-white);
  display: inline-flex;
  align-items: center;
}

.footer-logo img {
  height: 40px;
  margin-right: 8px;
}

.footer-logo-blue {
  color: #5a9bd5; /* Lighter blue for better contrast on dark background */
}

.footer-logo-green {
  color: #4dbd74; /* Lighter green for better contrast on dark background */
}

/* Footer Description */
.footer-description {
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: var(--spacing-md);
  line-height: 1.6;
}

/* Newsletter Signup */
.footer-newsletter {
  margin-bottom: var(--spacing-md);
}

.newsletter-title {
  color: var(--primary-white);
  margin-bottom: var(--spacing-sm);
  font-size: 1.1rem;
}

.newsletter-form {
  display: flex;
  gap: 10px;
}

.newsletter-input {
  flex-grow: 1;
  padding: 10px 15px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--border-radius-sm);
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--primary-white);
  font-family: 'Open Sans', sans-serif;
}

.newsletter-input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.newsletter-submit {
  background-color: var(--primary-green);
  color: var(--primary-white);
  border: none;
  padding: 10px 15px;
  border-radius: var(--border-radius-sm);
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.newsletter-submit:hover {
  background-color: #4dbd74; /* Lighter green for hover state */
}

/* Footer Heading */
.footer-heading {
  color: var(--primary-white);
  margin-bottom: var(--spacing-md);
  font-size: 1.1rem;
  position: relative;
  padding-bottom: 10px;
}

.footer-heading:after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 2px;
  background-color: var(--primary-green);
}

/* Footer Links */
.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  transition: color 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.footer-links a:hover {
  color: var(--primary-white);
}

.footer-links a i {
  font-size: 0.8rem;
  color: var(--primary-green);
}

/* Recent Posts */
.recent-posts {
  list-style: none;
  padding: 0;
  margin: 0;
}

.recent-post {
  margin-bottom: var(--spacing-sm);
  padding-bottom: var(--spacing-sm);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.recent-post:last-child {
  border-bottom: none;
}

.post-title {
  font-size: 0.9rem;
  margin-bottom: 5px;
}

.post-title a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: color 0.3s ease;
}

.post-title a:hover {
  color: var(--primary-white);
}

.post-date {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.5);
  display: flex;
  align-items: center;
  gap: 5px;
}

.post-date i {
  font-size: 0.8rem;
}

/* Awards and Recognition */
.awards {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-bottom: var(--spacing-md);
}

.award {
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: var(--border-radius-sm);
  padding: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  transition: all 0.3s ease;
}

.award:hover {
  background-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-5px);
}

.award img {
  max-width: 100%;
  max-height: 100%;
  filter: brightness(0) invert(1);
  opacity: 0.8;
}

/* Contact Information */
.contact-info-footer {
  margin-bottom: var(--spacing-md);
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 10px;
  color: rgba(255, 255, 255, 0.7);
}

.contact-item i {
  color: var(--primary-green);
  margin-top: 3px;
}

/* Social Media */
.social-media-footer {
  display: flex;
  gap: 10px;
}

.social-link-footer {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--primary-white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.social-link-footer:hover {
  background-color: var(--primary-green);
  transform: translateY(-3px);
}

/* Language Selector */
.language-selector {
  margin-bottom: var(--spacing-md);
}

.language-dropdown {
  background-color: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--primary-white);
  padding: 8px 12px;
  border-radius: var(--border-radius-sm);
  font-family: 'Open Sans', sans-serif;
  cursor: pointer;
  width: 100%;
}

.language-dropdown option {
  background-color: var(--dark-blue);
  color: var(--primary-white);
}

/* Footer Bottom */
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: var(--spacing-md);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--spacing-md);
}

/* Copyright */
.copyright {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.9rem;
}

/* Legal Links */
.legal-links {
  display: flex;
  gap: 20px;
}

.legal-link {
  color: rgba(255, 255, 255, 0.5);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.3s ease;
}

.legal-link:hover {
  color: var(--primary-white);
}

/* Back to Top Button */
.back-to-top {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--primary-green);
  color: var(--primary-white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
  opacity: 0;
  visibility: hidden;
  z-index: 999;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background-color: var(--primary-blue);
  transform: translateY(-5px);
}

/* Responsive Styles */
@media (max-width: 992px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-lg) var(--spacing-xl);
  }
}

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
  }
  
  .footer-bottom {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: var(--spacing-sm);
  }
  
  .legal-links {
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }
}

/* Accessibility Improvements */
@media (prefers-reduced-motion: reduce) {
  .award:hover,
  .social-link-footer:hover,
  .back-to-top,
  .back-to-top:hover {
    transition: none !important;
    animation: none !important;
    transform: none !important;
  }
}

@media (forced-colors: active) {
  .footer-heading:after {
    background-color: currentColor;
  }
  
  .newsletter-input,
  .language-dropdown {
    border: 1px solid currentColor;
  }
  
  .award img {
    filter: none;
  }
}
