/* New Header and Mega Menu Styling */

@keyframes marquee {
    0% {
        transform: translateX(100%);
    }
    100% {
        transform: translateX(-100%);
    }
}

/* Top News Ticker Banner */
.news-ticker-area {
    width: 100%;
    background-color: var(--bs-primary-color, #E10006);
    overflow: hidden;
    white-space: nowrap;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    padding: 0 !important;
    height: 34px;
    line-height: 34px;
}

.news-ticker-content {
    display: inline-block;
    white-space: nowrap;
    animation: marquee 28s linear infinite;
    color: var(--bs-white-color, #ffffff);
    font-weight: 600;
    font-size: 13.5px;
    line-height: 34px;
    letter-spacing: 0.2px;
}

/* Make navbar sticky / fixed on scroll */
#header-container {
    position: sticky;
    top: 0;
    z-index: 1050;
    width: 100%;
}

.ep-header-section {
    position: sticky;
    top: 0;
    z-index: 1050;
    background: #ffffff;
    width: 100%;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

/* Sticky Header Active State on Scroll */
#header-container.is-sticky,
.ep-header-section.is-sticky {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1050;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

/* General Navbar Nav Items */
.navbar-nav .nav-item {
    position: relative; /* For simple dropdowns */
}

.navbar-nav .nav-link {
    font-weight: 700;
    font-size: 0.8rem;
    color: #1e293b;
    padding: 0.4rem 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.header-cta-btn {
    padding: 0.4rem 1.1rem !important;
    font-size: 0.82rem !important;
    border-radius: 50px !important;
    font-weight: 700 !important;
    white-space: nowrap;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: #e3000f; /* Shiplystic red color */
}

/* Dropdown Caret Icon */
.nav-link i.fa-chevron-down {
    font-size: 0.75rem;
    transition: transform 0.3s ease;
}
.nav-item:hover > .nav-link i.fa-chevron-down {
    transform: rotate(180deg);
}

/* --- Dropdown Menus (Simple & Mega) --- */
.dropdown-menu-wrapper {
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    border-radius: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 1030;
    padding: 1rem;
    border: 1px solid #f0f0f0;
}

/* Show dropdowns on hover on Desktop */
@media (min-width: 1200px) {
    .nav-item:hover > .dropdown-menu-wrapper {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
}

/* Simple Dropdown */
.simple-dropdown {
    min-width: 260px;
}
.simple-dropdown ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.simple-dropdown li {
    margin-bottom: 0.5rem;
}
.simple-dropdown li:last-child {
    margin-bottom: 0;
}
.simple-dropdown a {
    display: block;
    color: #555;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: background 0.2s, color 0.2s;
}
.simple-dropdown a:hover,
.simple-dropdown a.active {
    background: #f8f9fa;
    color: #e3000f;
}

/* Dropdown Headings (used in Resources) */
.dropdown-heading {
    font-size: 0.85rem;
    text-transform: uppercase;
    font-weight: 700;
    color: #888;
    margin: 0.5rem 1rem;
    letter-spacing: 0.5px;
}

.dropdown-divider {
    height: 1px;
    background-color: #eee;
    margin: 0.5rem 0;
}


/* --- Mega Menus (Tabbed Layout) --- */

.nav-item.mega-menu-item {
    position: static !important;
}

.mega-menu-wrapper {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin: 0 auto;
    width: 90vw;
    max-width: 1050px;
    background: #fff;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.12);
    border-radius: 12px;
    display: flex;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(15px);
    transition: all 0.3s ease;
    z-index: 1030;
    border: 1px solid #f0f0f0;
}

@media (min-width: 1200px) {
    .nav-item.mega-menu-item:hover > .mega-menu-wrapper {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
}

/* Sidebar Styling (Left Dark Panel) */
.mega-menu-sidebar {
    background-color: var(--bs-black-color); /* Matches website dark blue */
    padding: 1rem 0;
    display: flex;
    flex-direction: column;
}

/* Tab Styling - Specific overrides to beat style.css specificity */
.ep-header-section .navbar .navbar-nav .nav-item .mega-menu-sidebar .mega-menu-tab {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 1.5rem;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.75) !important;
    transition: all 0.25s ease;
    border-left: 4px solid transparent;
}

.ep-header-section .navbar .navbar-nav .nav-item .mega-menu-sidebar .mega-menu-tab:hover {
    color: #ffffff !important;
    background-color: rgba(255, 255, 255, 0.05);
}

.ep-header-section .navbar .navbar-nav .nav-item .mega-menu-sidebar .mega-menu-tab.active {
    background-color: #ffffff;
    color: var(--bs-black-color) !important;
    border-left: 4px solid #e3000f; /* Shiplystic branding red */
}

/* Chevron indicator inside tabs */
.mega-menu-tab i.fa-chevron-right {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.4);
    transition: transform 0.2s ease;
}

.mega-menu-tab:hover i.fa-chevron-right {
    color: #ffffff;
    transform: translateX(3px);
}

.mega-menu-tab.active i.fa-chevron-right {
    color: #e3000f;
    transform: translateX(3px);
}

/* Content Area (Right Light Panel) */
.mega-menu-content-area {
    padding: 1.5rem 2rem;
    background: #ffffff;
    min-height: 300px;
}

.mega-menu-content-container {
    display: flex;
    gap: 1.5rem;
    height: 100%;
}

.mega-menu-links-grid {
    flex: 1;
}

.mega-menu-panel {
    display: none;
    animation: fadeIn 0.4s ease-in-out;
}

.mega-menu-panel.active {
    display: block;
}

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

.mega-menu-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.8rem 1.5rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

.mega-menu-list li {
    margin: 0;
}

/* Specific overrides for link structure */
.ep-header-section .navbar .navbar-nav .nav-item .mega-menu-list a {
    display: block;
    color: #333333 !important;
    text-decoration: none;
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
    transition: all 0.25s ease;
    border: 1px solid transparent;
}

.ep-header-section .navbar .navbar-nav .nav-item .mega-menu-list a:hover {
    background-color: #fafafa;
    border-color: #f0f0f0;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.mega-menu-link-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--bs-black-color);
    margin-bottom: 0.1rem;
    transition: color 0.2s;
}

.ep-header-section .navbar .navbar-nav .nav-item .mega-menu-list a:hover .mega-menu-link-title {
    color: #e3000f;
}

.mega-menu-link-desc {
    font-size: 0.75rem;
    color: #666666;
    line-height: 1.3;
}

/* Promo Card inside Mega Menu */
.mega-menu-promo-card {
    width: 230px;
    background: linear-gradient(135deg, #000000 0%, #1e1e1e 100%);
    border-radius: 12px;
    padding: 1.25rem;
    color: #ffffff;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    flex-shrink: 0;
}

.promo-badge {
    align-self: flex-start;
    background: rgba(227, 0, 15, 0.2);
    color: #ff4d5a;
    border: 1px solid rgba(227, 0, 15, 0.4);
    padding: 0.2rem 0.5rem;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.75rem;
}

.promo-title {
    font-size: 1rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 0.4rem;
    line-height: 1.3;
}

.promo-desc {
    font-size: 0.75rem;
    color: #c5d4e6;
    margin-bottom: 1rem;
    line-height: 1.4;
}

.promo-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: #ffffff !important;
    text-decoration: none;
    transition: gap 0.2s;
}

.promo-btn:hover {
    gap: 0.75rem;
}

.promo-btn i {
    font-size: 0.75rem;
}


/* CTA Buttons */
.header-cta-btn {
    padding: 0.4rem 1rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.85rem;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
    white-space: nowrap;
    text-align: center;
}
.btn-outline-theme {
    border: 2px solid #e3000f;
    color: #e3000f;
    background: transparent;
}
.btn-outline-theme:hover {
    background: #e3000f;
    color: #fff;
}
.btn-filled-theme {
    background: #e3000f;
    color: #fff;
    border: 2px solid #e3000f;
}
.btn-filled-theme:hover {
    background: #c0000a;
    border-color: #c0000a;
    color: #fff;
}

/* --- Mobile Menu Offcanvas & Accordion --- */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.5);
    z-index: 1040;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}
.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-menu-main {
    position: fixed;
    top: 0;
    left: -350px;
    width: 320px;
    max-width: 100%;
    height: 100vh;
    background: #fff;
    z-index: 1050;
    transition: all 0.4s ease;
    overflow-y: auto;
    box-shadow: 2px 0 20px rgba(0,0,0,0.1);
}
.mobile-menu-main.active {
    left: 0;
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #eaeaea;
}
.close-mobile-menu {
    font-size: 1.5rem;
    cursor: pointer;
    color: #333;
}

.mobile-menu-body ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-menu-body > ul > li {
    border-bottom: 1px solid #f5f5f5;
}

.mobile-nav-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    color: #333;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s;
}
.mobile-nav-link.active {
    color: #e3000f;
}

.mobile-nav-link:hover {
    background: #f9f9f9;
}

/* Accordion Toggle Icon */
.mobile-menu-toggle i {
    transition: transform 0.3s;
}
.mobile-menu-toggle.expanded i {
    transform: rotate(180deg);
}

/* Mobile Submenu Container */
.mobile-submenu-collapse {
    display: none; /* JS will toggle this */
    background: #fafafa;
}

.mobile-submenu-collapse .mobile-nav-link {
    padding-left: 2.5rem;
    font-weight: 500;
    font-size: 0.95rem;
    border-bottom: none;
}

.mobile-submenu-heading {
    padding: 0.8rem 1.5rem 0.3rem 2.5rem;
    font-size: 0.8rem;
    font-weight: 700;
    color: #888;
    text-transform: uppercase;
}

/* CTA buttons in Mobile */
.mobile-cta-box {
    padding: 1.5rem;
}
.mobile-cta-box .header-cta-btn {
    display: block;
    text-align: center;
    margin-bottom: 1rem;
}
