/* ==========================================================================
   Modern Footer Layout - Fully Mobile Responsive
   ========================================================================== */

/* ==========================================================================
   MAIN FOOTER CONTAINER
   ========================================================================== */
.modern-footer {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  color: #e2e8f0;
  margin-top: auto;
  position: relative;
  overflow: hidden;
  contain: layout style paint;
}

.modern-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, #3b82f6, transparent);
}

/* ==========================================================================
   FOOTER MAIN SECTION (Links Grid)
   ========================================================================== */
.footer-main {
  padding: 3rem 0;
  position: relative;
}

.footer-section {
  height: 100%;
  display: flex;
  flex-direction: column;
}

/* ==========================================================================
   FOOTER EXPLORE ROW (Popular Cities/Skills/Industries/Top Companies)
   ========================================================================== */
/* Design audit (2026-09-01): this secondary SEO-discovery row (Growth
   Sprint 1, Phase 2 -- see templates/base.html) previously had no rule of
   its own, so its only vertical spacing came from each column's own
   mb-4 (--space-6, 24px) -- the exact same value used *within* the
   primary footer-links row above it for spacing between related columns.
   Nothing distinguished "gap between two columns in the same row" from
   "gap between two distinct footer content groups". Generous separation
   here (--space-10, larger than any mb-4 in this footer) gives the two
   rows real rhythm without touching the tight, consistent mb-4 spacing
   within either row -- that uniformity is correct there, since those
   items genuinely are a related group. */
.footer-explore-row {
  margin-top: var(--space-10, 2.5rem);
}

/* ==========================================================================
   FOOTER BRAND (Company Info)
   ========================================================================== */
.footer-brand {
  margin-bottom: 1.5rem;
}

.brand-name {
  color: #ffffff;
  font-weight: 700;
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
}

.brand-js-icon-footer {
  background: linear-gradient(135deg, #f7df1e, #ffeb3b);
  color: #000;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 16px;
  margin-right: 12px;
  box-shadow: 0 2px 8px rgba(247, 223, 30, 0.3);
  transition: all 0.3s ease;
  will-change: transform;
}

.brand-tagline {
  color: #94a3b8;
  font-size: 0.9rem;
  margin-bottom: 0;
  font-style: italic;
}

.footer-description {
  color: #cbd5e1;
  line-height: 1.6;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}

/* ==========================================================================
   FOOTER SECTION TITLES
   ========================================================================== */
.footer-title {
  color: #ffffff;
  font-weight: 600;
  font-size: 1.1rem;
  margin-bottom: 1.2rem;
  position: relative;
  padding-bottom: 0.5rem;
}

.footer-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 30px;
  height: 2px;
  background: linear-gradient(90deg, #3b82f6, #1d4ed8);
  border-radius: 1px;
}

/* ==========================================================================
   FOOTER LINKS
   ========================================================================== */
.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  flex-grow: 1;
}

.footer-links li {
  margin-bottom: 0.6rem;
}

.footer-links a {
  color: #cbd5e1;
  text-decoration: none;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  display: inline-block;
  position: relative;
  touch-action: manipulation;
}

.footer-links a:hover,
.footer-links a:focus {
  color: #3b82f6;
  transform: translateX(5px);
  outline: none;
}

.footer-links a::before {
  content: '';
  position: absolute;
  left: -15px;
  top: 50%;
  width: 10px;
  height: 1px;
  background: #3b82f6;
  /* Design audit (2026-09-01): was `width: 0` transitioning to `width:
     10px` on hover -- animating width is a layout property, forcing a
     reflow every frame. Same visual result (a small line growing in from
     the left) via transform: scaleX() instead, which the compositor can
     animate without ever touching layout. transform-origin: left keeps
     the growth direction identical to the original (grows rightward from
     the link text, not from its own center). */
  transform: translateY(-50%) scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.footer-links a:hover::before,
.footer-links a:focus::before {
  transform: translateY(-50%) scaleX(1);
}

/* ==========================================================================
   SOCIAL LINKS
   ========================================================================== */
.social-links {
  display: flex;
  gap: 0.8rem;
  margin-top: 1.5rem;
}

.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(59, 130, 246, 0.1);
  color: #cbd5e1;
  text-decoration: none;
  border-radius: 50%;
  transition: all 0.3s ease;
  border: 1px solid rgba(59, 130, 246, 0.2);
  touch-action: manipulation;
  will-change: transform, background-color;
}

.social-link:hover,
.social-link:focus {
  background: #3b82f6;
  color: #ffffff;
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(59, 130, 246, 0.3);
  outline: none;
  text-decoration: none;
}

.social-link[aria-label*="Facebook"]:hover,
.social-link[aria-label*="Facebook"]:focus {
  background: #1877f2;
}

.social-link[aria-label*="LinkedIn"]:hover,
.social-link[aria-label*="LinkedIn"]:focus {
  background: #0077b5;
}

.social-link[aria-label*="WhJVaultApp"]:hover,
.social-link[aria-label*="WhJVaultApp"]:focus {
  background: #25d366;
}

/* ==========================================================================
   NEWSLETTER SECTION - MOBILE-FIRST RESPONSIVE DESIGN
   ========================================================================== */
.footer-newsletter {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95) 0%, rgba(30, 41, 59, 0.95) 100%);
  padding: 1rem 0;
  border-top: 1px solid rgba(59, 130, 246, 0.2);
  border-bottom: 1px solid rgba(59, 130, 246, 0.15);
  position: relative;
  overflow: visible;
  z-index: 1;
}

/* Animated background effect */
.footer-newsletter::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 20% 50%, rgba(59, 130, 246, 0.08) 0%, transparent 50%),
              radial-gradient(circle at 80% 50%, rgba(99, 102, 241, 0.06) 0%, transparent 50%);
  pointer-events: none;
  z-index: -1;
}

.newsletter-content {
  text-align: left;
  position: relative;
  z-index: 1;
  margin-bottom: 0.5rem;
}

.newsletter-title {
  color: #ffffff;
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 0.15rem;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.35rem;
}

.newsletter-title i {
  color: #3b82f6;
  font-size: 0.95rem;
  filter: drop-shadow(0 0 10px rgba(59, 130, 246, 0.5));
}

.newsletter-subtitle {
  color: #cbd5e1;
  margin-bottom: 0.15rem;
  font-size: 0.75rem;
  line-height: 1.3;
  font-weight: 400;
  max-width: 600px;
  margin-left: 0;
  margin-right: auto;
}

/* Privacy Text */
.newsletter-content .newsletter-privacy {
  color: #94a3b8 !important;
  font-size: 0.65rem !important;
  line-height: 1.2 !important;
  margin-top: 0.15rem !important;
  margin-bottom: 0 !important;
  display: block !important;
  text-align: left !important;
  font-weight: 400 !important;
  max-width: 550px !important;
  margin-left: 0 !important;
  margin-right: auto !important;
  pointer-events: none !important;
}

.newsletter-content .newsletter-privacy a {
  color: #60a5fa !important;
  text-decoration: none !important;
  font-weight: 600 !important;
  padding: 0.125rem 0.25rem !important;
  display: inline !important;
  border-radius: 4px !important;
  transition: all 0.3s ease !important;
  border-bottom: 1px solid transparent !important;
}

.newsletter-content .newsletter-privacy a:hover,
.newsletter-content .newsletter-privacy a:focus {
  color: #93c5fd !important;
  background: rgba(96, 165, 250, 0.1) !important;
  border-bottom-color: #60a5fa !important;
}

/* Newsletter Form - MOBILE-FIRST */
.newsletter-form {
  max-width: 550px;
  margin: 0;
  margin-left: 0;
  margin-right: auto;
  position: relative;
  z-index: 100;
  pointer-events: auto;
}

/* Remove duplicate privacy text after form */
.newsletter-form .newsletter-privacy {
  display: none !important;
}

/* Modern Input Group */
.newsletter-form .input-group {
  display: flex !important;
  align-items: stretch !important;
  gap: 0.75rem !important;
  border-radius: 12px !important;
  overflow: visible !important;
  background: rgba(255, 255, 255, 0.08) !important;
  border: 2px solid rgba(59, 130, 246, 0.3) !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2) !important;
  transition: all 0.3s ease !important;
  position: relative !important;
  padding: 0.5rem !important;
  z-index: 100 !important;
  pointer-events: auto !important;
}

.newsletter-form .input-group:focus-within {
  border-color: rgba(59, 130, 246, 0.6) !important;
  box-shadow: 0 8px 30px rgba(59, 130, 246, 0.3) !important;
}

/* Beautiful Newsletter Input */
.newsletter-input,
.newsletter-input.form-control {
  background: rgba(255, 255, 255, 0.1) !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  padding: 0.75rem 1rem !important;
  border-radius: 8px !important;
  transition: all 0.3s ease !important;
  flex: 1 !important;
  min-width: 0 !important;
  font-size: 0.9rem !important;
  font-weight: 500 !important;
  line-height: 1.5 !important;
  position: relative !important;
  z-index: 1000 !important;
  pointer-events: auto !important;
  touch-action: manipulation !important;
  -webkit-user-select: text !important;
  user-select: text !important;
  cursor: text !important;
}

.newsletter-input:focus,
.newsletter-input.form-control:focus {
  background: rgba(255, 255, 255, 0.15) !important;
  border-color: rgba(59, 130, 246, 0.6) !important;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15) !important;
  outline: none !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  z-index: 1000 !important;
}

.newsletter-input::placeholder {
  color: rgba(255, 255, 255, 0.5) !important;
  font-weight: 400 !important;
  -webkit-text-fill-color: rgba(255, 255, 255, 0.5) !important;
}

.newsletter-input::-webkit-input-placeholder {
  color: rgba(255, 255, 255, 0.5) !important;
  -webkit-text-fill-color: rgba(255, 255, 255, 0.5) !important;
}

.newsletter-input::-moz-placeholder {
  color: rgba(255, 255, 255, 0.5) !important;
}

/* Fix autofill styling */
.newsletter-input:-webkit-autofill,
.newsletter-input:-webkit-autofill:hover,
.newsletter-input:-webkit-autofill:focus,
.newsletter-input.form-control:-webkit-autofill,
.newsletter-input.form-control:-webkit-autofill:hover,
.newsletter-input.form-control:-webkit-autofill:focus {
  -webkit-text-fill-color: #ffffff !important;
  -webkit-box-shadow: 0 0 0 1000px rgba(59, 130, 246, 0.15) inset !important;
  box-shadow: 0 0 0 1000px rgba(59, 130, 246, 0.15) inset !important;
  color: #ffffff !important;
  caret-color: #ffffff !important;
}

/* Stunning Subscribe Button */
.btn-newsletter,
.btn.btn-newsletter {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%) !important;
  color: #ffffff !important;
  border: none !important;
  padding: 0.75rem 1.5rem !important;
  border-radius: 8px !important;
  font-weight: 600 !important;
  font-size: 0.9rem !important;
  transition: all 0.3s ease !important;
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4) !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.5rem !important;
  white-space: nowrap !important;
  cursor: pointer !important;
  min-width: auto !important;
  position: relative !important;
  z-index: 1000 !important;
  pointer-events: auto !important;
}

.btn-newsletter:hover,
.btn.btn-newsletter:hover,
.btn-newsletter:focus,
.btn.btn-newsletter:focus {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%) !important;
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.5) !important;
  color: #ffffff !important;
}

.btn-newsletter:active,
.btn.btn-newsletter:active {
  transform: translateY(0) !important;
  box-shadow: 0 2px 10px rgba(59, 130, 246, 0.3) !important;
}

.btn-newsletter[disabled],
.btn.btn-newsletter[disabled] {
  opacity: 0.6 !important;
  cursor: not-allowed !important;
  transform: none !important;
}

.btn-newsletter i {
  font-size: 0.9rem !important;
}

/* Loading State */
.btn-newsletter.loading,
.btn.btn-newsletter.loading {
  pointer-events: none !important;
  position: relative !important;
  color: transparent !important;
}

.btn-newsletter.loading::after,
.btn.btn-newsletter.loading::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  top: 50%;
  left: 50%;
  margin-left: -8px;
  margin-top: -8px;
  border: 2px solid #ffffff;
  border-radius: 50%;
  border-top-color: transparent;
  animation: spinner 0.6s linear infinite;
}

@keyframes spinner {
  to {
    transform: rotate(360deg);
  }
}

/* ==========================================================================
   TOAST NOTIFICATIONS
   ========================================================================== */
.newsletter-toast,
.toast-notification {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  min-width: 320px;
  max-width: 450px;
  padding: 1rem 1.25rem;
  border-radius: 10px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  animation: slideInRight 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.newsletter-toast.success,
.toast-notification.alert-success {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.newsletter-toast.error,
.toast-notification.alert-danger,
.toast-notification.alert-error {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.newsletter-toast i,
.toast-notification i {
  font-size: 1.25rem;
  flex-shrink: 0;
}

.newsletter-toast .toast-close,
.toast-notification .btn-close {
  margin-left: auto;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: #ffffff;
  cursor: pointer;
  font-size: 1.125rem;
  opacity: 0.9;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  transition: all 0.2s;
  line-height: 1;
}

.newsletter-toast .toast-close:hover,
.toast-notification .btn-close:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.3);
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(100px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Inline Feedback Message */
.newsletter-feedback {
  margin-top: 0.75rem;
  padding: 0.875rem 1.25rem;
  border-radius: 8px;
  font-size: 0.875rem;
  display: none;
  animation: fadeIn 0.3s ease;
  max-width: 550px;
  margin-left: auto;
  margin-right: auto;
}

.newsletter-feedback.show {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.newsletter-feedback.success {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.newsletter-feedback.error {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.newsletter-feedback i {
  font-size: 1.125rem;
  flex-shrink: 0;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==========================================================================
   FOOTER BOTTOM (Copyright)
   ========================================================================== */
.footer-bottom {
  background: rgba(15, 23, 42, 0.5);
  padding: 1.5rem 0;
}

.copyright-text {
  color: #94a3b8;
  margin-bottom: 0;
  font-size: 0.9rem;
}

.footer-meta {
  text-align: right;
}

.contact-info {
  display: flex;
  gap: 1.5rem;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.contact-item {
  color: #cbd5e1;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
}

.contact-item i {
  color: #3b82f6;
  margin-right: 0.3rem;
}

.contact-item a {
  color: #cbd5e1;
  text-decoration: none;
  transition: color 0.3s ease;
  touch-action: manipulation;
}

.contact-item a:hover,
.contact-item a:focus {
  color: #3b82f6;
  outline: none;
  text-decoration: none;
}

/* ==========================================================================
   MOBILE RESPONSIVE - PROGRESSIVE ENHANCEMENT
   ========================================================================== */

/* Large Tablets and Small Desktops (991px and below) */
@media (max-width: 991px) {
  .footer-newsletter {
    padding: 1rem 0;
  }
  
  .newsletter-content {
    text-align: center;
    margin-bottom: 0.5rem;
  }
  
  .newsletter-title {
    font-size: 0.9rem;
    justify-content: center;
  }
  
  .newsletter-subtitle {
    margin-left: auto;
    margin-right: auto;
  }
  
  .newsletter-content .newsletter-privacy {
    text-align: center !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
  
  .newsletter-form {
    max-width: 500px;
    margin: 0 auto;
  }
}

/* Tablets (768px and below) */
@media (max-width: 768px) {
  .footer-main {
    padding: 2rem 0;
  }
  
  .footer-newsletter {
    padding: 0.875rem 0;
  }
  
  .newsletter-title {
    font-size: 0.85rem;
  }
  
  .newsletter-subtitle {
    font-size: 0.7rem;
  }
  
  .newsletter-content .newsletter-privacy {
    font-size: 0.6rem !important;
  }
  
  .newsletter-form {
    max-width: 100%;
    padding: 0 1rem;
  }
  
  .newsletter-form .input-group {
    gap: 0.5rem !important;
    padding: 0.4rem !important;
  }
  
  .newsletter-input,
  .newsletter-input.form-control {
    padding: 0.65rem 0.9rem !important;
    font-size: 0.85rem !important;
  }
  
  .btn-newsletter,
  .btn.btn-newsletter {
    padding: 0.65rem 1.1rem !important;
    font-size: 0.85rem !important;
  }
  
  .footer-meta {
    text-align: center;
    margin-top: 1rem;
  }
  
  .contact-info {
    justify-content: center;
    gap: 1rem;
  }
  
  .contact-item {
    font-size: 0.8rem;
  }
  
  .social-links {
    justify-content: center;
  }
  
  .footer-links a {
    font-size: 0.85rem;
  }
  
  .footer-title {
    font-size: 1rem;
  }
  
  .toast-notification,
  .newsletter-toast {
    left: 10px;
    right: 10px;
    min-width: auto;
  }
}

/* Mobile Devices (576px and below) */
@media (max-width: 576px) {
  .footer-newsletter {
    padding: 0.875rem 0;
  }
  
  .brand-name {
    font-size: 1.3rem;
  }
  
  .newsletter-title {
    font-size: 0.85rem;
    flex-direction: row;
    gap: 0.25rem;
  }
  
  .newsletter-title i {
    font-size: 0.85rem;
  }
  
  .newsletter-subtitle {
    font-size: 0.7rem;
  }
  
  .newsletter-content .newsletter-privacy {
    font-size: 0.6rem !important;
  }
  
  /* Stack input and button vertically on small mobile */
  .newsletter-form .input-group {
    flex-direction: column !important;
    gap: 0.65rem !important;
    padding: 0.65rem !important;
    border-radius: 10px !important;
  }
  
  .newsletter-input,
  .newsletter-input.form-control {
    width: 100% !important;
    min-width: 100% !important;
    padding: 0.75rem 0.9rem !important;
    font-size: 0.85rem !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
  }
  
  .btn-newsletter,
  .btn.btn-newsletter {
    width: 100% !important;
    padding: 0.75rem 1rem !important;
    font-size: 0.85rem !important;
  }
  
  .contact-info {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .footer-section {
    margin-bottom: 2rem;
  }
  
  .newsletter-feedback {
    max-width: 100% !important;
    margin-left: 1rem !important;
    margin-right: 1rem !important;
  }
}

/* Extra Small Mobile (400px and below) */
@media (max-width: 400px) {
  .newsletter-title {
    font-size: 0.8rem;
  }
  
  .newsletter-subtitle {
    font-size: 0.65rem;
  }
  
  .newsletter-input,
  .newsletter-input.form-control {
    padding: 0.7rem 0.85rem !important;
    font-size: 0.8rem !important;
  }
  
  .btn-newsletter,
  .btn.btn-newsletter {
    padding: 0.7rem 0.9rem !important;
    font-size: 0.8rem !important;
  }
  
  .footer-newsletter {
    padding: 0.75rem 0;
  }
}

/* ==========================================================================
   ACCESSIBILITY & PERFORMANCE
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  .social-link,
  .footer-links a,
  .newsletter-input,
  .btn-newsletter,
  .brand-js-icon-footer,
  .newsletter-toast,
  .toast-notification,
  .newsletter-feedback,
  .newsletter-form .input-group {
    transition: none;
    animation: none;
  }
  
  .social-link:hover,
  .footer-links a:hover,
  .btn-newsletter:hover,
  .newsletter-form .input-group:focus-within {
    transform: none;
  }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
  .modern-footer {
    background: #000;
    color: #fff;
  }
  
  .footer-links a,
  .social-link,
  .newsletter-input {
    border: 2px solid #fff;
  }
  
  .btn-newsletter {
    background: #fff !important;
    color: #000 !important;
  }
}

/* Print Styles */
@media print {
  .modern-footer {
    background: none;
    color: #000;
  }
  
  .social-links,
  .newsletter-form {
    display: none;
  }
  
  .footer-links a {
    color: #000;
  }
}

/* Hide visually but keep for screen readers */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}