/**
 * Standalone header styles for the Slashdot Media blankslate theme.
 * No dependency on Divi CSS. Matches the original Divi header pixel-for-pixel.
 */

/* =========================================================================
   Header bar
   ========================================================================= */

.sdm-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 99999;
    background: #000;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.1);
    height: 60px;
    transition: background 0.4s, height 0.4s;
}

.sdm-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 100%;
    height: 100%;
    padding: 0 32px 0 30px;
    box-sizing: border-box;
}

/* =========================================================================
   Logo
   ========================================================================= */

.sdm-logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
    height: 100%;
}

.sdm-logo img {
    height: clamp(21px, 2.6vw, 27.5px);
    width: auto;
    max-height: 100%;
}

/* =========================================================================
   Desktop navigation
   ========================================================================= */

.sdm-nav {
    display: flex;
    align-items: center;
    height: 100%;
}

.sdm-nav-list {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: Roboto, Helvetica, Arial, Lucida, sans-serif;
}

.sdm-nav-list > li {
    position: relative;
    display: flex;
    align-items: center;
    height: 100%;
}

.sdm-nav-list > li:not(.sdm-nav-cta) > a {
    display: flex;
    align-items: center;
    height: 100%;
    padding: 0 20px 0 0;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    text-decoration: none;
    letter-spacing: normal;
    white-space: nowrap;
    transition: color 0.3s;
}

.sdm-nav-list > li:not(.sdm-nav-cta) > a:hover {
    opacity: 0.7;
}

/* Dropdown arrow for parent items */
.sdm-nav-list > li.menu-item-has-children > a::after {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    border-right: 2px solid #fff;
    border-bottom: 2px solid #fff;
    transform: rotate(45deg);
    margin-left: 8px;
    margin-bottom: 2px;
    opacity: 0.8;
}

/* =========================================================================
   Dropdown submenus
   ========================================================================= */

.sdm-nav-list .sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 9999;
    min-width: 240px;
    background: #000;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    padding: 20px 0;
    list-style: none;
    margin: 0;
    border-top: 2px solid #0091ff;
}

.sdm-nav-list > li:hover > .sub-menu {
    display: block;
}

.sdm-nav-list .sub-menu li a {
    display: block;
    padding: 0.75em 2.25em;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
    text-transform: uppercase;
    white-space: nowrap;
    transition: opacity 0.3s;
}

.sdm-nav-list .sub-menu li a:hover {
    opacity: 0.7;
}

/* =========================================================================
   CTA button (Request Demo)
   ========================================================================= */
.sdm-active > a::after {
    border-right-color: #00aeef !important;
    border-bottom-color: #00aeef !important;
}

.sdm-nav-cta a {
    display: flex;
    align-items: center;
    height: 100%;
    text-decoration: none;
    padding: 0;
    background: none;
    border: none;
}

li#menu-item-20.sdm-nav-cta .sdm-cta-btn {
    display: inline-block;
    /* Vertical linear: 6px @ 1920px viewport, 3px @ 1280px viewport. Horizontal stays em-scaled. */
    padding: clamp(3px, calc(-3px + 0.469vw), 6px) 1.175em !important;
    color: #fff;
    font-size: clamp(0.64rem, 0.8vw, 0.96rem) !important;
    font-weight: 700;
    text-transform: uppercase;
    text-decoration: none;
    border: 2px solid #0091ff;
    border-radius: 5px;
    transition: background 0.3s, color 0.3s;
    white-space: nowrap;
    background-image: radial-gradient(circle at top right, #0091ff 0%, rgba(43, 135, 218, 0) 100%);
}

.sdm-nav-cta a:hover .sdm-cta-btn {
    background: #0091ff;
    color: #fff;
}

/* =========================================================================
   Mobile menu toggle
   ========================================================================= */

.sdm-mobile-toggle {
    display: none;
    cursor: pointer;
    padding: 10px;
}

.sdm-mobile-toggle span {
    display: block;
    width: 24px;
    height: 3px;
    background: #0091ff;
    margin: 4px 0;
    border-radius: 2px;
    transition: transform 0.3s, opacity 0.3s;
}

/* =========================================================================
   Search form
   ========================================================================= */

.sdm-search {
    display: none; /* Hidden by default, toggled via JS if needed */
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #000;
    padding: 20px 30px;
    z-index: 99998;
}

.sdm-search-form {
    display: flex;
    max-width: 600px;
    margin: 0 auto;
}

.sdm-search-input {
    flex: 1;
    padding: 10px 15px;
    font-size: 14px;
    border: 1px solid #333;
    background: #111;
    color: #fff;
    outline: none;
    border-radius: 3px 0 0 3px;
}

.sdm-search-input::placeholder {
    color: #666;
}

/* =========================================================================
   Mobile-only and desktop-only items
   ========================================================================= */

.sdm-desktop-only {
    display: flex;
}

.sdm-mobile-only {
    display: none;
}

/* =========================================================================
   Body offset for fixed header
   ========================================================================= */

body {
    padding-top: 60px;
}

/* =========================================================================
   Responsive: Tablet and below (980px — matches Divi breakpoint)
   ========================================================================= */
#sdm-nav li {
    padding-right: 4px;
}
#sdm-nav li a {
    font-size: .9rem;
    margin-top: -1px;
}

@media (min-width: 981px) {
    .et_fullwidth_nav #main-header .container {
        width: 100%;
        max-width: 100%;
        padding-right: 48px !important;
        padding-left: 34px !important;
    }
    .sub-menu li a {
        padding-top: 2px !important;
    }
}

@media (max-width: 980px) {
    .sdm-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #000;
        flex-direction: column;
        align-items: stretch;
        padding: 20px 0;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    }

    .sdm-nav.sdm-nav--open {
        display: flex;
    }

    .sdm-nav-list {
        flex-direction: column;
        align-items: stretch;
        height: auto;
    }

    .sdm-nav-list > li {
        height: auto;
        flex-direction: column;
        align-items: stretch;
    }

    .sdm-nav-list > li > a {
        height: auto;
        padding: 12px 30px;
        font-size: 14px;
    }

    .sdm-nav-list > li.menu-item-has-children > a::after {
        margin-left: auto;
    }

    /* Submenus stack below parent on mobile */
    .sdm-nav-list .sub-menu {
        position: static;
        box-shadow: none;
        padding: 0 0 0 20px;
        display: none;
    }

    .sdm-nav-list > li:hover > .sub-menu,
    .sdm-nav-list > li.sdm-submenu-open > .sub-menu {
        display: block;
    }

    .sdm-nav-list .sub-menu li a {
        padding: 8px 30px;
    }

    /* CTA in mobile menu */
    .sdm-nav-cta {
        padding: 12px 30px;
    }

    /* Show hamburger, hide desktop items */
    .sdm-mobile-toggle {
        display: block;
    }

    .sdm-desktop-only {
        display: none !important;
    }

    .sdm-mobile-only {
        display: flex;
    }
}

/* =========================================================================
   Responsive: Phone (max-width 767px)
   ========================================================================= */

@media (max-width: 767px) {
    .sdm-header {
        height: 50px;
    }

    .sdm-header-inner {
        padding: 0 15px;
    }

    body {
        padding-top: 50px;
        background-color: black !important;
    }

    .et_fixed_nav #main-header {
        -webkit-transition: none;
        transition: none;
        height: 79px !important;
    }
    .container {
        width: 80%;
        max-width: 1080px;
        margin: auto;
    }

    .sdm-header-inner {
        padding: 0 4px;
        margin-top: 1px !important;
    }

    .sdm-mobile-toggle span {
        display: block;
        width: 20px;
        height: 2px;
        background: #0091ff;
        margin: 4px 0;
        border-radius: 2px;
        transition: transform 0.3s, opacity 0.3s;
    }
    .sdm-mobile-toggle {
        padding: 2px;
    }

    /* #page-container {
        padding-top: 44px !important;
    } */

}

@media only screen and (min-width: 1601px) and (max-width: 2559px) {
    .sdm-logo img {
        height: clamp(21px, 2.6vw, 37.5px);
        width: auto;
        max-height: 100%;
    }
    #sdm-nav li a {
        font-size: 1rem !important;
        margin-top: -8px !important;
    }
    .sub-menu li a {
        padding-top: 20px;
    }


}

@media only screen and (min-width: 2560px) and (max-width: 3800px) {
    .sdm-logo img {
        height: clamp(21px, 2.6vw, 43.5px);
        width: auto;
        max-height: 100%;
    }
    #sdm-nav li a {
        font-size: 1.6rem !important;
    }

    li#menu-item-20.sdm-nav-cta .sdm-cta-btn {
        padding: .8vh 1.1vw .8vh 1.1vw !important;
        font-size: .8vw !important;
    }
}