/**
 * ToolVault Footer Styles
 * Responsive footer component for all screen sizes
 */

/* Footer Base Styles */
footer {
  background-color: #edf2f7; /* Dark background */
  color: black; /* White text */
  padding: 40px 0 20px;
  margin-top: auto;
}

footer .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Footer Grid Layout */
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr 1fr 1.5fr;
  gap: 30px;
  margin-bottom: 40px;
  align-items: start;
}

/* Ensure no wrapping on large screens */
@media (min-width: 1025px) {
  .footer-grid {
    grid-template-columns: 1.5fr 0.9fr 1fr 1fr 1fr 1.5fr;
    gap: 25px;
  }
}

@media (min-width: 1200px) {
  .footer-grid {
    grid-template-columns: 1.8fr 1fr 1fr 1fr 1fr 1.6fr;
    gap: 35px;
  }
}

@media (min-width: 1400px) {
  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr 1fr 1fr 1.8fr;
    gap: 40px;
  }
}

/* Footer Columns */
.footer-col h4 {
  color: black;
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 16px;
  position: relative;
  white-space: nowrap;
}

.footer-col h4::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -8px;
  width: 30px;
  height: 2px;
  background: linear-gradient(45deg, #6366f1, #8b5cf6);
}

.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

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

.footer-col ul li a {
  color: black;
  text-decoration: none;
  font-size: 13px;
  transition: all 0.3s ease;
  display: inline-block;
  white-space: nowrap;
}

@media (min-width: 1200px) {
  .footer-col ul li a {
    font-size: 14px;
  }
}

.footer-col ul li a:hover {
  color: #6366f1;
  transform: translateX(5px);
}

/* Footer About Section */
.footer-about .footer-logo {
  font-size: 24px;
  font-weight: bold;
  margin-bottom: 12px;
  background: linear-gradient(45deg, #6366f1, #8b5cf6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.footer-about .footer-logo i {
  margin-right: 10px;
  background: linear-gradient(45deg, #6366f1, #8b5cf6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.footer-tagline {
  color: #060606;
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 20px;
  max-width: 90%;
}

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

.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.1);
  color: #020202;
  border-radius: 50%;
  text-decoration: none;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.footer-social a:hover {
  background: linear-gradient(45deg, #6366f1, #8b5cf6);
  color: white;
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

/* Newsletter Section */
.footer-newsletter p {
  color: #252323;
  margin-bottom: 12px;
  font-size: 12px;
  line-height: 1.3;
}

.footer-newsletter .newsletter-subtitle {
  max-width: 200px;
  white-space: normal;
}

/* Keep newsletter compact on large screens */
@media (min-width: 1025px) {
  .footer-newsletter .newsletter-subtitle {
    font-size: 11px;
    line-height: 1.3;
    max-width: 180px;
  }
}

@media (min-width: 1200px) {
  .footer-newsletter .newsletter-subtitle {
    font-size: 12px;
    max-width: 200px;
  }
}

@media (min-width: 1400px) {
  .footer-newsletter p {
    font-size: 13px;
  }
  
  .footer-newsletter .newsletter-subtitle {
    max-width: 220px;
  }
}

.newsletter-form .input-group {
  display: flex;
  margin-bottom: 10px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  overflow: hidden;
  backdrop-filter: blur(10px);
  border: 2px solid rgba(99, 102, 241, 0.2);
  transition: all 0.3s ease;
  max-width: 100%;
}

.newsletter-form .input-group:focus-within {
  border-color: rgba(99, 102, 241, 0.5);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.newsletter-form input[type="email"] {
  flex: 1;
  padding: 8px 10px;
  border: none;
  background: transparent;
  color: rgb(16, 15, 15);
  font-size: 12px;
  outline: none;
  min-width: 0;
  width: 100%;
}

@media (min-width: 1200px) {
  .newsletter-form input[type="email"] {
    padding: 10px 12px;
    font-size: 13px;
  }
}

.newsletter-form input[type="email"]::placeholder {
  color: #3d3a3a;
}

.newsletter-form .btn-primary,
.newsletter-form .btn-submit {
  background: linear-gradient(45deg, #6366f1, #8b5cf6);
  border: none;
  padding: 8px 16px;
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.newsletter-form .btn-primary:hover,
.newsletter-form .btn-submit:hover {
  background: linear-gradient(45deg, #5856eb, #7c3aed);
  transform: scale(1.05);
}

@media (min-width: 1200px) {
  .newsletter-form .btn-primary,
  .newsletter-form .btn-submit {
    padding: 10px 18px;
    font-size: 15px;
  }
}

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

.copyright p {
  color: #060606;
  font-size: 14px;
  margin: 0;
}

.footer-links {
  display: flex;
  gap: 30px;
}

.footer-links a {
  color: #0e0d0d;
  text-decoration: none;
  font-size: 14px;
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: #6366f1;
}

/* Back to Top Button */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: linear-gradient(45deg, #6366f1, #8b5cf6);
  color: white;
  border: none;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 1000;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.back-to-top:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
}

/* Responsive Design */

/* Tablet Styles */
@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr 1fr 1fr 1.5fr;
    gap: 30px;
  }
  
  footer {
    padding: 50px 0 20px;
  }
}

/* Small Tablet Styles */
@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 30px;
  }
  
  .footer-about {
    grid-column: 1 / -1;
    text-align: center;
    margin-bottom: 20px;
  }
  
  .footer-newsletter {
    grid-column: 1 / -1;
    margin-top: 20px;
  }
  
  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: 15px;
  }
  
  .footer-links {
    gap: 20px;
  }
  
  .back-to-top {
    bottom: 20px;
    right: 20px;
    width: 45px;
    height: 45px;
  }
}

/* Mobile Styles */
@media (max-width: 480px) {
  .footer-grid,
  .footer-columns,
  .footer-content {
    grid-template-columns: 1fr !important;
    flex-direction: column !important;
  }

  .footer-brand,
  .footer-links,
  .footer-section {
    width: 100% !important;
    min-width: unset !important;
  }

  footer {
    padding: 40px 0 20px;
  }
  
  footer .container {
    padding: 0 15px;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 25px;
  }
  
  .footer-about {
    grid-column: auto;
    margin-bottom: 0;
  }
  
  .footer-about .footer-logo {
    font-size: 24px;
  }
  
  .footer-col h4 {
    font-size: 16px;
    margin-bottom: 15px;
  }
  
  .footer-social {
    justify-content: center;
    gap: 12px;
  }
  
  .footer-social a {
    width: 36px;
    height: 36px;
  }
  
  .newsletter-form .input-group {
    flex-direction: column;
    border-radius: 6px;
  }
  
  .newsletter-form input[type="email"] {
    border-radius: 6px 6px 0 0;
  }
  
  .newsletter-form .btn-primary {
    border-radius: 0 0 6px 6px;
    padding: 15px;
  }
  
  .footer-links {
    flex-direction: column;
    gap: 10px;
    align-items: center;
  }
  
  .back-to-top {
    bottom: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
  }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
  footer {
    background: linear-gradient(135deg, #0f0f0f 0%, #1a1a1a 100%);
  }
}

/* Animation for loading */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

footer {
  animation: fadeInUp 0.6s ease;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  footer {
    background: #000000;
    border-top: 2px solid #ffffff;
  }
  
  .footer-col ul li a {
    color: #ffffff;
  }
  
  .footer-col ul li a:hover {
    color: #ffff00;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  footer,
  .footer-col ul li a,
  .footer-social a,
  .back-to-top {
    transition: none;
    animation: none;
  }
}