/* NexPlate Navigation CSS - Complete Responsive System */

/* Reset and Base Styles */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
}

.nexplate-nav-wrapper {
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nexplate-nav-container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    height: 80px;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
}

.nexplate-nav {
    width: 100%;
    display: flex;
    align-items: center;
}

.nexplate-nav-inner {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

/* Logo */
.nexplate-nav-brand {
    display: flex;
    align-items: center;
    text-decoration: none;
    z-index: 1001;
}

.nexplate-nav-logo {
    display: flex;
    align-items: center;
}

.nexplate-nav-logo img {
    width: 200px;
    height: 200px;
    border-radius: 8px;
}

/* Navigation Menu */
.nexplate-nav-menu {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.nexplate-nav-menu-wrap {
    display: flex;
    align-items: center;
    width: 100%;
    justify-content: center;
}

.nexplate-nav-menu-links {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Navigation Links */
.nexplate-nav-link {
    display: flex;
    align-items: center;
    padding: 0.8rem 1.2rem;
    text-decoration: none;
    color: #333;
    font-size: 14px;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.2s ease;
    cursor: pointer;
    position: relative;
}

.nexplate-nav-link:hover,
.nexplate-nav-link.nexplate-open {
    background-color: rgba(0, 123, 255, 0.1);
    color: #007bff;
}

/* Dropdown Container */
.nexplate-nav-dropdown {
    position: relative;
    display: flex;
    align-items: center;
}

/* Dropdown Toggle */
.nexplate-dropdown-toggle {
    cursor: pointer;
    user-select: none;
}

/* Dropdown Content */
.nexplate-nav-dropdown-wrap {
    position: absolute;
    top: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    min-width: 800px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    opacity: 0;
    visibility: hidden;
    transform: translateX(-50%) translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    z-index: 999;
}

.nexplate-nav-dropdown:hover .nexplate-nav-dropdown-wrap,
.nexplate-nav-dropdown.nexplate-open .nexplate-nav-dropdown-wrap {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}

.nexplate-nav-dropdown-inner {
    display: flex;
    gap: 3rem;
    align-items: flex-start;
}

.nexplate-nav-dropdown-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.nexplate-col-2 {
    flex: none;
    width: 300px;
}

/* Dropdown Lists */
.nexplate-nav-dropdown-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.nexplate-nav-dropdown-item {
    width: 100%;
}

.nexplate-nav-dropdown-link {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    text-decoration: none;
    color: #333;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.nexplate-nav-dropdown-link:hover {
    background-color: #f8f9fa;
}

/* Story Visual */
.nexplate-nav-story-visual {
    position: relative;
    display: block;
    width: 100%;
    height: 200px;
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    color: white;
}

.nexplate-img-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.nexplate-nav-story-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1rem;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    display: flex;
    align-items: flex-end;
}

.nexplate-nav-story-arrow {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Banner */
.nexplate-nav-banner {
    background-color: #f8f9fa;
    border-radius: 12px;
    padding: 1.5rem;
    text-decoration: none;
    color: #333;
    position: relative;
    display: block;
    height: 150px;
    margin-top: 1rem;
}

.nexplate-nav-banner-icon {
    position: absolute;
    top: 1rem;
    right: 1rem;
}

/* Action Buttons */
.nexplate-nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    z-index: 1001;
}

.nexplate-button {
    padding: 0.7rem 1.2rem;
    border-radius: 8px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
    white-space: nowrap;
}

.nexplate-button-link {
    background-color: transparent;
    color: #333;
    border: 1px solid #e0e0e0;
}

.nexplate-button-link:hover {
    background-color: #f5f5f5;
}

.nexplate-button-nav {
    background-color: #dc3545;
    color: white;
}

.nexplate-button-nav:hover {
    background-color: #c82333;
}

/* Mobile Menu Button */
.nexplate-nav-menu-btn {
    display: none;
    width: 32px;
    height: 32px;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    z-index: 1002;
}

.nexplate-nav-ham-box {
    width: 20px;
    height: 16px;
    position: relative;
}

.nexplate-nav-ham-line {
    position: absolute;
    width: 100%;
    height: 2px;
    background-color: #333;
    border-radius: 2px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center;
}

.nexplate-ham-1 {
    top: 0;
}

.nexplate-ham-2 {
    top: 50%;
    transform: translateY(-50%);
}

.nexplate-ham-3 {
    bottom: 0;
}

/* Hamburger to X Animation */
.nexplate-nav-menu-btn.nexplate-open .nexplate-ham-1 {
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
}

.nexplate-nav-menu-btn.nexplate-open .nexplate-ham-2 {
    opacity: 0;
    transform: translateY(-50%) scale(0);
}

.nexplate-nav-menu-btn.nexplate-open .nexplate-ham-3 {
    bottom: 50%;
    transform: translateY(50%) rotate(-45deg);
}

/* Typography Classes */
.nexplate-p13 {
    font-size: 13px;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.nexplate-h14 {
    font-size: 14px;
    margin: 0;
    opacity: 0.7;
    line-height: 1.4;
}

.nexplate-h20 {
    font-size: 20px;
    font-weight: 600;
    margin: 0;
    line-height: 1.3;
}

.nexplate-nav-dropdown-text {
    font-size: 16px;
    font-weight: 500;
    margin: 0;
}

/* Color Classes */
.nexplate-text-quaternary {
    color: #6c6f75;
}

.nexplate-text-tertiary {
    color: #787a7d;
}

/* Spacing Classes */
.nexplate-margin-bottom-2 {
    margin-bottom: 8px;
}

/* Icon Classes */
.nexplate-icon-24 {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.nexplate-icon-40 {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
}

/* Utility Classes */
.nexplate-max-width-350 {
    max-width: 350px;
}

.nexplate-hide-tablet {
    display: block;
}

.nexplate-hide-mobile-portrait {
    display: block;
}

/* Mobile Styles */
@media (max-width: 992px) {
    /* Container adjustments */
    .nexplate-nav-container {
        height: 70px;
        padding: 0 1rem;
    }
    .nexplate-nav-logo img {
        width: 100px;
        height: 100px;
        border-radius: 8px;
    }
    
    /* Hide desktop elements */
    .nexplate-hide-mobile-portrait {
        display: none !important;
    }
    
    .nexplate-hide-tablet {
        display: none !important;
    }
    
    .nexplate-col-2 {
        display: none !important;
    }
    
    /* Show mobile menu button */
    .nexplate-nav-menu-btn {
        display: flex !important;
    }
    
    /* Mobile menu overlay */
    .nexplate-nav-menu {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: white;
        z-index: 1000;
        padding: 100px 2rem 2rem;
        overflow-y: auto;
        
        /* Start hidden off-screen */
        transform: translateX(100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        
        /* Flex layout for mobile */
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
    }
    
    /* Mobile menu open state */
    .nexplate-nav.nexplate-open .nexplate-nav-menu {
        transform: translateX(0);
        opacity: 1;
        visibility: visible;
    }
    
    .nexplate-nav-menu-wrap {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
    }
    
    .nexplate-nav-menu-links {
        flex-direction: column;
        gap: 0;
        width: 100%;
    }

    
    /* Mobile navigation links */
    .nexplate-nav-link {
        width: 100%;
        padding: 1.5rem 0;
        font-size: 18px;
        border-bottom: 1px solid #f0f0f0;
        border-radius: 0;
        justify-content: space-between;
    }
    
    .nexplate-nav-link:hover {
        background-color: transparent;
        color: #007bff;
    }
    
    /* Mobile dropdown containers */
    .nexplate-nav-dropdown {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
    }
    
    /* Mobile dropdown toggles with + icon */
    .nexplate-dropdown-toggle::after {
        content: '+';
        font-size: 24px;
        font-weight: 300;
        color: #666;
        transition: transform 0.3s ease;
        flex-shrink: 0;
    }
    
    .nexplate-nav-dropdown.nexplate-open .nexplate-dropdown-toggle::after {
        transform: rotate(45deg);
        color: #007bff;
    }
    
    /* Mobile dropdown content */
    .nexplate-nav-dropdown-wrap {
        position: static !important;
        transform: none !important;
        opacity: 1 !important;
        visibility: visible !important;
        background: #f8f9fa !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        padding: 0 !important;
        margin: 0 !important;
        min-width: auto !important;
        width: 100% !important;
        
        /* Start collapsed */
        max-height: 0 !important;
        overflow: hidden !important;
        transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
        pointer-events: none !important;
    }
    
    .nexplate-nav-dropdown.nexplate-open .nexplate-nav-dropdown-wrap {
        max-height: 2000px !important;
        padding: 1.5rem !important;
        pointer-events: auto !important;
    }
    
    .nexplate-nav-dropdown-inner {
        flex-direction: column !important;
        gap: 1.5rem !important;
        padding: 0 !important;
        display: flex !important;
        width: 100% !important;
    }
    
    .nexplate-nav-dropdown-col {
        width: 100% !important;
        gap: 1rem !important;
        display: flex !important;
        flex-direction: column !important;
    }
    
    /* Category headers */
    .nexplate-text-quaternary {
        margin-bottom: 1rem !important;
        display: block !important;
    }
    
    .nexplate-text-quaternary .nexplate-p13 {
        font-size: 12px !important;
        color: #666 !important;
        margin: 0 0 1rem 0 !important;
        display: block !important;
        text-transform: uppercase !important;
        letter-spacing: 0.5px !important;
        font-weight: 600 !important;
    }
    
    /* Mobile dropdown lists */
    .nexplate-nav-dropdown-list {
        gap: 0 !important;
        display: flex !important;
        flex-direction: column !important;
        list-style: none !important;
        padding: 0 !important;
        margin: 0 !important;
        width: 100% !important;
    }
    
    .nexplate-nav-dropdown-item {
        width: 100% !important;
        display: block !important;
        margin: 0 !important;
    }
    
    /* Mobile dropdown links */
    .nexplate-nav-dropdown-link {
        padding: 1.2rem 0 !important;
        gap: 1rem !important;
        border-bottom: 1px solid #e9ecef !important;
        align-items: flex-start !important;
        display: flex !important;
        width: 100% !important;
        text-decoration: none !important;
        color: #333 !important;
        border-radius: 0 !important;
        background: transparent !important;
    }
    
    .nexplate-nav-dropdown-link:hover {
        background-color: rgba(0, 123, 255, 0.05) !important;
        color: #007bff !important;
    }
    
    /* Fix text visibility */
    .nexplate-nav-dropdown-text {
        font-size: 16px !important;
        font-weight: 500 !important;
        color: #333 !important;
        margin: 0 !important;
        display: block !important;
        line-height: 1.4 !important;
    }
    
    .nexplate-h14 {
        font-size: 14px !important;
        color: #666 !important;
        margin: 4px 0 0 0 !important;
        display: block !important;
        line-height: 1.3 !important;
        opacity: 0.8 !important;
    }
    
    .nexplate-margin-bottom-2 {
        margin-bottom: 8px !important;
        display: block !important;
    }
    
    /* Ensure all text content is visible */
    .nexplate-nav-dropdown-link > div {
        display: block !important;
        width: 100% !important;
    }
    
    .nexplate-nav-dropdown-mask {
        display: block !important;
        width: 100% !important;
    }
    
    /* Icon spacing in mobile */
    .nexplate-icon-24 {
        width: 24px !important;
        height: 24px !important;
        margin-right: 1rem !important;
        flex-shrink: 0 !important;
        display: block !important;
    }
    
    /* Mobile button adjustments */
    .nexplate-button-nav {
        font-size: 12px !important;
        padding: 8px 12px !important;
    }
    
    /* Fix any text overflow issues */
    .nexplate-nav-dropdown-wrap * {
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
    }
    
    /* Ensure proper spacing between dropdown sections */
    .nexplate-nav-dropdown-links {
        display: flex !important;
        flex-direction: column !important;
        gap: 0 !important;
        width: 100% !important;
    }
    
    /* Additional spacing for better readability */
    .nexplate-nav-dropdown-col:not(:last-child) {
        margin-bottom: 1.5rem !important;
        padding-bottom: 1rem !important;
        border-bottom: 1px solid #e9ecef !important;
    }
    
    /* Make sure all nested lists are visible */
    .nexplate-nav-dropdown-links .nexplate-nav-dropdown-list {
        margin-bottom: 1rem !important;
    }
    
    .nexplate-nav-dropdown-links .nexplate-nav-dropdown-list:last-child {
        margin-bottom: 0 !important;
    }
}

/* Tablet Styles */
@media (max-width: 1200px) and (min-width: 993px) {
    .nexplate-nav-container {
        padding: 0 1.5rem;
    }
    
    .nexplate-nav-dropdown-wrap {
        min-width: 600px;
        padding: 1.5rem;
    }
    
    .nexplate-nav-dropdown-inner {
        gap: 2rem;
    }
    
    .nexplate-col-2 {
        width: 250px;
    }
}

/* Large Desktop Styles */
@media (min-width: 1400px) {
    .nexplate-nav-container {
        padding: 0 3rem;
    }
    
    .nexplate-nav-dropdown-wrap {
        min-width: 900px;
    }
}

/* Scroll Effect */
.nexplate-nav-wrapper.scrolled {
    background-color: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

/* Body scroll lock when mobile menu is open */
body.nexplate-nav-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
    height: 100%;
}

/* Focus States for Accessibility */
.nexplate-nav-link:focus,
.nexplate-dropdown-toggle:focus,
.nexplate-nav-menu-btn:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .nexplate-nav-menu,
    .nexplate-nav-dropdown-wrap,
    .nexplate-nav-ham-line,
    .nexplate-nav-link,
    .nexplate-dropdown-toggle::after {
        transition: none !important;
    }
}