/* Header + Footer Modern Polish (2026)
   Goal: cleaner, smoother, more professional UI without changing HTML structure.
*/

:root {
  --mf-ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --mf-ease-fast: cubic-bezier(0.2, 0.9, 0.25, 1);
  --mf-ring: 0 0 0 0.22rem rgba(255, 212, 0, 0.18), 0 0 0 0.42rem rgba(255, 43, 191, 0.12);
  --mf-header-h: 74px;
  --mf-header-border: rgba(255, 255, 255, 0.12);
}

/* --------------------
   Header polish
-------------------- */
header {
  isolation: isolate;
}

.navbar-main {
  /* Light, premium surface (no dark header) */
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 43, 191, 0.18) 0%, transparent 55%),
    radial-gradient(circle at 82% 28%, rgba(124, 58, 237, 0.18) 0%, transparent 60%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.90)) !important;
  border-bottom: 1px solid rgba(124, 58, 237, 0.18) !important;
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  transition:
    background 260ms var(--mf-ease),
    box-shadow 260ms var(--mf-ease),
    border-color 260ms var(--mf-ease),
    transform 260ms var(--mf-ease);
}

/* Yellow accent line (MNC feel) */
.navbar-main::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: linear-gradient(90deg, rgba(255, 43, 191, 0), rgba(255, 43, 191, 0.78), rgba(124, 58, 237, 0.86), rgba(255, 212, 0, 0.75), rgba(255, 43, 191, 0));
  opacity: 0.9;
  pointer-events: none;
}

/* Subtle lift/shadow when page is scrolled (class added by js/header-effects.js) */
.navbar-main.mf-scrolled {
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 43, 191, 0.20) 0%, transparent 55%),
    radial-gradient(circle at 82% 28%, rgba(124, 58, 237, 0.20) 0%, transparent 60%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.94)) !important;
  border-bottom-color: rgba(124, 58, 237, 0.24) !important;
  box-shadow: 0 18px 55px rgba(17, 24, 39, 0.20);
}

.navbar-main .navbar-brand {
  padding-block: 10px;
}

.navbar-main .nav-link {
  position: relative;
  border-radius: 12px;
  color: rgba(11, 11, 16, 0.86) !important;
  transition: color 180ms var(--mf-ease-fast), background 180ms var(--mf-ease-fast), transform 180ms var(--mf-ease-fast);
}

/* Clean underline indicator */
.navbar-main .nav-link::before {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 10px;
  height: 2px;
  border-radius: 999px;
  transform: scaleX(0);
  transform-origin: 50% 50%;
  transition: transform 220ms var(--mf-ease);
  background: linear-gradient(90deg, rgba(255, 212, 0, 0.95), rgba(255, 43, 191, 0.70));
  opacity: 0.9;
}

.navbar-main .nav-link:hover {
  background: linear-gradient(135deg, rgba(255, 43, 191, 0.10), rgba(124, 58, 237, 0.08)) !important;
  color: rgba(11, 11, 16, 0.96) !important;
}

.navbar-main .nav-link.active {
  color: rgba(11, 11, 16, 0.98) !important;
}

.navbar-main .nav-link:hover::before,
.navbar-main .nav-link.active::before {
  transform: scaleX(1);
}

/* Better focus for keyboard navigation */
.navbar-main a:focus-visible,
.navbar-main button:focus-visible {
  outline: none;
  box-shadow: var(--mf-ring) !important;
  border-radius: 14px;
}

/* Dropdown / mega menu: modern glass card + smooth entrance */
.navbar-main .dropdown-menu {
  border-radius: 18px !important;
  background: rgba(255, 255, 255, 0.98) !important;
  border: 1px solid rgba(124, 58, 237, 0.18) !important;
  box-shadow: 0 28px 80px rgba(17, 24, 39, 0.22) !important;
  overflow: hidden;
}

/* Animate only when Bootstrap toggles .show */
@media (min-width: 992px) {
  .navbar-main .dropdown-menu {
    opacity: 0;
    transform: translateY(10px) scale(0.985);
    transform-origin: 50% 0;
    transition: opacity 180ms var(--mf-ease), transform 220ms var(--mf-ease);
    pointer-events: none;
  }

  .navbar-main .dropdown-menu.show {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
  }
}

/* Mega menu headings: clean + premium */
.navbar-main .mega-menu .menu-heading {
  letter-spacing: 1.6px;
  font-weight: 900;
}

.navbar-main .dropdown-menu .menu-heading,
.navbar-main .dropdown-menu .dropdown-header {
  color: rgba(11, 11, 16, 0.88) !important;
}

.navbar-main .dropdown-menu .menu-item,
.navbar-main .dropdown-menu .dropdown-item {
  color: rgba(11, 11, 16, 0.88) !important;
}

.navbar-main .dropdown-menu .menu-item,
.navbar-main .dropdown-menu .dropdown-item {
  border-radius: 12px !important;
  transition: transform 160ms var(--mf-ease-fast), background 160ms var(--mf-ease-fast);
}

.navbar-main .dropdown-menu .menu-item:hover,
.navbar-main .dropdown-menu .dropdown-item:hover {
  transform: translateX(3px);
}

/* Donate button: more premium */
.btn-donate-header {
  transition: transform 180ms var(--mf-ease), box-shadow 220ms var(--mf-ease);
}

.btn-donate-header:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 40px rgba(255, 212, 0, 0.18);
}

/* If theme-2026 forces white links in navbar, override for this light header */
.navbar-main a,
.navbar-main .nav-link {
  color: rgba(11, 11, 16, 0.86) !important;
}

.navbar-main a:hover,
.navbar-main .nav-link:hover {
  color: rgba(11, 11, 16, 0.98) !important;
}

/* --------------------
   Footer polish
-------------------- */

/* Newsletter already themed in theme-2026.css; add extra crispness */
.mf-newsletter-title {
  text-shadow: 0 16px 50px rgba(0, 0, 0, 0.35);
}

.mf-newsletter-input {
  border: 1px solid rgba(255, 212, 0, 0.28) !important;
}

.mf-newsletter-button {
  border-radius: 999px !important;
  background: linear-gradient(135deg, var(--mf-yellow), var(--mf-yellow-2));
  color: #0b0b10;
  box-shadow: 0 14px 30px rgba(255, 212, 0, 0.18);
}

.mf-newsletter-button:hover {
  filter: brightness(0.98);
  transform: translateY(-1px);
}

/* Footer base: keep it clean (no heavy bg/border) */
.footer {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, #ffffff 0%, #fbfbff 100%) !important;
  border-top: none !important;
  padding-bottom: 12px;
}

/* Footer inner spacing + consistent section separation */
.footer .row.g-5.py-5 {
  padding-top: 3.2rem !important;
  padding-bottom: 3.2rem !important;
}

.footer::before,
.footer::after {
  display: none !important;
  content: none !important;
}

.footer > .container {
  position: relative;
  z-index: 1;
}

/* Moved from footer.php inline styles (cleaned + themed) */
.footer-brand {
  margin-bottom: 1rem;
  display: flex;
  gap: 12px;
  align-items: center;
}

@media (max-width: 576px) {
  .footer-brand {
    align-items: flex-start;
  }
}

.footer-logo {
  width: 96px;
  height: 96px;
  border-radius: 14px;
  object-fit: contain;
  background: transparent;
  padding: 0;
  border: none;
  box-shadow: none;
  flex: 0 0 auto;
}

@media (max-width: 576px) {
  .footer-logo {
    width: 84px;
    height: 84px;
  }
}

.footer-brand-name {
  color: rgba(15, 23, 42, 0.92);
  font-weight: 900;
  letter-spacing: 0.3px;
  font-size: 1.7rem;
  line-height: 1.15;
}

.footer-brand-tagline {
  color: rgba(15, 23, 42, 0.62);
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-size: 0.82rem;
  margin-top: 0.35rem;
}

.footer,
.footer p,
.footer a,
.footer .text-light,
.footer .text-light-50,
.footer .text-white,
.footer .text-white-50 {
  color: rgba(15, 23, 42, 0.74) !important;
}

.footer a:hover {
  color: rgba(15, 23, 42, 0.92) !important;
}

.footer .footer-contact-info i {
  color: rgba(29, 78, 216, 0.95) !important;
}

.footer .btn-square {
  border: 1px solid rgba(15, 23, 42, 0.14) !important;
  background: #ffffff !important;
  color: rgba(15, 23, 42, 0.72) !important;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
}

.footer .btn-square:hover {
  color: rgba(15, 23, 42, 0.92) !important;
}

.footer .mf-legal-box {
  background: linear-gradient(180deg, #ffffff 0%, #fbfbff 100%) !important;
  border: 1px solid rgba(15, 23, 42, 0.10);
}

/* Footer bottom should not stay dark from legacy styles */
.footer .footer-bottom {
  background: transparent !important;
  margin-top: 30px;
  padding: 18px 0 20px !important;
  border-top: 1px solid rgba(15, 23, 42, 0.08) !important;
}

/* Footer bottom readability (legacy classes use text-white/text-white-50) */
.footer .footer-bottom,
.footer .footer-bottom p {
  color: rgba(15, 23, 42, 0.70) !important;
}

.footer .footer-bottom a {
  color: rgba(15, 23, 42, 0.92) !important;
}

/* Recent projects thumbs (light footer) */
.footer .mf-footer-thumb-link {
  border: 1px solid rgba(15, 23, 42, 0.10) !important;
  background: #ffffff !important;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.10) !important;
}

.footer .mf-footer-thumb {
  border-radius: 12px;
}

.footer h4 {
  position: relative;
  padding-bottom: 12px;
  margin-bottom: 22px !important;
}

.footer h4::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 62px;
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(90deg, rgba(255, 212, 0, 0.95), rgba(255, 43, 191, 0.65));
}

.footer h4 {
  color: rgba(15, 23, 42, 0.94) !important;
  font-size: 1.22rem;
  font-weight: 950;
  border-left: none !important;
  padding-left: 0 !important;
}

.footer h4,
.footer h6 {
  letter-spacing: -0.01em;
}

/* Prevent older redesign footer logo invert */
.footer .footer-logo {
  filter: none !important;
}

.footer .btn-link {
  display: flex;
  align-items: center;
  padding-left: 0 !important;
  color: rgba(15, 23, 42, 0.72) !important;
  transition: transform 180ms var(--mf-ease-fast), color 180ms var(--mf-ease-fast);
}

.footer .btn-link:hover {
  transform: translateX(5px);
}

.footer .btn-link i {
  transition: transform 180ms var(--mf-ease-fast);
}

.footer .btn-link:hover i {
  transform: scale(1.14);
}

.footer .btn-square {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px !important;
  transition: transform 180ms var(--mf-ease-fast), box-shadow 220ms var(--mf-ease);
}

.footer .btn-square:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.14);
}

/* Trust block */
.trust-badges {
  background: linear-gradient(135deg, rgba(255, 43, 191, 0.08), rgba(124, 58, 237, 0.06));
  border-left: 4px solid rgba(255, 212, 0, 0.88);
  padding: 16px 18px;
  border-radius: 14px;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(15, 23, 42, 0.10);
}

.trust-badges strong {
  color: rgba(255, 212, 0, 0.95);
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.footer-contact-info p {
  display: flex;
  align-items: flex-start;
  line-height: 1.8;
}

.footer-contact-info i {
  color: rgba(255, 212, 0, 0.92);
  font-size: 14px;
  margin-top: 4px;
}

.footer .copyright {
  border-top: none !important;
  background: transparent !important;
  margin-top: 24px;
  padding-top: 18px !important;
}

.footer .copyright a {
  color: rgba(15, 23, 42, 0.86) !important;
  font-weight: 800 !important;
  text-decoration: none;
}

.footer .copyright a:hover {
  color: var(--mf-yellow) !important;
}

.footer .copyright a.dev-link {
  color: rgba(15, 23, 42, 0.86) !important;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Back-to-top: glass + premium */
.back-to-top {
  border-radius: 16px !important;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  background: rgba(0, 0, 0, 0.50) !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
}

.back-to-top:hover {
  background: rgba(0, 0, 0, 0.60) !important;
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .navbar-main,
  .navbar-main * ,
  .footer * {
    transition: none !important;
    animation: none !important;
    scroll-behavior: auto !important;
  }
}
