/* Mobile-responsive footer styles for light theme */

/* Sticky Footer Layout - Ensures footer stays at bottom */
html, body {
  height: 100%;
}

body {
  display: flex;
  flex-direction: column;
}

/* Main content wrapper should grow to fill available space */
.main-content {
  flex: 1 0 auto;
}

/* Base footer styles for light theme */
.footer {
  background-color: #f8f9fa;
  border-top: 1px solid #dee2e6;
  padding: 2rem 0;
  flex-shrink: 0; /* Prevent footer from shrinking */
  margin-top: auto; /* Push footer to bottom when content is short */
}

.footer-text {
  color: #6c757d;
}

.footer-link {
  color: #495057;
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-link:hover {
  color: #0d6efd;
}

.footer-social-link {
  color: #495057;
  text-decoration: none;
  transition: color 0.2s ease, transform 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: rgba(13, 110, 253, 0.1);
}

.footer-social-link:hover {
  color: #0d6efd;
  transform: translateY(-2px);
  background-color: rgba(13, 110, 253, 0.2);
}

.footer-heading {
  color: #212529;
  font-weight: 600;
  font-size: 0.95rem;
}

.footer-links {
  font-size: 0.875rem;
}

/* Mobile-specific footer improvements */
@media (max-width: 767px) {
  .footer {
    padding: 1.5rem 0;
  }
  
  .footer-text {
    font-size: 0.9rem;
    line-height: 1.5;
  }
  
  .footer-heading {
    font-size: 0.9rem;
    margin-bottom: 0.75rem !important;
  }
  
  .footer-links {
    font-size: 0.8rem;
  }
  
  .footer-links li {
    margin-bottom: 0.5rem !important;
  }
  
  .footer-social-link {
    width: 44px;
    height: 44px;
  }
  
  .footer-social-link i {
    font-size: 1.1rem !important;
  }
  
  /* Improve touch targets on mobile */
  .footer-link {
    display: inline-block;
    padding: 0.25rem 0;
    min-height: 44px;
    line-height: 1.2;
  }
}

/* Extra small screens */
@media (max-width: 480px) {
  .footer {
    padding: 1.25rem 0;
  }
  
  .footer-text {
    font-size: 0.85rem;
  }
  
  .footer-heading {
    font-size: 0.85rem;
  }
  
  .footer-links {
    font-size: 0.75rem;
  }
  
  /* Compact layout for very small screens */
  .footer .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

/* Tablet landscape improvements */
@media (min-width: 768px) and (max-width: 991px) {
  .footer {
    padding: 1.75rem 0;
  }
  
  .footer-heading {
    font-size: 0.9rem;
  }
  
  .footer-links {
    font-size: 0.8rem;
  }
}

/* Dark theme support for sticky footer */
[data-bs-theme="dark"] .footer {
  background-color: #212529;
  border-top: 1px solid #495057;
}

[data-bs-theme="dark"] .footer-text {
  color: #adb5bd;
}

[data-bs-theme="dark"] .footer-link {
  color: #dee2e6;
}

[data-bs-theme="dark"] .footer-link:hover {
  color: #0d6efd;
}

[data-bs-theme="dark"] .footer-social-link {
  color: #dee2e6;
  background-color: rgba(13, 110, 253, 0.15);
}

[data-bs-theme="dark"] .footer-social-link:hover {
  color: #0d6efd;
  background-color: rgba(13, 110, 253, 0.25);
}

[data-bs-theme="dark"] .footer-heading {
  color: #f8f9fa;
}

/* Ensure sticky footer works with various page layouts */
.main-content {
  min-height: 0; /* Allow content to shrink if needed */
}

/* Fix for pages with full-height containers */
.main-content .container-fluid,
.main-content .container {
  min-height: auto;
}

/* Ensure footer positioning works with modals and overlays */
body.modal-open {
  overflow: hidden;
}

/* Additional responsive improvements */
@media (max-width: 575px) {
  .main-content {
    padding-bottom: 1rem;
  }
  
  .footer {
    padding: 1rem 0;
  }
}

/* Targeted fix for pages with short content */
.short-content-page {
  min-height: calc(100vh - 250px); /* Account for navbar and footer */
}

/* Ensure the targeted fix works on mobile */
@media (max-width: 767px) {
  .short-content-page {
    min-height: calc(100vh - 200px);
  }
}
