.smw-dropdown-menu {
    position: relative;
}

.smw-dropdown-list {
    display: none;
    position: absolute;
    bottom: 100%; /* Muestra el menú hacia arriba */
    top: auto;
    background: #fff;
    padding: 8px 0;
    margin: 0;
    z-index: 100;
    list-style: none;
    transition: all 0.2s;
}

.smw-dropdown-menu:hover .smw-dropdown-list,
.smw-dropdown-menu:focus-within .smw-dropdown-list {
    display: block;
}

.smw-dropdown-list li {
    list-style: none;
    margin: 0;
    padding: 0;
    position: relative;
    border-bottom: 1px solid #eaeaea;
}

.smw-dropdown-list a,
.smw-dropdown-list span {
    display: block;
    padding: 10px 18px;
    text-decoration: none;
    white-space: normal;
    word-break: break-word;
    overflow-wrap: break-word;
    font-size: 16px;
    transition: background 0.2s, color 0.2s;
    box-sizing: border-box;
    max-width: 100%;
}

.smw-dropdown-list li:last-child a {
    border-bottom: none;
}

.smw-dropdown-submenu {
    padding: 0;
    margin: 0;
}

.smw-dropdown-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    min-width: 0;
    padding: 12px 18px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
    outline: none;
    position: relative;
    z-index: 2;
    overflow: hidden;
}

.smw-dropdown-btn .smw-dropdown-label {
    flex: 1 1 auto;
    min-width: 0;
    overflow: visible;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.smw-dropdown-btn .smw-dropdown-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    font-size: 18px;
    transition: transform 0.3s;
    margin-left: 0;
}

.smw-dropdown-btn {
    background-color: #172D5A;
}

.smw-dropdown-btn:hover {
    background: #0b1935;
}

@media (max-width: 767px) {
    .smw-dropdown-menu {
        width: 100%;
        left: 0 !important;
        right: 0 !important;
        min-width: 0 !important;
    }
    .smw-dropdown-btn {
        width: 100%;
        min-width: 0 !important;
        border-radius: 0 !important;
        font-size: 15px;
        padding: 10px 14px;
        gap: 6px;
        background-color: #234280;
    }
    .smw-dropdown-list {
        min-width: 100% !important;
        width: auto !important;
        left: 0 !important;
        right: 0 !important;
        box-sizing: border-box;
    }
    .smw-dropdown-list a, .smw-dropdown-list span {
        padding-left: 20px;
        padding-right: 20px;
        font-size: 16px;
    }
}

@media (min-width: 768px) and (max-width: 1024px) {
    .smw-dropdown-menu {
        left: 0 !important;
        right: 0 !important;
    }
    .smw-dropdown-btn {
        width: auto;
        min-width: 120px;
        font-size: 16px;
        padding: 12px 18px;
        gap: 10px;
        margin-bottom: 0;
        box-sizing: border-box;
    }
    .smw-dropdown-btn .smw-dropdown-label {
        flex: 1 1 auto;
        min-width: 0;
        overflow: visible;
        text-overflow: ellipsis;
        white-space: normal !important;
    }
}
