/*--------------------------------------------------------------
# Responsive Footer with Collapsible Sections
--------------------------------------------------------------*/

/* Footer heading with toggle icon */
.footer-links .footer-heading {
  position: relative;
  cursor: pointer;
  user-select: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-right: 20px;
}

.footer-links .toggle-icon {
  font-size: 14px;
  transition: transform 0.3s ease;
  display: none; /* Hidden on desktop */
}

/* Modern Newsletter Form */
.modern-newsletter-form {
  margin-top: 15px;
}

.modern-newsletter-form .input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  background: #fff;
  border: 2px solid #e5e7eb;
  border-radius: 50px;
  padding: 4px;
  transition: all 0.3s ease;
  overflow: hidden;
}

.modern-newsletter-form .input-wrapper:focus-within {
  border-color: var(--accent-color);
  box-shadow: 0 0 0 4px rgba(5, 150, 105, 0.1);
}

.modern-newsletter-form .input-icon {
  position: absolute;
  left: 18px;
  color: #9ca3af;
  font-size: 16px;
  z-index: 1;
  transition: color 0.3s ease;
}

.modern-newsletter-form .input-wrapper:focus-within .input-icon {
  color: var(--accent-color);
}

.modern-newsletter-form input[type="email"] {
  flex: 1;
  border: none;
  outline: none;
  padding: 12px 12px 12px 45px;
  font-size: 14px;
  color: var(--default-color);
  background: transparent;
  min-width: 0;
}

.modern-newsletter-form input[type="email"]::placeholder {
  color: #9ca3af;
}

.modern-newsletter-form .subscribe-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--accent-color);
  color: #fff;
  border: none;
  border-radius: 50px;
  padding: 11px 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

.modern-newsletter-form .subscribe-btn:hover {
  background: color-mix(in srgb, var(--accent-color), #000 15%);
  transform: translateX(2px);
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.3);
}

.modern-newsletter-form .btn-icon {
  font-size: 16px;
  transition: transform 0.3s ease;
}

.modern-newsletter-form .subscribe-btn:hover .btn-icon {
  transform: translateX(3px);
}

/* Mobile adjustments for newsletter */
@media (max-width: 576px) {
  .modern-newsletter-form .input-wrapper {
    flex-direction: column;
    border-radius: 12px;
    padding: 8px;
  }
  
  .modern-newsletter-form input[type="email"] {
    padding: 12px 12px 12px 45px;
    width: 100%;
  }
  
  .modern-newsletter-form .subscribe-btn {
    width: 100%;
    justify-content: center;
    margin-top: 8px;
    border-radius: 8px;
  }
  
  .modern-newsletter-form .input-icon {
    top: 20px;
  }
}

/* Show toggle icon only on mobile */
@media (max-width: 991px) {
  .footer-links .toggle-icon {
    display: inline-block;
  }
  
  .footer-links .footer-heading[aria-expanded="true"] .toggle-icon {
    transform: rotate(180deg);
  }
  
  /* Make footer sections collapsible on mobile */
  .footer-links .collapse {
    transition: height 0.35s ease;
  }
  
  .footer-links .collapse:not(.show) {
    display: none;
  }
  
  /* Add border between sections on mobile */
  .footer-links {
    border-bottom: 1px solid color-mix(in srgb, var(--default-color), transparent 90%);
    padding-bottom: 15px;
    margin-bottom: 15px;
  }
  
  .footer-links:last-child {
    border-bottom: none;
  }
  
  /* Adjust heading padding on mobile */
  .footer-links .footer-heading {
    padding: 10px 0;
  }
  
  /* Smooth collapse animation */
  .footer-links ul,
  .footer-links > div {
    overflow: hidden;
  }
}

/* Desktop: always show content, no collapse */
@media (min-width: 992px) {
  .footer-links .collapse {
    display: block !important;
    height: auto !important;
  }
  
  .footer-links .footer-heading {
    cursor: default;
    pointer-events: none;
  }
}

/* Mobile footer adjustments */
@media (max-width: 767px) {
  .footer-top {
    padding-bottom: 30px;
  }
  
  .footer-about {
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid color-mix(in srgb, var(--default-color), transparent 90%);
  }
  
  /* Stack sections vertically on mobile */
  .footer-links {
    width: 100%;
  }
  
  /* Adjust spacing */
  .footer .footer-contact p {
    margin-bottom: 8px;
  }
  
  .footer .social-links {
    margin-top: 20px;
  }
}

/* Tablet adjustments */
@media (min-width: 768px) and (max-width: 991px) {
  .footer-links {
    margin-bottom: 25px;
  }
}

/* Animation for collapsing */
@keyframes slideDown {
  from {
    opacity: 0;
    max-height: 0;
  }
  to {
    opacity: 1;
    max-height: 500px;
  }
}

@keyframes slideUp {
  from {
    opacity: 1;
    max-height: 500px;
  }
  to {
    opacity: 0;
    max-height: 0;
  }
}

.footer-links .collapsing {
  transition: height 0.35s ease, opacity 0.35s ease;
}
