/* ==========================================
   FreePDFWorld - Enterprise Footer (v2)
   - Extracted from common/footer.jsp inline styles
   - Scoped to .enterprise-footer to avoid side effects
   ========================================== */

.enterprise-footer {
  background: #0f172a;
  color: #94a3b8;
  margin-top: 5rem;
  position: relative;
}

/* NEW: Brand logo (SVG) */
.enterprise-footer .footer-brand-link {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  margin-bottom: 0.75rem;

  /* Rounded logo container (clips SVG edges) */
  border-radius: 14px;
  overflow: hidden;
  line-height: 0;
}

.enterprise-footer .footer-brand-logo {
  height: 40px;
  width: auto;
  max-width: 220px;
  display: block;

  /* Ensure corners are rounded even when printed/aliased */
  border-radius: 14px;
}

/* Logo theme switching in footer */
.enterprise-footer .footer-brand-logo.logo-dark,
.mobile-footer-logo .logo-dark { display: none; }
.enterprise-footer .footer-brand-logo.logo-light,
.mobile-footer-logo .logo-light { display: block; }
[data-theme="dark"] .enterprise-footer .footer-brand-logo.logo-dark,
[data-theme="dark"] .mobile-footer-logo .logo-dark  { display: block; }
[data-theme="dark"] .enterprise-footer .footer-brand-logo.logo-light,
[data-theme="dark"] .mobile-footer-logo .logo-light { display: none; }

/* Keep old icon+text as fallback, but avoid double-branding on larger screens */
@media (min-width: 768px) {
  .enterprise-footer .brand-logo-text {
    display: none;
  }
}

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

.enterprise-footer .footer-content {
  padding: 2.5rem 0 1.5rem;
}

/* Brand */
.enterprise-footer .footer-brand { margin-bottom: 1rem; }
.enterprise-footer .brand-logo-text { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.75rem; }
.enterprise-footer .brand-logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1rem;
  box-shadow: 0 10px 25px rgba(59,130,246,.25);
}
.enterprise-footer .footer-brand h3 { color: white; font-weight: 800; font-size: 1.35rem; margin: 0; }
.enterprise-footer .footer-brand h3 span { color: #3b82f6; }
.enterprise-footer .brand-desc { color: #94a3b8; font-size: 0.875rem; line-height: 1.55; margin-bottom: 1rem; }

/* Social */
.enterprise-footer .social-links { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.enterprise-footer .social-links a {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: rgba(255,255,255,0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  transition: transform .18s ease, background .18s ease, color .18s ease;
  text-decoration: none;
}
.enterprise-footer .social-links a:hover {
  background: #3b82f6;
  color: white;
  transform: translateY(-2px);
}

/* Columns/Grid */
.enterprise-footer .footer-links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1.75rem;
}

/* NEW: Prevent grid children from forcing overflow on mobile */
.enterprise-footer .footer-links-grid > * {
  min-width: 0;
}

.enterprise-footer .link-column {
  min-width: 0;
}

.enterprise-footer .link-column ul a {
  /* allow wrapping if translations are long */
  white-space: normal;
}

.enterprise-footer .link-column h5 {
  color: white;
  font-weight: 800;
  font-size: 0.95rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.375rem;
  position: relative;
}

.enterprise-footer .link-column h5::after {
  display: none;
}

.enterprise-footer .link-column h6 {
  color: white;
  font-weight: 700;
  font-size: 0.875rem;
  margin: 0.875rem 0 0.5rem;
}

.enterprise-footer .link-column ul { list-style: none; padding: 0; margin: 0; }
.enterprise-footer .link-column ul li { margin-bottom: 0.3125rem; }
.enterprise-footer .link-column ul a {
  color: #94a3b8;
  text-decoration: none;
  font-size: 0.875rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: transform .18s ease, color .18s ease;
  padding: 0.1875rem 0;
}

.enterprise-footer .link-column ul a:hover {
  color: white;
  transform: translateX(3px);
}

.enterprise-footer .link-column ul a i {
  font-size: 0.8125rem;
  width: 16px;
  text-align: center;
}

/* Icon accent colors */
.enterprise-footer .link-column ul a i.fa-home { color: #3b82f6; }
.enterprise-footer .link-column ul a i.fa-info-circle { color: #8b5cf6; }
.enterprise-footer .link-column ul a i.fa-envelope { color: #10b981; }
.enterprise-footer .link-column ul a i.fa-shield-alt { color: #f59e0b; }
.enterprise-footer .link-column ul a i.fa-file-contract { color: #6366f1; }
.enterprise-footer .link-column ul a i.fa-file-word { color: #2563eb; }
.enterprise-footer .link-column ul a i.fa-file-pdf { color: #ef4444; }
.enterprise-footer .link-column ul a i.fa-lock { color: #f97316; }
.enterprise-footer .link-column ul a i.fa-unlock { color: #10b981; }
.enterprise-footer .link-column ul a i.fa-signature { color: #a78bfa; }
.enterprise-footer .link-column ul a i.fa-eraser { color: #ec4899; }
.enterprise-footer .link-column ul a i.fa-compress-alt { color: #06b6d4; }

.enterprise-footer .link-column ul.features li {
  font-size: 0.8125rem;
  display: flex;
  align-items: center;
  gap: 0.3125rem;
  margin-bottom: 0.25rem;
}
.enterprise-footer .link-column ul.features i { color: #10b981; font-size: 0.6875rem; }

/* App store badges (placeholders) */
.enterprise-footer .app-badges {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.enterprise-footer .app-badge {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0.875rem;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.06);
  color: #e5e7eb;
  text-decoration: none;
  transition: transform .18s ease, background .18s ease, border-color .18s ease;
}

.enterprise-footer .app-badge:hover {
  transform: translateY(-2px);
  background: rgba(255,255,255,0.09);
  border-color: rgba(59,130,246,.5);
  color: #fff;
}

.enterprise-footer .app-badge__icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(59,130,246,.18);
  color: #93c5fd;
  flex-shrink: 0;
}

.enterprise-footer .app-badge__text { display: flex; flex-direction: column; line-height: 1.1; }
.enterprise-footer .app-badge__text small { font-size: 0.7rem; color: #a7b3c6; }
.enterprise-footer .app-badge__text strong { font-size: 0.9rem; font-weight: 800; color: #fff; }

/* Footer bottom */
.enterprise-footer .footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 0.875rem 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8125rem;
  color: #64748b;
  flex-wrap: wrap;
  gap: 1rem;
}

.enterprise-footer .copyright strong { color: white; }
.enterprise-footer .tagline i { color: #ef4444; margin: 0 0.25rem; }

/* Language selector */
.enterprise-footer .footer-language-selector { position: relative; z-index: 100; }
.enterprise-footer .footer-language-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px;
  color: #94a3b8;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.875rem;
}
.enterprise-footer .footer-language-btn:hover { background: rgba(255,255,255,0.10); border-color: #3b82f6; color: white; }
.enterprise-footer .footer-language-btn i.fa-globe { color: #3b82f6; }
.enterprise-footer .footer-language-btn i.fa-chevron-down { font-size: 0.75rem; transition: transform 0.2s ease; }
.enterprise-footer .footer-language-btn.active i.fa-chevron-down { transform: rotate(180deg); }

.enterprise-footer .footer-language-dropdown {
  position: absolute;
  bottom: calc(100% + 0.5rem);
  left: 50%;
  transform: translateX(-50%);
  background: white;
  border-radius: 12px;
  box-shadow: 0 -10px 25px rgba(0, 0, 0, 0.15);
  min-width: 240px;
  max-height: 350px;
  overflow-y: auto;
  padding: 0.5rem;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: all 0.2s ease;
  z-index: 10000;
  border: 1px solid #e5e7eb;
}
.enterprise-footer .footer-language-dropdown.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(-5px);
}
.enterprise-footer .footer-lang-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.625rem 0.875rem;
  color: #374151;
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.15s ease;
  font-size: 0.875rem;
}
.enterprise-footer .footer-lang-option:hover { background: #f0f9ff; color: #1e40af; }
.enterprise-footer .footer-lang-option .flag-icon { font-size: 1.25rem; }
.enterprise-footer .footer-lang-option.active { background: #dbeafe; color: #1e40af; }
.enterprise-footer .footer-lang-option.active i.fa-check { color: #10b981; }
.enterprise-footer .footer-lang-option:not(.active) i.fa-check { display: none; }

/* Scroll Progress Bar - Top Line */
.scroll-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 99999;
  background: rgba(0, 0, 0, 0.1);
}
.scroll-progress-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #2563eb, #7c3aed);
  transition: width 0.1s ease;
}
[data-theme="dark"] .scroll-progress-bar {
  background: rgba(255, 255, 255, 0.1);
}
[data-theme="dark"] .scroll-progress-fill {
  background: linear-gradient(90deg, #3b82f6, #8b5cf6);
}

/* Scroll to Top Button - Global */
.scroll-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, #2563eb, #1e40af);
  border: none;
  border-radius: 50%;
  color: white;
  font-size: 1.25rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 25px rgba(37, 99, 235, 0.4);
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1000;
}
.scroll-top::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 50%;
  background: inherit;
  filter: blur(15px);
  opacity: 0.5;
  z-index: -1;
}
.scroll-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.scroll-top:hover {
  background: linear-gradient(135deg, #1e40af, #1e3a8a);
  transform: translateY(-5px);
  box-shadow: 0 12px 35px rgba(37, 99, 235, 0.5);
}
[data-theme="dark"] .scroll-top {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
}
[data-theme="dark"] .scroll-top:hover {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
}

/* Responsive */
@media (max-width: 1200px) {
  .enterprise-footer .footer-links-grid { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 1.5rem; }
}

@media (max-width: 991px) {
  .enterprise-footer .footer-links-grid { grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
}

@media (max-width: 768px) {
  /* Ensure logo stays centered and doesn’t overflow */
  .enterprise-footer .footer-brand-link {
    justify-content: center;
    width: 100%;
  }

  .enterprise-footer .footer-brand-logo {
    height: 36px;
    max-width: min(240px, 80vw);
  }

  .enterprise-footer .footer-content { padding: 2rem 0 1rem; }
  .enterprise-footer .footer-brand {
    text-align: center;
    padding-bottom: 1.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
  }
  .enterprise-footer .brand-logo-text { justify-content: center; margin-bottom: 0.625rem; }
  .enterprise-footer .brand-logo-icon { width: 32px; height: 32px; font-size: 0.875rem; }
  .enterprise-footer .footer-brand h3 { font-size: 1.25rem; }
  .enterprise-footer .brand-desc { font-size: 0.8125rem; margin-bottom: 0.875rem; }
  .enterprise-footer .social-links { justify-content: center; gap: 0.625rem; }
  .enterprise-footer .social-links a { width: 36px; height: 36px; }

  .enterprise-footer .footer-links-grid { grid-template-columns: repeat(2, 1fr); gap: 1rem 0.875rem; }
  .enterprise-footer .footer-bottom {
    flex-direction: column;
    gap: 0.625rem;
    padding: 0.75rem 0;
    text-align: center;
    font-size: 0.75rem;
  }
  .enterprise-footer .footer-language-selector { order: -1; }
  .enterprise-footer .footer-language-btn { padding: 0.5rem 0.875rem; font-size: 0.8125rem; }
  .enterprise-footer .footer-language-dropdown { left: 50%; transform: translateX(-50%); }
  .scroll-top { width: 44px; height: 44px; bottom: 1rem; right: 1rem; font-size: 1rem; }
}

@media (max-width: 575px) {
  .enterprise-footer .footer-content { padding: 1.5rem 0 0.75rem; }

  /* Single column layout on small phones */
  .enterprise-footer .footer-links-grid { grid-template-columns: 1fr; gap: 1rem; }

  .enterprise-footer .footer-brand-logo {
    height: 34px;
    max-width: min(220px, 82vw);
  }

  .enterprise-footer .footer-bottom { font-size: 0.6875rem; padding: 0.625rem 0; }
  .scroll-top { width: 40px; height: 40px; font-size: 0.9375rem; }
}

/* Hide mobile footer logo on desktop */
@media (min-width: 769px) {
  .mobile-footer-logo {
    display: none !important;
  }
}

