/* Specific alignment for the Elementor Megamenu to match the logo and container */
#widget-megamenu+.e-n-menu-content {
    left: -205px !important;
    width: 1320px !important;
    max-width: 1320px !important;
}

.ha-library-container {
    display: flex;
    font-family: "Segoe UI", sans-serif;
    padding: 0;
    /* background: #ffffff; */
    width: 100%;
    max-width: 100%;
    /* margin: 0 auto; */
    box-sizing: border-box;
    overflow: hidden;
    border-radius: 12px;
}

.ha-library-sidebar {
    width: 280px;
    max-width: 100%;
    flex-shrink: 0;
    background: #f4fbff;
    padding: 30px;
}

/* Top Toggle Styles */
.ha-type-filter {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.type-btn {
    font-size: 14px;
    font-weight: 400;
    line-height: 19px;
    color: #171717;
    background: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 4px 4px 8px;
    border: 1px solid #d7eeff;
    border-radius: 20px;
    cursor: pointer;
}

.type-btn span {
    background: #d7eeff;
    padding: 2px 8px;
    border-radius: 36px;
}

.type-btn.active {
    background: #0960ec;
    color: #fff;
    border: 1px solid #0960ec;
}

.type-btn.active span {
    background: #0000008c;
    color: #fff;
}

.ha-search-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 400;
    line-height: 19px;
    color: #171717;
    width: 100%;
    padding: 10px 12px;
    background: #ffffff;
    border-radius: 50px;
    border: 1px solid #d5e5ff;
    margin-bottom: 24px;
}

.ha-search-wrapper:focus-within {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08);
}

.ha-search-wrapper input {
    border: none;
    outline: none;
}

.sidebar-title {
    font-size: 16px;
    margin-bottom: 15px;
    color: #333;
    font-weight: 700;
}

.ha-cat-filter {
    list-style: none;
    padding: 0;
}

.ha-cat-filter li {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    cursor: pointer;
    color: #777;
    font-size: 14px;
    transition: 0.2s;
}

.ha-cat-filter li:hover,
.ha-cat-filter li.active {
    color: #0073ff;
}

.ha-cat-filter li .count {
    background: #eef5f7;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    color: #333;
}

/* Widget list - column flow layout */
.ha-widget-grid {
    display: block;
    column-width: 190px;
    column-gap: 28px;
    flex-grow: 1;
    padding: 40px 30px;
    min-width: 0;
}

.ha-widget-item {
    width: 100%;
    display: inline-block;
    break-inside: avoid;
    -webkit-column-break-inside: avoid;
    page-break-inside: avoid;
    margin-bottom: 14px;
}

.ha-widget-item a {
    font-family: "DM Sans", Sans-serif;
    font-size: 14px;
    font-weight: 400;
    line-height: 19px;
    text-decoration: none;
    color: #5d5d5d;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.ha-widget-item a:before {
    content: "";
    width: 8px;
    height: 8px;
    background: #1078ff;
    border-radius: 50%;
    display: inline-block;
    opacity: 0;
    transform: translateX(-4px);
    transition: all 0.3s ease;
}

.ha-widget-item a:hover:before {
    opacity: 1;
    transform: translateX(0);
}

.ha-widget-item a:hover {
    font-size: 14px;
    color: #0073ff;
    transform: translateX(12px);
}

.ha-new-badge {
    background: #EB6B1B;
    color: #fff;
    font-size: 8px;
    padding: 1px 5px;
    border-radius: 3px;
    text-transform: uppercase;
    margin-left: 6px;
    vertical-align: middle;
    font-weight: bold;
}

.ha-pro-badge {
    display: inline-block;
    background-color: #ffcaaa;
    color: #db5200;
    font-size: 8px;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 3px;
    margin-left: 6px;
    vertical-align: middle;
    text-transform: uppercase;
}

.ha-upcoming-badge {
    display: inline-block;
    background-color: #D4FFBF;
    color: #378310;
    font-size: 8px;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 3px;
    margin-left: 6px;
    vertical-align: middle;
    text-transform: uppercase;
}

.ha-free-badge {
    display: inline-block;
    background-color: #D7EEFF;
    color: #0960EC;
    font-size: 8px;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 3px;
    margin-left: 6px;
    vertical-align: middle;
    text-transform: uppercase;
}

@media all and (max-width: 1400px) {
    .ha-library-sidebar {
        width: 240px;
        padding: 20px;
    }

    .ha-widget-grid {
        padding: 30px 20px;
        column-width: 170px;
        column-gap: 22px;
    }
}

@media all and (max-width: 1024px) {
    .ha-library-sidebar {
        width: 200px;
    }
}

@media all and (max-width: 1024px) {
    #widget-megamenu+.e-n-menu-content {
        max-width: 100%;
        left: 0;
    }

    .ha-library-sidebar {
        width: 220px;
        padding: 20px;
    }

    .ha-type-filter {
        flex-wrap: wrap;
    }

    .ha-search-wrapper input {
        font-size: 12px;
        padding: 4px;
    }

    .ha-search-wrapper {
        font-size: 10px;
        padding: 4px 5px;
    }
}


/* Make Entire Elementor Icon Box Clickable */
.elementor-widget-icon-box .elementor-icon-box-wrapper {
    position: relative;
}

.elementor-widget-icon-box .elementor-icon-box-title a::after {
    content: "";
    position: absolute;
    top: -7px;
    left: -11px;
    width: 106%;
    height: 136%;
    z-index: 10;
}

@media all and (max-width: 768px) {
    .ha-library-container {
        flex-direction: column;
    }

    #widget-megamenu+.e-n-menu-content .elementor-element {
        border-radius: 0;
        box-shadow: unset;
    }

    .ha-widget-grid {
        padding: 20px;
        column-count: 1;
        column-width: auto;
        column-gap: 0;
    }

    .ha-library-sidebar {
        width: 100%;
        padding: 20px;
    }
}