/* ============================================
   Modern Header Styles for Dev Hasnihon
   IMPORTANT: This file must load AFTER main.css
   ============================================ */

/* Force override with !important for critical styles */

/* Header Container */
.header.fl-header-sticky {
    background: linear-gradient(135deg, #1a1a1a 0%, #2c2c2c 100%) !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1) !important;
    transition: all 0.3s ease !important;
}

.header.fl-header-sticky.is-sticky {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2) !important;
}

.header__content {
    padding: 0 !important;
}

.header-content__inner {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 12px 0 !important;
    gap: 20px !important;
}

/* Logo */
.header__logo {
    order: 2;
    flex-shrink: 0;
}

.header__logo img {
    max-height: 50px;
    width: auto;
    transition: transform 0.3s ease;
}

.header__logo:hover img {
    transform: scale(1.05);
}

/* Navigation Menu */
.header-content__menu {
    order: 1 !important;
    flex: 1 !important;
}

.menu__list {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}

.menu-list__item {
    position: relative !important;
}

.menu-list__link,
.menu-list__text {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    padding: 10px 16px !important;
    color: rgba(255, 255, 255, 0.85) !important;
    text-decoration: none !important;
    font-weight: 500 !important;
    font-size: 14px !important;
    border-radius: 6px !important;
    transition: all 0.3s ease !important;
    cursor: pointer !important;
    white-space: nowrap !important;
}

.menu-list__link:hover,
.menu-list__text:hover {
    color: #fff !important;
    background: rgba(221, 0, 5, 0.1) !important;
    text-decoration: none !important;
}

.menu-list__text {
    margin: 0;
}

.menu-list__text svg {
    transition: transform 0.3s ease;
}

.menu-list__item--inner:hover .menu-list__text svg {
    transform: rotate(180deg);
}

/* Dropdown Menus */
.menu-list__sublist {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    margin-top: 8px;
    padding: 8px 0;
}

.menu-list__item--inner:hover .menu-list__sublist {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.menu-sublist__item {
    list-style: none;
}

.menu-sublist__link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 20px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s ease;
}

.menu-sublist__link:hover {
    background: #f8f9fa;
    color: #DD0005;
    text-decoration: none;
}

/* Nested Submenus */
.menu-sublist__item--nested {
    position: relative;
}

.menu-sublist__nested {
    position: absolute;
    left: 100%;
    top: 0;
    min-width: 200px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateX(-10px);
    transition: all 0.3s ease;
    padding: 8px 0;
    margin-left: 8px;
}

.menu-sublist__item--nested:hover .menu-sublist__nested {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

/* Header Right Section */
.header-content__wrapper {
    order: 3;
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Japan Time */
.japan-time {
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.85);
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
}

/* Search Button */
.header-search-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    color: rgba(255, 255, 255, 0.85);
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.header-search-btn:hover {
    color: #fff;
    background: #DD0005;
    transform: scale(1.05);
}

/* Notification Bell */
.notification-wrapper {
    position: relative;
}

.notification-bell {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    color: rgba(255, 255, 255, 0.85);
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.notification-bell:hover {
    color: #fff;
    background: #DD0005;
    transform: scale(1.05);
}

.notification-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #dc3545;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    border: 2px solid #1a1a1a;
}

/* User Profile Button */
.header-content__login-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: linear-gradient(135deg, #DD0005 0%, #ff1a1a 100%);
    color: #fff;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.header-content__login-btn:hover {
    background: linear-gradient(135deg, #c00004 0%, #DD0005 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(221, 0, 5, 0.3);
    color: #fff;
    text-decoration: none;
}

.header-content__login-btn svg {
    width: 20px;
    height: 20px;
}

/* Hamburger Menu */
.header__hamburger {
    display: none;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    padding: 8px;
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.85);
    cursor: pointer;
    transition: all 0.3s ease;
}

.header__hamburger:hover {
    background: #DD0005;
    color: #fff;
}

/* Notification Dropdown */
.notification-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    width: 360px;
    max-width: 90vw;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    margin-top: 12px;
    overflow: hidden;
}

.notification-dropdown__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #eee;
    background: #f8f9fa;
}

.notification-dropdown__header span {
    font-weight: 700;
    font-size: 15px;
    color: #333;
}

.notification-dropdown__header a {
    font-size: 13px;
    color: #DD0005;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.notification-dropdown__header a:hover {
    color: #c00004;
    text-decoration: underline;
}

.notification-dropdown__body {
    max-height: 400px;
    overflow-y: auto;
}

.notification-item {
    display: block;
    padding: 16px 20px;
    border-bottom: 1px solid #f5f5f5;
    text-decoration: none;
    transition: background 0.2s;
}

.notification-item:hover {
    background: #f8f9fa;
    text-decoration: none;
}

.notification-item.unread {
    background: #fff5f5;
    border-left: 4px solid #DD0005;
}

.notification-item__title {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 6px;
}

.notification-item__message {
    font-size: 13px;
    color: #666;
    line-height: 1.5;
    margin-bottom: 6px;
}

.notification-item__time {
    font-size: 12px;
    color: #999;
}

.notification-empty,
.notification-loading {
    padding: 40px 20px;
    text-align: center;
    color: #999;
    font-size: 14px;
}

.notification-dropdown__footer {
    padding: 12px 20px;
    border-top: 1px solid #eee;
    text-align: center;
    background: #f8f9fa;
}

.notification-dropdown__footer a {
    font-size: 14px;
    color: #DD0005;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.notification-dropdown__footer a:hover {
    color: #c00004;
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .menu__list {
        gap: 4px;
    }

    .menu-list__link,
    .menu-list__text {
        padding: 8px 12px;
        font-size: 13px;
    }
}

@media (max-width: 991px) {
    .header__hamburger {
        display: block;
        order: 1;
    }

    .header__logo {
        order: 2;
    }

    .header-content__menu {
        display: none;
    }

    .header-content__wrapper {
        order: 3;
        gap: 8px;
    }

    .japan-time {
        display: none;
    }

    .header-content__login-btn span {
        display: none;
    }

    .header-content__login-btn {
        width: 40px;
        height: 40px;
        padding: 8px;
        justify-content: center;
    }
}

@media (max-width: 576px) {
    .header-content__inner {
        padding: 8px 0;
    }

    .header__logo img {
        max-height: 40px;
    }

    .notification-dropdown {
        width: 320px;
    }
}

/* Animation for dropdown */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.menu-list__sublist,
.notification-dropdown {
    animation: fadeInDown 0.3s ease-out;
}

/* Scrollbar for notification dropdown */
.notification-dropdown__body::-webkit-scrollbar {
    width: 6px;
}

.notification-dropdown__body::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.notification-dropdown__body::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.notification-dropdown__body::-webkit-scrollbar-thumb:hover {
    background: #999;
}