/* ========================================================================
   HEADER & NAVIGATION
   ======================================================================== */

/* Body padding for fixed header */

@media (max-width: 768px) {
    body {
        padding-top: 64px;
    }
}

/* Header Container */
#header {
    width: 100%;
    position: fixed;
    top: 20px;
    left: 0;
    right: 0;
    z-index: 1000;
    transform: translateY(0);
    transition: all 0.3s ease-in-out;
}

/* Header Hide on Scroll Down */
#header.header-hidden {
    transform: translateY(-120%);
    top: 0;
}

/* Header Show on Scroll Up */
#header.header-visible {
    transform: translateY(0);
    top: 20px;
}

#header > div.header-container {
    max-width: 1296px;
    margin: 0 auto;
    padding: 0 20px;
    background: #fff;
    border: 1px solid rgba(20, 20, 20, 0.20);
    box-shadow: 0px 2px 8px rgba(0, 0, 0, 0.08);
    border-radius: 20px;
}

/* Navigation Bar */
#header nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
    gap: 40px;
}

/* Logo Section */
#header nav > a {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

#header nav > a img {
    width: 120px;
    height: 60px;
    object-fit: contain;
}

/* Navigation Items - Center */
#nav-item {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 8px;
    flex: 1;
    justify-content: center;
}

#nav-item > li {
    position: relative;
}

#nav-item > li > a,
#nav-item > li > button,
#nav-item > li > div > button {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 500;
    color: #141414;
    text-decoration: none;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

#nav-item > li > a:hover,
#nav-item > li > button:hover,
#nav-item > li > div > button:hover {
    color: #FF3F05;
}

/* Dropdown Arrow Icon */
#nav-item > li > button > svg,
#nav-item > li > div > button > svg {
    width: 16px;
    height: 16px;
    transition: transform 0.3s ease;
}

#nav-item > li > button:hover > svg,
#nav-item > li > div > button:hover > svg {
    transform: rotate(180deg);
}

/* Dropdown Menu */
#nav-item > li .dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    min-width: 200px;
    background: #fff;
    border: 1px solid rgba(20, 20, 20, 0.10);
    border-radius: 12px;
    box-shadow: 0px 8px 24px rgba(0, 0, 0, 0.12);
    z-index: 1001;
    padding: 8px 0;
}

#nav-item > li .dropdown-menu.active {
    display: block;
    animation: fadeIn 0.3s ease-out;
}

/* Dropdown Menu for Products (full width) */
#nav-item > li:first-child .dropdown-menu {
    position: fixed;
    top: 85px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100vw - 40px);
    max-width: 1296px;
    padding: 0;
}

#nav-item > li:first-child .dropdown-menu.active {
    display: flex;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* Dropdown Menu Layout */
.dropdown-menu-left {
    width: 25%;
    padding-right: 24px;
    border-right: 1px solid rgba(20, 20, 20, 0.10);
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 24px;
}

.dropdown-menu-left button {
    width: 100%;
    text-align: left;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 500;
    color: #141414;
    background: #f5f5f5;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.dropdown-menu-left button:hover {
    background: #e8e8e8;
    color: #141414;
}

.dropdown-menu-left button.active {
    background: rgb(243, 244, 246);
    color: #141414;
}

.dropdown-menu-right {
    width: 75%;
    padding: 24px;
}

/* Product Highlight & By Industry Sections */
#product-highlight,
#product-by-industry {
    display: none;
}

#product-highlight.active,
#product-by-industry.active {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

.dropdown-menu ul li {
    list-style: none;
}

.dropdown-menu ul li a {
    display: block;
    padding: 10px 16px;
    color: #141414;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.dropdown-menu ul li a:hover {
    background: #f5f5f5;
    color: #FF3F05;
}

.dropdown-menu ul li:first-child a {
    border-radius: 8px 8px 0 0;
}

.dropdown-menu ul li:last-child a {
    border-radius: 0 0 8px 8px;
}

/* Action Buttons Container - Right */
#header nav > div:nth-of-type(1) {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

/* Mobile Hamburger Menu Toggle - Hidden on Desktop */
#header nav > div:nth-last-of-type(1) {
    display: none;
}

#header nav > div:nth-last-of-type(1) button {
    padding: 8px;
    background: transparent;
    border: 1px solid rgba(20, 20, 20, 0.20);
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

#header nav > div:nth-last-of-type(1) button:hover {
    background: #f5f5f5;
    border-color: #141414;
}

#header nav > div:nth-last-of-type(1) button svg {
    width: 24px;
    height: 24px;
    color: #141414;
}

#header nav > div:nth-last-of-type(1) button span {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}


/* Tablet Responsive */
@media (max-width: 1024px) {
    #header nav {
        gap: 20px;
    }
    
    #nav-item {
        gap: 4px;
    }
    
    #nav-item > li > a,
    #nav-item > li > button,
    #nav-item > li > div > button {
        padding: 8px 12px;
        font-size: 13px;
    }
    
    #header nav > div:nth-of-type(1) > button {
        padding: 8px 16px;
        font-size: 13px;
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    #header > div {
        padding: 0 16px;
    }
    
    #header nav {
        height: 64px;
    }
    
    #header nav > a img {
        width: 100px;
        height: 50px;
    }
    
    /* Hide desktop navigation */
    #nav-item,
    #header nav > div:nth-of-type(1) {
        display: none;
    }
    
    /* Show mobile menu toggle */
    #header nav > div:nth-last-of-type(1) {
        display: block;
    }

    


    #nav-item {
        justify-content: flex-start;
    }
}

/* Mobile Menu - Active State */
@media (max-width: 768px) {
    /* Mobile Menu Close Button */
    .mobile-menu-close-btn {
        display: none;
        position: fixed;
        top: -20px;
        right:10px;
        z-index: 1000;
        background: transparent;
        border: none;
        padding: 8px;
        cursor: pointer;
        color: #141414;
        transition: opacity 0.3s ease;
    }
    
    .mobile-menu-close-btn:hover {
        opacity: 0.7;
    }
    
    .mobile-menu-close-btn svg {
        display: block;
    }
    
    /* Show close button when menu is active */
    #nav-item.mobile-active + .mobile-menu-close-btn {
        display: block;
    }
    
    #nav-item.mobile-active {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: -20px;
        left: 0;
        right: 0;
        bottom: 0;
        background: #fff;
        padding: 20px 16px;
        padding-top: 60px;
        gap: 0;
        z-index: 999;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    #nav-item.mobile-active > li {
        width: 100%;
        border-bottom: 1px solid rgba(20, 20, 20, 0.10);
    }
    
    #nav-item.mobile-active > li:last-child {
        border-bottom: none;
    }
    
    #nav-item.mobile-active > li > a,
    #nav-item.mobile-active > li > button {
        width: 100%;
        justify-content: space-between;
        padding: 12px 0;
        font-size: 12px;
        font-weight: 500;
        color: #141414;
        text-align: left;
    }
    
    #nav-item.mobile-active > li > button > svg {
        width: 20px;
        height: 20px;
        transition: transform 0.3s ease;
    }
    
    #nav-item.mobile-active > li > button.active > svg {
        transform: rotate(180deg);
    }
    
    /* Dropdown Menu Styles for Mobile */
    #nav-item.mobile-active .dropdown-menu {
        position: static;
        transform: none;
        border: none;
        box-shadow: none;
        background: #f9f9f9;
        margin-top: 0;
        margin-bottom: 0;
        padding: 0;
        display: none;
        width: 100%;
        max-width: 100%;
        left: auto;
        top: auto;
        border-radius: 0;
        animation: none;
    }
    
    #nav-item.mobile-active .dropdown-menu.active {
        display: block;
    }
    
    #nav-item.mobile-active .dropdown-menu ul {
        padding: 8px 0;
    }
    
    #nav-item.mobile-active .dropdown-menu ul li {
        border-bottom: 1px solid rgba(20, 20, 20, 0.05);
    }
    
    #nav-item.mobile-active .dropdown-menu ul li:last-child {
        border-bottom: none;
    }
    
    #nav-item.mobile-active .dropdown-menu ul li a {
        padding: 14px 16px;
        font-size: 12px;
        color: #141414;
        display: block;
    }
    
    #nav-item.mobile-active .dropdown-menu ul li a:hover {
        background: #f0f0f0;
        color: #FF3F05;
    }
    
    /* Product Dropdown Menu for Mobile */
    #nav-item.mobile-active .dropdown-menu-left {
        width: 100%;
        padding: 16px;
        border-right: none;
        border-bottom: 1px solid rgba(20, 20, 20, 0.10);
        gap: 8px;
    }
    
    #nav-item.mobile-active .dropdown-menu-left button {
        padding: 14px 16px;
        font-size: 12px;
        text-align: left;
    }
    
    #nav-item.mobile-active .dropdown-menu-right {
        width: 100%;
        padding: 16px;
    }
    
    /* Product Highlight Grid for Mobile */
    #nav-item.mobile-active #product-highlight.active,
    #nav-item.mobile-active #product-by-industry.active {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    #nav-item.mobile-active .product-highlight-item {
        padding: 12px;
        gap: 10px;
    }
    
    #nav-item.mobile-active .product-highlight-content-title {
        font-size: 12px;
    }
    
    #nav-item.mobile-active .product-highlight-content-description {
        font-size: 12px;
    }
    
    /* Dropdown Menu Item (Industries) for Mobile */
    #nav-item.mobile-active .dropdown-menu-item {
        padding: 12px;
        gap: 10px;
    }
    
    #nav-item.mobile-active .dropdown-menu-thumb {
        height: 100px;
    }
    
    #nav-item.mobile-active .dropdown-menu-content-title {
        font-size: 14px;
    }
    
    #nav-item.mobile-active .dropdown-menu-content-description {
        font-size: 12px;
        min-height: auto;
    }
    
    /* Contact Sales & Product Tour Links for Mobile */
    #nav-item.mobile-active .flex.flex--end {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding: 16px 0;
        margin-top: 8px;
    }
    
    #nav-item.mobile-active .flex.flex--end a {
        padding: 12px 0;
        font-size: 14px;
    }

    #nav-item > li:first-child .dropdown-menu {
        position: relative;
        transform: none;
        top: 0;
        left: 0;
        max-height: 25vh;
        overflow-y: auto;
    }
    
    /* Show action buttons in mobile menu */
    #header nav > div:nth-of-type(1).mobile-active {
        display: flex;
        flex-direction: column;
        position: fixed;
        bottom: 20px;
        left: 0;
        right: 0;
        padding: 20px 16px;
        background: #fff;
        border-top: 1px solid rgba(20, 20, 20, 0.10);
        gap: 12px;
        z-index: 1000;
        box-shadow: 0px -2px 8px rgba(0, 0, 0, 0.08);
    }
    
    #header nav > div:nth-of-type(1).mobile-active > button,
    #header nav > div:nth-of-type(1).mobile-active > a {
        width: 100%;
        padding: 14px 20px;
        font-size: 12px;
        justify-content: center;
        line-height: 1;
        display: flex;
    }
    
    /* Mobile Menu Toggle Button */
    #header nav > div:nth-last-of-type(1) {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    #header nav > div:nth-last-of-type(1) a {
        padding: 8px;
        background: transparent;
        border: 1px solid rgba(20, 20, 20, 0.20);
        border-radius: 6px;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.3s ease;
        text-decoration: none;
    }
    
    #header nav > div:nth-last-of-type(1) a:hover {
        background: #f5f5f5;
        border-color: #141414;
    }
    
    #header nav > div:nth-last-of-type(1) a svg {
        width: 24px;
        height: 24px;
        color: #141414;
    }
}

/* Product Highlight Item */
.product-highlight-item {
    gap: 12px;
    padding: 16px;
    background: #fff;
    border: 1px solid rgba(20, 20, 20, 0.10);
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.product-highlight-item:hover {
    background: #f9f9f9;
    border-color: #FF3F05;
    box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.08);
}

.product-highlight-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-highlight-icon svg {
    width: 15px;
    height: 10px;
}

.product-highlight-icon svg path {
    stroke: #6b7280;
}

.product-highlight-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.product-highlight-content-title {
    font-size: 14px;
    font-weight: 600;
    color: #141414;
    line-height: 1.4;
}

.product-highlight-content-description {
    font-size: 12px;
    color: #666;
    line-height: 1.5;
}

.product-highlight-content-description span {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    line-clamp: 3;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Dropdown Menu Item (for Industries) */
.dropdown-menu-item {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
    background: #fff;
    border: 1px solid rgba(20, 20, 20, 0.10);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.dropdown-menu-item:hover {
    background: #f9f9f9;
    border-color: #FF3F05;
    box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.08);
}

.dropdown-menu-thumb {
    width: 100%;
    height: 120px;
    border-radius: 8px;
    overflow: hidden;
    background: #f5f5f5;
}

.dropdown-menu-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dropdown-menu-content-wrap {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.dropdown-menu-content-title {
    font-size: 14px;
    font-weight: 600;
    color: #141414;
}

.dropdown-menu-content-description {
    font-size: 12px;
    color: #666;
    line-height: 1.5;
    min-height: 40px;
}

.dropdown-menu-item a.btn-page--outline {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: auto;
}

.dropdown-menu-item a.btn-page--outline svg {
    width: 16px;
    height: 16px;
}

/* Smooth Transitions */
* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}


@media (max-width: 1450px) and (min-width: 1000px) {
   #header > div.header-container {
        scale: 80%;
        padding: 0 16px;
    }
}
/* ========================================================================
   TABLET & SMALL DESKTOP RESPONSIVE (769px - 1024px)
   ======================================================================== */

@media (max-width: 1024px) and (min-width: 769px) {
    #header > div.header-container {
        scale: 80%;
        padding: 0 16px;
    }
    
    #header nav {
        gap: 16px;
        height: 72px;
    }
    
    #header nav > a img {
        width: 110px;
        height: 55px;
    }
    
    /* Adjust navigation spacing */
    #nav-item {
        gap: 2px;
    }
    
    #nav-item > li > a,
    #nav-item > li > button,
    #nav-item > li > div > button {
        padding: 8px 10px;
        font-size: 13px;
    }
    
    /* Product Dropdown - Adjust Layout */
    #nav-item > li:first-child .dropdown-menu {
        width: calc(100vw - 40px);
        max-width: 100%;
    }
    
    .dropdown-menu-left {
        width: 30%;
        padding: 20px;
        gap: 10px;
    }
    
    .dropdown-menu-left button {
        padding: 10px 12px;
        font-size: 13px;
    }
    
    .dropdown-menu-right {
        width: 70%;
        padding: 20px;
    }
    
    /* Product Highlight Grid - 2 Columns on Tablet */
    #product-highlight.active,
    #product-by-industry.active {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .product-highlight-item {
        padding: 14px;
    }
    
    .product-highlight-icon {
        width: 36px;
        height: 36px;
    }
    
    .product-highlight-content-title {
        font-size: 13px;
    }
    
    .product-highlight-content-description {
        font-size: 11px;
    }
    
    /* Industry Dropdown Items */
    .dropdown-menu-item {
        padding: 14px;
        gap: 10px;
    }
    
    .dropdown-menu-thumb {
        height: 100px;
    }
    
    .dropdown-menu-content-title {
        font-size: 13px;
    }
    
    .dropdown-menu-content-description {
        font-size: 11px;
        min-height: 36px;
    }
    
    .dropdown-menu-item a.btn-page--outline {
        padding: 8px 12px;
        font-size: 12px;
    }
    
    /* Action Buttons */
    #header nav > div:nth-of-type(1) {
        gap: 8px;
    }
    
    #header nav > div:nth-of-type(1) > button,
    #header nav > div:nth-of-type(1) > a {
        padding: 0px 16px;
        font-size: 13px;
    }
    
    #header nav > div:nth-of-type(1) > button svg,
    #header nav > div:nth-of-type(1) > a svg {
        width: 14px;
        height: 14px;
    }
    
    /* Regular Dropdown Menus */
    #nav-item > li .dropdown-menu {
        min-width: 180px;
    }
    
    .dropdown-menu ul li a {
        padding: 10px 14px;
        font-size: 13px;
    }
    
    /* Contact Sales & Product Tour Links */
    .flex.flex--end.grid--100.mt--20 {
        flex-direction: row;
        gap: 12px;
        padding-top: 12px;
    }
    
    .flex.flex--end.grid--100.mt--20 a {
        font-size: 12px;
    }
}

/* ========================================================================
   SMALL TABLET (640px - 768px) - Hybrid Approach
   ======================================================================== */

@media (max-width: 768px) and (min-width: 640px) {
    /* Keep desktop navigation but more compact */
    #header nav {
        height: 68px;
        gap: 12px;
    }
    
    #header nav > a img {
        width: 100px;
        height: 50px;
    }
    
    #nav-item {
        gap: 0;
    }
    
    #nav-item > li > a,
    #nav-item > li > button {
        padding: 8px;
        font-size: 12px;
    }
    
    /* Product Dropdown - Stack Vertically */
    #nav-item > li:first-child .dropdown-menu {
        flex-direction: column;
        max-height: 70vh;
        overflow-y: auto;
    }
    
    .dropdown-menu-left {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid rgba(20, 20, 20, 0.10);
        padding: 16px;
    }
    
    .dropdown-menu-right {
        width: 100%;
        padding: 16px;
    }
    
    /* Single Column Grid */
    #product-highlight.active,
    #product-by-industry.active {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    /* Hide action buttons text, show icons only */
    #header nav > div:nth-of-type(1) > button span,
    #header nav > div:nth-of-type(1) > a span {
        display: none;
    }
    
    #header nav > div:nth-of-type(1) > button,
    #header nav > div:nth-of-type(1) > a {
        padding: 10px;
        min-width: 40px;
        justify-content: center;
    }
    
    #header nav > div:nth-of-type(1) > button svg,
    #header nav > div:nth-of-type(1) > a svg {
        margin: 0;
    }
}

/* ========================================================================
   LANDSCAPE TABLET (Small Height Devices)
   ======================================================================== */

@media (max-height: 600px) and (min-width: 769px) {
    /* Reduce dropdown height for landscape tablets */
    #nav-item > li:first-child .dropdown-menu {
        max-height: 80vh;
        overflow-y: auto;
    }
    
    .dropdown-menu-left {
        padding: 16px;
    }
    
    .dropdown-menu-right {
        padding: 16px;
    }
    
    #product-highlight.active,
    #product-by-industry.active {
        gap: 10px;
    }
    
    .product-highlight-item,
    .dropdown-menu-item {
        padding: 12px;
    }
}

/* ========================================================================
   SPECIFIC FIXES FOR iPAD & COMMON TABLETS
   ======================================================================== */

/* iPad Pro 12.9" (1024x1366) */
@media (width: 1024px) and (height: 1366px) {
    #nav-item > li:first-child .dropdown-menu {
        max-width: 980px;
    }
    
    #product-highlight.active,
    #product-by-industry.active {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* iPad Pro 11" (834x1194) & iPad Air (820x1180) */
@media (min-width: 820px) and (max-width: 834px) {
    #nav-item {
        gap: 4px;
    }
    
    #product-highlight.active,
    #product-by-industry.active {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* iPad Mini (768x1024) */
@media (width: 768px) and (height: 1024px) {
    #nav-item > li > a,
    #nav-item > li > button {
        font-size: 12px;
        padding: 8px 10px;
    }
    
    #product-highlight.active,
    #product-by-industry.active {
        grid-template-columns: repeat(2, 1fr);
    }
}