/* Header view component (Views/Shared/Components/MoumachiHeader/Default.cshtml):
   sticky header, mega-menu feature cards, user dropdown, notification bell.
   Linked last in _MoumachiLayout <head> so it wins like the old inline <style> did. */

#siteHeader {
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    z-index: 50;
    margin-top: 0;
    -webkit-transform: translate3d(0, 0, 0);
    transform: translate3d(0, 0, 0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    will-change: transform;
}
.header-main {
    transition: none !important;
}
@media (max-width: 1023.98px) {
    /* The mobile menu (#megaMenu) is position:fixed inside this header. A transformed parent
       becomes the containing block for fixed children, which shrank the drawer to the header's
       own box and let the homepage hero paint over it — so no transform below desktop. */
    #siteHeader {
        -webkit-transform: none;
        transform: none;
        will-change: auto;
    }

    /* While the menu is open the header (and the drawer inside it) sits above every page layer,
       including modals (z 100–120) and the hero */
    body.mega-menu-open #siteHeader {
        z-index: 1000;
    }

    #siteHeader .header-main,
    #siteHeader.is-scrolled .header-main {
        padding-top: 1rem !important;
        padding-bottom: 1rem !important;
        transition: none !important;
    }
}
.features-col-wrap { display: flex; flex-direction: column; gap: 6px; }
.feature-card { position: relative; background-color: transparent; border: 1px solid transparent; border-radius: 16px; transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1); box-shadow: none; overflow: hidden; }
.feature-card:not(.is-open):hover { background-color: rgba(255, 255, 255, 0.7); }
.feature-card.is-open { background-color: #ffffff; border-color: #f59e0b; box-shadow: 0 12px 30px -6px rgba(245, 158, 11, 0.18), 0 4px 10px -2px rgba(0, 0, 0, 0.05); }
.feature-card-header { display: flex; align-items: center; gap: 14px; padding: 10px 12px; cursor: pointer; user-select: none; transition: background-color 0.2s ease; }
.feature-card-header:focus-visible { outline: 2px solid #f59e0b; outline-offset: 2px; }
.feature-icon-box { width: 44px; height: 44px; border-radius: 12px; background: #ffffff; border: 1px solid #fef3c7; display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease; }
.feature-card:hover .feature-icon-box { box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06); }
.feature-card.is-open .feature-icon-box { background: linear-gradient(135deg, #fef9ec 0%, #fff3d6 100%); border-color: rgba(245, 158, 11, 0.35); transform: scale(1.05); box-shadow: 0 4px 12px rgba(245, 158, 11, 0.22); }
.feature-icon-img { width: 22px; height: 22px; object-fit: contain; }
.feature-card-text { flex: 1; min-width: 0; }
.feature-card-title { font-size: 15px; font-weight: 700; color: #111827; letter-spacing: -0.3px; line-height: 1.25; transition: color 0.2s ease; }
.feature-card:hover .feature-card-title, .feature-card.is-open .feature-card-title { color: #1f2937; }
.feature-card-desc { font-size: 13px; color: #6b7280; line-height: 1.35; margin-top: 3px; white-space: normal; }
.feature-chevron-btn { display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; background-color: transparent; color: #9ca3af; flex-shrink: 0; transition: background-color 0.22s ease, color 0.22s ease, transform 0.22s ease; }
.feature-card:hover .feature-chevron-btn { color: #111827; }
.feature-card.is-open .feature-chevron-btn { background-color: #fef3c7; color: #d97706; }
.feature-chevron-icon { width: 14px; height: 14px; transition: transform 0.32s cubic-bezier(0.34, 1.56, 0.64, 1); }
.feature-card.is-open .feature-chevron-icon { transform: rotate(90deg); }
.feature-submenu-wrap { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.32s cubic-bezier(0.16, 1, 0.3, 1); }
.feature-card.is-open .feature-submenu-wrap { grid-template-rows: 1fr; }
.feature-submenu-inner { min-height: 0; overflow: hidden; opacity: 0; transform: translateY(-6px); transition: opacity 0.24s ease, transform 0.28s cubic-bezier(0.16, 1, 0.3, 1); }
.feature-card.is-open .feature-submenu-inner { opacity: 1; transform: translateY(0); }
.feature-submenu-content { padding: 0 14px 14px 14px; }
.feature-subgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding-top: 10px; border-top: 1px dashed rgba(245, 158, 11, 0.25); }
@media (max-width: 639.98px) { .feature-subgrid { grid-template-columns: 1fr; } }
.feature-sublink { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 12px; border-radius: 10px; background-color: #faf8f5; border: 1px solid rgba(0, 0, 0, 0.04); color: #374151; text-decoration: none; transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1); }
.feature-sublink:hover { background-color: #fffbeb; border-color: #fde68a; color: #b45309; box-shadow: 0 2px 8px -1px rgba(245, 158, 11, 0.18); transform: translateY(-1px); }
.feature-sublink-label { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; min-width: 0; }
.feature-sublink-dot { width: 6px; height: 6px; border-radius: 50%; background-color: #f59e0b; flex-shrink: 0; box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.2); transition: transform 0.2s ease, box-shadow 0.2s ease; }
.feature-sublink:hover .feature-sublink-dot { transform: scale(1.3); box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.35); }
.feature-sublink-arrow { width: 13px; height: 13px; color: #9ca3af; flex-shrink: 0; opacity: 0.6; transform: translateX(0); transition: transform 0.2s ease, color 0.2s ease, opacity 0.2s ease; }
.feature-sublink:hover .feature-sublink-arrow { color: #d97706; opacity: 1; transform: translateX(3px); }

/* User Profile Dropdown */
.user-dropdown-container { position: relative; }
.user-dropdown-btn { display: flex; align-items: center; gap: 8px; padding: 5px 12px 5px 5px; border-radius: 9999px; background-color: #fff; border: 1px solid #e5e7eb; transition: all 0.2s ease; cursor: pointer; }
.user-dropdown-btn:hover { background-color: #fef9ec; border-color: #f59e0b; box-shadow: 0 2px 8px rgba(245, 158, 11, 0.15); }
.user-avatar-img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; border: 2px solid #f59e0b; flex-shrink: 0; }
.user-name-text { font-size: 14px; font-weight: 600; color: #1f2937; max-width: 110px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-dropdown-menu { position: absolute; right: 0; top: calc(100% + 8px); width: 250px; background: #ffffff; border-radius: 16px; box-shadow: 0 16px 40px -6px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.06); padding: 8px; z-index: 100; transform-origin: top right; }
.user-menu-header { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: linear-gradient(135deg, #fef9ec 0%, #fff3d6 100%); border: 1px solid rgba(245, 158, 11, 0.25); margin-bottom: 6px; }
.user-menu-item { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px; font-size: 14px; font-weight: 500; color: #374151; text-decoration: none; transition: all 0.15s ease; }
.user-menu-item:hover { background-color: #fef3c7; color: #b45309; }
.user-menu-item.logout-item { color: #dc2626; }
.user-menu-item.logout-item:hover { background-color: #fee2e2; color: #b91c1c; }

/* Notification bell */
.notification-bell-container { position: relative; }
.notification-bell-btn { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 9999px; background-color: #fff; border: 1px solid #e5e7eb; cursor: pointer; transition: all 0.2s ease; }
.notification-bell-btn:hover, .notification-bell-btn[aria-expanded="true"] { background-color: #fef9ec; border-color: #f59e0b; box-shadow: 0 2px 8px rgba(245, 158, 11, 0.15); }
.notification-badge { position: absolute; top: -3px; right: -3px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9999px; border: 2px solid #fff; background-color: #dc2626; color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; box-sizing: content-box; }
.notification-badge[hidden], .notification-panel[hidden], .notification-panel__read-all[hidden] { display: none; }
.notification-panel { position: absolute; right: 0; top: calc(100% + 8px); width: 380px; min-width: 175px; max-height: min(520px, 75vh); display: flex; flex-direction: column; overflow: hidden; background: #fff; border-radius: 16px; box-shadow: 0 16px 40px -6px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.06); z-index: 100; }
.notification-panel__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px 12px; border-bottom: 1px solid #f1f1f1; }
.notification-panel__title { font-size: 16px; font-weight: 700; color: #0B0B0B; white-space: nowrap; }
.notification-panel__read-all { padding: 0; border: 0; background: transparent; font-size: 13px; font-weight: 600; color: #b45309; white-space: nowrap; cursor: pointer; }
.notification-panel__list { min-height: 0; flex: 1; overflow-y: auto; padding: 6px; }
.notification-panel__view-all { display: block; padding: 12px 16px; border-top: 1px solid #f1f1f1; text-align: center; font-size: 14px; font-weight: 600; color: #b45309; text-decoration: none; white-space: nowrap; }
.notification-panel__view-all:hover { background-color: #fef9ec; }
.notification-panel__empty { padding: 28px 12px; text-align: center; font-size: 14px; color: #6b7280; }
.notification-item { display: flex; align-items: flex-start; gap: 10px; padding: 10px; border-radius: 12px; color: #374151; text-decoration: none; transition: background-color 0.15s ease; }
.notification-item:hover { background-color: #fef3c7; }
.notification-item.is-unread { background-color: #fffbeb; }
.notification-item__img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.notification-item__text { min-width: 0; flex: 1; }
.notification-item__title { font-size: 14px; font-weight: 600; color: #1f2937; }
.notification-item__body { font-size: 13px; color: #4b5563; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.notification-item__time { margin-top: 2px; font-size: 12px; color: #9ca3af; }
.notification-item__dot { width: 8px; height: 8px; margin-top: 6px; border-radius: 50%; background-color: #f59e0b; flex-shrink: 0; }
@media (max-width: 639px) {
    .notification-bell-btn { width: 40px; height: 40px; }
    .notification-panel { position: fixed; left: 12px; right: 12px; width: auto; }
}
