/* ============================================================
   BlogSphere - Footer Stylesheet
   ============================================================
   File:     assets/css/footer.css
   Purpose:  All footer related styles

   Table of Contents:
     1. Footer Base
     2. Newsletter Section
     3. Main Footer Grid
     4. Footer About Column
     5. Footer Links
     6. Footer Contact
     7. Footer Bottom Bar
     8. Footer Social Links
     9. Footer Responsive
   ============================================================ */

/* ============================================================
   1. FOOTER BASE
   ============================================================ */
.footer {
  background-color: var(--color-bg);
  border-top: 1px solid var(--color-border-light);
  margin-top: auto;
}

/* ============================================================
   2. NEWSLETTER SECTION (Above Footer Columns)
   ============================================================ */
.footer-newsletter-section {
  background: var(--gradient-primary);
  padding: var(--space-2xl) 0;
  position: relative;
  overflow: hidden;
}

/* Decorative background circles */
.footer-newsletter-section::before {
  content: '';
  position: absolute;
  top: -50px;
  right: -50px;
  width: 200px;
  height: 200px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  pointer-events: none;
}

.footer-newsletter-section::after {
  content: '';
  position: absolute;
  bottom: -30px;
  left: 10%;
  width: 120px;
  height: 120px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 50%;
  pointer-events: none;
}

.footer-newsletter-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2xl);
}

.footer-newsletter-content {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  flex: 1;
}

.footer-newsletter-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-lg);
  font-size: var(--text-2xl);
  color: white;
  flex-shrink: 0;
}

.footer-newsletter-title {
  font-size: var(--text-xl);
  font-weight: var(--weight-bold);
  color: white;
  margin-bottom: var(--space-xs);
}

.footer-newsletter-desc {
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.85);
  margin: 0;
  line-height: var(--leading-normal);
}

.footer-newsletter-form {
  flex: 0 0 auto;
  width: 420px;
}

.footer-newsletter-input-group {
  display: flex;
  align-items: center;
  background: white;
  border-radius: var(--radius-full);
  padding: 4px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.footer-newsletter-input {
  flex: 1;
  padding: 0.75rem 1.25rem;
  border: none;
  background: transparent;
  font-size: var(--text-sm);
  color: var(--color-text);
  outline: none !important;
  min-width: 0;
}

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

.footer-newsletter-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.5rem;
  background: var(--color-text);
  color: white;
  border: none;
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
  flex-shrink: 0;
}

.footer-newsletter-btn:hover {
  background: var(--color-primary-dark);
  transform: translateY(-1px);
}

.newsletter-message {
  margin-top: var(--space-sm);
  font-size: var(--text-xs);
  text-align: center;
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-sm);
}

.newsletter-message.success {
  color: #d4edda;
  background-color: rgba(255, 255, 255, 0.15);
}

.newsletter-message.error {
  color: #ffe0e0;
  background-color: rgba(255, 0, 0, 0.15);
}

/* ============================================================
   3. MAIN FOOTER GRID
   ============================================================ */
.footer-main {
  padding: var(--space-3xl) 0 var(--space-2xl);
}

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

/* ============================================================
   4. FOOTER ABOUT COLUMN
   ============================================================ */
.footer-logo {
  display: inline-block;
  margin-bottom: var(--space-md);
  transition: opacity var(--transition-fast);
}

.footer-logo:hover {
  opacity: 0.85;
}

.footer-logo-img {
  height: 32px;
  width: auto;
  object-fit: contain;
}

.footer-about-text {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: var(--leading-relaxed);
  margin-bottom: var(--space-lg);
  max-width: 300px;
}

/* ============================================================
   5. FOOTER LINKS
   ============================================================ */
.footer-heading {
  font-size: var(--text-base);
  font-weight: var(--weight-bold);
  color: var(--color-text);
  margin-bottom: var(--space-lg);
  position: relative;
  padding-bottom: var(--space-sm);
}

.footer-heading::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 30px;
  height: 3px;
  background: var(--gradient-primary);
  border-radius: var(--radius-full);
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.footer-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  text-decoration: none;
  transition: all var(--transition-fast);
  padding: 2px 0;
}

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

.footer-link-arrow {
  font-size: 8px;
  color: var(--color-text-light);
  transition: color var(--transition-fast);
}

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

/* ============================================================
   6. FOOTER CONTACT
   ============================================================ */
.footer-contact-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.footer-contact-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  font-size: var(--text-sm);
}

.footer-contact-icon {
  color: var(--color-primary);
  font-size: var(--text-sm);
  width: 18px;
  flex-shrink: 0;
  margin-top: 2px;
}

.footer-contact-item a {
  color: var(--color-text-muted);
  text-decoration: none;
  transition: color var(--transition-fast);
  line-height: var(--leading-normal);
  word-break: break-all;
}

.footer-contact-item a:hover {
  color: var(--color-primary);
}

/* ============================================================
   7. FOOTER BOTTOM BAR
   ============================================================ */
.footer-bottom {
  border-top: 1px solid var(--color-border-light);
  padding: var(--space-lg) 0;
}

.footer-bottom-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
}

.footer-copyright {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin: 0;
}

.footer-legal-links {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-legal-link {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  text-decoration: none;
  transition: color var(--transition-fast);
}

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

.footer-legal-separator {
  color: var(--color-border);
  font-size: var(--text-xs);
}

/* ============================================================
   8. FOOTER SOCIAL LINKS
   ============================================================ */
.footer-social {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.footer-social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  background-color: var(--color-bg-secondary);
  color: var(--color-text-secondary);
  border-radius: var(--radius-full);
  text-decoration: none;
  font-size: var(--text-sm);
  transition: all var(--transition-fast);
  border: 1px solid var(--color-border-light);
}

.footer-social-link:hover {
  background-color: var(--color-primary);
  color: white;
  border-color: var(--color-primary);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

/* ============================================================
   9. FOOTER RESPONSIVE
   ============================================================ */

/* Tablet: 1024px */
@media (max-width: 1024px) {
  .footer-newsletter-wrapper {
    flex-direction: column;
    text-align: center;
    gap: var(--space-lg);
  }

  .footer-newsletter-content {
    flex-direction: column;
    text-align: center;
  }

  .footer-newsletter-form {
    width: 100%;
    max-width: 480px;
  }

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

  .footer-about {
    grid-column: 1 / -1;
    text-align: center;
  }

  .footer-about-text {
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
  }

  .footer-heading::after {
    left: 50%;
    transform: translateX(-50%);
  }

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

/* Mobile: 768px */
@media (max-width: 768px) {
  .footer-newsletter-section {
    padding: var(--space-xl) 0;
  }

  .footer-newsletter-title {
    font-size: var(--text-lg);
  }

  .footer-newsletter-input-group {
    flex-direction: column;
    border-radius: var(--radius-lg);
    padding: var(--space-xs);
  }

  .footer-newsletter-input {
    width: 100%;
    text-align: center;
    padding: 0.75rem;
  }

  .footer-newsletter-btn {
    width: 100%;
    border-radius: var(--radius-md);
    padding: 0.75rem;
  }

  .footer-main {
    padding: var(--space-2xl) 0;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
    text-align: center;
  }

  .footer-about {
    grid-column: 1;
  }

  .footer-about-text {
    max-width: 100%;
  }

  .footer-links {
    align-items: center;
  }

  .footer-contact-list {
    align-items: center;
  }

  .footer-contact-item {
    justify-content: center;
  }
}

/* Small Mobile: 480px */
@media (max-width: 480px) {
  .footer-bottom-inner {
    flex-direction: column;
    text-align: center;
    gap: var(--space-sm);
  }

  .footer-newsletter-icon {
    width: 48px;
    height: 48px;
    font-size: var(--text-xl);
  }

  .footer-social-link {
    width: 34px;
    height: 34px;
    font-size: var(--text-xs);
  }
}
