/**
 * Premium enterprise footer — visible gradient background + glass cards
 * Preserve: #newsletter-form, #newsletter-email, #newsletter-result,
 *           .footer-bottom-links, #policyModal, csrf/email fields
 */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main { flex: 1 0 auto; }

.full-width-section {
  width: 100%;
  position: relative;
}

.max-width-1400 {
  max-width: 1400px;
  margin-left: auto;
  margin-right: auto;
}

/* ===== Footer shell ===== */
footer.premium-footer {
  --ft-bg: linear-gradient(180deg, #F8FAFC 0%, #EEF2F7 100%);
  --ft-bg-solid: #F8FAFC;
  --ft-glass: rgba(255, 255, 255, 0.72);
  --ft-glass-border: rgba(148, 163, 184, 0.28);
  --ft-card: #ffffff;
  --ft-border: #e2e8f0;
  --ft-text: #475569;
  --ft-muted: #64748b;
  --ft-heading: #111827;
  --ft-accent: #2563eb;
  --ft-accent-2: #7c3aed;
  --ft-dev: #2563eb;
  --ft-dev-hover: #1d4ed8;
  --ft-bottom-bg: #E2E8F0;
  --ft-radius: 16px;
  --ft-ease: 0.3s ease;
  --ft-shadow: 0 8px 24px rgba(15, 23, 42, 0.07);
  position: relative;
  isolation: isolate;
  font-family: 'Poppins', system-ui, -apple-system, sans-serif;
  background: linear-gradient(180deg, #F8FAFC 0%, #EEF2F7 100%) !important;
  color: var(--ft-text) !important;
  margin-top: auto !important;
  padding: 0 !important;
  border: 0 !important;
  height: auto !important;
  min-height: auto !important;
  max-height: none !important;
  overflow-x: clip;
  flex: 0 0 auto !important;
  font-size: 13px;
}

/* 4px blue → purple top border (pseudo avoids border-image bg bugs) */
footer.premium-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  z-index: 2;
  background: linear-gradient(90deg, #2563eb 0%, #7c3aed 100%);
  pointer-events: none;
}

[data-theme="dark"] footer.premium-footer,
body.dark-mode footer.premium-footer,
html[data-theme="dark"] footer.premium-footer,
[data-bs-theme="dark"] footer.premium-footer,
html[data-bs-theme="dark"] footer.premium-footer {
  --ft-bg: linear-gradient(180deg, #111827 0%, #0F172A 100%);
  --ft-bg-solid: #0F172A;
  --ft-glass: rgba(255, 255, 255, 0.08);
  --ft-glass-border: rgba(255, 255, 255, 0.12);
  --ft-card: #1e293b;
  --ft-border: #334155;
  --ft-text: #CBD5E1;
  --ft-muted: #94a3b8;
  --ft-heading: #ffffff;
  --ft-dev: #60a5fa;
  --ft-dev-hover: #93c5fd;
  --ft-bottom-bg: #020617;
  --ft-shadow: 0 12px 36px rgba(0, 0, 0, 0.4);
  background: linear-gradient(180deg, #111827 0%, #0F172A 100%) !important;
  color: var(--ft-text) !important;
}

.footer-main {
  padding: 60px 0 20px !important;
  margin: 0 !important;
  background: transparent;
  height: auto !important;
  min-height: auto !important;
}

.footer-container {
  max-width: 1400px;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
  padding-bottom: 0 !important;
}

/* ===== Columns — full-width Bootstrap 12 grid ===== */
.footer-row {
  --bs-gutter-x: 2rem;
  --bs-gutter-y: 1.25rem;
  align-items: flex-start !important;
  margin-bottom: 0 !important;
}

.footer-widget {
  height: auto !important;
  min-height: 0 !important;
  margin-bottom: 0;
}

.footer-widget h4 {
  color: var(--ft-heading);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 0.65rem;
  line-height: 1.3;
}

footer.premium-footer .footer-widget h4::after {
  display: none !important;
}

/* Glass cards — About / Contact */
.footer-card {
  background: var(--ft-glass);
  border: 1px solid var(--ft-glass-border);
  border-radius: var(--ft-radius);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  box-shadow: var(--ft-shadow);
  padding: 1rem 1.05rem 1.05rem;
  margin-bottom: 0;
  height: auto !important;
  transition: transform var(--ft-ease), box-shadow var(--ft-ease);
}

.footer-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.1);
}

.footer-brand-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  text-decoration: none;
  color: var(--ft-heading);
}

.footer-brand-logo img {
  max-height: 40px;
  width: auto;
  object-fit: contain;
}

.footer-brand-logo .brand-text {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--ft-heading);
}

.about-content {
  color: var(--ft-text);
  font-size: 13px;
  line-height: 1.55;
  margin: 0 0 0.65rem;
  max-width: none;
}

/* Trust badges */
.footer-trust-mini {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin: 0 0 0.7rem;
}

.footer-trust-mini span {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.22rem 0.45rem;
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--ft-heading);
  background: color-mix(in srgb, var(--ft-bg-solid) 55%, transparent);
  border: 1px solid var(--ft-glass-border);
  transition: transform var(--ft-ease);
}

.footer-trust-mini span i {
  font-size: 0.75rem;
  color: var(--ft-accent);
}

.footer-trust-mini span:hover { transform: translateY(-1px); }

/* Social — compact circular + gradient */
.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.75rem;
}

.social-links a {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  border: 0;
  text-decoration: none;
  font-size: 0.95rem;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
  transition: transform var(--ft-ease), box-shadow var(--ft-ease);
}

.social-links a:hover {
  transform: translateY(-3px) scale(1.08);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.16), 0 10px 22px rgba(124, 58, 237, 0.35);
}

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

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

.footer-links a {
  position: relative;
  color: var(--ft-text);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color var(--ft-ease);
  display: inline-block;
}

.footer-links a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 1.5px;
  background: var(--ft-accent);
  transition: width var(--ft-ease);
}

.footer-links a:hover {
  color: var(--ft-accent);
}

.footer-links a:hover::after { width: 100%; }

/* Contact mini-cards */
.contact-info {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.contact-info .contact-card {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin: 0;
  padding: 0.45rem 0.55rem;
  border-radius: 10px;
  background: color-mix(in srgb, var(--ft-bg-solid) 45%, transparent);
  border: 1px solid var(--ft-glass-border);
  color: var(--ft-text);
  font-size: 12.5px;
  line-height: 1.35;
  transition: transform var(--ft-ease), box-shadow var(--ft-ease);
}

.contact-info .contact-card:hover {
  transform: translateY(-1px);
  box-shadow: var(--ft-shadow);
}

.contact-info .contact-card > i {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #fff;
  font-size: 0.75rem;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  box-shadow: 0 3px 10px rgba(37, 99, 235, 0.22);
}

.contact-label {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ft-muted);
  margin-bottom: 0.1rem;
}

.contact-info a {
  color: var(--ft-heading);
  text-decoration: none;
  word-break: break-word;
  font-weight: 500;
  transition: color var(--ft-ease);
}

.contact-info a:hover { color: var(--ft-accent); }

/* ===== Newsletter — nested under About, no extra vertical gap ===== */
.footer-card--about .footer-newsletter-bar {
  margin-top: 0.15rem;
  margin-bottom: 0;
  padding: 0.75rem 0.8rem;
  background: color-mix(in srgb, var(--ft-bg-solid) 55%, transparent);
  border: 1px solid var(--ft-glass-border);
  border-radius: 12px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: none;
}

.footer-newsletter-inner {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.5rem;
}

.footer-newsletter-copy {
  flex: none;
  width: 100%;
}

.footer-newsletter-copy h4 {
  margin: 0 0 0.15rem;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--ft-heading);
}

.footer-newsletter-copy p {
  margin: 0;
  color: var(--ft-text);
  font-size: 12px;
  line-height: 1.4;
}

.newsletter-form {
  position: relative;
  flex: none;
  width: 100%;
  max-width: none;
  margin: 0;
}

.newsletter-form input[type="email"] {
  width: 100%;
  height: 42px;
  border-radius: 999px;
  border: 1px solid var(--ft-glass-border);
  background: var(--ft-bg-solid);
  color: var(--ft-heading);
  padding: 0 4.5rem 0 0.9rem;
  font-size: 0.8rem;
  font-family: inherit;
  outline: none;
  transition: border-color var(--ft-ease), box-shadow var(--ft-ease);
}

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

.newsletter-form input[type="email"]:focus {
  border-color: color-mix(in srgb, var(--ft-accent) 55%, var(--ft-border));
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.newsletter-form button {
  position: absolute;
  top: 3px;
  right: 3px;
  height: 36px;
  min-width: 36px;
  border: 0;
  border-radius: 999px;
  padding: 0 0.85rem;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  color: #fff;
  font-weight: 600;
  font-size: 0.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  transition: transform var(--ft-ease), box-shadow var(--ft-ease);
}

.newsletter-form button:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.3);
}

.newsletter-form .btn-label { display: inline; }
.newsletter-form .btn-spinner { display: none; width: 1rem; height: 1rem; }
.newsletter-form.is-loading .btn-icon { display: none; }
.newsletter-form.is-loading .btn-label { display: none; }
.newsletter-form.is-loading .btn-spinner { display: inline-block; }

#newsletter-result { width: 100%; flex-basis: 100%; }

#newsletter-result .alert,
.newsletter-form .alert {
  border: 0;
  border-radius: 12px;
  padding: 0.6rem 0.8rem;
  font-size: 0.82rem;
  margin-top: 0.5rem;
  animation: ftFadeIn 0.35s ease both;
}

#newsletter-result .alert-success,
.newsletter-form .alert-success {
  background: rgba(16, 185, 129, 0.14);
  color: #047857;
}

[data-theme="dark"] #newsletter-result .alert-success,
body.dark-mode #newsletter-result .alert-success,
[data-bs-theme="dark"] #newsletter-result .alert-success {
  color: #6ee7b7;
}

#newsletter-result .alert-danger {
  background: rgba(239, 68, 68, 0.12);
  color: #b91c1c;
}

[data-theme="dark"] #newsletter-result .alert-danger,
body.dark-mode #newsletter-result .alert-danger,
[data-bs-theme="dark"] #newsletter-result .alert-danger {
  color: #fca5a5;
}

@keyframes ftFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

/* ===== Payments 36px ===== */
.footer-pay-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  margin-top: 1rem;
  margin-bottom: 0;
  padding-top: 0.85rem;
  padding-bottom: 0;
  border-top: 1px solid var(--ft-glass-border);
}

.footer-pay-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 36px;
  padding: 0 0.3rem;
  border-radius: 8px;
  background: var(--ft-glass);
  border: 1px solid var(--ft-glass-border);
  backdrop-filter: blur(8px);
  transition: transform var(--ft-ease), box-shadow var(--ft-ease);
}

.footer-pay-badge:hover {
  transform: translateY(-2px);
  box-shadow: var(--ft-shadow);
}

.footer-pay-badge svg {
  display: block;
  width: 52px;
  height: 20px;
}

/* ===== Copyright bar — compact ~55px ===== */
.footer-bottom {
  border-top: 1px solid rgba(15, 23, 42, 0.08);
  min-height: 55px;
  height: auto !important;
  padding: 0.55rem 0 !important;
  margin: 0 !important;
  background: var(--ft-bottom-bg) !important;
  display: flex;
  align-items: center;
}

[data-theme="dark"] .footer-bottom,
body.dark-mode .footer-bottom,
html[data-theme="dark"] .footer-bottom,
[data-bs-theme="dark"] .footer-bottom,
html[data-bs-theme="dark"] .footer-bottom {
  border-top-color: rgba(255, 255, 255, 0.08);
}

.footer-credit-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem 1rem;
  margin: 0;
  width: 100%;
}

.copyright-text,
.footer-dev-credit {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.35;
  color: var(--ft-text);
  font-weight: 500;
}

.footer-dev-credit a {
  position: relative;
  color: var(--ft-dev);
  font-weight: 700;
  text-decoration: none;
  transition: color var(--ft-ease);
}

.footer-dev-credit a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 1.5px;
  background: currentColor;
  transition: width var(--ft-ease);
}

.footer-dev-credit a:hover { color: var(--ft-dev-hover); }
.footer-dev-credit a:hover::after { width: 100%; }

.footer-bottom-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.25rem 0.4rem;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
}

.footer-bottom-links a {
  position: relative;
  color: var(--ft-text);
  text-decoration: none;
  font-size: 12.5px;
  font-weight: 500;
  transition: color var(--ft-ease);
  padding: 0;
}

.footer-bottom-links a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 1px;
  background: var(--ft-dev);
  transition: width var(--ft-ease);
}

.footer-bottom-links a:hover { color: var(--ft-dev); }
.footer-bottom-links a:hover::after { width: 100%; }

.footer-link-sep {
  color: #94a3b8;
  font-size: 0.65rem;
  line-height: 1;
  user-select: none;
}

footer.premium-footer a:focus-visible,
footer.premium-footer button:focus-visible,
footer.premium-footer input:focus-visible,
#footerBackToTop:focus-visible {
  outline: 2px solid #38bdf8;
  outline-offset: 2px;
}

/* Back to top */
#footerBackToTop {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 1080;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  box-shadow: 0 10px 28px rgba(37, 99, 235, 0.35);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 0.28s ease, transform 0.28s ease, visibility 0.28s ease, box-shadow 0.28s ease;
}

#footerBackToTop.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: none;
}

#footerBackToTop:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 32px rgba(124, 58, 237, 0.45);
}

#footerBackToTop i { font-size: 1.2rem; }

/* ===== Responsive ===== */
/* Let Bootstrap col-xl-3/2/2/2/3 control widths — do not force 20% */
@media (max-width: 991.98px) {
  .footer-main { padding: 48px 0 18px !important; }
  .footer-credit-bar {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.35rem;
  }
  .footer-bottom-links {
    justify-content: center;
  }
}

@media (max-width: 575.98px) {
  .footer-main { padding: 36px 0 16px !important; }
  .footer-card { padding: 0.9rem; }
  .newsletter-form input[type="email"] {
    font-size: 16px;
    padding-right: 4.25rem;
  }
  .newsletter-form .btn-label { display: none; }
  .social-links a { width: 36px; height: 36px; }
  .footer-row > [class*="col-"] {
    width: 100%;
    max-width: 100%;
    flex: 0 0 100%;
  }
  .footer-widget,
  .about-content,
  .social-links,
  .footer-links,
  .footer-trust-mini {
    text-align: center;
  }
  .social-links,
  .footer-trust-mini {
    justify-content: center;
  }
  .footer-links a::after { left: 50%; transform: translateX(-50%); }
  .contact-info .contact-card {
    text-align: left;
  }
  #footerBackToTop {
    right: 1rem;
    bottom: 1rem;
    width: 44px;
    height: 44px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .social-links a,
  .newsletter-form button,
  .footer-pay-badge,
  .footer-card,
  .footer-links a::after,
  .footer-dev-credit a::after,
  .footer-bottom-links a::after,
  #footerBackToTop {
    transition: none !important;
  }
}
