/* ================================================================
   TekSathi Footer System
   - .ts-footer        → Public website footer (SEO-rich, premium)
   - .m-footer         → Member portal footer (minimal, utility)
   Both respect light/dark via existing CSS variables.
   ================================================================ */

/* ── PUBLIC FOOTER ─────────────────────────────────────────────── */

.ts-footer {
  background: linear-gradient(180deg, var(--bg-2) 0%, color-mix(in srgb, var(--bg-2) 92%, #000) 100%);
  border-top: 1px solid var(--border);
  padding: 0;
  /* Match the rest of the site's font stack (body uses Arial/Helvetica) -
     'Inter' was never actually loaded anywhere (no Google Fonts link, no
     @font-face), so it silently fell back to the browser's system-ui font,
     which looked visibly different from every other section on the page. */
  font-family: Arial, Helvetica, sans-serif;
}

/* CTA Banner (preserved from old footer) */
.ts-footer-cta {
  padding: 48px 0;
  text-align: center;
}

.ts-footer-cta-box {
  max-width: 680px;
  margin: 0 auto;
  padding: 40px 32px;
  background: linear-gradient(135deg, var(--primary), var(--green));
  border-radius: 20px;
  color: #fff;
  box-shadow: 0 12px 40px rgba(31,143,229,0.25);
}

.ts-footer-cta-box h2 {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 10px;
  line-height: 1.3;
}

.ts-footer-cta-box p {
  font-size: 0.92rem;
  /* Explicit white - style.css has a global `footer p { color: var(--muted) }`
     rule that otherwise wins (this selector never set its own color, so the
     cascade fell through to that muted gray, which had poor contrast against
     the bright gradient background here). */
  color: #fff;
  opacity: 0.9;
  margin-bottom: 18px;
  line-height: 1.5;
}

.ts-footer-cta-box .btn {
  background: #fff;
  color: var(--primary);
  font-weight: 700;
  padding: 10px 28px;
  border-radius: 10px;
  font-size: 0.88rem;
  transition: transform 0.2s, box-shadow 0.2s;
  text-decoration: none;
  display: inline-block;
}

.ts-footer-cta-box .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

/* Main footer grid area */
.ts-footer-main {
  padding: 48px 0 32px;
  border-top: 1px solid var(--border);
}

.ts-footer-grid {
  display: grid;
  grid-template-columns: 1.6fr repeat(5, 1fr);
  gap: 36px;
  align-items: start;
}

/* Brand column */
.ts-footer-brand {
  padding-right: 16px;
}

.ts-footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  text-decoration: none;
}

.ts-footer-logo img {
  width: 36px;
  height: 36px;
  border-radius: 8px;
}

.ts-footer-logo span {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
}

.ts-footer-desc {
  font-size: 0.82rem;
  line-height: 1.6;
  color: var(--muted);
  margin-bottom: 18px;
}

.ts-footer-social {
  display: flex;
  gap: 8px;
}

.ts-footer-social a {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: rgba(128,128,128,0.08);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.9rem;
  transition: all 0.25s;
  text-decoration: none;
}

.ts-footer-social a:hover {
  background: linear-gradient(135deg, var(--primary), var(--green));
  color: #fff;
  border-color: transparent;
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(31,143,229,0.3);
}

/* Link columns */
.ts-footer-col h4 {
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text);
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--primary);
  display: inline-block;
}

.ts-footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.ts-footer-col ul li a {
  font-size: 0.8rem;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s, transform 0.2s;
  display: inline-block;
}

.ts-footer-col ul li a:hover {
  color: var(--primary);
  transform: translateX(3px);
}

.ts-footer-col ul li a i {
  width: 14px;
  text-align: center;
  margin-right: 4px;
  font-size: 0.72rem;
  opacity: 0.5;
}

/* Download app section */
.ts-footer-app {
  margin-top: 20px;
}

.ts-footer-app h4 {
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text);
  margin-bottom: 12px;
}

.ts-footer-app-badges {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ts-footer-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 10px;
  background: rgba(128,128,128,0.06);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
  cursor: default;
  opacity: 0.55;
  max-width: 170px;
}

.ts-footer-badge i {
  font-size: 1.1rem;
}

.ts-footer-badge .ts-badge-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.ts-footer-badge .ts-badge-text small {
  font-size: 0.6rem;
  font-weight: 500;
  opacity: 0.7;
}

.ts-footer-badge .ts-badge-text strong {
  font-size: 0.78rem;
}

.ts-footer-badge.is-active {
  opacity: 1;
  cursor: pointer;
}

.ts-footer-badge.is-active:hover {
  border-color: var(--primary);
  background: rgba(31,143,229,0.08);
  color: var(--text);
  transform: translateY(-2px);
}

/* Bottom bar */
.ts-footer-bottom {
  border-top: 1px solid var(--border);
  padding: 16px 0;
}

.ts-footer-bottom-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.ts-footer-copy {
  font-size: 0.76rem;
  color: var(--muted);
}

.ts-footer-copy a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}

.ts-footer-copy a:hover {
  text-decoration: underline;
}

.ts-footer-bottom-links {
  display: flex;
  align-items: center;
  gap: 16px;
}

.ts-footer-bottom-links a,
.ts-footer-bottom-links span {
  font-size: 0.74rem;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}

.ts-footer-bottom-links a:hover {
  color: var(--primary);
}

.ts-footer-version {
  font-size: 0.68rem;
  color: var(--muted);
  opacity: 0.6;
  font-weight: 600;
  background: rgba(128,128,128,0.08);
  padding: 2px 8px;
  border-radius: 6px;
  border: 1px solid var(--border);
}

/* ── RESPONSIVE: PUBLIC FOOTER ─────────────────────────────────── */

@media (max-width: 1200px) {
  .ts-footer-grid {
    grid-template-columns: 1.4fr repeat(4, 1fr);
  }
}

@media (max-width: 991px) {
  .ts-footer-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
  }
  .ts-footer-brand {
    grid-column: 1 / -1;
    padding-right: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 4px;
  }
}

@media (max-width: 768px) {
  .ts-footer-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }
  .ts-footer-main {
    padding: 32px 0 24px;
  }
  .ts-footer-cta {
    padding: 32px 0;
  }
  .ts-footer-cta-box {
    padding: 28px 20px;
    margin: 0 12px;
  }
  .ts-footer-cta-box h2 {
    font-size: 1.2rem;
  }
}

@media (max-width: 576px) {
  .ts-footer-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .ts-footer-col {
    text-align: center;
  }
  .ts-footer-col h4 {
    display: block;
    border-bottom-width: 1px;
    padding-bottom: 6px;
  }
  .ts-footer-col ul {
    align-items: center;
  }
  .ts-footer-col ul li a:hover {
    transform: none;
  }
  .ts-footer-bottom-inner {
    flex-direction: column;
    text-align: center;
    gap: 10px;
  }
  .ts-footer-bottom-links {
    flex-wrap: wrap;
    justify-content: center;
  }
  .ts-footer-app-badges {
    flex-direction: row;
    justify-content: center;
  }
}


/* ── MEMBER FOOTER ─────────────────────────────────────────────── */

.m-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-2);
  padding: 14px 0;
  margin-top: 40px;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

.m-footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.m-footer-copy {
  font-size: 0.74rem;
  color: var(--muted);
  font-weight: 500;
}

.m-footer-links {
  display: flex;
  align-items: center;
  gap: 16px;
}

.m-footer-links a {
  font-size: 0.74rem;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
  font-weight: 500;
}

.m-footer-links a:hover {
  color: var(--primary);
}

.m-footer-meta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.m-footer-meta span {
  font-size: 0.68rem;
  color: var(--muted);
  opacity: 0.6;
  font-weight: 600;
  background: rgba(128,128,128,0.08);
  padding: 2px 8px;
  border-radius: 6px;
  border: 1px solid var(--border);
}

/* ── RESPONSIVE: MEMBER FOOTER ─────────────────────────────────── */

@media (max-width: 768px) {
  .m-footer {
    padding: 10px 0;
    margin-bottom: 60px; /* space for mobile bottom nav */
  }
  .m-footer-inner {
    justify-content: center;
    text-align: center;
    gap: 6px;
  }
  .m-footer-copy {
    display: none; /* Hide copyright on mobile – space is tight */
  }
  .m-footer-links {
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
  }
  .m-footer-meta span:last-child {
    display: none; /* Hide language on mobile */
  }
}

/* ── HEADER DROPDOWN & ACCORDION CUSTOM STYLES ──────────────────── */

.ts-nav-dropdown {
  position: relative;
  display: inline-block;
}

.ts-nav-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  background: var(--bg-2);
  min-width: 200px;
  box-shadow: var(--shadow);
  border-radius: 12px;
  border: 1px solid var(--border);
  padding: 8px 0;
  z-index: 1000;
  animation: tsFadeIn 0.2s ease-out;
}

.ts-nav-dropdown:hover .ts-nav-dropdown-menu {
  display: block;
}

.ts-nav-dropdown-menu a {
  display: block;
  padding: 8px 16px;
  color: var(--muted) !important;
  font-size: 0.88rem !important;
  font-weight: 500 !important;
  text-decoration: none;
  transition: all 0.2s;
}

.ts-nav-dropdown-menu a:hover {
  background: rgba(31,143,229,0.08);
  color: var(--primary) !important;
  transform: translateX(4px);
}

@keyframes tsFadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Mobile Accordion Styles */
.ts-mobile-accordion {
  width: 100%;
}

.ts-mobile-accordion-btn {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  outline: none;
  padding: 10px 15px;
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
}

.ts-mobile-accordion-btn i {
  transition: transform 0.25s;
}

.ts-mobile-accordion-btn.active i {
  transform: rotate(180deg);
}

.ts-mobile-accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease-out;
  background: rgba(128,128,128,0.04);
  border-radius: 8px;
}

.ts-mobile-accordion-content a {
  display: block;
  padding: 8px 24px;
  font-size: 0.88rem;
  color: var(--muted);
  text-decoration: none;
}

.ts-mobile-accordion-content a:hover {
  color: var(--primary);
}

/* ── DROPDOWN HOVER BRIDGE & MEGA MENU GAP FIX ────────────────── */
.dropdown-menu::before {
  content: '';
  position: absolute;
  top: -20px;
  left: 0;
  right: 0;
  height: 20px;
  background: transparent;
}

.mega-menu .mega-col a:hover {
  background: transparent !important;
  color: var(--primary) !important;
}



