/**
 * Footer Styles
 * Dedicated stylesheet for footer components
 *
 * Includes:
 * - Main footer layout and containers
 * - Footer sections (brand, links, newsletter)
 * - Social links
 * - Footer tags
 * - Footer stats
 * - Footer bottom (copyright, links, back-to-top)
 * - Responsive design for all screen sizes
 * - Dark mode enhancements
 */

/* ===== MAIN FOOTER WRAPPER ===== */

.main-footer.enhanced {
  background: linear-gradient(
    135deg,
    rgba(79, 172, 254, 0.03) 0%,
    rgba(0, 242, 254, 0.01) 100%
  );
}

.footer-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ===== FOOTER CONTENT GRID ===== */

.footer-content {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
  gap: 2rem;
  padding: 3rem 0;
}

.footer-section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* ===== FOOTER BRAND SECTION ===== */

.footer-brand {
  margin-bottom: 0.5rem;
}

.footer-logo {
  height: 40px;
  width: auto;
}

.footer-description {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0;
}

/* ===== SOCIAL LINKS ===== */

.social-links {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  transition: all 0.3s ease;
  text-decoration: none;
}

.social-link:hover {
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  color: white;
  border-color: transparent;
  transform: translateY(-2px);
}

.social-icon {
  font-size: 1rem;
}

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

.footer-title {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 0.25rem 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ===== FOOTER LINKS ===== */

.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-links li {
  margin-bottom: 0;
}

.footer-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all 0.3s ease;
  padding: 0.25rem 0;
}

.footer-link:hover {
  color: var(--primary-color);
  transform: translateX(2px);
}

/* Link indicators for category links */
.link-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--category-gradient);
  flex-shrink: 0;
}

/* ===== FOOTER TAGS ===== */

.footer-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.tags-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.footer-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.5rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all 0.3s ease;
}

.footer-tag:hover {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

/* ===== NEWSLETTER SECTION ===== */

.newsletter-description {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  line-height: 1.4;
  margin: 0 0 0.75rem 0;
}

.newsletter-form {
  margin-bottom: 1rem;
}

.newsletter-input-group {
  position: relative;
  display: flex;
  gap: 0.5rem;
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.newsletter-input-group:focus-within {
  border-color: var(--primary-color);
}

.newsletter-input {
  flex: 1;
  padding: 0.625rem 0.875rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  background: var(--bg-primary);
  color: var(--text-primary);
  transition: all 0.3s ease;
  outline: none;
}

.newsletter-input:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.newsletter-input::placeholder {
  color: var(--text-muted);
}

.newsletter-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  border: none;
  border-radius: var(--radius-md);
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
}

.newsletter-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(79, 172, 254, 0.3);
}

.newsletter-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.newsletter-disclaimer {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
  transition: color 0.3s ease;
}

/* ===== FOOTER STATS ===== */

.footer-stats {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.footer-stats .stat-item {
  text-align: left;
  padding: 0;
}

.footer-stats .stat-number {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
}

.footer-stats .stat-label {
  display: block;
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

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

.footer-bottom {
  border-top: 1px solid var(--border-color);
  padding: 1.5rem 0;
}

.footer-bottom-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.copyright {
  flex: 1;
  min-width: 200px;
}

.copyright p {
  margin: 0;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.copyright .powered-by {
  font-size: 0.8125rem;
  margin-top: 0.25rem;
}

.footer-bottom-links {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.bottom-link {
  font-size: 0.875rem;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.3s ease;
}

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

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

.back-to-top {
  display: flex;
  align-items: center;
}

.back-to-top-btn {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 0.875rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  opacity: 0;
  pointer-events: none;
}

.back-to-top-btn:hover {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
  transform: translateY(-1px);
}

.back-to-top-btn .btn-icon {
  font-size: 0.875rem;
}

.btn-text {
  font-weight: 600;
}

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

/* Tablet (768px - 1023px): 3 columns */
@media (max-width: 1023px) {
  .footer-content {
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem 1.5rem;
  }

  .brand-section {
    grid-column: span 3;
  }

  .newsletter-section {
    grid-column: span 3;
  }

  .footer-container {
    padding: 0 1.5rem;
  }
}

/* Mobile (< 768px): 2 columns stacked */
@media (max-width: 767px) {
  .footer-content {
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    padding: 2rem 0;
  }

  .brand-section {
    grid-column: span 2;
  }

  .newsletter-section {
    grid-column: span 2;
  }

  .footer-section {
    gap: 0.75rem;
  }

  .footer-description {
    font-size: 0.8125rem;
  }

  .footer-links {
    gap: 0.375rem;
  }

  .footer-link {
    font-size: 0.8125rem;
  }

  .footer-stats .stat-number {
    font-size: 1.25rem;
  }

  .footer-bottom-content {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .footer-bottom-links {
    gap: 1rem;
  }

  .newsletter-input-group {
    flex-direction: column;
  }

  .newsletter-btn {
    width: 100%;
  }
}

/* Small mobile (< 480px): Single column */
@media (max-width: 479px) {
  .footer-content {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .footer-container {
    padding: 0 1rem;
  }

  .brand-section {
    grid-column: span 1;
  }

  .newsletter-section {
    grid-column: span 1;
  }

  .social-links {
    justify-content: flex-start;
  }

  .footer-tags {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-stats {
    flex-direction: row;
    gap: 1rem;
  }

  .footer-stats .stat-item {
    flex: 1;
  }

  .footer-stats .stat-number {
    font-size: 1.125rem;
  }

  .footer-stats .stat-label {
    font-size: 0.6875rem;
  }
}

/* ===== DARK MODE ENHANCEMENTS ===== */

@media (prefers-color-scheme: dark) {
  .main-footer.enhanced {
    background: linear-gradient(
      135deg,
      rgba(79, 172, 254, 0.08) 0%,
      rgba(0, 242, 254, 0.04) 100%
    );
  }

  .social-link {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
  }

  .newsletter-input {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
  }

  .footer-tag {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
  }
}

/* ===== BRAND SECTION GRID SPAN ===== */

.brand-section {
  grid-column: span 1;
}

.newsletter-section {
  grid-column: span 1;
}
