/**
 * Donation menu component – mfhd- namespaced (reusable header).
 * Include this CSS on any page that uses partials/donation_menu.html.
 */

/* ========== HEADER ========== */
.mfhd-header,
.mfhd-site-header {
  width: 100%;
  background: #ffffff;
  border-bottom: 1px solid #eeeeee;
  padding: 0;
  font-family: var(--font-primary, 'Poppins'), 'Lato', sans-serif;
  position: sticky;
  top: 0;
  z-index: 999;
  transition: box-shadow 0.3s ease;
}

.mfhd-site-header .mfhd-header-container,
.mfhd-site-header .mfhd-container.mfhd-header-container,
.mfhd-header .mfhd-header-container {
  padding-top: 8px;
  padding-bottom: 8px;
  min-height: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mfhd-site-header .mfhd-header-container,
.mfhd-site-header .mfhd-container.mfhd-header-container {
  padding-left: 16px;
  padding-right: 20px;
}

.mfhd-site-header .mfhd-container {
  max-width: 100%;
}

.mfhd-header.mfhd-is-scrolled,
.mfhd-site-header.mfhd-is-scrolled {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.05);
}

.mfhd-header .mfhd-container.mfhd-header-container {
  margin: 0 auto;
  max-width: 1320px;
  padding-left: 16px;
  padding-right: 24px;
  font-size: 16px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: auto;
  gap: 20px;
}

.mfhd-site-header .mfhd-header-container {
  padding-left: 12px;
  padding-right: 20px;
}

.mfhd-mobile-btn {
  display: none;
  cursor: pointer;
  padding: 12px;
  min-width: 44px;
  min-height: 44px;
  box-sizing: border-box;
  align-items: center;
  justify-content: center;
  color: #000000;
  font-size: 1.25rem;
  transition: color 0.3s ease, transform 0.3s ease;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  position: relative;
  z-index: 10002;
}

.mfhd-mobile-btn i {
  pointer-events: none;
}

.mfhd-mobile-btn:hover {
  color: #c00000;
}

.mfhd-mobile-btn[aria-expanded="true"] i,
.mfhd-mobile-btn.mfhd-active i {
  transform: rotate(90deg);
  transition: transform 0.25s ease;
}

.mfhd-nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.25);
  z-index: 9998;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  pointer-events: none;
}

.mfhd-nav-overlay.mfhd-is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.mfhd-logo {
  width: auto;
  flex-shrink: 0;
  margin-left: 0;
  margin-right: 40px;
}

.mfhd-logo a {
  display: block;
}

.mfhd-logo img {
  height: 70px;
  width: auto;
  object-fit: contain;
  display: block;
  max-width: 100%;
  transform: scale(1.05);
  transition: transform 0.3s ease;
}

.mfhd-navbar {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  min-width: 0;
}

.mfhd-navbar .mfhd-nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  min-width: 0;
  flex: 1;
  justify-content: space-evenly;
}

.mfhd-nav-link,
.mfhd-dropdown-link {
  color: #111;
  font-weight: 600;
}

.mfhd-nav-list .mfhd-nav-link {
  text-decoration: none;
  font-size: 14px;
  color: #111;
  font-family: var(--font-primary, 'Poppins'), sans-serif;
  font-weight: 600;
  letter-spacing: 0.4px;
  padding: 10px 8px;
  transition: color 0.3s ease;
  position: relative;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
  max-width: 100%;
}

.mfhd-nav-list .mfhd-nav-link:hover {
  color: #c00000;
}

.mfhd-nav-list .mfhd-nav-link.active {
  color: #c00000;
}

.mfhd-nav-item {
  position: relative;
  flex-shrink: 1;
  min-width: 0;
}

.mfhd-nav-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  height: 3px;
  width: 0;
  background: #c00000;
  transition: width 0.3s ease;
}

.mfhd-nav-item:hover::before {
  width: 100%;
}

.mfhd-nav-item.active::before,
.mfhd-nav-item:has(.mfhd-nav-link.active)::before,
.mfhd-nav-item:has(.mfhd-dropdown-link.active)::before {
  width: 100%;
}

.mfhd-dropdown-list {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 100;
  width: max-content;
  min-width: 200px;
  list-style: none;
  background: #ffffff;
  padding: 12px 0;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
  border-radius: 8px;
  border: 1px solid #f0f0f0;
  opacity: 0;
  transform: translateY(10px);
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
}

.mfhd-nav-item:hover .mfhd-dropdown-list {
  opacity: 1;
  transform: translateY(0);
  visibility: visible;
  pointer-events: auto;
}

.mfhd-navbar .mfhd-dropdown-item {
  padding: 0;
}

.mfhd-navbar .mfhd-dropdown-item:first-child {
  border-top: none;
}

.mfhd-navbar .mfhd-dropdown-item .mfhd-dropdown-link {
  display: block;
  color: #111;
  font-size: 14px;
  text-decoration: none;
  font-weight: 600;
  font-family: var(--font-primary, 'Poppins'), sans-serif;
  padding: 10px 20px;
  transition: color 0.3s ease, background 0.3s ease;
  position: relative;
}

.mfhd-navbar .mfhd-dropdown-item .mfhd-dropdown-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -3px;
  height: 2px;
  width: 0;
  background: #c00000;
  transition: width 0.25s ease;
}

.mfhd-navbar .mfhd-dropdown-item .mfhd-dropdown-link:hover {
  color: #c00000;
  background: rgba(0, 0, 0, 0.03);
}

.mfhd-navbar .mfhd-dropdown-item .mfhd-dropdown-link:hover::after {
  width: 100%;
}

.mfhd-navbar .mfhd-dropdown-item .mfhd-dropdown-link.active {
  color: #c00000;
  font-weight: 600;
}

.mfhd-navbar .mfhd-dropdown-item .mfhd-dropdown-link.active::after {
  width: 100%;
  height: 2px;
  bottom: -3px;
  background-color: #c00000;
}

.mfhd-right-blog {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  flex-shrink: 0;
}

.mfhd-donate-btn {
  margin-left: 6px;
  display: block;
  flex-shrink: 0;
}

.mfhd-language-selector,
.mfhd-header .mfhd-language-selector {
  min-width: 80px;
}

.mfhd-languages {
  display: flex;
  justify-content: flex-end;
}

.mfhd-header .mfhd-current-language:hover {
  border-color: #c00000;
}

.mfhd-language-selector {
  position: relative;
  display: inline-block;
}

.mfhd-current-language {
  cursor: pointer;
  padding: 5px 10px;
  display: flex;
  align-items: center;
  gap: 5px;
  border: 1px solid #ddd;
  border-radius: 8px;
  background: white;
  user-select: none;
}

.mfhd-current-language img,
.mfhd-current-language .mfhd-dropdown-arrow {
  pointer-events: none;
}

.mfhd-current-language:hover {
  background-color: #f5f5f5;
}

.mfhd-dropdown-arrow {
  font-size: 10px;
  color: #666;
  margin-left: 5px;
  transition: transform 0.2s;
}

.mfhd-language-selector:hover .mfhd-dropdown-arrow {
  transform: translateY(2px);
}

.mfhd-language-menu {
  display: none;
  position: absolute;
  right: 0;
  top: 100%;
  background: white;
  border: 1px solid #ddd;
  border-radius: 4px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  min-width: 120px;
  margin-top: 5px;
}

.mfhd-language-menu.mfhd-show {
  display: block;
}

.mfhd-language-option {
  display: flex;
  align-items: center;
  padding: 8px 12px;
  text-decoration: none;
  color: #333;
}

.mfhd-language-option:hover {
  background-color: #f5f5f5;
}

.mfhd-language-option.active {
  background-color: #f0f0f0;
}

.mfhd-language-option img {
  margin-right: 8px;
}

.mfhd-donate-btn-1 {
  display: none;
}

.mfhd-donate-btn a,
.mfhd-donate-btn-1 a {
  background-color: #c00000;
  color: #ffffff;
  font-weight: 700;
  border-radius: 6px;
  padding: 8px 18px;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
  text-decoration: none;
  font-size: 14px;
  text-transform: uppercase;
  font-family: var(--font-primary, 'Poppins'), sans-serif;
  border: none;
}

.mfhd-donate-btn a:hover,
.mfhd-donate-btn-1 a:hover {
  background-color: #a00000;
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(192, 0, 0, 0.25);
}

.mfhd-donate-btn .mfhd-heart,
.mfhd-donate-btn .mfhd-heart-button,
.mfhd-donate-btn-1 .mfhd-heart,
.mfhd-donate-btn-1 .mfhd-heart-button {
  font-size: 1.2em;
  color: #ffffff;
  padding-left: 5px;
  transition: color 0.3s ease;
}

.mfhd-donate-btn a:hover .mfhd-heart,
.mfhd-donate-btn a:hover .mfhd-heart-button,
.mfhd-donate-btn-1 a:hover .mfhd-heart,
.mfhd-donate-btn-1 a:hover .mfhd-heart-button {
  color: #ff4d4d;
}

body.mfhd-menu-open {
  overflow: hidden;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 1279px) {
  .mfhd-logo {
    width: auto;
  }

  .mfhd-navbar .mfhd-nav-list {
    gap: 4px;
  }

  .mfhd-nav-list .mfhd-nav-link {
    font-size: 14px;
    padding: 8px 12px;
  }
}

@media (max-width: 1024px) {
  .mfhd-header,
  .mfhd-site-header {
    position: relative;
  }

  .mfhd-mobile-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 0;
  }

  .mfhd-navbar {
    order: 4;
    width: auto;
  }

  .mfhd-navbar .mfhd-nav-list {
    position: fixed;
    top: 0;
    right: -100%;
    width: 78%;
    max-width: 320px;
    height: 100vh;
    flex-direction: column;
    align-items: flex-start;
    background: #ffffff;
    padding: 65px 18px 20px 18px;
    box-sizing: border-box;
    transition: right 0.35s ease;
    overflow-y: auto;
    gap: 12px;
    z-index: 9999;
    box-shadow: -4px 0 25px rgba(0, 0, 0, 0.08);
    list-style: none;
    margin: 0;
  }

  .mfhd-navbar .mfhd-nav-list.mfhd-nav-open {
    right: 0;
  }

  .mfhd-nav-item {
    margin-top: 0;
    margin-bottom: 0;
    width: 100%;
    border-bottom: 1px solid #eeeeee;
  }

  .mfhd-nav-item:last-child {
    margin-bottom: 0;
  }

  .mfhd-nav-list .mfhd-nav-link,
  .mfhd-dropdown-link {
    color: #111 !important;
  }

  .mfhd-nav-list .mfhd-nav-link {
    display: block;
    padding: 14px 0;
    padding-bottom: 10px;
    font-size: 16px;
  }

  .mfhd-dropdown-list {
    position: relative;
    top: auto;
    left: auto;
    width: 100%;
    min-width: 0;
    max-height: 0;
    padding: 0 0 0 16px;
    margin-top: 0;
    overflow: hidden;
    background: #f9f9f9;
    box-shadow: none;
    border-radius: 0;
    border: none;
    opacity: 1;
    transform: none;
    visibility: visible;
    transition: max-height 0.3s ease;
  }

  .mfhd-nav-item.mfhd-open .mfhd-dropdown-list {
    max-height: 500px;
  }

  .mfhd-nav-item:hover .mfhd-dropdown-list {
    max-height: 0;
  }

  .mfhd-navbar .mfhd-dropdown-item .mfhd-dropdown-link {
    padding: 10px 0;
    font-size: 15px;
    color: #111 !important;
  }

  .mfhd-navbar .mfhd-dropdown-item .mfhd-dropdown-link:hover {
    color: #c00000 !important;
  }

  .mfhd-right-blog {
    width: auto;
    justify-content: flex-end;
    margin-left: 15px;
  }

  .mfhd-donate-btn a {
    width: auto;
    min-width: 112px;
    text-align: center;
  }
}

@media (max-width: 992px) {
  .mfhd-header,
  .mfhd-site-header {
    padding: 0;
  }

  .mfhd-site-header .mfhd-header-container,
  .mfhd-header-container,
  .mfhd-header .mfhd-container.mfhd-header-container {
    min-height: auto;
    align-items: center;
    padding-left: 12px;
    padding-right: 12px;
    padding-top: 8px;
    padding-bottom: 8px;
  }

  .mfhd-logo {
    margin-left: 0;
    margin-right: auto;
  }

  .mfhd-logo img {
    height: 55px;
  }

  .mfhd-donate-btn a,
  .mfhd-donate-btn-1 a {
    font-size: 13px;
    padding: 6px 14px;
    border-radius: 5px;
  }

  .mfhd-donate-btn {
    margin-left: 15px;
  }

  .mfhd-nav-list {
    padding-left: 30px;
    padding-right: 10px;
  }

  .mfhd-right-blog {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    margin-left: 0;
  }

  .mfhd-nav-item .mfhd-dropdown-list {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }

  .mfhd-nav-item.mfhd-open .mfhd-dropdown-list {
    max-height: 500px;
  }
}

@media (max-width: 990px) {
  .mfhd-donate-btn-1 {
    display: block;
  }
}

@media (max-width: 768px) {
  .mfhd-right-blog {
    gap: 12px;
  }

  .mfhd-donate-btn-1 {
    margin-left: 15px;
  }

  .mfhd-header .mfhd-container.mfhd-header-container {
    padding-left: 20px;
    padding-right: 20px;
  }
}

@media (max-width: 576px) {
  .mfhd-donate-btn a,
  .mfhd-donate-btn-1 a {
    font-size: 12px;
    padding: 6px 12px;
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .mfhd-logo img {
    height: 50px;
  }
}

@media (max-width: 575px) {
  .mfhd-right-blog {
    width: auto;
    gap: 10px;
  }

  .mfhd-donate-btn a {
    display: none;
  }

  .mfhd-donate-btn-1 a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: auto;
    min-width: 0;
    min-height: 38px;
    text-align: center;
    padding: 8px 16px;
    font-size: 13px;
  }
}
